From fb1611c0ca99d9e609057c46507be2af8389bb7b Mon Sep 17 00:00:00 2001 From: Anson Bridges Date: Tue, 17 Feb 2026 11:37:50 -0800 Subject: firmware coad --- firmware/memory_chip_gone/.cproject | 210 + firmware/memory_chip_gone/.mxproject | 48 + firmware/memory_chip_gone/.project | 32 + .../.settings/language.settings.xml | 25 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/stm32cubeide.project.prefs | 5 + firmware/memory_chip_gone/Core/Inc/app_common.h | 113 + firmware/memory_chip_gone/Core/Inc/app_conf.h | 755 + firmware/memory_chip_gone/Core/Inc/app_debug.h | 67 + firmware/memory_chip_gone/Core/Inc/app_entry.h | 71 + firmware/memory_chip_gone/Core/Inc/hw_conf.h | 168 + firmware/memory_chip_gone/Core/Inc/hw_if.h | 247 + firmware/memory_chip_gone/Core/Inc/main.h | 72 + firmware/memory_chip_gone/Core/Inc/stm32_lpm_if.h | 80 + .../memory_chip_gone/Core/Inc/stm32wbxx_hal_conf.h | 352 + firmware/memory_chip_gone/Core/Inc/stm32wbxx_it.h | 69 + .../memory_chip_gone/Core/Inc/utilities_conf.h | 65 + firmware/memory_chip_gone/Core/Src/app_debug.c | 409 + firmware/memory_chip_gone/Core/Src/app_entry.c | 584 + .../memory_chip_gone/Core/Src/hw_timerserver.c | 888 + firmware/memory_chip_gone/Core/Src/main.c | 433 + firmware/memory_chip_gone/Core/Src/stm32_lpm_if.c | 347 + .../memory_chip_gone/Core/Src/stm32wbxx_hal_msp.c | 276 + firmware/memory_chip_gone/Core/Src/stm32wbxx_it.c | 245 + firmware/memory_chip_gone/Core/Src/syscalls.c | 176 + firmware/memory_chip_gone/Core/Src/sysmem.c | 79 + .../memory_chip_gone/Core/Src/system_stm32wbxx.c | 378 + .../Core/Startup/startup_stm32wb55cgux.s | 447 + .../Debug/Core/Src/app_debug.cyclo | 7 + .../memory_chip_gone/Debug/Core/Src/app_debug.d | 127 + .../memory_chip_gone/Debug/Core/Src/app_debug.o | Bin 0 -> 1230712 bytes .../memory_chip_gone/Debug/Core/Src/app_debug.su | 7 + .../Debug/Core/Src/app_entry.cyclo | 30 + .../memory_chip_gone/Debug/Core/Src/app_entry.d | 233 + .../memory_chip_gone/Debug/Core/Src/app_entry.o | Bin 0 -> 1303740 bytes .../memory_chip_gone/Debug/Core/Src/app_entry.su | 30 + .../Debug/Core/Src/hw_timerserver.cyclo | 18 + .../Debug/Core/Src/hw_timerserver.d | 111 + .../Debug/Core/Src/hw_timerserver.o | Bin 0 -> 1226692 bytes .../Debug/Core/Src/hw_timerserver.su | 18 + .../memory_chip_gone/Debug/Core/Src/main.cyclo | 11 + firmware/memory_chip_gone/Debug/Core/Src/main.d | 112 + firmware/memory_chip_gone/Debug/Core/Src/main.o | Bin 0 -> 1223556 bytes firmware/memory_chip_gone/Debug/Core/Src/main.su | 11 + .../Debug/Core/Src/stm32_lpm_if.cyclo | 22 + .../memory_chip_gone/Debug/Core/Src/stm32_lpm_if.d | 111 + .../memory_chip_gone/Debug/Core/Src/stm32_lpm_if.o | Bin 0 -> 1188604 bytes .../Debug/Core/Src/stm32_lpm_if.su | 22 + .../Debug/Core/Src/stm32wbxx_hal_msp.cyclo | 14 + .../Debug/Core/Src/stm32wbxx_hal_msp.d | 112 + .../Debug/Core/Src/stm32wbxx_hal_msp.o | Bin 0 -> 1222440 bytes .../Debug/Core/Src/stm32wbxx_hal_msp.su | 14 + .../Debug/Core/Src/stm32wbxx_it.cyclo | 12 + .../memory_chip_gone/Debug/Core/Src/stm32wbxx_it.d | 114 + .../memory_chip_gone/Debug/Core/Src/stm32wbxx_it.o | Bin 0 -> 1207092 bytes .../Debug/Core/Src/stm32wbxx_it.su | 12 + firmware/memory_chip_gone/Debug/Core/Src/subdir.mk | 54 + .../memory_chip_gone/Debug/Core/Src/syscalls.cyclo | 18 + .../memory_chip_gone/Debug/Core/Src/syscalls.d | 1 + .../memory_chip_gone/Debug/Core/Src/syscalls.o | Bin 0 -> 83420 bytes .../memory_chip_gone/Debug/Core/Src/syscalls.su | 18 + .../memory_chip_gone/Debug/Core/Src/sysmem.cyclo | 1 + firmware/memory_chip_gone/Debug/Core/Src/sysmem.d | 1 + firmware/memory_chip_gone/Debug/Core/Src/sysmem.o | Bin 0 -> 55872 bytes firmware/memory_chip_gone/Debug/Core/Src/sysmem.su | 1 + .../Debug/Core/Src/system_stm32wbxx.cyclo | 2 + .../Debug/Core/Src/system_stm32wbxx.d | 77 + .../Debug/Core/Src/system_stm32wbxx.o | Bin 0 -> 1148696 bytes .../Debug/Core/Src/system_stm32wbxx.su | 2 + .../Debug/Core/Startup/startup_stm32wb55cgux.d | 2 + .../Debug/Core/Startup/startup_stm32wb55cgux.o | Bin 0 -> 6788 bytes .../memory_chip_gone/Debug/Core/Startup/subdir.mk | 27 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.cyclo | 77 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o | Bin 0 -> 1181684 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.su | 77 + .../Src/stm32wbxx_hal_cortex.cyclo | 32 + .../Src/stm32wbxx_hal_cortex.d | 78 + .../Src/stm32wbxx_hal_cortex.o | Bin 0 -> 1162620 bytes .../Src/stm32wbxx_hal_cortex.su | 32 + .../Src/stm32wbxx_hal_dma.cyclo | 15 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o | Bin 0 -> 1156732 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.su | 15 + .../Src/stm32wbxx_hal_dma_ex.cyclo | 5 + .../Src/stm32wbxx_hal_dma_ex.d | 78 + .../Src/stm32wbxx_hal_dma_ex.o | Bin 0 -> 1148560 bytes .../Src/stm32wbxx_hal_dma_ex.su | 5 + .../Src/stm32wbxx_hal_exti.cyclo | 9 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o | Bin 0 -> 1151332 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.su | 9 + .../Src/stm32wbxx_hal_flash.cyclo | 14 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o | Bin 0 -> 1153192 bytes .../Src/stm32wbxx_hal_flash.su | 14 + .../Src/stm32wbxx_hal_flash_ex.cyclo | 26 + .../Src/stm32wbxx_hal_flash_ex.d | 78 + .../Src/stm32wbxx_hal_flash_ex.o | Bin 0 -> 1159740 bytes .../Src/stm32wbxx_hal_flash_ex.su | 26 + .../Src/stm32wbxx_hal_gpio.cyclo | 9 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o | Bin 0 -> 1151296 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.su | 9 + .../Src/stm32wbxx_hal_hsem.cyclo | 11 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o | Bin 0 -> 1148688 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.su | 11 + .../Src/stm32wbxx_hal_i2c.cyclo | 81 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o | Bin 0 -> 1221640 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.su | 81 + .../Src/stm32wbxx_hal_i2c_ex.cyclo | 6 + .../Src/stm32wbxx_hal_i2c_ex.d | 78 + .../Src/stm32wbxx_hal_i2c_ex.o | Bin 0 -> 1151056 bytes .../Src/stm32wbxx_hal_i2c_ex.su | 6 + .../Src/stm32wbxx_hal_ipcc.cyclo | 17 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o | Bin 0 -> 1154200 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.su | 17 + .../Src/stm32wbxx_hal_pwr.cyclo | 23 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o | Bin 0 -> 1156784 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.su | 23 + .../Src/stm32wbxx_hal_pwr_ex.cyclo | 78 + .../Src/stm32wbxx_hal_pwr_ex.d | 78 + .../Src/stm32wbxx_hal_pwr_ex.o | Bin 0 -> 1181048 bytes .../Src/stm32wbxx_hal_pwr_ex.su | 78 + .../Src/stm32wbxx_hal_rcc.cyclo | 75 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o | Bin 0 -> 1187544 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.su | 75 + .../Src/stm32wbxx_hal_rcc_ex.cyclo | 111 + .../Src/stm32wbxx_hal_rcc_ex.d | 78 + .../Src/stm32wbxx_hal_rcc_ex.o | Bin 0 -> 1205252 bytes .../Src/stm32wbxx_hal_rcc_ex.su | 111 + .../Src/stm32wbxx_hal_rtc.cyclo | 26 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.d | 78 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o | Bin 0 -> 1164280 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.su | 26 + .../Src/stm32wbxx_hal_rtc_ex.cyclo | 37 + .../Src/stm32wbxx_hal_rtc_ex.d | 78 + .../Src/stm32wbxx_hal_rtc_ex.o | Bin 0 -> 1171668 bytes .../Src/stm32wbxx_hal_rtc_ex.su | 37 + .../Src/stm32wbxx_ll_rcc.cyclo | 0 .../STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.d | 2 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o | Bin 0 -> 20168 bytes .../STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.su | 0 .../Drivers/STM32WBxx_HAL_Driver/Src/subdir.mk | 81 + .../ST/STM32_WPAN/ble/core/auto/ble_gap_aci.cyclo | 53 + .../ST/STM32_WPAN/ble/core/auto/ble_gap_aci.d | 16 + .../ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o | Bin 0 -> 143500 bytes .../ST/STM32_WPAN/ble/core/auto/ble_gap_aci.su | 53 + .../ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.cyclo | 48 + .../ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.d | 16 + .../ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o | Bin 0 -> 137132 bytes .../ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.su | 48 + .../ST/STM32_WPAN/ble/core/auto/ble_hal_aci.cyclo | 22 + .../ST/STM32_WPAN/ble/core/auto/ble_hal_aci.d | 16 + .../ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o | Bin 0 -> 101596 bytes .../ST/STM32_WPAN/ble/core/auto/ble_hal_aci.su | 22 + .../ST/STM32_WPAN/ble/core/auto/ble_hci_le.cyclo | 80 + .../ST/STM32_WPAN/ble/core/auto/ble_hci_le.d | 16 + .../ST/STM32_WPAN/ble/core/auto/ble_hci_le.o | Bin 0 -> 160940 bytes .../ST/STM32_WPAN/ble/core/auto/ble_hci_le.su | 80 + .../STM32_WPAN/ble/core/auto/ble_l2cap_aci.cyclo | 9 + .../ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.d | 16 + .../ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o | Bin 0 -> 92632 bytes .../ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.su | 9 + .../ST/STM32_WPAN/ble/core/auto/subdir.mk | 39 + .../ST/STM32_WPAN/ble/core/template/osal.cyclo | 3 + .../ST/STM32_WPAN/ble/core/template/osal.d | 4 + .../ST/STM32_WPAN/ble/core/template/osal.o | Bin 0 -> 49016 bytes .../ST/STM32_WPAN/ble/core/template/osal.su | 3 + .../ST/STM32_WPAN/ble/core/template/subdir.mk | 27 + .../ST/STM32_WPAN/ble/svc/Src/p2p_stm.cyclo | 3 + .../ST/STM32_WPAN/ble/svc/Src/p2p_stm.d | 210 + .../ST/STM32_WPAN/ble/svc/Src/p2p_stm.o | Bin 0 -> 1266812 bytes .../ST/STM32_WPAN/ble/svc/Src/p2p_stm.su | 3 + .../ST/STM32_WPAN/ble/svc/Src/subdir.mk | 30 + .../ST/STM32_WPAN/ble/svc/Src/svc_ctl.cyclo | 23 + .../ST/STM32_WPAN/ble/svc/Src/svc_ctl.d | 210 + .../ST/STM32_WPAN/ble/svc/Src/svc_ctl.o | Bin 0 -> 1269820 bytes .../ST/STM32_WPAN/ble/svc/Src/svc_ctl.su | 23 + .../interface/patterns/ble_thread/shci/shci.cyclo | 32 + .../interface/patterns/ble_thread/shci/shci.d | 90 + .../interface/patterns/ble_thread/shci/shci.o | Bin 0 -> 1215760 bytes .../interface/patterns/ble_thread/shci/shci.su | 32 + .../interface/patterns/ble_thread/shci/subdir.mk | 27 + .../interface/patterns/ble_thread/tl/hci_tl.cyclo | 10 + .../interface/patterns/ble_thread/tl/hci_tl.d | 136 + .../interface/patterns/ble_thread/tl/hci_tl.o | Bin 0 -> 1247656 bytes .../interface/patterns/ble_thread/tl/hci_tl.su | 10 + .../patterns/ble_thread/tl/hci_tl_if.cyclo | 1 + .../interface/patterns/ble_thread/tl/hci_tl_if.d | 12 + .../interface/patterns/ble_thread/tl/hci_tl_if.o | Bin 0 -> 66788 bytes .../interface/patterns/ble_thread/tl/hci_tl_if.su | 1 + .../interface/patterns/ble_thread/tl/shci_tl.cyclo | 10 + .../interface/patterns/ble_thread/tl/shci_tl.d | 14 + .../interface/patterns/ble_thread/tl/shci_tl.o | Bin 0 -> 75344 bytes .../interface/patterns/ble_thread/tl/shci_tl.su | 10 + .../patterns/ble_thread/tl/shci_tl_if.cyclo | 1 + .../interface/patterns/ble_thread/tl/shci_tl_if.d | 12 + .../interface/patterns/ble_thread/tl/shci_tl_if.o | Bin 0 -> 66796 bytes .../interface/patterns/ble_thread/tl/shci_tl_if.su | 1 + .../interface/patterns/ble_thread/tl/subdir.mk | 39 + .../interface/patterns/ble_thread/tl/tl_mbox.cyclo | 18 + .../interface/patterns/ble_thread/tl/tl_mbox.d | 123 + .../interface/patterns/ble_thread/tl/tl_mbox.o | Bin 0 -> 1227620 bytes .../interface/patterns/ble_thread/tl/tl_mbox.su | 18 + .../ST/STM32_WPAN/utilities/dbg_trace.cyclo | 3 + .../ST/STM32_WPAN/utilities/dbg_trace.d | 115 + .../ST/STM32_WPAN/utilities/dbg_trace.o | Bin 0 -> 1206620 bytes .../ST/STM32_WPAN/utilities/dbg_trace.su | 3 + .../Middlewares/ST/STM32_WPAN/utilities/otp.cyclo | 1 + .../Middlewares/ST/STM32_WPAN/utilities/otp.d | 113 + .../Middlewares/ST/STM32_WPAN/utilities/otp.o | Bin 0 -> 1204112 bytes .../Middlewares/ST/STM32_WPAN/utilities/otp.su | 1 + .../ST/STM32_WPAN/utilities/stm_list.cyclo | 12 + .../Middlewares/ST/STM32_WPAN/utilities/stm_list.d | 117 + .../Middlewares/ST/STM32_WPAN/utilities/stm_list.o | Bin 0 -> 1212664 bytes .../ST/STM32_WPAN/utilities/stm_list.su | 12 + .../ST/STM32_WPAN/utilities/stm_queue.cyclo | 8 + .../ST/STM32_WPAN/utilities/stm_queue.d | 113 + .../ST/STM32_WPAN/utilities/stm_queue.o | Bin 0 -> 1212300 bytes .../ST/STM32_WPAN/utilities/stm_queue.su | 8 + .../Middlewares/ST/STM32_WPAN/utilities/subdir.mk | 36 + .../Debug/STM32_WPAN/App/app_ble.cyclo | 19 + .../Debug/STM32_WPAN/App/app_ble.d | 232 + .../Debug/STM32_WPAN/App/app_ble.o | Bin 0 -> 1299100 bytes .../Debug/STM32_WPAN/App/app_ble.su | 19 + .../Debug/STM32_WPAN/App/p2p_server_app.cyclo | 3 + .../Debug/STM32_WPAN/App/p2p_server_app.d | 213 + .../Debug/STM32_WPAN/App/p2p_server_app.o | Bin 0 -> 1261272 bytes .../Debug/STM32_WPAN/App/p2p_server_app.su | 3 + .../Debug/STM32_WPAN/App/subdir.mk | 30 + .../Debug/STM32_WPAN/Target/hw_ipcc.cyclo | 36 + .../Debug/STM32_WPAN/Target/hw_ipcc.d | 116 + .../Debug/STM32_WPAN/Target/hw_ipcc.o | Bin 0 -> 1231512 bytes .../Debug/STM32_WPAN/Target/hw_ipcc.su | 36 + .../Debug/STM32_WPAN/Target/subdir.mk | 27 + .../Debug/Utilities/lpm/tiny_lpm/stm32_lpm.cyclo | 6 + .../Debug/Utilities/lpm/tiny_lpm/stm32_lpm.d | 112 + .../Debug/Utilities/lpm/tiny_lpm/stm32_lpm.o | Bin 0 -> 1202424 bytes .../Debug/Utilities/lpm/tiny_lpm/stm32_lpm.su | 6 + .../Debug/Utilities/lpm/tiny_lpm/subdir.mk | 27 + .../Debug/Utilities/sequencer/stm32_seq.cyclo | 22 + .../Debug/Utilities/sequencer/stm32_seq.d | 112 + .../Debug/Utilities/sequencer/stm32_seq.o | Bin 0 -> 1214716 bytes .../Debug/Utilities/sequencer/stm32_seq.su | 22 + .../Debug/Utilities/sequencer/subdir.mk | 27 + firmware/memory_chip_gone/Debug/makefile | 104 + .../memory_chip_gone/Debug/memory_chip_gone.elf | Bin 0 -> 1629168 bytes .../memory_chip_gone/Debug/memory_chip_gone.list | 21728 +++++++++++++++++++ .../memory_chip_gone/Debug/memory_chip_gone.map | 10836 +++++++++ firmware/memory_chip_gone/Debug/objects.list | 53 + firmware/memory_chip_gone/Debug/objects.mk | 9 + firmware/memory_chip_gone/Debug/sources.mk | 38 + .../Device/ST/STM32WBxx/Include/stm32wb55xx.h | 13690 ++++++++++++ .../CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h | 230 + .../Device/ST/STM32WBxx/Include/system_stm32wbxx.h | 111 + .../Drivers/CMSIS/Device/ST/STM32WBxx/LICENSE.txt | 6 + .../Drivers/CMSIS/Include/cmsis_armcc.h | 894 + .../Drivers/CMSIS/Include/cmsis_armclang.h | 1444 ++ .../Drivers/CMSIS/Include/cmsis_armclang_ltm.h | 1891 ++ .../Drivers/CMSIS/Include/cmsis_compiler.h | 283 + .../Drivers/CMSIS/Include/cmsis_gcc.h | 2168 ++ .../Drivers/CMSIS/Include/cmsis_iccarm.h | 964 + .../Drivers/CMSIS/Include/cmsis_version.h | 39 + .../Drivers/CMSIS/Include/core_armv81mml.h | 2968 +++ .../Drivers/CMSIS/Include/core_armv8mbl.h | 1921 ++ .../Drivers/CMSIS/Include/core_armv8mml.h | 2835 +++ .../Drivers/CMSIS/Include/core_cm0.h | 952 + .../Drivers/CMSIS/Include/core_cm0plus.h | 1085 + .../Drivers/CMSIS/Include/core_cm1.h | 979 + .../Drivers/CMSIS/Include/core_cm23.h | 1996 ++ .../Drivers/CMSIS/Include/core_cm3.h | 1937 ++ .../Drivers/CMSIS/Include/core_cm33.h | 2910 +++ .../Drivers/CMSIS/Include/core_cm35p.h | 2910 +++ .../Drivers/CMSIS/Include/core_cm4.h | 2124 ++ .../Drivers/CMSIS/Include/core_cm7.h | 2725 +++ .../Drivers/CMSIS/Include/core_sc000.h | 1025 + .../Drivers/CMSIS/Include/core_sc300.h | 1912 ++ .../Drivers/CMSIS/Include/mpu_armv7.h | 272 + .../Drivers/CMSIS/Include/mpu_armv8.h | 346 + .../Drivers/CMSIS/Include/tz_context.h | 70 + .../memory_chip_gone/Drivers/CMSIS/LICENSE.txt | 201 + .../Inc/Legacy/stm32_hal_legacy.h | 4424 ++++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h | 710 + .../Inc/stm32wbxx_hal_cortex.h | 416 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h | 210 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h | 714 + .../Inc/stm32wbxx_hal_dma_ex.h | 262 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h | 363 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h | 1003 + .../Inc/stm32wbxx_hal_flash_ex.h | 137 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h | 329 + .../Inc/stm32wbxx_hal_gpio_ex.h | 679 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h | 187 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h | 842 + .../Inc/stm32wbxx_hal_i2c_ex.h | 170 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h | 267 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h | 513 + .../Inc/stm32wbxx_hal_pwr_ex.h | 976 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h | 3443 +++ .../Inc/stm32wbxx_hal_rcc_ex.h | 1659 ++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h | 954 + .../Inc/stm32wbxx_hal_rtc_ex.h | 1180 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h | 2377 ++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h | 644 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h | 795 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h | 2159 ++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h | 1768 ++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h | 1633 ++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h | 989 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h | 880 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_i2c.h | 2279 ++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h | 732 + .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h | 2725 +++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h | 4560 ++++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h | 3838 ++++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h | 2277 ++ .../STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h | 312 + .../Drivers/STM32WBxx_HAL_Driver/LICENSE.txt | 6 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c | 852 + .../Src/stm32wbxx_hal_cortex.c | 505 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c | 1120 + .../Src/stm32wbxx_hal_dma_ex.c | 295 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c | 634 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c | 743 + .../Src/stm32wbxx_hal_flash_ex.c | 1061 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c | 551 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c | 369 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c | 7561 +++++++ .../Src/stm32wbxx_hal_i2c_ex.c | 354 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c | 755 + .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c | 742 + .../Src/stm32wbxx_hal_pwr_ex.c | 1368 ++ .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c | 1824 ++ .../Src/stm32wbxx_hal_rcc_ex.c | 2328 ++ .../STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c | 1945 ++ .../Src/stm32wbxx_hal_rtc_ex.c | 2104 ++ .../STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c | 1361 ++ .../Middlewares/ST/STM32_WPAN/ble/ble.h | 88 + .../Middlewares/ST/STM32_WPAN/ble/ble_common.h | 117 + .../ST/STM32_WPAN/ble/core/auto/ble_events.h | 2008 ++ .../ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c | 1661 ++ .../ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h | 1931 ++ .../ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c | 1521 ++ .../ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h | 1281 ++ .../ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c | 519 + .../ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h | 478 + .../ST/STM32_WPAN/ble/core/auto/ble_hci_le.c | 2008 ++ .../ST/STM32_WPAN/ble/core/auto/ble_hci_le.h | 2263 ++ .../ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c | 306 + .../ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h | 304 + .../ST/STM32_WPAN/ble/core/auto/ble_types.h | 3459 +++ .../ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h | 200 + .../ST/STM32_WPAN/ble/core/ble_bufsize.h | 182 + .../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h | 42 + .../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h | 507 + .../ST/STM32_WPAN/ble/core/ble_legacy.h | 282 + .../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h | 387 + .../ST/STM32_WPAN/ble/core/template/ble_const.h | 129 + .../ST/STM32_WPAN/ble/core/template/compiler.h | 160 + .../ST/STM32_WPAN/ble/core/template/osal.c | 50 + .../ST/STM32_WPAN/ble/core/template/osal.h | 65 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h | 62 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h | 102 + .../ST/STM32_WPAN/ble/svc/Inc/crs_stm.h | 72 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h | 52 + .../ST/STM32_WPAN/ble/svc/Inc/eds_stm.h | 79 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h | 79 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h | 99 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h | 113 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h | 62 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h | 63 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h | 43 + .../ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h | 177 + .../ST/STM32_WPAN/ble/svc/Inc/otas_stm.h | 108 + .../ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h | 73 + .../ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h | 171 + .../ST/STM32_WPAN/ble/svc/Inc/template_stm.h | 73 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h | 46 + .../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h | 328 + .../ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h | 100 + .../ST/STM32_WPAN/ble/svc/Src/common_blesvc.h | 54 + .../ST/STM32_WPAN/ble/svc/Src/p2p_stm.c | 295 + .../ST/STM32_WPAN/ble/svc/Src/svc_ctl.c | 330 + .../STM32_WPAN/interface/patterns/ble_thread/hw.h | 105 + .../interface/patterns/ble_thread/shci/shci.c | 762 + .../interface/patterns/ble_thread/shci/shci.h | 1411 ++ .../interface/patterns/ble_thread/tl/hci_tl.c | 308 + .../interface/patterns/ble_thread/tl/hci_tl.h | 196 + .../interface/patterns/ble_thread/tl/hci_tl_if.c | 30 + .../interface/patterns/ble_thread/tl/mbox_def.h | 280 + .../interface/patterns/ble_thread/tl/shci_tl.c | 254 + .../interface/patterns/ble_thread/tl/shci_tl.h | 173 + .../interface/patterns/ble_thread/tl/shci_tl_if.c | 30 + .../interface/patterns/ble_thread/tl/tl.h | 372 + .../interface/patterns/ble_thread/tl/tl_mbox.c | 877 + .../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h | 171 + .../ST/STM32_WPAN/utilities/dbg_trace.c | 360 + .../ST/STM32_WPAN/utilities/dbg_trace.h | 103 + .../Middlewares/ST/STM32_WPAN/utilities/otp.c | 52 + .../Middlewares/ST/STM32_WPAN/utilities/otp.h | 65 + .../Middlewares/ST/STM32_WPAN/utilities/stm_list.c | 207 + .../Middlewares/ST/STM32_WPAN/utilities/stm_list.h | 63 + .../ST/STM32_WPAN/utilities/stm_queue.c | 383 + .../ST/STM32_WPAN/utilities/stm_queue.h | 59 + .../ST/STM32_WPAN/utilities/utilities_common.h | 159 + firmware/memory_chip_gone/STM32WB55CGUX_FLASH.ld | 185 + firmware/memory_chip_gone/STM32WB55CGUX_RAM.ld | 185 + firmware/memory_chip_gone/STM32_WPAN/App/app_ble.c | 1432 ++ firmware/memory_chip_gone/STM32_WPAN/App/app_ble.h | 81 + .../memory_chip_gone/STM32_WPAN/App/ble_conf.h | 70 + .../memory_chip_gone/STM32_WPAN/App/ble_dbg_conf.h | 198 + .../STM32_WPAN/App/p2p_server_app.c | 154 + .../STM32_WPAN/App/p2p_server_app.h | 78 + .../memory_chip_gone/STM32_WPAN/App/tl_dbg_conf.h | 133 + .../memory_chip_gone/STM32_WPAN/Target/hw_ipcc.c | 747 + .../Utilities/lpm/tiny_lpm/stm32_lpm.c | 258 + .../Utilities/lpm/tiny_lpm/stm32_lpm.h | 167 + .../Utilities/sequencer/stm32_seq.c | 686 + .../Utilities/sequencer/stm32_seq.h | 405 + firmware/memory_chip_gone/memory_chip_gone.ioc | 214 + firmware/memory_chip_gone/memory_chip_gone.launch | 86 + 427 files changed, 205643 insertions(+) create mode 100644 firmware/memory_chip_gone/.cproject create mode 100644 firmware/memory_chip_gone/.mxproject create mode 100644 firmware/memory_chip_gone/.project create mode 100644 firmware/memory_chip_gone/.settings/language.settings.xml create mode 100644 firmware/memory_chip_gone/.settings/org.eclipse.core.resources.prefs create mode 100644 firmware/memory_chip_gone/.settings/stm32cubeide.project.prefs create mode 100644 firmware/memory_chip_gone/Core/Inc/app_common.h create mode 100644 firmware/memory_chip_gone/Core/Inc/app_conf.h create mode 100644 firmware/memory_chip_gone/Core/Inc/app_debug.h create mode 100644 firmware/memory_chip_gone/Core/Inc/app_entry.h create mode 100644 firmware/memory_chip_gone/Core/Inc/hw_conf.h create mode 100644 firmware/memory_chip_gone/Core/Inc/hw_if.h create mode 100644 firmware/memory_chip_gone/Core/Inc/main.h create mode 100644 firmware/memory_chip_gone/Core/Inc/stm32_lpm_if.h create mode 100644 firmware/memory_chip_gone/Core/Inc/stm32wbxx_hal_conf.h create mode 100644 firmware/memory_chip_gone/Core/Inc/stm32wbxx_it.h create mode 100644 firmware/memory_chip_gone/Core/Inc/utilities_conf.h create mode 100644 firmware/memory_chip_gone/Core/Src/app_debug.c create mode 100644 firmware/memory_chip_gone/Core/Src/app_entry.c create mode 100644 firmware/memory_chip_gone/Core/Src/hw_timerserver.c create mode 100644 firmware/memory_chip_gone/Core/Src/main.c create mode 100644 firmware/memory_chip_gone/Core/Src/stm32_lpm_if.c create mode 100644 firmware/memory_chip_gone/Core/Src/stm32wbxx_hal_msp.c create mode 100644 firmware/memory_chip_gone/Core/Src/stm32wbxx_it.c create mode 100644 firmware/memory_chip_gone/Core/Src/syscalls.c create mode 100644 firmware/memory_chip_gone/Core/Src/sysmem.c create mode 100644 firmware/memory_chip_gone/Core/Src/system_stm32wbxx.c create mode 100644 firmware/memory_chip_gone/Core/Startup/startup_stm32wb55cgux.s create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/app_debug.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/app_debug.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/app_debug.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/app_debug.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/app_entry.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/app_entry.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/app_entry.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/app_entry.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/main.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/main.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/main.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/main.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/syscalls.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/syscalls.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/syscalls.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/syscalls.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/sysmem.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/sysmem.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/sysmem.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/sysmem.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.su create mode 100644 firmware/memory_chip_gone/Debug/Core/Startup/startup_stm32wb55cgux.d create mode 100644 firmware/memory_chip_gone/Debug/Core/Startup/startup_stm32wb55cgux.o create mode 100644 firmware/memory_chip_gone/Debug/Core/Startup/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.d create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.su create mode 100644 firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.d create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.o create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.su create mode 100644 firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.cyclo create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.d create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.o create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.su create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.cyclo create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.d create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.o create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.su create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/App/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.cyclo create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.d create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.o create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.su create mode 100644 firmware/memory_chip_gone/Debug/STM32_WPAN/Target/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.d create mode 100644 firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.o create mode 100644 firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.su create mode 100644 firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.cyclo create mode 100644 firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.d create mode 100644 firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.o create mode 100644 firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.su create mode 100644 firmware/memory_chip_gone/Debug/Utilities/sequencer/subdir.mk create mode 100644 firmware/memory_chip_gone/Debug/makefile create mode 100755 firmware/memory_chip_gone/Debug/memory_chip_gone.elf create mode 100644 firmware/memory_chip_gone/Debug/memory_chip_gone.list create mode 100644 firmware/memory_chip_gone/Debug/memory_chip_gone.map create mode 100644 firmware/memory_chip_gone/Debug/objects.list create mode 100644 firmware/memory_chip_gone/Debug/objects.mk create mode 100644 firmware/memory_chip_gone/Debug/sources.mk create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/LICENSE.txt create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armcc.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armclang.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armclang_ltm.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_compiler.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_gcc.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_iccarm.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_version.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv81mml.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv8mbl.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv8mml.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm0.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm0plus.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm1.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm23.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm3.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm33.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm35p.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm4.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm7.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_sc000.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/core_sc300.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/mpu_armv7.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/mpu_armv8.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/Include/tz_context.h create mode 100644 firmware/memory_chip_gone/Drivers/CMSIS/LICENSE.txt create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_i2c.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/LICENSE.txt create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c create mode 100644 firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/ble.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/ble_common.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_core.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_std.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/osal.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/osal.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/stm32_wpan_common.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/otp.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/otp.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_list.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_list.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_queue.h create mode 100644 firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/utilities_common.h create mode 100644 firmware/memory_chip_gone/STM32WB55CGUX_FLASH.ld create mode 100644 firmware/memory_chip_gone/STM32WB55CGUX_RAM.ld create mode 100644 firmware/memory_chip_gone/STM32_WPAN/App/app_ble.c create mode 100644 firmware/memory_chip_gone/STM32_WPAN/App/app_ble.h create mode 100644 firmware/memory_chip_gone/STM32_WPAN/App/ble_conf.h create mode 100644 firmware/memory_chip_gone/STM32_WPAN/App/ble_dbg_conf.h create mode 100644 firmware/memory_chip_gone/STM32_WPAN/App/p2p_server_app.c create mode 100644 firmware/memory_chip_gone/STM32_WPAN/App/p2p_server_app.h create mode 100644 firmware/memory_chip_gone/STM32_WPAN/App/tl_dbg_conf.h create mode 100644 firmware/memory_chip_gone/STM32_WPAN/Target/hw_ipcc.c create mode 100644 firmware/memory_chip_gone/Utilities/lpm/tiny_lpm/stm32_lpm.c create mode 100644 firmware/memory_chip_gone/Utilities/lpm/tiny_lpm/stm32_lpm.h create mode 100644 firmware/memory_chip_gone/Utilities/sequencer/stm32_seq.c create mode 100644 firmware/memory_chip_gone/Utilities/sequencer/stm32_seq.h create mode 100644 firmware/memory_chip_gone/memory_chip_gone.ioc create mode 100644 firmware/memory_chip_gone/memory_chip_gone.launch (limited to 'firmware/memory_chip_gone') diff --git a/firmware/memory_chip_gone/.cproject b/firmware/memory_chip_gone/.cproject new file mode 100644 index 0000000..4bd9411 --- /dev/null +++ b/firmware/memory_chip_gone/.cproject @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/firmware/memory_chip_gone/.mxproject b/firmware/memory_chip_gone/.mxproject new file mode 100644 index 0000000..a8f1cb2 --- /dev/null +++ b/firmware/memory_chip_gone/.mxproject @@ -0,0 +1,48 @@ +[PreviousLibFiles] +LibFiles=Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h;Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_i2c.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h;Utilities/lpm/tiny_lpm/stm32_lpm.h;Middlewares/ST/STM32_WPAN/stm32_wpan_common.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h;Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h;Middlewares/ST/STM32_WPAN/utilities/otp.h;Middlewares/ST/STM32_WPAN/utilities/stm_list.h;Middlewares/ST/STM32_WPAN/utilities/stm_queue.h;Middlewares/ST/STM32_WPAN/utilities/utilities_common.h;Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h;Middlewares/ST/STM32_WPAN/ble/core/ble_core.h;Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h;Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h;Middlewares/ST/STM32_WPAN/ble/core/ble_std.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h;Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h;Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h;Middlewares/ST/STM32_WPAN/ble/core/template/osal.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c;Utilities/lpm/tiny_lpm/stm32_lpm.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c;Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c;Middlewares/ST/STM32_WPAN/utilities/otp.c;Middlewares/ST/STM32_WPAN/utilities/stm_list.c;Middlewares/ST/STM32_WPAN/utilities/stm_queue.c;Middlewares/ST/STM32_WPAN/ble/core/template/osal.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c;Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c;Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h;Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_i2c.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h;Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h;Utilities/lpm/tiny_lpm/stm32_lpm.h;Middlewares/ST/STM32_WPAN/stm32_wpan_common.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h;Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h;Middlewares/ST/STM32_WPAN/utilities/otp.h;Middlewares/ST/STM32_WPAN/utilities/stm_list.h;Middlewares/ST/STM32_WPAN/utilities/stm_queue.h;Middlewares/ST/STM32_WPAN/utilities/utilities_common.h;Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h;Middlewares/ST/STM32_WPAN/ble/core/ble_core.h;Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h;Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h;Middlewares/ST/STM32_WPAN/ble/core/ble_std.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h;Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h;Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h;Middlewares/ST/STM32_WPAN/ble/core/template/osal.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h;Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h;Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h;Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h;Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h;Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h;Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h;Drivers/CMSIS/Device/ST/STM32WBxx/Source/Templates/system_stm32wbxx.c;Utilities/sequencer/stm32_seq.h;Middlewares/ST/STM32_WPAN/ble/ble_common.h;Middlewares/ST/STM32_WPAN/ble/ble.h;Utilities/sequencer/stm32_seq.c;Utilities/sequencer/stm32_seq.h;Middlewares/ST/STM32_WPAN/ble/ble_common.h;Middlewares/ST/STM32_WPAN/ble/ble.h;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/cmsis_armclang_ltm.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/core_cm35p.h;Drivers/CMSIS/Include/core_armv81mml.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_armv8mbl.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/core_cm0.h; + +[PreviousUsedCubeIDEFiles] +SourceFiles=Core/Src/main.c;Core/Src/app_entry.c;Core/Src/app_debug.c;Core/Src/hw_timerserver.c;Core/Src/stm32_lpm_if.c;STM32_WPAN/App/app_ble.c;STM32_WPAN/App/p2p_server_app.c;STM32_WPAN/Target/hw_ipcc.c;Core/Src/stm32wbxx_it.c;Core/Src/stm32wbxx_hal_msp.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c;Utilities/lpm/tiny_lpm/stm32_lpm.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c;Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c;Middlewares/ST/STM32_WPAN/utilities/otp.c;Middlewares/ST/STM32_WPAN/utilities/stm_list.c;Middlewares/ST/STM32_WPAN/utilities/stm_queue.c;Middlewares/ST/STM32_WPAN/ble/core/template/osal.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c;Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c;Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c;Drivers/CMSIS/Device/ST/STM32WBxx/Source/Templates/system_stm32wbxx.c;Utilities/sequencer/stm32_seq.c;Core/Src/system_stm32wbxx.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c;Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c;Utilities/lpm/tiny_lpm/stm32_lpm.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c;Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c;Middlewares/ST/STM32_WPAN/utilities/otp.c;Middlewares/ST/STM32_WPAN/utilities/stm_list.c;Middlewares/ST/STM32_WPAN/utilities/stm_queue.c;Middlewares/ST/STM32_WPAN/ble/core/template/osal.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c;Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c;Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c;Drivers/CMSIS/Device/ST/STM32WBxx/Source/Templates/system_stm32wbxx.c;Utilities/sequencer/stm32_seq.c;Core/Src/system_stm32wbxx.c;;;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c;Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c;Middlewares/ST/STM32_WPAN/utilities/otp.c;Middlewares/ST/STM32_WPAN/utilities/stm_list.c;Middlewares/ST/STM32_WPAN/utilities/stm_queue.c;Middlewares/ST/STM32_WPAN/ble/core/template/osal.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c;Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c;Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c;Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c; +HeaderPath=Drivers/STM32WBxx_HAL_Driver/Inc;Drivers/STM32WBxx_HAL_Driver/Inc/Legacy;Utilities/lpm/tiny_lpm;Middlewares/ST/STM32_WPAN;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl;Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci;Middlewares/ST/STM32_WPAN/utilities;Middlewares/ST/STM32_WPAN/ble/core;Middlewares/ST/STM32_WPAN/ble/core/auto;Middlewares/ST/STM32_WPAN/ble/core/template;Middlewares/ST/STM32_WPAN/ble/svc/Inc;Middlewares/ST/STM32_WPAN/ble/svc/Src;Drivers/CMSIS/Device/ST/STM32WBxx/Include;Utilities/sequencer;Middlewares/ST/STM32_WPAN/ble;Drivers/CMSIS/Include;Core/Inc;STM32_WPAN/App; +CDefines=USE_HAL_DRIVER;STM32WB55xx;USE_HAL_DRIVER;USE_HAL_DRIVER; + +[PreviousGenFiles] +AdvancedFolderStructure=true +HeaderFileListSize=16 +HeaderFiles#0=../Core/Inc/app_common.h +HeaderFiles#1=../Core/Inc/app_debug.h +HeaderFiles#2=../Core/Inc/app_conf.h +HeaderFiles#3=../Core/Inc/app_entry.h +HeaderFiles#4=../Core/Inc/hw_conf.h +HeaderFiles#5=../Core/Inc/hw_if.h +HeaderFiles#6=../Core/Inc/utilities_conf.h +HeaderFiles#7=../Core/Inc/stm32_lpm_if.h +HeaderFiles#8=../STM32_WPAN/App/app_ble.h +HeaderFiles#9=../STM32_WPAN/App/ble_conf.h +HeaderFiles#10=../STM32_WPAN/App/ble_dbg_conf.h +HeaderFiles#11=../STM32_WPAN/App/tl_dbg_conf.h +HeaderFiles#12=../STM32_WPAN/App/p2p_server_app.h +HeaderFiles#13=../Core/Inc/stm32wbxx_it.h +HeaderFiles#14=../Core/Inc/stm32wbxx_hal_conf.h +HeaderFiles#15=../Core/Inc/main.h +HeaderFolderListSize=2 +HeaderPath#0=../Core/Inc +HeaderPath#1=../STM32_WPAN/App +HeaderFiles=; +SourceFileListSize=10 +SourceFiles#0=../Core/Src/app_entry.c +SourceFiles#1=../Core/Src/app_debug.c +SourceFiles#2=../Core/Src/hw_timerserver.c +SourceFiles#3=../Core/Src/stm32_lpm_if.c +SourceFiles#4=../STM32_WPAN/App/app_ble.c +SourceFiles#5=../STM32_WPAN/App/p2p_server_app.c +SourceFiles#6=../STM32_WPAN/Target/hw_ipcc.c +SourceFiles#7=../Core/Src/stm32wbxx_it.c +SourceFiles#8=../Core/Src/stm32wbxx_hal_msp.c +SourceFiles#9=../Core/Src/main.c +SourceFolderListSize=3 +SourcePath#0=../Core/Src +SourcePath#1=../STM32_WPAN/App +SourcePath#2=../STM32_WPAN/Target +SourceFiles=; + diff --git a/firmware/memory_chip_gone/.project b/firmware/memory_chip_gone/.project new file mode 100644 index 0000000..2c0db56 --- /dev/null +++ b/firmware/memory_chip_gone/.project @@ -0,0 +1,32 @@ + + + memory_chip_gone + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.st.stm32cube.ide.mcu.MCUProjectNature + com.st.stm32cube.ide.mcu.MCUCubeProjectNature + org.eclipse.cdt.core.cnature + com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature + com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature + com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature + com.st.stm32cube.ide.mcu.MCURootProjectNature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/firmware/memory_chip_gone/.settings/language.settings.xml b/firmware/memory_chip_gone/.settings/language.settings.xml new file mode 100644 index 0000000..79d237c --- /dev/null +++ b/firmware/memory_chip_gone/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/firmware/memory_chip_gone/.settings/org.eclipse.core.resources.prefs b/firmware/memory_chip_gone/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/firmware/memory_chip_gone/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/firmware/memory_chip_gone/.settings/stm32cubeide.project.prefs b/firmware/memory_chip_gone/.settings/stm32cubeide.project.prefs new file mode 100644 index 0000000..6a269db --- /dev/null +++ b/firmware/memory_chip_gone/.settings/stm32cubeide.project.prefs @@ -0,0 +1,5 @@ +635E684B79701B039C64EA45C3F84D30=F842F44183C5CE50C48BE684C28C3227 +66BE74F758C12D739921AEA421D593D3=4 +8DF89ED150041C4CBC7CB9A9CAA90856=5BC78CCC30524589C1A7A497A8B64D74 +DC22A860405A8BF2F2C095E5B6529F12=5BC78CCC30524589C1A7A497A8B64D74 +eclipse.preferences.version=1 diff --git a/firmware/memory_chip_gone/Core/Inc/app_common.h b/firmware/memory_chip_gone/Core/Inc/app_common.h new file mode 100644 index 0000000..7da8bac --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/app_common.h @@ -0,0 +1,113 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_common.h + * @author MCD Application Team + * @brief App Common application configuration file for STM32WPAN Middleware. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef APP_COMMON_H +#define APP_COMMON_H + +#ifdef __cplusplus +extern "C"{ +#endif + +#include +#include +#include +#include +#include + +#include "app_conf.h" + +/* -------------------------------- * + * Basic definitions * + * -------------------------------- */ +#undef NULL +#define NULL 0 + +#undef FALSE +#define FALSE 0 + +#undef TRUE +#define TRUE (!0) + +/* -------------------------------- * + * Critical Section definition * + * -------------------------------- */ +#define BACKUP_PRIMASK() uint32_t primask_bit= __get_PRIMASK() +#define DISABLE_IRQ() __disable_irq() +#define RESTORE_PRIMASK() __set_PRIMASK(primask_bit) + +/* -------------------------------- * + * Macro delimiters * + * -------------------------------- */ +#define M_BEGIN do { + +#define M_END } while(0) + +/* -------------------------------- * + * Some useful macro definitions * + * -------------------------------- */ +#ifndef MAX +#define MAX( x, y ) (((x)>(y))?(x):(y)) +#endif + +#ifndef MIN +#define MIN( x, y ) (((x)<(y))?(x):(y)) +#endif + +#define MODINC( a, m ) M_BEGIN (a)++; if ((a)>=(m)) (a)=0; M_END + +#define MODDEC( a, m ) M_BEGIN if ((a)==0) (a)=(m); (a)--; M_END + +#define MODADD( a, b, m ) M_BEGIN (a)+=(b); if ((a)>=(m)) (a)-=(m); M_END + +#define MODSUB( a, b, m ) MODADD( a, (m)-(b), m ) + +#define PAUSE( t ) M_BEGIN \ + __IO int _i; \ + for ( _i = t; _i > 0; _i -- ); \ + M_END + +#define DIVF( x, y ) ((x)/(y)) + +#define DIVC( x, y ) (((x)+(y)-1)/(y)) + +#define DIVR( x, y ) (((x)+((y)/2))/(y)) + +#define SHRR( x, n ) ((((x)>>((n)-1))+1)>>1) + +#define BITN( w, n ) (((w)[(n)/32] >> ((n)%32)) & 1) + +#define BITNSET( w, n, b ) M_BEGIN (w)[(n)/32] |= ((U32)(b))<<((n)%32); M_END + +/* -------------------------------- * + * Compiler * + * -------------------------------- */ +#define PLACE_IN_SECTION( __x__ ) __attribute__((section (__x__))) + +#ifdef WIN32 +#define ALIGN(n) +#else +#define ALIGN(n) __attribute__((aligned(n))) +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*APP_COMMON_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/app_conf.h b/firmware/memory_chip_gone/Core/Inc/app_conf.h new file mode 100644 index 0000000..9833c18 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/app_conf.h @@ -0,0 +1,755 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_conf.h + * @author MCD Application Team + * @brief Application configuration file for STM32WPAN Middleware. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef APP_CONF_H +#define APP_CONF_H + +#include "hw.h" +#include "hw_conf.h" +#include "hw_if.h" +#include "ble_bufsize.h" + +/****************************************************************************** + * Application Config + ******************************************************************************/ +/**< generic parameters ******************************************************/ + +/** + * Define Tx Power + */ +#define CFG_TX_POWER (0x18) /* -0.15dBm */ + +/** + * Define Advertising parameters + */ +#define CFG_ADV_BD_ADDRESS (0x11aabbccddee) + +/** + * Define BD_ADDR type: define proper address. Can only be GAP_PUBLIC_ADDR (0x00) or GAP_STATIC_RANDOM_ADDR (0x01) + */ +#define CFG_IDENTITY_ADDRESS GAP_PUBLIC_ADDR +/** + * Define privacy: PRIVACY_DISABLED or PRIVACY_ENABLED + */ +#define CFG_PRIVACY PRIVACY_DISABLED + +/** + * Define BLE Address Type + * Bluetooth address types defined in ble_legacy.h + * if CFG_PRIVACY equals PRIVACY_DISABLED, CFG_BLE_ADDRESS_TYPE has 2 allowed values: GAP_PUBLIC_ADDR or GAP_STATIC_RANDOM_ADDR + * if CFG_PRIVACY equals PRIVACY_ENABLED, CFG_BLE_ADDRESS_TYPE has 2 allowed values: GAP_RESOLVABLE_PRIVATE_ADDR or GAP_NON_RESOLVABLE_PRIVATE_ADDR + */ +#define CFG_BLE_ADDRESS_TYPE GAP_PUBLIC_ADDR + +#define CFG_FAST_CONN_ADV_INTERVAL_MIN (0x80) /**< 80ms */ +#define CFG_FAST_CONN_ADV_INTERVAL_MAX (0xA0) /**< 100ms */ +#define CFG_LP_CONN_ADV_INTERVAL_MIN (0x640) /**< 1s */ +#define CFG_LP_CONN_ADV_INTERVAL_MAX (0xFA0) /**< 2.5s */ +/** + * Define IO Authentication + */ +#define CFG_BONDING_MODE (1) +#define CFG_FIXED_PIN (111111) +#define CFG_USED_FIXED_PIN (0) +#define CFG_ENCRYPTION_KEY_SIZE_MAX (16) +#define CFG_ENCRYPTION_KEY_SIZE_MIN (8) + +/** + * Define IO capabilities + */ +#define CFG_IO_CAPABILITY_DISPLAY_ONLY (0x00) +#define CFG_IO_CAPABILITY_DISPLAY_YES_NO (0x01) +#define CFG_IO_CAPABILITY_KEYBOARD_ONLY (0x02) +#define CFG_IO_CAPABILITY_NO_INPUT_NO_OUTPUT (0x03) +#define CFG_IO_CAPABILITY_KEYBOARD_DISPLAY (0x04) + +#define CFG_IO_CAPABILITY CFG_IO_CAPABILITY_DISPLAY_YES_NO + +/** + * Define MITM modes + */ +#define CFG_MITM_PROTECTION_NOT_REQUIRED (0x00) +#define CFG_MITM_PROTECTION_REQUIRED (0x01) + +#define CFG_MITM_PROTECTION CFG_MITM_PROTECTION_REQUIRED + +/** + * Define Secure Connections Support + */ +#define CFG_SECURE_NOT_SUPPORTED (0x00) +#define CFG_SECURE_OPTIONAL (0x01) +#define CFG_SECURE_MANDATORY (0x02) + +#define CFG_SC_SUPPORT CFG_SECURE_OPTIONAL + +/** + * Define Keypress Notification Support + */ +#define CFG_KEYPRESS_NOT_SUPPORTED (0x00) +#define CFG_KEYPRESS_SUPPORTED (0x01) + +#define CFG_KEYPRESS_NOTIFICATION_SUPPORT CFG_KEYPRESS_NOT_SUPPORTED + +/** + * Numeric Comparison Answers + */ +#define YES (0x01) +#define NO (0x00) + +/** + * Device name configuration for Generic Access Service + */ +#define CFG_GAP_DEVICE_NAME "TEMPLATE" +#define CFG_GAP_DEVICE_NAME_LENGTH (8) + +/** + * Define PHY + */ +#define ALL_PHYS_PREFERENCE 0x00 +#define RX_2M_PREFERRED 0x02 +#define TX_2M_PREFERRED 0x02 +#define TX_1M 0x01 +#define TX_2M 0x02 +#define RX_1M 0x01 +#define RX_2M 0x02 + +/** +* Identity root key used to derive IRK and DHK(Legacy) +*/ +#define CFG_BLE_IR {0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0} + +/** +* Encryption root key used to derive LTK(Legacy) and CSRK +*/ +#define CFG_BLE_ER {0xFE, 0xDC, 0xBA, 0x09, 0x87, 0x65, 0x43, 0x21, 0xFE, 0xDC, 0xBA, 0x09, 0x87, 0x65, 0x43, 0x21} + +/** + * SMPS supply + * SMPS not used when Set to 0 + * SMPS used when Set to 1 + */ +#define CFG_USE_SMPS 0 + +/* USER CODE BEGIN Generic_Parameters */ + +/* USER CODE END Generic_Parameters */ + +/**< specific parameters */ +/*****************************************************/ + +#define P2P_SERVER1 1 /*1 = Device is Peripherique*/ +#define P2P_SERVER2 0 +#define P2P_SERVER3 0 +#define P2P_SERVER4 0 +#define P2P_SERVER5 0 +#define P2P_SERVER6 0 + +#define CFG_DEV_ID_P2P_SERVER1 (0x83) +#define CFG_DEV_ID_P2P_SERVER2 (0x84) +#define CFG_DEV_ID_P2P_SERVER3 (0x87) +#define CFG_DEV_ID_P2P_SERVER4 (0x88) +#define CFG_DEV_ID_P2P_SERVER5 (0x89) +#define CFG_DEV_ID_P2P_SERVER6 (0x8A) +#define CFG_DEV_ID_P2P_ROUTER (0x85) + +#define RADIO_ACTIVITY_EVENT 1 /* 1 for OOB Demo */ + +/** +* AD Element - Group B Feature +*/ +/* LSB - First Byte */ +#define CFG_FEATURE_THREAD_SWITCH (0x40) + +/* LSB - Second Byte */ +#define CFG_FEATURE_OTA_REBOOT (0x20) + +#define CONN_L(x) ((int)((x)/0.625f)) +#define CONN_P(x) ((int)((x)/1.25f)) + + /* L2CAP Connection Update request parameters used for test only with smart Phone */ +#define L2CAP_REQUEST_NEW_CONN_PARAM 0 + +#define L2CAP_INTERVAL_MIN CONN_P(1000) /* 1s */ +#define L2CAP_INTERVAL_MAX CONN_P(1000) /* 1s */ +#define L2CAP_PERIPHERAL_LATENCY 0x0000 +#define L2CAP_TIMEOUT_MULTIPLIER 0x1F4 + +/* USER CODE BEGIN Specific_Parameters */ + +/* USER CODE END Specific_Parameters */ + +/****************************************************************************** + * BLE Stack + ******************************************************************************/ +/** + * Maximum number of simultaneous connections that the device will support. + * Valid values are from 1 to 8 + */ +#define CFG_BLE_NUM_LINK 2 + +/** + * Maximum number of Services that can be stored in the GATT database. + * Note that the GAP and GATT services are automatically added so this parameter should be 2 plus the number of user services + */ +#define CFG_BLE_NUM_GATT_SERVICES 8 + +/** + * Maximum number of Attributes + * (i.e. the number of characteristic + the number of characteristic values + the number of descriptors, excluding the services) + * that can be stored in the GATT database. + * Note that certain characteristics and relative descriptors are added automatically during device initialization + * so this parameters should be 9 plus the number of user Attributes + */ +#define CFG_BLE_NUM_GATT_ATTRIBUTES 68 + +/** + * Maximum supported ATT_MTU size + * This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set + */ +#define CFG_BLE_MAX_ATT_MTU (156) + +/** + * Size of the storage area for Attribute values + * This value depends on the number of attributes used by application. In particular the sum of the following quantities (in octets) should be made for each attribute: + * - attribute value length + * - 5, if UUID is 16 bit; 19, if UUID is 128 bit + * - 2, if server configuration descriptor is used + * - 2*DTM_NUM_LINK, if client configuration descriptor is used + * - 2, if extended properties is used + * The total amount of memory needed is the sum of the above quantities for each attribute. + * This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set + */ +#define CFG_BLE_ATT_VALUE_ARRAY_SIZE (1344) + +/** + * Prepare Write List size in terms of number of packet + * This parameter is ignored by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set + */ +#define CFG_BLE_PREPARE_WRITE_LIST_SIZE BLE_PREP_WRITE_X_ATT(CFG_BLE_MAX_ATT_MTU) + +/** + * Number of allocated memory blocks + * This parameter is overwritten by the CPU2 with an hardcoded optimal value when the parameter CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY flag set + */ +#define CFG_BLE_MBLOCK_COUNT (BLE_MBLOCKS_CALC(CFG_BLE_PREPARE_WRITE_LIST_SIZE, CFG_BLE_MAX_ATT_MTU, CFG_BLE_NUM_LINK)) + +/** + * Enable or disable the Extended Packet length feature. Valid values are 0 or 1. + */ +#define CFG_BLE_DATA_LENGTH_EXTENSION 1 + +/** + * Sleep clock accuracy in Peripheral mode (ppm value) + */ +#define CFG_BLE_PERIPHERAL_SCA 500 + +/** + * Sleep clock accuracy in Central mode + * 0 : 251 ppm to 500 ppm + * 1 : 151 ppm to 250 ppm + * 2 : 101 ppm to 150 ppm + * 3 : 76 ppm to 100 ppm + * 4 : 51 ppm to 75 ppm + * 5 : 31 ppm to 50 ppm + * 6 : 21 ppm to 30 ppm + * 7 : 0 ppm to 20 ppm + */ +#define CFG_BLE_CENTRAL_SCA 0 + +/** + * LsSource + * Some information for Low speed clock mapped in bits field + * - bit 0: 1: Calibration for the RF system wakeup clock source 0: No calibration for the RF system wakeup clock source + * - bit 1: 1: STM32WB5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module + * - bit 2: 1: HSE/1024 Clock config 0: LSE Clock config + */ +#if defined(STM32WB5Mxx) + #define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_MOD5MM_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_HSE_1024) +#else + #define CFG_BLE_LS_SOURCE (SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB | SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV | SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_HSE_1024) +#endif + +/** + * Start up time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 us (~2.44 us) + */ +#define CFG_BLE_HSE_STARTUP_TIME 0x148 + +/** + * Maximum duration of the connection event when the device is in Peripheral mode in units of 625/256 us (~2.44 us) + */ +#define CFG_BLE_MAX_CONN_EVENT_LENGTH (0xFFFFFFFF) + +/** + * Viterbi Mode + * 1 : enabled + * 0 : disabled + */ +#define CFG_BLE_VITERBI_MODE 1 + +/** + * BLE stack Options flags to be configured with: + * - SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY + * - SHCI_C2_BLE_INIT_OPTIONS_LL_HOST + * - SHCI_C2_BLE_INIT_OPTIONS_NO_SVC_CHANGE_DESC + * - SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC + * - SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RO + * - SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW + * - SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV + * - SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV + * - SHCI_C2_BLE_INIT_OPTIONS_CS_ALGO2 + * - SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2 + * - SHCI_C2_BLE_INIT_OPTIONS_REDUC_GATTDB_NVM + * - SHCI_C2_BLE_INIT_OPTIONS_FULL_GATTDB_NVM + * - SHCI_C2_BLE_INIT_OPTIONS_GATT_CACHING_USED + * - SHCI_C2_BLE_INIT_OPTIONS_GATT_CACHING_NOTUSED + * - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_1 + * - SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3 + * which are used to set following configuration bits: + * (bit 0): 1: LL only + * 0: LL + host + * (bit 1): 1: no service change desc. + * 0: with service change desc. + * (bit 2): 1: device name Read-Only + * 0: device name R/W + * (bit 3): 1: extended advertizing supported + * 0: extended advertizing not supported + * (bit 4): 1: CS Algo #2 supported + * 0: CS Algo #2 not supported + * (bit 5): 1: Reduced GATT database in NVM + * 0: Full GATT database in NVM + * (bit 6): 1: GATT caching is used + * 0: GATT caching is not used + * (bit 7): 1: LE Power Class 1 + * 0: LE Power Class 2-3 + * other bits: complete with Options_extension flag + */ +#define CFG_BLE_OPTIONS (SHCI_C2_BLE_INIT_OPTIONS_LL_HOST | SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC | SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW | SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV | SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2 | SHCI_C2_BLE_INIT_OPTIONS_FULL_GATTDB_NVM | SHCI_C2_BLE_INIT_OPTIONS_GATT_CACHING_NOTUSED | SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3) + +/** + * BLE stack Options_extension flags to be configured with: + * - SHCI_C2_BLE_INIT_OPTIONS_APPEARANCE_WRITABLE + * - SHCI_C2_BLE_INIT_OPTIONS_APPEARANCE_READONLY + * - SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_SUPPORTED + * - SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_NOTSUPPORTED + * which are used to set following configuration bits: + * (bit 0): 1: appearance Writable + * 0: appearance Read-Only + * (bit 1): 1: Enhanced ATT supported + * 0: Enhanced ATT not supported + * other bits: reserved (shall be set to 0) + */ +#define CFG_BLE_OPTIONS_EXT (SHCI_C2_BLE_INIT_OPTIONS_APPEARANCE_READONLY | SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_NOTSUPPORTED) + +#define CFG_BLE_MAX_COC_INITIATOR_NBR (32) + +#define CFG_BLE_MIN_TX_POWER (0) + +#define CFG_BLE_MAX_TX_POWER (0) + +/** + * BLE stack Maximum number of created Enhanced ATT bearers to be configured + * in addition to the number of links + * - Range: 0 .. 4 + */ +#define CFG_BLE_MAX_ADD_EATT_BEARERS (4) + +/** + * BLE Rx model configuration flags to be configured with: + * - SHCI_C2_BLE_INIT_RX_MODEL_AGC_RSSI_LEGACY + * - SHCI_C2_BLE_INIT_RX_MODEL_AGC_RSSI_BLOCKER + * which are used to set following configuration bits: + * (bit 0): 1: agc_rssi model improved vs RF blockers + * 0: Legacy agc_rssi model + * other bits: reserved (shall be set to 0) + */ + +#define CFG_BLE_RX_MODEL_CONFIG (SHCI_C2_BLE_INIT_RX_MODEL_AGC_RSSI_LEGACY) + +/* Maximum number of advertising sets. + * Range: 1 .. 8 with limitation: + * This parameter is linked to CFG_BLE_MAX_ADV_DATA_LEN such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based + * on Max Extended advertising configuration supported. + * This parameter is considered by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set + */ + +#define CFG_BLE_MAX_ADV_SET_NBR (3) + + /* Maximum advertising data length (in bytes) + * Range: 31 .. 1650 with limitation: + * This parameter is linked to CFG_BLE_MAX_ADV_SET_NBR such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based + * on Max Extended advertising configuration supported. + * This parameter is considered by the CPU2 when CFG_BLE_OPTIONS has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set + */ + +#define CFG_BLE_MAX_ADV_DATA_LEN (1650) + + /* RF TX Path Compensation Value (16-bit signed integer). Units: 0.1 dB. + * Range: -1280 .. 1280 + */ + +#define CFG_BLE_TX_PATH_COMPENS (0) + + /* RF RX Path Compensation Value (16-bit signed integer). Units: 0.1 dB. + * Range: -1280 .. 1280 + */ + +#define CFG_BLE_RX_PATH_COMPENS (0) + + /* BLE core version (16-bit signed integer). + * - SHCI_C2_BLE_INIT_BLE_CORE_5_2 + * - SHCI_C2_BLE_INIT_BLE_CORE_5_3 + * - SHCI_C2_BLE_INIT_BLE_CORE_5_4 + * which are used to set: 11(5.2), 12(5.3), 13(5.4). + */ + +#define CFG_BLE_CORE_VERSION (SHCI_C2_BLE_INIT_BLE_CORE_5_4) + +/****************************************************************************** + * Transport Layer + ******************************************************************************/ +/** + * Queue length of BLE Event + * This parameter defines the number of asynchronous events that can be stored in the HCI layer before + * being reported to the application. When a command is sent to the BLE core coprocessor, the HCI layer + * is waiting for the event with the Num_HCI_Command_Packets set to 1. The receive queue shall be large + * enough to store all asynchronous events received in between. + * When CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE is set to 27, this allow to store three 255 bytes long asynchronous events + * between the HCI command and its event. + * This parameter depends on the value given to CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE. When the queue size is to small, + * the system may hang if the queue is full with asynchronous events and the HCI layer is still waiting + * for a CC/CS event, In that case, the notification TL_BLE_HCI_ToNot() is called to indicate + * to the application a HCI command did not receive its command event within 30s (Default HCI Timeout). + */ +#define CFG_TLBLE_EVT_QUEUE_LENGTH 5 +/** + * This parameter should be set to fit most events received by the HCI layer. It defines the buffer size of each element + * allocated in the queue of received events and can be used to optimize the amount of RAM allocated by the Memory Manager. + * It should not exceed 255 which is the maximum HCI packet payload size (a greater value is a lost of memory as it will + * never be used) + * It shall be at least 4 to receive the command status event in one frame. + * The default value is set to 27 to allow receiving an event of MTU size in a single buffer. This value maybe reduced + * further depending on the application. + */ +#define CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE 255 /**< Set to 255 with the memory manager and the mailbox */ + +#define TL_BLE_EVENT_FRAME_SIZE ( TL_EVT_HDR_SIZE + CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE ) +/****************************************************************************** + * UART interfaces + ******************************************************************************/ + +/** + * Select UART interfaces + */ +#define CFG_DEBUG_TRACE_UART 0 +#define CFG_CONSOLE_MENU 0 +/****************************************************************************** + * USB interface + ******************************************************************************/ + +/** + * Enable/Disable USB interface + */ +#define CFG_USB_INTERFACE_ENABLE 0 + +/****************************************************************************** + * IPCC interface + ******************************************************************************/ + +/** + * The IPCC is dedicated to the communication between the CPU2 and the CPU1 + * and shall not be modified by the application + * The two following definitions shall not be modified + */ +#define HAL_IPCC_TX_IRQHandler(...) HW_IPCC_Tx_Handler( ) +#define HAL_IPCC_RX_IRQHandler(...) HW_IPCC_Rx_Handler( ) + +/****************************************************************************** + * Low Power + ******************************************************************************/ +/** + * When set to 1, the low power mode is enable + * When set to 0, the device stays in RUN mode + */ +#define CFG_LPM_SUPPORTED 0 + +/****************************************************************************** + * RTC interface + ******************************************************************************/ +#define HAL_RTCEx_WakeUpTimerIRQHandler(...) HW_TS_RTC_Wakeup_Handler( ) + +/****************************************************************************** + * Timer Server + ******************************************************************************/ +/** + * CFG_RTC_WUCKSEL_DIVIDER: This sets the RTCCLK divider to the wakeup timer. + * The lower is the value, the better is the power consumption and the accuracy of the timerserver + * The higher is the value, the finest is the granularity + * + * CFG_RTC_ASYNCH_PRESCALER: This sets the asynchronous prescaler of the RTC. It should as high as possible ( to output + * clock as low as possible) but the output clock should be equal or higher frequency compare to the clock feeding + * the wakeup timer. A lower clock speed would impact the accuracy of the timer server. + * + * CFG_RTC_SYNCH_PRESCALER: This sets the synchronous prescaler of the RTC. + * When the 1Hz calendar clock is required, it shall be sets according to other settings + * When the 1Hz calendar clock is not needed, CFG_RTC_SYNCH_PRESCALER should be set to 0x7FFF (MAX VALUE) + * + * CFG_RTCCLK_DIVIDER_CONF: + * Shall be set to either 0,2,4,8,16 + * When set to either 2,4,8,16, the 1Hhz calendar is supported + * When set to 0, the user sets its own configuration + * + * The following settings are computed with LSI as input to the RTC + */ + +#define CFG_RTCCLK_DIVIDER_CONF 0 + +#if (CFG_RTCCLK_DIVIDER_CONF == 0) +/** + * Custom configuration + * It does not support 1Hz calendar + * It divides the RTC CLK by 16 + */ + +#define CFG_RTCCLK_DIV (16) +#define CFG_RTC_WUCKSEL_DIVIDER (0) +#define CFG_RTC_ASYNCH_PRESCALER (0x0F) +#define CFG_RTC_SYNCH_PRESCALER (0x7FFF) + +#else + +#if (CFG_RTCCLK_DIVIDER_CONF == 2) +/** + * It divides the RTC CLK by 2 + */ +#define CFG_RTC_WUCKSEL_DIVIDER (3) +#endif + +#if (CFG_RTCCLK_DIVIDER_CONF == 4) +/** + * It divides the RTC CLK by 4 + */ +#define CFG_RTC_WUCKSEL_DIVIDER (2) +#endif + +#if (CFG_RTCCLK_DIVIDER_CONF == 8) +/** + * It divides the RTC CLK by 8 + */ +#define CFG_RTC_WUCKSEL_DIVIDER (1) +#endif + +#if (CFG_RTCCLK_DIVIDER_CONF == 16) +/** + * It divides the RTC CLK by 16 + */ +#define CFG_RTC_WUCKSEL_DIVIDER (0) +#endif + +#define CFG_RTCCLK_DIV CFG_RTCCLK_DIVIDER_CONF +#define CFG_RTC_ASYNCH_PRESCALER (CFG_RTCCLK_DIV - 1) +#define CFG_RTC_SYNCH_PRESCALER (DIVR( LSE_VALUE, (CFG_RTC_ASYNCH_PRESCALER+1) ) - 1 ) + +#endif + +/** tick timer values */ +#define CFG_TS_TICK_VAL DIVR( (CFG_RTCCLK_DIV * 1000000), LSE_VALUE ) +#define CFG_TS_TICK_VAL_PS DIVR( ((uint64_t)CFG_RTCCLK_DIV * 1e12), (uint64_t)LSE_VALUE ) + +typedef enum +{ + CFG_TIM_PROC_ID_ISR, + /* USER CODE BEGIN CFG_TimProcID_t */ + + /* USER CODE END CFG_TimProcID_t */ +} CFG_TimProcID_t; + +/****************************************************************************** + * Debug + ******************************************************************************/ +/** + * When set, this resets some hw resources to put the device in the same state as at power up. + * It resets only register that may prevent the FW to run properly. + * + * This shall be set to 0 in a final product + * + */ +#define CFG_HW_RESET_BY_FW 0 + +/** + * keep debugger enabled while in any low power mode when set to 1 + * should be set to 0 in production + */ +#define CFG_DEBUGGER_SUPPORTED 1 + +/** + * When set to 1, the traces are enabled in the BLE services + */ +#define CFG_DEBUG_BLE_TRACE 0 + +/** + * Enable or Disable traces in application + */ +#define CFG_DEBUG_APP_TRACE 0 + +#if (CFG_DEBUG_APP_TRACE != 0) +#define APP_DBG_MSG PRINT_MESG_DBG +#else +#define APP_DBG_MSG PRINT_NO_MESG +#endif + +#if ( (CFG_DEBUG_BLE_TRACE != 0) || (CFG_DEBUG_APP_TRACE != 0) ) +#define CFG_DEBUG_TRACE 1 +#endif + +#if (CFG_DEBUG_TRACE != 0) +#undef CFG_LPM_SUPPORTED +#undef CFG_DEBUGGER_SUPPORTED +#define CFG_LPM_SUPPORTED 0 +#define CFG_DEBUGGER_SUPPORTED 1 +#endif + +/** + * When CFG_DEBUG_TRACE_FULL is set to 1, the trace are output with the API name, the file name and the line number + * When CFG_DEBUG_TRACE_LIGHT is set to 1, only the debug message is output + * + * When both are set to 0, no trace are output + * When both are set to 1, CFG_DEBUG_TRACE_FULL is selected + */ +#define CFG_DEBUG_TRACE_LIGHT 0 +#define CFG_DEBUG_TRACE_FULL 0 + +#if (( CFG_DEBUG_TRACE != 0 ) && ( CFG_DEBUG_TRACE_LIGHT == 0 ) && (CFG_DEBUG_TRACE_FULL == 0)) +#undef CFG_DEBUG_TRACE_FULL +#undef CFG_DEBUG_TRACE_LIGHT +#define CFG_DEBUG_TRACE_FULL 0 +#define CFG_DEBUG_TRACE_LIGHT 1 +#endif + +#if ( CFG_DEBUG_TRACE == 0 ) +#undef CFG_DEBUG_TRACE_FULL +#undef CFG_DEBUG_TRACE_LIGHT +#define CFG_DEBUG_TRACE_FULL 0 +#define CFG_DEBUG_TRACE_LIGHT 0 +#endif + +/** + * When not set, the traces is looping on sending the trace over UART + */ +#define DBG_TRACE_USE_CIRCULAR_QUEUE 1 + +/** + * max buffer Size to queue data traces and max data trace allowed. + * Only Used if DBG_TRACE_USE_CIRCULAR_QUEUE is defined + */ +#define DBG_TRACE_MSG_QUEUE_SIZE 4096 +#define MAX_DBG_TRACE_MSG_SIZE 1024 + +/* USER CODE BEGIN Defines */ + +/* USER CODE END Defines */ + +/****************************************************************************** + * Scheduler + ******************************************************************************/ + +/** + * These are the lists of task id registered to the scheduler + * Each task id shall be in the range [0:31] + * This mechanism allows to implement a generic code in the API TL_BLE_HCI_StatusNot() to comply with + * the requirement that a HCI/ACI command shall never be sent if there is already one pending + */ + +/**< Add in that list all tasks that may send a ACI/HCI command */ +typedef enum +{ + CFG_TASK_ADV_CANCEL_ID, +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0 ) + CFG_TASK_CONN_UPDATE_REG_ID, +#endif + CFG_TASK_HCI_ASYNCH_EVT_ID, + /* USER CODE BEGIN CFG_Task_Id_With_HCI_Cmd_t */ + + /* USER CODE END CFG_Task_Id_With_HCI_Cmd_t */ + CFG_LAST_TASK_ID_WITH_HCICMD, /**< Shall be LAST in the list */ +} CFG_Task_Id_With_HCI_Cmd_t; + +/**< Add in that list all tasks that never send a ACI/HCI command */ +typedef enum +{ + CFG_FIRST_TASK_ID_WITH_NO_HCICMD = CFG_LAST_TASK_ID_WITH_HCICMD - 1, /**< Shall be FIRST in the list */ + CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID, + /* USER CODE BEGIN CFG_Task_Id_With_NO_HCI_Cmd_t */ + + /* USER CODE END CFG_Task_Id_With_NO_HCI_Cmd_t */ + CFG_LAST_TASK_ID_WITH_NO_HCICMD /**< Shall be LAST in the list */ +} CFG_Task_Id_With_NO_HCI_Cmd_t; + +#define CFG_TASK_NBR CFG_LAST_TASK_ID_WITH_NO_HCICMD + +/** + * This is the list of priority required by the application + * Each Id shall be in the range 0..31 + */ +typedef enum +{ + CFG_SCH_PRIO_0, + /* USER CODE BEGIN CFG_SCH_Prio_Id_t */ + + /* USER CODE END CFG_SCH_Prio_Id_t */ + CFG_SCH_PRIO_NBR +} CFG_SCH_Prio_Id_t; + +/** + * This is a bit mapping over 32bits listing all events id supported in the application + */ +typedef enum +{ + CFG_IDLEEVT_HCI_CMD_EVT_RSP_ID, + CFG_IDLEEVT_SYSTEM_HCI_CMD_EVT_RSP_ID, + /* USER CODE BEGIN CFG_IdleEvt_Id_t */ + + /* USER CODE END CFG_IdleEvt_Id_t */ +} CFG_IdleEvt_Id_t; + +/****************************************************************************** + * LOW POWER + ******************************************************************************/ +/** + * Supported requester to the MCU Low Power Manager - can be increased up to 32 + * It list a bit mapping of all user of the Low Power Manager + */ +typedef enum +{ + CFG_LPM_APP, + CFG_LPM_APP_BLE, + /* USER CODE BEGIN CFG_LPM_Id_t */ + + /* USER CODE END CFG_LPM_Id_t */ +} CFG_LPM_Id_t; + +/****************************************************************************** + * OTP manager + ******************************************************************************/ +#define CFG_OTP_BASE_ADDRESS OTP_AREA_BASE + +#define CFG_OTP_END_ADRESS OTP_AREA_END_ADDR + +#endif /*APP_CONF_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/app_debug.h b/firmware/memory_chip_gone/Core/Inc/app_debug.h new file mode 100644 index 0000000..a1cbfd5 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/app_debug.h @@ -0,0 +1,67 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_debug.h + * @author MCD Application Team + * @brief Header for app_debug.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef APP_DEBUG_H +#define APP_DEBUG_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + + /* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported variables --------------------------------------------------------*/ +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Exported macros ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions ---------------------------------------------*/ + void APPD_Init( void ); + void APPD_EnableCPU2( void ); +/* USER CODE BEGIN EF */ + +/* USER CODE END EF */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*APP_DEBUG_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/app_entry.h b/firmware/memory_chip_gone/Core/Inc/app_entry.h new file mode 100644 index 0000000..c92f0b1 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/app_entry.h @@ -0,0 +1,71 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_entry.h + * @author MCD Application Team + * @brief Interface to the application + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef APP_ENTRY_H +#define APP_ENTRY_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported variables --------------------------------------------------------*/ +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Exported macros ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions ---------------------------------------------*/ +void MX_APPE_Config(void); +void MX_APPE_Init(void); +void MX_APPE_Process(void); +void Init_Exti(void); +void Init_Smps(void); + +/* USER CODE BEGIN EF */ + +/* USER CODE END EF */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*APP_ENTRY_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/hw_conf.h b/firmware/memory_chip_gone/Core/Inc/hw_conf.h new file mode 100644 index 0000000..7fd30cd --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/hw_conf.h @@ -0,0 +1,168 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file hw_conf.h + * @author MCD Application Team + * @brief Configuration of hardware interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef HW_CONF_H +#define HW_CONF_H + +/****************************************************************************** + * Semaphores + * THIS SHALL NO BE CHANGED AS THESE SEMAPHORES ARE USED AS WELL ON THE CM0+ + *****************************************************************************/ +/** +* The CPU2 may be configured to store the Thread persistent data either in internal NVM storage on CPU2 or in +* SRAM2 buffer provided by the user application. This can be configured with the system command SHCI_C2_Config() +* When the CPU2 is requested to store persistent data in SRAM2, it can write data in this buffer at any time when needed. +* In order to read consistent data with the CPU1 from the SRAM2 buffer, the flow should be: +* + CPU1 takes CFG_HW_THREAD_NVM_SRAM_SEMID semaphore +* + CPU1 reads all persistent data from SRAM2 (most of the time, the goal is to write these data into an NVM managed by CPU1) +* + CPU1 releases CFG_HW_THREAD_NVM_SRAM_SEMID semaphore +* CFG_HW_THREAD_NVM_SRAM_SEMID semaphore makes sure CPU2 does not update the persistent data in SRAM2 at the same time CPU1 is reading them. +* There is no timing constraint on how long this semaphore can be kept. +*/ +#define CFG_HW_THREAD_NVM_SRAM_SEMID 9 + +/** +* The CPU2 may be configured to store the BLE persistent data either in internal NVM storage on CPU2 or in +* SRAM2 buffer provided by the user application. This can be configured with the system command SHCI_C2_Config() +* When the CPU2 is requested to store persistent data in SRAM2, it can write data in this buffer at any time when needed. +* In order to read consistent data with the CPU1 from the SRAM2 buffer, the flow should be: +* + CPU1 takes CFG_HW_BLE_NVM_SRAM_SEMID semaphore +* + CPU1 reads all persistent data from SRAM2 (most of the time, the goal is to write these data into an NVM managed by CPU1) +* + CPU1 releases CFG_HW_BLE_NVM_SRAM_SEMID semaphore +* CFG_HW_BLE_NVM_SRAM_SEMID semaphore makes sure CPU2 does not update the persistent data in SRAM2 at the same time CPU1 is reading them. +* There is no timing constraint on how long this semaphore can be kept. +*/ +#define CFG_HW_BLE_NVM_SRAM_SEMID 8 + +/** +* Index of the semaphore used by CPU2 to prevent the CPU1 to either write or erase data in flash +* The CPU1 shall not either write or erase in flash when this semaphore is taken by the CPU2 +* When the CPU1 needs to either write or erase in flash, it shall first get the semaphore and release it just +* after writing a raw (64bits data) or erasing one sector. +* Once the Semaphore has been released, there shall be at least 1us before it can be taken again. This is required +* to give the opportunity to CPU2 to take it. +* On v1.4.0 and older CPU2 wireless firmware, this semaphore is unused and CPU2 is using PES bit. +* By default, CPU2 is using the PES bit to protect its timing. The CPU1 may request the CPU2 to use the semaphore +* instead of the PES bit by sending the system command SHCI_C2_SetFlashActivityControl() +*/ +#define CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID 7 + +/** +* Index of the semaphore used by CPU1 to prevent the CPU2 to either write or erase data in flash +* In order to protect its timing, the CPU1 may get this semaphore to prevent the CPU2 to either +* write or erase in flash (as this will stall both CPUs) +* The PES bit shall not be used as this may stall the CPU2 in some cases. +*/ +#define CFG_HW_BLOCK_FLASH_REQ_BY_CPU1_SEMID 6 + +/** +* Index of the semaphore used to manage the CLK48 clock configuration +* When the USB is required, this semaphore shall be taken before configuring te CLK48 for USB +* and should be released after the application switch OFF the clock when the USB is not used anymore +* When using the RNG, it is good enough to use CFG_HW_RNG_SEMID to control CLK48. +* More details in AN5289 +*/ +#define CFG_HW_CLK48_CONFIG_SEMID 5 + +/* Index of the semaphore used to manage the entry Stop Mode procedure */ +#define CFG_HW_ENTRY_STOP_MODE_SEMID 4 + +/* Index of the semaphore used to access the RCC */ +#define CFG_HW_RCC_SEMID 3 + +/* Index of the semaphore used to access the FLASH */ +#define CFG_HW_FLASH_SEMID 2 + +/* Index of the semaphore used to access the PKA */ +#define CFG_HW_PKA_SEMID 1 + +/* Index of the semaphore used to access the RNG */ +#define CFG_HW_RNG_SEMID 0 + +/****************************************************************************** + * HW TIMER SERVER + *****************************************************************************/ +/** + * The user may define the maximum number of virtual timers supported. + * It shall not exceed 255 + */ +#define CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER 6 + +/** + * The user may define the priority in the NVIC of the RTC_WKUP interrupt handler that is used to manage the + * wakeup timer. + * This setting is the preemptpriority part of the NVIC. + */ +#define CFG_HW_TS_NVIC_RTC_WAKEUP_IT_PREEMPTPRIO 3 + +/** + * The user may define the priority in the NVIC of the RTC_WKUP interrupt handler that is used to manage the + * wakeup timer. + * This setting is the subpriority part of the NVIC. It does not exist on all processors. When it is not supported + * on the CPU, the setting is ignored + */ +#define CFG_HW_TS_NVIC_RTC_WAKEUP_IT_SUBPRIO 0 + +/** + * Define a critical section in the Timer server + * The Timer server does not support the API to be nested + * The Application shall either: + * a) Ensure this will never happen + * b) Define the critical section + * The default implementations is masking all interrupts using the PRIMASK bit + * The TimerServer driver uses critical sections to avoid context corruption. This is achieved with the macro + * TIMER_ENTER_CRITICAL_SECTION and TIMER_EXIT_CRITICAL_SECTION. When CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION is set + * to 1, all STM32 interrupts are masked with the PRIMASK bit of the CortexM CPU. It is possible to use the BASEPRI + * register of the CortexM CPU to keep allowed some interrupts with high priority. In that case, the user shall + * re-implement TIMER_ENTER_CRITICAL_SECTION and TIMER_EXIT_CRITICAL_SECTION and shall make sure that no TimerServer + * API are called when the TIMER critical section is entered + */ +#define CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION 1 + +/** + * This value shall reflect the maximum delay there could be in the application between the time the RTC interrupt + * is generated by the Hardware and the time when the RTC interrupt handler is called. This time is measured in + * number of RTCCLK ticks. + * A relaxed timing would be 10ms + * When the value is too short, the timerserver will not be able to count properly and all timeout may be random. + * When the value is too long, the device may wake up more often than the most optimal configuration. However, the + * impact on power consumption would be marginal (unless the value selected is extremely too long). It is strongly + * recommended to select a value large enough to make sure it is not too short to ensure reliability of the system + * as this will have marginal impact on low power mode + */ +#define CFG_HW_TS_RTC_HANDLER_MAX_DELAY ( 10 * (LSI_VALUE/1000) ) + + /** + * Interrupt ID in the NVIC of the RTC Wakeup interrupt handler + * It shall be type of IRQn_Type + */ +#define CFG_HW_TS_RTC_WAKEUP_HANDLER_ID RTC_WKUP_IRQn + +/****************************************************************************** + * HW UART + *****************************************************************************/ +#define CFG_HW_LPUART1_ENABLED 0 +#define CFG_HW_LPUART1_DMA_TX_SUPPORTED 0 + +#define CFG_HW_USART1_ENABLED 0 +#define CFG_HW_USART1_DMA_TX_SUPPORTED 0 + +#endif /*HW_CONF_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/hw_if.h b/firmware/memory_chip_gone/Core/Inc/hw_if.h new file mode 100644 index 0000000..f289515 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/hw_if.h @@ -0,0 +1,247 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file hw_if.h + * @author MCD Application Team + * @brief Hardware Interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef HW_IF_H +#define HW_IF_H + +#ifdef __cplusplus +extern "C" { +#endif + + /* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" +#include "stm32wbxx_ll_exti.h" +#include "stm32wbxx_ll_system.h" +#include "stm32wbxx_ll_rcc.h" +#include "stm32wbxx_ll_ipcc.h" +#include "stm32wbxx_ll_bus.h" +#include "stm32wbxx_ll_pwr.h" +#include "stm32wbxx_ll_cortex.h" +#include "stm32wbxx_ll_utils.h" +#include "stm32wbxx_ll_hsem.h" +#include "stm32wbxx_ll_gpio.h" +#include "stm32wbxx_ll_rtc.h" + +#ifdef USE_STM32WBXX_USB_DONGLE +#include "stm32wbxx_usb_dongle.h" +#endif +#ifdef USE_STM32WBXX_NUCLEO +#include "stm32wbxx_nucleo.h" +#endif +#ifdef USE_X_NUCLEO_EPD +#include "x_nucleo_epd.h" +#endif + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + + /****************************************************************************** + * HW UART + ******************************************************************************/ + typedef enum + { + hw_uart1, + hw_uart2, + hw_lpuart1, + } hw_uart_id_t; + + typedef enum + { + hw_uart_ok, + hw_uart_error, + hw_uart_busy, + hw_uart_to, + } hw_status_t; + + void HW_UART_Init(hw_uart_id_t hw_uart_id); + void HW_UART_Receive_IT(hw_uart_id_t hw_uart_id, uint8_t *pData, uint16_t Size, void (*Callback)(void)); + void HW_UART_Transmit_IT(hw_uart_id_t hw_uart_id, uint8_t *pData, uint16_t Size, void (*Callback)(void)); + hw_status_t HW_UART_Transmit(hw_uart_id_t hw_uart_id, uint8_t *p_data, uint16_t size, uint32_t timeout); + hw_status_t HW_UART_Transmit_DMA(hw_uart_id_t hw_uart_id, uint8_t *p_data, uint16_t size, void (*Callback)(void)); + void HW_UART_Interrupt_Handler(hw_uart_id_t hw_uart_id); + void HW_UART_DMA_Interrupt_Handler(hw_uart_id_t hw_uart_id); + + /****************************************************************************** + * HW TimerServer + ******************************************************************************/ + /* Exported types ------------------------------------------------------------*/ + /** + * This setting is used when standby mode is supported. + * hw_ts_InitMode_Limited should be used when the device restarts from Standby Mode. In that case, the Timer Server does + * not re-initialized its context. Only the Hardware register which content has been lost is reconfigured + * Otherwise, hw_ts_InitMode_Full should be requested (Start from Power ON) and everything is re-initialized. + */ + typedef enum + { + hw_ts_InitMode_Full, + hw_ts_InitMode_Limited, + } HW_TS_InitMode_t; + + /** + * When a Timer is created as a SingleShot timer, it is not automatically restarted when the timeout occurs. However, + * the timer is kept reserved in the list and could be restarted at anytime with HW_TS_Start() + * + * When a Timer is created as a Repeated timer, it is automatically restarted when the timeout occurs. + */ + typedef enum + { + hw_ts_SingleShot, + hw_ts_Repeated + } HW_TS_Mode_t; + + /** + * hw_ts_Successful is returned when a Timer has been successfully created with HW_TS_Create(). Otherwise, hw_ts_Failed + * is returned. When hw_ts_Failed is returned, that means there are not enough free slots in the list to create a + * Timer. In that case, CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER should be increased + */ + typedef enum + { + hw_ts_Successful, + hw_ts_Failed, + }HW_TS_ReturnStatus_t; + + typedef void (*HW_TS_pTimerCb_t)(void); + + /** + * @brief Initialize the timer server + * This API shall be called by the application before any timer is requested to the timer server. It + * configures the RTC module to be connected to the LSI input clock. + * + * @param TimerInitMode: When the device restarts from Standby, it should request hw_ts_InitMode_Limited so that the + * Timer context is not re-initialized. Otherwise, hw_ts_InitMode_Full should be requested + * @param hrtc: RTC Handle + * @retval None + */ + void HW_TS_Init(HW_TS_InitMode_t TimerInitMode, RTC_HandleTypeDef *hrtc); + + /** + * @brief Interface to create a virtual timer + * The user shall call this API to create a timer. Once created, the timer is reserved to the module until it + * has been deleted. When creating a timer, the user shall specify the mode (single shot or repeated), the + * callback to be notified when the timer expires and a module ID to identify in the timer interrupt handler + * which module is concerned. In return, the user gets a timer ID to handle it. + * + * @param TimerProcessID: This is an identifier provided by the user and returned in the callback to allow + * identification of the requester + * @param pTimerId: Timer Id returned to the user to request operation (start, stop, delete) + * @param TimerMode: Mode of the virtual timer (Single shot or repeated) + * @param pTimerCallBack: Callback when the virtual timer expires + * @retval HW_TS_ReturnStatus_t: Return whether the creation is successful or not + */ + HW_TS_ReturnStatus_t HW_TS_Create(uint32_t TimerProcessID, uint8_t *pTimerId, HW_TS_Mode_t TimerMode, HW_TS_pTimerCb_t pTimerCallBack); + + /** + * @brief Stop a virtual timer + * This API may be used to stop a running timer. A timer which is stopped is move to the pending state. + * A pending timer may be restarted at any time with a different timeout value but the mode cannot be changed. + * Nothing is done when it is called to stop a timer which has been already stopped + * + * @param TimerID: Id of the timer to stop + * @retval None + */ + void HW_TS_Stop(uint8_t TimerID); + + /** + * @brief Start a virtual timer + * This API shall be used to start a timer. The timeout value is specified and may be different each time. + * When the timer is in the single shot mode, it will move to the pending state when it expires. The user may + * restart it at any time with a different timeout value. When the timer is in the repeated mode, it always + * stay in the running state. When the timer expires, it will be restarted with the same timeout value. + * This API shall not be called on a running timer. + * + * @param TimerID: The ID Id of the timer to start + * @param timeout_ticks: Number of ticks of the virtual timer (Maximum value is (0xFFFFFFFF-0xFFFF = 0xFFFF0000) + * @retval None + */ + void HW_TS_Start(uint8_t TimerID, uint32_t timeout_ticks); + + /** + * @brief Delete a virtual timer from the list + * This API should be used when a timer is not needed anymore by the user. A deleted timer is removed from + * the timer list managed by the timer server. It cannot be restarted again. The user has to go with the + * creation of a new timer if required and may get a different timer id + * + * @param TimerID: The ID of the timer to remove from the list + * @retval None + */ + void HW_TS_Delete(uint8_t TimerID); + + /** + * @brief Schedule the timer list on the timer interrupt handler + * This interrupt handler shall be called by the application in the RTC interrupt handler. This handler takes + * care of clearing all status flag required in the RTC and EXTI peripherals + * + * @param None + * @retval None + */ + void HW_TS_RTC_Wakeup_Handler(void); + + /** + * @brief Return the number of ticks to count before the interrupt + * This API returns the number of ticks left to be counted before an interrupt is generated by the + * Timer Server. This API may be used by the application for power management optimization. When the system + * enters low power mode, the mode selection is a tradeoff between the wakeup time where the CPU is running + * and the time while the CPU will be kept in low power mode before next wakeup. The deeper is the + * low power mode used, the longer is the wakeup time. The low power mode management considering wakeup time + * versus time in low power mode is implementation specific + * When the timer is disabled (No timer in the list), it returns 0xFFFF + * + * @param None + * @retval The number of ticks left to count + */ + uint16_t HW_TS_RTC_ReadLeftTicksToCount(void); + + /** + * @brief Notify the application that a registered timer has expired + * This API shall be implemented by the user application. + * This API notifies the application that a timer expires. This API is running in the RTC Wakeup interrupt + * context. The application may implement an Operating System to change the context priority where the timer + * callback may be handled. This API provides the module ID to identify which module is concerned and to allow + * sending the information to the correct task + * + * @param TimerProcessID: The TimerProcessId associated with the timer when it has been created + * @param TimerID: The TimerID of the expired timer + * @param pTimerCallBack: The Callback associated with the timer when it has been created + * @retval None + */ + void HW_TS_RTC_Int_AppNot(uint32_t TimerProcessID, uint8_t TimerID, HW_TS_pTimerCb_t pTimerCallBack); + + /** + * @brief Notify the application that the wakeupcounter has been updated + * This API should be implemented by the user application + * This API notifies the application that the counter has been updated. This is expected to be used along + * with the HW_TS_RTC_ReadLeftTicksToCount () API. It could be that the counter has been updated since the + * last call of HW_TS_RTC_ReadLeftTicksToCount () and before entering low power mode. This notification + * provides a way to the application to solve that race condition to reevaluate the counter value before + * entering low power mode + * + * @param None + * @retval None + */ + void HW_TS_RTC_CountUpdated_AppNot(void); + +#ifdef __cplusplus +} +#endif + +#endif /*HW_IF_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/main.h b/firmware/memory_chip_gone/Core/Inc/main.h new file mode 100644 index 0000000..5e0aecb --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/main.h @@ -0,0 +1,72 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.h + * @brief : Header for main.c file. + * This file contains the common defines of the application. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MAIN_H +#define __MAIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" +#include "app_conf.h" +#include "app_entry.h" +#include "app_common.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void Error_Handler(void); + +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +/* Private defines -----------------------------------------------------------*/ + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +#ifdef __cplusplus +} +#endif + +#endif /* __MAIN_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/stm32_lpm_if.h b/firmware/memory_chip_gone/Core/Inc/stm32_lpm_if.h new file mode 100644 index 0000000..545f197 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/stm32_lpm_if.h @@ -0,0 +1,80 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32_lpm_if.h + * @author MCD Application Team + * @brief Header for stm32_lpm_if.c module (device specific LP management) + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32_LPM_IF_H +#define STM32_LPM_IF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +/** + * @brief Enters Low Power Off Mode + * @param none + * @retval none + */ +void PWR_EnterOffMode( void ); +/** + * @brief Exits Low Power Off Mode + * @param none + * @retval none + */ +void PWR_ExitOffMode( void ); + +/** + * @brief Enters Low Power Stop Mode + * @note ARM exists the function when waking up + * @param none + * @retval none + */ +void PWR_EnterStopMode( void ); +/** + * @brief Exits Low Power Stop Mode + * @note Enable the pll at 32MHz + * @param none + * @retval none + */ +void PWR_ExitStopMode( void ); + +/** + * @brief Enters Low Power Sleep Mode + * @note ARM exits the function when waking up + * @param none + * @retval none + */ +void PWR_EnterSleepMode( void ); + +/** + * @brief Exits Low Power Sleep Mode + * @note ARM exits the function when waking up + * @param none + * @retval none + */ +void PWR_ExitSleepMode( void ); + +#ifdef __cplusplus +} +#endif + +#endif /*STM32_LPM_IF_H */ + diff --git a/firmware/memory_chip_gone/Core/Inc/stm32wbxx_hal_conf.h b/firmware/memory_chip_gone/Core/Inc/stm32wbxx_hal_conf.h new file mode 100644 index 0000000..e5c5862 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/stm32wbxx_hal_conf.h @@ -0,0 +1,352 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32wbxx_hal_conf.h + * @author MCD Application Team + * @brief HAL configuration file. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32WBxx_HAL_CONF_H +#define __STM32WBxx_HAL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +/*#define HAL_ADC_MODULE_ENABLED */ +/*#define HAL_CRYP_MODULE_ENABLED */ +/*#define HAL_COMP_MODULE_ENABLED */ +/*#define HAL_CRC_MODULE_ENABLED */ +#define HAL_HSEM_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_IPCC_MODULE_ENABLED +/*#define HAL_IRDA_MODULE_ENABLED */ +/*#define HAL_IWDG_MODULE_ENABLED */ +/*#define HAL_LCD_MODULE_ENABLED */ +/*#define HAL_LPTIM_MODULE_ENABLED */ +/*#define HAL_PCD_MODULE_ENABLED */ +/*#define HAL_PKA_MODULE_ENABLED */ +/*#define HAL_QSPI_MODULE_ENABLED */ +/*#define HAL_RNG_MODULE_ENABLED */ +#define HAL_RTC_MODULE_ENABLED +/*#define HAL_SAI_MODULE_ENABLED */ +/*#define HAL_SMBUS_MODULE_ENABLED */ +/*#define HAL_SMARTCARD_MODULE_ENABLED */ +/*#define HAL_SPI_MODULE_ENABLED */ +/*#define HAL_TIM_MODULE_ENABLED */ +/*#define HAL_TSC_MODULE_ENABLED */ +/*#define HAL_UART_MODULE_ENABLED */ +/*#define HAL_USART_MODULE_ENABLED */ +/*#define HAL_WWDG_MODULE_ENABLED */ +#define HAL_EXTI_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0u +#define USE_HAL_COMP_REGISTER_CALLBACKS 0u +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0u +#define USE_HAL_I2C_REGISTER_CALLBACKS 0u +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0u +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0u +#define USE_HAL_PCD_REGISTER_CALLBACKS 0u +#define USE_HAL_PKA_REGISTER_CALLBACKS 0u +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0u +#define USE_HAL_RNG_REGISTER_CALLBACKS 0u +#define USE_HAL_RTC_REGISTER_CALLBACKS 0u +#define USE_HAL_SAI_REGISTER_CALLBACKS 0u +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0u +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0u +#define USE_HAL_SPI_REGISTER_CALLBACKS 0u +#define USE_HAL_TIM_REGISTER_CALLBACKS 0u +#define USE_HAL_TSC_REGISTER_CALLBACKS 0u +#define USE_HAL_UART_REGISTER_CALLBACKS 0u +#define USE_HAL_USART_REGISTER_CALLBACKS 0u +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0u + +/* ########################## Oscillator Values adaptation ####################*/ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 32000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) + #define HSE_STARTUP_TIMEOUT ((uint32_t)100) /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal Multiple Speed oscillator (MSI) default value. + * This value is the default MSI range value after Reset. + */ +#if !defined (MSI_VALUE) + #define MSI_VALUE ((uint32_t)4000000) /*!< Value of the Internal oscillator in Hz*/ +#endif /* MSI_VALUE */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI1) value. + */ +#if !defined (LSI1_VALUE) + #define LSI1_VALUE ((uint32_t)32000) /*!< LSI1 Typical Value in Hz*/ +#endif /* LSI1_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature.*/ +/** + * @brief Internal Low Speed oscillator (LSI2) value. + */ +#if !defined (LSI2_VALUE) + #define LSI2_VALUE ((uint32_t)32000) /*!< LSI2 Typical Value in Hz*/ +#endif /* LSI2_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature.*/ + +/** + * @brief External Low Speed oscillator (LSE) value. + * This value is used by the UART, RTC HAL module to compute the system frequency + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE 32768U /*!< Value of the External oscillator in Hz*/ +#endif /* LSE_VALUE */ + +/** + * @brief Internal Multiple Speed oscillator (HSI48) default value. + * This value is the default HSI48 range value after Reset. + */ +#if !defined (HSI48_VALUE) + #define HSI48_VALUE ((uint32_t)48000000) /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI48_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for SAI1 peripheral + * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source + * frequency. + */ +#if !defined (EXTERNAL_SAI1_CLOCK_VALUE) + #define EXTERNAL_SAI1_CLOCK_VALUE ((uint32_t)2097000) /*!< Value of the SAI1 External clock source in Hz*/ +#endif /* EXTERNAL_SAI1_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ + +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY 15U /*!< tick interrupt priority */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 1U +#define INSTRUCTION_CACHE_ENABLE 1U +#define DATA_CACHE_ENABLE 1U + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1U */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver + * Activated: CRC code is present inside driver + * Deactivated: CRC code cleaned from driver + */ + +#define USE_SPI_CRC 0U + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32wbxx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32wbxx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_COMP_MODULE_ENABLED + #include "stm32wbxx_hal_comp.h" +#endif /* HAL_COMP_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32wbxx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32wbxx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED + #include "stm32wbxx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32wbxx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32wbxx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32wbxx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_HSEM_MODULE_ENABLED + #include "stm32wbxx_hal_hsem.h" +#endif /* HAL_HSEM_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32wbxx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_IPCC_MODULE_ENABLED + #include "stm32wbxx_hal_ipcc.h" +#endif /* HAL_IPCC_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32wbxx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32wbxx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LCD_MODULE_ENABLED + #include "stm32wbxx_hal_lcd.h" +#endif /* HAL_LCD_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED + #include "stm32wbxx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32wbxx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_PKA_MODULE_ENABLED + #include "stm32wbxx_hal_pka.h" +#endif /* HAL_PKA_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32wbxx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED + #include "stm32wbxx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32wbxx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED + #include "stm32wbxx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32wbxx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED + #include "stm32wbxx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32wbxx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED + #include "stm32wbxx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32wbxx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32wbxx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_TSC_MODULE_ENABLED + #include "stm32wbxx_hal_tsc.h" +#endif /* HAL_TSC_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32wbxx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32wbxx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32wbxx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32WBxx_HAL_CONF_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/stm32wbxx_it.h b/firmware/memory_chip_gone/Core/Inc/stm32wbxx_it.h new file mode 100644 index 0000000..39c7be8 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/stm32wbxx_it.h @@ -0,0 +1,69 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32wbxx_it.h + * @brief This file contains the headers of the interrupt handlers. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32WBxx_IT_H +#define __STM32WBxx_IT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); +void IPCC_C1_RX_IRQHandler(void); +void IPCC_C1_TX_IRQHandler(void); +void HSEM_IRQHandler(void); +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32WBxx_IT_H */ diff --git a/firmware/memory_chip_gone/Core/Inc/utilities_conf.h b/firmware/memory_chip_gone/Core/Inc/utilities_conf.h new file mode 100644 index 0000000..45709e0 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Inc/utilities_conf.h @@ -0,0 +1,65 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file utilities_conf.h + * @author MCD Application Team + * @brief Configuration file for STM32 Utilities. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef UTILITIES_CONF_H +#define UTILITIES_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "cmsis_compiler.h" +#include "string.h" +#include "app_conf.h" +/****************************************************************************** + * common + ******************************************************************************/ +#define UTILS_ENTER_CRITICAL_SECTION( ) uint32_t primask_bit = __get_PRIMASK( );\ + __disable_irq( ) + +#define UTILS_EXIT_CRITICAL_SECTION( ) __set_PRIMASK( primask_bit ) + +#define UTILS_MEMSET8( dest, value, size ) memset( dest, value, size); + +/****************************************************************************** + * tiny low power manager + * (any macro that does not need to be modified can be removed) + ******************************************************************************/ +#define UTIL_LPM_INIT_CRITICAL_SECTION( ) +#define UTIL_LPM_ENTER_CRITICAL_SECTION( ) UTILS_ENTER_CRITICAL_SECTION( ) +#define UTIL_LPM_EXIT_CRITICAL_SECTION( ) UTILS_EXIT_CRITICAL_SECTION( ) + +/****************************************************************************** + * sequencer + * (any macro that does not need to be modified can be removed) + ******************************************************************************/ +#define UTIL_SEQ_INIT_CRITICAL_SECTION( ) +#define UTIL_SEQ_ENTER_CRITICAL_SECTION( ) UTILS_ENTER_CRITICAL_SECTION( ) +#define UTIL_SEQ_EXIT_CRITICAL_SECTION( ) UTILS_EXIT_CRITICAL_SECTION( ) +#define UTIL_SEQ_CONF_TASK_NBR (32) +#define UTIL_SEQ_CONF_PRIO_NBR CFG_SCH_PRIO_NBR +#define UTIL_SEQ_MEMSET8( dest, value, size ) UTILS_MEMSET8( dest, value, size ) + +#ifdef __cplusplus +} +#endif + +#endif /*UTILITIES_CONF_H */ diff --git a/firmware/memory_chip_gone/Core/Src/app_debug.c b/firmware/memory_chip_gone/Core/Src/app_debug.c new file mode 100644 index 0000000..169f056 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/app_debug.c @@ -0,0 +1,409 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_debug.c + * @author MCD Application Team + * @brief Debug capabilities source file for STM32WPAN Middleware + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 ------------------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +#include "app_common.h" + +#include "app_debug.h" +#include "utilities_common.h" +#include "shci.h" +#include "tl.h" +#include "dbg_trace.h" +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ +typedef PACKED_STRUCT +{ + GPIO_TypeDef* port; + uint16_t pin; + uint8_t enable; + uint8_t reserved; +} APPD_GpioConfig_t; +/* USER CODE END PTD */ + +/* Private defines -----------------------------------------------------------*/ +/* USER CODE BEGIN PD */ +#define GPIO_NBR_OF_RF_SIGNALS 9 +#define GPIO_CFG_NBR_OF_FEATURES 38 +#define NBR_OF_TRACES_CONFIG_PARAMETERS 4 +#define NBR_OF_GENERAL_CONFIG_PARAMETERS 4 +/** + * THIS SHALL BE SET TO A VALUE DIFFERENT FROM 0 ONLY ON REQUEST FROM ST SUPPORT + */ +#define BLE_DTB_CFG 0 + +/** + * System Debug Options flags to be configured with: + * - SHCI_C2_DEBUG_OPTIONS_IPCORE_LP + * - SHCI_C2_DEBUG_OPTIONS_IPCORE_NO_LP + * - SHCI_C2_DEBUG_OPTIONS_CPU2_STOP_EN + * - SHCI_C2_DEBUG_OPTIONS_CPU2_STOP_DIS + * which are used to set following configuration bits: + * - bit 0: 0: IP BLE core in LP mode 1: IP BLE core in run mode (no LP supported) + * - bit 1: 0: CPU2 STOP mode Enable 1: CPU2 STOP mode Disable + * - bit [2-7]: bits reserved ( shall be set to 0) + */ +#define SYS_DBG_CFG1 (SHCI_C2_DEBUG_OPTIONS_IPCORE_LP | SHCI_C2_DEBUG_OPTIONS_CPU2_STOP_EN) +/* USER CODE END PD */ + +/* Private macros ------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static SHCI_C2_DEBUG_TracesConfig_t APPD_TracesConfig={0, 0, 0, 0}; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static SHCI_C2_DEBUG_GeneralConfig_t APPD_GeneralConfig={BLE_DTB_CFG, SYS_DBG_CFG1, {0, 0}}; + +#ifdef CFG_DEBUG_TRACE_UART +#if(CFG_HW_LPUART1_ENABLED == 1) +extern void MX_LPUART1_UART_Init(void); +#endif +#if(CFG_HW_USART1_ENABLED == 1) +extern void MX_USART1_UART_Init(void); +#endif +#endif + +/** + * THE DEBUG ON GPIO FOR CPU2 IS INTENDED TO BE USED ONLY ON REQUEST FROM ST SUPPORT + * It provides timing information on the CPU2 activity. + * All configuration of (port, pin) is supported for each features and can be selected by the user + * depending on the availability + */ +static const APPD_GpioConfig_t aGpioConfigList[GPIO_CFG_NBR_OF_FEATURES] = +{ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* BLE_ISR - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* BLE_STACK_TICK - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* BLE_CMD_PROCESS - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* BLE_ACL_DATA_PROCESS - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* SYS_CMD_PROCESS - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* RNG_PROCESS - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* NVM_PROCESS - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_GENERAL - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_BLE_CMD_RX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_BLE_EVT_TX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_BLE_ACL_DATA_RX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_SYS_CMD_RX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_SYS_EVT_TX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_CLI_CMD_RX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_OT_CMD_RX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_OT_ACK_TX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_CLI_ACK_TX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_MEM_MANAGER_RX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_TRACES_TX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* HARD_FAULT - Set on Entry / Reset on Exit */ +/* From v1.1.1 */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IP_CORE_LP_STATUS - Set on Entry / Reset on Exit */ +/* From v1.2.0 */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* END_OF_CONNECTION_EVENT - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* TIMER_SERVER_CALLBACK - Toggle on Entry */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* PES_ACTIVITY - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* MB_BLE_SEND_EVT - Set on Entry / Reset on Exit */ +/* From v1.3.0 */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* BLE_NO_DELAY - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* BLE_STACK_STORE_NVM_CB - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* NVMA_WRITE_ONGOING - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* NVMA_WRITE_COMPLETE - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* NVMA_CLEANUP - Set on Entry / Reset on Exit */ +/* From v1.4.0 */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* NVMA_START - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* FLASH_EOP - Set on Entry / Reset on Exit */ +/* From v1.5.0 */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* FLASH_WRITE - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* FLASH_ERASE - Set on Entry / Reset on Exit */ +/* From v1.6.0 */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* BLE_RESCHEDULE_EVENT - Set on Entry / Reset on Exit */ +/* From v1.8.0 */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_BLE_LLD_CMD_RX - Set on Entry / Reset on Exit */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* IPCC_BLE_LLD_ACK_TX - Set on Entry / Reset on Exit */ +/* From v1.9.0 */ + { GPIOA, LL_GPIO_PIN_0, 0, 0}, /* BLE_ASYNCH_EVENT_NACKED - Set on Entry / Reset on Exit */ +}; + +/** + * THE DEBUG ON GPIO FOR CPU2 IS INTENDED TO BE USED ONLY ON REQUEST FROM ST SUPPORT + * This table is relevant only for BLE + * It provides timing information on BLE RF activity. + * New signals may be allocated at any location when requested by ST + * The GPIO allocated to each signal depend on the BLE_DTB_CFG value and cannot be changed + */ +#if( BLE_DTB_CFG == 7) +static const APPD_GpioConfig_t aRfConfigList[GPIO_NBR_OF_RF_SIGNALS] = +{ + { GPIOB, LL_GPIO_PIN_2, 0, 0}, /* DTB10 - Tx/Rx SPI */ + { GPIOB, LL_GPIO_PIN_7, 0, 0}, /* DTB11 - Tx/Tx SPI Clk */ + { GPIOA, LL_GPIO_PIN_8, 0, 0}, /* DTB12 - Tx/Rx Ready & SPI Select */ + { GPIOA, LL_GPIO_PIN_9, 0, 0}, /* DTB13 - Tx/Rx Start */ + { GPIOA, LL_GPIO_PIN_10, 0, 0}, /* DTB14 - FSM0 */ + { GPIOA, LL_GPIO_PIN_11, 0, 0}, /* DTB15 - FSM1 */ + { GPIOB, LL_GPIO_PIN_8, 0, 0}, /* DTB16 - FSM2 */ + { GPIOB, LL_GPIO_PIN_11, 0, 0}, /* DTB17 - FSM3 */ + { GPIOB, LL_GPIO_PIN_10, 0, 0}, /* DTB18 - FSM4 */ +}; +#endif +/* USER CODE END PV */ + +/* Global variables ----------------------------------------------------------*/ +/* USER CODE BEGIN GV */ +/* USER CODE END GV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ +static void APPD_SetCPU2GpioConfig( void ); +static void APPD_BleDtbCfg( void ); +/* USER CODE END PFP */ + +/* Functions Definition ------------------------------------------------------*/ +void APPD_Init( void ) +{ +/* USER CODE BEGIN APPD_Init */ +#if (CFG_DEBUGGER_SUPPORTED == 1) + /** + * Keep debugger enabled while in any low power mode + */ + HAL_DBGMCU_EnableDBGSleepMode(); + HAL_DBGMCU_EnableDBGStopMode(); + + /***************** ENABLE DEBUGGER *************************************/ + LL_EXTI_EnableIT_32_63(LL_EXTI_LINE_48); + +#else + GPIO_InitTypeDef gpio_config = {0}; + + gpio_config.Pull = GPIO_NOPULL; + gpio_config.Mode = GPIO_MODE_ANALOG; + + gpio_config.Pin = GPIO_PIN_15 | GPIO_PIN_14 | GPIO_PIN_13; + __HAL_RCC_GPIOA_CLK_ENABLE(); + HAL_GPIO_Init(GPIOA, &gpio_config); + __HAL_RCC_GPIOA_CLK_DISABLE(); + + gpio_config.Pin = GPIO_PIN_4 | GPIO_PIN_3; + __HAL_RCC_GPIOB_CLK_ENABLE(); + HAL_GPIO_Init(GPIOB, &gpio_config); + __HAL_RCC_GPIOB_CLK_DISABLE(); + + HAL_DBGMCU_DisableDBGSleepMode(); + HAL_DBGMCU_DisableDBGStopMode(); + HAL_DBGMCU_DisableDBGStandbyMode(); + +#endif /* (CFG_DEBUGGER_SUPPORTED == 1) */ + +#if(CFG_DEBUG_TRACE != 0) + DbgTraceInit(); +#endif + + APPD_SetCPU2GpioConfig( ); + APPD_BleDtbCfg( ); + +/* USER CODE END APPD_Init */ + return; +} + +void APPD_EnableCPU2( void ) +{ +/* USER CODE BEGIN APPD_EnableCPU2 */ + SHCI_C2_DEBUG_Init_Cmd_Packet_t DebugCmdPacket = + { + {{0,0,0}}, /**< Does not need to be initialized */ + {(uint8_t *)aGpioConfigList, + (uint8_t *)&APPD_TracesConfig, + (uint8_t *)&APPD_GeneralConfig, + GPIO_CFG_NBR_OF_FEATURES, + NBR_OF_TRACES_CONFIG_PARAMETERS, + NBR_OF_GENERAL_CONFIG_PARAMETERS} + }; + + /**< Traces channel initialization */ + TL_TRACES_Init( ); + + /** GPIO DEBUG Initialization */ + SHCI_C2_DEBUG_Init( &DebugCmdPacket ); + +/* USER CODE END APPD_EnableCPU2 */ + return; +} + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static void APPD_SetCPU2GpioConfig( void ) +{ +/* USER CODE BEGIN APPD_SetCPU2GpioConfig */ + GPIO_InitTypeDef gpio_config = {0}; + uint8_t local_loop; + uint16_t gpioa_pin_list; + uint16_t gpiob_pin_list; + uint16_t gpioc_pin_list; + gpioa_pin_list = 0; + gpiob_pin_list = 0; + gpioc_pin_list = 0; + + for(local_loop = 0 ; local_loop < GPIO_CFG_NBR_OF_FEATURES; local_loop++) + { + if( aGpioConfigList[local_loop].enable != 0) + { + switch((uint32_t)aGpioConfigList[local_loop].port) + { + case (uint32_t)GPIOA: + gpioa_pin_list |= aGpioConfigList[local_loop].pin; + break; + case (uint32_t)GPIOB: + gpiob_pin_list |= aGpioConfigList[local_loop].pin; + break; + case (uint32_t)GPIOC: + gpioc_pin_list |= aGpioConfigList[local_loop].pin; + break; + default: + break; + } + } + } + + gpio_config.Pull = GPIO_NOPULL; + gpio_config.Mode = GPIO_MODE_OUTPUT_PP; + gpio_config.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + + if(gpioa_pin_list != 0) + { + gpio_config.Pin = gpioa_pin_list; + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_C2GPIOA_CLK_ENABLE(); + HAL_GPIO_Init(GPIOA, &gpio_config); + HAL_GPIO_WritePin(GPIOA, gpioa_pin_list, GPIO_PIN_RESET); + } + + if(gpiob_pin_list != 0) + { + gpio_config.Pin = gpiob_pin_list; + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_C2GPIOB_CLK_ENABLE(); + HAL_GPIO_Init(GPIOB, &gpio_config); + HAL_GPIO_WritePin(GPIOB, gpiob_pin_list, GPIO_PIN_RESET); + } + + if(gpioc_pin_list != 0) + { + gpio_config.Pin = gpioc_pin_list; + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_C2GPIOC_CLK_ENABLE(); + HAL_GPIO_Init(GPIOC, &gpio_config); + HAL_GPIO_WritePin(GPIOC, gpioc_pin_list, GPIO_PIN_RESET); + } + +/* USER CODE END APPD_SetCPU2GpioConfig */ + return; +} + +static void APPD_BleDtbCfg( void ) +{ +/* USER CODE BEGIN APPD_BleDtbCfg */ +#if (BLE_DTB_CFG != 0) + GPIO_InitTypeDef gpio_config = {0}; + uint8_t local_loop; + uint16_t gpioa_pin_list; + uint16_t gpiob_pin_list; + gpioa_pin_list = 0; + gpiob_pin_list = 0; + + for(local_loop = 0 ; local_loop < GPIO_NBR_OF_RF_SIGNALS; local_loop++) + { + if( aRfConfigList[local_loop].enable != 0) + { + switch((uint32_t)aRfConfigList[local_loop].port) + { + case (uint32_t)GPIOA: + gpioa_pin_list |= aRfConfigList[local_loop].pin; + break; + case (uint32_t)GPIOB: + gpiob_pin_list |= aRfConfigList[local_loop].pin; + break; + default: + break; + } + } + } + gpio_config.Pull = GPIO_NOPULL; + gpio_config.Mode = GPIO_MODE_AF_PP; + gpio_config.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + gpio_config.Alternate = GPIO_AF6_RF_DTB7; + + if(gpioa_pin_list != 0) + { + gpio_config.Pin = gpioa_pin_list; + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_C2GPIOA_CLK_ENABLE(); + HAL_GPIO_Init(GPIOA, &gpio_config); + } + + if(gpiob_pin_list != 0) + { + gpio_config.Pin = gpiob_pin_list; + __HAL_RCC_GPIOB_CLK_ENABLE(); + __HAL_RCC_C2GPIOB_CLK_ENABLE(); + HAL_GPIO_Init(GPIOB, &gpio_config); + } +#endif + +/* USER CODE END APPD_BleDtbCfg */ + return; +} + +/************************************************************* + * + * WRAP FUNCTIONS + * +*************************************************************/ +#if(CFG_DEBUG_TRACE != 0) +void DbgOutputInit( void ) +{ +/* USER CODE BEGIN DbgOutputInit */ +#ifdef CFG_DEBUG_TRACE_UART +if (CFG_DEBUG_TRACE_UART == hw_lpuart1) +{ +#if(CFG_HW_LPUART1_ENABLED == 1) + MX_LPUART1_UART_Init(); +#endif +} +else if (CFG_DEBUG_TRACE_UART == hw_uart1) +{ +#if(CFG_HW_USART1_ENABLED == 1) + MX_USART1_UART_Init(); +#endif +} +#endif + +/* USER CODE END DbgOutputInit */ + return; +} + +void DbgOutputTraces( uint8_t *p_data, uint16_t size, void (*cb)(void) ) +{ +/* USER CODE END DbgOutputTraces */ + HW_UART_Transmit_DMA(CFG_DEBUG_TRACE_UART, p_data, size, cb); + +/* USER CODE END DbgOutputTraces */ + return; +} +#endif diff --git a/firmware/memory_chip_gone/Core/Src/app_entry.c b/firmware/memory_chip_gone/Core/Src/app_entry.c new file mode 100644 index 0000000..7ae8fa0 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/app_entry.c @@ -0,0 +1,584 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file app_entry.c + * @author MCD Application Team + * @brief Entry point of the application + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 "app_common.h" +#include "main.h" +#include "app_entry.h" +#include "app_ble.h" +#include "ble.h" +#include "tl.h" +#include "stm32_seq.h" +#include "shci_tl.h" +#include "stm32_lpm.h" +#include "app_debug.h" +#include "dbg_trace.h" +#include "shci.h" +#include "otp.h" + +/* Private includes -----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +extern RTC_HandleTypeDef hrtc; + +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private defines -----------------------------------------------------------*/ +#define POOL_SIZE (CFG_TLBLE_EVT_QUEUE_LENGTH*4U*DIVC((sizeof(TL_PacketHeader_t) + TL_BLE_EVENT_FRAME_SIZE), 4U)) + +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macros ------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t EvtPool[POOL_SIZE]; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static TL_CmdPacket_t SystemCmdBuffer; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t SystemSpareEvtBuffer[sizeof(TL_PacketHeader_t) + TL_EVT_HDR_SIZE + 255U]; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t BleSpareEvtBuffer[sizeof(TL_PacketHeader_t) + TL_EVT_HDR_SIZE + 255]; + +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private functions prototypes-----------------------------------------------*/ +static void Config_HSE(void); +static void Reset_Device(void); +#if (CFG_HW_RESET_BY_FW == 1) +static void Reset_IPCC(void); +static void Reset_BackupDomain(void); +#endif /* CFG_HW_RESET_BY_FW == 1*/ +static void System_Init(void); +static void SystemPower_Config(void); +static void appe_Tl_Init(void); +static void APPE_SysStatusNot(SHCI_TL_CmdStatus_t status); +static void APPE_SysUserEvtRx(void * pPayload); +static void APPE_SysEvtReadyProcessing(void * pPayload); +static void APPE_SysEvtError(void * pPayload); +static void Init_Rtc(void); + +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Functions Definition ------------------------------------------------------*/ +void MX_APPE_Config(void) +{ + /** + * The OPTVERR flag is wrongly set at power on + * It shall be cleared before using any HAL_FLASH_xxx() api + */ + __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR); + + /** + * Reset some configurations so that the system behave in the same way + * when either out of nReset or Power On + */ + Reset_Device(); + + /* Configure HSE Tuning */ + Config_HSE(); + + return; +} + +void MX_APPE_Init(void) +{ + System_Init(); /**< System initialization */ + + SystemPower_Config(); /**< Configure the system Power Mode */ + + HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer */ + +/* USER CODE BEGIN APPE_Init_1 */ + +/* USER CODE END APPE_Init_1 */ + appe_Tl_Init(); /* Initialize all transport layers */ + + /** + * From now, the application is waiting for the ready event (VS_HCI_C2_Ready) + * received on the system channel before starting the Stack + * This system event is received with APPE_SysUserEvtRx() + */ +/* USER CODE BEGIN APPE_Init_2 */ + +/* USER CODE END APPE_Init_2 */ + + return; +} + +void Init_Smps(void) +{ +#if (CFG_USE_SMPS != 0) + /** + * Configure and enable SMPS + * + * The SMPS configuration is not yet supported by CubeMx + * when SMPS output voltage is set to 1.4V, the RF output power is limited to 3.7dBm + * the SMPS output voltage shall be increased for higher RF output power + */ + LL_PWR_SMPS_SetStartupCurrent(LL_PWR_SMPS_STARTUP_CURRENT_80MA); + LL_PWR_SMPS_SetOutputVoltageLevel(LL_PWR_SMPS_OUTPUT_VOLTAGE_1V40); + LL_PWR_SMPS_Enable(); +#endif /* CFG_USE_SMPS != 0 */ + + return; +} + +void Init_Exti(void) +{ + /* Enable IPCC(36), HSEM(38) wakeup interrupts on CPU1 */ + LL_EXTI_EnableIT_32_63(LL_EXTI_LINE_36 | LL_EXTI_LINE_38); + + return; +} + +/* USER CODE BEGIN FD */ + +/* USER CODE END FD */ + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static void Reset_Device(void) +{ +#if (CFG_HW_RESET_BY_FW == 1) + Reset_BackupDomain(); + + Reset_IPCC(); +#endif /* CFG_HW_RESET_BY_FW == 1 */ + + return; +} + +#if (CFG_HW_RESET_BY_FW == 1) +static void Reset_BackupDomain(void) +{ + if ((LL_RCC_IsActiveFlag_PINRST() != FALSE) && (LL_RCC_IsActiveFlag_SFTRST() == FALSE)) + { + HAL_PWR_EnableBkUpAccess(); /**< Enable access to the RTC registers */ + + /** + * Write twice the value to flush the APB-AHB bridge + * This bit shall be written in the register before writing the next one + */ + HAL_PWR_EnableBkUpAccess(); + + __HAL_RCC_BACKUPRESET_FORCE(); + __HAL_RCC_BACKUPRESET_RELEASE(); + } + + return; +} + +static void Reset_IPCC(void) +{ + LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_IPCC); + + LL_C1_IPCC_ClearFlag_CHx( + IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 + | LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + LL_C2_IPCC_ClearFlag_CHx( + IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 + | LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + LL_C1_IPCC_DisableTransmitChannel( + IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 + | LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + LL_C2_IPCC_DisableTransmitChannel( + IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 + | LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + LL_C1_IPCC_DisableReceiveChannel( + IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 + | LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + LL_C2_IPCC_DisableReceiveChannel( + IPCC, + LL_IPCC_CHANNEL_1 | LL_IPCC_CHANNEL_2 | LL_IPCC_CHANNEL_3 | LL_IPCC_CHANNEL_4 + | LL_IPCC_CHANNEL_5 | LL_IPCC_CHANNEL_6); + + return; +} +#endif /* CFG_HW_RESET_BY_FW == 1 */ + +static void Config_HSE(void) +{ + OTP_ID0_t * p_otp; + + /** + * Read HSE_Tuning from OTP + */ + p_otp = (OTP_ID0_t *) OTP_Read(0); + if (p_otp) + { + LL_RCC_HSE_SetCapacitorTuning(p_otp->hse_tuning); + } + + return; +} + +static void System_Init(void) +{ + Init_Smps(); + + Init_Exti(); + + Init_Rtc(); + + return; +} + +static void Init_Rtc(void) +{ + /* Disable RTC registers write protection */ + LL_RTC_DisableWriteProtection(RTC); + + LL_RTC_WAKEUP_SetClock(RTC, CFG_RTC_WUCKSEL_DIVIDER); + + /* Enable RTC registers write protection */ + LL_RTC_EnableWriteProtection(RTC); + + return; +} + +/** + * @brief Configure the system for power optimization + * + * @note This API configures the system to be ready for low power mode + * + * @param None + * @retval None + */ +static void SystemPower_Config(void) +{ + /** + * Select HSI as system clock source after Wake Up from Stop mode + */ + LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI); + + /* Initialize low power manager */ + UTIL_LPM_Init(); + /* Initialize the CPU2 reset value before starting CPU2 with C2BOOT */ + LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN); + +#if (CFG_USB_INTERFACE_ENABLE != 0) + /** + * Enable USB power + */ + HAL_PWREx_EnableVddUSB(); +#endif /* CFG_USB_INTERFACE_ENABLE != 0 */ + + return; +} + +static void appe_Tl_Init(void) +{ + TL_MM_Config_t tl_mm_config; + SHCI_TL_HciInitConf_t SHci_Tl_Init_Conf; + /**< Reference table initialization */ + TL_Init(); + + /**< System channel initialization */ + UTIL_SEQ_RegTask(1<< CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID, UTIL_SEQ_RFU, shci_user_evt_proc); + SHci_Tl_Init_Conf.p_cmdbuffer = (uint8_t*)&SystemCmdBuffer; + SHci_Tl_Init_Conf.StatusNotCallBack = APPE_SysStatusNot; + shci_init(APPE_SysUserEvtRx, (void*) &SHci_Tl_Init_Conf); + + /**< Memory Manager channel initialization */ + tl_mm_config.p_BleSpareEvtBuffer = BleSpareEvtBuffer; + tl_mm_config.p_SystemSpareEvtBuffer = SystemSpareEvtBuffer; + tl_mm_config.p_AsynchEvtPool = EvtPool; + tl_mm_config.AsynchEvtPoolSize = POOL_SIZE; + TL_MM_Init(&tl_mm_config); + + TL_Enable(); + + return; +} + +static void APPE_SysStatusNot(SHCI_TL_CmdStatus_t status) +{ + UNUSED(status); + return; +} + +/** + * The type of the payload for a system user event is tSHCI_UserEvtRxParam + * When the system event is both : + * - a ready event (subevtcode = SHCI_SUB_EVT_CODE_READY) + * - reported by the FUS (sysevt_ready_rsp == FUS_FW_RUNNING) + * The buffer shall not be released + * (eg ((tSHCI_UserEvtRxParam*)pPayload)->status shall be set to SHCI_TL_UserEventFlow_Disable) + * When the status is not filled, the buffer is released by default + */ +static void APPE_SysUserEvtRx(void * pPayload) +{ + TL_AsynchEvt_t *p_sys_event; + WirelessFwInfo_t WirelessInfo; + + p_sys_event = (TL_AsynchEvt_t*)(((tSHCI_UserEvtRxParam*)pPayload)->pckt->evtserial.evt.payload); + + switch(p_sys_event->subevtcode) + { + case SHCI_SUB_EVT_CODE_READY: + /* Read the firmware version of both the wireless firmware and the FUS */ + SHCI_GetWirelessFwInfo(&WirelessInfo); + APP_DBG_MSG("Wireless Firmware version %d.%d.%d\n", WirelessInfo.VersionMajor, WirelessInfo.VersionMinor, WirelessInfo.VersionSub); + APP_DBG_MSG("Wireless Firmware build %d\n", WirelessInfo.VersionReleaseType); + APP_DBG_MSG("FUS version %d.%d.%d\n", WirelessInfo.FusVersionMajor, WirelessInfo.FusVersionMinor, WirelessInfo.FusVersionSub); + + APP_DBG_MSG(">>== SHCI_SUB_EVT_CODE_READY\n\r"); + APPE_SysEvtReadyProcessing(pPayload); + break; + + case SHCI_SUB_EVT_ERROR_NOTIF: + APP_DBG_MSG(">>== SHCI_SUB_EVT_ERROR_NOTIF \n\r"); + APPE_SysEvtError(pPayload); + break; + + case SHCI_SUB_EVT_BLE_NVM_RAM_UPDATE: + APP_DBG_MSG(">>== SHCI_SUB_EVT_BLE_NVM_RAM_UPDATE -- BLE NVM RAM HAS BEEN UPDATED BY CPU2 \n"); + APP_DBG_MSG(" - StartAddress = %lx , Size = %ld\n", + ((SHCI_C2_BleNvmRamUpdate_Evt_t*)p_sys_event->payload)->StartAddress, + ((SHCI_C2_BleNvmRamUpdate_Evt_t*)p_sys_event->payload)->Size); + break; + + case SHCI_SUB_EVT_NVM_START_WRITE: + APP_DBG_MSG("==>> SHCI_SUB_EVT_NVM_START_WRITE : NumberOfWords = %ld\n", + ((SHCI_C2_NvmStartWrite_Evt_t*)p_sys_event->payload)->NumberOfWords); + break; + + case SHCI_SUB_EVT_NVM_END_WRITE: + APP_DBG_MSG(">>== SHCI_SUB_EVT_NVM_END_WRITE\n\r"); + break; + + case SHCI_SUB_EVT_NVM_START_ERASE: + APP_DBG_MSG("==>>SHCI_SUB_EVT_NVM_START_ERASE : NumberOfSectors = %ld\n", + ((SHCI_C2_NvmStartErase_Evt_t*)p_sys_event->payload)->NumberOfSectors); + break; + + case SHCI_SUB_EVT_NVM_END_ERASE: + APP_DBG_MSG(">>== SHCI_SUB_EVT_NVM_END_ERASE\n\r"); + break; + + default: + break; + } + + return; +} + +/** + * @brief Notify a system error coming from the M0 firmware + * @param ErrorCode : errorCode detected by the M0 firmware + * + * @retval None + */ +static void APPE_SysEvtError(void * pPayload) +{ + TL_AsynchEvt_t *p_sys_event; + SCHI_SystemErrCode_t *p_sys_error_code; + + p_sys_event = (TL_AsynchEvt_t*)(((tSHCI_UserEvtRxParam*)pPayload)->pckt->evtserial.evt.payload); + p_sys_error_code = (SCHI_SystemErrCode_t*) p_sys_event->payload; + + APP_DBG_MSG(">>== SHCI_SUB_EVT_ERROR_NOTIF WITH REASON %x \n\r",(*p_sys_error_code)); + + if ((*p_sys_error_code) == ERR_BLE_INIT) + { + /* Error during BLE stack initialization */ + APP_DBG_MSG(">>== SHCI_SUB_EVT_ERROR_NOTIF WITH REASON - ERR_BLE_INIT \n"); + } + else + { + APP_DBG_MSG(">>== SHCI_SUB_EVT_ERROR_NOTIF WITH REASON - BLE ERROR \n"); + } + return; +} + +static void APPE_SysEvtReadyProcessing(void * pPayload) +{ + TL_AsynchEvt_t *p_sys_event; + SHCI_C2_Ready_Evt_t *p_sys_ready_event; + + SHCI_C2_CONFIG_Cmd_Param_t config_param = {0}; + uint32_t RevisionID=0; + uint32_t DeviceID=0; + + p_sys_event = (TL_AsynchEvt_t*)(((tSHCI_UserEvtRxParam*)pPayload)->pckt->evtserial.evt.payload); + p_sys_ready_event = (SHCI_C2_Ready_Evt_t*) p_sys_event->payload; + + if (p_sys_ready_event->sysevt_ready_rsp == WIRELESS_FW_RUNNING) + { + /** + * The wireless firmware is running on the CPU2 + */ + APP_DBG_MSG(">>== WIRELESS_FW_RUNNING \n"); + + /* Traces channel initialization */ + APPD_EnableCPU2(); + + /* Enable all events Notification */ + config_param.PayloadCmdSize = SHCI_C2_CONFIG_PAYLOAD_CMD_SIZE; + config_param.EvtMask1 = SHCI_C2_CONFIG_EVTMASK1_BIT0_ERROR_NOTIF_ENABLE + + SHCI_C2_CONFIG_EVTMASK1_BIT1_BLE_NVM_RAM_UPDATE_ENABLE + + SHCI_C2_CONFIG_EVTMASK1_BIT2_THREAD_NVM_RAM_UPDATE_ENABLE + + SHCI_C2_CONFIG_EVTMASK1_BIT3_NVM_START_WRITE_ENABLE + + SHCI_C2_CONFIG_EVTMASK1_BIT4_NVM_END_WRITE_ENABLE + + SHCI_C2_CONFIG_EVTMASK1_BIT5_NVM_START_ERASE_ENABLE + + SHCI_C2_CONFIG_EVTMASK1_BIT6_NVM_END_ERASE_ENABLE; + + /* Read revision identifier */ + /** + * @brief Return the device revision identifier + * @note This field indicates the revision of the device. + * @rmtoll DBGMCU_IDCODE REV_ID LL_DBGMCU_GetRevisionID + * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF + */ + RevisionID = LL_DBGMCU_GetRevisionID(); + + APP_DBG_MSG(">>== DBGMCU_GetRevisionID= %lx \n\r", RevisionID); + + config_param.RevisionID = (uint16_t)RevisionID; + + DeviceID = LL_DBGMCU_GetDeviceID(); + APP_DBG_MSG(">>== DBGMCU_GetDeviceID= %lx \n\r", DeviceID); + config_param.DeviceID = (uint16_t)DeviceID; + (void)SHCI_C2_Config(&config_param); + + APP_BLE_Init(); + UTIL_LPM_SetOffMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE); + } + else if (p_sys_ready_event->sysevt_ready_rsp == FUS_FW_RUNNING) + { + /** + * The FUS firmware is running on the CPU2 + * In the scope of this application, there should be no case when we get here + */ + APP_DBG_MSG(">>== SHCI_SUB_EVT_CODE_READY - FUS_FW_RUNNING \n\r"); + + /* The packet shall not be released as this is not supported by the FUS */ + ((tSHCI_UserEvtRxParam*)pPayload)->status = SHCI_TL_UserEventFlow_Disable; + } + else + { + APP_DBG_MSG(">>== SHCI_SUB_EVT_CODE_READY - UNEXPECTED CASE \n\r"); + } + + return; +} + +/* USER CODE BEGIN FD_LOCAL_FUNCTIONS */ + +/* USER CODE END FD_LOCAL_FUNCTIONS */ + +/************************************************************* + * + * WRAP FUNCTIONS + * + *************************************************************/ +void HAL_Delay(uint32_t Delay) +{ + uint32_t tickstart = HAL_GetTick(); + uint32_t wait = Delay; + + /* Add a freq to guarantee minimum wait */ + if (wait < HAL_MAX_DELAY) + { + wait += HAL_GetTickFreq(); + } + + while ((HAL_GetTick() - tickstart) < wait) + { + /************************************************************************************ + * ENTER SLEEP MODE + ***********************************************************************************/ + LL_LPM_EnableSleep(); /**< Clear SLEEPDEEP bit of Cortex System Control Register */ + + /** + * This option is used to ensure that store operations are completed + */ + #if defined (__CC_ARM) || defined (__ARMCC_VERSION) + __force_stores(); + #endif /* __ARMCC_VERSION */ + + __WFI(); + } +} + +void MX_APPE_Process(void) +{ + /* USER CODE BEGIN MX_APPE_Process_1 */ + + /* USER CODE END MX_APPE_Process_1 */ + UTIL_SEQ_Run(UTIL_SEQ_DEFAULT); + /* USER CODE BEGIN MX_APPE_Process_2 */ + + /* USER CODE END MX_APPE_Process_2 */ +} + +void UTIL_SEQ_Idle(void) +{ +#if (CFG_LPM_SUPPORTED == 1) + UTIL_LPM_EnterLowPower(); +#endif /* CFG_LPM_SUPPORTED == 1 */ + return; +} + +void shci_notify_asynch_evt(void* pdata) +{ + UTIL_SEQ_SetTask(1<SSR, RTC_SSR_SS)); + + second_read = (uint32_t)(READ_BIT(RTC->SSR, RTC_SSR_SS)); + + while(first_read != second_read) + { + first_read = second_read; + + second_read = (uint32_t)(READ_BIT(RTC->SSR, RTC_SSR_SS)); + } + + return second_read; +} + +/** + * @brief Insert a Timer in the list after the Timer ID specified + * @param TimerID: The ID of the Timer + * @param RefTimerID: The ID of the Timer to be linked after + * @retval None + */ +static void LinkTimerAfter(uint8_t TimerID, uint8_t RefTimerID) +{ + uint8_t next_id; + + next_id = aTimerContext[RefTimerID].NextID; + + if(next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + aTimerContext[next_id].PreviousID = TimerID; + } + aTimerContext[TimerID].NextID = next_id; + aTimerContext[TimerID].PreviousID = RefTimerID ; + aTimerContext[RefTimerID].NextID = TimerID; + + return; +} + +/** + * @brief Insert a Timer in the list before the ID specified + * @param TimerID: The ID of the Timer + * @param RefTimerID: The ID of the Timer to be linked before + * @retval None + */ +static void LinkTimerBefore(uint8_t TimerID, uint8_t RefTimerID) +{ + uint8_t previous_id; + + if(RefTimerID != CurrentRunningTimerID) + { + previous_id = aTimerContext[RefTimerID].PreviousID; + + aTimerContext[previous_id].NextID = TimerID; + aTimerContext[TimerID].NextID = RefTimerID; + aTimerContext[TimerID].PreviousID = previous_id ; + aTimerContext[RefTimerID].PreviousID = TimerID; + } + else + { + aTimerContext[TimerID].NextID = RefTimerID; + aTimerContext[RefTimerID].PreviousID = TimerID; + } + + return; +} + +/** + * @brief Insert a Timer in the list + * @param TimerID: The ID of the Timer + * @retval None + */ +static uint16_t linkTimer(uint8_t TimerID) +{ + uint32_t time_left; + uint16_t time_elapsed; + uint8_t timer_id_lookup; + uint8_t next_id; + + if(CurrentRunningTimerID == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + /** + * No timer in the list + */ + PreviousRunningTimerID = CurrentRunningTimerID; + CurrentRunningTimerID = TimerID; + aTimerContext[TimerID].NextID = CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; + + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + time_elapsed = 0; + } + else + { + time_elapsed = ReturnTimeElapsed(); + + /** + * update count of the timer to be linked + */ + aTimerContext[TimerID].CountLeft += time_elapsed; + time_left = aTimerContext[TimerID].CountLeft; + + /** + * Search for index where the new timer shall be linked + */ + if(aTimerContext[CurrentRunningTimerID].CountLeft <= time_left) + { + /** + * Search for the ID after the first one + */ + timer_id_lookup = CurrentRunningTimerID; + next_id = aTimerContext[timer_id_lookup].NextID; + while((next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (aTimerContext[next_id].CountLeft <= time_left)) + { + timer_id_lookup = aTimerContext[timer_id_lookup].NextID; + next_id = aTimerContext[timer_id_lookup].NextID; + } + + /** + * Link after the ID + */ + LinkTimerAfter(TimerID, timer_id_lookup); + } + else + { + /** + * Link before the first ID + */ + LinkTimerBefore(TimerID, CurrentRunningTimerID); + PreviousRunningTimerID = CurrentRunningTimerID; + CurrentRunningTimerID = TimerID; + } + } + + return time_elapsed; +} + +/** + * @brief Remove a Timer from the list + * @param TimerID: The ID of the Timer + * @param RequestReadSSR: Request to read the SSR register or not + * @retval None + */ +static void UnlinkTimer(uint8_t TimerID, RequestReadSSR_t RequestReadSSR) +{ + uint8_t previous_id; + uint8_t next_id; + + if(TimerID == CurrentRunningTimerID) + { + PreviousRunningTimerID = CurrentRunningTimerID; + CurrentRunningTimerID = aTimerContext[TimerID].NextID; + } + else + { + previous_id = aTimerContext[TimerID].PreviousID; + next_id = aTimerContext[TimerID].NextID; + + aTimerContext[previous_id].NextID = aTimerContext[TimerID].NextID; + if(next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + aTimerContext[next_id].PreviousID = aTimerContext[TimerID].PreviousID; + } + } + + /** + * Timer is out of the list + */ + aTimerContext[TimerID].TimerIDStatus = TimerID_Created; + + if((CurrentRunningTimerID == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (RequestReadSSR == SSR_Read_Requested)) + { + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + } + + return; +} + +/** + * @brief Return the number of ticks counted by the wakeuptimer since it has been started + * @note The API is reading the SSR register to get how many ticks have been counted + * since the time the timer has been started + * @param None + * @retval Time expired in Ticks + */ +static uint16_t ReturnTimeElapsed(void) +{ + uint32_t return_value; + uint32_t wrap_counter; + + if(SSRValueOnLastSetup != SSR_FORBIDDEN_VALUE) + { + return_value = ReadRtcSsrValue(); /**< Read SSR register first */ + + if (SSRValueOnLastSetup >= return_value) + { + return_value = SSRValueOnLastSetup - return_value; + } + else + { + wrap_counter = SynchPrescalerUserConfig - return_value; + return_value = SSRValueOnLastSetup + wrap_counter; + } + + /** + * At this stage, ReturnValue holds the number of ticks counted by SSR + * Need to translate in number of ticks counted by the Wakeuptimer + */ + return_value = return_value*AsynchPrescalerUserConfig; + return_value = return_value >> WakeupTimerDivider; + } + else + { + return_value = 0; + } + + return (uint16_t)return_value; +} + +/** + * @brief Set the wakeup counter + * @note The API is writing the counter value so that the value is decreased by one to cope with the fact + * the interrupt is generated with 1 extra clock cycle (See RefManuel) + * It assumes all condition are met to be allowed to write the wakeup counter + * @param Value: Value to be written in the counter + * @retval None + */ +static void RestartWakeupCounter(uint16_t Value) +{ + /** + * The wakeuptimer has been disabled in the calling function to reduce the time to poll the WUTWF + * FLAG when the new value will have to be written + * __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); + */ + + if(Value == 0) + { + SSRValueOnLastSetup = ReadRtcSsrValue(); + + /** + * Simulate that the Timer expired + */ + HAL_NVIC_SetPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); + } + else + { + if((Value > 1) ||(WakeupTimerDivider != 1)) + { + Value -= 1; + } + + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == RESET); + + /** + * make sure to clear the flags after checking the WUTWF. + * It takes 2 RTCCLK between the time the WUTE bit is disabled and the + * time the timer is disabled. The WUTWF bit somehow guarantee the system is stable + * Otherwise, when the timer is periodic with 1 Tick, it may generate an extra interrupt in between + * due to the autoreload feature + */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + + MODIFY_REG(RTC->WUTR, RTC_WUTR_WUT, Value); + + /** + * Update the value here after the WUTWF polling that may take some time + */ + SSRValueOnLastSetup = ReadRtcSsrValue(); + + __HAL_RTC_WAKEUPTIMER_ENABLE(&hrtc); /**< Enable the Wakeup Timer */ + + HW_TS_RTC_CountUpdated_AppNot(); + } + + return ; +} + +/** + * @brief Reschedule the list of timer + * @note 1) Update the count left for each timer in the list + * 2) Setup the wakeuptimer + * @param None + * @retval None + */ +static void RescheduleTimerList(void) +{ + uint8_t localTimerID; + uint32_t timecountleft; + uint16_t wakeup_timer_value; + uint16_t time_elapsed; + + /** + * The wakeuptimer is disabled now to reduce the time to poll the WUTWF + * FLAG when the new value will have to be written + */ + if((READ_BIT(RTC->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) == SET) + { + /** + * Wait for the flag to be back to 0 when the wakeup timer is enabled + */ + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == SET); + } + __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); /**< Disable the Wakeup Timer */ + + localTimerID = CurrentRunningTimerID; + + /** + * Calculate what will be the value to write in the wakeuptimer + */ + timecountleft = aTimerContext[localTimerID].CountLeft; + + /** + * Read how much has been counted + */ + time_elapsed = ReturnTimeElapsed(); + + if(timecountleft < time_elapsed ) + { + /** + * There is no tick left to count + */ + wakeup_timer_value = 0; + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + } + else + { + if(timecountleft > (time_elapsed + MaxWakeupTimerSetup)) + { + /** + * The number of tick left is greater than the Wakeuptimer maximum value + */ + wakeup_timer_value = MaxWakeupTimerSetup; + + WakeupTimerLimitation = WakeupTimerValue_Overpassed; + } + else + { + wakeup_timer_value = timecountleft - time_elapsed; + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + } + + } + + /** + * update ticks left to be counted for each timer + */ + while(localTimerID != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + if (aTimerContext[localTimerID].CountLeft < time_elapsed) + { + aTimerContext[localTimerID].CountLeft = 0; + } + else + { + aTimerContext[localTimerID].CountLeft -= time_elapsed; + } + localTimerID = aTimerContext[localTimerID].NextID; + } + + /** + * Write next count + */ + RestartWakeupCounter(wakeup_timer_value); + + return ; +} + +/* Public functions ----------------------------------------------------------*/ + +/** + * For all public interface except that may need write access to the RTC, the RTC + * shall be unlock at the beginning and locked at the output + * In order to ease maintainability, the unlock is done at the top and the lock at then end + * in case some new implementation is coming in the future + */ + +void HW_TS_RTC_Wakeup_Handler(void) +{ + HW_TS_pTimerCb_t ptimer_callback; + uint32_t timer_process_id; + uint8_t local_current_running_timer_id; +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + +/* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + + /** + * Disable the Wakeup Timer + * This may speed up a bit the processing to wait the timer to be disabled + * The timer is still counting 2 RTCCLK + */ + __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); + + local_current_running_timer_id = CurrentRunningTimerID; + + if(aTimerContext[local_current_running_timer_id].TimerIDStatus == TimerID_Running) + { + ptimer_callback = aTimerContext[local_current_running_timer_id].pTimerCallBack; + timer_process_id = aTimerContext[local_current_running_timer_id].TimerProcessID; + + /** + * It should be good to check whether the TimeElapsed is greater or not than the tick left to be counted + * However, due to the inaccuracy of the reading of the time elapsed, it may return there is 1 tick + * to be left whereas the count is over + * A more secure implementation has been done with a flag to state whereas the full count has been written + * in the wakeuptimer or not + */ + if(WakeupTimerLimitation != WakeupTimerValue_Overpassed) + { + if(aTimerContext[local_current_running_timer_id].TimerMode == hw_ts_Repeated) + { + UnlinkTimer(local_current_running_timer_id, SSR_Read_Not_Requested); +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + HW_TS_Start(local_current_running_timer_id, aTimerContext[local_current_running_timer_id].CounterInit); + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + } + else + { +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + HW_TS_Stop(local_current_running_timer_id); + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + } + + HW_TS_RTC_Int_AppNot(timer_process_id, local_current_running_timer_id, ptimer_callback); + } + else + { + RescheduleTimerList(); +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + } + } + else + { + /** + * We should never end up in this case + * However, if due to any bug in the timer server this is the case, the mistake may not impact the user. + * We could just clean the interrupt flag and get out from this unexpected interrupt + */ + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == RESET); + + /** + * make sure to clear the flags after checking the WUTWF. + * It takes 2 RTCCLK between the time the WUTE bit is disabled and the + * time the timer is disabled. The WUTWF bit somehow guarantee the system is stable + * Otherwise, when the timer is periodic with 1 Tick, it may generate an extra interrupt in between + * due to the autoreload feature + */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE( &hrtc ); + + return; +} + +void HW_TS_Init(HW_TS_InitMode_t TimerInitMode, RTC_HandleTypeDef *phrtc) +{ + uint8_t loop; + uint32_t localmaxwakeuptimersetup; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + + SET_BIT(RTC->CR, RTC_CR_BYPSHAD); + + /** + * Readout the user config + */ + WakeupTimerDivider = (4 - ((uint32_t)(READ_BIT(RTC->CR, RTC_CR_WUCKSEL)))); + + AsynchPrescalerUserConfig = (uint8_t)(READ_BIT(RTC->PRER, RTC_PRER_PREDIV_A) >> (uint32_t)POSITION_VAL(RTC_PRER_PREDIV_A)) + 1; + + SynchPrescalerUserConfig = (uint16_t)(READ_BIT(RTC->PRER, RTC_PRER_PREDIV_S)) + 1; + + /** + * Margin is taken to avoid wrong calculation when the wrap around is there and some + * application interrupts may have delayed the reading + */ + localmaxwakeuptimersetup = ((((SynchPrescalerUserConfig - 1)*AsynchPrescalerUserConfig) - CFG_HW_TS_RTC_HANDLER_MAX_DELAY) >> WakeupTimerDivider); + + if(localmaxwakeuptimersetup >= 0xFFFF) + { + MaxWakeupTimerSetup = 0xFFFF; + } + else + { + MaxWakeupTimerSetup = (uint16_t)localmaxwakeuptimersetup; + } + + /** + * Configure EXTI module + */ + LL_EXTI_EnableRisingTrig_0_31(RTC_EXTI_LINE_WAKEUPTIMER_EVENT); + LL_EXTI_EnableIT_0_31(RTC_EXTI_LINE_WAKEUPTIMER_EVENT); + + if(TimerInitMode == hw_ts_InitMode_Full) + { + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + + /** + * Initialize the timer server + */ + for(loop = 0; loop < CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; loop++) + { + aTimerContext[loop].TimerIDStatus = TimerID_Free; + } + + CurrentRunningTimerID = CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; /**< Set ID to non valid value */ + + __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); /**< Disable the Wakeup Timer */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + __HAL_RTC_WAKEUPTIMER_ENABLE_IT(&hrtc, RTC_IT_WUT); /**< Enable interrupt in RTC module */ + } + else + { + if(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTF) != RESET) + { + /** + * Simulate that the Timer expired + */ + HAL_NVIC_SetPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); + } + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE( &hrtc ); + + HAL_NVIC_SetPriority(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID, CFG_HW_TS_NVIC_RTC_WAKEUP_IT_PREEMPTPRIO, CFG_HW_TS_NVIC_RTC_WAKEUP_IT_SUBPRIO); /**< Set NVIC priority */ + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + + return; +} + +HW_TS_ReturnStatus_t HW_TS_Create(uint32_t TimerProcessID, uint8_t *pTimerId, HW_TS_Mode_t TimerMode, HW_TS_pTimerCb_t pftimeout_handler) +{ + HW_TS_ReturnStatus_t localreturnstatus; + uint8_t loop = 0; +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + while((loop < CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (aTimerContext[loop].TimerIDStatus != TimerID_Free)) + { + loop++; + } + + if(loop != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + aTimerContext[loop].TimerIDStatus = TimerID_Created; + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + aTimerContext[loop].TimerProcessID = TimerProcessID; + aTimerContext[loop].TimerMode = TimerMode; + aTimerContext[loop].pTimerCallBack = pftimeout_handler; + *pTimerId = loop; + + localreturnstatus = hw_ts_Successful; + } + else + { +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + localreturnstatus = hw_ts_Failed; + } + + return(localreturnstatus); +} + +void HW_TS_Delete(uint8_t timer_id) +{ + HW_TS_Stop(timer_id); + + aTimerContext[timer_id].TimerIDStatus = TimerID_Free; /**< release ID */ + + return; +} + +void HW_TS_Stop(uint8_t timer_id) +{ + uint8_t localcurrentrunningtimerid; + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + HAL_NVIC_DisableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Disable NVIC */ + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + + if(aTimerContext[timer_id].TimerIDStatus == TimerID_Running) + { + UnlinkTimer(timer_id, SSR_Read_Requested); + localcurrentrunningtimerid = CurrentRunningTimerID; + + if(localcurrentrunningtimerid == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + { + /** + * List is empty + */ + + /** + * Disable the timer + */ + if((READ_BIT(RTC->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) == SET) + { + /** + * Wait for the flag to be back to 0 when the wakeup timer is enabled + */ + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == SET); + } + __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); /**< Disable the Wakeup Timer */ + + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == RESET); + + /** + * make sure to clear the flags after checking the WUTWF. + * It takes 2 RTCCLK between the time the WUTE bit is disabled and the + * time the timer is disabled. The WUTWF bit somehow guarantee the system is stable + * Otherwise, when the timer is periodic with 1 Tick, it may generate an extra interrupt in between + * due to the autoreload feature + */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + } + else if(PreviousRunningTimerID != localcurrentrunningtimerid) + { + RescheduleTimerList(); + } + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE( &hrtc ); + + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + return; +} + +void HW_TS_Start(uint8_t timer_id, uint32_t timeout_ticks) +{ + uint16_t time_elapsed; + uint8_t localcurrentrunningtimerid; + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + + if(aTimerContext[timer_id].TimerIDStatus == TimerID_Running) + { + HW_TS_Stop( timer_id ); + } + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + HAL_NVIC_DisableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Disable NVIC */ + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + + aTimerContext[timer_id].TimerIDStatus = TimerID_Running; + + aTimerContext[timer_id].CountLeft = timeout_ticks; + aTimerContext[timer_id].CounterInit = timeout_ticks; + + time_elapsed = linkTimer(timer_id); + + localcurrentrunningtimerid = CurrentRunningTimerID; + + if(PreviousRunningTimerID != localcurrentrunningtimerid) + { + RescheduleTimerList(); + } + else + { + aTimerContext[timer_id].CountLeft -= time_elapsed; + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE( &hrtc ); + + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + return; +} + +uint16_t HW_TS_RTC_ReadLeftTicksToCount(void) +{ + uint32_t primask_bit; + uint16_t return_value, auro_reload_value, elapsed_time_value; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + if((READ_BIT(RTC->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) == SET) + { + auro_reload_value = (uint32_t)(READ_BIT(RTC->WUTR, RTC_WUTR_WUT)); + + elapsed_time_value = ReturnTimeElapsed(); + + if(auro_reload_value > elapsed_time_value) + { + return_value = auro_reload_value - elapsed_time_value; + } + else + { + return_value = 0; + } + } + else + { + return_value = TIMER_LIST_EMPTY; + } + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ + + return (return_value); +} + +__weak void HW_TS_RTC_Int_AppNot(uint32_t TimerProcessID, uint8_t TimerID, HW_TS_pTimerCb_t pTimerCallBack) +{ + pTimerCallBack(); + + return; +} diff --git a/firmware/memory_chip_gone/Core/Src/main.c b/firmware/memory_chip_gone/Core/Src/main.c new file mode 100644 index 0000000..f2d3b65 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/main.c @@ -0,0 +1,433 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.c + * @brief : Main program body + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +I2C_HandleTypeDef hi2c1; + +IPCC_HandleTypeDef hipcc; + +RTC_HandleTypeDef hrtc; + +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +void SystemClock_Config(void); +void PeriphCommonClock_Config(void); +static void MX_GPIO_Init(void); +static void MX_I2C1_Init(void); +static void MX_IPCC_Init(void); +static void MX_RTC_Init(void); +static void MX_RF_Init(void); +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/** + * @brief The application entry point. + * @retval int + */ +int main(void) +{ + + /* USER CODE BEGIN 1 */ + + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + /* Config code for STM32_WPAN (HSE Tuning must be done before system clock configuration) */ + MX_APPE_Config(); + + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + + /* Configure the peripherals common clocks */ + PeriphCommonClock_Config(); + + /* IPCC initialisation */ + MX_IPCC_Init(); + + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + MX_I2C1_Init(); + MX_RTC_Init(); + MX_RF_Init(); + /* USER CODE BEGIN 2 */ + + + /* USER CODE END 2 */ + + /* Init code for STM32_WPAN */ + MX_APPE_Init(); + + /* Infinite loop */ + /* USER CODE BEGIN WHILE */ + while (1) + { + /* USER CODE END WHILE */ + MX_APPE_Process(); + + /* USER CODE BEGIN 3 */ + HAL_Delay(5000); + __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); + HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); + } + /* USER CODE END 3 */ +} + +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + + /** Configure LSE Drive Capability + */ + HAL_PWR_EnableBkUpAccess(); + __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_MEDIUMHIGH); + + /** Configure the main internal regulator output voltage + */ + __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_OSCILLATORTYPE_HSE + |RCC_OSCILLATORTYPE_LSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.LSEState = RCC_LSE_ON; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK4|RCC_CLOCKTYPE_HCLK2 + |RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSE; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV16; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.AHBCLK2Divider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.AHBCLK4Divider = RCC_SYSCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) + { + Error_Handler(); + } +} + +/** + * @brief Peripherals Common Clock Configuration + * @retval None + */ +void PeriphCommonClock_Config(void) +{ + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SMPS|RCC_PERIPHCLK_RFWAKEUP; + PeriphClkInitStruct.RFWakeUpClockSelection = RCC_RFWKPCLKSOURCE_HSE_DIV1024; + PeriphClkInitStruct.SmpsClockSelection = RCC_SMPSCLKSOURCE_HSE; + PeriphClkInitStruct.SmpsDivSelection = RCC_SMPSCLKDIV_RANGE0; + + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN Smps */ + + /* USER CODE END Smps */ +} + +/** + * @brief I2C1 Initialization Function + * @param None + * @retval None + */ +static void MX_I2C1_Init(void) +{ + + /* USER CODE BEGIN I2C1_Init 0 */ + + /* USER CODE END I2C1_Init 0 */ + + /* USER CODE BEGIN I2C1_Init 1 */ + + /* USER CODE END I2C1_Init 1 */ + hi2c1.Instance = I2C1; + hi2c1.Init.Timing = 0x00000508; + hi2c1.Init.OwnAddress1 = 0; + hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; + hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; + hi2c1.Init.OwnAddress2 = 0; + hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK; + hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; + hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; + if (HAL_I2C_Init(&hi2c1) != HAL_OK) + { + Error_Handler(); + } + + /** Configure Analogue filter + */ + if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK) + { + Error_Handler(); + } + + /** Configure Digital filter + */ + if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1, 0) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN I2C1_Init 2 */ + + /* USER CODE END I2C1_Init 2 */ + +} + +/** + * @brief IPCC Initialization Function + * @param None + * @retval None + */ +static void MX_IPCC_Init(void) +{ + + /* USER CODE BEGIN IPCC_Init 0 */ + + /* USER CODE END IPCC_Init 0 */ + + /* USER CODE BEGIN IPCC_Init 1 */ + + /* USER CODE END IPCC_Init 1 */ + hipcc.Instance = IPCC; + if (HAL_IPCC_Init(&hipcc) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN IPCC_Init 2 */ + + /* USER CODE END IPCC_Init 2 */ + +} + +/** + * @brief RF Initialization Function + * @param None + * @retval None + */ +static void MX_RF_Init(void) +{ + + /* USER CODE BEGIN RF_Init 0 */ + + /* USER CODE END RF_Init 0 */ + + /* USER CODE BEGIN RF_Init 1 */ + + /* USER CODE END RF_Init 1 */ + /* USER CODE BEGIN RF_Init 2 */ + + /* USER CODE END RF_Init 2 */ + +} + +/** + * @brief RTC Initialization Function + * @param None + * @retval None + */ +static void MX_RTC_Init(void) +{ + + /* USER CODE BEGIN RTC_Init 0 */ + + /* USER CODE END RTC_Init 0 */ + + RTC_TimeTypeDef sTime = {0}; + RTC_DateTypeDef sDate = {0}; + + /* USER CODE BEGIN RTC_Init 1 */ + + /* USER CODE END RTC_Init 1 */ + + /** Initialize RTC Only + */ + hrtc.Instance = RTC; + hrtc.Init.HourFormat = RTC_HOURFORMAT_24; + hrtc.Init.AsynchPrediv = CFG_RTC_ASYNCH_PRESCALER; + hrtc.Init.SynchPrediv = CFG_RTC_SYNCH_PRESCALER; + hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; + hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; + hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; + hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE; + if (HAL_RTC_Init(&hrtc) != HAL_OK) + { + Error_Handler(); + } + + /* USER CODE BEGIN Check_RTC_BKUP */ + + /* USER CODE END Check_RTC_BKUP */ + + /** Initialize RTC and set the Time and Date + */ + sTime.Hours = 0x0; + sTime.Minutes = 0x0; + sTime.Seconds = 0x0; + sTime.SubSeconds = 0x0; + sTime.DayLightSaving = RTC_DAYLIGHTSAVING_NONE; + sTime.StoreOperation = RTC_STOREOPERATION_RESET; + if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK) + { + Error_Handler(); + } + sDate.WeekDay = RTC_WEEKDAY_MONDAY; + sDate.Month = RTC_MONTH_JANUARY; + sDate.Date = 0x1; + sDate.Year = 0x0; + + if (HAL_RTC_SetDate(&hrtc, &sDate, RTC_FORMAT_BCD) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN RTC_Init 2 */ + + /* USER CODE END RTC_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 */ + + /* GPIO Ports Clock Enable */ + __HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOB_CLK_ENABLE(); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOB, GPIO_PIN_4|GPIO_PIN_5, GPIO_PIN_SET); + + /*Configure GPIO pins : PB4 PB5 */ + GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* USER CODE BEGIN MX_GPIO_Init_2 */ + + /* USER CODE END MX_GPIO_Init_2 */ +} + +/* USER CODE BEGIN 4 */ + +/* 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 */ +} +#ifdef USE_FULL_ASSERT +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(uint8_t *file, uint32_t line) +{ + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, + ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + /* USER CODE END 6 */ +} +#endif /* USE_FULL_ASSERT */ diff --git a/firmware/memory_chip_gone/Core/Src/stm32_lpm_if.c b/firmware/memory_chip_gone/Core/Src/stm32_lpm_if.c new file mode 100644 index 0000000..a715daa --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/stm32_lpm_if.c @@ -0,0 +1,347 @@ +/* USER CODE BEGIN Header */ +/** + *************************************************************************************** + * @file stm32_lpm_if.c + * @author MCD Application Team + * @brief Low layer function to enter/exit low power modes (stop, sleep). + *************************************************************************************** + * @attention + * + * Copyright (c) 2026 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 "stm32_lpm_if.h" +#include "stm32_lpm.h" +#include "app_conf.h" +/* USER CODE BEGIN include */ + +/* USER CODE END include */ + +/* Exported variables --------------------------------------------------------*/ +const struct UTIL_LPM_Driver_s UTIL_PowerDriver = +{ + PWR_EnterSleepMode, + PWR_ExitSleepMode, + + PWR_EnterStopMode, + PWR_ExitStopMode, + + PWR_EnterOffMode, + PWR_ExitOffMode, +}; + +/* Private function prototypes -----------------------------------------------*/ +static void Switch_On_HSI(void); +static void EnterLowPower(void); +static void ExitLowPower(void); +/* USER CODE BEGIN Private_Function_Prototypes */ + +/* USER CODE END Private_Function_Prototypes */ +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN Private_Typedef */ + +/* USER CODE END Private_Typedef */ +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Private_Define */ + +/* USER CODE END Private_Define */ +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Private_Macro */ + +/* USER CODE END Private_Macro */ +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN Private_Variables */ + +/* USER CODE END Private_Variables */ + +/* Functions Definition ------------------------------------------------------*/ +/** + * @brief Enters Low Power Off Mode + * @param none + * @retval none + */ +void PWR_EnterOffMode(void) +{ +/* USER CODE BEGIN PWR_EnterOffMode_1 */ + +/* USER CODE END PWR_EnterOffMode_1 */ + /** + * The systick should be disabled for the same reason than when the device enters stop mode because + * at this time, the device may enter either OffMode or StopMode. + */ + HAL_SuspendTick(); + + EnterLowPower(); + + /************************************************************************************ + * ENTER OFF MODE + ***********************************************************************************/ + /* + * There is no risk to clear all the WUF here because in the current implementation, this API is called + * in critical section. If an interrupt occurs while in that critical section before that point, + * the flag is set and will be cleared here but the system will not enter Off Mode + * because an interrupt is pending in the NVIC. The ISR will be executed when moving out + * of this critical section + */ + LL_PWR_ClearFlag_WU(); + + LL_PWR_SetPowerMode(LL_PWR_MODE_STANDBY); + + LL_LPM_EnableDeepSleep(); /**< Set SLEEPDEEP bit of Cortex System Control Register */ + + /** + * This option is used to ensure that store operations are completed + */ +#if defined (__CC_ARM) || defined (__ARMCC_VERSION) + __force_stores(); +#endif + + __WFI(); + +/* USER CODE BEGIN PWR_EnterOffMode_2 */ + +/* USER CODE END PWR_EnterOffMode_2 */ + return; +} + +/** + * @brief Exits Low Power Off Mode + * @param none + * @retval none + */ +void PWR_ExitOffMode(void) +{ +/* USER CODE BEGIN PWR_ExitOffMode_1 */ + +/* USER CODE END PWR_ExitOffMode_1 */ + HAL_ResumeTick(); +/* USER CODE BEGIN PWR_ExitOffMode_2 */ + +/* USER CODE END PWR_ExitOffMode_2 */ + return; +} + +/** + * @brief Enters Low Power Stop Mode + * @note ARM exists the function when waking up + * @param none + * @retval none + */ +void PWR_EnterStopMode(void) +{ +/* USER CODE BEGIN PWR_EnterStopMode_1 */ + +/* USER CODE END PWR_EnterStopMode_1 */ + /** + * When HAL_DBGMCU_EnableDBGStopMode() is called to keep the debugger active in Stop Mode, + * the systick shall be disabled otherwise the cpu may crash when moving out from stop mode + * + * When in production, the HAL_DBGMCU_EnableDBGStopMode() is not called so that the device can reach best power consumption + * However, the systick should be disabled anyway to avoid the case when it is about to expire at the same time the device enters + * stop mode (this will abort the Stop Mode entry). + */ + HAL_SuspendTick(); + + /** + * This function is called from CRITICAL SECTION + */ + EnterLowPower(); + + /************************************************************************************ + * ENTER STOP MODE + ***********************************************************************************/ + LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2); + + LL_LPM_EnableDeepSleep(); /**< Set SLEEPDEEP bit of Cortex System Control Register */ + + /** + * This option is used to ensure that store operations are completed + */ +#if defined (__CC_ARM) || defined (__ARMCC_VERSION) + __force_stores(); +#endif + + __WFI(); + +/* USER CODE BEGIN PWR_EnterStopMode_2 */ + +/* USER CODE END PWR_EnterStopMode_2 */ + return; +} + +/** + * @brief Exits Low Power Stop Mode + * @note Enable the pll at 32MHz + * @param none + * @retval none + */ +void PWR_ExitStopMode(void) +{ +/* USER CODE BEGIN PWR_ExitStopMode_1 */ + +/* USER CODE END PWR_ExitStopMode_1 */ + /** + * This function is called from CRITICAL SECTION + */ + ExitLowPower(); + + HAL_ResumeTick(); +/* USER CODE BEGIN PWR_ExitStopMode_2 */ + +/* USER CODE END PWR_ExitStopMode_2 */ + return; +} + +/** + * @brief Enters Low Power Sleep Mode + * @note ARM exits the function when waking up + * @param none + * @retval none + */ +void PWR_EnterSleepMode(void) +{ +/* USER CODE BEGIN PWR_EnterSleepMode_1 */ + +/* USER CODE END PWR_EnterSleepMode_1 */ + + HAL_SuspendTick(); + + /************************************************************************************ + * ENTER SLEEP MODE + ***********************************************************************************/ + LL_LPM_EnableSleep(); /**< Clear SLEEPDEEP bit of Cortex System Control Register */ + + /** + * This option is used to ensure that store operations are completed + */ +#if defined (__CC_ARM) || defined (__ARMCC_VERSION) + __force_stores(); +#endif + + __WFI(); +/* USER CODE BEGIN PWR_EnterSleepMode_2 */ + +/* USER CODE END PWR_EnterSleepMode_2 */ + return; +} + +/** + * @brief Exits Low Power Sleep Mode + * @note ARM exits the function when waking up + * @param none + * @retval none + */ +void PWR_ExitSleepMode(void) +{ +/* USER CODE BEGIN PWR_ExitSleepMode_1 */ + +/* USER CODE END PWR_ExitSleepMode_1 */ + HAL_ResumeTick(); +/* USER CODE BEGIN PWR_ExitSleepMode_2 */ + +/* USER CODE END PWR_ExitSleepMode_2 */ + return; +} + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +/** + * @brief Setup the system to enter either stop or off mode + * @param none + * @retval none + */ +static void EnterLowPower(void) +{ + /** + * This function is called from CRITICAL SECTION + */ + + while(LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID)); + + if (! LL_HSEM_1StepLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID)) + { + if(LL_PWR_IsActiveFlag_C2DS() || LL_PWR_IsActiveFlag_C2SB()) + { + /* Release ENTRY_STOP_MODE semaphore */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID, 0); + + Switch_On_HSI(); + __HAL_FLASH_SET_LATENCY(FLASH_LATENCY_0); + } + } + else + { + Switch_On_HSI(); + __HAL_FLASH_SET_LATENCY(FLASH_LATENCY_0); + } + + /* Release RCC semaphore */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0); + + return; +} + +/** + * @brief Restore the system to exit stop mode + * @param none + * @retval none + */ +static void ExitLowPower(void) +{ + /* Release ENTRY_STOP_MODE semaphore */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_ENTRY_STOP_MODE_SEMID, 0); + + while(LL_HSEM_1StepLock(HSEM, CFG_HW_RCC_SEMID)); + + if(LL_RCC_GetSysClkSource() == LL_RCC_SYS_CLKSOURCE_STATUS_HSI) + { +/* Restore the clock configuration of the application in this user section */ +/* USER CODE BEGIN ExitLowPower_1 */ + +/* USER CODE END ExitLowPower_1 */ + } + else + { +/* If the application is not running on HSE restore the clock configuration in this user section */ +/* USER CODE BEGIN ExitLowPower_2 */ + +/* USER CODE END ExitLowPower_2 */ + } + + /* Release RCC semaphore */ + LL_HSEM_ReleaseLock(HSEM, CFG_HW_RCC_SEMID, 0); + + return; +} + +/** + * @brief Switch the system clock on HSI + * @param none + * @retval none + */ +static void Switch_On_HSI(void) +{ + LL_RCC_HSI_Enable(); + while(!LL_RCC_HSI_IsReady()); + LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_HSI); + LL_RCC_SetSMPSClockSource(LL_RCC_SMPS_CLKSOURCE_HSI); + while (LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_HSI); + return; +} + +/* USER CODE BEGIN Private_Functions */ + +/* USER CODE END Private_Functions */ + diff --git a/firmware/memory_chip_gone/Core/Src/stm32wbxx_hal_msp.c b/firmware/memory_chip_gone/Core/Src/stm32wbxx_hal_msp.c new file mode 100644 index 0000000..382a1f4 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/stm32wbxx_hal_msp.c @@ -0,0 +1,276 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32wbxx_hal_msp.c + * @brief This file provides code for the MSP Initialization + * and de-Initialization codes. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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" +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN Define */ + +/* USER CODE END Define */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN Macro */ + +/* USER CODE END Macro */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* External functions --------------------------------------------------------*/ +/* USER CODE BEGIN ExternalFunctions */ + +/* USER CODE END ExternalFunctions */ + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ +/** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + __HAL_RCC_HSEM_CLK_ENABLE(); + + /* System interrupt init*/ + + /* Peripheral interrupt init */ + /* HSEM_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(HSEM_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(HSEM_IRQn); + + /* USER CODE BEGIN MspInit 1 */ + + /* USER CODE END MspInit 1 */ +} + +/** + * @brief I2C MSP Initialization + * This function configures the hardware resources used in this example + * @param hi2c: I2C handle pointer + * @retval None + */ +void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + if(hi2c->Instance==I2C1) + { + /* USER CODE BEGIN I2C1_MspInit 0 */ + + /* USER CODE END I2C1_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2C1; + PeriphClkInitStruct.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**I2C1 GPIO Configuration + PB6 ------> I2C1_SCL + PB7 ------> I2C1_SDA + */ + GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7; + GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF4_I2C1; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* Peripheral clock enable */ + __HAL_RCC_I2C1_CLK_ENABLE(); + /* USER CODE BEGIN I2C1_MspInit 1 */ + + /* USER CODE END I2C1_MspInit 1 */ + + } + +} + +/** + * @brief I2C MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hi2c: I2C handle pointer + * @retval None + */ +void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c) +{ + if(hi2c->Instance==I2C1) + { + /* USER CODE BEGIN I2C1_MspDeInit 0 */ + + /* USER CODE END I2C1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_I2C1_CLK_DISABLE(); + + /**I2C1 GPIO Configuration + PB6 ------> I2C1_SCL + PB7 ------> I2C1_SDA + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6); + + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_7); + + /* USER CODE BEGIN I2C1_MspDeInit 1 */ + + /* USER CODE END I2C1_MspDeInit 1 */ + } + +} + +/** + * @brief IPCC MSP Initialization + * This function configures the hardware resources used in this example + * @param hipcc: IPCC handle pointer + * @retval None + */ +void HAL_IPCC_MspInit(IPCC_HandleTypeDef* hipcc) +{ + if(hipcc->Instance==IPCC) + { + /* USER CODE BEGIN IPCC_MspInit 0 */ + + /* USER CODE END IPCC_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_IPCC_CLK_ENABLE(); + /* IPCC interrupt Init */ + HAL_NVIC_SetPriority(IPCC_C1_RX_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn); + HAL_NVIC_SetPriority(IPCC_C1_TX_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(IPCC_C1_TX_IRQn); + /* USER CODE BEGIN IPCC_MspInit 1 */ + + /* USER CODE END IPCC_MspInit 1 */ + + } + +} + +/** + * @brief IPCC MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hipcc: IPCC handle pointer + * @retval None + */ +void HAL_IPCC_MspDeInit(IPCC_HandleTypeDef* hipcc) +{ + if(hipcc->Instance==IPCC) + { + /* USER CODE BEGIN IPCC_MspDeInit 0 */ + + /* USER CODE END IPCC_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_IPCC_CLK_DISABLE(); + + /* IPCC interrupt DeInit */ + HAL_NVIC_DisableIRQ(IPCC_C1_RX_IRQn); + HAL_NVIC_DisableIRQ(IPCC_C1_TX_IRQn); + /* USER CODE BEGIN IPCC_MspDeInit 1 */ + + /* USER CODE END IPCC_MspDeInit 1 */ + } + +} + +/** + * @brief RTC MSP Initialization + * This function configures the hardware resources used in this example + * @param hrtc: RTC handle pointer + * @retval None + */ +void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc) +{ + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + if(hrtc->Instance==RTC) + { + /* USER CODE BEGIN RTC_MspInit 0 */ + + /* USER CODE END RTC_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC; + PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + + /* Peripheral clock enable */ + __HAL_RCC_RTC_ENABLE(); + __HAL_RCC_RTCAPB_CLK_ENABLE(); + /* USER CODE BEGIN RTC_MspInit 1 */ + + /* USER CODE END RTC_MspInit 1 */ + + } + +} + +/** + * @brief RTC MSP De-Initialization + * This function freeze the hardware resources used in this example + * @param hrtc: RTC handle pointer + * @retval None + */ +void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc) +{ + if(hrtc->Instance==RTC) + { + /* USER CODE BEGIN RTC_MspDeInit 0 */ + + /* USER CODE END RTC_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_RTC_DISABLE(); + __HAL_RCC_RTCAPB_CLK_DISABLE(); + /* USER CODE BEGIN RTC_MspDeInit 1 */ + + /* USER CODE END RTC_MspDeInit 1 */ + } + +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/memory_chip_gone/Core/Src/stm32wbxx_it.c b/firmware/memory_chip_gone/Core/Src/stm32wbxx_it.c new file mode 100644 index 0000000..d947843 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/stm32wbxx_it.c @@ -0,0 +1,245 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32wbxx_it.c + * @brief Interrupt Service Routines. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 "stm32wbxx_it.h" +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN TD */ + +/* USER CODE END TD */ + +/* Private define ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Private user code ---------------------------------------------------------*/ +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +/* External variables --------------------------------------------------------*/ +extern IPCC_HandleTypeDef hipcc; +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/******************************************************************************/ +/* Cortex Processor Interruption and Exception Handlers */ +/******************************************************************************/ +/** + * @brief This function handles Non maskable interrupt. + */ +void NMI_Handler(void) +{ + /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ + + /* USER CODE END NonMaskableInt_IRQn 0 */ + /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ + while (1) + { + } + /* USER CODE END NonMaskableInt_IRQn 1 */ +} + +/** + * @brief This function handles Hard fault interrupt. + */ +void HardFault_Handler(void) +{ + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_HardFault_IRQn 0 */ + /* USER CODE END W1_HardFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Memory management fault. + */ +void MemManage_Handler(void) +{ + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */ + /* USER CODE END W1_MemoryManagement_IRQn 0 */ + } +} + +/** + * @brief This function handles Prefetch fault, memory access fault. + */ +void BusFault_Handler(void) +{ + /* USER CODE BEGIN BusFault_IRQn 0 */ + + /* USER CODE END BusFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_BusFault_IRQn 0 */ + /* USER CODE END W1_BusFault_IRQn 0 */ + } +} + +/** + * @brief This function handles Undefined instruction or illegal state. + */ +void UsageFault_Handler(void) +{ + /* USER CODE BEGIN UsageFault_IRQn 0 */ + + /* USER CODE END UsageFault_IRQn 0 */ + while (1) + { + /* USER CODE BEGIN W1_UsageFault_IRQn 0 */ + /* USER CODE END W1_UsageFault_IRQn 0 */ + } +} + +/** + * @brief This function handles System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + /* USER CODE BEGIN SVCall_IRQn 0 */ + + /* USER CODE END SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 1 */ + + /* USER CODE END SVCall_IRQn 1 */ +} + +/** + * @brief This function handles Debug monitor. + */ +void DebugMon_Handler(void) +{ + /* USER CODE BEGIN DebugMonitor_IRQn 0 */ + + /* USER CODE END DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 1 */ + + /* USER CODE END DebugMonitor_IRQn 1 */ +} + +/** + * @brief This function handles Pendable request for system service. + */ +void PendSV_Handler(void) +{ + /* USER CODE BEGIN PendSV_IRQn 0 */ + + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ + + /* USER CODE END PendSV_IRQn 1 */ +} + +/** + * @brief This function handles System tick timer. + */ +void SysTick_Handler(void) +{ + /* USER CODE BEGIN SysTick_IRQn 0 */ + + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + +/******************************************************************************/ +/* STM32WBxx Peripheral Interrupt Handlers */ +/* Add here the Interrupt Handlers for the used peripherals. */ +/* For the available peripheral interrupt handler names, */ +/* please refer to the startup file (startup_stm32wbxx.s). */ +/******************************************************************************/ + +/** + * @brief This function handles IPCC RX occupied interrupt. + */ +void IPCC_C1_RX_IRQHandler(void) +{ + /* USER CODE BEGIN IPCC_C1_RX_IRQn 0 */ + + /* USER CODE END IPCC_C1_RX_IRQn 0 */ + HAL_IPCC_RX_IRQHandler(&hipcc); + /* USER CODE BEGIN IPCC_C1_RX_IRQn 1 */ + + /* USER CODE END IPCC_C1_RX_IRQn 1 */ +} + +/** + * @brief This function handles IPCC TX free interrupt. + */ +void IPCC_C1_TX_IRQHandler(void) +{ + /* USER CODE BEGIN IPCC_C1_TX_IRQn 0 */ + + /* USER CODE END IPCC_C1_TX_IRQn 0 */ + HAL_IPCC_TX_IRQHandler(&hipcc); + /* USER CODE BEGIN IPCC_C1_TX_IRQn 1 */ + + /* USER CODE END IPCC_C1_TX_IRQn 1 */ +} + +/** + * @brief This function handles HSEM global interrupt. + */ +void HSEM_IRQHandler(void) +{ + /* USER CODE BEGIN HSEM_IRQn 0 */ + + /* USER CODE END HSEM_IRQn 0 */ + HAL_HSEM_IRQHandler(); + /* USER CODE BEGIN HSEM_IRQn 1 */ + + /* USER CODE END HSEM_IRQn 1 */ +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ diff --git a/firmware/memory_chip_gone/Core/Src/syscalls.c b/firmware/memory_chip_gone/Core/Src/syscalls.c new file mode 100644 index 0000000..8884b5a --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/syscalls.c @@ -0,0 +1,176 @@ +/** + ****************************************************************************** + * @file syscalls.c + * @author Auto-generated by STM32CubeIDE + * @brief STM32CubeIDE Minimal System calls file + * + * For more information about which c-functions + * need which of these lowlevel functions + * please consult the Newlib libc-manual + ****************************************************************************** + * @attention + * + * Copyright (c) 2020-2025 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. + * + ****************************************************************************** + */ + +/* Includes */ +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Variables */ +extern int __io_putchar(int ch) __attribute__((weak)); +extern int __io_getchar(void) __attribute__((weak)); + + +char *__env[1] = { 0 }; +char **environ = __env; + + +/* Functions */ +void initialise_monitor_handles() +{ +} + +int _getpid(void) +{ + return 1; +} + +int _kill(int pid, int sig) +{ + (void)pid; + (void)sig; + errno = EINVAL; + return -1; +} + +void _exit (int status) +{ + _kill(status, -1); + while (1) {} /* Make sure we hang here */ +} + +__attribute__((weak)) int _read(int file, char *ptr, int len) +{ + (void)file; + int DataIdx; + + for (DataIdx = 0; DataIdx < len; DataIdx++) + { + *ptr++ = __io_getchar(); + } + + return len; +} + +__attribute__((weak)) int _write(int file, char *ptr, int len) +{ + (void)file; + int DataIdx; + + for (DataIdx = 0; DataIdx < len; DataIdx++) + { + __io_putchar(*ptr++); + } + return len; +} + +int _close(int file) +{ + (void)file; + return -1; +} + + +int _fstat(int file, struct stat *st) +{ + (void)file; + st->st_mode = S_IFCHR; + return 0; +} + +int _isatty(int file) +{ + (void)file; + return 1; +} + +int _lseek(int file, int ptr, int dir) +{ + (void)file; + (void)ptr; + (void)dir; + return 0; +} + +int _open(char *path, int flags, ...) +{ + (void)path; + (void)flags; + /* Pretend like we always fail */ + return -1; +} + +int _wait(int *status) +{ + (void)status; + errno = ECHILD; + return -1; +} + +int _unlink(char *name) +{ + (void)name; + errno = ENOENT; + return -1; +} + +int _times(struct tms *buf) +{ + (void)buf; + return -1; +} + +int _stat(char *file, struct stat *st) +{ + (void)file; + st->st_mode = S_IFCHR; + return 0; +} + +int _link(char *old, char *new) +{ + (void)old; + (void)new; + errno = EMLINK; + return -1; +} + +int _fork(void) +{ + errno = EAGAIN; + return -1; +} + +int _execve(char *name, char **argv, char **env) +{ + (void)name; + (void)argv; + (void)env; + errno = ENOMEM; + return -1; +} diff --git a/firmware/memory_chip_gone/Core/Src/sysmem.c b/firmware/memory_chip_gone/Core/Src/sysmem.c new file mode 100644 index 0000000..5d9f7e6 --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/sysmem.c @@ -0,0 +1,79 @@ +/** + ****************************************************************************** + * @file sysmem.c + * @author Generated by STM32CubeIDE + * @brief STM32CubeIDE System Memory calls file + * + * For more information about which C functions + * need which of these lowlevel functions + * please consult the newlib libc manual + ****************************************************************************** + * @attention + * + * Copyright (c) 2025 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. + * + ****************************************************************************** + */ + +/* Includes */ +#include +#include + +/** + * Pointer to the current high watermark of the heap usage + */ +static uint8_t *__sbrk_heap_end = NULL; + +/** + * @brief _sbrk() allocates memory to the newlib heap and is used by malloc + * and others from the C library + * + * @verbatim + * ############################################################################ + * # .data # .bss # newlib heap # MSP stack # + * # # # # Reserved by _Min_Stack_Size # + * ############################################################################ + * ^-- RAM start ^-- _end _estack, RAM end --^ + * @endverbatim + * + * This implementation starts allocating at the '_end' linker symbol + * The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack + * The implementation considers '_estack' linker symbol to be RAM end + * NOTE: If the MSP stack, at any point during execution, grows larger than the + * reserved size, please increase the '_Min_Stack_Size'. + * + * @param incr Memory size + * @return Pointer to allocated memory + */ +void *_sbrk(ptrdiff_t incr) +{ + extern uint8_t _end; /* Symbol defined in the linker script */ + extern uint8_t _estack; /* Symbol defined in the linker script */ + extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */ + const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size; + const uint8_t *max_heap = (uint8_t *)stack_limit; + uint8_t *prev_heap_end; + + /* Initialize heap end at first call */ + if (NULL == __sbrk_heap_end) + { + __sbrk_heap_end = &_end; + } + + /* Protect heap from growing into the reserved MSP stack */ + if (__sbrk_heap_end + incr > max_heap) + { + errno = ENOMEM; + return (void *)-1; + } + + prev_heap_end = __sbrk_heap_end; + __sbrk_heap_end += incr; + + return (void *)prev_heap_end; +} diff --git a/firmware/memory_chip_gone/Core/Src/system_stm32wbxx.c b/firmware/memory_chip_gone/Core/Src/system_stm32wbxx.c new file mode 100644 index 0000000..57f6a4e --- /dev/null +++ b/firmware/memory_chip_gone/Core/Src/system_stm32wbxx.c @@ -0,0 +1,378 @@ +/** + ****************************************************************************** + * @file system_stm32wbxx.c + * @author MCD Application Team + * @brief CMSIS Cortex Device Peripheral Access Layer System Source File + * + * This file provides two functions and one global variable to be called from + * user application: + * - SystemInit(): This function is called at startup just after reset and + * before branch to main program. This call is made inside + * the "startup_stm32wbxx.s" file. + * + * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used + * by the user application to setup the SysTick + * timer or configure other parameters. + * + * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must + * be called whenever the core clock is changed + * during program execution. + * + * After each device reset the MSI (4 MHz) is used as system clock source. + * Then SystemInit() function is called, in "startup_stm32wbxx.s" file, to + * configure the system clock before to branch to main program. + * + * This file configures the system clock as follows: + *============================================================================= + *----------------------------------------------------------------------------- + * System Clock source | MSI + *----------------------------------------------------------------------------- + * SYSCLK(Hz) | 4000000 + *----------------------------------------------------------------------------- + * HCLK(Hz) | 4000000 + *----------------------------------------------------------------------------- + * AHB Prescaler | 1 + *----------------------------------------------------------------------------- + * APB1 Prescaler | 1 + *----------------------------------------------------------------------------- + * APB2 Prescaler | 1 + *----------------------------------------------------------------------------- + * PLL_M | 1 + *----------------------------------------------------------------------------- + * PLL_N | 8 + *----------------------------------------------------------------------------- + * PLL_P | 7 + *----------------------------------------------------------------------------- + * PLL_Q | 2 + *----------------------------------------------------------------------------- + * PLL_R | 2 + *----------------------------------------------------------------------------- + * PLLSAI1_P | NA + *----------------------------------------------------------------------------- + * PLLSAI1_Q | NA + *----------------------------------------------------------------------------- + * PLLSAI1_R | NA + *----------------------------------------------------------------------------- + * Require 48MHz for USB OTG FS, | Disabled + * SDIO and RNG clock | + *----------------------------------------------------------------------------- + *============================================================================= + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2021 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. + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS + * @{ + */ + +/** @addtogroup stm32WBxx_system + * @{ + */ + +/** @addtogroup stm32WBxx_System_Private_Includes + * @{ + */ + +#include "stm32wbxx.h" + +#if !defined (HSE_VALUE) +#define HSE_VALUE (32000000UL) /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (MSI_VALUE) +#define MSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/ +#endif /* MSI_VALUE */ + +#if !defined (HSI_VALUE) +#define HSI_VALUE (16000000UL) /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +#if !defined (LSI_VALUE) +#define LSI_VALUE (32000UL) /*!< Value of LSI in Hz*/ +#endif /* LSI_VALUE */ + +#if !defined (LSE_VALUE) +#if defined(STM32WB5Mxx) + #define LSE_VALUE 32774U /*!< Value of the LSE oscillator in Hz */ +#else + #define LSE_VALUE 32768U /*!< Value of the LSE oscillator in Hz */ +#endif /* STM32WB5Mxx */ +#endif /* LSE_VALUE */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_TypesDefinitions + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_Defines + * @{ + */ + +/* Note: Following vector table addresses must be defined in line with linker + configuration. */ +/*!< Uncomment the following line if you need to relocate CPU1 CM4 and/or CPU2 + CM0+ vector table anywhere in Sram or Flash. Else vector table will be kept + at address 0x00 which correspond to automatic remap of boot address selected */ +/* #define USER_VECT_TAB_ADDRESS */ +#if defined(USER_VECT_TAB_ADDRESS) +/*!< Uncomment this line for user vector table remap in Sram else user remap + will be done in Flash. */ +/* #define VECT_TAB_SRAM */ +#if defined(VECT_TAB_SRAM) +#define VECT_TAB_BASE_ADDRESS SRAM1_BASE /*!< Vector Table base address field. + This value must be a multiple of 0x200. */ +#if !defined(VECT_TAB_OFFSET) +#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table offset field. + This value must be a multiple of 0x200. */ +#endif /* VECT_TAB_OFFSET */ + +#else +#define VECT_TAB_BASE_ADDRESS FLASH_BASE /*!< Vector Table base address field. + This value must be a multiple of 0x200. */ +#if !defined(VECT_TAB_OFFSET) +#define VECT_TAB_OFFSET 0x00000000U /*!< Vector Table offset field. + This value must be a multiple of 0x200. */ +#endif /* VECT_TAB_OFFSET */ + +#endif /* VECT_TAB_SRAM */ +#endif /* USER_VECT_TAB_ADDRESS */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_Variables + * @{ + */ +/* The SystemCoreClock variable is updated in three ways: + 1) by calling CMSIS function SystemCoreClockUpdate() + 2) by calling HAL API function HAL_RCC_GetHCLKFreq() + 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency + Note: If you use this function to configure the system clock; then there + is no need to call the 2 first functions listed above, since SystemCoreClock + variable is updated automatically. +*/ +uint32_t SystemCoreClock = 4000000UL ; /*CPU1: M4 on MSI clock after startup (4MHz)*/ + +const uint32_t AHBPrescTable[16UL] = {1UL, 3UL, 5UL, 1UL, 1UL, 6UL, 10UL, 32UL, 2UL, 4UL, 8UL, 16UL, 64UL, 128UL, 256UL, 512UL}; + +const uint32_t APBPrescTable[8UL] = {0UL, 0UL, 0UL, 0UL, 1UL, 2UL, 3UL, 4UL}; + +const uint32_t MSIRangeTable[16UL] = {100000UL, 200000UL, 400000UL, 800000UL, 1000000UL, 2000000UL, \ + 4000000UL, 8000000UL, 16000000UL, 24000000UL, 32000000UL, 48000000UL, 0UL, 0UL, 0UL, 0UL + }; /* 0UL values are incorrect cases */ + +#if defined(STM32WB55xx) || defined(STM32WB5Mxx) || defined(STM32WB35xx) || defined (STM32WB15xx) || defined (STM32WB1Mxx) +const uint32_t SmpsPrescalerTable[4UL][6UL] = {{1UL, 3UL, 2UL, 2UL, 1UL, 2UL}, \ + {2UL, 6UL, 4UL, 3UL, 2UL, 4UL}, \ + {4UL, 12UL, 8UL, 6UL, 4UL, 8UL}, \ + {4UL, 12UL, 8UL, 6UL, 4UL, 8UL} +}; +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx || STM32WB15xx || STM32WB1Mxx */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_FunctionPrototypes + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Private_Functions + * @{ + */ + +/** + * @brief Setup the microcontroller system. + * @param None + * @retval None + */ +void SystemInit(void) +{ +#if defined(USER_VECT_TAB_ADDRESS) + /* Configure the Vector Table location add offset address ------------------*/ + SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; +#endif /* USER_VECT_TAB_ADDRESS */ + + /* FPU settings ------------------------------------------------------------*/ +#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) + SCB->CPACR |= ((3UL << (10UL * 2UL)) | (3UL << (11UL * 2UL))); /* set CP10 and CP11 Full Access */ +#endif /* FPU */ + + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set MSION bit */ + RCC->CR |= RCC_CR_MSION; + + /* Reset CFGR register */ + RCC->CFGR = 0x00070000U; + + /* Reset PLLSAI1ON, PLLON, HSECSSON, HSEON, HSION, and MSIPLLON bits */ + RCC->CR &= (uint32_t)0xFAF6FEFBU; + + /*!< Reset LSI1 and LSI2 bits */ + RCC->CSR &= (uint32_t)0xFFFFFFFAU; + + /*!< Reset HSI48ON bit */ + RCC->CRRCR &= (uint32_t)0xFFFFFFFEU; + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x22041000U; + +#if defined(STM32WB55xx) || defined(STM32WB5Mxx) + /* Reset PLLSAI1CFGR register */ + RCC->PLLSAI1CFGR = 0x22041000U; +#endif /* STM32WB55xx || STM32WB5Mxx */ + + /* Reset HSEBYP bit */ + RCC->CR &= 0xFFFBFFFFU; + + /* Disable all interrupts */ + RCC->CIER = 0x00000000; +} + +/** + * @brief Update SystemCoreClock variable according to Clock Register Values. + * The SystemCoreClock variable contains the core clock (HCLK), it can + * be used by the user application to setup the SysTick timer or configure + * other parameters. + * + * @note Each time the core clock (HCLK) changes, this function must be called + * to update SystemCoreClock variable value. Otherwise, any configuration + * based on this variable will be incorrect. + * + * @note - The system frequency computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * + * - If SYSCLK source is MSI, SystemCoreClock will contain the MSI_VALUE(*) + * + * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**) + * + * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***) + * + * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***) + * or HSI_VALUE(*) or MSI_VALUE(*) multiplied/divided by the PLL factors. + * + * (*) MSI_VALUE is a constant defined in stm32wbxx_hal.h file (default value + * 4 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (**) HSI_VALUE is a constant defined in stm32wbxx_hal_conf.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * + * (***) HSE_VALUE is a constant defined in stm32wbxx_hal_conf.h file (default value + * 32 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * - The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @param None + * @retval None + */ +void SystemCoreClockUpdate(void) +{ + uint32_t tmp, msirange, pllvco, pllr, pllsource, pllm; + + /* Get MSI Range frequency--------------------------------------------------*/ + + /*MSI frequency range in Hz*/ + msirange = MSIRangeTable[(RCC->CR & RCC_CR_MSIRANGE) >> RCC_CR_MSIRANGE_Pos]; + + /* Get SYSCLK source -------------------------------------------------------*/ + switch (RCC->CFGR & RCC_CFGR_SWS) + { + case 0x00: /* MSI used as system clock source */ + SystemCoreClock = msirange; + break; + + case 0x04: /* HSI used as system clock source */ + /* HSI used as system clock source */ + SystemCoreClock = HSI_VALUE; + break; + + case 0x08: /* HSE used as system clock source */ + SystemCoreClock = HSE_VALUE; + break; + + case 0x0C: /* PLL used as system clock source */ + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI_VALUE/ PLLM) * PLLN + SYSCLK = PLL_VCO / PLLR + */ + pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC); + pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> RCC_PLLCFGR_PLLM_Pos) + 1UL ; + + if (pllsource == 0x02UL) /* HSI used as PLL clock source */ + { + pllvco = (HSI_VALUE / pllm); + } + else if (pllsource == 0x03UL) /* HSE used as PLL clock source */ + { + pllvco = (HSE_VALUE / pllm); + } + else /* MSI used as PLL clock source */ + { + pllvco = (msirange / pllm); + } + + pllvco = pllvco * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos); + pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> RCC_PLLCFGR_PLLR_Pos) + 1UL); + + SystemCoreClock = pllvco / pllr; + break; + + default: + SystemCoreClock = msirange; + break; + } + + /* Compute HCLK clock frequency --------------------------------------------*/ + /* Get HCLK1 prescaler */ + tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos)]; + + /* HCLK clock frequency */ + SystemCoreClock = SystemCoreClock / tmp; +} + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Core/Startup/startup_stm32wb55cgux.s b/firmware/memory_chip_gone/Core/Startup/startup_stm32wb55cgux.s new file mode 100644 index 0000000..8f391be --- /dev/null +++ b/firmware/memory_chip_gone/Core/Startup/startup_stm32wb55cgux.s @@ -0,0 +1,447 @@ +/** + ****************************************************************************** + * @file startup_stm32wb55xx_cm4.s + * @author MCD Application Team + * @brief STM32WB55xx devices vector table GCC toolchain. + * This module performs: + * - Set the initial SP + * - Set the initial PC == Reset_Handler, + * - Set the vector table entries with the exceptions ISR address + * - Branches to main in the C library (which eventually + * calls main()). + * After Reset the Cortex-M4 processor is in Thread mode, + * priority is Privileged, and the Stack is set to Main. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2022 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. + * + ****************************************************************************** + */ + + .syntax unified + .cpu cortex-m4 + .fpu softvfp + .thumb + +.global g_pfnVectors +.global Default_Handler + +/* start address for the initialization values of the .data section. +defined in linker script */ +.word _sidata +/* start address for the .data section. defined in linker script */ +.word _sdata +/* end address for the .data section. defined in linker script */ +.word _edata +/* start address for the .bss section. defined in linker script */ +.word _sbss +/* end address for the .bss section. defined in linker script */ +.word _ebss +/* start address for the initialization values of the .MB_MEM2 section. +defined in linker script */ +.word _siMB_MEM2 +/* start address for the .MB_MEM2 section. defined in linker script */ +.word _sMB_MEM2 +/* end address for the .MB_MEM2 section. defined in linker script */ +.word _eMB_MEM2 + +/* INIT_BSS macro is used to fill the specified region [start : end] with zeros */ +.macro INIT_BSS start, end + ldr r0, =\start + ldr r1, =\end + movs r3, #0 + bl LoopFillZerobss +.endm + +/* INIT_DATA macro is used to copy data in the region [start : end] starting from 'src' */ +.macro INIT_DATA start, end, src + ldr r0, =\start + ldr r1, =\end + ldr r2, =\src + movs r3, #0 + bl LoopCopyDataInit +.endm + +.section .text.data_initializers +CopyDataInit: + ldr r4, [r2, r3] + str r4, [r0, r3] + adds r3, r3, #4 + +LoopCopyDataInit: + adds r4, r0, r3 + cmp r4, r1 + bcc CopyDataInit + bx lr + +FillZerobss: + str r3, [r0] + adds r0, r0, #4 + +LoopFillZerobss: + cmp r0, r1 + bcc FillZerobss + bx lr + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr r0, =_estack + mov sp, r0 /* set stack pointer */ +/* Call the clock system initialization function.*/ + bl SystemInit + +/* Copy the data segment initializers from flash to SRAM */ + INIT_DATA _sdata, _edata, _sidata + INIT_DATA _sMB_MEM2, _eMB_MEM2, _siMB_MEM2 + +/* Zero fill the bss segments. */ + INIT_BSS _sbss, _ebss + +/* Call static constructors */ + bl __libc_init_array +/* Call the application s entry point.*/ + bl main + +LoopForever: + b LoopForever + +.size Reset_Handler, .-Reset_Handler + +/** + * @brief This is the code that gets called when the processor receives an + * unexpected interrupt. This simply enters an infinite loop, preserving + * the system state for examination by a debugger. + * + * @param None + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + .size Default_Handler, .-Default_Handler +/****************************************************************************** +* +* The minimal vector table for a Cortex-M4. Note that the proper constructs +* must be placed on this to ensure that it ends up at physical address +* 0x0000.0000. +* +******************************************************************************/ + .section .isr_vector,"a",%progbits + .type g_pfnVectors, %object + + +g_pfnVectors: + .word _estack + .word Reset_Handler + .word NMI_Handler + .word HardFault_Handler + .word MemManage_Handler + .word BusFault_Handler + .word UsageFault_Handler + .word 0 + .word 0 + .word 0 + .word 0 + .word SVC_Handler + .word DebugMon_Handler + .word 0 + .word PendSV_Handler + .word SysTick_Handler + .word WWDG_IRQHandler + .word PVD_PVM_IRQHandler + .word TAMP_STAMP_LSECSS_IRQHandler + .word RTC_WKUP_IRQHandler + .word FLASH_IRQHandler + .word RCC_IRQHandler + .word EXTI0_IRQHandler + .word EXTI1_IRQHandler + .word EXTI2_IRQHandler + .word EXTI3_IRQHandler + .word EXTI4_IRQHandler + .word DMA1_Channel1_IRQHandler + .word DMA1_Channel2_IRQHandler + .word DMA1_Channel3_IRQHandler + .word DMA1_Channel4_IRQHandler + .word DMA1_Channel5_IRQHandler + .word DMA1_Channel6_IRQHandler + .word DMA1_Channel7_IRQHandler + .word ADC1_IRQHandler + .word USB_HP_IRQHandler + .word USB_LP_IRQHandler + .word C2SEV_PWR_C2H_IRQHandler + .word COMP_IRQHandler + .word EXTI9_5_IRQHandler + .word TIM1_BRK_IRQHandler + .word TIM1_UP_TIM16_IRQHandler + .word TIM1_TRG_COM_TIM17_IRQHandler + .word TIM1_CC_IRQHandler + .word TIM2_IRQHandler + .word PKA_IRQHandler + .word I2C1_EV_IRQHandler + .word I2C1_ER_IRQHandler + .word I2C3_EV_IRQHandler + .word I2C3_ER_IRQHandler + .word SPI1_IRQHandler + .word SPI2_IRQHandler + .word USART1_IRQHandler + .word LPUART1_IRQHandler + .word SAI1_IRQHandler + .word TSC_IRQHandler + .word EXTI15_10_IRQHandler + .word RTC_Alarm_IRQHandler + .word CRS_IRQHandler + .word PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler + .word IPCC_C1_RX_IRQHandler + .word IPCC_C1_TX_IRQHandler + .word HSEM_IRQHandler + .word LPTIM1_IRQHandler + .word LPTIM2_IRQHandler + .word LCD_IRQHandler + .word QUADSPI_IRQHandler + .word AES1_IRQHandler + .word AES2_IRQHandler + .word RNG_IRQHandler + .word FPU_IRQHandler + .word DMA2_Channel1_IRQHandler + .word DMA2_Channel2_IRQHandler + .word DMA2_Channel3_IRQHandler + .word DMA2_Channel4_IRQHandler + .word DMA2_Channel5_IRQHandler + .word DMA2_Channel6_IRQHandler + .word DMA2_Channel7_IRQHandler + .word DMAMUX1_OVR_IRQHandler + + .size g_pfnVectors, .-g_pfnVectors + +/******************************************************************************* +* +* Provide weak aliases for each Exception handler to the Default_Handler. +* As they are weak aliases, any function with the same name will override +* this definition. +* +*******************************************************************************/ + .weak NMI_Handler + .thumb_set NMI_Handler,Default_Handler + + .weak HardFault_Handler + .thumb_set HardFault_Handler,Default_Handler + + .weak MemManage_Handler + .thumb_set MemManage_Handler,Default_Handler + + .weak BusFault_Handler + .thumb_set BusFault_Handler,Default_Handler + + .weak UsageFault_Handler + .thumb_set UsageFault_Handler,Default_Handler + + .weak SVC_Handler + .thumb_set SVC_Handler,Default_Handler + + .weak DebugMon_Handler + .thumb_set DebugMon_Handler,Default_Handler + + .weak PendSV_Handler + .thumb_set PendSV_Handler,Default_Handler + + .weak SysTick_Handler + .thumb_set SysTick_Handler,Default_Handler + + .weak WWDG_IRQHandler + .thumb_set WWDG_IRQHandler,Default_Handler + + .weak PVD_PVM_IRQHandler + .thumb_set PVD_PVM_IRQHandler,Default_Handler + + .weak TAMP_STAMP_LSECSS_IRQHandler + .thumb_set TAMP_STAMP_LSECSS_IRQHandler,Default_Handler + + .weak RTC_WKUP_IRQHandler + .thumb_set RTC_WKUP_IRQHandler,Default_Handler + + .weak FLASH_IRQHandler + .thumb_set FLASH_IRQHandler,Default_Handler + + .weak RCC_IRQHandler + .thumb_set RCC_IRQHandler,Default_Handler + + .weak EXTI0_IRQHandler + .thumb_set EXTI0_IRQHandler,Default_Handler + + .weak EXTI1_IRQHandler + .thumb_set EXTI1_IRQHandler,Default_Handler + + .weak EXTI2_IRQHandler + .thumb_set EXTI2_IRQHandler,Default_Handler + + .weak EXTI3_IRQHandler + .thumb_set EXTI3_IRQHandler,Default_Handler + + .weak EXTI4_IRQHandler + .thumb_set EXTI4_IRQHandler,Default_Handler + + .weak DMA1_Channel1_IRQHandler + .thumb_set DMA1_Channel1_IRQHandler,Default_Handler + + .weak DMA1_Channel2_IRQHandler + .thumb_set DMA1_Channel2_IRQHandler,Default_Handler + + .weak DMA1_Channel3_IRQHandler + .thumb_set DMA1_Channel3_IRQHandler,Default_Handler + + .weak DMA1_Channel4_IRQHandler + .thumb_set DMA1_Channel4_IRQHandler,Default_Handler + + .weak DMA1_Channel5_IRQHandler + .thumb_set DMA1_Channel5_IRQHandler,Default_Handler + + .weak DMA1_Channel6_IRQHandler + .thumb_set DMA1_Channel6_IRQHandler,Default_Handler + + .weak DMA1_Channel7_IRQHandler + .thumb_set DMA1_Channel7_IRQHandler,Default_Handler + + .weak ADC1_IRQHandler + .thumb_set ADC1_IRQHandler,Default_Handler + + .weak USB_HP_IRQHandler + .thumb_set USB_HP_IRQHandler,Default_Handler + + .weak USB_LP_IRQHandler + .thumb_set USB_LP_IRQHandler,Default_Handler + + .weak C2SEV_PWR_C2H_IRQHandler + .thumb_set C2SEV_PWR_C2H_IRQHandler,Default_Handler + + .weak COMP_IRQHandler + .thumb_set COMP_IRQHandler,Default_Handler + + .weak EXTI9_5_IRQHandler + .thumb_set EXTI9_5_IRQHandler,Default_Handler + + .weak TIM1_BRK_IRQHandler + .thumb_set TIM1_BRK_IRQHandler,Default_Handler + + .weak TIM1_UP_TIM16_IRQHandler + .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler + + .weak TIM1_TRG_COM_TIM17_IRQHandler + .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler + + .weak TIM1_CC_IRQHandler + .thumb_set TIM1_CC_IRQHandler,Default_Handler + + .weak TIM2_IRQHandler + .thumb_set TIM2_IRQHandler,Default_Handler + + .weak PKA_IRQHandler + .thumb_set PKA_IRQHandler,Default_Handler + + .weak I2C1_EV_IRQHandler + .thumb_set I2C1_EV_IRQHandler,Default_Handler + + .weak I2C1_ER_IRQHandler + .thumb_set I2C1_ER_IRQHandler,Default_Handler + + .weak I2C3_EV_IRQHandler + .thumb_set I2C3_EV_IRQHandler,Default_Handler + + .weak I2C3_ER_IRQHandler + .thumb_set I2C3_ER_IRQHandler,Default_Handler + + .weak SPI1_IRQHandler + .thumb_set SPI1_IRQHandler,Default_Handler + + .weak SPI2_IRQHandler + .thumb_set SPI2_IRQHandler,Default_Handler + + .weak USART1_IRQHandler + .thumb_set USART1_IRQHandler,Default_Handler + + .weak LPUART1_IRQHandler + .thumb_set LPUART1_IRQHandler,Default_Handler + + .weak SAI1_IRQHandler + .thumb_set SAI1_IRQHandler,Default_Handler + + .weak TSC_IRQHandler + .thumb_set TSC_IRQHandler,Default_Handler + + .weak EXTI15_10_IRQHandler + .thumb_set EXTI15_10_IRQHandler,Default_Handler + + .weak RTC_Alarm_IRQHandler + .thumb_set RTC_Alarm_IRQHandler,Default_Handler + + .weak CRS_IRQHandler + .thumb_set CRS_IRQHandler,Default_Handler + + .weak PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler + .thumb_set PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler,Default_Handler + + .weak IPCC_C1_RX_IRQHandler + .thumb_set IPCC_C1_RX_IRQHandler,Default_Handler + + .weak IPCC_C1_TX_IRQHandler + .thumb_set IPCC_C1_TX_IRQHandler,Default_Handler + + .weak HSEM_IRQHandler + .thumb_set HSEM_IRQHandler,Default_Handler + + .weak LPTIM1_IRQHandler + .thumb_set LPTIM1_IRQHandler,Default_Handler + + .weak LPTIM2_IRQHandler + .thumb_set LPTIM2_IRQHandler,Default_Handler + + .weak LCD_IRQHandler + .thumb_set LCD_IRQHandler,Default_Handler + + .weak QUADSPI_IRQHandler + .thumb_set QUADSPI_IRQHandler,Default_Handler + + .weak AES1_IRQHandler + .thumb_set AES1_IRQHandler,Default_Handler + + .weak AES2_IRQHandler + .thumb_set AES2_IRQHandler,Default_Handler + + .weak RNG_IRQHandler + .thumb_set RNG_IRQHandler,Default_Handler + + .weak FPU_IRQHandler + .thumb_set FPU_IRQHandler,Default_Handler + + .weak DMA2_Channel1_IRQHandler + .thumb_set DMA2_Channel1_IRQHandler,Default_Handler + + .weak DMA2_Channel2_IRQHandler + .thumb_set DMA2_Channel2_IRQHandler,Default_Handler + + .weak DMA2_Channel3_IRQHandler + .thumb_set DMA2_Channel3_IRQHandler,Default_Handler + + .weak DMA2_Channel4_IRQHandler + .thumb_set DMA2_Channel4_IRQHandler,Default_Handler + + .weak DMA2_Channel5_IRQHandler + .thumb_set DMA2_Channel5_IRQHandler,Default_Handler + + .weak DMA2_Channel6_IRQHandler + .thumb_set DMA2_Channel6_IRQHandler,Default_Handler + + .weak DMA2_Channel7_IRQHandler + .thumb_set DMA2_Channel7_IRQHandler,Default_Handler + + .weak DMAMUX1_OVR_IRQHandler + .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler + diff --git a/firmware/memory_chip_gone/Debug/Core/Src/app_debug.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/app_debug.cyclo new file mode 100644 index 0000000..776cc1e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/app_debug.cyclo @@ -0,0 +1,7 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:391:22:LL_EXTI_EnableIT_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:539:22:LL_AHB2_GRP1_EnableClock 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1636:22:LL_C2_AHB2_GRP1_EnableClock 1 +../Core/Src/app_debug.c:176:6:APPD_Init 1 +../Core/Src/app_debug.c:222:6:APPD_EnableCPU2 1 +../Core/Src/app_debug.c:251:13:APPD_SetCPU2GpioConfig 10 +../Core/Src/app_debug.c:319:13:APPD_BleDtbCfg 1 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/app_debug.d b/firmware/memory_chip_gone/Debug/Core/Src/app_debug.d new file mode 100644 index 0000000..75ffdd8 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/app_debug.d @@ -0,0 +1,127 @@ +Core/Src/app_debug.o: ../Core/Src/app_debug.c ../Core/Inc/app_common.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Core/Inc/app_debug.h \ + ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h +../Core/Inc/app_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Core/Inc/app_debug.h: +../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h: diff --git a/firmware/memory_chip_gone/Debug/Core/Src/app_debug.o b/firmware/memory_chip_gone/Debug/Core/Src/app_debug.o new file mode 100644 index 0000000..af0ad45 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/app_debug.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/app_debug.su b/firmware/memory_chip_gone/Debug/Core/Src/app_debug.su new file mode 100644 index 0000000..18df32d --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/app_debug.su @@ -0,0 +1,7 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:391:22:LL_EXTI_EnableIT_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:539:22:LL_AHB2_GRP1_EnableClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1636:22:LL_C2_AHB2_GRP1_EnableClock 24 static +../Core/Src/app_debug.c:176:6:APPD_Init 8 static +../Core/Src/app_debug.c:222:6:APPD_EnableCPU2 48 static +../Core/Src/app_debug.c:251:13:APPD_SetCPU2GpioConfig 40 static +../Core/Src/app_debug.c:319:13:APPD_BleDtbCfg 4 static diff --git a/firmware/memory_chip_gone/Debug/Core/Src/app_entry.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/app_entry.cyclo new file mode 100644 index 0000000..6becbf9 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/app_entry.cyclo @@ -0,0 +1,30 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1663:22:LL_C2_PWR_SetPowerMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:391:22:LL_EXTI_EnableIT_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1359:22:LL_RCC_HSE_SetCapacitorTuning 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2349:22:LL_RCC_SetClkAfterWakeFromStop 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1513:26:LL_DBGMCU_GetDeviceID 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1524:26:LL_DBGMCU_GetRevisionID 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h:311:22:LL_LPM_EnableSleep 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h:1012:22:LL_RTC_EnableWriteProtection 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h:1023:22:LL_RTC_DisableWriteProtection 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h:2927:22:LL_RTC_WAKEUP_SetClock 1 +../Core/Src/app_entry.c:91:6:MX_APPE_Config 1 +../Core/Src/app_entry.c:111:6:MX_APPE_Init 1 +../Core/Src/app_entry.c:136:6:Init_Smps 1 +../Core/Src/app_entry.c:154:6:Init_Exti 1 +../Core/Src/app_entry.c:171:13:Reset_Device 1 +../Core/Src/app_entry.c:240:13:Config_HSE 2 +../Core/Src/app_entry.c:256:13:System_Init 1 +../Core/Src/app_entry.c:267:13:Init_Rtc 1 +../Core/Src/app_entry.c:288:13:SystemPower_Config 1 +../Core/Src/app_entry.c:310:13:appe_Tl_Init 1 +../Core/Src/app_entry.c:335:13:APPE_SysStatusNot 1 +../Core/Src/app_entry.c:350:13:APPE_SysUserEvtRx 3 +../Core/Src/app_entry.c:413:13:APPE_SysEvtError 1 +../Core/Src/app_entry.c:435:13:APPE_SysEvtReadyProcessing 3 +../Core/Src/app_entry.c:516:6:HAL_Delay 3 +../Core/Src/app_entry.c:545:6:MX_APPE_Process 1 +../Core/Src/app_entry.c:556:6:UTIL_SEQ_Idle 1 +../Core/Src/app_entry.c:564:6:shci_notify_asynch_evt 1 +../Core/Src/app_entry.c:570:6:shci_cmd_resp_release 1 +../Core/Src/app_entry.c:576:6:shci_cmd_resp_wait 1 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/app_entry.d b/firmware/memory_chip_gone/Debug/Core/Src/app_entry.d new file mode 100644 index 0000000..edb6e6a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/app_entry.d @@ -0,0 +1,233 @@ +Core/Src/app_entry.o: ../Core/Src/app_entry.c ../Core/Inc/app_common.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h ../Core/Inc/main.h \ + ../Core/Inc/app_entry.h ../Core/Inc/app_common.h ../Core/Inc/app_entry.h \ + ../STM32_WPAN/App/app_ble.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/ble/ble.h ../STM32_WPAN/App/ble_conf.h \ + ../Core/Inc/app_conf.h ../STM32_WPAN/App/ble_dbg_conf.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Utilities/sequencer/stm32_seq.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h \ + ../Utilities/lpm/tiny_lpm/stm32_lpm.h ../Core/Inc/app_debug.h \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h \ + ../Middlewares/ST/STM32_WPAN/utilities/otp.h \ + ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h +../Core/Inc/app_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Core/Inc/main.h: +../Core/Inc/app_entry.h: +../Core/Inc/app_common.h: +../Core/Inc/app_entry.h: +../STM32_WPAN/App/app_ble.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/ble/ble.h: +../STM32_WPAN/App/ble_conf.h: +../Core/Inc/app_conf.h: +../STM32_WPAN/App/ble_dbg_conf.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Utilities/sequencer/stm32_seq.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h: +../Utilities/lpm/tiny_lpm/stm32_lpm.h: +../Core/Inc/app_debug.h: +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h: +../Middlewares/ST/STM32_WPAN/utilities/otp.h: +../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h: diff --git a/firmware/memory_chip_gone/Debug/Core/Src/app_entry.o b/firmware/memory_chip_gone/Debug/Core/Src/app_entry.o new file mode 100644 index 0000000..df07f4d Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/app_entry.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/app_entry.su b/firmware/memory_chip_gone/Debug/Core/Src/app_entry.su new file mode 100644 index 0000000..674858a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/app_entry.su @@ -0,0 +1,30 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1663:22:LL_C2_PWR_SetPowerMode 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:391:22:LL_EXTI_EnableIT_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1359:22:LL_RCC_HSE_SetCapacitorTuning 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2349:22:LL_RCC_SetClkAfterWakeFromStop 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1513:26:LL_DBGMCU_GetDeviceID 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1524:26:LL_DBGMCU_GetRevisionID 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h:311:22:LL_LPM_EnableSleep 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h:1012:22:LL_RTC_EnableWriteProtection 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h:1023:22:LL_RTC_DisableWriteProtection 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h:2927:22:LL_RTC_WAKEUP_SetClock 16 static +../Core/Src/app_entry.c:91:6:MX_APPE_Config 8 static +../Core/Src/app_entry.c:111:6:MX_APPE_Init 8 static +../Core/Src/app_entry.c:136:6:Init_Smps 4 static +../Core/Src/app_entry.c:154:6:Init_Exti 8 static +../Core/Src/app_entry.c:171:13:Reset_Device 4 static +../Core/Src/app_entry.c:240:13:Config_HSE 16 static +../Core/Src/app_entry.c:256:13:System_Init 8 static +../Core/Src/app_entry.c:267:13:Init_Rtc 8 static +../Core/Src/app_entry.c:288:13:SystemPower_Config 8 static +../Core/Src/app_entry.c:310:13:appe_Tl_Init 40 static +../Core/Src/app_entry.c:335:13:APPE_SysStatusNot 16 static +../Core/Src/app_entry.c:350:13:APPE_SysUserEvtRx 40 static +../Core/Src/app_entry.c:413:13:APPE_SysEvtError 24 static +../Core/Src/app_entry.c:435:13:APPE_SysEvtReadyProcessing 48 static +../Core/Src/app_entry.c:516:6:HAL_Delay 24 static,ignoring_inline_asm +../Core/Src/app_entry.c:545:6:MX_APPE_Process 8 static +../Core/Src/app_entry.c:556:6:UTIL_SEQ_Idle 4 static +../Core/Src/app_entry.c:564:6:shci_notify_asynch_evt 16 static +../Core/Src/app_entry.c:570:6:shci_cmd_resp_release 16 static +../Core/Src/app_entry.c:576:6:shci_cmd_resp_wait 16 static diff --git a/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.cyclo new file mode 100644 index 0000000..f1233d5 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.cyclo @@ -0,0 +1,18 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:322:22:LL_EXTI_EnableIT_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1029:22:LL_EXTI_EnableRisingTrig_0_31 1 +../Core/Src/hw_timerserver.c:107:17:ReadRtcSsrValue 2 +../Core/Src/hw_timerserver.c:132:13:LinkTimerAfter 2 +../Core/Src/hw_timerserver.c:155:13:LinkTimerBefore 2 +../Core/Src/hw_timerserver.c:182:17:linkTimer 5 +../Core/Src/hw_timerserver.c:252:13:UnlinkTimer 5 +../Core/Src/hw_timerserver.c:294:17:ReturnTimeElapsed 3 +../Core/Src/hw_timerserver.c:336:13:RestartWakeupCounter 5 +../Core/Src/hw_timerserver.c:395:13:RescheduleTimerList 7 +../Core/Src/hw_timerserver.c:487:6:HW_TS_RTC_Wakeup_Handler 5 +../Core/Src/hw_timerserver.c:589:6:HW_TS_Init 6 +../Core/Src/hw_timerserver.c:670:22:HW_TS_Create 4 +../Core/Src/hw_timerserver.c:715:6:HW_TS_Delete 1 +../Core/Src/hw_timerserver.c:724:6:HW_TS_Stop 7 +../Core/Src/hw_timerserver.c:796:6:HW_TS_Start 3 +../Core/Src/hw_timerserver.c:850:10:HW_TS_RTC_ReadLeftTicksToCount 3 +../Core/Src/hw_timerserver.c:883:13:HW_TS_RTC_Int_AppNot 1 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.d b/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.d new file mode 100644 index 0000000..94b9250 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.d @@ -0,0 +1,111 @@ +Core/Src/hw_timerserver.o: ../Core/Src/hw_timerserver.c \ + ../Core/Inc/app_common.h ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Core/Inc/hw_conf.h +../Core/Inc/app_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Core/Inc/hw_conf.h: diff --git a/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.o b/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.o new file mode 100644 index 0000000..ab0ec3b Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.su b/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.su new file mode 100644 index 0000000..54712cf --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/hw_timerserver.su @@ -0,0 +1,18 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:322:22:LL_EXTI_EnableIT_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1029:22:LL_EXTI_EnableRisingTrig_0_31 16 static +../Core/Src/hw_timerserver.c:107:17:ReadRtcSsrValue 16 static +../Core/Src/hw_timerserver.c:132:13:LinkTimerAfter 24 static +../Core/Src/hw_timerserver.c:155:13:LinkTimerBefore 24 static +../Core/Src/hw_timerserver.c:182:17:linkTimer 24 static +../Core/Src/hw_timerserver.c:252:13:UnlinkTimer 24 static +../Core/Src/hw_timerserver.c:294:17:ReturnTimeElapsed 16 static +../Core/Src/hw_timerserver.c:336:13:RestartWakeupCounter 16 static +../Core/Src/hw_timerserver.c:395:13:RescheduleTimerList 24 static +../Core/Src/hw_timerserver.c:487:6:HW_TS_RTC_Wakeup_Handler 48 static,ignoring_inline_asm +../Core/Src/hw_timerserver.c:589:6:HW_TS_Init 40 static,ignoring_inline_asm +../Core/Src/hw_timerserver.c:670:22:HW_TS_Create 48 static,ignoring_inline_asm +../Core/Src/hw_timerserver.c:715:6:HW_TS_Delete 16 static +../Core/Src/hw_timerserver.c:724:6:HW_TS_Stop 32 static,ignoring_inline_asm +../Core/Src/hw_timerserver.c:796:6:HW_TS_Start 32 static,ignoring_inline_asm +../Core/Src/hw_timerserver.c:850:10:HW_TS_RTC_ReadLeftTicksToCount 32 static,ignoring_inline_asm +../Core/Src/hw_timerserver.c:883:13:HW_TS_RTC_Int_AppNot 24 static diff --git a/firmware/memory_chip_gone/Debug/Core/Src/main.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/main.cyclo new file mode 100644 index 0000000..b8f8ba0 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/main.cyclo @@ -0,0 +1,11 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1679:22:LL_RCC_LSE_SetDriveCapability 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:539:22:LL_AHB2_GRP1_EnableClock 1 +../Core/Src/main.c:74:5:main 1 +../Core/Src/main.c:137:6:SystemClock_Config 3 +../Core/Src/main.c:188:6:PeriphCommonClock_Config 2 +../Core/Src/main.c:213:13:MX_I2C1_Init 4 +../Core/Src/main.c:261:13:MX_IPCC_Init 2 +../Core/Src/main.c:287:13:MX_RF_Init 1 +../Core/Src/main.c:308:13:MX_RTC_Init 4 +../Core/Src/main.c:373:13:MX_GPIO_Init 1 +../Core/Src/main.c:408:6:Error_Handler 1 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/main.d b/firmware/memory_chip_gone/Debug/Core/Src/main.d new file mode 100644 index 0000000..bb5dfea --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/main.d @@ -0,0 +1,112 @@ +Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Core/Inc/app_entry.h ../Core/Inc/app_common.h +../Core/Inc/main.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Core/Inc/app_entry.h: +../Core/Inc/app_common.h: diff --git a/firmware/memory_chip_gone/Debug/Core/Src/main.o b/firmware/memory_chip_gone/Debug/Core/Src/main.o new file mode 100644 index 0000000..478cc40 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/main.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/main.su b/firmware/memory_chip_gone/Debug/Core/Src/main.su new file mode 100644 index 0000000..52e5fda --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/main.su @@ -0,0 +1,11 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1679:22:LL_RCC_LSE_SetDriveCapability 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:539:22:LL_AHB2_GRP1_EnableClock 24 static +../Core/Src/main.c:74:5:main 8 static +../Core/Src/main.c:137:6:SystemClock_Config 112 static +../Core/Src/main.c:188:6:PeriphCommonClock_Config 88 static +../Core/Src/main.c:213:13:MX_I2C1_Init 8 static +../Core/Src/main.c:261:13:MX_IPCC_Init 8 static +../Core/Src/main.c:287:13:MX_RF_Init 4 static +../Core/Src/main.c:308:13:MX_RTC_Init 32 static +../Core/Src/main.c:373:13:MX_GPIO_Init 32 static +../Core/Src/main.c:408:6:Error_Handler 4 static,ignoring_inline_asm diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.cyclo new file mode 100644 index 0000000..b5d71bf --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.cyclo @@ -0,0 +1,22 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:537:22:LL_PWR_SetPowerMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:2001:22:LL_PWR_ClearFlag_WU 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:2385:26:LL_PWR_IsActiveFlag_C2SB 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:2395:26:LL_PWR_IsActiveFlag_C2DS 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1480:22:LL_RCC_HSI_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1500:26:LL_RCC_HSI_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2058:22:LL_RCC_SetSysClkSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2072:26:LL_RCC_GetSysClkSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2388:22:LL_RCC_SetSMPSClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h:311:22:LL_LPM_EnableSleep 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h:322:22:LL_LPM_EnableDeepSleep 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h:233:26:LL_HSEM_1StepLock 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h:247:22:LL_HSEM_ReleaseLock 1 +../Core/Src/stm32_lpm_if.c:72:6:PWR_EnterOffMode 1 +../Core/Src/stm32_lpm_if.c:121:6:PWR_ExitOffMode 1 +../Core/Src/stm32_lpm_if.c:139:6:PWR_EnterStopMode 1 +../Core/Src/stm32_lpm_if.c:187:6:PWR_ExitStopMode 1 +../Core/Src/stm32_lpm_if.c:210:6:PWR_EnterSleepMode 1 +../Core/Src/stm32_lpm_if.c:243:6:PWR_ExitSleepMode 1 +../Core/Src/stm32_lpm_if.c:265:13:EnterLowPower 5 +../Core/Src/stm32_lpm_if.c:301:13:ExitLowPower 2 +../Core/Src/stm32_lpm_if.c:334:13:Switch_On_HSI 3 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.d b/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.d new file mode 100644 index 0000000..5ef523f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.d @@ -0,0 +1,111 @@ +Core/Src/stm32_lpm_if.o: ../Core/Src/stm32_lpm_if.c \ + ../Core/Inc/stm32_lpm_if.h ../Utilities/lpm/tiny_lpm/stm32_lpm.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h +../Core/Inc/stm32_lpm_if.h: +../Utilities/lpm/tiny_lpm/stm32_lpm.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.o b/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.o new file mode 100644 index 0000000..97e69f1 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.su b/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.su new file mode 100644 index 0000000..8a62b5f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32_lpm_if.su @@ -0,0 +1,22 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:537:22:LL_PWR_SetPowerMode 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:2001:22:LL_PWR_ClearFlag_WU 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:2385:26:LL_PWR_IsActiveFlag_C2SB 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:2395:26:LL_PWR_IsActiveFlag_C2DS 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1480:22:LL_RCC_HSI_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1500:26:LL_RCC_HSI_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2058:22:LL_RCC_SetSysClkSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2072:26:LL_RCC_GetSysClkSource 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2388:22:LL_RCC_SetSMPSClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h:311:22:LL_LPM_EnableSleep 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h:322:22:LL_LPM_EnableDeepSleep 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h:233:26:LL_HSEM_1StepLock 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h:247:22:LL_HSEM_ReleaseLock 24 static +../Core/Src/stm32_lpm_if.c:72:6:PWR_EnterOffMode 8 static,ignoring_inline_asm +../Core/Src/stm32_lpm_if.c:121:6:PWR_ExitOffMode 8 static +../Core/Src/stm32_lpm_if.c:139:6:PWR_EnterStopMode 8 static,ignoring_inline_asm +../Core/Src/stm32_lpm_if.c:187:6:PWR_ExitStopMode 8 static +../Core/Src/stm32_lpm_if.c:210:6:PWR_EnterSleepMode 8 static,ignoring_inline_asm +../Core/Src/stm32_lpm_if.c:243:6:PWR_ExitSleepMode 8 static +../Core/Src/stm32_lpm_if.c:265:13:EnterLowPower 8 static +../Core/Src/stm32_lpm_if.c:301:13:ExitLowPower 8 static +../Core/Src/stm32_lpm_if.c:334:13:Switch_On_HSI 8 static diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.cyclo new file mode 100644 index 0000000..a16c3df --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.cyclo @@ -0,0 +1,14 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2883:22:LL_RCC_EnableRTC 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2893:22:LL_RCC_DisableRTC 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:539:22:LL_AHB2_GRP1_EnableClock 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:744:22:LL_AHB3_GRP1_EnableClock 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:798:22:LL_AHB3_GRP1_DisableClock 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:939:22:LL_APB1_GRP1_EnableClock 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1038:22:LL_APB1_GRP1_DisableClock 1 +../Core/Src/stm32wbxx_hal_msp.c:63:6:HAL_MspInit 1 +../Core/Src/stm32wbxx_hal_msp.c:90:6:HAL_I2C_MspInit 3 +../Core/Src/stm32wbxx_hal_msp.c:137:6:HAL_I2C_MspDeInit 2 +../Core/Src/stm32wbxx_hal_msp.c:168:6:HAL_IPCC_MspInit 2 +../Core/Src/stm32wbxx_hal_msp.c:196:6:HAL_IPCC_MspDeInit 2 +../Core/Src/stm32wbxx_hal_msp.c:222:6:HAL_RTC_MspInit 3 +../Core/Src/stm32wbxx_hal_msp.c:257:6:HAL_RTC_MspDeInit 2 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.d b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.d new file mode 100644 index 0000000..880b023 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.d @@ -0,0 +1,112 @@ +Core/Src/stm32wbxx_hal_msp.o: ../Core/Src/stm32wbxx_hal_msp.c \ + ../Core/Inc/main.h ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Core/Inc/app_entry.h ../Core/Inc/app_common.h +../Core/Inc/main.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Core/Inc/app_entry.h: +../Core/Inc/app_common.h: diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.o b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.o new file mode 100644 index 0000000..4a10331 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.su b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.su new file mode 100644 index 0000000..3378290 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_hal_msp.su @@ -0,0 +1,14 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2883:22:LL_RCC_EnableRTC 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2893:22:LL_RCC_DisableRTC 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:539:22:LL_AHB2_GRP1_EnableClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:744:22:LL_AHB3_GRP1_EnableClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:798:22:LL_AHB3_GRP1_DisableClock 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:939:22:LL_APB1_GRP1_EnableClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1038:22:LL_APB1_GRP1_DisableClock 16 static +../Core/Src/stm32wbxx_hal_msp.c:63:6:HAL_MspInit 8 static +../Core/Src/stm32wbxx_hal_msp.c:90:6:HAL_I2C_MspInit 120 static +../Core/Src/stm32wbxx_hal_msp.c:137:6:HAL_I2C_MspDeInit 16 static +../Core/Src/stm32wbxx_hal_msp.c:168:6:HAL_IPCC_MspInit 16 static +../Core/Src/stm32wbxx_hal_msp.c:196:6:HAL_IPCC_MspDeInit 16 static +../Core/Src/stm32wbxx_hal_msp.c:222:6:HAL_RTC_MspInit 96 static +../Core/Src/stm32wbxx_hal_msp.c:257:6:HAL_RTC_MspDeInit 16 static diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.cyclo new file mode 100644 index 0000000..988ffb1 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.cyclo @@ -0,0 +1,12 @@ +../Core/Src/stm32wbxx_it.c:69:6:NMI_Handler 1 +../Core/Src/stm32wbxx_it.c:84:6:HardFault_Handler 1 +../Core/Src/stm32wbxx_it.c:99:6:MemManage_Handler 1 +../Core/Src/stm32wbxx_it.c:114:6:BusFault_Handler 1 +../Core/Src/stm32wbxx_it.c:129:6:UsageFault_Handler 1 +../Core/Src/stm32wbxx_it.c:144:6:SVC_Handler 1 +../Core/Src/stm32wbxx_it.c:157:6:DebugMon_Handler 1 +../Core/Src/stm32wbxx_it.c:170:6:PendSV_Handler 1 +../Core/Src/stm32wbxx_it.c:183:6:SysTick_Handler 1 +../Core/Src/stm32wbxx_it.c:204:6:IPCC_C1_RX_IRQHandler 1 +../Core/Src/stm32wbxx_it.c:218:6:IPCC_C1_TX_IRQHandler 1 +../Core/Src/stm32wbxx_it.c:232:6:HSEM_IRQHandler 1 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.d b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.d new file mode 100644 index 0000000..7a70e97 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.d @@ -0,0 +1,114 @@ +Core/Src/stm32wbxx_it.o: ../Core/Src/stm32wbxx_it.c ../Core/Inc/main.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Core/Inc/app_entry.h ../Core/Inc/app_common.h \ + ../Core/Inc/stm32wbxx_it.h +../Core/Inc/main.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Core/Inc/app_entry.h: +../Core/Inc/app_common.h: +../Core/Inc/stm32wbxx_it.h: diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.o b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.o new file mode 100644 index 0000000..23638ef Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.su b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.su new file mode 100644 index 0000000..43d6fd1 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/stm32wbxx_it.su @@ -0,0 +1,12 @@ +../Core/Src/stm32wbxx_it.c:69:6:NMI_Handler 4 static +../Core/Src/stm32wbxx_it.c:84:6:HardFault_Handler 4 static +../Core/Src/stm32wbxx_it.c:99:6:MemManage_Handler 4 static +../Core/Src/stm32wbxx_it.c:114:6:BusFault_Handler 4 static +../Core/Src/stm32wbxx_it.c:129:6:UsageFault_Handler 4 static +../Core/Src/stm32wbxx_it.c:144:6:SVC_Handler 4 static +../Core/Src/stm32wbxx_it.c:157:6:DebugMon_Handler 4 static +../Core/Src/stm32wbxx_it.c:170:6:PendSV_Handler 4 static +../Core/Src/stm32wbxx_it.c:183:6:SysTick_Handler 8 static +../Core/Src/stm32wbxx_it.c:204:6:IPCC_C1_RX_IRQHandler 8 static +../Core/Src/stm32wbxx_it.c:218:6:IPCC_C1_TX_IRQHandler 8 static +../Core/Src/stm32wbxx_it.c:232:6:HSEM_IRQHandler 8 static diff --git a/firmware/memory_chip_gone/Debug/Core/Src/subdir.mk b/firmware/memory_chip_gone/Debug/Core/Src/subdir.mk new file mode 100644 index 0000000..4f898af --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/subdir.mk @@ -0,0 +1,54 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Core/Src/app_debug.c \ +../Core/Src/app_entry.c \ +../Core/Src/hw_timerserver.c \ +../Core/Src/main.c \ +../Core/Src/stm32_lpm_if.c \ +../Core/Src/stm32wbxx_hal_msp.c \ +../Core/Src/stm32wbxx_it.c \ +../Core/Src/syscalls.c \ +../Core/Src/sysmem.c \ +../Core/Src/system_stm32wbxx.c + +OBJS += \ +./Core/Src/app_debug.o \ +./Core/Src/app_entry.o \ +./Core/Src/hw_timerserver.o \ +./Core/Src/main.o \ +./Core/Src/stm32_lpm_if.o \ +./Core/Src/stm32wbxx_hal_msp.o \ +./Core/Src/stm32wbxx_it.o \ +./Core/Src/syscalls.o \ +./Core/Src/sysmem.o \ +./Core/Src/system_stm32wbxx.o + +C_DEPS += \ +./Core/Src/app_debug.d \ +./Core/Src/app_entry.d \ +./Core/Src/hw_timerserver.d \ +./Core/Src/main.d \ +./Core/Src/stm32_lpm_if.d \ +./Core/Src/stm32wbxx_hal_msp.d \ +./Core/Src/stm32wbxx_it.d \ +./Core/Src/syscalls.d \ +./Core/Src/sysmem.d \ +./Core/Src/system_stm32wbxx.d + + +# Each subdirectory must supply rules for building sources it contributes +Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Core-2f-Src + +clean-Core-2f-Src: + -$(RM) ./Core/Src/app_debug.cyclo ./Core/Src/app_debug.d ./Core/Src/app_debug.o ./Core/Src/app_debug.su ./Core/Src/app_entry.cyclo ./Core/Src/app_entry.d ./Core/Src/app_entry.o ./Core/Src/app_entry.su ./Core/Src/hw_timerserver.cyclo ./Core/Src/hw_timerserver.d ./Core/Src/hw_timerserver.o ./Core/Src/hw_timerserver.su ./Core/Src/main.cyclo ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/stm32_lpm_if.cyclo ./Core/Src/stm32_lpm_if.d ./Core/Src/stm32_lpm_if.o ./Core/Src/stm32_lpm_if.su ./Core/Src/stm32wbxx_hal_msp.cyclo ./Core/Src/stm32wbxx_hal_msp.d ./Core/Src/stm32wbxx_hal_msp.o ./Core/Src/stm32wbxx_hal_msp.su ./Core/Src/stm32wbxx_it.cyclo ./Core/Src/stm32wbxx_it.d ./Core/Src/stm32wbxx_it.o ./Core/Src/stm32wbxx_it.su ./Core/Src/syscalls.cyclo ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.cyclo ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32wbxx.cyclo ./Core/Src/system_stm32wbxx.d ./Core/Src/system_stm32wbxx.o ./Core/Src/system_stm32wbxx.su + +.PHONY: clean-Core-2f-Src + diff --git a/firmware/memory_chip_gone/Debug/Core/Src/syscalls.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/syscalls.cyclo new file mode 100644 index 0000000..6cbfdd0 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/syscalls.cyclo @@ -0,0 +1,18 @@ +../Core/Src/syscalls.c:44:6:initialise_monitor_handles 1 +../Core/Src/syscalls.c:48:5:_getpid 1 +../Core/Src/syscalls.c:53:5:_kill 1 +../Core/Src/syscalls.c:61:6:_exit 1 +../Core/Src/syscalls.c:67:27:_read 2 +../Core/Src/syscalls.c:80:27:_write 2 +../Core/Src/syscalls.c:92:5:_close 1 +../Core/Src/syscalls.c:99:5:_fstat 1 +../Core/Src/syscalls.c:106:5:_isatty 1 +../Core/Src/syscalls.c:112:5:_lseek 1 +../Core/Src/syscalls.c:120:5:_open 1 +../Core/Src/syscalls.c:128:5:_wait 1 +../Core/Src/syscalls.c:135:5:_unlink 1 +../Core/Src/syscalls.c:142:5:_times 1 +../Core/Src/syscalls.c:148:5:_stat 1 +../Core/Src/syscalls.c:155:5:_link 1 +../Core/Src/syscalls.c:163:5:_fork 1 +../Core/Src/syscalls.c:169:5:_execve 1 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/syscalls.d b/firmware/memory_chip_gone/Debug/Core/Src/syscalls.d new file mode 100644 index 0000000..8667c70 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/syscalls.d @@ -0,0 +1 @@ +Core/Src/syscalls.o: ../Core/Src/syscalls.c diff --git a/firmware/memory_chip_gone/Debug/Core/Src/syscalls.o b/firmware/memory_chip_gone/Debug/Core/Src/syscalls.o new file mode 100644 index 0000000..4b7a685 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/syscalls.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/syscalls.su b/firmware/memory_chip_gone/Debug/Core/Src/syscalls.su new file mode 100644 index 0000000..50b547a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/syscalls.su @@ -0,0 +1,18 @@ +../Core/Src/syscalls.c:44:6:initialise_monitor_handles 4 static +../Core/Src/syscalls.c:48:5:_getpid 4 static +../Core/Src/syscalls.c:53:5:_kill 16 static +../Core/Src/syscalls.c:61:6:_exit 16 static +../Core/Src/syscalls.c:67:27:_read 32 static +../Core/Src/syscalls.c:80:27:_write 32 static +../Core/Src/syscalls.c:92:5:_close 16 static +../Core/Src/syscalls.c:99:5:_fstat 16 static +../Core/Src/syscalls.c:106:5:_isatty 16 static +../Core/Src/syscalls.c:112:5:_lseek 24 static +../Core/Src/syscalls.c:120:5:_open 12 static +../Core/Src/syscalls.c:128:5:_wait 16 static +../Core/Src/syscalls.c:135:5:_unlink 16 static +../Core/Src/syscalls.c:142:5:_times 16 static +../Core/Src/syscalls.c:148:5:_stat 16 static +../Core/Src/syscalls.c:155:5:_link 16 static +../Core/Src/syscalls.c:163:5:_fork 8 static +../Core/Src/syscalls.c:169:5:_execve 24 static diff --git a/firmware/memory_chip_gone/Debug/Core/Src/sysmem.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/sysmem.cyclo new file mode 100644 index 0000000..0090c10 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/sysmem.cyclo @@ -0,0 +1 @@ +../Core/Src/sysmem.c:53:7:_sbrk 3 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/sysmem.d b/firmware/memory_chip_gone/Debug/Core/Src/sysmem.d new file mode 100644 index 0000000..74fecf9 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/sysmem.d @@ -0,0 +1 @@ +Core/Src/sysmem.o: ../Core/Src/sysmem.c diff --git a/firmware/memory_chip_gone/Debug/Core/Src/sysmem.o b/firmware/memory_chip_gone/Debug/Core/Src/sysmem.o new file mode 100644 index 0000000..011675f Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/sysmem.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/sysmem.su b/firmware/memory_chip_gone/Debug/Core/Src/sysmem.su new file mode 100644 index 0000000..12d5f17 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/sysmem.su @@ -0,0 +1 @@ +../Core/Src/sysmem.c:53:7:_sbrk 32 static diff --git a/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.cyclo b/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.cyclo new file mode 100644 index 0000000..1a1d49b --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.cyclo @@ -0,0 +1,2 @@ +../Core/Src/system_stm32wbxx.c:218:6:SystemInit 1 +../Core/Src/system_stm32wbxx.c:303:6:SystemCoreClockUpdate 7 diff --git a/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.d b/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.d new file mode 100644 index 0000000..1e38c2e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.d @@ -0,0 +1,77 @@ +Core/Src/system_stm32wbxx.o: ../Core/Src/system_stm32wbxx.c \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.o b/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.o new file mode 100644 index 0000000..48c3a87 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.su b/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.su new file mode 100644 index 0000000..1f3e3c3 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Src/system_stm32wbxx.su @@ -0,0 +1,2 @@ +../Core/Src/system_stm32wbxx.c:218:6:SystemInit 4 static +../Core/Src/system_stm32wbxx.c:303:6:SystemCoreClockUpdate 32 static diff --git a/firmware/memory_chip_gone/Debug/Core/Startup/startup_stm32wb55cgux.d b/firmware/memory_chip_gone/Debug/Core/Startup/startup_stm32wb55cgux.d new file mode 100644 index 0000000..5cb7f50 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Startup/startup_stm32wb55cgux.d @@ -0,0 +1,2 @@ +Core/Startup/startup_stm32wb55cgux.o: \ + ../Core/Startup/startup_stm32wb55cgux.s diff --git a/firmware/memory_chip_gone/Debug/Core/Startup/startup_stm32wb55cgux.o b/firmware/memory_chip_gone/Debug/Core/Startup/startup_stm32wb55cgux.o new file mode 100644 index 0000000..b663c82 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Core/Startup/startup_stm32wb55cgux.o differ diff --git a/firmware/memory_chip_gone/Debug/Core/Startup/subdir.mk b/firmware/memory_chip_gone/Debug/Core/Startup/subdir.mk new file mode 100644 index 0000000..4480fcb --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Core/Startup/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +S_SRCS += \ +../Core/Startup/startup_stm32wb55cgux.s + +OBJS += \ +./Core/Startup/startup_stm32wb55cgux.o + +S_DEPS += \ +./Core/Startup/startup_stm32wb55cgux.d + + +# Each subdirectory must supply rules for building sources it contributes +Core/Startup/%.o: ../Core/Startup/%.s Core/Startup/subdir.mk + arm-none-eabi-gcc -mcpu=cortex-m4 -g3 -DDEBUG -c -x assembler-with-cpp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" "$<" + +clean: clean-Core-2f-Startup + +clean-Core-2f-Startup: + -$(RM) ./Core/Startup/startup_stm32wb55cgux.d ./Core/Startup/startup_stm32wb55cgux.o + +.PHONY: clean-Core-2f-Startup + diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.cyclo new file mode 100644 index 0000000..ad1d6bd --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.cyclo @@ -0,0 +1,77 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:432:22:LL_AHB1_GRP1_ForceReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:454:22:LL_AHB1_GRP1_ReleaseReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:625:22:LL_AHB2_GRP1_ForceReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:653:22:LL_AHB2_GRP1_ReleaseReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:824:22:LL_AHB3_GRP1_ForceReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:850:22:LL_AHB3_GRP1_ReleaseReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1081:22:LL_APB1_GRP1_ForceReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1097:22:LL_APB1_GRP2_ForceReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1125:22:LL_APB1_GRP1_ReleaseReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1141:22:LL_APB1_GRP2_ReleaseReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1354:22:LL_APB2_GRP1_ForceReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1380:22:LL_APB2_GRP1_ReleaseReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1454:22:LL_APB3_GRP1_ForceReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1466:22:LL_APB3_GRP1_ReleaseReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:504:22:LL_SYSCFG_EnableAnalogBooster 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:523:22:LL_SYSCFG_DisableAnalogBooster 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:536:22:LL_SYSCFG_EnableAnalogGpioSwitch 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:548:22:LL_SYSCFG_DisableAnalogGpioSwitch 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:853:22:LL_SYSCFG_EnableSRAM2Erase 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:875:22:LL_SYSCFG_DisableSRAMFetch 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:885:26:LL_SYSCFG_IsEnabledSRAMFetch 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1051:22:LL_SYSCFG_UnlockSRAM2WRP 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1455:22:LL_SYSCFG_EnableSecurityAccess 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1473:22:LL_SYSCFG_DisableSecurityAccess 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1491:26:LL_SYSCFG_IsEnabledSecurityAccess 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1513:26:LL_DBGMCU_GetDeviceID 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1524:26:LL_DBGMCU_GetRevisionID 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1534:22:LL_DBGMCU_EnableDBGSleepMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1544:22:LL_DBGMCU_DisableDBGSleepMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1554:22:LL_DBGMCU_EnableDBGStopMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1564:22:LL_DBGMCU_DisableDBGStopMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1574:22:LL_DBGMCU_EnableDBGStandbyMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1584:22:LL_DBGMCU_DisableDBGStandbyMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1843:22:LL_VREFBUF_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1853:22:LL_VREFBUF_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1886:22:LL_VREFBUF_SetVoltageScaling 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1952:22:LL_VREFBUF_SetTrimming 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:142:19:HAL_Init 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:185:19:HAL_DeInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:217:13:HAL_MspInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:228:13:HAL_MspDeInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:251:26:HAL_InitTick 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:319:13:HAL_IncTick 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:330:17:HAL_GetTick 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:339:10:HAL_GetTickPrio 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:348:19:HAL_SetTickFreq 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:381:21:HAL_GetTickFreq 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:397:13:HAL_Delay 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:424:13:HAL_SuspendTick 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:440:13:HAL_ResumeTick 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:450:10:HAL_GetHalVersion 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:459:10:HAL_GetREVID 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:468:10:HAL_GetDEVID 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:477:10:HAL_GetUIDw0 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:486:10:HAL_GetUIDw1 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:495:10:HAL_GetUIDw2 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:524:6:HAL_DBGMCU_EnableDBGSleepMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:533:6:HAL_DBGMCU_DisableDBGSleepMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:542:6:HAL_DBGMCU_EnableDBGStopMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:551:6:HAL_DBGMCU_DisableDBGStopMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:560:6:HAL_DBGMCU_EnableDBGStandbyMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:569:6:HAL_DBGMCU_DisableDBGStandbyMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:604:6:HAL_SYSCFG_SRAM2Erase 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:618:6:HAL_SYSCFG_DisableSRAMFetch 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:627:10:HAL_SYSCFG_IsEnabledSRAMFetch 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:645:6:HAL_SYSCFG_VREFBUF_VoltageScalingConfig 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:676:6:HAL_SYSCFG_VREFBUF_HighImpedanceConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:697:6:HAL_SYSCFG_VREFBUF_TrimmingConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:710:19:HAL_SYSCFG_EnableVREFBUF 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:736:6:HAL_SYSCFG_DisableVREFBUF 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:747:6:HAL_SYSCFG_EnableIOBooster 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:757:6:HAL_SYSCFG_DisableIOBooster 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:768:6:HAL_SYSCFG_EnableIOVdd 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:778:6:HAL_SYSCFG_DisableIOVdd 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:796:6:HAL_SYSCFG_EnableSecurityAccess 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:816:6:HAL_SYSCFG_DisableSecurityAccess 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:833:10:HAL_SYSCFG_IsEnabledSecurityAccess 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.d new file mode 100644 index 0000000..ca0eb33 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o new file mode 100644 index 0000000..6315c84 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.su new file mode 100644 index 0000000..09de69e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.su @@ -0,0 +1,77 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:432:22:LL_AHB1_GRP1_ForceReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:454:22:LL_AHB1_GRP1_ReleaseReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:625:22:LL_AHB2_GRP1_ForceReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:653:22:LL_AHB2_GRP1_ReleaseReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:824:22:LL_AHB3_GRP1_ForceReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:850:22:LL_AHB3_GRP1_ReleaseReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1081:22:LL_APB1_GRP1_ForceReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1097:22:LL_APB1_GRP2_ForceReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1125:22:LL_APB1_GRP1_ReleaseReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1141:22:LL_APB1_GRP2_ReleaseReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1354:22:LL_APB2_GRP1_ForceReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1380:22:LL_APB2_GRP1_ReleaseReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1454:22:LL_APB3_GRP1_ForceReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1466:22:LL_APB3_GRP1_ReleaseReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:504:22:LL_SYSCFG_EnableAnalogBooster 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:523:22:LL_SYSCFG_DisableAnalogBooster 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:536:22:LL_SYSCFG_EnableAnalogGpioSwitch 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:548:22:LL_SYSCFG_DisableAnalogGpioSwitch 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:853:22:LL_SYSCFG_EnableSRAM2Erase 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:875:22:LL_SYSCFG_DisableSRAMFetch 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:885:26:LL_SYSCFG_IsEnabledSRAMFetch 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1051:22:LL_SYSCFG_UnlockSRAM2WRP 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1455:22:LL_SYSCFG_EnableSecurityAccess 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1473:22:LL_SYSCFG_DisableSecurityAccess 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1491:26:LL_SYSCFG_IsEnabledSecurityAccess 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1513:26:LL_DBGMCU_GetDeviceID 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1524:26:LL_DBGMCU_GetRevisionID 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1534:22:LL_DBGMCU_EnableDBGSleepMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1544:22:LL_DBGMCU_DisableDBGSleepMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1554:22:LL_DBGMCU_EnableDBGStopMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1564:22:LL_DBGMCU_DisableDBGStopMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1574:22:LL_DBGMCU_EnableDBGStandbyMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1584:22:LL_DBGMCU_DisableDBGStandbyMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1843:22:LL_VREFBUF_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1853:22:LL_VREFBUF_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1886:22:LL_VREFBUF_SetVoltageScaling 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:1952:22:LL_VREFBUF_SetTrimming 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:142:19:HAL_Init 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:185:19:HAL_DeInit 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:217:13:HAL_MspInit 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:228:13:HAL_MspDeInit 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:251:26:HAL_InitTick 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:319:13:HAL_IncTick 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:330:17:HAL_GetTick 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:339:10:HAL_GetTickPrio 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:348:19:HAL_SetTickFreq 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:381:21:HAL_GetTickFreq 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:397:13:HAL_Delay 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:424:13:HAL_SuspendTick 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:440:13:HAL_ResumeTick 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:450:10:HAL_GetHalVersion 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:459:10:HAL_GetREVID 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:468:10:HAL_GetDEVID 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:477:10:HAL_GetUIDw0 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:486:10:HAL_GetUIDw1 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:495:10:HAL_GetUIDw2 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:524:6:HAL_DBGMCU_EnableDBGSleepMode 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:533:6:HAL_DBGMCU_DisableDBGSleepMode 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:542:6:HAL_DBGMCU_EnableDBGStopMode 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:551:6:HAL_DBGMCU_DisableDBGStopMode 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:560:6:HAL_DBGMCU_EnableDBGStandbyMode 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:569:6:HAL_DBGMCU_DisableDBGStandbyMode 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:604:6:HAL_SYSCFG_SRAM2Erase 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:618:6:HAL_SYSCFG_DisableSRAMFetch 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:627:10:HAL_SYSCFG_IsEnabledSRAMFetch 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:645:6:HAL_SYSCFG_VREFBUF_VoltageScalingConfig 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:676:6:HAL_SYSCFG_VREFBUF_HighImpedanceConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:697:6:HAL_SYSCFG_VREFBUF_TrimmingConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:710:19:HAL_SYSCFG_EnableVREFBUF 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:736:6:HAL_SYSCFG_DisableVREFBUF 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:747:6:HAL_SYSCFG_EnableIOBooster 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:757:6:HAL_SYSCFG_DisableIOBooster 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:768:6:HAL_SYSCFG_EnableIOVdd 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:778:6:HAL_SYSCFG_DisableIOVdd 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:796:6:HAL_SYSCFG_EnableSecurityAccess 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:816:6:HAL_SYSCFG_DisableSecurityAccess 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:833:10:HAL_SYSCFG_IsEnabledSecurityAccess 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.cyclo new file mode 100644 index 0000000..5622271 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.cyclo @@ -0,0 +1,32 @@ +../Drivers/CMSIS/Include/core_cm4.h:1648:22:__NVIC_SetPriorityGrouping 1 +../Drivers/CMSIS/Include/core_cm4.h:1667:26:__NVIC_GetPriorityGrouping 1 +../Drivers/CMSIS/Include/core_cm4.h:1679:22:__NVIC_EnableIRQ 2 +../Drivers/CMSIS/Include/core_cm4.h:1717:22:__NVIC_DisableIRQ 2 +../Drivers/CMSIS/Include/core_cm4.h:1736:26:__NVIC_GetPendingIRQ 2 +../Drivers/CMSIS/Include/core_cm4.h:1755:22:__NVIC_SetPendingIRQ 2 +../Drivers/CMSIS/Include/core_cm4.h:1770:22:__NVIC_ClearPendingIRQ 2 +../Drivers/CMSIS/Include/core_cm4.h:1809:22:__NVIC_SetPriority 2 +../Drivers/CMSIS/Include/core_cm4.h:1831:26:__NVIC_GetPriority 2 +../Drivers/CMSIS/Include/core_cm4.h:1856:26:NVIC_EncodePriority 2 +../Drivers/CMSIS/Include/core_cm4.h:1883:22:NVIC_DecodePriority 2 +../Drivers/CMSIS/Include/core_cm4.h:1933:34:__NVIC_SystemReset 1 +../Drivers/CMSIS/Include/core_cm4.h:2017:26:SysTick_Config 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:137:6:HAL_NVIC_SetPriorityGrouping 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:159:6:HAL_NVIC_SetPriority 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:179:6:HAL_NVIC_EnableIRQ 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:195:6:HAL_NVIC_DisableIRQ 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:208:6:HAL_NVIC_SystemReset 0 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:221:10:HAL_SYSTICK_Config 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:250:10:HAL_NVIC_GetPriorityGrouping 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:277:6:HAL_NVIC_GetPriority 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:292:6:HAL_NVIC_SetPendingIRQ 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:310:10:HAL_NVIC_GetPendingIRQ 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:326:6:HAL_NVIC_ClearPendingIRQ 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:343:6:HAL_SYSTICK_CLKSourceConfig 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:361:6:HAL_SYSTICK_IRQHandler 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:370:13:HAL_SYSTICK_Callback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:382:6:HAL_MPU_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:405:6:HAL_MPU_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:422:6:HAL_MPU_EnableRegion 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:438:6:HAL_MPU_DisableRegion 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:456:6:HAL_MPU_ConfigRegion 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.d new file mode 100644 index 0000000..3cb0e7e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o new file mode 100644 index 0000000..5b16215 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.su new file mode 100644 index 0000000..7ed52c2 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.su @@ -0,0 +1,32 @@ +../Drivers/CMSIS/Include/core_cm4.h:1648:22:__NVIC_SetPriorityGrouping 24 static +../Drivers/CMSIS/Include/core_cm4.h:1667:26:__NVIC_GetPriorityGrouping 4 static +../Drivers/CMSIS/Include/core_cm4.h:1679:22:__NVIC_EnableIRQ 16 static,ignoring_inline_asm +../Drivers/CMSIS/Include/core_cm4.h:1717:22:__NVIC_DisableIRQ 16 static,ignoring_inline_asm +../Drivers/CMSIS/Include/core_cm4.h:1736:26:__NVIC_GetPendingIRQ 16 static +../Drivers/CMSIS/Include/core_cm4.h:1755:22:__NVIC_SetPendingIRQ 16 static +../Drivers/CMSIS/Include/core_cm4.h:1770:22:__NVIC_ClearPendingIRQ 16 static +../Drivers/CMSIS/Include/core_cm4.h:1809:22:__NVIC_SetPriority 16 static +../Drivers/CMSIS/Include/core_cm4.h:1831:26:__NVIC_GetPriority 16 static +../Drivers/CMSIS/Include/core_cm4.h:1856:26:NVIC_EncodePriority 40 static +../Drivers/CMSIS/Include/core_cm4.h:1883:22:NVIC_DecodePriority 40 static +../Drivers/CMSIS/Include/core_cm4.h:1933:34:__NVIC_SystemReset 4 static,ignoring_inline_asm +../Drivers/CMSIS/Include/core_cm4.h:2017:26:SysTick_Config 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:137:6:HAL_NVIC_SetPriorityGrouping 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:159:6:HAL_NVIC_SetPriority 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:179:6:HAL_NVIC_EnableIRQ 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:195:6:HAL_NVIC_DisableIRQ 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:208:6:HAL_NVIC_SystemReset 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:221:10:HAL_SYSTICK_Config 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:250:10:HAL_NVIC_GetPriorityGrouping 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:277:6:HAL_NVIC_GetPriority 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:292:6:HAL_NVIC_SetPendingIRQ 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:310:10:HAL_NVIC_GetPendingIRQ 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:326:6:HAL_NVIC_ClearPendingIRQ 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:343:6:HAL_SYSTICK_CLKSourceConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:361:6:HAL_SYSTICK_IRQHandler 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:370:13:HAL_SYSTICK_Callback 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:382:6:HAL_MPU_Disable 4 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:405:6:HAL_MPU_Enable 16 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:422:6:HAL_MPU_EnableRegion 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:438:6:HAL_MPU_DisableRegion 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c:456:6:HAL_MPU_ConfigRegion 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.cyclo new file mode 100644 index 0000000..9a4c4ad --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.cyclo @@ -0,0 +1,15 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:151:19:HAL_DMA_Init 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:268:19:HAL_DMA_DeInit 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:389:19:HAL_DMA_Start 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:432:19:HAL_DMA_Start_IT 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:502:19:HAL_DMA_Abort 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:564:19:HAL_DMA_Abort_IT 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:625:19:HAL_DMA_PollForTransfer 13 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:754:6:HAL_DMA_IRQHandler 12 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:848:19:HAL_DMA_RegisterCallback 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:899:19:HAL_DMA_UnRegisterCallback 8 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:977:22:HAL_DMA_GetState 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:989:10:HAL_DMA_GetError 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:1015:13:DMA_SetConfig 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:1058:13:DMA_CalcDMAMUXChannelBaseAndMask 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:1092:13:DMA_CalcDMAMUXRequestGenBaseAndMask 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.d new file mode 100644 index 0000000..bf77d0e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o new file mode 100644 index 0000000..f9879c0 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.su new file mode 100644 index 0000000..103a72e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.su @@ -0,0 +1,15 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:151:19:HAL_DMA_Init 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:268:19:HAL_DMA_DeInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:389:19:HAL_DMA_Start 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:432:19:HAL_DMA_Start_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:502:19:HAL_DMA_Abort 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:564:19:HAL_DMA_Abort_IT 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:625:19:HAL_DMA_PollForTransfer 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:754:6:HAL_DMA_IRQHandler 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:848:19:HAL_DMA_RegisterCallback 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:899:19:HAL_DMA_UnRegisterCallback 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:977:22:HAL_DMA_GetState 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:989:10:HAL_DMA_GetError 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:1015:13:DMA_SetConfig 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:1058:13:DMA_CalcDMAMUXChannelBaseAndMask 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c:1092:13:DMA_CalcDMAMUXRequestGenBaseAndMask 24 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.cyclo new file mode 100644 index 0000000..05b6805 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.cyclo @@ -0,0 +1,5 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:95:19:HAL_DMAEx_ConfigMuxSync 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:142:19:HAL_DMAEx_ConfigMuxRequestGenerator 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:182:19:HAL_DMAEx_EnableMuxRequestGenerator 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:209:19:HAL_DMAEx_DisableMuxRequestGenerator 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:236:6:HAL_DMAEx_MUX_IRQHandler 6 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.d new file mode 100644 index 0000000..09cd17c --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o new file mode 100644 index 0000000..6cc587e Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.su new file mode 100644 index 0000000..5ff938e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.su @@ -0,0 +1,5 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:95:19:HAL_DMAEx_ConfigMuxSync 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:142:19:HAL_DMAEx_ConfigMuxRequestGenerator 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:182:19:HAL_DMAEx_EnableMuxRequestGenerator 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:209:19:HAL_DMAEx_DisableMuxRequestGenerator 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c:236:6:HAL_DMAEx_MUX_IRQHandler 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.cyclo new file mode 100644 index 0000000..74f7f66 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.cyclo @@ -0,0 +1,9 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:141:19:HAL_EXTI_SetConfigLine 9 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:266:19:HAL_EXTI_GetConfigLine 9 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:360:19:HAL_EXTI_ClearConfigLine 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:426:19:HAL_EXTI_RegisterCallback 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:453:19:HAL_EXTI_GetHandle 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:494:6:HAL_EXTI_IRQHandler 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:532:10:HAL_EXTI_GetPending 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:570:6:HAL_EXTI_ClearPending 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:600:6:HAL_EXTI_GenerateSWI 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.d new file mode 100644 index 0000000..67fc336 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o new file mode 100644 index 0000000..0bd05ed Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.su new file mode 100644 index 0000000..6b0354e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.su @@ -0,0 +1,9 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:141:19:HAL_EXTI_SetConfigLine 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:266:19:HAL_EXTI_GetConfigLine 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:360:19:HAL_EXTI_ClearConfigLine 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:426:19:HAL_EXTI_RegisterCallback 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:453:19:HAL_EXTI_GetHandle 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:494:6:HAL_EXTI_IRQHandler 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:532:10:HAL_EXTI_GetPending 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:570:6:HAL_EXTI_ClearPending 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c:600:6:HAL_EXTI_GenerateSWI 32 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.cyclo new file mode 100644 index 0000000..7ed4be4 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.cyclo @@ -0,0 +1,14 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:177:19:HAL_FLASH_Program 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:241:19:HAL_FLASH_Program_IT 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:299:6:HAL_FLASH_IRQHandler 10 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:395:13:HAL_FLASH_EndOfOperationCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:412:13:HAL_FLASH_OperationErrorCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:445:19:HAL_FLASH_Unlock 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:469:19:HAL_FLASH_Lock 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:490:19:HAL_FLASH_OB_Unlock 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:515:19:HAL_FLASH_OB_Lock 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:536:19:HAL_FLASH_OB_Launch 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:580:10:HAL_FLASH_GetError 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:604:19:FLASH_WaitForLastOperation 10 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:675:13:FLASH_Program_DoubleWord 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:697:24:FLASH_Program_Fast 3 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.d new file mode 100644 index 0000000..1704f2e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o new file mode 100644 index 0000000..3163f87 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.su new file mode 100644 index 0000000..bc57aa4 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.su @@ -0,0 +1,14 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:177:19:HAL_FLASH_Program 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:241:19:HAL_FLASH_Program_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:299:6:HAL_FLASH_IRQHandler 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:395:13:HAL_FLASH_EndOfOperationCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:412:13:HAL_FLASH_OperationErrorCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:445:19:HAL_FLASH_Unlock 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:469:19:HAL_FLASH_Lock 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:490:19:HAL_FLASH_OB_Unlock 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:515:19:HAL_FLASH_OB_Lock 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:536:19:HAL_FLASH_OB_Launch 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:580:10:HAL_FLASH_GetError 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:604:19:FLASH_WaitForLastOperation 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:675:13:FLASH_Program_DoubleWord 24 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c:697:24:FLASH_Program_Fast 40 static,ignoring_inline_asm diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.cyclo new file mode 100644 index 0000000..190b921 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.cyclo @@ -0,0 +1,26 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:153:19:HAL_FLASHEx_Erase 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:215:19:HAL_FLASHEx_Erase_IT 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:271:19:HAL_FLASHEx_OBProgram 11 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:372:6:HAL_FLASHEx_OBGetConfig 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:413:10:HAL_FLASHEx_FlashEmptyCheck 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:430:6:HAL_FLASHEx_ForceFlashEmpty 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:446:6:HAL_FLASHEx_SuspendOperation 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:460:6:HAL_FLASHEx_AllowOperation 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:476:10:HAL_FLASHEx_IsOperationSuspended 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:507:6:FLASH_PageErase 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:520:13:FLASH_FlushCaches 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:549:13:FLASH_AcknowledgePageErase 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:577:13:FLASH_OB_WRPConfig 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:633:13:FLASH_OB_OptrConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:663:13:FLASH_OB_PCROP1AConfig 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:714:13:FLASH_OB_PCROP1BConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:744:13:FLASH_OB_IPCCBufferAddrConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:761:13:FLASH_OB_SecureConfig 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:848:13:FLASH_OB_GetWRP 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:874:17:FLASH_OB_GetRDP 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:908:17:FLASH_OB_GetUser 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:929:13:FLASH_OB_GetPCROP 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:953:17:FLASH_OB_GetIPCCBufferAddr 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:969:13:FLASH_OB_GetSecureMemoryConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:1008:13:FLASH_OB_GetC2BootResetConfig 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:1026:26:FLASH_OB_ProceedWriteOperation 2 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.d new file mode 100644 index 0000000..f0e320d --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o new file mode 100644 index 0000000..65fe2c6 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.su new file mode 100644 index 0000000..7257d34 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.su @@ -0,0 +1,26 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:153:19:HAL_FLASHEx_Erase 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:215:19:HAL_FLASHEx_Erase_IT 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:271:19:HAL_FLASHEx_OBProgram 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:372:6:HAL_FLASHEx_OBGetConfig 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:413:10:HAL_FLASHEx_FlashEmptyCheck 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:430:6:HAL_FLASHEx_ForceFlashEmpty 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:446:6:HAL_FLASHEx_SuspendOperation 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:460:6:HAL_FLASHEx_AllowOperation 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:476:10:HAL_FLASHEx_IsOperationSuspended 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:507:6:FLASH_PageErase 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:520:13:FLASH_FlushCaches 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:549:13:FLASH_AcknowledgePageErase 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:577:13:FLASH_OB_WRPConfig 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:633:13:FLASH_OB_OptrConfig 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:663:13:FLASH_OB_PCROP1AConfig 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:714:13:FLASH_OB_PCROP1BConfig 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:744:13:FLASH_OB_IPCCBufferAddrConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:761:13:FLASH_OB_SecureConfig 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:848:13:FLASH_OB_GetWRP 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:874:17:FLASH_OB_GetRDP 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:908:17:FLASH_OB_GetUser 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:929:13:FLASH_OB_GetPCROP 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:953:17:FLASH_OB_GetIPCCBufferAddr 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:969:13:FLASH_OB_GetSecureMemoryConfig 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:1008:13:FLASH_OB_GetC2BootResetConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c:1026:26:FLASH_OB_ProceedWriteOperation 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.cyclo new file mode 100644 index 0000000..2458a07 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.cyclo @@ -0,0 +1,9 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:164:6:HAL_GPIO_Init 17 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:288:6:HAL_GPIO_DeInit 9 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:369:15:HAL_GPIO_ReadPin 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:401:6:HAL_GPIO_WritePin 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:431:6:HAL_GPIO_WriteMultipleStatePin 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:450:6:HAL_GPIO_TogglePin 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:475:19:HAL_GPIO_LockPin 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:510:6:HAL_GPIO_EXTI_IRQHandler 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:525:13:HAL_GPIO_EXTI_Callback 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.d new file mode 100644 index 0000000..4215bcc --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o new file mode 100644 index 0000000..f5a564a Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.su new file mode 100644 index 0000000..e38ba42 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.su @@ -0,0 +1,9 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:164:6:HAL_GPIO_Init 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:288:6:HAL_GPIO_DeInit 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:369:15:HAL_GPIO_ReadPin 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:401:6:HAL_GPIO_WritePin 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:431:6:HAL_GPIO_WriteMultipleStatePin 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:450:6:HAL_GPIO_TogglePin 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:475:19:HAL_GPIO_LockPin 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:510:6:HAL_GPIO_EXTI_IRQHandler 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c:525:13:HAL_GPIO_EXTI_Callback 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.cyclo new file mode 100644 index 0000000..8182fdf --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.cyclo @@ -0,0 +1,11 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:159:20:HAL_HSEM_Take 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:184:19:HAL_HSEM_FastTake 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:204:10:HAL_HSEM_IsSemTaken 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:216:7:HAL_HSEM_Release 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:233:6:HAL_HSEM_ReleaseAll 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:265:7:HAL_HSEM_SetClearKey 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:277:10:HAL_HSEM_GetClearKey 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:304:6:HAL_HSEM_ActivateNotification 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:314:6:HAL_HSEM_DeactivateNotification 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:323:6:HAL_HSEM_IRQHandler 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:344:13:HAL_HSEM_FreeCallback 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.d new file mode 100644 index 0000000..9f289b5 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o new file mode 100644 index 0000000..5872afe Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.su new file mode 100644 index 0000000..7573c00 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.su @@ -0,0 +1,11 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:159:20:HAL_HSEM_Take 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:184:19:HAL_HSEM_FastTake 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:204:10:HAL_HSEM_IsSemTaken 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:216:7:HAL_HSEM_Release 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:233:6:HAL_HSEM_ReleaseAll 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:265:7:HAL_HSEM_SetClearKey 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:277:10:HAL_HSEM_GetClearKey 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:304:6:HAL_HSEM_ActivateNotification 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:314:6:HAL_HSEM_DeactivateNotification 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:323:6:HAL_HSEM_IRQHandler 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c:344:13:HAL_HSEM_FreeCallback 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.cyclo new file mode 100644 index 0000000..0c694c2 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.cyclo @@ -0,0 +1,81 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:541:19:HAL_I2C_Init 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:656:19:HAL_I2C_DeInit 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:702:13:HAL_I2C_MspInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:718:13:HAL_I2C_MspDeInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1125:19:HAL_I2C_Master_Transmit 13 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1266:19:HAL_I2C_Master_Receive 12 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1384:19:HAL_I2C_Slave_Transmit 17 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1571:19:HAL_I2C_Slave_Receive 12 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1701:19:HAL_I2C_Master_Transmit_IT 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1791:19:HAL_I2C_Master_Receive_IT 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1860:19:HAL_I2C_Slave_Transmit_IT 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1924:19:HAL_I2C_Slave_Receive_IT 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1977:19:HAL_I2C_Master_Transmit_DMA 9 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2140:19:HAL_I2C_Master_Receive_DMA 8 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2285:19:HAL_I2C_Slave_Transmit_DMA 9 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2421:19:HAL_I2C_Slave_Receive_DMA 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2531:19:HAL_I2C_Mem_Write 15 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2668:19:HAL_I2C_Mem_Read 15 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2805:19:HAL_I2C_Mem_Write_IT 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2893:19:HAL_I2C_Mem_Read_IT 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2981:19:HAL_I2C_Mem_Write_DMA 10 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3127:19:HAL_I2C_Mem_Read_DMA 10 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3273:19:HAL_I2C_IsDeviceReady 17 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3428:19:HAL_I2C_Master_Seq_Transmit_IT 14 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3543:19:HAL_I2C_Master_Seq_Transmit_DMA 19 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3741:19:HAL_I2C_Master_Seq_Receive_IT 9 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3829:19:HAL_I2C_Master_Seq_Receive_DMA 12 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3996:19:HAL_I2C_Slave_Seq_Transmit_IT 11 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4099:19:HAL_I2C_Slave_Seq_Transmit_DMA 17 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4284:19:HAL_I2C_Slave_Seq_Receive_IT 11 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4387:19:HAL_I2C_Slave_Seq_Receive_DMA 17 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4568:19:HAL_I2C_EnableListen_IT 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4592:19:HAL_I2C_DisableListen_IT 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4625:19:HAL_I2C_Master_Abort_IT 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4689:6:HAL_I2C_EV_IRQHandler 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4708:6:HAL_I2C_ER_IRQHandler 8 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4760:13:HAL_I2C_MasterTxCpltCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4776:13:HAL_I2C_MasterRxCpltCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4791:13:HAL_I2C_SlaveTxCpltCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4807:13:HAL_I2C_SlaveRxCpltCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4825:13:HAL_I2C_AddrCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4843:13:HAL_I2C_ListenCpltCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4859:13:HAL_I2C_MemTxCpltCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4875:13:HAL_I2C_MemRxCpltCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4891:13:HAL_I2C_ErrorCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4907:13:HAL_I2C_AbortCpltCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4942:22:HAL_I2C_GetState 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4954:21:HAL_I2C_GetMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4965:10:HAL_I2C_GetError 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4990:26:I2C_Master_ISR_IT 24 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5141:26:I2C_Mem_ISR_IT 20 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5284:26:I2C_Slave_ISR_IT 25 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5425:26:I2C_Master_ISR_DMA 18 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5565:26:I2C_Mem_ISR_DMA 18 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5713:26:I2C_Slave_ISR_DMA 27 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5858:26:I2C_RequestMemoryWrite 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5913:26:I2C_RequestMemoryRead 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5962:13:I2C_ITAddrCplt 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6057:13:I2C_ITMasterSeqCplt 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6110:13:I2C_ITSlaveSeqCplt 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6186:13:I2C_ITMasterCplt 12 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6329:13:I2C_ITSlaveCplt 26 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6547:13:I2C_ITListenCplt 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6598:13:I2C_ITError 19 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6733:13:I2C_TreatErrorCallback 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6771:13:I2C_Flush_TXDR 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6793:13:I2C_DMAMasterTransmitCplt 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6844:13:I2C_DMASlaveTransmitCplt 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6873:13:I2C_DMAMasterReceiveCplt 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6924:13:I2C_DMASlaveReceiveCplt 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6953:13:I2C_DMAError 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6972:13:I2C_DMAAbort 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7003:26:I2C_WaitOnFlagUntilTimeout 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7043:26:I2C_WaitOnTXISFlagUntilTimeout 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7084:26:I2C_WaitOnSTOPFlagUntilTimeout 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7122:26:I2C_WaitOnRXNEFlagUntilTimeout 13 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7199:26:I2C_IsErrorOccurred 17 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7340:13:I2C_TransferConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7369:13:I2C_Enable_IRQ 15 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7464:13:I2C_Disable_IRQ 9 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7527:13:I2C_ConvertOtherXferOptions 3 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.d new file mode 100644 index 0000000..71c91d2 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o new file mode 100644 index 0000000..db86658 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.su new file mode 100644 index 0000000..820c5ab --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.su @@ -0,0 +1,81 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:541:19:HAL_I2C_Init 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:656:19:HAL_I2C_DeInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:702:13:HAL_I2C_MspInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:718:13:HAL_I2C_MspDeInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1125:19:HAL_I2C_Master_Transmit 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1266:19:HAL_I2C_Master_Receive 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1384:19:HAL_I2C_Slave_Transmit 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1571:19:HAL_I2C_Slave_Receive 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1701:19:HAL_I2C_Master_Transmit_IT 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1791:19:HAL_I2C_Master_Receive_IT 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1860:19:HAL_I2C_Slave_Transmit_IT 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1924:19:HAL_I2C_Slave_Receive_IT 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:1977:19:HAL_I2C_Master_Transmit_DMA 48 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2140:19:HAL_I2C_Master_Receive_DMA 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2285:19:HAL_I2C_Slave_Transmit_DMA 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2421:19:HAL_I2C_Slave_Receive_DMA 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2531:19:HAL_I2C_Mem_Write 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2668:19:HAL_I2C_Mem_Read 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2805:19:HAL_I2C_Mem_Write_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2893:19:HAL_I2C_Mem_Read_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:2981:19:HAL_I2C_Mem_Write_DMA 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3127:19:HAL_I2C_Mem_Read_DMA 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3273:19:HAL_I2C_IsDeviceReady 48 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3428:19:HAL_I2C_Master_Seq_Transmit_IT 48 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3543:19:HAL_I2C_Master_Seq_Transmit_DMA 48 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3741:19:HAL_I2C_Master_Seq_Receive_IT 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3829:19:HAL_I2C_Master_Seq_Receive_DMA 48 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:3996:19:HAL_I2C_Slave_Seq_Transmit_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4099:19:HAL_I2C_Slave_Seq_Transmit_DMA 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4284:19:HAL_I2C_Slave_Seq_Receive_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4387:19:HAL_I2C_Slave_Seq_Receive_DMA 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4568:19:HAL_I2C_EnableListen_IT 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4592:19:HAL_I2C_DisableListen_IT 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4625:19:HAL_I2C_Master_Abort_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4689:6:HAL_I2C_EV_IRQHandler 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4708:6:HAL_I2C_ER_IRQHandler 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4760:13:HAL_I2C_MasterTxCpltCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4776:13:HAL_I2C_MasterRxCpltCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4791:13:HAL_I2C_SlaveTxCpltCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4807:13:HAL_I2C_SlaveRxCpltCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4825:13:HAL_I2C_AddrCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4843:13:HAL_I2C_ListenCpltCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4859:13:HAL_I2C_MemTxCpltCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4875:13:HAL_I2C_MemRxCpltCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4891:13:HAL_I2C_ErrorCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4907:13:HAL_I2C_AbortCpltCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4942:22:HAL_I2C_GetState 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4954:21:HAL_I2C_GetMode 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4965:10:HAL_I2C_GetError 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:4990:26:I2C_Master_ISR_IT 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5141:26:I2C_Mem_ISR_IT 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5284:26:I2C_Slave_ISR_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5425:26:I2C_Master_ISR_DMA 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5565:26:I2C_Mem_ISR_DMA 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5713:26:I2C_Slave_ISR_DMA 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5858:26:I2C_RequestMemoryWrite 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5913:26:I2C_RequestMemoryRead 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:5962:13:I2C_ITAddrCplt 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6057:13:I2C_ITMasterSeqCplt 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6110:13:I2C_ITSlaveSeqCplt 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6186:13:I2C_ITMasterCplt 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6329:13:I2C_ITSlaveCplt 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6547:13:I2C_ITListenCplt 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6598:13:I2C_ITError 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6733:13:I2C_TreatErrorCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6771:13:I2C_Flush_TXDR 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6793:13:I2C_DMAMasterTransmitCplt 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6844:13:I2C_DMASlaveTransmitCplt 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6873:13:I2C_DMAMasterReceiveCplt 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6924:13:I2C_DMASlaveReceiveCplt 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6953:13:I2C_DMAError 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:6972:13:I2C_DMAAbort 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7003:26:I2C_WaitOnFlagUntilTimeout 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7043:26:I2C_WaitOnTXISFlagUntilTimeout 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7084:26:I2C_WaitOnSTOPFlagUntilTimeout 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7122:26:I2C_WaitOnRXNEFlagUntilTimeout 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7199:26:I2C_IsErrorOccurred 48 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7340:13:I2C_TransferConfig 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7369:13:I2C_Enable_IRQ 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7464:13:I2C_Disable_IRQ 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c:7527:13:I2C_ConvertOtherXferOptions 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.cyclo new file mode 100644 index 0000000..e282bc9 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.cyclo @@ -0,0 +1,6 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:96:19:HAL_I2CEx_ConfigAnalogFilter 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:140:19:HAL_I2CEx_ConfigDigitalFilter 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:208:19:HAL_I2CEx_EnableWakeUp 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:247:19:HAL_I2CEx_DisableWakeUp 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:310:6:HAL_I2CEx_EnableFastModePlus 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:332:6:HAL_I2CEx_DisableFastModePlus 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.d new file mode 100644 index 0000000..28d4107 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o new file mode 100644 index 0000000..304ae94 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.su new file mode 100644 index 0000000..855036c --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.su @@ -0,0 +1,6 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:96:19:HAL_I2CEx_ConfigAnalogFilter 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:140:19:HAL_I2CEx_ConfigDigitalFilter 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:208:19:HAL_I2CEx_EnableWakeUp 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:247:19:HAL_I2CEx_DisableWakeUp 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:310:6:HAL_I2CEx_EnableFastModePlus 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c:332:6:HAL_I2CEx_DisableFastModePlus 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.cyclo new file mode 100644 index 0000000..b1de92d --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.cyclo @@ -0,0 +1,17 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:126:19:HAL_IPCC_Init 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:171:19:HAL_IPCC_DeInit 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:211:13:HAL_IPCC_MspInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:226:13:HAL_IPCC_MspDeInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:304:19:HAL_IPCC_ActivateNotification 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:363:19:HAL_IPCC_DeActivateNotification 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:418:27:HAL_IPCC_GetChannelStatus 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:455:19:HAL_IPCC_NotifyCPU 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:502:6:HAL_IPCC_TX_IRQHandler 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:536:6:HAL_IPCC_RX_IRQHandler 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:579:13:HAL_IPCC_RxCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:604:13:HAL_IPCC_TxCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:640:23:HAL_IPCC_GetState 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:669:6:IPCC_MaskInterrupt 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:695:6:IPCC_UnmaskInterrupt 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:714:6:IPCC_SetDefaultCallbacks 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:729:6:IPCC_Reset_Register 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.d new file mode 100644 index 0000000..e6a19a6 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o new file mode 100644 index 0000000..3a1ca47 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.su new file mode 100644 index 0000000..8a0c063 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.su @@ -0,0 +1,17 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:126:19:HAL_IPCC_Init 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:171:19:HAL_IPCC_DeInit 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:211:13:HAL_IPCC_MspInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:226:13:HAL_IPCC_MspDeInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:304:19:HAL_IPCC_ActivateNotification 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:363:19:HAL_IPCC_DeActivateNotification 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:418:27:HAL_IPCC_GetChannelStatus 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:455:19:HAL_IPCC_NotifyCPU 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:502:6:HAL_IPCC_TX_IRQHandler 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:536:6:HAL_IPCC_RX_IRQHandler 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:579:13:HAL_IPCC_RxCallback 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:604:13:HAL_IPCC_TxCallback 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:640:23:HAL_IPCC_GetState 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:669:6:IPCC_MaskInterrupt 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:695:6:IPCC_UnmaskInterrupt 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:714:6:IPCC_SetDefaultCallbacks 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c:729:6:IPCC_Reset_Register 16 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.cyclo new file mode 100644 index 0000000..c978bff --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.cyclo @@ -0,0 +1,23 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:322:22:LL_EXTI_EnableIT_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:460:22:LL_EXTI_DisableIT_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:503:22:LL_C2_EXTI_DisableIT_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1029:22:LL_EXTI_EnableRisingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1093:22:LL_EXTI_DisableRisingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1217:22:LL_EXTI_EnableFallingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1281:22:LL_EXTI_DisableFallingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:100:6:HAL_PWR_DeInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:186:6:HAL_PWR_EnableBkUpAccess 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:196:6:HAL_PWR_DisableBkUpAccess 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:388:19:HAL_PWR_ConfigPVD 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:432:6:HAL_PWR_EnablePVD 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:442:6:HAL_PWR_DisablePVD 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:466:6:HAL_PWR_EnableWakeUpPin 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:489:6:HAL_PWR_DisableWakeUpPin 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:520:6:HAL_PWR_EnterSLEEPMode 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:602:6:HAL_PWR_EnterSTOPMode 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:638:6:HAL_PWR_EnterSTANDBYMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:669:6:HAL_PWR_EnableSleepOnExit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:681:6:HAL_PWR_DisableSleepOnExit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:694:6:HAL_PWR_EnableSEVOnPend 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:707:6:HAL_PWR_DisableSEVOnPend 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:718:13:HAL_PWR_PVDCallback 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.d new file mode 100644 index 0000000..a8b268e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o new file mode 100644 index 0000000..736d49e Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.su new file mode 100644 index 0000000..bb980df --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.su @@ -0,0 +1,23 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:322:22:LL_EXTI_EnableIT_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:460:22:LL_EXTI_DisableIT_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:503:22:LL_C2_EXTI_DisableIT_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1029:22:LL_EXTI_EnableRisingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1093:22:LL_EXTI_DisableRisingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1217:22:LL_EXTI_EnableFallingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1281:22:LL_EXTI_DisableFallingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:100:6:HAL_PWR_DeInit 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:186:6:HAL_PWR_EnableBkUpAccess 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:196:6:HAL_PWR_DisableBkUpAccess 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:388:19:HAL_PWR_ConfigPVD 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:432:6:HAL_PWR_EnablePVD 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:442:6:HAL_PWR_DisablePVD 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:466:6:HAL_PWR_EnableWakeUpPin 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:489:6:HAL_PWR_DisableWakeUpPin 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:520:6:HAL_PWR_EnterSLEEPMode 16 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:602:6:HAL_PWR_EnterSTOPMode 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:638:6:HAL_PWR_EnterSTANDBYMode 4 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:669:6:HAL_PWR_EnableSleepOnExit 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:681:6:HAL_PWR_DisableSleepOnExit 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:694:6:HAL_PWR_EnableSEVOnPend 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:707:6:HAL_PWR_DisableSEVOnPend 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c:718:13:HAL_PWR_PVDCallback 4 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.cyclo new file mode 100644 index 0000000..5041898 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.cyclo @@ -0,0 +1,78 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:827:22:LL_PWR_EnableSRAM2Retention 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:839:22:LL_PWR_DisableSRAM2Retention 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1293:22:LL_PWR_SetBORConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1305:26:LL_PWR_GetBORConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1615:22:LL_PWR_EnableBootC2 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1626:22:LL_PWR_DisableBootC2 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:322:22:LL_EXTI_EnableIT_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:391:22:LL_EXTI_EnableIT_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:460:22:LL_EXTI_DisableIT_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:529:22:LL_EXTI_DisableIT_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:734:22:LL_EXTI_EnableEvent_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:780:22:LL_EXTI_EnableEvent_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:825:22:LL_EXTI_DisableEvent_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:872:22:LL_EXTI_DisableEvent_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1029:22:LL_EXTI_EnableRisingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1051:22:LL_EXTI_EnableRisingTrig_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1093:22:LL_EXTI_DisableRisingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1116:22:LL_EXTI_DisableRisingTrig_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1217:22:LL_EXTI_EnableFallingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1239:22:LL_EXTI_EnableFallingTrig_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1281:22:LL_EXTI_DisableFallingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1302:22:LL_EXTI_DisableFallingTrig_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1520:26:LL_EXTI_ReadFlag_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1537:26:LL_EXTI_ReadFlag_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1574:22:LL_EXTI_ClearFlag_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1591:22:LL_EXTI_ClearFlag_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:86:10:HAL_PWREx_GetVoltageRange 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:111:19:HAL_PWREx_ControlVoltageScaling 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:162:6:HAL_PWREx_EnableBatteryCharging 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:177:6:HAL_PWREx_DisableBatteryCharging 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:189:6:HAL_PWREx_EnableVddUSB 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:198:6:HAL_PWREx_DisableVddUSB 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:210:6:HAL_PWREx_EnableInternalWakeUpLine 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:219:6:HAL_PWREx_DisableInternalWakeUpLine 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:230:6:HAL_PWREx_EnableBORH_SMPSBypassIT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:240:6:HAL_PWREx_DisableBORH_SMPSBypassIT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:250:6:HAL_PWREx_EnableRFPhaseIT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:259:6:HAL_PWREx_DisableRFPhaseIT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:269:6:HAL_PWREx_EnableBLEActivityIT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:278:6:HAL_PWREx_DisableBLEActivityIT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:288:6:HAL_PWREx_Enable802ActivityIT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:297:6:HAL_PWREx_Disable802ActivityIT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:307:6:HAL_PWREx_EnableHOLDC2IT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:316:6:HAL_PWREx_DisableHOLDC2IT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:344:19:HAL_PWREx_EnableGPIOPullUp 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:402:19:HAL_PWREx_DisableGPIOPullUp 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:462:19:HAL_PWREx_EnableGPIOPullDown 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:520:19:HAL_PWREx_DisableGPIOPullDown 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:567:6:HAL_PWREx_EnablePullUpPullDownConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:578:6:HAL_PWREx_DisablePullUpPullDownConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:592:6:HAL_PWREx_SetBORConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:603:10:HAL_PWREx_GetBORConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:618:6:HAL_PWREx_HoldCore 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:633:6:HAL_PWREx_ReleaseCore 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:650:6:HAL_PWREx_EnableSRAMRetention 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:663:6:HAL_PWREx_DisableSRAMRetention 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:678:6:HAL_PWREx_EnableFlashPowerDown 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:701:6:HAL_PWREx_DisableFlashPowerDown 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:715:6:HAL_PWREx_EnablePVM1 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:724:6:HAL_PWREx_DisablePVM1 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:734:6:HAL_PWREx_EnablePVM3 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:743:6:HAL_PWREx_DisablePVM3 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:763:19:HAL_PWREx_ConfigPVM 11 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:861:19:HAL_PWREx_ConfigSMPS 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:921:6:HAL_PWREx_SMPS_SetMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:946:10:HAL_PWREx_SMPS_GetEffectiveMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:974:6:HAL_PWREx_EnableWakeUpPin 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1004:11:HAL_PWREx_GetWakeupFlag 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1020:19:HAL_PWREx_ClearWakeupFlag 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1043:6:HAL_PWREx_EnableLowPowerRunMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1058:19:HAL_PWREx_DisableLowPowerRunMode 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1107:6:HAL_PWREx_EnterSTOP0Mode 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1160:6:HAL_PWREx_EnterSTOP1Mode 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1223:6:HAL_PWREx_EnterSTOP2Mode 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1264:6:HAL_PWREx_EnterSHUTDOWNMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1293:6:HAL_PWREx_PVD_PVM_IRQHandler 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1332:13:HAL_PWREx_PVM1Callback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1344:13:HAL_PWREx_PVM3Callback 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.d new file mode 100644 index 0000000..76d2dd2 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o new file mode 100644 index 0000000..0fd85a1 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.su new file mode 100644 index 0000000..c722071 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.su @@ -0,0 +1,78 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:827:22:LL_PWR_EnableSRAM2Retention 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:839:22:LL_PWR_DisableSRAM2Retention 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1293:22:LL_PWR_SetBORConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1305:26:LL_PWR_GetBORConfig 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1615:22:LL_PWR_EnableBootC2 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1626:22:LL_PWR_DisableBootC2 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:322:22:LL_EXTI_EnableIT_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:391:22:LL_EXTI_EnableIT_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:460:22:LL_EXTI_DisableIT_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:529:22:LL_EXTI_DisableIT_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:734:22:LL_EXTI_EnableEvent_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:780:22:LL_EXTI_EnableEvent_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:825:22:LL_EXTI_DisableEvent_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:872:22:LL_EXTI_DisableEvent_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1029:22:LL_EXTI_EnableRisingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1051:22:LL_EXTI_EnableRisingTrig_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1093:22:LL_EXTI_DisableRisingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1116:22:LL_EXTI_DisableRisingTrig_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1217:22:LL_EXTI_EnableFallingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1239:22:LL_EXTI_EnableFallingTrig_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1281:22:LL_EXTI_DisableFallingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1302:22:LL_EXTI_DisableFallingTrig_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1520:26:LL_EXTI_ReadFlag_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1537:26:LL_EXTI_ReadFlag_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1574:22:LL_EXTI_ClearFlag_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1591:22:LL_EXTI_ClearFlag_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:86:10:HAL_PWREx_GetVoltageRange 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:111:19:HAL_PWREx_ControlVoltageScaling 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:162:6:HAL_PWREx_EnableBatteryCharging 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:177:6:HAL_PWREx_DisableBatteryCharging 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:189:6:HAL_PWREx_EnableVddUSB 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:198:6:HAL_PWREx_DisableVddUSB 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:210:6:HAL_PWREx_EnableInternalWakeUpLine 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:219:6:HAL_PWREx_DisableInternalWakeUpLine 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:230:6:HAL_PWREx_EnableBORH_SMPSBypassIT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:240:6:HAL_PWREx_DisableBORH_SMPSBypassIT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:250:6:HAL_PWREx_EnableRFPhaseIT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:259:6:HAL_PWREx_DisableRFPhaseIT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:269:6:HAL_PWREx_EnableBLEActivityIT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:278:6:HAL_PWREx_DisableBLEActivityIT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:288:6:HAL_PWREx_Enable802ActivityIT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:297:6:HAL_PWREx_Disable802ActivityIT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:307:6:HAL_PWREx_EnableHOLDC2IT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:316:6:HAL_PWREx_DisableHOLDC2IT 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:344:19:HAL_PWREx_EnableGPIOPullUp 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:402:19:HAL_PWREx_DisableGPIOPullUp 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:462:19:HAL_PWREx_EnableGPIOPullDown 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:520:19:HAL_PWREx_DisableGPIOPullDown 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:567:6:HAL_PWREx_EnablePullUpPullDownConfig 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:578:6:HAL_PWREx_DisablePullUpPullDownConfig 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:592:6:HAL_PWREx_SetBORConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:603:10:HAL_PWREx_GetBORConfig 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:618:6:HAL_PWREx_HoldCore 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:633:6:HAL_PWREx_ReleaseCore 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:650:6:HAL_PWREx_EnableSRAMRetention 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:663:6:HAL_PWREx_DisableSRAMRetention 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:678:6:HAL_PWREx_EnableFlashPowerDown 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:701:6:HAL_PWREx_DisableFlashPowerDown 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:715:6:HAL_PWREx_EnablePVM1 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:724:6:HAL_PWREx_DisablePVM1 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:734:6:HAL_PWREx_EnablePVM3 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:743:6:HAL_PWREx_DisablePVM3 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:763:19:HAL_PWREx_ConfigPVM 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:861:19:HAL_PWREx_ConfigSMPS 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:921:6:HAL_PWREx_SMPS_SetMode 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:946:10:HAL_PWREx_SMPS_GetEffectiveMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:974:6:HAL_PWREx_EnableWakeUpPin 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1004:11:HAL_PWREx_GetWakeupFlag 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1020:19:HAL_PWREx_ClearWakeupFlag 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1043:6:HAL_PWREx_EnableLowPowerRunMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1058:19:HAL_PWREx_DisableLowPowerRunMode 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1107:6:HAL_PWREx_EnterSTOP0Mode 16 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1160:6:HAL_PWREx_EnterSTOP1Mode 16 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1223:6:HAL_PWREx_EnterSTOP2Mode 16 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1264:6:HAL_PWREx_EnterSHUTDOWNMode 4 static,ignoring_inline_asm +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1293:6:HAL_PWREx_PVD_PVM_IRQHandler 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1332:13:HAL_PWREx_PVM1Callback 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c:1344:13:HAL_PWREx_PVM3Callback 4 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.cyclo new file mode 100644 index 0000000..d4e477d --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.cyclo @@ -0,0 +1,75 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1298:26:LL_RCC_HSE_IsEnabledDiv2 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1308:22:LL_RCC_HSE_EnableCSS 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1318:22:LL_RCC_HSE_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1328:22:LL_RCC_HSE_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1338:26:LL_RCC_HSE_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1480:22:LL_RCC_HSI_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1490:22:LL_RCC_HSI_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1500:26:LL_RCC_HSI_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1545:22:LL_RCC_HSI_SetCalibTrimming 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1574:22:LL_RCC_HSI48_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1584:22:LL_RCC_HSI48_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1594:26:LL_RCC_HSI48_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1623:22:LL_RCC_LSE_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1633:22:LL_RCC_LSE_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1653:22:LL_RCC_LSE_EnableBypass 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1663:22:LL_RCC_LSE_DisableBypass 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1725:26:LL_RCC_LSE_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1753:22:LL_RCC_LSI1_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1763:22:LL_RCC_LSI1_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1773:26:LL_RCC_LSI1_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1791:22:LL_RCC_LSI2_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1801:22:LL_RCC_LSI2_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1811:26:LL_RCC_LSI2_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1822:22:LL_RCC_LSI2_SetTrimming 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1850:22:LL_RCC_MSI_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1860:22:LL_RCC_MSI_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1870:26:LL_RCC_MSI_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1896:22:LL_RCC_MSI_DisablePLLMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1920:22:LL_RCC_MSI_SetRange 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1942:26:LL_RCC_MSI_GetRange 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1972:22:LL_RCC_MSI_SetCalibTrimming 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2058:22:LL_RCC_SetSysClkSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2072:26:LL_RCC_GetSysClkSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2152:22:LL_RCC_SetAHBPrescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2177:22:LL_C2_RCC_SetAHBPrescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2202:22:LL_RCC_SetAHB4Prescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2218:22:LL_RCC_SetAPB1Prescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2234:22:LL_RCC_SetAPB2Prescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2258:26:LL_RCC_GetAHBPrescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2282:26:LL_C2_RCC_GetAHBPrescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2306:26:LL_RCC_GetAHB4Prescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2321:26:LL_RCC_GetAPB1Prescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2336:26:LL_RCC_GetAPB2Prescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2484:22:LL_RCC_ConfigMCO 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2942:22:LL_RCC_PLL_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2953:22:LL_RCC_PLL_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2963:26:LL_RCC_PLL_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3181:26:LL_RCC_PLL_GetN 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3259:26:LL_RCC_PLL_GetR 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3277:26:LL_RCC_PLL_GetDivider 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3447:26:LL_RCC_PLLSAI1_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3879:26:LL_RCC_PLL_GetMainSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4057:26:LL_RCC_IsActiveFlag_HPRE 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4067:26:LL_RCC_IsActiveFlag_C2HPRE 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4077:26:LL_RCC_IsActiveFlag_SHDHPRE 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4088:26:LL_RCC_IsActiveFlag_PPRE1 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4098:26:LL_RCC_IsActiveFlag_PPRE2 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:266:19:HAL_RCC_DeInit 10 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:384:19:HAL_RCC_OscConfig 93 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1056:19:HAL_RCC_ClockConfig 33 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1317:6:HAL_RCC_MCOConfig 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1405:10:HAL_RCC_GetSysClockFreq 8 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1470:10:HAL_RCC_GetHCLKFreq 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1480:10:HAL_RCC_GetHCLK2Freq 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1490:10:HAL_RCC_GetHCLK4Freq 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1502:10:HAL_RCC_GetPCLK1Freq 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1514:10:HAL_RCC_GetPCLK2Freq 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1527:6:HAL_RCC_GetOscConfig 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1600:6:HAL_RCC_GetClockConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1642:6:HAL_RCC_EnableCSS 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1652:6:HAL_RCC_NMI_IRQHandler 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1669:13:HAL_RCC_CSSCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1683:10:HAL_RCC_GetResetSource 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1715:26:RCC_SetFlashLatencyFromMSIRange 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1749:26:RCC_SetFlashLatency 8 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.d new file mode 100644 index 0000000..53136ce --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o new file mode 100644 index 0000000..6c04f63 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.su new file mode 100644 index 0000000..eea5e20 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.su @@ -0,0 +1,75 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1298:26:LL_RCC_HSE_IsEnabledDiv2 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1308:22:LL_RCC_HSE_EnableCSS 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1318:22:LL_RCC_HSE_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1328:22:LL_RCC_HSE_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1338:26:LL_RCC_HSE_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1480:22:LL_RCC_HSI_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1490:22:LL_RCC_HSI_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1500:26:LL_RCC_HSI_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1545:22:LL_RCC_HSI_SetCalibTrimming 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1574:22:LL_RCC_HSI48_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1584:22:LL_RCC_HSI48_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1594:26:LL_RCC_HSI48_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1623:22:LL_RCC_LSE_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1633:22:LL_RCC_LSE_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1653:22:LL_RCC_LSE_EnableBypass 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1663:22:LL_RCC_LSE_DisableBypass 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1725:26:LL_RCC_LSE_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1753:22:LL_RCC_LSI1_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1763:22:LL_RCC_LSI1_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1773:26:LL_RCC_LSI1_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1791:22:LL_RCC_LSI2_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1801:22:LL_RCC_LSI2_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1811:26:LL_RCC_LSI2_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1822:22:LL_RCC_LSI2_SetTrimming 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1850:22:LL_RCC_MSI_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1860:22:LL_RCC_MSI_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1870:26:LL_RCC_MSI_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1896:22:LL_RCC_MSI_DisablePLLMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1920:22:LL_RCC_MSI_SetRange 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1942:26:LL_RCC_MSI_GetRange 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1972:22:LL_RCC_MSI_SetCalibTrimming 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2058:22:LL_RCC_SetSysClkSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2072:26:LL_RCC_GetSysClkSource 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2152:22:LL_RCC_SetAHBPrescaler 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2177:22:LL_C2_RCC_SetAHBPrescaler 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2202:22:LL_RCC_SetAHB4Prescaler 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2218:22:LL_RCC_SetAPB1Prescaler 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2234:22:LL_RCC_SetAPB2Prescaler 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2258:26:LL_RCC_GetAHBPrescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2282:26:LL_C2_RCC_GetAHBPrescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2306:26:LL_RCC_GetAHB4Prescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2321:26:LL_RCC_GetAPB1Prescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2336:26:LL_RCC_GetAPB2Prescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2484:22:LL_RCC_ConfigMCO 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2942:22:LL_RCC_PLL_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2953:22:LL_RCC_PLL_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2963:26:LL_RCC_PLL_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3181:26:LL_RCC_PLL_GetN 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3259:26:LL_RCC_PLL_GetR 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3277:26:LL_RCC_PLL_GetDivider 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3447:26:LL_RCC_PLLSAI1_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3879:26:LL_RCC_PLL_GetMainSource 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4057:26:LL_RCC_IsActiveFlag_HPRE 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4067:26:LL_RCC_IsActiveFlag_C2HPRE 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4077:26:LL_RCC_IsActiveFlag_SHDHPRE 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4088:26:LL_RCC_IsActiveFlag_PPRE1 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:4098:26:LL_RCC_IsActiveFlag_PPRE2 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:266:19:HAL_RCC_DeInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:384:19:HAL_RCC_OscConfig 64 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1056:19:HAL_RCC_ClockConfig 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1317:6:HAL_RCC_MCOConfig 56 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1405:10:HAL_RCC_GetSysClockFreq 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1470:10:HAL_RCC_GetHCLKFreq 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1480:10:HAL_RCC_GetHCLK2Freq 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1490:10:HAL_RCC_GetHCLK4Freq 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1502:10:HAL_RCC_GetPCLK1Freq 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1514:10:HAL_RCC_GetPCLK2Freq 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1527:6:HAL_RCC_GetOscConfig 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1600:6:HAL_RCC_GetClockConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1642:6:HAL_RCC_EnableCSS 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1652:6:HAL_RCC_NMI_IRQHandler 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1669:13:HAL_RCC_CSSCallback 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1683:10:HAL_RCC_GetResetSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1715:26:RCC_SetFlashLatencyFromMSIRange 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c:1749:26:RCC_SetFlashLatency 88 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.cyclo new file mode 100644 index 0000000..4bc96da --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.cyclo @@ -0,0 +1,111 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:322:22:LL_EXTI_EnableIT_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1029:22:LL_EXTI_EnableRisingTrig_0_31 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1298:26:LL_RCC_HSE_IsEnabledDiv2 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1338:26:LL_RCC_HSE_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1500:26:LL_RCC_HSI_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1594:26:LL_RCC_HSI48_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1643:26:LL_RCC_LSE_IsEnabled 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1703:22:LL_RCC_LSE_EnableCSS 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1715:22:LL_RCC_LSE_DisableCSS 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1725:26:LL_RCC_LSE_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1773:26:LL_RCC_LSI1_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1811:26:LL_RCC_LSI2_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1822:22:LL_RCC_LSI2_SetTrimming 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1870:26:LL_RCC_MSI_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1884:22:LL_RCC_MSI_EnablePLLMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1896:22:LL_RCC_MSI_DisablePLLMode 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1942:26:LL_RCC_MSI_GetRange 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2010:22:LL_RCC_LSCO_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2101:22:LL_RCC_SetRFWKPClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2117:26:LL_RCC_GetRFWKPClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2258:26:LL_RCC_GetAHBPrescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2321:26:LL_RCC_GetAPB1Prescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2336:26:LL_RCC_GetAPB2Prescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2349:22:LL_RCC_SetClkAfterWakeFromStop 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2388:22:LL_RCC_SetSMPSClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2401:26:LL_RCC_GetSMPSClockSelection 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2416:26:LL_RCC_GetSMPSClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2431:22:LL_RCC_SetSMPSPrescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2445:26:LL_RCC_GetSMPSPrescaler 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2507:22:LL_RCC_SetUSARTClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2523:22:LL_RCC_SetLPUARTClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2542:22:LL_RCC_SetI2CClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2561:22:LL_RCC_SetLPTIMClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2577:22:LL_RCC_SetSAIClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2593:22:LL_RCC_SetRNGClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2609:22:LL_RCC_SetCLK48ClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2625:22:LL_RCC_SetUSBClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2671:22:LL_RCC_SetADCClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2688:26:LL_RCC_GetUSARTClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2705:26:LL_RCC_GetLPUARTClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2726:26:LL_RCC_GetI2CClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2747:26:LL_RCC_GetLPTIMClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2764:26:LL_RCC_GetSAIClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2780:26:LL_RCC_GetRNGClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2797:26:LL_RCC_GetCLK48ClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2814:26:LL_RCC_GetUSBClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2833:26:LL_RCC_GetADCClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2859:22:LL_RCC_SetRTCClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2873:26:LL_RCC_GetRTCClockSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2913:22:LL_RCC_ForceBackupDomainReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2923:22:LL_RCC_ReleaseBackupDomainReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2963:26:LL_RCC_PLL_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3181:26:LL_RCC_PLL_GetN 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3223:26:LL_RCC_PLL_GetP 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3241:26:LL_RCC_PLL_GetQ 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3277:26:LL_RCC_PLL_GetDivider 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3427:22:LL_RCC_PLLSAI1_Enable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3437:22:LL_RCC_PLLSAI1_Disable 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3447:26:LL_RCC_PLLSAI1_IsReady 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3605:26:LL_RCC_PLLSAI1_GetN 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3647:26:LL_RCC_PLLSAI1_GetP 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3665:26:LL_RCC_PLLSAI1_GetQ 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3683:26:LL_RCC_PLLSAI1_GetR 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3879:26:LL_RCC_PLL_GetMainSource 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:539:22:LL_AHB2_GRP1_EnableClock 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1081:22:LL_APB1_GRP1_ForceReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1125:22:LL_APB1_GRP1_ReleaseReset 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:308:26:LL_CRS_GetHSI48SmoothTrimming 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:331:26:LL_CRS_GetReloadCounter 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:486:22:LL_CRS_GenerateEvent_SWSYNC 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:499:26:LL_CRS_GetFreqErrorDirection 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:509:26:LL_CRS_GetFreqErrorCapture 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:597:22:LL_CRS_ClearFlag_SYNCOK 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:607:22:LL_CRS_ClearFlag_SYNCWARN 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:618:22:LL_CRS_ClearFlag_ERR 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:628:22:LL_CRS_ClearFlag_ESYNC 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:147:19:HAL_RCCEx_PeriphCLKConfig 36 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:439:6:HAL_RCCEx_GetPeriphCLKConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:550:10:HAL_RCCEx_GetPeriphCLKFreq 99 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1138:10:HAL_RCCEx_GetRngCLKSource 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1179:19:HAL_RCCEx_EnablePLLSAI1 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1239:19:HAL_RCCEx_DisablePLLSAI1 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1279:6:HAL_RCCEx_WakeUpStopCLKConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1293:6:HAL_RCCEx_EnableLSECSS 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1303:6:HAL_RCCEx_DisableLSECSS 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1316:6:HAL_RCCEx_EnableLSECSS_IT 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1333:6:HAL_RCCEx_LSECSS_IRQHandler 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1350:13:HAL_RCCEx_LSECSS_Callback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1371:6:HAL_RCCEx_LSCOConfig 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1449:6:HAL_RCCEx_EnableLSCO 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1462:6:HAL_RCCEx_DisableLSCO 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1473:6:HAL_RCCEx_EnableMSIPLLMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1483:6:HAL_RCCEx_DisableMSIPLLMode 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1499:19:HAL_RCCEx_TrimOsc 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1600:6:HAL_RCCEx_CRSConfig 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1642:6:HAL_RCCEx_CRSSoftwareSynchronizationGenerate 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1652:6:HAL_RCCEx_CRSGetSynchronizationInfo 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1685:10:HAL_RCCEx_CRSWaitSynchronization 11 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1768:6:HAL_RCCEx_CRS_IRQHandler 12 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1833:13:HAL_RCCEx_CRS_SyncOkCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1844:13:HAL_RCCEx_CRS_SyncWarnCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1855:13:HAL_RCCEx_CRS_ExpectedSyncCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1871:13:HAL_RCCEx_CRS_ErrorCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1904:26:RCCEx_PLLSAI1_ConfigNP 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1973:26:RCCEx_PLLSAI1_ConfigNQ 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2041:26:RCCEx_PLLSAI1_ConfigNR 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2105:17:RCC_PLL_GetFreqDomain_P 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2148:17:RCC_PLL_GetFreqDomain_Q 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2193:17:RCC_PLLSAI1_GetFreqDomain_R 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2235:17:RCC_PLLSAI1_GetFreqDomain_P 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2277:17:RCC_PLLSAI1_GetFreqDomain_Q 6 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.d new file mode 100644 index 0000000..aa0535e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o new file mode 100644 index 0000000..ea95a8c Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.su new file mode 100644 index 0000000..66c32b3 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.su @@ -0,0 +1,111 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:322:22:LL_EXTI_EnableIT_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1029:22:LL_EXTI_EnableRisingTrig_0_31 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1298:26:LL_RCC_HSE_IsEnabledDiv2 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1338:26:LL_RCC_HSE_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1500:26:LL_RCC_HSI_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1594:26:LL_RCC_HSI48_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1643:26:LL_RCC_LSE_IsEnabled 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1703:22:LL_RCC_LSE_EnableCSS 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1715:22:LL_RCC_LSE_DisableCSS 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1725:26:LL_RCC_LSE_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1773:26:LL_RCC_LSI1_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1811:26:LL_RCC_LSI2_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1822:22:LL_RCC_LSI2_SetTrimming 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1870:26:LL_RCC_MSI_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1884:22:LL_RCC_MSI_EnablePLLMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1896:22:LL_RCC_MSI_DisablePLLMode 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:1942:26:LL_RCC_MSI_GetRange 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2010:22:LL_RCC_LSCO_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2101:22:LL_RCC_SetRFWKPClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2117:26:LL_RCC_GetRFWKPClockSource 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2258:26:LL_RCC_GetAHBPrescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2321:26:LL_RCC_GetAPB1Prescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2336:26:LL_RCC_GetAPB2Prescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2349:22:LL_RCC_SetClkAfterWakeFromStop 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2388:22:LL_RCC_SetSMPSClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2401:26:LL_RCC_GetSMPSClockSelection 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2416:26:LL_RCC_GetSMPSClockSource 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2431:22:LL_RCC_SetSMPSPrescaler 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2445:26:LL_RCC_GetSMPSPrescaler 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2507:22:LL_RCC_SetUSARTClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2523:22:LL_RCC_SetLPUARTClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2542:22:LL_RCC_SetI2CClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2561:22:LL_RCC_SetLPTIMClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2577:22:LL_RCC_SetSAIClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2593:22:LL_RCC_SetRNGClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2609:22:LL_RCC_SetCLK48ClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2625:22:LL_RCC_SetUSBClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2671:22:LL_RCC_SetADCClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2688:26:LL_RCC_GetUSARTClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2705:26:LL_RCC_GetLPUARTClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2726:26:LL_RCC_GetI2CClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2747:26:LL_RCC_GetLPTIMClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2764:26:LL_RCC_GetSAIClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2780:26:LL_RCC_GetRNGClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2797:26:LL_RCC_GetCLK48ClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2814:26:LL_RCC_GetUSBClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2833:26:LL_RCC_GetADCClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2859:22:LL_RCC_SetRTCClockSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2873:26:LL_RCC_GetRTCClockSource 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2913:22:LL_RCC_ForceBackupDomainReset 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2923:22:LL_RCC_ReleaseBackupDomainReset 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:2963:26:LL_RCC_PLL_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3181:26:LL_RCC_PLL_GetN 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3223:26:LL_RCC_PLL_GetP 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3241:26:LL_RCC_PLL_GetQ 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3277:26:LL_RCC_PLL_GetDivider 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3427:22:LL_RCC_PLLSAI1_Enable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3437:22:LL_RCC_PLLSAI1_Disable 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3447:26:LL_RCC_PLLSAI1_IsReady 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3605:26:LL_RCC_PLLSAI1_GetN 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3647:26:LL_RCC_PLLSAI1_GetP 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3665:26:LL_RCC_PLLSAI1_GetQ 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3683:26:LL_RCC_PLLSAI1_GetR 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h:3879:26:LL_RCC_PLL_GetMainSource 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:539:22:LL_AHB2_GRP1_EnableClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1081:22:LL_APB1_GRP1_ForceReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1125:22:LL_APB1_GRP1_ReleaseReset 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:308:26:LL_CRS_GetHSI48SmoothTrimming 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:331:26:LL_CRS_GetReloadCounter 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:486:22:LL_CRS_GenerateEvent_SWSYNC 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:499:26:LL_CRS_GetFreqErrorDirection 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:509:26:LL_CRS_GetFreqErrorCapture 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:597:22:LL_CRS_ClearFlag_SYNCOK 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:607:22:LL_CRS_ClearFlag_SYNCWARN 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:618:22:LL_CRS_ClearFlag_ERR 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h:628:22:LL_CRS_ClearFlag_ESYNC 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:147:19:HAL_RCCEx_PeriphCLKConfig 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:439:6:HAL_RCCEx_GetPeriphCLKConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:550:10:HAL_RCCEx_GetPeriphCLKFreq 88 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1138:10:HAL_RCCEx_GetRngCLKSource 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1179:19:HAL_RCCEx_EnablePLLSAI1 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1239:19:HAL_RCCEx_DisablePLLSAI1 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1279:6:HAL_RCCEx_WakeUpStopCLKConfig 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1293:6:HAL_RCCEx_EnableLSECSS 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1303:6:HAL_RCCEx_DisableLSECSS 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1316:6:HAL_RCCEx_EnableLSECSS_IT 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1333:6:HAL_RCCEx_LSECSS_IRQHandler 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1350:13:HAL_RCCEx_LSECSS_Callback 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1371:6:HAL_RCCEx_LSCOConfig 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1449:6:HAL_RCCEx_EnableLSCO 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1462:6:HAL_RCCEx_DisableLSCO 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1473:6:HAL_RCCEx_EnableMSIPLLMode 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1483:6:HAL_RCCEx_DisableMSIPLLMode 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1499:19:HAL_RCCEx_TrimOsc 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1600:6:HAL_RCCEx_CRSConfig 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1642:6:HAL_RCCEx_CRSSoftwareSynchronizationGenerate 8 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1652:6:HAL_RCCEx_CRSGetSynchronizationInfo 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1685:10:HAL_RCCEx_CRSWaitSynchronization 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1768:6:HAL_RCCEx_CRS_IRQHandler 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1833:13:HAL_RCCEx_CRS_SyncOkCallback 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1844:13:HAL_RCCEx_CRS_SyncWarnCallback 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1855:13:HAL_RCCEx_CRS_ExpectedSyncCallback 4 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1871:13:HAL_RCCEx_CRS_ErrorCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1904:26:RCCEx_PLLSAI1_ConfigNP 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:1973:26:RCCEx_PLLSAI1_ConfigNQ 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2041:26:RCCEx_PLLSAI1_ConfigNR 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2105:17:RCC_PLL_GetFreqDomain_P 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2148:17:RCC_PLL_GetFreqDomain_Q 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2193:17:RCC_PLLSAI1_GetFreqDomain_R 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2235:17:RCC_PLLSAI1_GetFreqDomain_P 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c:2277:17:RCC_PLLSAI1_GetFreqDomain_Q 24 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.cyclo new file mode 100644 index 0000000..890bae1 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.cyclo @@ -0,0 +1,26 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:255:19:HAL_RTC_Init 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:378:19:HAL_RTC_DeInit 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:674:13:HAL_RTC_MspInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:690:13:HAL_RTC_MspDeInit 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:731:19:HAL_RTC_SetTime 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:845:19:HAL_RTC_GetTime 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:890:19:HAL_RTC_SetDate 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:979:19:HAL_RTC_GetDate 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1037:19:HAL_RTC_SetAlarm 10 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1235:19:HAL_RTC_SetAlarm_IT 10 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1430:19:HAL_RTC_DeactivateAlarm 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1528:19:HAL_RTC_GetAlarm 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1579:6:HAL_RTC_AlarmIRQHandler 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1630:13:HAL_RTC_AlarmAEventCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1647:19:HAL_RTC_PollForAlarmAEvent 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1711:19:HAL_RTC_WaitForSynchro 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1740:6:HAL_RTC_DST_Add1Hour 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1754:6:HAL_RTC_DST_Sub1Hour 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1768:6:HAL_RTC_DST_SetStoreOperation 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1781:6:HAL_RTC_DST_ClearStoreOperation 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1793:10:HAL_RTC_DST_ReadStoreOperation 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1822:21:HAL_RTC_GetState 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1848:19:RTC_EnterInitMode 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1883:19:RTC_ExitInitMode 3 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1909:9:RTC_ByteToBcd2 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1927:9:RTC_Bcd2ToByte 1 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.d new file mode 100644 index 0000000..b946286 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o new file mode 100644 index 0000000..718b556 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.su new file mode 100644 index 0000000..a81bc99 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.su @@ -0,0 +1,26 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:255:19:HAL_RTC_Init 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:378:19:HAL_RTC_DeInit 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:674:13:HAL_RTC_MspInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:690:13:HAL_RTC_MspDeInit 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:731:19:HAL_RTC_SetTime 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:845:19:HAL_RTC_GetTime 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:890:19:HAL_RTC_SetDate 40 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:979:19:HAL_RTC_GetDate 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1037:19:HAL_RTC_SetAlarm 48 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1235:19:HAL_RTC_SetAlarm_IT 48 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1430:19:HAL_RTC_DeactivateAlarm 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1528:19:HAL_RTC_GetAlarm 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1579:6:HAL_RTC_AlarmIRQHandler 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1630:13:HAL_RTC_AlarmAEventCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1647:19:HAL_RTC_PollForAlarmAEvent 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1711:19:HAL_RTC_WaitForSynchro 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1740:6:HAL_RTC_DST_Add1Hour 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1754:6:HAL_RTC_DST_Sub1Hour 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1768:6:HAL_RTC_DST_SetStoreOperation 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1781:6:HAL_RTC_DST_ClearStoreOperation 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1793:10:HAL_RTC_DST_ReadStoreOperation 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1822:21:HAL_RTC_GetState 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1848:19:RTC_EnterInitMode 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1883:19:RTC_ExitInitMode 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1909:9:RTC_ByteToBcd2 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c:1927:9:RTC_Bcd2ToByte 24 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.cyclo new file mode 100644 index 0000000..629a083 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.cyclo @@ -0,0 +1,37 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:176:19:HAL_RTCEx_SetTimeStamp 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:246:19:HAL_RTCEx_SetTimeStamp_IT 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:310:19:HAL_RTCEx_DeactivateTimeStamp 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:349:19:HAL_RTCEx_SetInternalTimeStamp 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:383:19:HAL_RTCEx_DeactivateInternalTimeStamp 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:419:19:HAL_RTCEx_GetTimeStamp 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:476:19:HAL_RTCEx_SetTamper 20 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:651:19:HAL_RTCEx_SetTamper_IT 17 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:818:19:HAL_RTCEx_DeactivateTamper 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:864:6:HAL_RTCEx_TamperTimeStampIRQHandler 9 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:956:13:HAL_RTCEx_TimeStampEventCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:973:13:HAL_RTCEx_Tamper1EventCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:990:13:HAL_RTCEx_Tamper2EventCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1007:13:HAL_RTCEx_Tamper3EventCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1025:19:HAL_RTCEx_PollForTimeStampEvent 6 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1069:19:HAL_RTCEx_PollForTamper1Event 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1106:19:HAL_RTCEx_PollForTamper2Event 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1143:19:HAL_RTCEx_PollForTamper3Event 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1196:19:HAL_RTCEx_SetWakeUpTimer 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1292:19:HAL_RTCEx_SetWakeUpTimer_IT 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1393:19:HAL_RTCEx_DeactivateWakeUpTimer 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1448:10:HAL_RTCEx_GetWakeUpTimer 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1465:6:HAL_RTCEx_WakeUpTimerIRQHandler 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1494:13:HAL_RTCEx_WakeUpTimerEventCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1511:19:HAL_RTCEx_PollForWakeUpTimerEvent 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1577:6:HAL_RTCEx_BKUPWrite 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1600:10:HAL_RTCEx_BKUPRead 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1634:19:HAL_RTCEx_SetSmoothCalib 5 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1706:19:HAL_RTCEx_SetSynchroShift 7 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1801:19:HAL_RTCEx_SetCalibrationOutPut 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1840:19:HAL_RTCEx_DeactivateCalibrationOutPut 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1870:19:HAL_RTCEx_SetRefClock 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1914:19:HAL_RTCEx_DeactivateRefClock 4 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1960:19:HAL_RTCEx_EnableBypassShadow 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1993:19:HAL_RTCEx_DisableBypassShadow 2 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:2043:13:HAL_RTCEx_AlarmBEventCallback 1 +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:2060:19:HAL_RTCEx_PollForAlarmBEvent 5 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.d new file mode 100644 index 0000000..a924e7d --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.d @@ -0,0 +1,78 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o new file mode 100644 index 0000000..c943789 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.su new file mode 100644 index 0000000..024fde7 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.su @@ -0,0 +1,37 @@ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:176:19:HAL_RTCEx_SetTimeStamp 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:246:19:HAL_RTCEx_SetTimeStamp_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:310:19:HAL_RTCEx_DeactivateTimeStamp 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:349:19:HAL_RTCEx_SetInternalTimeStamp 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:383:19:HAL_RTCEx_DeactivateInternalTimeStamp 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:419:19:HAL_RTCEx_GetTimeStamp 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:476:19:HAL_RTCEx_SetTamper 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:651:19:HAL_RTCEx_SetTamper_IT 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:818:19:HAL_RTCEx_DeactivateTamper 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:864:6:HAL_RTCEx_TamperTimeStampIRQHandler 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:956:13:HAL_RTCEx_TimeStampEventCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:973:13:HAL_RTCEx_Tamper1EventCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:990:13:HAL_RTCEx_Tamper2EventCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1007:13:HAL_RTCEx_Tamper3EventCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1025:19:HAL_RTCEx_PollForTimeStampEvent 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1069:19:HAL_RTCEx_PollForTamper1Event 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1106:19:HAL_RTCEx_PollForTamper2Event 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1143:19:HAL_RTCEx_PollForTamper3Event 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1196:19:HAL_RTCEx_SetWakeUpTimer 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1292:19:HAL_RTCEx_SetWakeUpTimer_IT 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1393:19:HAL_RTCEx_DeactivateWakeUpTimer 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1448:10:HAL_RTCEx_GetWakeUpTimer 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1465:6:HAL_RTCEx_WakeUpTimerIRQHandler 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1494:13:HAL_RTCEx_WakeUpTimerEventCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1511:19:HAL_RTCEx_PollForWakeUpTimerEvent 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1577:6:HAL_RTCEx_BKUPWrite 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1600:10:HAL_RTCEx_BKUPRead 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1634:19:HAL_RTCEx_SetSmoothCalib 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1706:19:HAL_RTCEx_SetSynchroShift 32 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1801:19:HAL_RTCEx_SetCalibrationOutPut 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1840:19:HAL_RTCEx_DeactivateCalibrationOutPut 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1870:19:HAL_RTCEx_SetRefClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1914:19:HAL_RTCEx_DeactivateRefClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1960:19:HAL_RTCEx_EnableBypassShadow 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:1993:19:HAL_RTCEx_DisableBypassShadow 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:2043:13:HAL_RTCEx_AlarmBEventCallback 16 static +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c:2060:19:HAL_RTCEx_PollForAlarmBEvent 24 static diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.cyclo b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.cyclo new file mode 100644 index 0000000..e69de29 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.d b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.d new file mode 100644 index 0000000..e533183 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.d @@ -0,0 +1,2 @@ +Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o: \ + ../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o new file mode 100644 index 0000000..6df3572 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o differ diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.su b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.su new file mode 100644 index 0000000..e69de29 diff --git a/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/subdir.mk b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/subdir.mk new file mode 100644 index 0000000..6dc31e9 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Drivers/STM32WBxx_HAL_Driver/Src/subdir.mk @@ -0,0 +1,81 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c \ +../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c + +OBJS += \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + +C_DEPS += \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.d \ +./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.d + + +# Each subdirectory must supply rules for building sources it contributes +Drivers/STM32WBxx_HAL_Driver/Src/%.o Drivers/STM32WBxx_HAL_Driver/Src/%.su Drivers/STM32WBxx_HAL_Driver/Src/%.cyclo: ../Drivers/STM32WBxx_HAL_Driver/Src/%.c Drivers/STM32WBxx_HAL_Driver/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Drivers-2f-STM32WBxx_HAL_Driver-2f-Src + +clean-Drivers-2f-STM32WBxx_HAL_Driver-2f-Src: + -$(RM) ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.su ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.cyclo ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.su + +.PHONY: clean-Drivers-2f-STM32WBxx_HAL_Driver-2f-Src + diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.cyclo new file mode 100644 index 0000000..c8f5398 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.cyclo @@ -0,0 +1,53 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:20:12:aci_gap_set_non_discoverable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:34:12:aci_gap_set_limited_discoverable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:97:12:aci_gap_set_discoverable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:159:12:aci_gap_set_direct_connectable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:195:12:aci_gap_set_io_capability 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:216:12:aci_gap_set_authentication_requirement 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:261:12:aci_gap_set_authorization_requirement 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:285:12:aci_gap_pass_key_resp 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:309:12:aci_gap_authorization_resp 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:333:12:aci_gap_init 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:369:12:aci_gap_set_non_connectable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:393:12:aci_gap_set_undirected_connectable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:423:12:aci_gap_peripheral_security_req 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:445:12:aci_gap_update_adv_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:469:12:aci_gap_delete_ad_type 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:490:12:aci_gap_get_security_level 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:518:12:aci_gap_set_event_mask 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:539:12:aci_gap_configure_filter_accept_list 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:553:12:aci_gap_terminate 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:578:12:aci_gap_clear_security_db 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:592:12:aci_gap_allow_rebond 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:613:12:aci_gap_start_limited_discovery_proc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:644:12:aci_gap_start_general_discovery_proc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:675:12:aci_gap_start_auto_connection_establish_proc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:727:12:aci_gap_start_general_connection_establish_proc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:764:12:aci_gap_start_selective_connection_establish_proc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:807:12:aci_gap_create_connection 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:859:12:aci_gap_terminate_gap_proc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:880:12:aci_gap_start_connection_update 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:920:12:aci_gap_send_pairing_req 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:945:12:aci_gap_set_broadcast_mode 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:993:12:aci_gap_start_observation_proc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1030:12:aci_gap_get_bonded_devices 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1050:12:aci_gap_check_bonded_device 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1081:12:aci_gap_numeric_comparison_value_confirm_yesno 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1105:12:aci_gap_passkey_input 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1129:12:aci_gap_get_oob_data 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1161:12:aci_gap_set_oob_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1197:12:aci_gap_remove_bonded_device 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1221:12:aci_gap_add_devices_to_list 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1254:12:aci_gap_pairing_request_reply 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1278:12:aci_gap_additional_beacon_start 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1314:12:aci_gap_additional_beacon_stop 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1328:12:aci_gap_additional_beacon_set_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1352:12:aci_gap_adv_set_configuration 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1415:12:aci_gap_adv_set_enable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1442:12:aci_gap_adv_set_adv_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1475:12:aci_gap_adv_set_scan_resp_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1508:12:aci_gap_adv_remove_set 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1529:12:aci_gap_adv_clear_sets 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1543:12:aci_gap_adv_set_random_address 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1567:12:aci_gap_ext_start_scan 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1613:12:aci_gap_ext_create_connection 2 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.d new file mode 100644 index 0000000..fcd08e0 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.d @@ -0,0 +1,16 @@ +Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o: \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o new file mode 100644 index 0000000..b0ddc0f Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.su new file mode 100644 index 0000000..8aa83b7 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.su @@ -0,0 +1,53 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:20:12:aci_gap_set_non_discoverable 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:34:12:aci_gap_set_limited_discoverable 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:97:12:aci_gap_set_discoverable 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:159:12:aci_gap_set_direct_connectable 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:195:12:aci_gap_set_io_capability 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:216:12:aci_gap_set_authentication_requirement 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:261:12:aci_gap_set_authorization_requirement 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:285:12:aci_gap_pass_key_resp 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:309:12:aci_gap_authorization_resp 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:333:12:aci_gap_init 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:369:12:aci_gap_set_non_connectable 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:393:12:aci_gap_set_undirected_connectable 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:423:12:aci_gap_peripheral_security_req 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:445:12:aci_gap_update_adv_data 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:469:12:aci_gap_delete_ad_type 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:490:12:aci_gap_get_security_level 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:518:12:aci_gap_set_event_mask 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:539:12:aci_gap_configure_filter_accept_list 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:553:12:aci_gap_terminate 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:578:12:aci_gap_clear_security_db 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:592:12:aci_gap_allow_rebond 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:613:12:aci_gap_start_limited_discovery_proc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:644:12:aci_gap_start_general_discovery_proc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:675:12:aci_gap_start_auto_connection_establish_proc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:727:12:aci_gap_start_general_connection_establish_proc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:764:12:aci_gap_start_selective_connection_establish_proc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:807:12:aci_gap_create_connection 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:859:12:aci_gap_terminate_gap_proc 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:880:12:aci_gap_start_connection_update 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:920:12:aci_gap_send_pairing_req 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:945:12:aci_gap_set_broadcast_mode 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:993:12:aci_gap_start_observation_proc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1030:12:aci_gap_get_bonded_devices 288 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1050:12:aci_gap_check_bonded_device 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1081:12:aci_gap_numeric_comparison_value_confirm_yesno 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1105:12:aci_gap_passkey_input 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1129:12:aci_gap_get_oob_data 352 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1161:12:aci_gap_set_oob_data 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1197:12:aci_gap_remove_bonded_device 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1221:12:aci_gap_add_devices_to_list 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1254:12:aci_gap_pairing_request_reply 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1278:12:aci_gap_additional_beacon_start 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1314:12:aci_gap_additional_beacon_stop 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1328:12:aci_gap_additional_beacon_set_data 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1352:12:aci_gap_adv_set_configuration 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1415:12:aci_gap_adv_set_enable 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1442:12:aci_gap_adv_set_adv_data 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1475:12:aci_gap_adv_set_scan_resp_data 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1508:12:aci_gap_adv_remove_set 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1529:12:aci_gap_adv_clear_sets 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1543:12:aci_gap_adv_set_random_address 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1567:12:aci_gap_ext_start_scan 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c:1613:12:aci_gap_ext_create_connection 320 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.cyclo new file mode 100644 index 0000000..b81c22a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.cyclo @@ -0,0 +1,48 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:20:12:aci_gatt_init 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:34:12:aci_gatt_add_service 7 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:84:12:aci_gatt_include_service 4 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:123:12:aci_gatt_add_char 7 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:196:12:aci_gatt_add_char_desc 9 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:281:12:aci_gatt_update_char_value 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:314:12:aci_gatt_del_char 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:338:12:aci_gatt_del_service 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:359:12:aci_gatt_del_include_service 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:383:12:aci_gatt_set_event_mask 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:404:12:aci_gatt_exchange_config 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:426:12:aci_att_find_info_req 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:454:12:aci_att_find_by_type_value_req 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:491:12:aci_att_read_by_type_req 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:526:12:aci_att_read_by_group_type_req 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:561:12:aci_att_prepare_write_req 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:595:12:aci_att_execute_write_req 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:620:12:aci_gatt_disc_all_primary_services 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:642:12:aci_gatt_disc_primary_service_by_uuid 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:671:12:aci_gatt_find_included_services 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:699:12:aci_gatt_disc_all_char_of_service 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:727:12:aci_gatt_disc_char_by_uuid 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:762:12:aci_gatt_disc_all_char_desc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:790:12:aci_gatt_read_char_value 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:815:12:aci_gatt_read_using_char_uuid 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:850:12:aci_gatt_read_long_char_value 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:878:12:aci_gatt_read_multiple_char_value 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:906:12:aci_gatt_write_char_value 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:937:12:aci_gatt_write_long_char_value 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:971:12:aci_gatt_write_char_reliable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1005:12:aci_gatt_write_long_char_desc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1039:12:aci_gatt_read_long_char_desc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1067:12:aci_gatt_write_char_desc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1098:12:aci_gatt_read_char_desc 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1123:12:aci_gatt_write_without_resp 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1153:12:aci_gatt_signed_write_without_resp 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1183:12:aci_gatt_confirm_indication 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1204:12:aci_gatt_write_resp 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1240:12:aci_gatt_allow_read 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1261:12:aci_gatt_set_security_permission 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1288:12:aci_gatt_set_desc_value 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1324:12:aci_gatt_read_handle_value 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1360:12:aci_gatt_update_char_value_ext 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1402:12:aci_gatt_deny_read 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1426:12:aci_gatt_set_access_permission 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1453:12:aci_gatt_store_db 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1467:12:aci_gatt_send_mult_notification 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1494:12:aci_gatt_read_multiple_var_char_value 2 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.d new file mode 100644 index 0000000..4a8a167 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.d @@ -0,0 +1,16 @@ +Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o: \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o new file mode 100644 index 0000000..81d0ab3 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.su new file mode 100644 index 0000000..04b83a7 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.su @@ -0,0 +1,48 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:20:12:aci_gatt_init 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:34:12:aci_gatt_add_service 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:84:12:aci_gatt_include_service 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:123:12:aci_gatt_add_char 336 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:196:12:aci_gatt_add_char_desc 336 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:281:12:aci_gatt_update_char_value 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:314:12:aci_gatt_del_char 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:338:12:aci_gatt_del_service 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:359:12:aci_gatt_del_include_service 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:383:12:aci_gatt_set_event_mask 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:404:12:aci_gatt_exchange_config 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:426:12:aci_att_find_info_req 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:454:12:aci_att_find_by_type_value_req 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:491:12:aci_att_read_by_type_req 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:526:12:aci_att_read_by_group_type_req 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:561:12:aci_att_prepare_write_req 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:595:12:aci_att_execute_write_req 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:620:12:aci_gatt_disc_all_primary_services 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:642:12:aci_gatt_disc_primary_service_by_uuid 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:671:12:aci_gatt_find_included_services 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:699:12:aci_gatt_disc_all_char_of_service 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:727:12:aci_gatt_disc_char_by_uuid 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:762:12:aci_gatt_disc_all_char_desc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:790:12:aci_gatt_read_char_value 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:815:12:aci_gatt_read_using_char_uuid 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:850:12:aci_gatt_read_long_char_value 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:878:12:aci_gatt_read_multiple_char_value 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:906:12:aci_gatt_write_char_value 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:937:12:aci_gatt_write_long_char_value 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:971:12:aci_gatt_write_char_reliable 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1005:12:aci_gatt_write_long_char_desc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1039:12:aci_gatt_read_long_char_desc 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1067:12:aci_gatt_write_char_desc 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1098:12:aci_gatt_read_char_desc 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1123:12:aci_gatt_write_without_resp 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1153:12:aci_gatt_signed_write_without_resp 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1183:12:aci_gatt_confirm_indication 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1204:12:aci_gatt_write_resp 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1240:12:aci_gatt_allow_read 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1261:12:aci_gatt_set_security_permission 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1288:12:aci_gatt_set_desc_value 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1324:12:aci_gatt_read_handle_value 576 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1360:12:aci_gatt_update_char_value_ext 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1402:12:aci_gatt_deny_read 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1426:12:aci_gatt_set_access_permission 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1453:12:aci_gatt_store_db 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1467:12:aci_gatt_send_mult_notification 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c:1494:12:aci_gatt_read_multiple_var_char_value 312 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.cyclo new file mode 100644 index 0000000..a4ecc48 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.cyclo @@ -0,0 +1,22 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:20:12:aci_hal_write_config_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:47:12:aci_hal_read_config_data 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:75:12:aci_hal_set_tx_power_level 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:99:12:aci_hal_le_tx_test_packet_number 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:117:12:aci_hal_tone_start 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:141:12:aci_hal_tone_stop 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:155:12:aci_hal_get_link_status 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:175:12:aci_hal_set_radio_activity_mask 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:196:12:aci_hal_get_anchor_period 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:216:12:aci_hal_set_event_mask 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:237:12:aci_hal_set_peripheral_latency 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:258:12:aci_hal_read_rssi 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:276:12:aci_hal_ead_encrypt_decrypt 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:316:12:aci_hal_read_radio_reg 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:342:12:aci_hal_write_radio_reg 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:366:12:aci_hal_read_raw_rssi 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:384:12:aci_hal_rx_start 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:405:12:aci_hal_rx_stop 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:419:12:aci_reset 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:443:12:aci_get_information 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:465:12:aci_write_config_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:492:12:aci_read_config_data 3 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.d new file mode 100644 index 0000000..6025432 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.d @@ -0,0 +1,16 @@ +Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o: \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o new file mode 100644 index 0000000..5ff9870 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.su new file mode 100644 index 0000000..bfd5c11 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.su @@ -0,0 +1,22 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:20:12:aci_hal_write_config_data 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:47:12:aci_hal_read_config_data 568 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:75:12:aci_hal_set_tx_power_level 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:99:12:aci_hal_le_tx_test_packet_number 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:117:12:aci_hal_tone_start 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:141:12:aci_hal_tone_stop 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:155:12:aci_hal_get_link_status 72 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:175:12:aci_hal_set_radio_activity_mask 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:196:12:aci_hal_get_anchor_period 56 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:216:12:aci_hal_set_event_mask 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:237:12:aci_hal_set_peripheral_latency 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:258:12:aci_hal_read_rssi 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:276:12:aci_hal_ead_encrypt_decrypt 576 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:316:12:aci_hal_read_radio_reg 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:342:12:aci_hal_write_radio_reg 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:366:12:aci_hal_read_raw_rssi 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:384:12:aci_hal_rx_start 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:405:12:aci_hal_rx_stop 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:419:12:aci_reset 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:443:12:aci_get_information 80 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:465:12:aci_write_config_data 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c:492:12:aci_read_config_data 568 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.cyclo new file mode 100644 index 0000000..7dd627e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.cyclo @@ -0,0 +1,80 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:20:12:hci_disconnect 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:45:12:hci_read_remote_version_information 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:67:12:hci_set_event_mask 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:88:12:hci_reset 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:102:12:hci_read_transmit_power_level 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:131:12:hci_set_controller_to_host_flow_control 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:152:12:hci_host_buffer_size 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:182:12:hci_host_number_of_completed_packets 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:206:12:hci_read_local_version_information 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:232:12:hci_read_local_supported_commands 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:250:12:hci_read_local_supported_features 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:268:12:hci_read_bd_addr 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:286:12:hci_read_rssi 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:312:12:hci_le_set_event_mask 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:333:12:hci_le_read_buffer_size 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:353:12:hci_le_read_local_supported_features_page_0 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:371:12:hci_le_set_random_address 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:392:12:hci_le_set_advertising_parameters 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:434:12:hci_le_read_advertising_physical_channel_tx_power 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:452:12:hci_le_set_advertising_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:476:12:hci_le_set_scan_response_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:500:12:hci_le_set_advertising_enable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:521:12:hci_le_set_scan_parameters 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:554:12:hci_le_set_scan_enable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:578:12:hci_le_create_connection 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:633:12:hci_le_create_connection_cancel 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:647:12:hci_le_read_filter_accept_list_size 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:665:12:hci_le_clear_filter_accept_list 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:679:12:hci_le_add_device_to_filter_accept_list 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:703:12:hci_le_remove_device_from_filter_accept_list 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:727:12:hci_le_connection_update 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:767:12:hci_le_set_host_channel_classification 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:788:12:hci_le_read_channel_map 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:814:12:hci_le_read_remote_features_page_0 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:836:12:hci_le_encrypt 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:865:12:hci_le_rand 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:883:12:hci_le_enable_encryption 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:914:12:hci_le_long_term_key_request_reply 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:941:12:hci_le_long_term_key_request_negative_reply 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:965:12:hci_le_read_supported_states 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:983:12:hci_le_receiver_test 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1004:12:hci_le_transmitter_test 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1031:12:hci_le_test_end 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1049:12:hci_le_set_data_length 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1079:12:hci_le_read_suggested_default_data_length 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1099:12:hci_le_write_suggested_default_data_length 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1123:12:hci_le_read_local_p256_public_key 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1138:12:hci_le_generate_dhkey 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1160:12:hci_le_add_device_to_resolving_list 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1190:12:hci_le_remove_device_from_resolving_list 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1214:12:hci_le_clear_resolving_list 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1228:12:hci_le_read_resolving_list_size 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1246:12:hci_le_read_peer_resolvable_address 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1275:12:hci_le_read_local_resolvable_address 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1304:12:hci_le_set_address_resolution_enable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1325:12:hci_le_set_resolvable_private_address_timeout 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1346:12:hci_le_read_maximum_data_length 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1370:12:hci_le_read_phy 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1398:12:hci_le_set_default_phy 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1425:12:hci_le_set_phy 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1459:12:hci_le_receiver_test_v2 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1486:12:hci_le_transmitter_test_v2 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1516:12:hci_le_set_advertising_set_random_address 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1540:12:hci_le_set_extended_advertising_parameters 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1608:12:hci_le_set_extended_advertising_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1641:12:hci_le_set_extended_scan_response_data 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1674:12:hci_le_set_extended_advertising_enable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1701:12:hci_le_read_maximum_advertising_data_length 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1719:12:hci_le_read_number_of_supported_advertising_sets 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1737:12:hci_le_remove_advertising_set 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1758:12:hci_le_clear_advertising_sets 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1772:12:hci_le_set_extended_scan_parameters 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1802:12:hci_le_set_extended_scan_enable 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1832:12:hci_le_extended_create_connection 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1869:12:hci_le_read_transmit_power 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1889:12:hci_le_read_rf_path_compensation 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1909:12:hci_le_write_rf_path_compensation 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1933:12:hci_le_set_privacy_mode 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1960:12:hci_le_generate_dhkey_v2 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1985:12:hci_le_set_resolvable_private_address_timeout_v2 2 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.d new file mode 100644 index 0000000..2ed00cf --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.d @@ -0,0 +1,16 @@ +Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o: \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o new file mode 100644 index 0000000..9492591 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.su new file mode 100644 index 0000000..d5501e3 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.su @@ -0,0 +1,80 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:20:12:hci_disconnect 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:45:12:hci_read_remote_version_information 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:67:12:hci_set_event_mask 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:88:12:hci_reset 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:102:12:hci_read_transmit_power_level 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:131:12:hci_set_controller_to_host_flow_control 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:152:12:hci_host_buffer_size 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:182:12:hci_host_number_of_completed_packets 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:206:12:hci_read_local_version_information 64 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:232:12:hci_read_local_supported_commands 112 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:250:12:hci_read_local_supported_features 56 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:268:12:hci_read_bd_addr 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:286:12:hci_read_rssi 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:312:12:hci_le_set_event_mask 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:333:12:hci_le_read_buffer_size 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:353:12:hci_le_read_local_supported_features_page_0 56 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:371:12:hci_le_set_random_address 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:392:12:hci_le_set_advertising_parameters 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:434:12:hci_le_read_advertising_physical_channel_tx_power 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:452:12:hci_le_set_advertising_data 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:476:12:hci_le_set_scan_response_data 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:500:12:hci_le_set_advertising_enable 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:521:12:hci_le_set_scan_parameters 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:554:12:hci_le_set_scan_enable 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:578:12:hci_le_create_connection 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:633:12:hci_le_create_connection_cancel 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:647:12:hci_le_read_filter_accept_list_size 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:665:12:hci_le_clear_filter_accept_list 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:679:12:hci_le_add_device_to_filter_accept_list 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:703:12:hci_le_remove_device_from_filter_accept_list 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:727:12:hci_le_connection_update 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:767:12:hci_le_set_host_channel_classification 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:788:12:hci_le_read_channel_map 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:814:12:hci_le_read_remote_features_page_0 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:836:12:hci_le_encrypt 336 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:865:12:hci_le_rand 56 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:883:12:hci_le_enable_encryption 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:914:12:hci_le_long_term_key_request_reply 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:941:12:hci_le_long_term_key_request_negative_reply 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:965:12:hci_le_read_supported_states 56 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:983:12:hci_le_receiver_test 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1004:12:hci_le_transmitter_test 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1031:12:hci_le_test_end 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1049:12:hci_le_set_data_length 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1079:12:hci_le_read_suggested_default_data_length 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1099:12:hci_le_write_suggested_default_data_length 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1123:12:hci_le_read_local_p256_public_key 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1138:12:hci_le_generate_dhkey 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1160:12:hci_le_add_device_to_resolving_list 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1190:12:hci_le_remove_device_from_resolving_list 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1214:12:hci_le_clear_resolving_list 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1228:12:hci_le_read_resolving_list_size 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1246:12:hci_le_read_peer_resolvable_address 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1275:12:hci_le_read_local_resolvable_address 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1304:12:hci_le_set_address_resolution_enable 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1325:12:hci_le_set_resolvable_private_address_timeout 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1346:12:hci_le_read_maximum_data_length 64 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1370:12:hci_le_read_phy 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1398:12:hci_le_set_default_phy 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1425:12:hci_le_set_phy 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1459:12:hci_le_receiver_test_v2 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1486:12:hci_le_transmitter_test_v2 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1516:12:hci_le_set_advertising_set_random_address 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1540:12:hci_le_set_extended_advertising_parameters 328 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1608:12:hci_le_set_extended_advertising_data 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1641:12:hci_le_set_extended_scan_response_data 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1674:12:hci_le_set_extended_advertising_enable 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1701:12:hci_le_read_maximum_advertising_data_length 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1719:12:hci_le_read_number_of_supported_advertising_sets 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1737:12:hci_le_remove_advertising_set 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1758:12:hci_le_clear_advertising_sets 40 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1772:12:hci_le_set_extended_scan_parameters 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1802:12:hci_le_set_extended_scan_enable 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1832:12:hci_le_extended_create_connection 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1869:12:hci_le_read_transmit_power 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1889:12:hci_le_read_rf_path_compensation 48 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1909:12:hci_le_write_rf_path_compensation 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1933:12:hci_le_set_privacy_mode 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1960:12:hci_le_generate_dhkey_v2 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c:1985:12:hci_le_set_resolvable_private_address_timeout_v2 312 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.cyclo new file mode 100644 index 0000000..02c0bba --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.cyclo @@ -0,0 +1,9 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:20:12:aci_l2cap_connection_parameter_update_req 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:54:12:aci_l2cap_connection_parameter_update_resp 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:99:12:aci_l2cap_coc_connect 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:135:12:aci_l2cap_coc_connect_confirm 3 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:178:12:aci_l2cap_coc_reconf 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:211:12:aci_l2cap_coc_reconf_confirm 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:235:12:aci_l2cap_coc_disconnect 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:256:12:aci_l2cap_coc_flow_control 2 +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:280:12:aci_l2cap_coc_tx_data 2 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.d new file mode 100644 index 0000000..6f18541 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.d @@ -0,0 +1,16 @@ +Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o: \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o new file mode 100644 index 0000000..1dc9f17 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.su new file mode 100644 index 0000000..a780b97 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.su @@ -0,0 +1,9 @@ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:20:12:aci_l2cap_connection_parameter_update_req 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:54:12:aci_l2cap_connection_parameter_update_resp 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:99:12:aci_l2cap_coc_connect 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:135:12:aci_l2cap_coc_connect_confirm 568 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:178:12:aci_l2cap_coc_reconf 320 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:211:12:aci_l2cap_coc_reconf_confirm 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:235:12:aci_l2cap_coc_disconnect 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:256:12:aci_l2cap_coc_flow_control 312 static +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c:280:12:aci_l2cap_coc_tx_data 312 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/subdir.mk b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/subdir.mk new file mode 100644 index 0000000..0f8de62 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/auto/subdir.mk @@ -0,0 +1,39 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c \ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c \ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c \ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c \ +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c + +OBJS += \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + +C_DEPS += \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.d \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.d \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.d \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.d \ +./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/ST/STM32_WPAN/ble/core/auto/%.o Middlewares/ST/STM32_WPAN/ble/core/auto/%.su Middlewares/ST/STM32_WPAN/ble/core/auto/%.cyclo: ../Middlewares/ST/STM32_WPAN/ble/core/auto/%.c Middlewares/ST/STM32_WPAN/ble/core/auto/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-core-2f-auto + +clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-core-2f-auto: + -$(RM) ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.cyclo ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.d ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.su ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.cyclo ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.d ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.su ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.cyclo ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.d ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.su ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.cyclo ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.d ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.su ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.cyclo ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.d ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.su + +.PHONY: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-core-2f-auto + diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.cyclo new file mode 100644 index 0000000..f017d0f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.cyclo @@ -0,0 +1,3 @@ +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.c:28:7:Osal_MemCpy 1 +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.c:38:7:Osal_MemSet 1 +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.c:47:5:Osal_MemCmp 1 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.d new file mode 100644 index 0000000..c3b58b1 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.d @@ -0,0 +1,4 @@ +Middlewares/ST/STM32_WPAN/ble/core/template/osal.o: \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.c \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.o new file mode 100644 index 0000000..cc85310 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.su new file mode 100644 index 0000000..abe278b --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/osal.su @@ -0,0 +1,3 @@ +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.c:28:7:Osal_MemCpy 24 static +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.c:38:7:Osal_MemSet 24 static +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.c:47:5:Osal_MemCmp 24 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/subdir.mk b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/subdir.mk new file mode 100644 index 0000000..58b5fcb --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/core/template/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.c + +OBJS += \ +./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + +C_DEPS += \ +./Middlewares/ST/STM32_WPAN/ble/core/template/osal.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/ST/STM32_WPAN/ble/core/template/%.o Middlewares/ST/STM32_WPAN/ble/core/template/%.su Middlewares/ST/STM32_WPAN/ble/core/template/%.cyclo: ../Middlewares/ST/STM32_WPAN/ble/core/template/%.c Middlewares/ST/STM32_WPAN/ble/core/template/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-core-2f-template + +clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-core-2f-template: + -$(RM) ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.cyclo ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.d ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.su + +.PHONY: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-core-2f-template + diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.cyclo new file mode 100644 index 0000000..69d4608 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.cyclo @@ -0,0 +1,3 @@ +../Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c:105:30:PeerToPeer_Event_Handler 6 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c:189:6:P2PS_STM_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c:273:12:P2PS_STM_App_Update_Char 2 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.d new file mode 100644 index 0000000..30fefa0 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.d @@ -0,0 +1,210 @@ +Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o: \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h \ + ../Middlewares/ST/STM32_WPAN/ble/ble_common.h \ + ../STM32_WPAN/App/ble_conf.h ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../STM32_WPAN/App/ble_dbg_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/ble.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h +../Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h: +../Middlewares/ST/STM32_WPAN/ble/ble_common.h: +../STM32_WPAN/App/ble_conf.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../STM32_WPAN/App/ble_dbg_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Middlewares/ST/STM32_WPAN/ble/ble.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h: +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o new file mode 100644 index 0000000..0686085 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.su new file mode 100644 index 0000000..e01b5f9 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.su @@ -0,0 +1,3 @@ +../Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c:105:30:PeerToPeer_Event_Handler 48 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c:189:6:P2PS_STM_Init 48 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c:273:12:P2PS_STM_App_Update_Char 32 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/subdir.mk b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/subdir.mk new file mode 100644 index 0000000..ed2ee3e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/subdir.mk @@ -0,0 +1,30 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c \ +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c + +OBJS += \ +./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o \ +./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + +C_DEPS += \ +./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.d \ +./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/ST/STM32_WPAN/ble/svc/Src/%.o Middlewares/ST/STM32_WPAN/ble/svc/Src/%.su Middlewares/ST/STM32_WPAN/ble/svc/Src/%.cyclo: ../Middlewares/ST/STM32_WPAN/ble/svc/Src/%.c Middlewares/ST/STM32_WPAN/ble/svc/Src/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-svc-2f-Src + +clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-svc-2f-Src: + -$(RM) ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.cyclo ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.su ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.cyclo ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.su + +.PHONY: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-ble-2f-svc-2f-Src + diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.cyclo new file mode 100644 index 0000000..7ce2766 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.cyclo @@ -0,0 +1,23 @@ +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:63:13:BAS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:68:13:BLS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:72:13:CRS_STM_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:76:13:DIS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:80:13:EDS_STM_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:84:13:HIDS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:88:13:HRS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:92:13:HTS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:96:13:IAS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:100:13:LLS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:104:13:TPS_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:108:13:MOTENV_STM_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:112:13:P2PS_STM_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:116:13:ZDD_STM_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:120:13:OTAS_STM_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:124:13:MESH_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:128:13:BVOPUS_STM_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:132:13:SVCCTL_InitCustomSvc 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:139:6:SVCCTL_Init 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:156:13:SVCCTL_SvcInit 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:202:6:SVCCTL_RegisterSvcHandler 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:219:6:SVCCTL_RegisterCltHandler 1 +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:231:35:SVCCTL_UserEvtRx 9 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.d new file mode 100644 index 0000000..4eba5b6 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.d @@ -0,0 +1,210 @@ +Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o: \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h \ + ../Middlewares/ST/STM32_WPAN/ble/ble_common.h \ + ../STM32_WPAN/App/ble_conf.h ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../STM32_WPAN/App/ble_dbg_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/ble.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h +../Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h: +../Middlewares/ST/STM32_WPAN/ble/ble_common.h: +../STM32_WPAN/App/ble_conf.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../STM32_WPAN/App/ble_dbg_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Middlewares/ST/STM32_WPAN/ble/ble.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h: +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o new file mode 100644 index 0000000..adca59b Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.su new file mode 100644 index 0000000..3bb10f6 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.su @@ -0,0 +1,23 @@ +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:63:13:BAS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:68:13:BLS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:72:13:CRS_STM_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:76:13:DIS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:80:13:EDS_STM_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:84:13:HIDS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:88:13:HRS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:92:13:HTS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:96:13:IAS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:100:13:LLS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:104:13:TPS_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:108:13:MOTENV_STM_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:112:13:P2PS_STM_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:116:13:ZDD_STM_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:120:13:OTAS_STM_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:124:13:MESH_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:128:13:BVOPUS_STM_Init 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:132:13:SVCCTL_InitCustomSvc 4 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:139:6:SVCCTL_Init 8 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:156:13:SVCCTL_SvcInit 8 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:202:6:SVCCTL_RegisterSvcHandler 16 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:219:6:SVCCTL_RegisterCltHandler 16 static +../Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c:231:35:SVCCTL_UserEvtRx 32 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.cyclo new file mode 100644 index 0000000..4b7c0a3 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.cyclo @@ -0,0 +1,32 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:40:9:SHCI_C2_FUS_GetState 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:63:18:SHCI_C2_FUS_FwUpgrade 3 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:99:18:SHCI_C2_FUS_FwDelete 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:117:18:SHCI_C2_FUS_UpdateAuthKey 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:135:18:SHCI_C2_FUS_LockAuthKey 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:153:18:SHCI_C2_FUS_StoreUsrKey 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:187:18:SHCI_C2_FUS_LoadUsrKey 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:207:18:SHCI_C2_FUS_StartWs 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:225:18:SHCI_C2_FUS_LockUsrKey 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:245:18:SHCI_C2_FUS_UnloadUsrKey 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:265:18:SHCI_C2_FUS_ActivateAntiRollback 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:283:18:SHCI_C2_BLE_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:301:18:SHCI_C2_THREAD_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:319:18:SHCI_C2_LLDTESTS_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:337:18:SHCI_C2_BLE_LLD_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:355:18:SHCI_C2_ZIGBEE_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:373:18:SHCI_C2_DEBUG_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:391:18:SHCI_C2_FLASH_EraseActivity 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:411:18:SHCI_C2_CONCURRENT_SetMode 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:431:18:SHCI_C2_CONCURRENT_GetNextBleEvtTime 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:451:18:SHCI_C2_CONCURRENT_EnableNext_802154_EvtNotification 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:469:18:SHCI_C2_FLASH_StoreData 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:489:18:SHCI_C2_FLASH_EraseData 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:509:18:SHCI_C2_RADIO_AllowLowPower 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:530:18:SHCI_C2_MAC_802_15_4_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:548:18:SHCI_C2_Reinit 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:566:18:SHCI_C2_ExtpaConfig 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:590:18:SHCI_C2_SetFlashActivityControl 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:611:18:SHCI_C2_Config 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:629:18:SHCI_C2_802_15_4_DeInit 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:647:18:SHCI_C2_SetSystemClock 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:672:18:SHCI_GetWirelessFwInfo 2 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.d new file mode 100644 index 0000000..ad4ab83 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.d @@ -0,0 +1,90 @@ +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o: \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o new file mode 100644 index 0000000..f96f862 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.su new file mode 100644 index 0000000..2321590 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.su @@ -0,0 +1,32 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:40:9:SHCI_C2_FUS_GetState 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:63:18:SHCI_C2_FUS_FwUpgrade 48 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:99:18:SHCI_C2_FUS_FwDelete 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:117:18:SHCI_C2_FUS_UpdateAuthKey 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:135:18:SHCI_C2_FUS_LockAuthKey 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:153:18:SHCI_C2_FUS_StoreUsrKey 48 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:187:18:SHCI_C2_FUS_LoadUsrKey 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:207:18:SHCI_C2_FUS_StartWs 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:225:18:SHCI_C2_FUS_LockUsrKey 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:245:18:SHCI_C2_FUS_UnloadUsrKey 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:265:18:SHCI_C2_FUS_ActivateAntiRollback 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:283:18:SHCI_C2_BLE_Init 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:301:18:SHCI_C2_THREAD_Init 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:319:18:SHCI_C2_LLDTESTS_Init 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:337:18:SHCI_C2_BLE_LLD_Init 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:355:18:SHCI_C2_ZIGBEE_Init 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:373:18:SHCI_C2_DEBUG_Init 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:391:18:SHCI_C2_FLASH_EraseActivity 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:411:18:SHCI_C2_CONCURRENT_SetMode 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:431:18:SHCI_C2_CONCURRENT_GetNextBleEvtTime 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:451:18:SHCI_C2_CONCURRENT_EnableNext_802154_EvtNotification 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:469:18:SHCI_C2_FLASH_StoreData 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:489:18:SHCI_C2_FLASH_EraseData 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:509:18:SHCI_C2_RADIO_AllowLowPower 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:530:18:SHCI_C2_MAC_802_15_4_Init 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:548:18:SHCI_C2_Reinit 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:566:18:SHCI_C2_ExtpaConfig 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:590:18:SHCI_C2_SetFlashActivityControl 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:611:18:SHCI_C2_Config 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:629:18:SHCI_C2_802_15_4_DeInit 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:647:18:SHCI_C2_SetSystemClock 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c:672:18:SHCI_GetWirelessFwInfo 48 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/subdir.mk b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/subdir.mk new file mode 100644 index 0000000..443364a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.c + +OBJS += \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + +C_DEPS += \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/%.o Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/%.su Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/%.cyclo: ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/%.c Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-interface-2f-patterns-2f-ble_thread-2f-shci + +clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-interface-2f-patterns-2f-ble_thread-2f-shci: + -$(RM) ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.cyclo ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.su + +.PHONY: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-interface-2f-patterns-2f-ble_thread-2f-shci + diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.cyclo new file mode 100644 index 0000000..b9e1617 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.cyclo @@ -0,0 +1,10 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:68:6:hci_init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:80:6:hci_user_evt_proc 7 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:138:6:hci_resume_flow 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:151:5:hci_send_req 8 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:217:13:TlInit 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:244:13:SendCmd 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:255:13:NotifyCmdStatus 4 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:275:13:TlEvtReceived 3 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:292:13:hci_cmd_resp_wait 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:301:13:hci_cmd_resp_release 1 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.d new file mode 100644 index 0000000..e976265 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.d @@ -0,0 +1,136 @@ +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o: \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c \ + ../Middlewares/ST/STM32_WPAN/ble/ble_common.h \ + ../STM32_WPAN/App/ble_conf.h ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../STM32_WPAN/App/ble_dbg_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h \ + ../Middlewares/ST/STM32_WPAN/utilities/stm_list.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h +../Middlewares/ST/STM32_WPAN/ble/ble_common.h: +../STM32_WPAN/App/ble_conf.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../STM32_WPAN/App/ble_dbg_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: +../Middlewares/ST/STM32_WPAN/utilities/stm_list.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o new file mode 100644 index 0000000..0571650 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.su new file mode 100644 index 0000000..0f97306 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.su @@ -0,0 +1,10 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:68:6:hci_init 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:80:6:hci_user_evt_proc 24 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:138:6:hci_resume_flow 8 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:151:5:hci_send_req 40 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:217:13:TlInit 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:244:13:SendCmd 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:255:13:NotifyCmdStatus 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:275:13:TlEvtReceived 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:292:13:hci_cmd_resp_wait 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c:301:13:hci_cmd_resp_release 16 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.cyclo new file mode 100644 index 0000000..dbad770 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.cyclo @@ -0,0 +1 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c:23:6:hci_register_io_bus 1 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.d new file mode 100644 index 0000000..343fb1b --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.d @@ -0,0 +1,12 @@ +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o: \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o new file mode 100644 index 0000000..700ada5 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.su new file mode 100644 index 0000000..1c89619 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.su @@ -0,0 +1 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c:23:6:hci_register_io_bus 16 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.cyclo new file mode 100644 index 0000000..2d5cd80 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.cyclo @@ -0,0 +1,10 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:65:6:shci_init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:77:6:shci_user_evt_proc 7 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:134:6:shci_resume_flow 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:147:6:shci_send 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:172:13:TlInit 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:197:13:Cmd_SetStatus 4 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:219:13:TlCmdEvtReceived 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:227:13:TlUserEvtReceived 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:236:13:shci_cmd_resp_wait 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:245:13:shci_cmd_resp_release 1 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.d new file mode 100644 index 0000000..b5b21cd --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.d @@ -0,0 +1,14 @@ +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o: \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Middlewares/ST/STM32_WPAN/utilities/stm_list.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Middlewares/ST/STM32_WPAN/utilities/stm_list.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o new file mode 100644 index 0000000..70a8861 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.su new file mode 100644 index 0000000..f646bfa --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.su @@ -0,0 +1,10 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:65:6:shci_init 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:77:6:shci_user_evt_proc 24 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:134:6:shci_resume_flow 8 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:147:6:shci_send 24 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:172:13:TlInit 32 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:197:13:Cmd_SetStatus 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:219:13:TlCmdEvtReceived 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:227:13:TlUserEvtReceived 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:236:13:shci_cmd_resp_wait 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c:245:13:shci_cmd_resp_release 16 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.cyclo new file mode 100644 index 0000000..7a752e3 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.cyclo @@ -0,0 +1 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c:23:6:shci_register_io_bus 1 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.d new file mode 100644 index 0000000..1f228e0 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.d @@ -0,0 +1,12 @@ +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o: \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o new file mode 100644 index 0000000..4f1dbc3 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.su new file mode 100644 index 0000000..c3d14a8 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.su @@ -0,0 +1 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c:23:6:shci_register_io_bus 16 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/subdir.mk b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/subdir.mk new file mode 100644 index 0000000..899f505 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/subdir.mk @@ -0,0 +1,39 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c \ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c \ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c \ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c \ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c + +OBJS += \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + +C_DEPS += \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.d \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.d \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.d \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.d \ +./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/%.o Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/%.su Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/%.cyclo: ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/%.c Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-interface-2f-patterns-2f-ble_thread-2f-tl + +clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-interface-2f-patterns-2f-ble_thread-2f-tl: + -$(RM) ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.cyclo ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.su ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.cyclo ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.su ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.cyclo ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.su ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.cyclo ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.su ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.cyclo ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.su + +.PHONY: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-interface-2f-patterns-2f-ble_thread-2f-tl + diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.cyclo new file mode 100644 index 0000000..e276dcd --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.cyclo @@ -0,0 +1,18 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:84:6:TL_Enable 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:92:6:TL_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:112:9:TL_BLE_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:135:9:TL_BLE_SendCmd 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:149:6:HW_IPCC_BLE_RxEvtNot 4 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:172:9:TL_BLE_SendAclData 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:186:6:HW_IPCC_BLE_AclDataAckNot 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:198:9:TL_SYS_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:217:9:TL_SYS_SendCmd 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:231:6:HW_IPCC_SYS_CmdEvtNot 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:240:6:HW_IPCC_SYS_EvtNot 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:597:6:TL_MM_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:617:6:TL_MM_EvtDone 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:628:13:SendFreeBuf 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:644:6:TL_TRACES_Init 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:655:6:HW_IPCC_TRACES_EvtNot 2 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:668:13:TL_TRACES_EvtReceived 1 +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:676:13:OutputDbgTrace 13 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.d new file mode 100644 index 0000000..404ddeb --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.d @@ -0,0 +1,123 @@ +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o: \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Middlewares/ST/STM32_WPAN/utilities/stm_list.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h \ + ../STM32_WPAN/App/tl_dbg_conf.h ../Core/Inc/app_conf.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h ../Core/Inc/hw_if.h +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Middlewares/ST/STM32_WPAN/utilities/stm_list.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h: +../STM32_WPAN/App/tl_dbg_conf.h: +../Core/Inc/app_conf.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h: +../Core/Inc/hw_if.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o new file mode 100644 index 0000000..a18b2ca Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.su new file mode 100644 index 0000000..e942f2f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.su @@ -0,0 +1,18 @@ +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:84:6:TL_Enable 8 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:92:6:TL_Init 8 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:112:9:TL_BLE_Init 24 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:135:9:TL_BLE_SendCmd 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:149:6:HW_IPCC_BLE_RxEvtNot 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:172:9:TL_BLE_SendAclData 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:186:6:HW_IPCC_BLE_AclDataAckNot 8 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:198:9:TL_SYS_Init 24 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:217:9:TL_SYS_SendCmd 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:231:6:HW_IPCC_SYS_CmdEvtNot 8 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:240:6:HW_IPCC_SYS_EvtNot 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:597:6:TL_MM_Init 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:617:6:TL_MM_EvtDone 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:628:13:SendFreeBuf 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:644:6:TL_TRACES_Init 8 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:655:6:HW_IPCC_TRACES_EvtNot 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:668:13:TL_TRACES_EvtReceived 16 static +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c:676:13:OutputDbgTrace 32 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.cyclo new file mode 100644 index 0000000..b8bdabe --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.cyclo @@ -0,0 +1,3 @@ +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c:120:13:DbgTraceGetFileName 3 +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c:145:6:DbgTraceBuffer 2 +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c:205:6:DbgTraceInit 1 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.d new file mode 100644 index 0000000..7f6d269 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.d @@ -0,0 +1,115 @@ +Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o: \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c \ + ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/utilities/stm_queue.h \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h +../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.h: +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o new file mode 100644 index 0000000..be0cc62 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.su new file mode 100644 index 0000000..11f5260 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.su @@ -0,0 +1,3 @@ +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c:120:13:DbgTraceGetFileName 24 static +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c:145:6:DbgTraceBuffer 24 static +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c:205:6:DbgTraceInit 4 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.cyclo new file mode 100644 index 0000000..42abf3a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.cyclo @@ -0,0 +1 @@ +../Middlewares/ST/STM32_WPAN/utilities/otp.c:33:11:OTP_Read 4 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.d new file mode 100644 index 0000000..484f97d --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.d @@ -0,0 +1,113 @@ +Middlewares/ST/STM32_WPAN/utilities/otp.o: \ + ../Middlewares/ST/STM32_WPAN/utilities/otp.c \ + ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/utilities/otp.h +../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/utilities/otp.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.o new file mode 100644 index 0000000..9c16da2 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.su new file mode 100644 index 0000000..35496b5 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/otp.su @@ -0,0 +1 @@ +../Middlewares/ST/STM32_WPAN/utilities/otp.c:33:11:OTP_Read 24 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.cyclo new file mode 100644 index 0000000..8fbcc4f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.cyclo @@ -0,0 +1,12 @@ +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:30:6:LST_init_head 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:36:9:LST_is_empty 2 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:56:6:LST_insert_head 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:72:6:LST_insert_tail 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:88:6:LST_remove_node 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:102:6:LST_remove_head 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:116:6:LST_remove_tail 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:130:6:LST_insert_node_after 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:146:6:LST_insert_node_before 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:162:5:LST_get_size 2 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:183:6:LST_get_next_node 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:196:6:LST_get_prev_node 1 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.d new file mode 100644 index 0000000..e08de5a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.d @@ -0,0 +1,117 @@ +Middlewares/ST/STM32_WPAN/utilities/stm_list.o: \ + ../Middlewares/ST/STM32_WPAN/utilities/stm_list.c \ + ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/utilities/stm_list.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h +../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/utilities/stm_list.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.o new file mode 100644 index 0000000..1c418a1 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.su new file mode 100644 index 0000000..7eae54f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_list.su @@ -0,0 +1,12 @@ +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:30:6:LST_init_head 16 static +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:36:9:LST_is_empty 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:56:6:LST_insert_head 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:72:6:LST_insert_tail 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:88:6:LST_remove_node 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:102:6:LST_remove_head 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:116:6:LST_remove_tail 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:130:6:LST_insert_node_after 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:146:6:LST_insert_node_before 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:162:5:LST_get_size 40 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:183:6:LST_get_next_node 32 static,ignoring_inline_asm +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c:196:6:LST_get_prev_node 32 static,ignoring_inline_asm diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.cyclo b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.cyclo new file mode 100644 index 0000000..071bf20 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.cyclo @@ -0,0 +1,8 @@ +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:47:5:CircularQueue_Init 3 +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:75:10:CircularQueue_Add 30 +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:245:10:CircularQueue_Remove_Copy 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:259:10:CircularQueue_Remove 18 +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:315:10:CircularQueue_Sense_Copy 1 +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:328:10:CircularQueue_Sense 16 +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:370:5:CircularQueue_Empty 2 +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:380:5:CircularQueue_NbElement 1 diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.d b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.d new file mode 100644 index 0000000..9dc4bc5 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.d @@ -0,0 +1,113 @@ +Middlewares/ST/STM32_WPAN/utilities/stm_queue.o: \ + ../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c \ + ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/utilities/stm_queue.h +../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.h: diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.o b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.o new file mode 100644 index 0000000..7b81898 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.o differ diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.su b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.su new file mode 100644 index 0000000..d0f3332 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/stm_queue.su @@ -0,0 +1,8 @@ +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:47:5:CircularQueue_Init 24 static +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:75:10:CircularQueue_Add 64 static +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:245:10:CircularQueue_Remove_Copy 24 static +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:259:10:CircularQueue_Remove 24 static +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:315:10:CircularQueue_Sense_Copy 24 static +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:328:10:CircularQueue_Sense 32 static +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:370:5:CircularQueue_Empty 24 static +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c:380:5:CircularQueue_NbElement 16 static diff --git a/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/subdir.mk b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/subdir.mk new file mode 100644 index 0000000..e561caf --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Middlewares/ST/STM32_WPAN/utilities/subdir.mk @@ -0,0 +1,36 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c \ +../Middlewares/ST/STM32_WPAN/utilities/otp.c \ +../Middlewares/ST/STM32_WPAN/utilities/stm_list.c \ +../Middlewares/ST/STM32_WPAN/utilities/stm_queue.c + +OBJS += \ +./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o \ +./Middlewares/ST/STM32_WPAN/utilities/otp.o \ +./Middlewares/ST/STM32_WPAN/utilities/stm_list.o \ +./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + +C_DEPS += \ +./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.d \ +./Middlewares/ST/STM32_WPAN/utilities/otp.d \ +./Middlewares/ST/STM32_WPAN/utilities/stm_list.d \ +./Middlewares/ST/STM32_WPAN/utilities/stm_queue.d + + +# Each subdirectory must supply rules for building sources it contributes +Middlewares/ST/STM32_WPAN/utilities/%.o Middlewares/ST/STM32_WPAN/utilities/%.su Middlewares/ST/STM32_WPAN/utilities/%.cyclo: ../Middlewares/ST/STM32_WPAN/utilities/%.c Middlewares/ST/STM32_WPAN/utilities/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-utilities + +clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-utilities: + -$(RM) ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.cyclo ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.d ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.su ./Middlewares/ST/STM32_WPAN/utilities/otp.cyclo ./Middlewares/ST/STM32_WPAN/utilities/otp.d ./Middlewares/ST/STM32_WPAN/utilities/otp.o ./Middlewares/ST/STM32_WPAN/utilities/otp.su ./Middlewares/ST/STM32_WPAN/utilities/stm_list.cyclo ./Middlewares/ST/STM32_WPAN/utilities/stm_list.d ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o ./Middlewares/ST/STM32_WPAN/utilities/stm_list.su ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.cyclo ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.d ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.su + +.PHONY: clean-Middlewares-2f-ST-2f-STM32_WPAN-2f-utilities + diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.cyclo b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.cyclo new file mode 100644 index 0000000..0e3ce5e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.cyclo @@ -0,0 +1,19 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:2223:26:LL_FLASH_GetUDN 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:2235:26:LL_FLASH_GetDeviceID 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:2247:26:LL_FLASH_GetSTCompanyID 1 +../STM32_WPAN/App/app_ble.c:384:6:APP_BLE_Init 2 +../STM32_WPAN/App/app_ble.c:546:28:SVCCTL_App_Notification 16 +../STM32_WPAN/App/app_ble.c:787:22:APP_BLE_Get_Server_Connection_Status 1 +../STM32_WPAN/App/app_ble.c:801:13:Ble_Tl_Init 1 +../STM32_WPAN/App/app_ble.c:812:13:Ble_Hci_Gap_Gatt_Init 3 +../STM32_WPAN/App/app_ble.c:1085:13:Adv_Request 7 +../STM32_WPAN/App/app_ble.c:1175:16:BleGetBdAddress 3 +../STM32_WPAN/App/app_ble.c:1232:13:Adv_Cancel 2 +../STM32_WPAN/App/app_ble.c:1263:13:Adv_Cancel_Req 1 +../STM32_WPAN/App/app_ble.c:1278:13:Switch_OFF_GPIO 1 +../STM32_WPAN/App/app_ble.c:1343:6:hci_notify_asynch_evt 1 +../STM32_WPAN/App/app_ble.c:1350:6:hci_cmd_resp_release 1 +../STM32_WPAN/App/app_ble.c:1357:6:hci_cmd_resp_wait 1 +../STM32_WPAN/App/app_ble.c:1364:13:BLE_UserEvtRx 2 +../STM32_WPAN/App/app_ble.c:1384:13:BLE_StatusNot 3 +../STM32_WPAN/App/app_ble.c:1423:6:SVCCTL_ResumeUserEventFlow 1 diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.d b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.d new file mode 100644 index 0000000..58c35e8 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.d @@ -0,0 +1,232 @@ +STM32_WPAN/App/app_ble.o: ../STM32_WPAN/App/app_ble.c ../Core/Inc/main.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Core/Inc/app_entry.h ../Core/Inc/app_common.h \ + ../Core/Inc/app_common.h \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h \ + ../Middlewares/ST/STM32_WPAN/ble/ble.h ../STM32_WPAN/App/ble_conf.h \ + ../Core/Inc/app_conf.h ../STM32_WPAN/App/ble_dbg_conf.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../STM32_WPAN/App/app_ble.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h \ + ../Utilities/sequencer/stm32_seq.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h \ + ../Utilities/lpm/tiny_lpm/stm32_lpm.h \ + ../Middlewares/ST/STM32_WPAN/utilities/otp.h \ + ../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h \ + ../STM32_WPAN/App/p2p_server_app.h +../Core/Inc/main.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Core/Inc/app_entry.h: +../Core/Inc/app_common.h: +../Core/Inc/app_common.h: +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h: +../Middlewares/ST/STM32_WPAN/ble/ble.h: +../STM32_WPAN/App/ble_conf.h: +../Core/Inc/app_conf.h: +../STM32_WPAN/App/ble_dbg_conf.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../STM32_WPAN/App/app_ble.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h: +../Utilities/sequencer/stm32_seq.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h: +../Utilities/lpm/tiny_lpm/stm32_lpm.h: +../Middlewares/ST/STM32_WPAN/utilities/otp.h: +../Middlewares/ST/STM32_WPAN/utilities/utilities_common.h: +../STM32_WPAN/App/p2p_server_app.h: diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.o b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.o new file mode 100644 index 0000000..17732b4 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.o differ diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.su b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.su new file mode 100644 index 0000000..cbb19cf --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/app_ble.su @@ -0,0 +1,19 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:2223:26:LL_FLASH_GetUDN 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:2235:26:LL_FLASH_GetDeviceID 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h:2247:26:LL_FLASH_GetSTCompanyID 4 static +../STM32_WPAN/App/app_ble.c:384:6:APP_BLE_Init 80 static +../STM32_WPAN/App/app_ble.c:546:28:SVCCTL_App_Notification 48 static +../STM32_WPAN/App/app_ble.c:787:22:APP_BLE_Get_Server_Connection_Status 4 static +../STM32_WPAN/App/app_ble.c:801:13:Ble_Tl_Init 16 static +../STM32_WPAN/App/app_ble.c:812:13:Ble_Hci_Gap_Gatt_Init 72 static +../STM32_WPAN/App/app_ble.c:1085:13:Adv_Request 56 static +../STM32_WPAN/App/app_ble.c:1175:16:BleGetBdAddress 32 static +../STM32_WPAN/App/app_ble.c:1232:13:Adv_Cancel 16 static +../STM32_WPAN/App/app_ble.c:1263:13:Adv_Cancel_Req 8 static +../STM32_WPAN/App/app_ble.c:1278:13:Switch_OFF_GPIO 4 static +../STM32_WPAN/App/app_ble.c:1343:6:hci_notify_asynch_evt 16 static +../STM32_WPAN/App/app_ble.c:1350:6:hci_cmd_resp_release 16 static +../STM32_WPAN/App/app_ble.c:1357:6:hci_cmd_resp_wait 16 static +../STM32_WPAN/App/app_ble.c:1364:13:BLE_UserEvtRx 24 static +../STM32_WPAN/App/app_ble.c:1384:13:BLE_StatusNot 24 static +../STM32_WPAN/App/app_ble.c:1423:6:SVCCTL_ResumeUserEventFlow 8 static diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.cyclo b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.cyclo new file mode 100644 index 0000000..528796e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.cyclo @@ -0,0 +1,3 @@ +../STM32_WPAN/App/p2p_server_app.c:60:6:P2PS_STM_App_Notification 5 +../STM32_WPAN/App/p2p_server_app.c:101:6:P2PS_APP_Notification 3 +../STM32_WPAN/App/p2p_server_app.c:135:6:P2PS_APP_Init 1 diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.d b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.d new file mode 100644 index 0000000..d8ed86b --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.d @@ -0,0 +1,213 @@ +STM32_WPAN/App/p2p_server_app.o: ../STM32_WPAN/App/p2p_server_app.c \ + ../Core/Inc/main.h ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Core/Inc/app_entry.h ../Core/Inc/app_common.h \ + ../Core/Inc/app_common.h \ + ../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h \ + ../Middlewares/ST/STM32_WPAN/ble/ble.h ../STM32_WPAN/App/ble_conf.h \ + ../Core/Inc/app_conf.h ../STM32_WPAN/App/ble_dbg_conf.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h \ + ../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h \ + ../STM32_WPAN/App/p2p_server_app.h ../Utilities/sequencer/stm32_seq.h +../Core/Inc/main.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Core/Inc/app_entry.h: +../Core/Inc/app_common.h: +../Core/Inc/app_common.h: +../Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h: +../Middlewares/ST/STM32_WPAN/ble/ble.h: +../STM32_WPAN/App/ble_conf.h: +../Core/Inc/app_conf.h: +../STM32_WPAN/App/ble_dbg_conf.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_core.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/osal.h: +../Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h: +../Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_std.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h: +../Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h: +../STM32_WPAN/App/p2p_server_app.h: +../Utilities/sequencer/stm32_seq.h: diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.o b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.o new file mode 100644 index 0000000..52b9c1c Binary files /dev/null and b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.o differ diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.su b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.su new file mode 100644 index 0000000..025848e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/p2p_server_app.su @@ -0,0 +1,3 @@ +../STM32_WPAN/App/p2p_server_app.c:60:6:P2PS_STM_App_Notification 16 static +../STM32_WPAN/App/p2p_server_app.c:101:6:P2PS_APP_Notification 16 static +../STM32_WPAN/App/p2p_server_app.c:135:6:P2PS_APP_Init 4 static diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/App/subdir.mk b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/subdir.mk new file mode 100644 index 0000000..f9f81f2 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/App/subdir.mk @@ -0,0 +1,30 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../STM32_WPAN/App/app_ble.c \ +../STM32_WPAN/App/p2p_server_app.c + +OBJS += \ +./STM32_WPAN/App/app_ble.o \ +./STM32_WPAN/App/p2p_server_app.o + +C_DEPS += \ +./STM32_WPAN/App/app_ble.d \ +./STM32_WPAN/App/p2p_server_app.d + + +# Each subdirectory must supply rules for building sources it contributes +STM32_WPAN/App/%.o STM32_WPAN/App/%.su STM32_WPAN/App/%.cyclo: ../STM32_WPAN/App/%.c STM32_WPAN/App/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-STM32_WPAN-2f-App + +clean-STM32_WPAN-2f-App: + -$(RM) ./STM32_WPAN/App/app_ble.cyclo ./STM32_WPAN/App/app_ble.d ./STM32_WPAN/App/app_ble.o ./STM32_WPAN/App/app_ble.su ./STM32_WPAN/App/p2p_server_app.cyclo ./STM32_WPAN/App/p2p_server_app.d ./STM32_WPAN/App/p2p_server_app.o ./STM32_WPAN/App/p2p_server_app.su + +.PHONY: clean-STM32_WPAN-2f-App + diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.cyclo b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.cyclo new file mode 100644 index 0000000..b3883ed --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.cyclo @@ -0,0 +1,36 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1615:22:LL_PWR_EnableBootC2 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:793:22:LL_C2_EXTI_EnableEvent_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1051:22:LL_EXTI_EnableRisingTrig_32_63 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:744:22:LL_AHB3_GRP1_EnableClock 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1782:22:LL_C2_AHB3_GRP1_EnableClock 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:137:22:LL_C1_IPCC_EnableIT_TXF 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:170:22:LL_C1_IPCC_EnableIT_RXO 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:289:22:LL_C1_IPCC_EnableTransmitChannel 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:312:22:LL_C1_IPCC_DisableTransmitChannel 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:358:22:LL_C1_IPCC_EnableReceiveChannel 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:574:22:LL_C1_IPCC_ClearFlag_CHx 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:598:22:LL_C1_IPCC_SetFlag_CHx 1 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:621:26:LL_C1_IPCC_IsActiveFlag_CHx 2 +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:692:26:LL_C2_IPCC_IsActiveFlag_CHx 2 +../STM32_WPAN/Target/hw_ipcc.c:76:6:HW_IPCC_Rx_Handler 7 +../STM32_WPAN/Target/hw_ipcc.c:140:6:HW_IPCC_Tx_Handler 7 +../STM32_WPAN/Target/hw_ipcc.c:181:6:HW_IPCC_Enable 1 +../STM32_WPAN/Target/hw_ipcc.c:212:6:HW_IPCC_Init 1 +../STM32_WPAN/Target/hw_ipcc.c:228:6:HW_IPCC_BLE_Init 1 +../STM32_WPAN/Target/hw_ipcc.c:237:6:HW_IPCC_BLE_SendCmd 1 +../STM32_WPAN/Target/hw_ipcc.c:244:13:HW_IPCC_BLE_EvtHandler 1 +../STM32_WPAN/Target/hw_ipcc.c:253:6:HW_IPCC_BLE_SendAclData 1 +../STM32_WPAN/Target/hw_ipcc.c:263:13:HW_IPCC_BLE_AclDataEvtHandler 1 +../STM32_WPAN/Target/hw_ipcc.c:274:13:HW_IPCC_BLE_AclDataAckNot 1 +../STM32_WPAN/Target/hw_ipcc.c:275:13:HW_IPCC_BLE_RxEvtNot 1 +../STM32_WPAN/Target/hw_ipcc.c:280:6:HW_IPCC_SYS_Init 1 +../STM32_WPAN/Target/hw_ipcc.c:289:6:HW_IPCC_SYS_SendCmd 1 +../STM32_WPAN/Target/hw_ipcc.c:299:13:HW_IPCC_SYS_CmdEvtHandler 1 +../STM32_WPAN/Target/hw_ipcc.c:310:13:HW_IPCC_SYS_EvtHandler 1 +../STM32_WPAN/Target/hw_ipcc.c:319:13:HW_IPCC_SYS_CmdEvtNot 1 +../STM32_WPAN/Target/hw_ipcc.c:320:13:HW_IPCC_SYS_EvtNot 1 +../STM32_WPAN/Target/hw_ipcc.c:694:6:HW_IPCC_MM_SendFreeBuf 2 +../STM32_WPAN/Target/hw_ipcc.c:713:13:HW_IPCC_MM_FreeBufHandler 1 +../STM32_WPAN/Target/hw_ipcc.c:729:6:HW_IPCC_TRACES_Init 1 +../STM32_WPAN/Target/hw_ipcc.c:738:13:HW_IPCC_TRACES_EvtHandler 1 +../STM32_WPAN/Target/hw_ipcc.c:747:13:HW_IPCC_TRACES_EvtNot 1 diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.d b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.d new file mode 100644 index 0000000..6e7b53a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.d @@ -0,0 +1,116 @@ +STM32_WPAN/Target/hw_ipcc.o: ../STM32_WPAN/Target/hw_ipcc.c \ + ../Core/Inc/app_common.h ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h \ + ../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h ../Core/Inc/utilities_conf.h +../Core/Inc/app_common.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h: +../Middlewares/ST/STM32_WPAN/stm32_wpan_common.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Core/Inc/utilities_conf.h: diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.o b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.o new file mode 100644 index 0000000..427d93b Binary files /dev/null and b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.o differ diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.su b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.su new file mode 100644 index 0000000..5513ee4 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/hw_ipcc.su @@ -0,0 +1,36 @@ +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h:1615:22:LL_PWR_EnableBootC2 4 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:793:22:LL_C2_EXTI_EnableEvent_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h:1051:22:LL_EXTI_EnableRisingTrig_32_63 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:744:22:LL_AHB3_GRP1_EnableClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h:1782:22:LL_C2_AHB3_GRP1_EnableClock 24 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:137:22:LL_C1_IPCC_EnableIT_TXF 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:170:22:LL_C1_IPCC_EnableIT_RXO 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:289:22:LL_C1_IPCC_EnableTransmitChannel 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:312:22:LL_C1_IPCC_DisableTransmitChannel 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:358:22:LL_C1_IPCC_EnableReceiveChannel 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:574:22:LL_C1_IPCC_ClearFlag_CHx 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:598:22:LL_C1_IPCC_SetFlag_CHx 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:621:26:LL_C1_IPCC_IsActiveFlag_CHx 16 static +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h:692:26:LL_C2_IPCC_IsActiveFlag_CHx 16 static +../STM32_WPAN/Target/hw_ipcc.c:76:6:HW_IPCC_Rx_Handler 8 static +../STM32_WPAN/Target/hw_ipcc.c:140:6:HW_IPCC_Tx_Handler 8 static +../STM32_WPAN/Target/hw_ipcc.c:181:6:HW_IPCC_Enable 8 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:212:6:HW_IPCC_Init 8 static +../STM32_WPAN/Target/hw_ipcc.c:228:6:HW_IPCC_BLE_Init 24 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:237:6:HW_IPCC_BLE_SendCmd 8 static +../STM32_WPAN/Target/hw_ipcc.c:244:13:HW_IPCC_BLE_EvtHandler 8 static +../STM32_WPAN/Target/hw_ipcc.c:253:6:HW_IPCC_BLE_SendAclData 24 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:263:13:HW_IPCC_BLE_AclDataEvtHandler 24 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:274:13:HW_IPCC_BLE_AclDataAckNot 4 static +../STM32_WPAN/Target/hw_ipcc.c:275:13:HW_IPCC_BLE_RxEvtNot 4 static +../STM32_WPAN/Target/hw_ipcc.c:280:6:HW_IPCC_SYS_Init 24 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:289:6:HW_IPCC_SYS_SendCmd 24 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:299:13:HW_IPCC_SYS_CmdEvtHandler 24 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:310:13:HW_IPCC_SYS_EvtHandler 8 static +../STM32_WPAN/Target/hw_ipcc.c:319:13:HW_IPCC_SYS_CmdEvtNot 4 static +../STM32_WPAN/Target/hw_ipcc.c:320:13:HW_IPCC_SYS_EvtNot 4 static +../STM32_WPAN/Target/hw_ipcc.c:694:6:HW_IPCC_MM_SendFreeBuf 32 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:713:13:HW_IPCC_MM_FreeBufHandler 24 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:729:6:HW_IPCC_TRACES_Init 24 static,ignoring_inline_asm +../STM32_WPAN/Target/hw_ipcc.c:738:13:HW_IPCC_TRACES_EvtHandler 8 static +../STM32_WPAN/Target/hw_ipcc.c:747:13:HW_IPCC_TRACES_EvtNot 4 static diff --git a/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/subdir.mk b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/subdir.mk new file mode 100644 index 0000000..552577f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/STM32_WPAN/Target/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../STM32_WPAN/Target/hw_ipcc.c + +OBJS += \ +./STM32_WPAN/Target/hw_ipcc.o + +C_DEPS += \ +./STM32_WPAN/Target/hw_ipcc.d + + +# Each subdirectory must supply rules for building sources it contributes +STM32_WPAN/Target/%.o STM32_WPAN/Target/%.su STM32_WPAN/Target/%.cyclo: ../STM32_WPAN/Target/%.c STM32_WPAN/Target/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-STM32_WPAN-2f-Target + +clean-STM32_WPAN-2f-Target: + -$(RM) ./STM32_WPAN/Target/hw_ipcc.cyclo ./STM32_WPAN/Target/hw_ipcc.d ./STM32_WPAN/Target/hw_ipcc.o ./STM32_WPAN/Target/hw_ipcc.su + +.PHONY: clean-STM32_WPAN-2f-Target + diff --git a/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.cyclo b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.cyclo new file mode 100644 index 0000000..443e7e1 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.cyclo @@ -0,0 +1,6 @@ +../Utilities/lpm/tiny_lpm/stm32_lpm.c:121:6:UTIL_LPM_Init 1 +../Utilities/lpm/tiny_lpm/stm32_lpm.c:128:6:UTIL_LPM_DeInit 1 +../Utilities/lpm/tiny_lpm/stm32_lpm.c:132:6:UTIL_LPM_SetStopMode 3 +../Utilities/lpm/tiny_lpm/stm32_lpm.c:157:6:UTIL_LPM_SetOffMode 3 +../Utilities/lpm/tiny_lpm/stm32_lpm.c:182:17:UTIL_LPM_GetMode 3 +../Utilities/lpm/tiny_lpm/stm32_lpm.c:215:6:UTIL_LPM_EnterLowPower 3 diff --git a/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.d b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.d new file mode 100644 index 0000000..e4b526f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.d @@ -0,0 +1,112 @@ +Utilities/lpm/tiny_lpm/stm32_lpm.o: ../Utilities/lpm/tiny_lpm/stm32_lpm.c \ + ../Utilities/lpm/tiny_lpm/stm32_lpm.h ../Core/Inc/utilities_conf.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h +../Utilities/lpm/tiny_lpm/stm32_lpm.h: +../Core/Inc/utilities_conf.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: diff --git a/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.o b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.o new file mode 100644 index 0000000..a0853e6 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.o differ diff --git a/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.su b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.su new file mode 100644 index 0000000..22578f4 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/stm32_lpm.su @@ -0,0 +1,6 @@ +../Utilities/lpm/tiny_lpm/stm32_lpm.c:121:6:UTIL_LPM_Init 4 static +../Utilities/lpm/tiny_lpm/stm32_lpm.c:128:6:UTIL_LPM_DeInit 4 static +../Utilities/lpm/tiny_lpm/stm32_lpm.c:132:6:UTIL_LPM_SetStopMode 32 static,ignoring_inline_asm +../Utilities/lpm/tiny_lpm/stm32_lpm.c:157:6:UTIL_LPM_SetOffMode 32 static,ignoring_inline_asm +../Utilities/lpm/tiny_lpm/stm32_lpm.c:182:17:UTIL_LPM_GetMode 24 static,ignoring_inline_asm +../Utilities/lpm/tiny_lpm/stm32_lpm.c:215:6:UTIL_LPM_EnterLowPower 24 static,ignoring_inline_asm diff --git a/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/subdir.mk b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/subdir.mk new file mode 100644 index 0000000..8180ffa --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Utilities/lpm/tiny_lpm/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Utilities/lpm/tiny_lpm/stm32_lpm.c + +OBJS += \ +./Utilities/lpm/tiny_lpm/stm32_lpm.o + +C_DEPS += \ +./Utilities/lpm/tiny_lpm/stm32_lpm.d + + +# Each subdirectory must supply rules for building sources it contributes +Utilities/lpm/tiny_lpm/%.o Utilities/lpm/tiny_lpm/%.su Utilities/lpm/tiny_lpm/%.cyclo: ../Utilities/lpm/tiny_lpm/%.c Utilities/lpm/tiny_lpm/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Utilities-2f-lpm-2f-tiny_lpm + +clean-Utilities-2f-lpm-2f-tiny_lpm: + -$(RM) ./Utilities/lpm/tiny_lpm/stm32_lpm.cyclo ./Utilities/lpm/tiny_lpm/stm32_lpm.d ./Utilities/lpm/tiny_lpm/stm32_lpm.o ./Utilities/lpm/tiny_lpm/stm32_lpm.su + +.PHONY: clean-Utilities-2f-lpm-2f-tiny_lpm + diff --git a/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.cyclo b/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.cyclo new file mode 100644 index 0000000..fc62234 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.cyclo @@ -0,0 +1,22 @@ +../Utilities/sequencer/stm32_seq.c:187:6:UTIL_SEQ_Init 2 +../Utilities/sequencer/stm32_seq.c:205:6:UTIL_SEQ_DeInit 1 +../Utilities/sequencer/stm32_seq.c:215:6:UTIL_SEQ_Run 15 +../Utilities/sequencer/stm32_seq.c:415:6:UTIL_SEQ_RegTask 1 +../Utilities/sequencer/stm32_seq.c:427:10:UTIL_SEQ_IsRegisteredTask 2 +../Utilities/sequencer/stm32_seq.c:441:6:UTIL_SEQ_SetTask 1 +../Utilities/sequencer/stm32_seq.c:453:10:UTIL_SEQ_IsSchedulableTask 2 +../Utilities/sequencer/stm32_seq.c:467:6:UTIL_SEQ_PauseTask 1 +../Utilities/sequencer/stm32_seq.c:478:10:UTIL_SEQ_IsPauseTask 1 +../Utilities/sequencer/stm32_seq.c:489:6:UTIL_SEQ_ResumeTask 1 +../Utilities/sequencer/stm32_seq.c:500:6:UTIL_SEQ_SetEvt 1 +../Utilities/sequencer/stm32_seq.c:511:6:UTIL_SEQ_ClrEvt 1 +../Utilities/sequencer/stm32_seq.c:522:6:UTIL_SEQ_WaitEvt 3 +../Utilities/sequencer/stm32_seq.c:575:15:UTIL_SEQ_IsEvtPend 1 +../Utilities/sequencer/stm32_seq.c:581:13:UTIL_SEQ_EvtIdle 1 +../Utilities/sequencer/stm32_seq.c:588:13:UTIL_SEQ_Idle 1 +../Utilities/sequencer/stm32_seq.c:593:13:UTIL_SEQ_PreIdle 1 +../Utilities/sequencer/stm32_seq.c:601:13:UTIL_SEQ_PostIdle 1 +../Utilities/sequencer/stm32_seq.c:609:13:UTIL_SEQ_PreTask 1 +../Utilities/sequencer/stm32_seq.c:615:13:UTIL_SEQ_PostTask 1 +../Utilities/sequencer/stm32_seq.c:621:13:UTIL_SEQ_CatchWarning 1 +../Utilities/sequencer/stm32_seq.c:673:9:SEQ_BitPosition 2 diff --git a/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.d b/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.d new file mode 100644 index 0000000..c4cef01 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.d @@ -0,0 +1,112 @@ +Utilities/sequencer/stm32_seq.o: ../Utilities/sequencer/stm32_seq.c \ + ../Utilities/sequencer/stm32_seq.h ../Core/Inc/utilities_conf.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/cmsis_gcc.h ../Core/Inc/app_conf.h \ + ../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h \ + ../Core/Inc/hw_conf.h ../Core/Inc/hw_if.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h \ + ../Drivers/CMSIS/Include/core_cm4.h \ + ../Drivers/CMSIS/Include/cmsis_version.h \ + ../Drivers/CMSIS/Include/cmsis_compiler.h \ + ../Drivers/CMSIS/Include/mpu_armv7.h \ + ../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h \ + ../Core/Inc/stm32wbxx_hal_conf.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h \ + ../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h \ + ../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h +../Utilities/sequencer/stm32_seq.h: +../Core/Inc/utilities_conf.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/cmsis_gcc.h: +../Core/Inc/app_conf.h: +../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/hw.h: +../Core/Inc/hw_conf.h: +../Core/Inc/hw_if.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wbxx.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h: +../Drivers/CMSIS/Include/core_cm4.h: +../Drivers/CMSIS/Include/cmsis_version.h: +../Drivers/CMSIS/Include/cmsis_compiler.h: +../Drivers/CMSIS/Include/mpu_armv7.h: +../Drivers/CMSIS/Device/ST/STM32WBxx/Include/system_stm32wbxx.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h: +../Core/Inc/stm32wbxx_hal_conf.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h: +../Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h: +../Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h: diff --git a/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.o b/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.o new file mode 100644 index 0000000..f8c4007 Binary files /dev/null and b/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.o differ diff --git a/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.su b/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.su new file mode 100644 index 0000000..70c30db --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Utilities/sequencer/stm32_seq.su @@ -0,0 +1,22 @@ +../Utilities/sequencer/stm32_seq.c:187:6:UTIL_SEQ_Init 16 static +../Utilities/sequencer/stm32_seq.c:205:6:UTIL_SEQ_DeInit 4 static +../Utilities/sequencer/stm32_seq.c:215:6:UTIL_SEQ_Run 88 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:415:6:UTIL_SEQ_RegTask 40 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:427:10:UTIL_SEQ_IsRegisteredTask 32 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:441:6:UTIL_SEQ_SetTask 32 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:453:10:UTIL_SEQ_IsSchedulableTask 40 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:467:6:UTIL_SEQ_PauseTask 32 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:478:10:UTIL_SEQ_IsPauseTask 32 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:489:6:UTIL_SEQ_ResumeTask 32 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:500:6:UTIL_SEQ_SetEvt 32 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:511:6:UTIL_SEQ_ClrEvt 32 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:522:6:UTIL_SEQ_WaitEvt 40 static,ignoring_inline_asm +../Utilities/sequencer/stm32_seq.c:575:15:UTIL_SEQ_IsEvtPend 16 static +../Utilities/sequencer/stm32_seq.c:581:13:UTIL_SEQ_EvtIdle 16 static +../Utilities/sequencer/stm32_seq.c:588:13:UTIL_SEQ_Idle 4 static +../Utilities/sequencer/stm32_seq.c:593:13:UTIL_SEQ_PreIdle 4 static +../Utilities/sequencer/stm32_seq.c:601:13:UTIL_SEQ_PostIdle 4 static +../Utilities/sequencer/stm32_seq.c:609:13:UTIL_SEQ_PreTask 16 static +../Utilities/sequencer/stm32_seq.c:615:13:UTIL_SEQ_PostTask 16 static +../Utilities/sequencer/stm32_seq.c:621:13:UTIL_SEQ_CatchWarning 16 static +../Utilities/sequencer/stm32_seq.c:673:9:SEQ_BitPosition 24 static diff --git a/firmware/memory_chip_gone/Debug/Utilities/sequencer/subdir.mk b/firmware/memory_chip_gone/Debug/Utilities/sequencer/subdir.mk new file mode 100644 index 0000000..06ed9ab --- /dev/null +++ b/firmware/memory_chip_gone/Debug/Utilities/sequencer/subdir.mk @@ -0,0 +1,27 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../Utilities/sequencer/stm32_seq.c + +OBJS += \ +./Utilities/sequencer/stm32_seq.o + +C_DEPS += \ +./Utilities/sequencer/stm32_seq.d + + +# Each subdirectory must supply rules for building sources it contributes +Utilities/sequencer/%.o Utilities/sequencer/%.su Utilities/sequencer/%.cyclo: ../Utilities/sequencer/%.c Utilities/sequencer/subdir.mk + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl -I../Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci -I../Middlewares/ST/STM32_WPAN/utilities -I../Middlewares/ST/STM32_WPAN/ble/core -I../Middlewares/ST/STM32_WPAN/ble/core/auto -I../Middlewares/ST/STM32_WPAN/ble/core/template -I../Middlewares/ST/STM32_WPAN/ble/svc/Inc -I../Middlewares/ST/STM32_WPAN/ble/svc/Src -I../Utilities/sequencer -I../Middlewares/ST/STM32_WPAN/ble -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + +clean: clean-Utilities-2f-sequencer + +clean-Utilities-2f-sequencer: + -$(RM) ./Utilities/sequencer/stm32_seq.cyclo ./Utilities/sequencer/stm32_seq.d ./Utilities/sequencer/stm32_seq.o ./Utilities/sequencer/stm32_seq.su + +.PHONY: clean-Utilities-2f-sequencer + diff --git a/firmware/memory_chip_gone/Debug/makefile b/firmware/memory_chip_gone/Debug/makefile new file mode 100644 index 0000000..83ae95e --- /dev/null +++ b/firmware/memory_chip_gone/Debug/makefile @@ -0,0 +1,104 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +-include ../makefile.init + +RM := rm -rf + +# All of the sources participating in the build are defined here +-include sources.mk +-include Utilities/sequencer/subdir.mk +-include Utilities/lpm/tiny_lpm/subdir.mk +-include STM32_WPAN/Target/subdir.mk +-include STM32_WPAN/App/subdir.mk +-include Middlewares/ST/STM32_WPAN/utilities/subdir.mk +-include Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/subdir.mk +-include Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/subdir.mk +-include Middlewares/ST/STM32_WPAN/ble/svc/Src/subdir.mk +-include Middlewares/ST/STM32_WPAN/ble/core/template/subdir.mk +-include Middlewares/ST/STM32_WPAN/ble/core/auto/subdir.mk +-include Drivers/STM32WBxx_HAL_Driver/Src/subdir.mk +-include Core/Startup/subdir.mk +-include Core/Src/subdir.mk +-include objects.mk + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(S_DEPS)),) +-include $(S_DEPS) +endif +ifneq ($(strip $(S_UPPER_DEPS)),) +-include $(S_UPPER_DEPS) +endif +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) +endif +endif + +-include ../makefile.defs + +OPTIONAL_TOOL_DEPS := \ +$(wildcard ../makefile.defs) \ +$(wildcard ../makefile.init) \ +$(wildcard ../makefile.targets) \ + + +BUILD_ARTIFACT_NAME := memory_chip_gone +BUILD_ARTIFACT_EXTENSION := elf +BUILD_ARTIFACT_PREFIX := +BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),) + +# Add inputs and outputs from these tool invocations to the build variables +EXECUTABLES += \ +memory_chip_gone.elf \ + +MAP_FILES += \ +memory_chip_gone.map \ + +SIZE_OUTPUT += \ +default.size.stdout \ + +OBJDUMP_LIST += \ +memory_chip_gone.list \ + + +# All Target +all: main-build + +# Main-build Target +main-build: memory_chip_gone.elf secondary-outputs + +# Tool invocations +memory_chip_gone.elf memory_chip_gone.map: $(OBJS) $(USER_OBJS) /home/main/STM32CubeIDE/workspace_1.19.0/memory_chip_gone/STM32WB55CGUX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-gcc -o "memory_chip_gone.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m4 -T"/home/main/STM32CubeIDE/workspace_1.19.0/memory_chip_gone/STM32WB55CGUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="memory_chip_gone.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group + @echo 'Finished building target: $@' + @echo ' ' + +default.size.stdout: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-size $(EXECUTABLES) + @echo 'Finished building: $@' + @echo ' ' + +memory_chip_gone.list: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS) + arm-none-eabi-objdump -h -S $(EXECUTABLES) > "memory_chip_gone.list" + @echo 'Finished building: $@' + @echo ' ' + +# Other Targets +clean: + -$(RM) default.size.stdout memory_chip_gone.elf memory_chip_gone.list memory_chip_gone.map + -@echo ' ' + +secondary-outputs: $(SIZE_OUTPUT) $(OBJDUMP_LIST) + +fail-specified-linker-script-missing: + @echo 'Error: Cannot find the specified linker script. Check the linker settings in the build configuration.' + @exit 2 + +warn-no-linker-script-specified: + @echo 'Warning: No linker script specified. Check the linker settings in the build configuration.' + +.PHONY: all clean dependents main-build fail-specified-linker-script-missing warn-no-linker-script-specified + +-include ../makefile.targets diff --git a/firmware/memory_chip_gone/Debug/memory_chip_gone.elf b/firmware/memory_chip_gone/Debug/memory_chip_gone.elf new file mode 100755 index 0000000..780478b Binary files /dev/null and b/firmware/memory_chip_gone/Debug/memory_chip_gone.elf differ diff --git a/firmware/memory_chip_gone/Debug/memory_chip_gone.list b/firmware/memory_chip_gone/Debug/memory_chip_gone.list new file mode 100644 index 0000000..01ef641 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/memory_chip_gone.list @@ -0,0 +1,21728 @@ + +memory_chip_gone.elf: file format elf32-littlearm + +Sections: +Idx Name Size VMA LMA File off Algn + 0 .isr_vector 0000013c 08000000 08000000 00001000 2**0 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 1 .text 00007a78 0800013c 0800013c 0000113c 2**2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 2 .rodata 0000026c 08007bb4 08007bb4 00008bb4 2**2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 3 .ARM 00000008 08007e20 08007e20 00008e20 2**2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 4 .init_array 00000004 08007e28 08007e28 00008e28 2**2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 5 .fini_array 00000004 08007e2c 08007e2c 00008e2c 2**2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 6 .data 00000024 20000008 08007e30 00009008 2**2 + CONTENTS, ALLOC, LOAD, DATA + 7 BLE_DRIVER_CONTEXT 0000003d 2000002c 08007e54 0000902c 2**2 + CONTENTS, ALLOC, LOAD, DATA + 8 SYSTEM_DRIVER_CONTEXT 00000011 2000006c 08007e91 0000906c 2**2 + CONTENTS, ALLOC, LOAD, DATA + 9 .bss 00000324 20000080 08007ea2 00009080 2**2 + ALLOC + 10 ._user_heap_stack 00000604 200003a4 08007ea2 000093a4 2**0 + ALLOC + 11 .ARM.attributes 00000030 00000000 00000000 00009a67 2**0 + CONTENTS, READONLY + 12 MAPPING_TABLE 00000028 20030000 20030000 0000a000 2**2 + ALLOC + 13 MB_MEM1 000001bb 20030028 20030028 0000a000 2**2 + ALLOC + 14 .MB_MEM2 00000883 200301e4 08007ea2 000091e4 2**2 + CONTENTS, ALLOC, LOAD, DATA + 15 .debug_info 000262b1 00000000 00000000 00009a97 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 16 .debug_abbrev 000053bb 00000000 00000000 0002fd48 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 17 .debug_aranges 00002470 00000000 00000000 00035108 2**3 + CONTENTS, READONLY, DEBUGGING, OCTETS + 18 .debug_rnglists 00001bc3 00000000 00000000 00037578 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 19 .debug_macro 0002ad32 00000000 00000000 0003913b 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 20 .debug_line 00025a3c 00000000 00000000 00063e6d 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 21 .debug_str 000f314c 00000000 00000000 000898a9 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + 22 .comment 00000043 00000000 00000000 0017c9f5 2**0 + CONTENTS, READONLY + 23 .debug_frame 000097bc 00000000 00000000 0017ca38 2**2 + CONTENTS, READONLY, DEBUGGING, OCTETS + 24 .debug_line_str 00000068 00000000 00000000 001861f4 2**0 + CONTENTS, READONLY, DEBUGGING, OCTETS + +Disassembly of section .text: + +0800013c <__do_global_dtors_aux>: + 800013c: b510 push {r4, lr} + 800013e: 4c05 ldr r4, [pc, #20] @ (8000154 <__do_global_dtors_aux+0x18>) + 8000140: 7823 ldrb r3, [r4, #0] + 8000142: b933 cbnz r3, 8000152 <__do_global_dtors_aux+0x16> + 8000144: 4b04 ldr r3, [pc, #16] @ (8000158 <__do_global_dtors_aux+0x1c>) + 8000146: b113 cbz r3, 800014e <__do_global_dtors_aux+0x12> + 8000148: 4804 ldr r0, [pc, #16] @ (800015c <__do_global_dtors_aux+0x20>) + 800014a: f3af 8000 nop.w + 800014e: 2301 movs r3, #1 + 8000150: 7023 strb r3, [r4, #0] + 8000152: bd10 pop {r4, pc} + 8000154: 20000080 .word 0x20000080 + 8000158: 00000000 .word 0x00000000 + 800015c: 08007b9c .word 0x08007b9c + +08000160 : + 8000160: b508 push {r3, lr} + 8000162: 4b03 ldr r3, [pc, #12] @ (8000170 ) + 8000164: b11b cbz r3, 800016e + 8000166: 4903 ldr r1, [pc, #12] @ (8000174 ) + 8000168: 4803 ldr r0, [pc, #12] @ (8000178 ) + 800016a: f3af 8000 nop.w + 800016e: bd08 pop {r3, pc} + 8000170: 00000000 .word 0x00000000 + 8000174: 20000084 .word 0x20000084 + 8000178: 08007b9c .word 0x08007b9c + +0800017c : + 800017c: 4603 mov r3, r0 + 800017e: f813 2b01 ldrb.w r2, [r3], #1 + 8000182: 2a00 cmp r2, #0 + 8000184: d1fb bne.n 800017e + 8000186: 1a18 subs r0, r3, r0 + 8000188: 3801 subs r0, #1 + 800018a: 4770 bx lr + +0800018c : +/* USER CODE END APPD_Init */ + return; +} + +void APPD_EnableCPU2( void ) +{ + 800018c: b5b0 push {r4, r5, r7, lr} + 800018e: b088 sub sp, #32 + 8000190: af00 add r7, sp, #0 +/* USER CODE BEGIN APPD_EnableCPU2 */ + SHCI_C2_DEBUG_Init_Cmd_Packet_t DebugCmdPacket = + 8000192: 4b0b ldr r3, [pc, #44] @ (80001c0 ) + 8000194: 1d3c adds r4, r7, #4 + 8000196: 461d mov r5, r3 + 8000198: cd0f ldmia r5!, {r0, r1, r2, r3} + 800019a: c40f stmia r4!, {r0, r1, r2, r3} + 800019c: e895 0007 ldmia.w r5, {r0, r1, r2} + 80001a0: c403 stmia r4!, {r0, r1} + 80001a2: 8022 strh r2, [r4, #0] + 80001a4: 3402 adds r4, #2 + 80001a6: 0c13 lsrs r3, r2, #16 + 80001a8: 7023 strb r3, [r4, #0] + NBR_OF_TRACES_CONFIG_PARAMETERS, + NBR_OF_GENERAL_CONFIG_PARAMETERS} + }; + + /**< Traces channel initialization */ + TL_TRACES_Init( ); + 80001aa: f006 f9c5 bl 8006538 + + /** GPIO DEBUG Initialization */ + SHCI_C2_DEBUG_Init( &DebugCmdPacket ); + 80001ae: 1d3b adds r3, r7, #4 + 80001b0: 4618 mov r0, r3 + 80001b2: f005 fc52 bl 8005a5a + +/* USER CODE END APPD_EnableCPU2 */ + return; + 80001b6: bf00 nop +} + 80001b8: 3720 adds r7, #32 + 80001ba: 46bd mov sp, r7 + 80001bc: bdb0 pop {r4, r5, r7, pc} + 80001be: bf00 nop + 80001c0: 08007bb4 .word 0x08007bb4 + +080001c4 : + * + * (*) Not available on devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_SetPowerMode(uint32_t LowPowerMode) +{ + 80001c4: b480 push {r7} + 80001c6: b083 sub sp, #12 + 80001c8: af00 add r7, sp, #0 + 80001ca: 6078 str r0, [r7, #4] + MODIFY_REG(PWR->C2CR1, PWR_C2CR1_LPMS, LowPowerMode); + 80001cc: 4b07 ldr r3, [pc, #28] @ (80001ec ) + 80001ce: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 + 80001d2: f023 0207 bic.w r2, r3, #7 + 80001d6: 4905 ldr r1, [pc, #20] @ (80001ec ) + 80001d8: 687b ldr r3, [r7, #4] + 80001da: 4313 orrs r3, r2 + 80001dc: f8c1 3080 str.w r3, [r1, #128] @ 0x80 +} + 80001e0: bf00 nop + 80001e2: 370c adds r7, #12 + 80001e4: 46bd mov sp, r7 + 80001e6: f85d 7b04 ldr.w r7, [sp], #4 + 80001ea: 4770 bx lr + 80001ec: 58000400 .word 0x58000400 + +080001f0 : + * @arg @ref LL_EXTI_LINE_ALL_32_63 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine) +{ + 80001f0: b480 push {r7} + 80001f2: b083 sub sp, #12 + 80001f4: af00 add r7, sp, #0 + 80001f6: 6078 str r0, [r7, #4] + SET_BIT(EXTI->IMR2, ExtiLine); + 80001f8: 4b06 ldr r3, [pc, #24] @ (8000214 ) + 80001fa: f8d3 2090 ldr.w r2, [r3, #144] @ 0x90 + 80001fe: 4905 ldr r1, [pc, #20] @ (8000214 ) + 8000200: 687b ldr r3, [r7, #4] + 8000202: 4313 orrs r3, r2 + 8000204: f8c1 3090 str.w r3, [r1, #144] @ 0x90 +} + 8000208: bf00 nop + 800020a: 370c adds r7, #12 + 800020c: 46bd mov sp, r7 + 800020e: f85d 7b04 ldr.w r7, [sp], #4 + 8000212: 4770 bx lr + 8000214: 58000800 .word 0x58000800 + +08000218 : + * @rmtoll HSECR HSETUNE LL_RCC_HSE_SetCapacitorTuning + * @param Value Between Min_Data = 0 and Max_Data = 63 + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_SetCapacitorTuning(uint32_t Value) +{ + 8000218: b480 push {r7} + 800021a: b083 sub sp, #12 + 800021c: af00 add r7, sp, #0 + 800021e: 6078 str r0, [r7, #4] + WRITE_REG(RCC->HSECR, HSE_CONTROL_UNLOCK_KEY); + 8000220: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8000224: 4a0a ldr r2, [pc, #40] @ (8000250 ) + 8000226: f8c3 209c str.w r2, [r3, #156] @ 0x9c + MODIFY_REG(RCC->HSECR, RCC_HSECR_HSETUNE, Value << RCC_HSECR_HSETUNE_Pos); + 800022a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800022e: f8d3 309c ldr.w r3, [r3, #156] @ 0x9c + 8000232: f423 527c bic.w r2, r3, #16128 @ 0x3f00 + 8000236: 687b ldr r3, [r7, #4] + 8000238: 021b lsls r3, r3, #8 + 800023a: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800023e: 4313 orrs r3, r2 + 8000240: f8c1 309c str.w r3, [r1, #156] @ 0x9c +} + 8000244: bf00 nop + 8000246: 370c adds r7, #12 + 8000248: 46bd mov sp, r7 + 800024a: f85d 7b04 ldr.w r7, [sp], #4 + 800024e: 4770 bx lr + 8000250: cafecafe .word 0xcafecafe + +08000254 : + * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_MSI + * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_HSI + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetClkAfterWakeFromStop(uint32_t Clock) +{ + 8000254: b480 push {r7} + 8000256: b083 sub sp, #12 + 8000258: af00 add r7, sp, #0 + 800025a: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CFGR, RCC_CFGR_STOPWUCK, Clock); + 800025c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8000260: 689b ldr r3, [r3, #8] + 8000262: f423 4200 bic.w r2, r3, #32768 @ 0x8000 + 8000266: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800026a: 687b ldr r3, [r7, #4] + 800026c: 4313 orrs r3, r2 + 800026e: 608b str r3, [r1, #8] +} + 8000270: bf00 nop + 8000272: 370c adds r7, #12 + 8000274: 46bd mov sp, r7 + 8000276: f85d 7b04 ldr.w r7, [sp], #4 + 800027a: 4770 bx lr + +0800027c : + * @note For STM32WBxxxx devices, the device ID is 0x495 + * @rmtoll DBGMCU_IDCODE DEV_ID LL_DBGMCU_GetDeviceID + * @retval Values between Min_Data=0x00 and Max_Data=0xFFF (ex: device ID is 0x495) + */ +__STATIC_INLINE uint32_t LL_DBGMCU_GetDeviceID(void) +{ + 800027c: b480 push {r7} + 800027e: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_DEV_ID)); + 8000280: 4b04 ldr r3, [pc, #16] @ (8000294 ) + 8000282: 681b ldr r3, [r3, #0] + 8000284: f3c3 030b ubfx r3, r3, #0, #12 +} + 8000288: 4618 mov r0, r3 + 800028a: 46bd mov sp, r7 + 800028c: f85d 7b04 ldr.w r7, [sp], #4 + 8000290: 4770 bx lr + 8000292: bf00 nop + 8000294: e0042000 .word 0xe0042000 + +08000298 : + * @note This field indicates the revision of the device. + * @rmtoll DBGMCU_IDCODE REV_ID LL_DBGMCU_GetRevisionID + * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF + */ +__STATIC_INLINE uint32_t LL_DBGMCU_GetRevisionID(void) +{ + 8000298: b480 push {r7} + 800029a: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_REV_ID) >> DBGMCU_IDCODE_REV_ID_Pos); + 800029c: 4b04 ldr r3, [pc, #16] @ (80002b0 ) + 800029e: 681b ldr r3, [r3, #0] + 80002a0: 0c1b lsrs r3, r3, #16 + 80002a2: b29b uxth r3, r3 +} + 80002a4: 4618 mov r0, r3 + 80002a6: 46bd mov sp, r7 + 80002a8: f85d 7b04 ldr.w r7, [sp], #4 + 80002ac: 4770 bx lr + 80002ae: bf00 nop + 80002b0: e0042000 .word 0xe0042000 + +080002b4 : + * @brief Processor uses sleep as its low power mode + * @rmtoll SCB_SCR SLEEPDEEP LL_LPM_EnableSleep + * @retval None + */ +__STATIC_INLINE void LL_LPM_EnableSleep(void) +{ + 80002b4: b480 push {r7} + 80002b6: af00 add r7, sp, #0 + /* Clear SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + 80002b8: 4b05 ldr r3, [pc, #20] @ (80002d0 ) + 80002ba: 691b ldr r3, [r3, #16] + 80002bc: 4a04 ldr r2, [pc, #16] @ (80002d0 ) + 80002be: f023 0304 bic.w r3, r3, #4 + 80002c2: 6113 str r3, [r2, #16] +} + 80002c4: bf00 nop + 80002c6: 46bd mov sp, r7 + 80002c8: f85d 7b04 ldr.w r7, [sp], #4 + 80002cc: 4770 bx lr + 80002ce: bf00 nop + 80002d0: e000ed00 .word 0xe000ed00 + +080002d4 : + * @rmtoll WPR KEY LL_RTC_EnableWriteProtection + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableWriteProtection(RTC_TypeDef *RTCx) +{ + 80002d4: b480 push {r7} + 80002d6: b083 sub sp, #12 + 80002d8: af00 add r7, sp, #0 + 80002da: 6078 str r0, [r7, #4] + WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_DISABLE); + 80002dc: 687b ldr r3, [r7, #4] + 80002de: 22ff movs r2, #255 @ 0xff + 80002e0: 625a str r2, [r3, #36] @ 0x24 +} + 80002e2: bf00 nop + 80002e4: 370c adds r7, #12 + 80002e6: 46bd mov sp, r7 + 80002e8: f85d 7b04 ldr.w r7, [sp], #4 + 80002ec: 4770 bx lr + +080002ee : + * @rmtoll WPR KEY LL_RTC_DisableWriteProtection + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableWriteProtection(RTC_TypeDef *RTCx) +{ + 80002ee: b480 push {r7} + 80002f0: b083 sub sp, #12 + 80002f2: af00 add r7, sp, #0 + 80002f4: 6078 str r0, [r7, #4] + WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_1); + 80002f6: 687b ldr r3, [r7, #4] + 80002f8: 22ca movs r2, #202 @ 0xca + 80002fa: 625a str r2, [r3, #36] @ 0x24 + WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_2); + 80002fc: 687b ldr r3, [r7, #4] + 80002fe: 2253 movs r2, #83 @ 0x53 + 8000300: 625a str r2, [r3, #36] @ 0x24 +} + 8000302: bf00 nop + 8000304: 370c adds r7, #12 + 8000306: 46bd mov sp, r7 + 8000308: f85d 7b04 ldr.w r7, [sp], #4 + 800030c: 4770 bx lr + +0800030e : + * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE + * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE_WUT + * @retval None + */ +__STATIC_INLINE void LL_RTC_WAKEUP_SetClock(RTC_TypeDef *RTCx, uint32_t WakeupClock) +{ + 800030e: b480 push {r7} + 8000310: b083 sub sp, #12 + 8000312: af00 add r7, sp, #0 + 8000314: 6078 str r0, [r7, #4] + 8000316: 6039 str r1, [r7, #0] + MODIFY_REG(RTCx->CR, RTC_CR_WUCKSEL, WakeupClock); + 8000318: 687b ldr r3, [r7, #4] + 800031a: 689b ldr r3, [r3, #8] + 800031c: f023 0207 bic.w r2, r3, #7 + 8000320: 683b ldr r3, [r7, #0] + 8000322: 431a orrs r2, r3 + 8000324: 687b ldr r3, [r7, #4] + 8000326: 609a str r2, [r3, #8] +} + 8000328: bf00 nop + 800032a: 370c adds r7, #12 + 800032c: 46bd mov sp, r7 + 800032e: f85d 7b04 ldr.w r7, [sp], #4 + 8000332: 4770 bx lr + +08000334 : + +/* USER CODE END PFP */ + +/* Functions Definition ------------------------------------------------------*/ +void MX_APPE_Config(void) +{ + 8000334: b580 push {r7, lr} + 8000336: af00 add r7, sp, #0 + /** + * The OPTVERR flag is wrongly set at power on + * It shall be cleared before using any HAL_FLASH_xxx() api + */ + __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR); + 8000338: 4b04 ldr r3, [pc, #16] @ (800034c ) + 800033a: f44f 4200 mov.w r2, #32768 @ 0x8000 + 800033e: 611a str r2, [r3, #16] + + /** + * Reset some configurations so that the system behave in the same way + * when either out of nReset or Power On + */ + Reset_Device(); + 8000340: f000 f824 bl 800038c + + /* Configure HSE Tuning */ + Config_HSE(); + 8000344: f000 f829 bl 800039a + + return; + 8000348: bf00 nop +} + 800034a: bd80 pop {r7, pc} + 800034c: 58004000 .word 0x58004000 + +08000350 : + +void MX_APPE_Init(void) +{ + 8000350: b580 push {r7, lr} + 8000352: af00 add r7, sp, #0 + System_Init(); /**< System initialization */ + 8000354: f000 f835 bl 80003c2 + + SystemPower_Config(); /**< Configure the system Power Mode */ + 8000358: f000 f84e bl 80003f8 + + HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer */ + 800035c: 4903 ldr r1, [pc, #12] @ (800036c ) + 800035e: 2000 movs r0, #0 + 8000360: f000 fcc6 bl 8000cf0 + +/* USER CODE BEGIN APPE_Init_1 */ + +/* USER CODE END APPE_Init_1 */ + appe_Tl_Init(); /* Initialize all transport layers */ + 8000364: f000 f856 bl 8000414 + */ +/* USER CODE BEGIN APPE_Init_2 */ + +/* USER CODE END APPE_Init_2 */ + + return; + 8000368: bf00 nop +} + 800036a: bd80 pop {r7, pc} + 800036c: 200001cc .word 0x200001cc + +08000370 : + +void Init_Smps(void) +{ + 8000370: b480 push {r7} + 8000372: af00 add r7, sp, #0 + LL_PWR_SMPS_SetStartupCurrent(LL_PWR_SMPS_STARTUP_CURRENT_80MA); + LL_PWR_SMPS_SetOutputVoltageLevel(LL_PWR_SMPS_OUTPUT_VOLTAGE_1V40); + LL_PWR_SMPS_Enable(); +#endif /* CFG_USE_SMPS != 0 */ + + return; + 8000374: bf00 nop +} + 8000376: 46bd mov sp, r7 + 8000378: f85d 7b04 ldr.w r7, [sp], #4 + 800037c: 4770 bx lr + +0800037e : + +void Init_Exti(void) +{ + 800037e: b580 push {r7, lr} + 8000380: af00 add r7, sp, #0 + /* Enable IPCC(36), HSEM(38) wakeup interrupts on CPU1 */ + LL_EXTI_EnableIT_32_63(LL_EXTI_LINE_36 | LL_EXTI_LINE_38); + 8000382: 2050 movs r0, #80 @ 0x50 + 8000384: f7ff ff34 bl 80001f0 + + return; + 8000388: bf00 nop +} + 800038a: bd80 pop {r7, pc} + +0800038c : + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static void Reset_Device(void) +{ + 800038c: b480 push {r7} + 800038e: af00 add r7, sp, #0 + Reset_BackupDomain(); + + Reset_IPCC(); +#endif /* CFG_HW_RESET_BY_FW == 1 */ + + return; + 8000390: bf00 nop +} + 8000392: 46bd mov sp, r7 + 8000394: f85d 7b04 ldr.w r7, [sp], #4 + 8000398: 4770 bx lr + +0800039a : + return; +} +#endif /* CFG_HW_RESET_BY_FW == 1 */ + +static void Config_HSE(void) +{ + 800039a: b580 push {r7, lr} + 800039c: b082 sub sp, #8 + 800039e: af00 add r7, sp, #0 + OTP_ID0_t * p_otp; + + /** + * Read HSE_Tuning from OTP + */ + p_otp = (OTP_ID0_t *) OTP_Read(0); + 80003a0: 2000 movs r0, #0 + 80003a2: f006 f95d bl 8006660 + 80003a6: 6078 str r0, [r7, #4] + if (p_otp) + 80003a8: 687b ldr r3, [r7, #4] + 80003aa: 2b00 cmp r3, #0 + 80003ac: d005 beq.n 80003ba + { + LL_RCC_HSE_SetCapacitorTuning(p_otp->hse_tuning); + 80003ae: 687b ldr r3, [r7, #4] + 80003b0: 799b ldrb r3, [r3, #6] + 80003b2: 4618 mov r0, r3 + 80003b4: f7ff ff30 bl 8000218 + } + + return; + 80003b8: bf00 nop + 80003ba: bf00 nop +} + 80003bc: 3708 adds r7, #8 + 80003be: 46bd mov sp, r7 + 80003c0: bd80 pop {r7, pc} + +080003c2 : + +static void System_Init(void) +{ + 80003c2: b580 push {r7, lr} + 80003c4: af00 add r7, sp, #0 + Init_Smps(); + 80003c6: f7ff ffd3 bl 8000370 + + Init_Exti(); + 80003ca: f7ff ffd8 bl 800037e + + Init_Rtc(); + 80003ce: f000 f803 bl 80003d8 + + return; + 80003d2: bf00 nop +} + 80003d4: bd80 pop {r7, pc} + ... + +080003d8 : + +static void Init_Rtc(void) +{ + 80003d8: b580 push {r7, lr} + 80003da: af00 add r7, sp, #0 + /* Disable RTC registers write protection */ + LL_RTC_DisableWriteProtection(RTC); + 80003dc: 4805 ldr r0, [pc, #20] @ (80003f4 ) + 80003de: f7ff ff86 bl 80002ee + + LL_RTC_WAKEUP_SetClock(RTC, CFG_RTC_WUCKSEL_DIVIDER); + 80003e2: 2100 movs r1, #0 + 80003e4: 4803 ldr r0, [pc, #12] @ (80003f4 ) + 80003e6: f7ff ff92 bl 800030e + + /* Enable RTC registers write protection */ + LL_RTC_EnableWriteProtection(RTC); + 80003ea: 4802 ldr r0, [pc, #8] @ (80003f4 ) + 80003ec: f7ff ff72 bl 80002d4 + + return; + 80003f0: bf00 nop +} + 80003f2: bd80 pop {r7, pc} + 80003f4: 40002800 .word 0x40002800 + +080003f8 : + * + * @param None + * @retval None + */ +static void SystemPower_Config(void) +{ + 80003f8: b580 push {r7, lr} + 80003fa: af00 add r7, sp, #0 + /** + * Select HSI as system clock source after Wake Up from Stop mode + */ + LL_RCC_SetClkAfterWakeFromStop(LL_RCC_STOP_WAKEUPCLOCK_HSI); + 80003fc: f44f 4000 mov.w r0, #32768 @ 0x8000 + 8000400: f7ff ff28 bl 8000254 + + /* Initialize low power manager */ + UTIL_LPM_Init(); + 8000404: f007 f880 bl 8007508 + /* Initialize the CPU2 reset value before starting CPU2 with C2BOOT */ + LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN); + 8000408: 2004 movs r0, #4 + 800040a: f7ff fedb bl 80001c4 + * Enable USB power + */ + HAL_PWREx_EnableVddUSB(); +#endif /* CFG_USB_INTERFACE_ENABLE != 0 */ + + return; + 800040e: bf00 nop +} + 8000410: bd80 pop {r7, pc} + ... + +08000414 : + +static void appe_Tl_Init(void) +{ + 8000414: b580 push {r7, lr} + 8000416: b088 sub sp, #32 + 8000418: af00 add r7, sp, #0 + TL_MM_Config_t tl_mm_config; + SHCI_TL_HciInitConf_t SHci_Tl_Init_Conf; + /**< Reference table initialization */ + TL_Init(); + 800041a: f005 fed3 bl 80061c4 + + /**< System channel initialization */ + UTIL_SEQ_RegTask(1<< CFG_TASK_SYSTEM_HCI_ASYNCH_EVT_ID, UTIL_SEQ_RFU, shci_user_evt_proc); + 800041e: 4a11 ldr r2, [pc, #68] @ (8000464 ) + 8000420: 2100 movs r1, #0 + 8000422: 2004 movs r0, #4 + 8000424: f007 fa34 bl 8007890 + SHci_Tl_Init_Conf.p_cmdbuffer = (uint8_t*)&SystemCmdBuffer; + 8000428: 4b0f ldr r3, [pc, #60] @ (8000468 ) + 800042a: 603b str r3, [r7, #0] + SHci_Tl_Init_Conf.StatusNotCallBack = APPE_SysStatusNot; + 800042c: 4b0f ldr r3, [pc, #60] @ (800046c ) + 800042e: 607b str r3, [r7, #4] + shci_init(APPE_SysUserEvtRx, (void*) &SHci_Tl_Init_Conf); + 8000430: 463b mov r3, r7 + 8000432: 4619 mov r1, r3 + 8000434: 480e ldr r0, [pc, #56] @ (8000470 ) + 8000436: f005 fd87 bl 8005f48 + + /**< Memory Manager channel initialization */ + tl_mm_config.p_BleSpareEvtBuffer = BleSpareEvtBuffer; + 800043a: 4b0e ldr r3, [pc, #56] @ (8000474 ) + 800043c: 60bb str r3, [r7, #8] + tl_mm_config.p_SystemSpareEvtBuffer = SystemSpareEvtBuffer; + 800043e: 4b0e ldr r3, [pc, #56] @ (8000478 ) + 8000440: 60fb str r3, [r7, #12] + tl_mm_config.p_AsynchEvtPool = EvtPool; + 8000442: 4b0e ldr r3, [pc, #56] @ (800047c ) + 8000444: 613b str r3, [r7, #16] + tl_mm_config.AsynchEvtPoolSize = POOL_SIZE; + 8000446: f240 533c movw r3, #1340 @ 0x53c + 800044a: 617b str r3, [r7, #20] + TL_MM_Init(&tl_mm_config); + 800044c: f107 0308 add.w r3, r7, #8 + 8000450: 4618 mov r0, r3 + 8000452: f005 fffd bl 8006450 + + TL_Enable(); + 8000456: f005 feaf bl 80061b8 + + return; + 800045a: bf00 nop +} + 800045c: 3720 adds r7, #32 + 800045e: 46bd mov sp, r7 + 8000460: bd80 pop {r7, pc} + 8000462: bf00 nop + 8000464: 08005f81 .word 0x08005f81 + 8000468: 20030734 .word 0x20030734 + 800046c: 08000481 .word 0x08000481 + 8000470: 08000499 .word 0x08000499 + 8000474: 2003094c .word 0x2003094c + 8000478: 20030840 .word 0x20030840 + 800047c: 200301f8 .word 0x200301f8 + +08000480 : + +static void APPE_SysStatusNot(SHCI_TL_CmdStatus_t status) +{ + 8000480: b480 push {r7} + 8000482: b083 sub sp, #12 + 8000484: af00 add r7, sp, #0 + 8000486: 4603 mov r3, r0 + 8000488: 71fb strb r3, [r7, #7] + UNUSED(status); + return; + 800048a: bf00 nop +} + 800048c: 370c adds r7, #12 + 800048e: 46bd mov sp, r7 + 8000490: f85d 7b04 ldr.w r7, [sp], #4 + 8000494: 4770 bx lr + ... + +08000498 : + * The buffer shall not be released + * (eg ((tSHCI_UserEvtRxParam*)pPayload)->status shall be set to SHCI_TL_UserEventFlow_Disable) + * When the status is not filled, the buffer is released by default + */ +static void APPE_SysUserEvtRx(void * pPayload) +{ + 8000498: b580 push {r7, lr} + 800049a: b088 sub sp, #32 + 800049c: af00 add r7, sp, #0 + 800049e: 6078 str r0, [r7, #4] + TL_AsynchEvt_t *p_sys_event; + WirelessFwInfo_t WirelessInfo; + + p_sys_event = (TL_AsynchEvt_t*)(((tSHCI_UserEvtRxParam*)pPayload)->pckt->evtserial.evt.payload); + 80004a0: 687b ldr r3, [r7, #4] + 80004a2: 685b ldr r3, [r3, #4] + 80004a4: 330b adds r3, #11 + 80004a6: 61fb str r3, [r7, #28] + + switch(p_sys_event->subevtcode) + 80004a8: 69fb ldr r3, [r7, #28] + 80004aa: 881b ldrh r3, [r3, #0] + 80004ac: b29b uxth r3, r3 + 80004ae: f5a3 4312 sub.w r3, r3, #37376 @ 0x9200 + 80004b2: 2b07 cmp r3, #7 + 80004b4: d81f bhi.n 80004f6 + 80004b6: a201 add r2, pc, #4 @ (adr r2, 80004bc ) + 80004b8: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 80004bc: 080004dd .word 0x080004dd + 80004c0: 080004ef .word 0x080004ef + 80004c4: 080004f7 .word 0x080004f7 + 80004c8: 080004f7 .word 0x080004f7 + 80004cc: 080004f7 .word 0x080004f7 + 80004d0: 080004f7 .word 0x080004f7 + 80004d4: 080004f7 .word 0x080004f7 + 80004d8: 080004f7 .word 0x080004f7 + { + case SHCI_SUB_EVT_CODE_READY: + /* Read the firmware version of both the wireless firmware and the FUS */ + SHCI_GetWirelessFwInfo(&WirelessInfo); + 80004dc: f107 030c add.w r3, r7, #12 + 80004e0: 4618 mov r0, r3 + 80004e2: f005 fae7 bl 8005ab4 + APP_DBG_MSG("Wireless Firmware version %d.%d.%d\n", WirelessInfo.VersionMajor, WirelessInfo.VersionMinor, WirelessInfo.VersionSub); + APP_DBG_MSG("Wireless Firmware build %d\n", WirelessInfo.VersionReleaseType); + APP_DBG_MSG("FUS version %d.%d.%d\n", WirelessInfo.FusVersionMajor, WirelessInfo.FusVersionMinor, WirelessInfo.FusVersionSub); + + APP_DBG_MSG(">>== SHCI_SUB_EVT_CODE_READY\n\r"); + APPE_SysEvtReadyProcessing(pPayload); + 80004e6: 6878 ldr r0, [r7, #4] + 80004e8: f000 f81b bl 8000522 + break; + 80004ec: e004 b.n 80004f8 + + case SHCI_SUB_EVT_ERROR_NOTIF: + APP_DBG_MSG(">>== SHCI_SUB_EVT_ERROR_NOTIF \n\r"); + APPE_SysEvtError(pPayload); + 80004ee: 6878 ldr r0, [r7, #4] + 80004f0: f000 f806 bl 8000500 + break; + 80004f4: e000 b.n 80004f8 + case SHCI_SUB_EVT_NVM_END_ERASE: + APP_DBG_MSG(">>== SHCI_SUB_EVT_NVM_END_ERASE\n\r"); + break; + + default: + break; + 80004f6: bf00 nop + } + + return; + 80004f8: bf00 nop +} + 80004fa: 3720 adds r7, #32 + 80004fc: 46bd mov sp, r7 + 80004fe: bd80 pop {r7, pc} + +08000500 : + * @param ErrorCode : errorCode detected by the M0 firmware + * + * @retval None + */ +static void APPE_SysEvtError(void * pPayload) +{ + 8000500: b480 push {r7} + 8000502: b085 sub sp, #20 + 8000504: af00 add r7, sp, #0 + 8000506: 6078 str r0, [r7, #4] + TL_AsynchEvt_t *p_sys_event; + SCHI_SystemErrCode_t *p_sys_error_code; + + p_sys_event = (TL_AsynchEvt_t*)(((tSHCI_UserEvtRxParam*)pPayload)->pckt->evtserial.evt.payload); + 8000508: 687b ldr r3, [r7, #4] + 800050a: 685b ldr r3, [r3, #4] + 800050c: 330b adds r3, #11 + 800050e: 60fb str r3, [r7, #12] + p_sys_error_code = (SCHI_SystemErrCode_t*) p_sys_event->payload; + 8000510: 68fb ldr r3, [r7, #12] + 8000512: 3302 adds r3, #2 + 8000514: 60bb str r3, [r7, #8] + } + else + { + APP_DBG_MSG(">>== SHCI_SUB_EVT_ERROR_NOTIF WITH REASON - BLE ERROR \n"); + } + return; + 8000516: bf00 nop +} + 8000518: 3714 adds r7, #20 + 800051a: 46bd mov sp, r7 + 800051c: f85d 7b04 ldr.w r7, [sp], #4 + 8000520: 4770 bx lr + +08000522 : + +static void APPE_SysEvtReadyProcessing(void * pPayload) +{ + 8000522: b580 push {r7, lr} + 8000524: b08a sub sp, #40 @ 0x28 + 8000526: af00 add r7, sp, #0 + 8000528: 6078 str r0, [r7, #4] + TL_AsynchEvt_t *p_sys_event; + SHCI_C2_Ready_Evt_t *p_sys_ready_event; + + SHCI_C2_CONFIG_Cmd_Param_t config_param = {0}; + 800052a: f107 0308 add.w r3, r7, #8 + 800052e: 2200 movs r2, #0 + 8000530: 601a str r2, [r3, #0] + 8000532: 605a str r2, [r3, #4] + 8000534: 609a str r2, [r3, #8] + 8000536: 60da str r2, [r3, #12] + uint32_t RevisionID=0; + 8000538: 2300 movs r3, #0 + 800053a: 627b str r3, [r7, #36] @ 0x24 + uint32_t DeviceID=0; + 800053c: 2300 movs r3, #0 + 800053e: 623b str r3, [r7, #32] + + p_sys_event = (TL_AsynchEvt_t*)(((tSHCI_UserEvtRxParam*)pPayload)->pckt->evtserial.evt.payload); + 8000540: 687b ldr r3, [r7, #4] + 8000542: 685b ldr r3, [r3, #4] + 8000544: 330b adds r3, #11 + 8000546: 61fb str r3, [r7, #28] + p_sys_ready_event = (SHCI_C2_Ready_Evt_t*) p_sys_event->payload; + 8000548: 69fb ldr r3, [r7, #28] + 800054a: 3302 adds r3, #2 + 800054c: 61bb str r3, [r7, #24] + + if (p_sys_ready_event->sysevt_ready_rsp == WIRELESS_FW_RUNNING) + 800054e: 69bb ldr r3, [r7, #24] + 8000550: 781b ldrb r3, [r3, #0] + 8000552: 2b00 cmp r3, #0 + 8000554: d11d bne.n 8000592 + * The wireless firmware is running on the CPU2 + */ + APP_DBG_MSG(">>== WIRELESS_FW_RUNNING \n"); + + /* Traces channel initialization */ + APPD_EnableCPU2(); + 8000556: f7ff fe19 bl 800018c + + /* Enable all events Notification */ + config_param.PayloadCmdSize = SHCI_C2_CONFIG_PAYLOAD_CMD_SIZE; + 800055a: 230f movs r3, #15 + 800055c: 723b strb r3, [r7, #8] + config_param.EvtMask1 = SHCI_C2_CONFIG_EVTMASK1_BIT0_ERROR_NOTIF_ENABLE + 800055e: 237f movs r3, #127 @ 0x7f + 8000560: 72bb strb r3, [r7, #10] + * @brief Return the device revision identifier + * @note This field indicates the revision of the device. + * @rmtoll DBGMCU_IDCODE REV_ID LL_DBGMCU_GetRevisionID + * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF + */ + RevisionID = LL_DBGMCU_GetRevisionID(); + 8000562: f7ff fe99 bl 8000298 + 8000566: 6278 str r0, [r7, #36] @ 0x24 + + APP_DBG_MSG(">>== DBGMCU_GetRevisionID= %lx \n\r", RevisionID); + + config_param.RevisionID = (uint16_t)RevisionID; + 8000568: 6a7b ldr r3, [r7, #36] @ 0x24 + 800056a: b29b uxth r3, r3 + 800056c: 82bb strh r3, [r7, #20] + + DeviceID = LL_DBGMCU_GetDeviceID(); + 800056e: f7ff fe85 bl 800027c + 8000572: 6238 str r0, [r7, #32] + APP_DBG_MSG(">>== DBGMCU_GetDeviceID= %lx \n\r", DeviceID); + config_param.DeviceID = (uint16_t)DeviceID; + 8000574: 6a3b ldr r3, [r7, #32] + 8000576: b29b uxth r3, r3 + 8000578: 82fb strh r3, [r7, #22] + (void)SHCI_C2_Config(&config_param); + 800057a: f107 0308 add.w r3, r7, #8 + 800057e: 4618 mov r0, r3 + 8000580: f005 fa82 bl 8005a88 + + APP_BLE_Init(); + 8000584: f006 f976 bl 8006874 + UTIL_LPM_SetOffMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE); + 8000588: 2100 movs r1, #0 + 800058a: 2001 movs r0, #1 + 800058c: f006 ffce bl 800752c + else + { + APP_DBG_MSG(">>== SHCI_SUB_EVT_CODE_READY - UNEXPECTED CASE \n\r"); + } + + return; + 8000590: e007 b.n 80005a2 + else if (p_sys_ready_event->sysevt_ready_rsp == FUS_FW_RUNNING) + 8000592: 69bb ldr r3, [r7, #24] + 8000594: 781b ldrb r3, [r3, #0] + 8000596: 2b01 cmp r3, #1 + 8000598: d103 bne.n 80005a2 + ((tSHCI_UserEvtRxParam*)pPayload)->status = SHCI_TL_UserEventFlow_Disable; + 800059a: 687b ldr r3, [r7, #4] + 800059c: 2200 movs r2, #0 + 800059e: 701a strb r2, [r3, #0] + return; + 80005a0: bf00 nop + 80005a2: bf00 nop +} + 80005a4: 3728 adds r7, #40 @ 0x28 + 80005a6: 46bd mov sp, r7 + 80005a8: bd80 pop {r7, pc} + +080005aa : + * + * WRAP FUNCTIONS + * + *************************************************************/ +void HAL_Delay(uint32_t Delay) +{ + 80005aa: b580 push {r7, lr} + 80005ac: b084 sub sp, #16 + 80005ae: af00 add r7, sp, #0 + 80005b0: 6078 str r0, [r7, #4] + uint32_t tickstart = HAL_GetTick(); + 80005b2: f001 f9f7 bl 80019a4 + 80005b6: 60b8 str r0, [r7, #8] + uint32_t wait = Delay; + 80005b8: 687b ldr r3, [r7, #4] + 80005ba: 60fb str r3, [r7, #12] + + /* Add a freq to guarantee minimum wait */ + if (wait < HAL_MAX_DELAY) + 80005bc: 68fb ldr r3, [r7, #12] + 80005be: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff + 80005c2: d00a beq.n 80005da + { + wait += HAL_GetTickFreq(); + 80005c4: f001 fa06 bl 80019d4 + 80005c8: 4603 mov r3, r0 + 80005ca: 461a mov r2, r3 + 80005cc: 68fb ldr r3, [r7, #12] + 80005ce: 4413 add r3, r2 + 80005d0: 60fb str r3, [r7, #12] + } + + while ((HAL_GetTick() - tickstart) < wait) + 80005d2: e002 b.n 80005da + { + /************************************************************************************ + * ENTER SLEEP MODE + ***********************************************************************************/ + LL_LPM_EnableSleep(); /**< Clear SLEEPDEEP bit of Cortex System Control Register */ + 80005d4: f7ff fe6e bl 80002b4 + */ + #if defined (__CC_ARM) || defined (__ARMCC_VERSION) + __force_stores(); + #endif /* __ARMCC_VERSION */ + + __WFI(); + 80005d8: bf30 wfi + while ((HAL_GetTick() - tickstart) < wait) + 80005da: f001 f9e3 bl 80019a4 + 80005de: 4602 mov r2, r0 + 80005e0: 68bb ldr r3, [r7, #8] + 80005e2: 1ad3 subs r3, r2, r3 + 80005e4: 68fa ldr r2, [r7, #12] + 80005e6: 429a cmp r2, r3 + 80005e8: d8f4 bhi.n 80005d4 + } +} + 80005ea: bf00 nop + 80005ec: bf00 nop + 80005ee: 3710 adds r7, #16 + 80005f0: 46bd mov sp, r7 + 80005f2: bd80 pop {r7, pc} + +080005f4 : + +void MX_APPE_Process(void) +{ + 80005f4: b580 push {r7, lr} + 80005f6: af00 add r7, sp, #0 + /* USER CODE BEGIN MX_APPE_Process_1 */ + + /* USER CODE END MX_APPE_Process_1 */ + UTIL_SEQ_Run(UTIL_SEQ_DEFAULT); + 80005f8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff + 80005fc: f006 ffc6 bl 800758c + /* USER CODE BEGIN MX_APPE_Process_2 */ + + /* USER CODE END MX_APPE_Process_2 */ +} + 8000600: bf00 nop + 8000602: bd80 pop {r7, pc} + +08000604 : + +void UTIL_SEQ_Idle(void) +{ + 8000604: b480 push {r7} + 8000606: af00 add r7, sp, #0 +#if (CFG_LPM_SUPPORTED == 1) + UTIL_LPM_EnterLowPower(); +#endif /* CFG_LPM_SUPPORTED == 1 */ + return; + 8000608: bf00 nop +} + 800060a: 46bd mov sp, r7 + 800060c: f85d 7b04 ldr.w r7, [sp], #4 + 8000610: 4770 bx lr + +08000612 : + +void shci_notify_asynch_evt(void* pdata) +{ + 8000612: b580 push {r7, lr} + 8000614: b082 sub sp, #8 + 8000616: af00 add r7, sp, #0 + 8000618: 6078 str r0, [r7, #4] + UTIL_SEQ_SetTask(1< + return; + 8000622: bf00 nop +} + 8000624: 3708 adds r7, #8 + 8000626: 46bd mov sp, r7 + 8000628: bd80 pop {r7, pc} + +0800062a : + +void shci_cmd_resp_release(uint32_t flag) +{ + 800062a: b580 push {r7, lr} + 800062c: b082 sub sp, #8 + 800062e: af00 add r7, sp, #0 + 8000630: 6078 str r0, [r7, #4] + UTIL_SEQ_SetEvt(1<< CFG_IDLEEVT_SYSTEM_HCI_CMD_EVT_RSP_ID); + 8000632: 2002 movs r0, #2 + 8000634: f007 f9ba bl 80079ac + return; + 8000638: bf00 nop +} + 800063a: 3708 adds r7, #8 + 800063c: 46bd mov sp, r7 + 800063e: bd80 pop {r7, pc} + +08000640 : + +void shci_cmd_resp_wait(uint32_t timeout) +{ + 8000640: b580 push {r7, lr} + 8000642: b082 sub sp, #8 + 8000644: af00 add r7, sp, #0 + 8000646: 6078 str r0, [r7, #4] + UTIL_SEQ_WaitEvt(1<< CFG_IDLEEVT_SYSTEM_HCI_CMD_EVT_RSP_ID); + 8000648: 2002 movs r0, #2 + 800064a: f007 f9cf bl 80079ec + return; + 800064e: bf00 nop +} + 8000650: 3708 adds r7, #8 + 8000652: 46bd mov sp, r7 + 8000654: bd80 pop {r7, pc} + ... + +08000658 : +{ + 8000658: b480 push {r7} + 800065a: b083 sub sp, #12 + 800065c: af00 add r7, sp, #0 + 800065e: 6078 str r0, [r7, #4] + SET_BIT(EXTI->IMR1, ExtiLine); + 8000660: 4b06 ldr r3, [pc, #24] @ (800067c ) + 8000662: f8d3 2080 ldr.w r2, [r3, #128] @ 0x80 + 8000666: 4905 ldr r1, [pc, #20] @ (800067c ) + 8000668: 687b ldr r3, [r7, #4] + 800066a: 4313 orrs r3, r2 + 800066c: f8c1 3080 str.w r3, [r1, #128] @ 0x80 +} + 8000670: bf00 nop + 8000672: 370c adds r7, #12 + 8000674: 46bd mov sp, r7 + 8000676: f85d 7b04 ldr.w r7, [sp], #4 + 800067a: 4770 bx lr + 800067c: 58000800 .word 0x58000800 + +08000680 : + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine) +{ + 8000680: b480 push {r7} + 8000682: b083 sub sp, #12 + 8000684: af00 add r7, sp, #0 + 8000686: 6078 str r0, [r7, #4] + SET_BIT(EXTI->RTSR1, ExtiLine); + 8000688: 4b05 ldr r3, [pc, #20] @ (80006a0 ) + 800068a: 681a ldr r2, [r3, #0] + 800068c: 4904 ldr r1, [pc, #16] @ (80006a0 ) + 800068e: 687b ldr r3, [r7, #4] + 8000690: 4313 orrs r3, r2 + 8000692: 600b str r3, [r1, #0] + +} + 8000694: bf00 nop + 8000696: 370c adds r7, #12 + 8000698: 46bd mov sp, r7 + 800069a: f85d 7b04 ldr.w r7, [sp], #4 + 800069e: 4770 bx lr + 80006a0: 58000800 .word 0x58000800 + +080006a4 : + * reliability of the value + * @param None + * @retval SSR value read + */ +static uint32_t ReadRtcSsrValue(void) +{ + 80006a4: b480 push {r7} + 80006a6: b083 sub sp, #12 + 80006a8: af00 add r7, sp, #0 + uint32_t first_read; + uint32_t second_read; + + first_read = (uint32_t)(READ_BIT(RTC->SSR, RTC_SSR_SS)); + 80006aa: 4b0d ldr r3, [pc, #52] @ (80006e0 ) + 80006ac: 6a9b ldr r3, [r3, #40] @ 0x28 + 80006ae: b29b uxth r3, r3 + 80006b0: 607b str r3, [r7, #4] + + second_read = (uint32_t)(READ_BIT(RTC->SSR, RTC_SSR_SS)); + 80006b2: 4b0b ldr r3, [pc, #44] @ (80006e0 ) + 80006b4: 6a9b ldr r3, [r3, #40] @ 0x28 + 80006b6: b29b uxth r3, r3 + 80006b8: 603b str r3, [r7, #0] + + while(first_read != second_read) + 80006ba: e005 b.n 80006c8 + { + first_read = second_read; + 80006bc: 683b ldr r3, [r7, #0] + 80006be: 607b str r3, [r7, #4] + + second_read = (uint32_t)(READ_BIT(RTC->SSR, RTC_SSR_SS)); + 80006c0: 4b07 ldr r3, [pc, #28] @ (80006e0 ) + 80006c2: 6a9b ldr r3, [r3, #40] @ 0x28 + 80006c4: b29b uxth r3, r3 + 80006c6: 603b str r3, [r7, #0] + while(first_read != second_read) + 80006c8: 687a ldr r2, [r7, #4] + 80006ca: 683b ldr r3, [r7, #0] + 80006cc: 429a cmp r2, r3 + 80006ce: d1f5 bne.n 80006bc + } + + return second_read; + 80006d0: 683b ldr r3, [r7, #0] +} + 80006d2: 4618 mov r0, r3 + 80006d4: 370c adds r7, #12 + 80006d6: 46bd mov sp, r7 + 80006d8: f85d 7b04 ldr.w r7, [sp], #4 + 80006dc: 4770 bx lr + 80006de: bf00 nop + 80006e0: 40002800 .word 0x40002800 + +080006e4 : + * @param TimerID: The ID of the Timer + * @param RefTimerID: The ID of the Timer to be linked after + * @retval None + */ +static void LinkTimerAfter(uint8_t TimerID, uint8_t RefTimerID) +{ + 80006e4: b480 push {r7} + 80006e6: b085 sub sp, #20 + 80006e8: af00 add r7, sp, #0 + 80006ea: 4603 mov r3, r0 + 80006ec: 460a mov r2, r1 + 80006ee: 71fb strb r3, [r7, #7] + 80006f0: 4613 mov r3, r2 + 80006f2: 71bb strb r3, [r7, #6] + uint8_t next_id; + + next_id = aTimerContext[RefTimerID].NextID; + 80006f4: 79ba ldrb r2, [r7, #6] + 80006f6: 491d ldr r1, [pc, #116] @ (800076c ) + 80006f8: 4613 mov r3, r2 + 80006fa: 005b lsls r3, r3, #1 + 80006fc: 4413 add r3, r2 + 80006fe: 00db lsls r3, r3, #3 + 8000700: 440b add r3, r1 + 8000702: 3315 adds r3, #21 + 8000704: 781b ldrb r3, [r3, #0] + 8000706: 73fb strb r3, [r7, #15] + + if(next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + 8000708: 7bfb ldrb r3, [r7, #15] + 800070a: 2b06 cmp r3, #6 + 800070c: d009 beq.n 8000722 + { + aTimerContext[next_id].PreviousID = TimerID; + 800070e: 7bfa ldrb r2, [r7, #15] + 8000710: 4916 ldr r1, [pc, #88] @ (800076c ) + 8000712: 4613 mov r3, r2 + 8000714: 005b lsls r3, r3, #1 + 8000716: 4413 add r3, r2 + 8000718: 00db lsls r3, r3, #3 + 800071a: 440b add r3, r1 + 800071c: 3314 adds r3, #20 + 800071e: 79fa ldrb r2, [r7, #7] + 8000720: 701a strb r2, [r3, #0] + } + aTimerContext[TimerID].NextID = next_id; + 8000722: 79fa ldrb r2, [r7, #7] + 8000724: 4911 ldr r1, [pc, #68] @ (800076c ) + 8000726: 4613 mov r3, r2 + 8000728: 005b lsls r3, r3, #1 + 800072a: 4413 add r3, r2 + 800072c: 00db lsls r3, r3, #3 + 800072e: 440b add r3, r1 + 8000730: 3315 adds r3, #21 + 8000732: 7bfa ldrb r2, [r7, #15] + 8000734: 701a strb r2, [r3, #0] + aTimerContext[TimerID].PreviousID = RefTimerID ; + 8000736: 79fa ldrb r2, [r7, #7] + 8000738: 490c ldr r1, [pc, #48] @ (800076c ) + 800073a: 4613 mov r3, r2 + 800073c: 005b lsls r3, r3, #1 + 800073e: 4413 add r3, r2 + 8000740: 00db lsls r3, r3, #3 + 8000742: 440b add r3, r1 + 8000744: 3314 adds r3, #20 + 8000746: 79ba ldrb r2, [r7, #6] + 8000748: 701a strb r2, [r3, #0] + aTimerContext[RefTimerID].NextID = TimerID; + 800074a: 79ba ldrb r2, [r7, #6] + 800074c: 4907 ldr r1, [pc, #28] @ (800076c ) + 800074e: 4613 mov r3, r2 + 8000750: 005b lsls r3, r3, #1 + 8000752: 4413 add r3, r2 + 8000754: 00db lsls r3, r3, #3 + 8000756: 440b add r3, r1 + 8000758: 3315 adds r3, #21 + 800075a: 79fa ldrb r2, [r7, #7] + 800075c: 701a strb r2, [r3, #0] + + return; + 800075e: bf00 nop +} + 8000760: 3714 adds r7, #20 + 8000762: 46bd mov sp, r7 + 8000764: f85d 7b04 ldr.w r7, [sp], #4 + 8000768: 4770 bx lr + 800076a: bf00 nop + 800076c: 2000009c .word 0x2000009c + +08000770 : + * @param TimerID: The ID of the Timer + * @param RefTimerID: The ID of the Timer to be linked before + * @retval None + */ +static void LinkTimerBefore(uint8_t TimerID, uint8_t RefTimerID) +{ + 8000770: b480 push {r7} + 8000772: b085 sub sp, #20 + 8000774: af00 add r7, sp, #0 + 8000776: 4603 mov r3, r0 + 8000778: 460a mov r2, r1 + 800077a: 71fb strb r3, [r7, #7] + 800077c: 4613 mov r3, r2 + 800077e: 71bb strb r3, [r7, #6] + uint8_t previous_id; + + if(RefTimerID != CurrentRunningTimerID) + 8000780: 4b29 ldr r3, [pc, #164] @ (8000828 ) + 8000782: 781b ldrb r3, [r3, #0] + 8000784: b2db uxtb r3, r3 + 8000786: 79ba ldrb r2, [r7, #6] + 8000788: 429a cmp r2, r3 + 800078a: d032 beq.n 80007f2 + { + previous_id = aTimerContext[RefTimerID].PreviousID; + 800078c: 79ba ldrb r2, [r7, #6] + 800078e: 4927 ldr r1, [pc, #156] @ (800082c ) + 8000790: 4613 mov r3, r2 + 8000792: 005b lsls r3, r3, #1 + 8000794: 4413 add r3, r2 + 8000796: 00db lsls r3, r3, #3 + 8000798: 440b add r3, r1 + 800079a: 3314 adds r3, #20 + 800079c: 781b ldrb r3, [r3, #0] + 800079e: 73fb strb r3, [r7, #15] + + aTimerContext[previous_id].NextID = TimerID; + 80007a0: 7bfa ldrb r2, [r7, #15] + 80007a2: 4922 ldr r1, [pc, #136] @ (800082c ) + 80007a4: 4613 mov r3, r2 + 80007a6: 005b lsls r3, r3, #1 + 80007a8: 4413 add r3, r2 + 80007aa: 00db lsls r3, r3, #3 + 80007ac: 440b add r3, r1 + 80007ae: 3315 adds r3, #21 + 80007b0: 79fa ldrb r2, [r7, #7] + 80007b2: 701a strb r2, [r3, #0] + aTimerContext[TimerID].NextID = RefTimerID; + 80007b4: 79fa ldrb r2, [r7, #7] + 80007b6: 491d ldr r1, [pc, #116] @ (800082c ) + 80007b8: 4613 mov r3, r2 + 80007ba: 005b lsls r3, r3, #1 + 80007bc: 4413 add r3, r2 + 80007be: 00db lsls r3, r3, #3 + 80007c0: 440b add r3, r1 + 80007c2: 3315 adds r3, #21 + 80007c4: 79ba ldrb r2, [r7, #6] + 80007c6: 701a strb r2, [r3, #0] + aTimerContext[TimerID].PreviousID = previous_id ; + 80007c8: 79fa ldrb r2, [r7, #7] + 80007ca: 4918 ldr r1, [pc, #96] @ (800082c ) + 80007cc: 4613 mov r3, r2 + 80007ce: 005b lsls r3, r3, #1 + 80007d0: 4413 add r3, r2 + 80007d2: 00db lsls r3, r3, #3 + 80007d4: 440b add r3, r1 + 80007d6: 3314 adds r3, #20 + 80007d8: 7bfa ldrb r2, [r7, #15] + 80007da: 701a strb r2, [r3, #0] + aTimerContext[RefTimerID].PreviousID = TimerID; + 80007dc: 79ba ldrb r2, [r7, #6] + 80007de: 4913 ldr r1, [pc, #76] @ (800082c ) + 80007e0: 4613 mov r3, r2 + 80007e2: 005b lsls r3, r3, #1 + 80007e4: 4413 add r3, r2 + 80007e6: 00db lsls r3, r3, #3 + 80007e8: 440b add r3, r1 + 80007ea: 3314 adds r3, #20 + 80007ec: 79fa ldrb r2, [r7, #7] + 80007ee: 701a strb r2, [r3, #0] + { + aTimerContext[TimerID].NextID = RefTimerID; + aTimerContext[RefTimerID].PreviousID = TimerID; + } + + return; + 80007f0: e014 b.n 800081c + aTimerContext[TimerID].NextID = RefTimerID; + 80007f2: 79fa ldrb r2, [r7, #7] + 80007f4: 490d ldr r1, [pc, #52] @ (800082c ) + 80007f6: 4613 mov r3, r2 + 80007f8: 005b lsls r3, r3, #1 + 80007fa: 4413 add r3, r2 + 80007fc: 00db lsls r3, r3, #3 + 80007fe: 440b add r3, r1 + 8000800: 3315 adds r3, #21 + 8000802: 79ba ldrb r2, [r7, #6] + 8000804: 701a strb r2, [r3, #0] + aTimerContext[RefTimerID].PreviousID = TimerID; + 8000806: 79ba ldrb r2, [r7, #6] + 8000808: 4908 ldr r1, [pc, #32] @ (800082c ) + 800080a: 4613 mov r3, r2 + 800080c: 005b lsls r3, r3, #1 + 800080e: 4413 add r3, r2 + 8000810: 00db lsls r3, r3, #3 + 8000812: 440b add r3, r1 + 8000814: 3314 adds r3, #20 + 8000816: 79fa ldrb r2, [r7, #7] + 8000818: 701a strb r2, [r3, #0] + return; + 800081a: bf00 nop +} + 800081c: 3714 adds r7, #20 + 800081e: 46bd mov sp, r7 + 8000820: f85d 7b04 ldr.w r7, [sp], #4 + 8000824: 4770 bx lr + 8000826: bf00 nop + 8000828: 2000012c .word 0x2000012c + 800082c: 2000009c .word 0x2000009c + +08000830 : + * @brief Insert a Timer in the list + * @param TimerID: The ID of the Timer + * @retval None + */ +static uint16_t linkTimer(uint8_t TimerID) +{ + 8000830: b580 push {r7, lr} + 8000832: b084 sub sp, #16 + 8000834: af00 add r7, sp, #0 + 8000836: 4603 mov r3, r0 + 8000838: 71fb strb r3, [r7, #7] + uint32_t time_left; + uint16_t time_elapsed; + uint8_t timer_id_lookup; + uint8_t next_id; + + if(CurrentRunningTimerID == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + 800083a: 4b4e ldr r3, [pc, #312] @ (8000974 ) + 800083c: 781b ldrb r3, [r3, #0] + 800083e: b2db uxtb r3, r3 + 8000840: 2b06 cmp r3, #6 + 8000842: d118 bne.n 8000876 + { + /** + * No timer in the list + */ + PreviousRunningTimerID = CurrentRunningTimerID; + 8000844: 4b4b ldr r3, [pc, #300] @ (8000974 ) + 8000846: 781b ldrb r3, [r3, #0] + 8000848: b2da uxtb r2, r3 + 800084a: 4b4b ldr r3, [pc, #300] @ (8000978 ) + 800084c: 701a strb r2, [r3, #0] + CurrentRunningTimerID = TimerID; + 800084e: 4a49 ldr r2, [pc, #292] @ (8000974 ) + 8000850: 79fb ldrb r3, [r7, #7] + 8000852: 7013 strb r3, [r2, #0] + aTimerContext[TimerID].NextID = CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; + 8000854: 79fa ldrb r2, [r7, #7] + 8000856: 4949 ldr r1, [pc, #292] @ (800097c ) + 8000858: 4613 mov r3, r2 + 800085a: 005b lsls r3, r3, #1 + 800085c: 4413 add r3, r2 + 800085e: 00db lsls r3, r3, #3 + 8000860: 440b add r3, r1 + 8000862: 3315 adds r3, #21 + 8000864: 2206 movs r2, #6 + 8000866: 701a strb r2, [r3, #0] + + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + 8000868: 4b45 ldr r3, [pc, #276] @ (8000980 ) + 800086a: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff + 800086e: 601a str r2, [r3, #0] + time_elapsed = 0; + 8000870: 2300 movs r3, #0 + 8000872: 81fb strh r3, [r7, #14] + 8000874: e078 b.n 8000968 + } + else + { + time_elapsed = ReturnTimeElapsed(); + 8000876: f000 f909 bl 8000a8c + 800087a: 4603 mov r3, r0 + 800087c: 81fb strh r3, [r7, #14] + + /** + * update count of the timer to be linked + */ + aTimerContext[TimerID].CountLeft += time_elapsed; + 800087e: 79fa ldrb r2, [r7, #7] + 8000880: 493e ldr r1, [pc, #248] @ (800097c ) + 8000882: 4613 mov r3, r2 + 8000884: 005b lsls r3, r3, #1 + 8000886: 4413 add r3, r2 + 8000888: 00db lsls r3, r3, #3 + 800088a: 440b add r3, r1 + 800088c: 3308 adds r3, #8 + 800088e: 6819 ldr r1, [r3, #0] + 8000890: 89fb ldrh r3, [r7, #14] + 8000892: 79fa ldrb r2, [r7, #7] + 8000894: 4419 add r1, r3 + 8000896: 4839 ldr r0, [pc, #228] @ (800097c ) + 8000898: 4613 mov r3, r2 + 800089a: 005b lsls r3, r3, #1 + 800089c: 4413 add r3, r2 + 800089e: 00db lsls r3, r3, #3 + 80008a0: 4403 add r3, r0 + 80008a2: 3308 adds r3, #8 + 80008a4: 6019 str r1, [r3, #0] + time_left = aTimerContext[TimerID].CountLeft; + 80008a6: 79fa ldrb r2, [r7, #7] + 80008a8: 4934 ldr r1, [pc, #208] @ (800097c ) + 80008aa: 4613 mov r3, r2 + 80008ac: 005b lsls r3, r3, #1 + 80008ae: 4413 add r3, r2 + 80008b0: 00db lsls r3, r3, #3 + 80008b2: 440b add r3, r1 + 80008b4: 3308 adds r3, #8 + 80008b6: 681b ldr r3, [r3, #0] + 80008b8: 60bb str r3, [r7, #8] + + /** + * Search for index where the new timer shall be linked + */ + if(aTimerContext[CurrentRunningTimerID].CountLeft <= time_left) + 80008ba: 4b2e ldr r3, [pc, #184] @ (8000974 ) + 80008bc: 781b ldrb r3, [r3, #0] + 80008be: b2db uxtb r3, r3 + 80008c0: 4619 mov r1, r3 + 80008c2: 4a2e ldr r2, [pc, #184] @ (800097c ) + 80008c4: 460b mov r3, r1 + 80008c6: 005b lsls r3, r3, #1 + 80008c8: 440b add r3, r1 + 80008ca: 00db lsls r3, r3, #3 + 80008cc: 4413 add r3, r2 + 80008ce: 3308 adds r3, #8 + 80008d0: 681b ldr r3, [r3, #0] + 80008d2: 68ba ldr r2, [r7, #8] + 80008d4: 429a cmp r2, r3 + 80008d6: d337 bcc.n 8000948 + { + /** + * Search for the ID after the first one + */ + timer_id_lookup = CurrentRunningTimerID; + 80008d8: 4b26 ldr r3, [pc, #152] @ (8000974 ) + 80008da: 781b ldrb r3, [r3, #0] + 80008dc: 737b strb r3, [r7, #13] + next_id = aTimerContext[timer_id_lookup].NextID; + 80008de: 7b7a ldrb r2, [r7, #13] + 80008e0: 4926 ldr r1, [pc, #152] @ (800097c ) + 80008e2: 4613 mov r3, r2 + 80008e4: 005b lsls r3, r3, #1 + 80008e6: 4413 add r3, r2 + 80008e8: 00db lsls r3, r3, #3 + 80008ea: 440b add r3, r1 + 80008ec: 3315 adds r3, #21 + 80008ee: 781b ldrb r3, [r3, #0] + 80008f0: 733b strb r3, [r7, #12] + while((next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (aTimerContext[next_id].CountLeft <= time_left)) + 80008f2: e013 b.n 800091c + { + timer_id_lookup = aTimerContext[timer_id_lookup].NextID; + 80008f4: 7b7a ldrb r2, [r7, #13] + 80008f6: 4921 ldr r1, [pc, #132] @ (800097c ) + 80008f8: 4613 mov r3, r2 + 80008fa: 005b lsls r3, r3, #1 + 80008fc: 4413 add r3, r2 + 80008fe: 00db lsls r3, r3, #3 + 8000900: 440b add r3, r1 + 8000902: 3315 adds r3, #21 + 8000904: 781b ldrb r3, [r3, #0] + 8000906: 737b strb r3, [r7, #13] + next_id = aTimerContext[timer_id_lookup].NextID; + 8000908: 7b7a ldrb r2, [r7, #13] + 800090a: 491c ldr r1, [pc, #112] @ (800097c ) + 800090c: 4613 mov r3, r2 + 800090e: 005b lsls r3, r3, #1 + 8000910: 4413 add r3, r2 + 8000912: 00db lsls r3, r3, #3 + 8000914: 440b add r3, r1 + 8000916: 3315 adds r3, #21 + 8000918: 781b ldrb r3, [r3, #0] + 800091a: 733b strb r3, [r7, #12] + while((next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (aTimerContext[next_id].CountLeft <= time_left)) + 800091c: 7b3b ldrb r3, [r7, #12] + 800091e: 2b06 cmp r3, #6 + 8000920: d00b beq.n 800093a + 8000922: 7b3a ldrb r2, [r7, #12] + 8000924: 4915 ldr r1, [pc, #84] @ (800097c ) + 8000926: 4613 mov r3, r2 + 8000928: 005b lsls r3, r3, #1 + 800092a: 4413 add r3, r2 + 800092c: 00db lsls r3, r3, #3 + 800092e: 440b add r3, r1 + 8000930: 3308 adds r3, #8 + 8000932: 681b ldr r3, [r3, #0] + 8000934: 68ba ldr r2, [r7, #8] + 8000936: 429a cmp r2, r3 + 8000938: d2dc bcs.n 80008f4 + } + + /** + * Link after the ID + */ + LinkTimerAfter(TimerID, timer_id_lookup); + 800093a: 7b7a ldrb r2, [r7, #13] + 800093c: 79fb ldrb r3, [r7, #7] + 800093e: 4611 mov r1, r2 + 8000940: 4618 mov r0, r3 + 8000942: f7ff fecf bl 80006e4 + 8000946: e00f b.n 8000968 + else + { + /** + * Link before the first ID + */ + LinkTimerBefore(TimerID, CurrentRunningTimerID); + 8000948: 4b0a ldr r3, [pc, #40] @ (8000974 ) + 800094a: 781b ldrb r3, [r3, #0] + 800094c: b2da uxtb r2, r3 + 800094e: 79fb ldrb r3, [r7, #7] + 8000950: 4611 mov r1, r2 + 8000952: 4618 mov r0, r3 + 8000954: f7ff ff0c bl 8000770 + PreviousRunningTimerID = CurrentRunningTimerID; + 8000958: 4b06 ldr r3, [pc, #24] @ (8000974 ) + 800095a: 781b ldrb r3, [r3, #0] + 800095c: b2da uxtb r2, r3 + 800095e: 4b06 ldr r3, [pc, #24] @ (8000978 ) + 8000960: 701a strb r2, [r3, #0] + CurrentRunningTimerID = TimerID; + 8000962: 4a04 ldr r2, [pc, #16] @ (8000974 ) + 8000964: 79fb ldrb r3, [r7, #7] + 8000966: 7013 strb r3, [r2, #0] + } + } + + return time_elapsed; + 8000968: 89fb ldrh r3, [r7, #14] +} + 800096a: 4618 mov r0, r3 + 800096c: 3710 adds r7, #16 + 800096e: 46bd mov sp, r7 + 8000970: bd80 pop {r7, pc} + 8000972: bf00 nop + 8000974: 2000012c .word 0x2000012c + 8000978: 2000012d .word 0x2000012d + 800097c: 2000009c .word 0x2000009c + 8000980: 20000130 .word 0x20000130 + +08000984 : + * @param TimerID: The ID of the Timer + * @param RequestReadSSR: Request to read the SSR register or not + * @retval None + */ +static void UnlinkTimer(uint8_t TimerID, RequestReadSSR_t RequestReadSSR) +{ + 8000984: b480 push {r7} + 8000986: b085 sub sp, #20 + 8000988: af00 add r7, sp, #0 + 800098a: 4603 mov r3, r0 + 800098c: 460a mov r2, r1 + 800098e: 71fb strb r3, [r7, #7] + 8000990: 4613 mov r3, r2 + 8000992: 71bb strb r3, [r7, #6] + uint8_t previous_id; + uint8_t next_id; + + if(TimerID == CurrentRunningTimerID) + 8000994: 4b39 ldr r3, [pc, #228] @ (8000a7c ) + 8000996: 781b ldrb r3, [r3, #0] + 8000998: b2db uxtb r3, r3 + 800099a: 79fa ldrb r2, [r7, #7] + 800099c: 429a cmp r2, r3 + 800099e: d111 bne.n 80009c4 + { + PreviousRunningTimerID = CurrentRunningTimerID; + 80009a0: 4b36 ldr r3, [pc, #216] @ (8000a7c ) + 80009a2: 781b ldrb r3, [r3, #0] + 80009a4: b2da uxtb r2, r3 + 80009a6: 4b36 ldr r3, [pc, #216] @ (8000a80 ) + 80009a8: 701a strb r2, [r3, #0] + CurrentRunningTimerID = aTimerContext[TimerID].NextID; + 80009aa: 79fa ldrb r2, [r7, #7] + 80009ac: 4935 ldr r1, [pc, #212] @ (8000a84 ) + 80009ae: 4613 mov r3, r2 + 80009b0: 005b lsls r3, r3, #1 + 80009b2: 4413 add r3, r2 + 80009b4: 00db lsls r3, r3, #3 + 80009b6: 440b add r3, r1 + 80009b8: 3315 adds r3, #21 + 80009ba: 781b ldrb r3, [r3, #0] + 80009bc: b2da uxtb r2, r3 + 80009be: 4b2f ldr r3, [pc, #188] @ (8000a7c ) + 80009c0: 701a strb r2, [r3, #0] + 80009c2: e03e b.n 8000a42 + } + else + { + previous_id = aTimerContext[TimerID].PreviousID; + 80009c4: 79fa ldrb r2, [r7, #7] + 80009c6: 492f ldr r1, [pc, #188] @ (8000a84 ) + 80009c8: 4613 mov r3, r2 + 80009ca: 005b lsls r3, r3, #1 + 80009cc: 4413 add r3, r2 + 80009ce: 00db lsls r3, r3, #3 + 80009d0: 440b add r3, r1 + 80009d2: 3314 adds r3, #20 + 80009d4: 781b ldrb r3, [r3, #0] + 80009d6: 73fb strb r3, [r7, #15] + next_id = aTimerContext[TimerID].NextID; + 80009d8: 79fa ldrb r2, [r7, #7] + 80009da: 492a ldr r1, [pc, #168] @ (8000a84 ) + 80009dc: 4613 mov r3, r2 + 80009de: 005b lsls r3, r3, #1 + 80009e0: 4413 add r3, r2 + 80009e2: 00db lsls r3, r3, #3 + 80009e4: 440b add r3, r1 + 80009e6: 3315 adds r3, #21 + 80009e8: 781b ldrb r3, [r3, #0] + 80009ea: 73bb strb r3, [r7, #14] + + aTimerContext[previous_id].NextID = aTimerContext[TimerID].NextID; + 80009ec: 79f9 ldrb r1, [r7, #7] + 80009ee: 7bfa ldrb r2, [r7, #15] + 80009f0: 4824 ldr r0, [pc, #144] @ (8000a84 ) + 80009f2: 460b mov r3, r1 + 80009f4: 005b lsls r3, r3, #1 + 80009f6: 440b add r3, r1 + 80009f8: 00db lsls r3, r3, #3 + 80009fa: 4403 add r3, r0 + 80009fc: 3315 adds r3, #21 + 80009fe: 781b ldrb r3, [r3, #0] + 8000a00: b2d8 uxtb r0, r3 + 8000a02: 4920 ldr r1, [pc, #128] @ (8000a84 ) + 8000a04: 4613 mov r3, r2 + 8000a06: 005b lsls r3, r3, #1 + 8000a08: 4413 add r3, r2 + 8000a0a: 00db lsls r3, r3, #3 + 8000a0c: 440b add r3, r1 + 8000a0e: 3315 adds r3, #21 + 8000a10: 4602 mov r2, r0 + 8000a12: 701a strb r2, [r3, #0] + if(next_id != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + 8000a14: 7bbb ldrb r3, [r7, #14] + 8000a16: 2b06 cmp r3, #6 + 8000a18: d013 beq.n 8000a42 + { + aTimerContext[next_id].PreviousID = aTimerContext[TimerID].PreviousID; + 8000a1a: 79f9 ldrb r1, [r7, #7] + 8000a1c: 7bba ldrb r2, [r7, #14] + 8000a1e: 4819 ldr r0, [pc, #100] @ (8000a84 ) + 8000a20: 460b mov r3, r1 + 8000a22: 005b lsls r3, r3, #1 + 8000a24: 440b add r3, r1 + 8000a26: 00db lsls r3, r3, #3 + 8000a28: 4403 add r3, r0 + 8000a2a: 3314 adds r3, #20 + 8000a2c: 781b ldrb r3, [r3, #0] + 8000a2e: b2d8 uxtb r0, r3 + 8000a30: 4914 ldr r1, [pc, #80] @ (8000a84 ) + 8000a32: 4613 mov r3, r2 + 8000a34: 005b lsls r3, r3, #1 + 8000a36: 4413 add r3, r2 + 8000a38: 00db lsls r3, r3, #3 + 8000a3a: 440b add r3, r1 + 8000a3c: 3314 adds r3, #20 + 8000a3e: 4602 mov r2, r0 + 8000a40: 701a strb r2, [r3, #0] + } + + /** + * Timer is out of the list + */ + aTimerContext[TimerID].TimerIDStatus = TimerID_Created; + 8000a42: 79fa ldrb r2, [r7, #7] + 8000a44: 490f ldr r1, [pc, #60] @ (8000a84 ) + 8000a46: 4613 mov r3, r2 + 8000a48: 005b lsls r3, r3, #1 + 8000a4a: 4413 add r3, r2 + 8000a4c: 00db lsls r3, r3, #3 + 8000a4e: 440b add r3, r1 + 8000a50: 330c adds r3, #12 + 8000a52: 2201 movs r2, #1 + 8000a54: 701a strb r2, [r3, #0] + + if((CurrentRunningTimerID == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (RequestReadSSR == SSR_Read_Requested)) + 8000a56: 4b09 ldr r3, [pc, #36] @ (8000a7c ) + 8000a58: 781b ldrb r3, [r3, #0] + 8000a5a: b2db uxtb r3, r3 + 8000a5c: 2b06 cmp r3, #6 + 8000a5e: d107 bne.n 8000a70 + 8000a60: 79bb ldrb r3, [r7, #6] + 8000a62: 2b00 cmp r3, #0 + 8000a64: d104 bne.n 8000a70 + { + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + 8000a66: 4b08 ldr r3, [pc, #32] @ (8000a88 ) + 8000a68: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff + 8000a6c: 601a str r2, [r3, #0] + } + + return; + 8000a6e: bf00 nop + 8000a70: bf00 nop +} + 8000a72: 3714 adds r7, #20 + 8000a74: 46bd mov sp, r7 + 8000a76: f85d 7b04 ldr.w r7, [sp], #4 + 8000a7a: 4770 bx lr + 8000a7c: 2000012c .word 0x2000012c + 8000a80: 2000012d .word 0x2000012d + 8000a84: 2000009c .word 0x2000009c + 8000a88: 20000130 .word 0x20000130 + +08000a8c : + * since the time the timer has been started + * @param None + * @retval Time expired in Ticks + */ +static uint16_t ReturnTimeElapsed(void) +{ + 8000a8c: b580 push {r7, lr} + 8000a8e: b082 sub sp, #8 + 8000a90: af00 add r7, sp, #0 + uint32_t return_value; + uint32_t wrap_counter; + + if(SSRValueOnLastSetup != SSR_FORBIDDEN_VALUE) + 8000a92: 4b1a ldr r3, [pc, #104] @ (8000afc ) + 8000a94: 681b ldr r3, [r3, #0] + 8000a96: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff + 8000a9a: d026 beq.n 8000aea + { + return_value = ReadRtcSsrValue(); /**< Read SSR register first */ + 8000a9c: f7ff fe02 bl 80006a4 + 8000aa0: 6078 str r0, [r7, #4] + + if (SSRValueOnLastSetup >= return_value) + 8000aa2: 4b16 ldr r3, [pc, #88] @ (8000afc ) + 8000aa4: 681b ldr r3, [r3, #0] + 8000aa6: 687a ldr r2, [r7, #4] + 8000aa8: 429a cmp r2, r3 + 8000aaa: d805 bhi.n 8000ab8 + { + return_value = SSRValueOnLastSetup - return_value; + 8000aac: 4b13 ldr r3, [pc, #76] @ (8000afc ) + 8000aae: 681a ldr r2, [r3, #0] + 8000ab0: 687b ldr r3, [r7, #4] + 8000ab2: 1ad3 subs r3, r2, r3 + 8000ab4: 607b str r3, [r7, #4] + 8000ab6: e00a b.n 8000ace + } + else + { + wrap_counter = SynchPrescalerUserConfig - return_value; + 8000ab8: 4b11 ldr r3, [pc, #68] @ (8000b00 ) + 8000aba: 881b ldrh r3, [r3, #0] + 8000abc: 461a mov r2, r3 + 8000abe: 687b ldr r3, [r7, #4] + 8000ac0: 1ad3 subs r3, r2, r3 + 8000ac2: 603b str r3, [r7, #0] + return_value = SSRValueOnLastSetup + wrap_counter; + 8000ac4: 4b0d ldr r3, [pc, #52] @ (8000afc ) + 8000ac6: 681b ldr r3, [r3, #0] + 8000ac8: 683a ldr r2, [r7, #0] + 8000aca: 4413 add r3, r2 + 8000acc: 607b str r3, [r7, #4] + + /** + * At this stage, ReturnValue holds the number of ticks counted by SSR + * Need to translate in number of ticks counted by the Wakeuptimer + */ + return_value = return_value*AsynchPrescalerUserConfig; + 8000ace: 4b0d ldr r3, [pc, #52] @ (8000b04 ) + 8000ad0: 781b ldrb r3, [r3, #0] + 8000ad2: 461a mov r2, r3 + 8000ad4: 687b ldr r3, [r7, #4] + 8000ad6: fb02 f303 mul.w r3, r2, r3 + 8000ada: 607b str r3, [r7, #4] + return_value = return_value >> WakeupTimerDivider; + 8000adc: 4b0a ldr r3, [pc, #40] @ (8000b08 ) + 8000ade: 781b ldrb r3, [r3, #0] + 8000ae0: 461a mov r2, r3 + 8000ae2: 687b ldr r3, [r7, #4] + 8000ae4: 40d3 lsrs r3, r2 + 8000ae6: 607b str r3, [r7, #4] + 8000ae8: e001 b.n 8000aee + } + else + { + return_value = 0; + 8000aea: 2300 movs r3, #0 + 8000aec: 607b str r3, [r7, #4] + } + + return (uint16_t)return_value; + 8000aee: 687b ldr r3, [r7, #4] + 8000af0: b29b uxth r3, r3 +} + 8000af2: 4618 mov r0, r3 + 8000af4: 3708 adds r7, #8 + 8000af6: 46bd mov sp, r7 + 8000af8: bd80 pop {r7, pc} + 8000afa: bf00 nop + 8000afc: 20000130 .word 0x20000130 + 8000b00: 20000138 .word 0x20000138 + 8000b04: 20000136 .word 0x20000136 + 8000b08: 20000135 .word 0x20000135 + +08000b0c : + * It assumes all condition are met to be allowed to write the wakeup counter + * @param Value: Value to be written in the counter + * @retval None + */ +static void RestartWakeupCounter(uint16_t Value) +{ + 8000b0c: b580 push {r7, lr} + 8000b0e: b082 sub sp, #8 + 8000b10: af00 add r7, sp, #0 + 8000b12: 4603 mov r3, r0 + 8000b14: 80fb strh r3, [r7, #6] + * The wakeuptimer has been disabled in the calling function to reduce the time to poll the WUTWF + * FLAG when the new value will have to be written + * __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); + */ + + if(Value == 0) + 8000b16: 88fb ldrh r3, [r7, #6] + 8000b18: 2b00 cmp r3, #0 + 8000b1a: d108 bne.n 8000b2e + { + SSRValueOnLastSetup = ReadRtcSsrValue(); + 8000b1c: f7ff fdc2 bl 80006a4 + 8000b20: 4603 mov r3, r0 + 8000b22: 4a21 ldr r2, [pc, #132] @ (8000ba8 ) + 8000b24: 6013 str r3, [r2, #0] + + /** + * Simulate that the Timer expired + */ + HAL_NVIC_SetPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); + 8000b26: 2003 movs r0, #3 + 8000b28: f001 f8dd bl 8001ce6 + __HAL_RTC_WAKEUPTIMER_ENABLE(&hrtc); /**< Enable the Wakeup Timer */ + + HW_TS_RTC_CountUpdated_AppNot(); + } + + return ; + 8000b2c: e039 b.n 8000ba2 + if((Value > 1) ||(WakeupTimerDivider != 1)) + 8000b2e: 88fb ldrh r3, [r7, #6] + 8000b30: 2b01 cmp r3, #1 + 8000b32: d803 bhi.n 8000b3c + 8000b34: 4b1d ldr r3, [pc, #116] @ (8000bac ) + 8000b36: 781b ldrb r3, [r3, #0] + 8000b38: 2b01 cmp r3, #1 + 8000b3a: d002 beq.n 8000b42 + Value -= 1; + 8000b3c: 88fb ldrh r3, [r7, #6] + 8000b3e: 3b01 subs r3, #1 + 8000b40: 80fb strh r3, [r7, #6] + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == RESET); + 8000b42: bf00 nop + 8000b44: 4b1a ldr r3, [pc, #104] @ (8000bb0 ) + 8000b46: 681b ldr r3, [r3, #0] + 8000b48: 68db ldr r3, [r3, #12] + 8000b4a: f003 0304 and.w r3, r3, #4 + 8000b4e: 2b00 cmp r3, #0 + 8000b50: d0f8 beq.n 8000b44 + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + 8000b52: 4b17 ldr r3, [pc, #92] @ (8000bb0 ) + 8000b54: 681b ldr r3, [r3, #0] + 8000b56: 68db ldr r3, [r3, #12] + 8000b58: b2da uxtb r2, r3 + 8000b5a: 4b15 ldr r3, [pc, #84] @ (8000bb0 ) + 8000b5c: 681b ldr r3, [r3, #0] + 8000b5e: f462 6290 orn r2, r2, #1152 @ 0x480 + 8000b62: 60da str r2, [r3, #12] + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + 8000b64: 4b13 ldr r3, [pc, #76] @ (8000bb4 ) + 8000b66: f44f 2200 mov.w r2, #524288 @ 0x80000 + 8000b6a: 60da str r2, [r3, #12] + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + 8000b6c: 2003 movs r0, #3 + 8000b6e: f001 f8c8 bl 8001d02 + MODIFY_REG(RTC->WUTR, RTC_WUTR_WUT, Value); + 8000b72: 4b11 ldr r3, [pc, #68] @ (8000bb8 ) + 8000b74: 695b ldr r3, [r3, #20] + 8000b76: 0c1b lsrs r3, r3, #16 + 8000b78: 041b lsls r3, r3, #16 + 8000b7a: 88fa ldrh r2, [r7, #6] + 8000b7c: 490e ldr r1, [pc, #56] @ (8000bb8 ) + 8000b7e: 4313 orrs r3, r2 + 8000b80: 614b str r3, [r1, #20] + SSRValueOnLastSetup = ReadRtcSsrValue(); + 8000b82: f7ff fd8f bl 80006a4 + 8000b86: 4603 mov r3, r0 + 8000b88: 4a07 ldr r2, [pc, #28] @ (8000ba8 ) + 8000b8a: 6013 str r3, [r2, #0] + __HAL_RTC_WAKEUPTIMER_ENABLE(&hrtc); /**< Enable the Wakeup Timer */ + 8000b8c: 4b08 ldr r3, [pc, #32] @ (8000bb0 ) + 8000b8e: 681b ldr r3, [r3, #0] + 8000b90: 689a ldr r2, [r3, #8] + 8000b92: 4b07 ldr r3, [pc, #28] @ (8000bb0 ) + 8000b94: 681b ldr r3, [r3, #0] + 8000b96: f442 6280 orr.w r2, r2, #1024 @ 0x400 + 8000b9a: 609a str r2, [r3, #8] + HW_TS_RTC_CountUpdated_AppNot(); + 8000b9c: f3af 8000 nop.w + return ; + 8000ba0: bf00 nop +} + 8000ba2: 3708 adds r7, #8 + 8000ba4: 46bd mov sp, r7 + 8000ba6: bd80 pop {r7, pc} + 8000ba8: 20000130 .word 0x20000130 + 8000bac: 20000135 .word 0x20000135 + 8000bb0: 200001cc .word 0x200001cc + 8000bb4: 58000800 .word 0x58000800 + 8000bb8: 40002800 .word 0x40002800 + +08000bbc : + * 2) Setup the wakeuptimer + * @param None + * @retval None + */ +static void RescheduleTimerList(void) +{ + 8000bbc: b580 push {r7, lr} + 8000bbe: b084 sub sp, #16 + 8000bc0: af00 add r7, sp, #0 + + /** + * The wakeuptimer is disabled now to reduce the time to poll the WUTWF + * FLAG when the new value will have to be written + */ + if((READ_BIT(RTC->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) == SET) + 8000bc2: 4b45 ldr r3, [pc, #276] @ (8000cd8 ) + 8000bc4: 689b ldr r3, [r3, #8] + 8000bc6: f403 6380 and.w r3, r3, #1024 @ 0x400 + 8000bca: f5b3 6f80 cmp.w r3, #1024 @ 0x400 + 8000bce: d107 bne.n 8000be0 + { + /** + * Wait for the flag to be back to 0 when the wakeup timer is enabled + */ + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == SET); + 8000bd0: bf00 nop + 8000bd2: 4b42 ldr r3, [pc, #264] @ (8000cdc ) + 8000bd4: 681b ldr r3, [r3, #0] + 8000bd6: 68db ldr r3, [r3, #12] + 8000bd8: f003 0304 and.w r3, r3, #4 + 8000bdc: 2b00 cmp r3, #0 + 8000bde: d1f8 bne.n 8000bd2 + } + __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); /**< Disable the Wakeup Timer */ + 8000be0: 4b3e ldr r3, [pc, #248] @ (8000cdc ) + 8000be2: 681b ldr r3, [r3, #0] + 8000be4: 689a ldr r2, [r3, #8] + 8000be6: 4b3d ldr r3, [pc, #244] @ (8000cdc ) + 8000be8: 681b ldr r3, [r3, #0] + 8000bea: f422 6280 bic.w r2, r2, #1024 @ 0x400 + 8000bee: 609a str r2, [r3, #8] + + localTimerID = CurrentRunningTimerID; + 8000bf0: 4b3b ldr r3, [pc, #236] @ (8000ce0 ) + 8000bf2: 781b ldrb r3, [r3, #0] + 8000bf4: 73fb strb r3, [r7, #15] + + /** + * Calculate what will be the value to write in the wakeuptimer + */ + timecountleft = aTimerContext[localTimerID].CountLeft; + 8000bf6: 7bfa ldrb r2, [r7, #15] + 8000bf8: 493a ldr r1, [pc, #232] @ (8000ce4 ) + 8000bfa: 4613 mov r3, r2 + 8000bfc: 005b lsls r3, r3, #1 + 8000bfe: 4413 add r3, r2 + 8000c00: 00db lsls r3, r3, #3 + 8000c02: 440b add r3, r1 + 8000c04: 3308 adds r3, #8 + 8000c06: 681b ldr r3, [r3, #0] + 8000c08: 60bb str r3, [r7, #8] + + /** + * Read how much has been counted + */ + time_elapsed = ReturnTimeElapsed(); + 8000c0a: f7ff ff3f bl 8000a8c + 8000c0e: 4603 mov r3, r0 + 8000c10: 80fb strh r3, [r7, #6] + + if(timecountleft < time_elapsed ) + 8000c12: 88fb ldrh r3, [r7, #6] + 8000c14: 68ba ldr r2, [r7, #8] + 8000c16: 429a cmp r2, r3 + 8000c18: d205 bcs.n 8000c26 + { + /** + * There is no tick left to count + */ + wakeup_timer_value = 0; + 8000c1a: 2300 movs r3, #0 + 8000c1c: 81bb strh r3, [r7, #12] + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + 8000c1e: 4b32 ldr r3, [pc, #200] @ (8000ce8 ) + 8000c20: 2201 movs r2, #1 + 8000c22: 701a strb r2, [r3, #0] + 8000c24: e04d b.n 8000cc2 + } + else + { + if(timecountleft > (time_elapsed + MaxWakeupTimerSetup)) + 8000c26: 88fb ldrh r3, [r7, #6] + 8000c28: 4a30 ldr r2, [pc, #192] @ (8000cec ) + 8000c2a: 8812 ldrh r2, [r2, #0] + 8000c2c: b292 uxth r2, r2 + 8000c2e: 4413 add r3, r2 + 8000c30: 461a mov r2, r3 + 8000c32: 68bb ldr r3, [r7, #8] + 8000c34: 4293 cmp r3, r2 + 8000c36: d906 bls.n 8000c46 + { + /** + * The number of tick left is greater than the Wakeuptimer maximum value + */ + wakeup_timer_value = MaxWakeupTimerSetup; + 8000c38: 4b2c ldr r3, [pc, #176] @ (8000cec ) + 8000c3a: 881b ldrh r3, [r3, #0] + 8000c3c: 81bb strh r3, [r7, #12] + + WakeupTimerLimitation = WakeupTimerValue_Overpassed; + 8000c3e: 4b2a ldr r3, [pc, #168] @ (8000ce8 ) + 8000c40: 2200 movs r2, #0 + 8000c42: 701a strb r2, [r3, #0] + 8000c44: e03d b.n 8000cc2 + } + else + { + wakeup_timer_value = timecountleft - time_elapsed; + 8000c46: 68bb ldr r3, [r7, #8] + 8000c48: b29a uxth r2, r3 + 8000c4a: 88fb ldrh r3, [r7, #6] + 8000c4c: 1ad3 subs r3, r2, r3 + 8000c4e: 81bb strh r3, [r7, #12] + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + 8000c50: 4b25 ldr r3, [pc, #148] @ (8000ce8 ) + 8000c52: 2201 movs r2, #1 + 8000c54: 701a strb r2, [r3, #0] + } + + /** + * update ticks left to be counted for each timer + */ + while(localTimerID != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + 8000c56: e034 b.n 8000cc2 + { + if (aTimerContext[localTimerID].CountLeft < time_elapsed) + 8000c58: 7bfa ldrb r2, [r7, #15] + 8000c5a: 4922 ldr r1, [pc, #136] @ (8000ce4 ) + 8000c5c: 4613 mov r3, r2 + 8000c5e: 005b lsls r3, r3, #1 + 8000c60: 4413 add r3, r2 + 8000c62: 00db lsls r3, r3, #3 + 8000c64: 440b add r3, r1 + 8000c66: 3308 adds r3, #8 + 8000c68: 681a ldr r2, [r3, #0] + 8000c6a: 88fb ldrh r3, [r7, #6] + 8000c6c: 429a cmp r2, r3 + 8000c6e: d20a bcs.n 8000c86 + { + aTimerContext[localTimerID].CountLeft = 0; + 8000c70: 7bfa ldrb r2, [r7, #15] + 8000c72: 491c ldr r1, [pc, #112] @ (8000ce4 ) + 8000c74: 4613 mov r3, r2 + 8000c76: 005b lsls r3, r3, #1 + 8000c78: 4413 add r3, r2 + 8000c7a: 00db lsls r3, r3, #3 + 8000c7c: 440b add r3, r1 + 8000c7e: 3308 adds r3, #8 + 8000c80: 2200 movs r2, #0 + 8000c82: 601a str r2, [r3, #0] + 8000c84: e013 b.n 8000cae + } + else + { + aTimerContext[localTimerID].CountLeft -= time_elapsed; + 8000c86: 7bfa ldrb r2, [r7, #15] + 8000c88: 4916 ldr r1, [pc, #88] @ (8000ce4 ) + 8000c8a: 4613 mov r3, r2 + 8000c8c: 005b lsls r3, r3, #1 + 8000c8e: 4413 add r3, r2 + 8000c90: 00db lsls r3, r3, #3 + 8000c92: 440b add r3, r1 + 8000c94: 3308 adds r3, #8 + 8000c96: 6819 ldr r1, [r3, #0] + 8000c98: 88fb ldrh r3, [r7, #6] + 8000c9a: 7bfa ldrb r2, [r7, #15] + 8000c9c: 1ac9 subs r1, r1, r3 + 8000c9e: 4811 ldr r0, [pc, #68] @ (8000ce4 ) + 8000ca0: 4613 mov r3, r2 + 8000ca2: 005b lsls r3, r3, #1 + 8000ca4: 4413 add r3, r2 + 8000ca6: 00db lsls r3, r3, #3 + 8000ca8: 4403 add r3, r0 + 8000caa: 3308 adds r3, #8 + 8000cac: 6019 str r1, [r3, #0] + } + localTimerID = aTimerContext[localTimerID].NextID; + 8000cae: 7bfa ldrb r2, [r7, #15] + 8000cb0: 490c ldr r1, [pc, #48] @ (8000ce4 ) + 8000cb2: 4613 mov r3, r2 + 8000cb4: 005b lsls r3, r3, #1 + 8000cb6: 4413 add r3, r2 + 8000cb8: 00db lsls r3, r3, #3 + 8000cba: 440b add r3, r1 + 8000cbc: 3315 adds r3, #21 + 8000cbe: 781b ldrb r3, [r3, #0] + 8000cc0: 73fb strb r3, [r7, #15] + while(localTimerID != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + 8000cc2: 7bfb ldrb r3, [r7, #15] + 8000cc4: 2b06 cmp r3, #6 + 8000cc6: d1c7 bne.n 8000c58 + } + + /** + * Write next count + */ + RestartWakeupCounter(wakeup_timer_value); + 8000cc8: 89bb ldrh r3, [r7, #12] + 8000cca: 4618 mov r0, r3 + 8000ccc: f7ff ff1e bl 8000b0c + + return ; + 8000cd0: bf00 nop +} + 8000cd2: 3710 adds r7, #16 + 8000cd4: 46bd mov sp, r7 + 8000cd6: bd80 pop {r7, pc} + 8000cd8: 40002800 .word 0x40002800 + 8000cdc: 200001cc .word 0x200001cc + 8000ce0: 2000012c .word 0x2000012c + 8000ce4: 2000009c .word 0x2000009c + 8000ce8: 20000134 .word 0x20000134 + 8000cec: 2000013a .word 0x2000013a + +08000cf0 : + + return; +} + +void HW_TS_Init(HW_TS_InitMode_t TimerInitMode, RTC_HandleTypeDef *phrtc) +{ + 8000cf0: b580 push {r7, lr} + 8000cf2: b088 sub sp, #32 + 8000cf4: af00 add r7, sp, #0 + 8000cf6: 4603 mov r3, r0 + 8000cf8: 6039 str r1, [r7, #0] + 8000cfa: 71fb strb r3, [r7, #7] + uint8_t loop; + uint32_t localmaxwakeuptimersetup; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + 8000cfc: 4b5e ldr r3, [pc, #376] @ (8000e78 ) + 8000cfe: 681b ldr r3, [r3, #0] + 8000d00: 22ca movs r2, #202 @ 0xca + 8000d02: 625a str r2, [r3, #36] @ 0x24 + 8000d04: 4b5c ldr r3, [pc, #368] @ (8000e78 ) + 8000d06: 681b ldr r3, [r3, #0] + 8000d08: 2253 movs r2, #83 @ 0x53 + 8000d0a: 625a str r2, [r3, #36] @ 0x24 + + SET_BIT(RTC->CR, RTC_CR_BYPSHAD); + 8000d0c: 4b5b ldr r3, [pc, #364] @ (8000e7c ) + 8000d0e: 689b ldr r3, [r3, #8] + 8000d10: 4a5a ldr r2, [pc, #360] @ (8000e7c ) + 8000d12: f043 0320 orr.w r3, r3, #32 + 8000d16: 6093 str r3, [r2, #8] + + /** + * Readout the user config + */ + WakeupTimerDivider = (4 - ((uint32_t)(READ_BIT(RTC->CR, RTC_CR_WUCKSEL)))); + 8000d18: 4b58 ldr r3, [pc, #352] @ (8000e7c ) + 8000d1a: 689b ldr r3, [r3, #8] + 8000d1c: b2db uxtb r3, r3 + 8000d1e: f003 0307 and.w r3, r3, #7 + 8000d22: b2db uxtb r3, r3 + 8000d24: f1c3 0304 rsb r3, r3, #4 + 8000d28: b2da uxtb r2, r3 + 8000d2a: 4b55 ldr r3, [pc, #340] @ (8000e80 ) + 8000d2c: 701a strb r2, [r3, #0] + + AsynchPrescalerUserConfig = (uint8_t)(READ_BIT(RTC->PRER, RTC_PRER_PREDIV_A) >> (uint32_t)POSITION_VAL(RTC_PRER_PREDIV_A)) + 1; + 8000d2e: 4b53 ldr r3, [pc, #332] @ (8000e7c ) + 8000d30: 691b ldr r3, [r3, #16] + 8000d32: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 + 8000d36: f44f 02fe mov.w r2, #8323072 @ 0x7f0000 + 8000d3a: 613a str r2, [r7, #16] + uint32_t result; + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); + 8000d3c: 693a ldr r2, [r7, #16] + 8000d3e: fa92 f2a2 rbit r2, r2 + 8000d42: 60fa str r2, [r7, #12] + result |= value & 1U; + s--; + } + result <<= s; /* shift when v's highest bits are zero */ +#endif + return result; + 8000d44: 68fa ldr r2, [r7, #12] + 8000d46: 617a str r2, [r7, #20] + optimisations using the logic "value was passed to __builtin_clz, so it + is non-zero". + ARM GCC 7.3 and possibly earlier will optimise this test away, leaving a + single CLZ instruction. + */ + if (value == 0U) + 8000d48: 697a ldr r2, [r7, #20] + 8000d4a: 2a00 cmp r2, #0 + 8000d4c: d101 bne.n 8000d52 + { + return 32U; + 8000d4e: 2220 movs r2, #32 + 8000d50: e003 b.n 8000d5a + } + return __builtin_clz(value); + 8000d52: 697a ldr r2, [r7, #20] + 8000d54: fab2 f282 clz r2, r2 + 8000d58: b2d2 uxtb r2, r2 + 8000d5a: 40d3 lsrs r3, r2 + 8000d5c: b2db uxtb r3, r3 + 8000d5e: 3301 adds r3, #1 + 8000d60: b2da uxtb r2, r3 + 8000d62: 4b48 ldr r3, [pc, #288] @ (8000e84 ) + 8000d64: 701a strb r2, [r3, #0] + + SynchPrescalerUserConfig = (uint16_t)(READ_BIT(RTC->PRER, RTC_PRER_PREDIV_S)) + 1; + 8000d66: 4b45 ldr r3, [pc, #276] @ (8000e7c ) + 8000d68: 691b ldr r3, [r3, #16] + 8000d6a: b29b uxth r3, r3 + 8000d6c: f3c3 030e ubfx r3, r3, #0, #15 + 8000d70: b29b uxth r3, r3 + 8000d72: 3301 adds r3, #1 + 8000d74: b29a uxth r2, r3 + 8000d76: 4b44 ldr r3, [pc, #272] @ (8000e88 ) + 8000d78: 801a strh r2, [r3, #0] + + /** + * Margin is taken to avoid wrong calculation when the wrap around is there and some + * application interrupts may have delayed the reading + */ + localmaxwakeuptimersetup = ((((SynchPrescalerUserConfig - 1)*AsynchPrescalerUserConfig) - CFG_HW_TS_RTC_HANDLER_MAX_DELAY) >> WakeupTimerDivider); + 8000d7a: 4b43 ldr r3, [pc, #268] @ (8000e88 ) + 8000d7c: 881b ldrh r3, [r3, #0] + 8000d7e: 3b01 subs r3, #1 + 8000d80: 4a40 ldr r2, [pc, #256] @ (8000e84 ) + 8000d82: 7812 ldrb r2, [r2, #0] + 8000d84: fb02 f303 mul.w r3, r2, r3 + 8000d88: f5a3 73a0 sub.w r3, r3, #320 @ 0x140 + 8000d8c: 4a3c ldr r2, [pc, #240] @ (8000e80 ) + 8000d8e: 7812 ldrb r2, [r2, #0] + 8000d90: 40d3 lsrs r3, r2 + 8000d92: 61bb str r3, [r7, #24] + + if(localmaxwakeuptimersetup >= 0xFFFF) + 8000d94: 69bb ldr r3, [r7, #24] + 8000d96: f64f 72fe movw r2, #65534 @ 0xfffe + 8000d9a: 4293 cmp r3, r2 + 8000d9c: d904 bls.n 8000da8 + { + MaxWakeupTimerSetup = 0xFFFF; + 8000d9e: 4b3b ldr r3, [pc, #236] @ (8000e8c ) + 8000da0: f64f 72ff movw r2, #65535 @ 0xffff + 8000da4: 801a strh r2, [r3, #0] + 8000da6: e003 b.n 8000db0 + } + else + { + MaxWakeupTimerSetup = (uint16_t)localmaxwakeuptimersetup; + 8000da8: 69bb ldr r3, [r7, #24] + 8000daa: b29a uxth r2, r3 + 8000dac: 4b37 ldr r3, [pc, #220] @ (8000e8c ) + 8000dae: 801a strh r2, [r3, #0] + } + + /** + * Configure EXTI module + */ + LL_EXTI_EnableRisingTrig_0_31(RTC_EXTI_LINE_WAKEUPTIMER_EVENT); + 8000db0: f44f 2000 mov.w r0, #524288 @ 0x80000 + 8000db4: f7ff fc64 bl 8000680 + LL_EXTI_EnableIT_0_31(RTC_EXTI_LINE_WAKEUPTIMER_EVENT); + 8000db8: f44f 2000 mov.w r0, #524288 @ 0x80000 + 8000dbc: f7ff fc4c bl 8000658 + + if(TimerInitMode == hw_ts_InitMode_Full) + 8000dc0: 79fb ldrb r3, [r7, #7] + 8000dc2: 2b00 cmp r3, #0 + 8000dc4: d13d bne.n 8000e42 + { + WakeupTimerLimitation = WakeupTimerValue_LargeEnough; + 8000dc6: 4b32 ldr r3, [pc, #200] @ (8000e90 ) + 8000dc8: 2201 movs r2, #1 + 8000dca: 701a strb r2, [r3, #0] + SSRValueOnLastSetup = SSR_FORBIDDEN_VALUE; + 8000dcc: 4b31 ldr r3, [pc, #196] @ (8000e94 ) + 8000dce: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff + 8000dd2: 601a str r2, [r3, #0] + + /** + * Initialize the timer server + */ + for(loop = 0; loop < CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; loop++) + 8000dd4: 2300 movs r3, #0 + 8000dd6: 77fb strb r3, [r7, #31] + 8000dd8: e00c b.n 8000df4 + { + aTimerContext[loop].TimerIDStatus = TimerID_Free; + 8000dda: 7ffa ldrb r2, [r7, #31] + 8000ddc: 492e ldr r1, [pc, #184] @ (8000e98 ) + 8000dde: 4613 mov r3, r2 + 8000de0: 005b lsls r3, r3, #1 + 8000de2: 4413 add r3, r2 + 8000de4: 00db lsls r3, r3, #3 + 8000de6: 440b add r3, r1 + 8000de8: 330c adds r3, #12 + 8000dea: 2200 movs r2, #0 + 8000dec: 701a strb r2, [r3, #0] + for(loop = 0; loop < CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; loop++) + 8000dee: 7ffb ldrb r3, [r7, #31] + 8000df0: 3301 adds r3, #1 + 8000df2: 77fb strb r3, [r7, #31] + 8000df4: 7ffb ldrb r3, [r7, #31] + 8000df6: 2b05 cmp r3, #5 + 8000df8: d9ef bls.n 8000dda + } + + CurrentRunningTimerID = CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER; /**< Set ID to non valid value */ + 8000dfa: 4b28 ldr r3, [pc, #160] @ (8000e9c ) + 8000dfc: 2206 movs r2, #6 + 8000dfe: 701a strb r2, [r3, #0] + + __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); /**< Disable the Wakeup Timer */ + 8000e00: 4b1d ldr r3, [pc, #116] @ (8000e78 ) + 8000e02: 681b ldr r3, [r3, #0] + 8000e04: 689a ldr r2, [r3, #8] + 8000e06: 4b1c ldr r3, [pc, #112] @ (8000e78 ) + 8000e08: 681b ldr r3, [r3, #0] + 8000e0a: f422 6280 bic.w r2, r2, #1024 @ 0x400 + 8000e0e: 609a str r2, [r3, #8] + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + 8000e10: 4b19 ldr r3, [pc, #100] @ (8000e78 ) + 8000e12: 681b ldr r3, [r3, #0] + 8000e14: 68db ldr r3, [r3, #12] + 8000e16: b2da uxtb r2, r3 + 8000e18: 4b17 ldr r3, [pc, #92] @ (8000e78 ) + 8000e1a: 681b ldr r3, [r3, #0] + 8000e1c: f462 6290 orn r2, r2, #1152 @ 0x480 + 8000e20: 60da str r2, [r3, #12] + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + 8000e22: 4b1f ldr r3, [pc, #124] @ (8000ea0 ) + 8000e24: f44f 2200 mov.w r2, #524288 @ 0x80000 + 8000e28: 60da str r2, [r3, #12] + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + 8000e2a: 2003 movs r0, #3 + 8000e2c: f000 ff69 bl 8001d02 + __HAL_RTC_WAKEUPTIMER_ENABLE_IT(&hrtc, RTC_IT_WUT); /**< Enable interrupt in RTC module */ + 8000e30: 4b11 ldr r3, [pc, #68] @ (8000e78 ) + 8000e32: 681b ldr r3, [r3, #0] + 8000e34: 689a ldr r2, [r3, #8] + 8000e36: 4b10 ldr r3, [pc, #64] @ (8000e78 ) + 8000e38: 681b ldr r3, [r3, #0] + 8000e3a: f442 4280 orr.w r2, r2, #16384 @ 0x4000 + 8000e3e: 609a str r2, [r3, #8] + 8000e40: e009 b.n 8000e56 + } + else + { + if(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTF) != RESET) + 8000e42: 4b0d ldr r3, [pc, #52] @ (8000e78 ) + 8000e44: 681b ldr r3, [r3, #0] + 8000e46: 68db ldr r3, [r3, #12] + 8000e48: f403 6380 and.w r3, r3, #1024 @ 0x400 + 8000e4c: 2b00 cmp r3, #0 + 8000e4e: d002 beq.n 8000e56 + { + /** + * Simulate that the Timer expired + */ + HAL_NVIC_SetPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); + 8000e50: 2003 movs r0, #3 + 8000e52: f000 ff48 bl 8001ce6 + } + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE( &hrtc ); + 8000e56: 4b08 ldr r3, [pc, #32] @ (8000e78 ) + 8000e58: 681b ldr r3, [r3, #0] + 8000e5a: 22ff movs r2, #255 @ 0xff + 8000e5c: 625a str r2, [r3, #36] @ 0x24 + + HAL_NVIC_SetPriority(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID, CFG_HW_TS_NVIC_RTC_WAKEUP_IT_PREEMPTPRIO, CFG_HW_TS_NVIC_RTC_WAKEUP_IT_SUBPRIO); /**< Set NVIC priority */ + 8000e5e: 2200 movs r2, #0 + 8000e60: 2103 movs r1, #3 + 8000e62: 2003 movs r0, #3 + 8000e64: f000 fefd bl 8001c62 + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + 8000e68: 2003 movs r0, #3 + 8000e6a: f000 ff14 bl 8001c96 + + return; + 8000e6e: bf00 nop +} + 8000e70: 3720 adds r7, #32 + 8000e72: 46bd mov sp, r7 + 8000e74: bd80 pop {r7, pc} + 8000e76: bf00 nop + 8000e78: 200001cc .word 0x200001cc + 8000e7c: 40002800 .word 0x40002800 + 8000e80: 20000135 .word 0x20000135 + 8000e84: 20000136 .word 0x20000136 + 8000e88: 20000138 .word 0x20000138 + 8000e8c: 2000013a .word 0x2000013a + 8000e90: 20000134 .word 0x20000134 + 8000e94: 20000130 .word 0x20000130 + 8000e98: 2000009c .word 0x2000009c + 8000e9c: 2000012c .word 0x2000012c + 8000ea0: 58000800 .word 0x58000800 + +08000ea4 : + +HW_TS_ReturnStatus_t HW_TS_Create(uint32_t TimerProcessID, uint8_t *pTimerId, HW_TS_Mode_t TimerMode, HW_TS_pTimerCb_t pftimeout_handler) +{ + 8000ea4: b480 push {r7} + 8000ea6: b08b sub sp, #44 @ 0x2c + 8000ea8: af00 add r7, sp, #0 + 8000eaa: 60f8 str r0, [r7, #12] + 8000eac: 60b9 str r1, [r7, #8] + 8000eae: 603b str r3, [r7, #0] + 8000eb0: 4613 mov r3, r2 + 8000eb2: 71fb strb r3, [r7, #7] + HW_TS_ReturnStatus_t localreturnstatus; + uint8_t loop = 0; + 8000eb4: 2300 movs r3, #0 + 8000eb6: f887 3026 strb.w r3, [r7, #38] @ 0x26 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8000eba: f3ef 8310 mrs r3, PRIMASK + 8000ebe: 61fb str r3, [r7, #28] + return(result); + 8000ec0: 69fb ldr r3, [r7, #28] +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + 8000ec2: 623b str r3, [r7, #32] + __ASM volatile ("cpsid i" : : : "memory"); + 8000ec4: b672 cpsid i +} + 8000ec6: bf00 nop + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + while((loop < CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (aTimerContext[loop].TimerIDStatus != TimerID_Free)) + 8000ec8: e004 b.n 8000ed4 + { + loop++; + 8000eca: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 + 8000ece: 3301 adds r3, #1 + 8000ed0: f887 3026 strb.w r3, [r7, #38] @ 0x26 + while((loop < CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) && (aTimerContext[loop].TimerIDStatus != TimerID_Free)) + 8000ed4: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 + 8000ed8: 2b05 cmp r3, #5 + 8000eda: d80c bhi.n 8000ef6 + 8000edc: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 + 8000ee0: 492c ldr r1, [pc, #176] @ (8000f94 ) + 8000ee2: 4613 mov r3, r2 + 8000ee4: 005b lsls r3, r3, #1 + 8000ee6: 4413 add r3, r2 + 8000ee8: 00db lsls r3, r3, #3 + 8000eea: 440b add r3, r1 + 8000eec: 330c adds r3, #12 + 8000eee: 781b ldrb r3, [r3, #0] + 8000ef0: b2db uxtb r3, r3 + 8000ef2: 2b00 cmp r3, #0 + 8000ef4: d1e9 bne.n 8000eca + } + + if(loop != CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + 8000ef6: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 + 8000efa: 2b06 cmp r3, #6 + 8000efc: d038 beq.n 8000f70 + { + aTimerContext[loop].TimerIDStatus = TimerID_Created; + 8000efe: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 + 8000f02: 4924 ldr r1, [pc, #144] @ (8000f94 ) + 8000f04: 4613 mov r3, r2 + 8000f06: 005b lsls r3, r3, #1 + 8000f08: 4413 add r3, r2 + 8000f0a: 00db lsls r3, r3, #3 + 8000f0c: 440b add r3, r1 + 8000f0e: 330c adds r3, #12 + 8000f10: 2201 movs r2, #1 + 8000f12: 701a strb r2, [r3, #0] + 8000f14: 6a3b ldr r3, [r7, #32] + 8000f16: 61bb str r3, [r7, #24] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8000f18: 69bb ldr r3, [r7, #24] + 8000f1a: f383 8810 msr PRIMASK, r3 +} + 8000f1e: bf00 nop + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + aTimerContext[loop].TimerProcessID = TimerProcessID; + 8000f20: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 + 8000f24: 491b ldr r1, [pc, #108] @ (8000f94 ) + 8000f26: 4613 mov r3, r2 + 8000f28: 005b lsls r3, r3, #1 + 8000f2a: 4413 add r3, r2 + 8000f2c: 00db lsls r3, r3, #3 + 8000f2e: 440b add r3, r1 + 8000f30: 3310 adds r3, #16 + 8000f32: 68fa ldr r2, [r7, #12] + 8000f34: 601a str r2, [r3, #0] + aTimerContext[loop].TimerMode = TimerMode; + 8000f36: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 + 8000f3a: 4916 ldr r1, [pc, #88] @ (8000f94 ) + 8000f3c: 4613 mov r3, r2 + 8000f3e: 005b lsls r3, r3, #1 + 8000f40: 4413 add r3, r2 + 8000f42: 00db lsls r3, r3, #3 + 8000f44: 440b add r3, r1 + 8000f46: 330d adds r3, #13 + 8000f48: 79fa ldrb r2, [r7, #7] + 8000f4a: 701a strb r2, [r3, #0] + aTimerContext[loop].pTimerCallBack = pftimeout_handler; + 8000f4c: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 + 8000f50: 4910 ldr r1, [pc, #64] @ (8000f94 ) + 8000f52: 4613 mov r3, r2 + 8000f54: 005b lsls r3, r3, #1 + 8000f56: 4413 add r3, r2 + 8000f58: 00db lsls r3, r3, #3 + 8000f5a: 440b add r3, r1 + 8000f5c: 683a ldr r2, [r7, #0] + 8000f5e: 601a str r2, [r3, #0] + *pTimerId = loop; + 8000f60: 68bb ldr r3, [r7, #8] + 8000f62: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 + 8000f66: 701a strb r2, [r3, #0] + + localreturnstatus = hw_ts_Successful; + 8000f68: 2300 movs r3, #0 + 8000f6a: f887 3027 strb.w r3, [r7, #39] @ 0x27 + 8000f6e: e008 b.n 8000f82 + 8000f70: 6a3b ldr r3, [r7, #32] + 8000f72: 617b str r3, [r7, #20] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8000f74: 697b ldr r3, [r7, #20] + 8000f76: f383 8810 msr PRIMASK, r3 +} + 8000f7a: bf00 nop + { +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + localreturnstatus = hw_ts_Failed; + 8000f7c: 2301 movs r3, #1 + 8000f7e: f887 3027 strb.w r3, [r7, #39] @ 0x27 + } + + return(localreturnstatus); + 8000f82: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 +} + 8000f86: 4618 mov r0, r3 + 8000f88: 372c adds r7, #44 @ 0x2c + 8000f8a: 46bd mov sp, r7 + 8000f8c: f85d 7b04 ldr.w r7, [sp], #4 + 8000f90: 4770 bx lr + 8000f92: bf00 nop + 8000f94: 2000009c .word 0x2000009c + +08000f98 : + + return; +} + +void HW_TS_Stop(uint8_t timer_id) +{ + 8000f98: b580 push {r7, lr} + 8000f9a: b086 sub sp, #24 + 8000f9c: af00 add r7, sp, #0 + 8000f9e: 4603 mov r3, r0 + 8000fa0: 71fb strb r3, [r7, #7] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8000fa2: f3ef 8310 mrs r3, PRIMASK + 8000fa6: 60fb str r3, [r7, #12] + return(result); + 8000fa8: 68fb ldr r3, [r7, #12] +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + 8000faa: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 8000fac: b672 cpsid i +} + 8000fae: bf00 nop + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + HAL_NVIC_DisableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Disable NVIC */ + 8000fb0: 2003 movs r0, #3 + 8000fb2: f000 fe7e bl 8001cb2 + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + 8000fb6: 4b34 ldr r3, [pc, #208] @ (8001088 ) + 8000fb8: 681b ldr r3, [r3, #0] + 8000fba: 22ca movs r2, #202 @ 0xca + 8000fbc: 625a str r2, [r3, #36] @ 0x24 + 8000fbe: 4b32 ldr r3, [pc, #200] @ (8001088 ) + 8000fc0: 681b ldr r3, [r3, #0] + 8000fc2: 2253 movs r2, #83 @ 0x53 + 8000fc4: 625a str r2, [r3, #36] @ 0x24 + + if(aTimerContext[timer_id].TimerIDStatus == TimerID_Running) + 8000fc6: 79fa ldrb r2, [r7, #7] + 8000fc8: 4930 ldr r1, [pc, #192] @ (800108c ) + 8000fca: 4613 mov r3, r2 + 8000fcc: 005b lsls r3, r3, #1 + 8000fce: 4413 add r3, r2 + 8000fd0: 00db lsls r3, r3, #3 + 8000fd2: 440b add r3, r1 + 8000fd4: 330c adds r3, #12 + 8000fd6: 781b ldrb r3, [r3, #0] + 8000fd8: b2db uxtb r3, r3 + 8000fda: 2b02 cmp r3, #2 + 8000fdc: d142 bne.n 8001064 + { + UnlinkTimer(timer_id, SSR_Read_Requested); + 8000fde: 79fb ldrb r3, [r7, #7] + 8000fe0: 2100 movs r1, #0 + 8000fe2: 4618 mov r0, r3 + 8000fe4: f7ff fcce bl 8000984 + localcurrentrunningtimerid = CurrentRunningTimerID; + 8000fe8: 4b29 ldr r3, [pc, #164] @ (8001090 ) + 8000fea: 781b ldrb r3, [r3, #0] + 8000fec: 74fb strb r3, [r7, #19] + + if(localcurrentrunningtimerid == CFG_HW_TS_MAX_NBR_CONCURRENT_TIMER) + 8000fee: 7cfb ldrb r3, [r7, #19] + 8000ff0: 2b06 cmp r3, #6 + 8000ff2: d12f bne.n 8001054 + */ + + /** + * Disable the timer + */ + if((READ_BIT(RTC->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) == SET) + 8000ff4: 4b27 ldr r3, [pc, #156] @ (8001094 ) + 8000ff6: 689b ldr r3, [r3, #8] + 8000ff8: f403 6380 and.w r3, r3, #1024 @ 0x400 + 8000ffc: f5b3 6f80 cmp.w r3, #1024 @ 0x400 + 8001000: d107 bne.n 8001012 + { + /** + * Wait for the flag to be back to 0 when the wakeup timer is enabled + */ + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == SET); + 8001002: bf00 nop + 8001004: 4b20 ldr r3, [pc, #128] @ (8001088 ) + 8001006: 681b ldr r3, [r3, #0] + 8001008: 68db ldr r3, [r3, #12] + 800100a: f003 0304 and.w r3, r3, #4 + 800100e: 2b00 cmp r3, #0 + 8001010: d1f8 bne.n 8001004 + } + __HAL_RTC_WAKEUPTIMER_DISABLE(&hrtc); /**< Disable the Wakeup Timer */ + 8001012: 4b1d ldr r3, [pc, #116] @ (8001088 ) + 8001014: 681b ldr r3, [r3, #0] + 8001016: 689a ldr r2, [r3, #8] + 8001018: 4b1b ldr r3, [pc, #108] @ (8001088 ) + 800101a: 681b ldr r3, [r3, #0] + 800101c: f422 6280 bic.w r2, r2, #1024 @ 0x400 + 8001020: 609a str r2, [r3, #8] + + while(__HAL_RTC_WAKEUPTIMER_GET_FLAG(&hrtc, RTC_FLAG_WUTWF) == RESET); + 8001022: bf00 nop + 8001024: 4b18 ldr r3, [pc, #96] @ (8001088 ) + 8001026: 681b ldr r3, [r3, #0] + 8001028: 68db ldr r3, [r3, #12] + 800102a: f003 0304 and.w r3, r3, #4 + 800102e: 2b00 cmp r3, #0 + 8001030: d0f8 beq.n 8001024 + * It takes 2 RTCCLK between the time the WUTE bit is disabled and the + * time the timer is disabled. The WUTWF bit somehow guarantee the system is stable + * Otherwise, when the timer is periodic with 1 Tick, it may generate an extra interrupt in between + * due to the autoreload feature + */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF); /**< Clear flag in RTC module */ + 8001032: 4b15 ldr r3, [pc, #84] @ (8001088 ) + 8001034: 681b ldr r3, [r3, #0] + 8001036: 68db ldr r3, [r3, #12] + 8001038: b2da uxtb r2, r3 + 800103a: 4b13 ldr r3, [pc, #76] @ (8001088 ) + 800103c: 681b ldr r3, [r3, #0] + 800103e: f462 6290 orn r2, r2, #1152 @ 0x480 + 8001042: 60da str r2, [r3, #12] + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); /**< Clear flag in EXTI module */ + 8001044: 4b14 ldr r3, [pc, #80] @ (8001098 ) + 8001046: f44f 2200 mov.w r2, #524288 @ 0x80000 + 800104a: 60da str r2, [r3, #12] + HAL_NVIC_ClearPendingIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Clear pending bit in NVIC */ + 800104c: 2003 movs r0, #3 + 800104e: f000 fe58 bl 8001d02 + 8001052: e007 b.n 8001064 + } + else if(PreviousRunningTimerID != localcurrentrunningtimerid) + 8001054: 4b11 ldr r3, [pc, #68] @ (800109c ) + 8001056: 781b ldrb r3, [r3, #0] + 8001058: b2db uxtb r3, r3 + 800105a: 7cfa ldrb r2, [r7, #19] + 800105c: 429a cmp r2, r3 + 800105e: d001 beq.n 8001064 + { + RescheduleTimerList(); + 8001060: f7ff fdac bl 8000bbc + } + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE( &hrtc ); + 8001064: 4b08 ldr r3, [pc, #32] @ (8001088 ) + 8001066: 681b ldr r3, [r3, #0] + 8001068: 22ff movs r2, #255 @ 0xff + 800106a: 625a str r2, [r3, #36] @ 0x24 + + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + 800106c: 2003 movs r0, #3 + 800106e: f000 fe12 bl 8001c96 + 8001072: 697b ldr r3, [r7, #20] + 8001074: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8001076: 68bb ldr r3, [r7, #8] + 8001078: f383 8810 msr PRIMASK, r3 +} + 800107c: bf00 nop + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + return; + 800107e: bf00 nop +} + 8001080: 3718 adds r7, #24 + 8001082: 46bd mov sp, r7 + 8001084: bd80 pop {r7, pc} + 8001086: bf00 nop + 8001088: 200001cc .word 0x200001cc + 800108c: 2000009c .word 0x2000009c + 8001090: 2000012c .word 0x2000012c + 8001094: 40002800 .word 0x40002800 + 8001098: 58000800 .word 0x58000800 + 800109c: 2000012d .word 0x2000012d + +080010a0 : + +void HW_TS_Start(uint8_t timer_id, uint32_t timeout_ticks) +{ + 80010a0: b580 push {r7, lr} + 80010a2: b086 sub sp, #24 + 80010a4: af00 add r7, sp, #0 + 80010a6: 4603 mov r3, r0 + 80010a8: 6039 str r1, [r7, #0] + 80010aa: 71fb strb r3, [r7, #7] + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + uint32_t primask_bit; +#endif + + if(aTimerContext[timer_id].TimerIDStatus == TimerID_Running) + 80010ac: 79fa ldrb r2, [r7, #7] + 80010ae: 493b ldr r1, [pc, #236] @ (800119c ) + 80010b0: 4613 mov r3, r2 + 80010b2: 005b lsls r3, r3, #1 + 80010b4: 4413 add r3, r2 + 80010b6: 00db lsls r3, r3, #3 + 80010b8: 440b add r3, r1 + 80010ba: 330c adds r3, #12 + 80010bc: 781b ldrb r3, [r3, #0] + 80010be: b2db uxtb r3, r3 + 80010c0: 2b02 cmp r3, #2 + 80010c2: d103 bne.n 80010cc + { + HW_TS_Stop( timer_id ); + 80010c4: 79fb ldrb r3, [r7, #7] + 80010c6: 4618 mov r0, r3 + 80010c8: f7ff ff66 bl 8000f98 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80010cc: f3ef 8310 mrs r3, PRIMASK + 80010d0: 60fb str r3, [r7, #12] + return(result); + 80010d2: 68fb ldr r3, [r7, #12] + } + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + 80010d4: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 80010d6: b672 cpsid i +} + 80010d8: bf00 nop + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ +#endif + + HAL_NVIC_DisableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Disable NVIC */ + 80010da: 2003 movs r0, #3 + 80010dc: f000 fde9 bl 8001cb2 + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE( &hrtc ); + 80010e0: 4b2f ldr r3, [pc, #188] @ (80011a0 ) + 80010e2: 681b ldr r3, [r3, #0] + 80010e4: 22ca movs r2, #202 @ 0xca + 80010e6: 625a str r2, [r3, #36] @ 0x24 + 80010e8: 4b2d ldr r3, [pc, #180] @ (80011a0 ) + 80010ea: 681b ldr r3, [r3, #0] + 80010ec: 2253 movs r2, #83 @ 0x53 + 80010ee: 625a str r2, [r3, #36] @ 0x24 + + aTimerContext[timer_id].TimerIDStatus = TimerID_Running; + 80010f0: 79fa ldrb r2, [r7, #7] + 80010f2: 492a ldr r1, [pc, #168] @ (800119c ) + 80010f4: 4613 mov r3, r2 + 80010f6: 005b lsls r3, r3, #1 + 80010f8: 4413 add r3, r2 + 80010fa: 00db lsls r3, r3, #3 + 80010fc: 440b add r3, r1 + 80010fe: 330c adds r3, #12 + 8001100: 2202 movs r2, #2 + 8001102: 701a strb r2, [r3, #0] + + aTimerContext[timer_id].CountLeft = timeout_ticks; + 8001104: 79fa ldrb r2, [r7, #7] + 8001106: 4925 ldr r1, [pc, #148] @ (800119c ) + 8001108: 4613 mov r3, r2 + 800110a: 005b lsls r3, r3, #1 + 800110c: 4413 add r3, r2 + 800110e: 00db lsls r3, r3, #3 + 8001110: 440b add r3, r1 + 8001112: 3308 adds r3, #8 + 8001114: 683a ldr r2, [r7, #0] + 8001116: 601a str r2, [r3, #0] + aTimerContext[timer_id].CounterInit = timeout_ticks; + 8001118: 79fa ldrb r2, [r7, #7] + 800111a: 4920 ldr r1, [pc, #128] @ (800119c ) + 800111c: 4613 mov r3, r2 + 800111e: 005b lsls r3, r3, #1 + 8001120: 4413 add r3, r2 + 8001122: 00db lsls r3, r3, #3 + 8001124: 440b add r3, r1 + 8001126: 3304 adds r3, #4 + 8001128: 683a ldr r2, [r7, #0] + 800112a: 601a str r2, [r3, #0] + + time_elapsed = linkTimer(timer_id); + 800112c: 79fb ldrb r3, [r7, #7] + 800112e: 4618 mov r0, r3 + 8001130: f7ff fb7e bl 8000830 + 8001134: 4603 mov r3, r0 + 8001136: 827b strh r3, [r7, #18] + + localcurrentrunningtimerid = CurrentRunningTimerID; + 8001138: 4b1a ldr r3, [pc, #104] @ (80011a4 ) + 800113a: 781b ldrb r3, [r3, #0] + 800113c: 747b strb r3, [r7, #17] + + if(PreviousRunningTimerID != localcurrentrunningtimerid) + 800113e: 4b1a ldr r3, [pc, #104] @ (80011a8 ) + 8001140: 781b ldrb r3, [r3, #0] + 8001142: b2db uxtb r3, r3 + 8001144: 7c7a ldrb r2, [r7, #17] + 8001146: 429a cmp r2, r3 + 8001148: d002 beq.n 8001150 + { + RescheduleTimerList(); + 800114a: f7ff fd37 bl 8000bbc + 800114e: e013 b.n 8001178 + } + else + { + aTimerContext[timer_id].CountLeft -= time_elapsed; + 8001150: 79fa ldrb r2, [r7, #7] + 8001152: 4912 ldr r1, [pc, #72] @ (800119c ) + 8001154: 4613 mov r3, r2 + 8001156: 005b lsls r3, r3, #1 + 8001158: 4413 add r3, r2 + 800115a: 00db lsls r3, r3, #3 + 800115c: 440b add r3, r1 + 800115e: 3308 adds r3, #8 + 8001160: 6819 ldr r1, [r3, #0] + 8001162: 8a7b ldrh r3, [r7, #18] + 8001164: 79fa ldrb r2, [r7, #7] + 8001166: 1ac9 subs r1, r1, r3 + 8001168: 480c ldr r0, [pc, #48] @ (800119c ) + 800116a: 4613 mov r3, r2 + 800116c: 005b lsls r3, r3, #1 + 800116e: 4413 add r3, r2 + 8001170: 00db lsls r3, r3, #3 + 8001172: 4403 add r3, r0 + 8001174: 3308 adds r3, #8 + 8001176: 6019 str r1, [r3, #0] + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE( &hrtc ); + 8001178: 4b09 ldr r3, [pc, #36] @ (80011a0 ) + 800117a: 681b ldr r3, [r3, #0] + 800117c: 22ff movs r2, #255 @ 0xff + 800117e: 625a str r2, [r3, #36] @ 0x24 + + HAL_NVIC_EnableIRQ(CFG_HW_TS_RTC_WAKEUP_HANDLER_ID); /**< Enable NVIC */ + 8001180: 2003 movs r0, #3 + 8001182: f000 fd88 bl 8001c96 + 8001186: 697b ldr r3, [r7, #20] + 8001188: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 800118a: 68bb ldr r3, [r7, #8] + 800118c: f383 8810 msr PRIMASK, r3 +} + 8001190: bf00 nop + +#if (CFG_HW_TS_USE_PRIMASK_AS_CRITICAL_SECTION == 1) + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +#endif + + return; + 8001192: bf00 nop +} + 8001194: 3718 adds r7, #24 + 8001196: 46bd mov sp, r7 + 8001198: bd80 pop {r7, pc} + 800119a: bf00 nop + 800119c: 2000009c .word 0x2000009c + 80011a0: 200001cc .word 0x200001cc + 80011a4: 2000012c .word 0x2000012c + 80011a8: 2000012d .word 0x2000012d + +080011ac : +{ + 80011ac: b480 push {r7} + 80011ae: b083 sub sp, #12 + 80011b0: af00 add r7, sp, #0 + 80011b2: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, LSEDrive); + 80011b4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80011b8: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 80011bc: f023 0218 bic.w r2, r3, #24 + 80011c0: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80011c4: 687b ldr r3, [r7, #4] + 80011c6: 4313 orrs r3, r2 + 80011c8: f8c1 3090 str.w r3, [r1, #144] @ 0x90 +} + 80011cc: bf00 nop + 80011ce: 370c adds r7, #12 + 80011d0: 46bd mov sp, r7 + 80011d2: f85d 7b04 ldr.w r7, [sp], #4 + 80011d6: 4770 bx lr + +080011d8 : + * @arg @ref LL_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB2_GRP1_EnableClock(uint32_t Periphs) +{ + 80011d8: b480 push {r7} + 80011da: b085 sub sp, #20 + 80011dc: af00 add r7, sp, #0 + 80011de: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg; + SET_BIT(RCC->AHB2ENR, Periphs); + 80011e0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80011e4: 6cda ldr r2, [r3, #76] @ 0x4c + 80011e6: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80011ea: 687b ldr r3, [r7, #4] + 80011ec: 4313 orrs r3, r2 + 80011ee: 64cb str r3, [r1, #76] @ 0x4c + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->AHB2ENR, Periphs); + 80011f0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80011f4: 6cda ldr r2, [r3, #76] @ 0x4c + 80011f6: 687b ldr r3, [r7, #4] + 80011f8: 4013 ands r3, r2 + 80011fa: 60fb str r3, [r7, #12] + (void)tmpreg; + 80011fc: 68fb ldr r3, [r7, #12] +} + 80011fe: bf00 nop + 8001200: 3714 adds r7, #20 + 8001202: 46bd mov sp, r7 + 8001204: f85d 7b04 ldr.w r7, [sp], #4 + 8001208: 4770 bx lr + ... + +0800120c
: +/** + * @brief The application entry point. + * @retval int + */ +int main(void) +{ + 800120c: b580 push {r7, lr} + 800120e: af00 add r7, sp, #0 + /* USER CODE END 1 */ + + /* MCU Configuration--------------------------------------------------------*/ + + /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ + HAL_Init(); + 8001210: f000 fb5a bl 80018c8 + /* Config code for STM32_WPAN (HSE Tuning must be done before system clock configuration) */ + MX_APPE_Config(); + 8001214: f7ff f88e bl 8000334 + /* USER CODE BEGIN Init */ + + /* USER CODE END Init */ + + /* Configure the system clock */ + SystemClock_Config(); + 8001218: f000 f81e bl 8001258 + + /* Configure the peripherals common clocks */ + PeriphCommonClock_Config(); + 800121c: f000 f878 bl 8001310 + + /* IPCC initialisation */ + MX_IPCC_Init(); + 8001220: f000 f8d4 bl 80013cc + /* USER CODE BEGIN SysInit */ + + /* USER CODE END SysInit */ + + /* Initialize all configured peripherals */ + MX_GPIO_Init(); + 8001224: f000 f94e bl 80014c4 + MX_I2C1_Init(); + 8001228: f000 f892 bl 8001350 + MX_RTC_Init(); + 800122c: f000 f8ea bl 8001404 + MX_RF_Init(); + 8001230: f000 f8e0 bl 80013f4 + + + /* USER CODE END 2 */ + + /* Init code for STM32_WPAN */ + MX_APPE_Init(); + 8001234: f7ff f88c bl 8000350 + /* Infinite loop */ + /* USER CODE BEGIN WHILE */ + while (1) + { + /* USER CODE END WHILE */ + MX_APPE_Process(); + 8001238: f7ff f9dc bl 80005f4 + + /* USER CODE BEGIN 3 */ + HAL_Delay(5000); + 800123c: f241 3088 movw r0, #5000 @ 0x1388 + 8001240: f7ff f9b3 bl 80005aa + __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); + 8001244: 4b03 ldr r3, [pc, #12] @ (8001254 ) + 8001246: 221f movs r2, #31 + 8001248: 619a str r2, [r3, #24] + HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); + 800124a: 2001 movs r0, #1 + 800124c: f001 f8ea bl 8002424 + MX_APPE_Process(); + 8001250: bf00 nop + 8001252: e7f1 b.n 8001238 + 8001254: 58000400 .word 0x58000400 + +08001258 : +/** + * @brief System Clock Configuration + * @retval None + */ +void SystemClock_Config(void) +{ + 8001258: b580 push {r7, lr} + 800125a: b09a sub sp, #104 @ 0x68 + 800125c: af00 add r7, sp, #0 + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + 800125e: f107 0320 add.w r3, r7, #32 + 8001262: 2248 movs r2, #72 @ 0x48 + 8001264: 2100 movs r1, #0 + 8001266: 4618 mov r0, r3 + 8001268: f006 fc5d bl 8007b26 + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + 800126c: 1d3b adds r3, r7, #4 + 800126e: 2200 movs r2, #0 + 8001270: 601a str r2, [r3, #0] + 8001272: 605a str r2, [r3, #4] + 8001274: 609a str r2, [r3, #8] + 8001276: 60da str r2, [r3, #12] + 8001278: 611a str r2, [r3, #16] + 800127a: 615a str r2, [r3, #20] + 800127c: 619a str r2, [r3, #24] + + /** Configure LSE Drive Capability + */ + HAL_PWR_EnableBkUpAccess(); + 800127e: f001 f8b3 bl 80023e8 + __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_MEDIUMHIGH); + 8001282: 2010 movs r0, #16 + 8001284: f7ff ff92 bl 80011ac + + /** Configure the main internal regulator output voltage + */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); + 8001288: 4b20 ldr r3, [pc, #128] @ (800130c ) + 800128a: 681b ldr r3, [r3, #0] + 800128c: f423 63c0 bic.w r3, r3, #1536 @ 0x600 + 8001290: 4a1e ldr r2, [pc, #120] @ (800130c ) + 8001292: f443 7300 orr.w r3, r3, #512 @ 0x200 + 8001296: 6013 str r3, [r2, #0] + 8001298: 4b1c ldr r3, [pc, #112] @ (800130c ) + 800129a: 681b ldr r3, [r3, #0] + 800129c: f403 63c0 and.w r3, r3, #1536 @ 0x600 + 80012a0: 603b str r3, [r7, #0] + 80012a2: 683b ldr r3, [r7, #0] + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE + 80012a4: 2307 movs r3, #7 + 80012a6: 623b str r3, [r7, #32] + |RCC_OSCILLATORTYPE_LSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + 80012a8: f44f 3380 mov.w r3, #65536 @ 0x10000 + 80012ac: 627b str r3, [r7, #36] @ 0x24 + RCC_OscInitStruct.LSEState = RCC_LSE_ON; + 80012ae: 2301 movs r3, #1 + 80012b0: 62bb str r3, [r7, #40] @ 0x28 + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + 80012b2: f44f 7380 mov.w r3, #256 @ 0x100 + 80012b6: 62fb str r3, [r7, #44] @ 0x2c + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + 80012b8: 2340 movs r3, #64 @ 0x40 + 80012ba: 633b str r3, [r7, #48] @ 0x30 + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; + 80012bc: 2300 movs r3, #0 + 80012be: 64fb str r3, [r7, #76] @ 0x4c + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + 80012c0: f107 0320 add.w r3, r7, #32 + 80012c4: 4618 mov r0, r3 + 80012c6: f001 fc37 bl 8002b38 + 80012ca: 4603 mov r3, r0 + 80012cc: 2b00 cmp r3, #0 + 80012ce: d001 beq.n 80012d4 + { + Error_Handler(); + 80012d0: f000 f924 bl 800151c + } + + /** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK4|RCC_CLOCKTYPE_HCLK2 + 80012d4: 236f movs r3, #111 @ 0x6f + 80012d6: 607b str r3, [r7, #4] + |RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK + |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSE; + 80012d8: 2302 movs r3, #2 + 80012da: 60bb str r3, [r7, #8] + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV16; + 80012dc: 23b0 movs r3, #176 @ 0xb0 + 80012de: 60fb str r3, [r7, #12] + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; + 80012e0: 2300 movs r3, #0 + 80012e2: 613b str r3, [r7, #16] + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + 80012e4: 2300 movs r3, #0 + 80012e6: 617b str r3, [r7, #20] + RCC_ClkInitStruct.AHBCLK2Divider = RCC_SYSCLK_DIV1; + 80012e8: 2300 movs r3, #0 + 80012ea: 61bb str r3, [r7, #24] + RCC_ClkInitStruct.AHBCLK4Divider = RCC_SYSCLK_DIV1; + 80012ec: 2300 movs r3, #0 + 80012ee: 61fb str r3, [r7, #28] + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) + 80012f0: 1d3b adds r3, r7, #4 + 80012f2: 2101 movs r1, #1 + 80012f4: 4618 mov r0, r3 + 80012f6: f001 ff93 bl 8003220 + 80012fa: 4603 mov r3, r0 + 80012fc: 2b00 cmp r3, #0 + 80012fe: d001 beq.n 8001304 + { + Error_Handler(); + 8001300: f000 f90c bl 800151c + } +} + 8001304: bf00 nop + 8001306: 3768 adds r7, #104 @ 0x68 + 8001308: 46bd mov sp, r7 + 800130a: bd80 pop {r7, pc} + 800130c: 58000400 .word 0x58000400 + +08001310 : +/** + * @brief Peripherals Common Clock Configuration + * @retval None + */ +void PeriphCommonClock_Config(void) +{ + 8001310: b580 push {r7, lr} + 8001312: b094 sub sp, #80 @ 0x50 + 8001314: af00 add r7, sp, #0 + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + 8001316: 463b mov r3, r7 + 8001318: 2250 movs r2, #80 @ 0x50 + 800131a: 2100 movs r1, #0 + 800131c: 4618 mov r0, r3 + 800131e: f006 fc02 bl 8007b26 + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SMPS|RCC_PERIPHCLK_RFWAKEUP; + 8001322: f44f 5340 mov.w r3, #12288 @ 0x3000 + 8001326: 603b str r3, [r7, #0] + PeriphClkInitStruct.RFWakeUpClockSelection = RCC_RFWKPCLKSOURCE_HSE_DIV1024; + 8001328: f44f 4340 mov.w r3, #49152 @ 0xc000 + 800132c: 647b str r3, [r7, #68] @ 0x44 + PeriphClkInitStruct.SmpsClockSelection = RCC_SMPSCLKSOURCE_HSE; + 800132e: 2302 movs r3, #2 + 8001330: 64bb str r3, [r7, #72] @ 0x48 + PeriphClkInitStruct.SmpsDivSelection = RCC_SMPSCLKDIV_RANGE0; + 8001332: 2300 movs r3, #0 + 8001334: 64fb str r3, [r7, #76] @ 0x4c + + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + 8001336: 463b mov r3, r7 + 8001338: 4618 mov r0, r3 + 800133a: f002 fb82 bl 8003a42 + 800133e: 4603 mov r3, r0 + 8001340: 2b00 cmp r3, #0 + 8001342: d001 beq.n 8001348 + { + Error_Handler(); + 8001344: f000 f8ea bl 800151c + } + /* USER CODE BEGIN Smps */ + + /* USER CODE END Smps */ +} + 8001348: bf00 nop + 800134a: 3750 adds r7, #80 @ 0x50 + 800134c: 46bd mov sp, r7 + 800134e: bd80 pop {r7, pc} + +08001350 : + * @brief I2C1 Initialization Function + * @param None + * @retval None + */ +static void MX_I2C1_Init(void) +{ + 8001350: b580 push {r7, lr} + 8001352: af00 add r7, sp, #0 + /* USER CODE END I2C1_Init 0 */ + + /* USER CODE BEGIN I2C1_Init 1 */ + + /* USER CODE END I2C1_Init 1 */ + hi2c1.Instance = I2C1; + 8001354: 4b1b ldr r3, [pc, #108] @ (80013c4 ) + 8001356: 4a1c ldr r2, [pc, #112] @ (80013c8 ) + 8001358: 601a str r2, [r3, #0] + hi2c1.Init.Timing = 0x00000508; + 800135a: 4b1a ldr r3, [pc, #104] @ (80013c4 ) + 800135c: f44f 62a1 mov.w r2, #1288 @ 0x508 + 8001360: 605a str r2, [r3, #4] + hi2c1.Init.OwnAddress1 = 0; + 8001362: 4b18 ldr r3, [pc, #96] @ (80013c4 ) + 8001364: 2200 movs r2, #0 + 8001366: 609a str r2, [r3, #8] + hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; + 8001368: 4b16 ldr r3, [pc, #88] @ (80013c4 ) + 800136a: 2201 movs r2, #1 + 800136c: 60da str r2, [r3, #12] + hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; + 800136e: 4b15 ldr r3, [pc, #84] @ (80013c4 ) + 8001370: 2200 movs r2, #0 + 8001372: 611a str r2, [r3, #16] + hi2c1.Init.OwnAddress2 = 0; + 8001374: 4b13 ldr r3, [pc, #76] @ (80013c4 ) + 8001376: 2200 movs r2, #0 + 8001378: 615a str r2, [r3, #20] + hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK; + 800137a: 4b12 ldr r3, [pc, #72] @ (80013c4 ) + 800137c: 2200 movs r2, #0 + 800137e: 619a str r2, [r3, #24] + hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; + 8001380: 4b10 ldr r3, [pc, #64] @ (80013c4 ) + 8001382: 2200 movs r2, #0 + 8001384: 61da str r2, [r3, #28] + hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; + 8001386: 4b0f ldr r3, [pc, #60] @ (80013c4 ) + 8001388: 2200 movs r2, #0 + 800138a: 621a str r2, [r3, #32] + if (HAL_I2C_Init(&hi2c1) != HAL_OK) + 800138c: 480d ldr r0, [pc, #52] @ (80013c4 ) + 800138e: f000 fe73 bl 8002078 + 8001392: 4603 mov r3, r0 + 8001394: 2b00 cmp r3, #0 + 8001396: d001 beq.n 800139c + { + Error_Handler(); + 8001398: f000 f8c0 bl 800151c + } + + /** Configure Analogue filter + */ + if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK) + 800139c: 2100 movs r1, #0 + 800139e: 4809 ldr r0, [pc, #36] @ (80013c4 ) + 80013a0: f000 ff05 bl 80021ae + 80013a4: 4603 mov r3, r0 + 80013a6: 2b00 cmp r3, #0 + 80013a8: d001 beq.n 80013ae + { + Error_Handler(); + 80013aa: f000 f8b7 bl 800151c + } + + /** Configure Digital filter + */ + if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1, 0) != HAL_OK) + 80013ae: 2100 movs r1, #0 + 80013b0: 4804 ldr r0, [pc, #16] @ (80013c4 ) + 80013b2: f000 ff47 bl 8002244 + 80013b6: 4603 mov r3, r0 + 80013b8: 2b00 cmp r3, #0 + 80013ba: d001 beq.n 80013c0 + { + Error_Handler(); + 80013bc: f000 f8ae bl 800151c + } + /* USER CODE BEGIN I2C1_Init 2 */ + + /* USER CODE END I2C1_Init 2 */ + +} + 80013c0: bf00 nop + 80013c2: bd80 pop {r7, pc} + 80013c4: 2000013c .word 0x2000013c + 80013c8: 40005400 .word 0x40005400 + +080013cc : + * @brief IPCC Initialization Function + * @param None + * @retval None + */ +static void MX_IPCC_Init(void) +{ + 80013cc: b580 push {r7, lr} + 80013ce: af00 add r7, sp, #0 + /* USER CODE END IPCC_Init 0 */ + + /* USER CODE BEGIN IPCC_Init 1 */ + + /* USER CODE END IPCC_Init 1 */ + hipcc.Instance = IPCC; + 80013d0: 4b06 ldr r3, [pc, #24] @ (80013ec ) + 80013d2: 4a07 ldr r2, [pc, #28] @ (80013f0 ) + 80013d4: 601a str r2, [r3, #0] + if (HAL_IPCC_Init(&hipcc) != HAL_OK) + 80013d6: 4805 ldr r0, [pc, #20] @ (80013ec ) + 80013d8: f000 ff80 bl 80022dc + 80013dc: 4603 mov r3, r0 + 80013de: 2b00 cmp r3, #0 + 80013e0: d001 beq.n 80013e6 + { + Error_Handler(); + 80013e2: f000 f89b bl 800151c + } + /* USER CODE BEGIN IPCC_Init 2 */ + + /* USER CODE END IPCC_Init 2 */ + +} + 80013e6: bf00 nop + 80013e8: bd80 pop {r7, pc} + 80013ea: bf00 nop + 80013ec: 20000190 .word 0x20000190 + 80013f0: 58000c00 .word 0x58000c00 + +080013f4 : + * @brief RF Initialization Function + * @param None + * @retval None + */ +static void MX_RF_Init(void) +{ + 80013f4: b480 push {r7} + 80013f6: af00 add r7, sp, #0 + /* USER CODE END RF_Init 1 */ + /* USER CODE BEGIN RF_Init 2 */ + + /* USER CODE END RF_Init 2 */ + +} + 80013f8: bf00 nop + 80013fa: 46bd mov sp, r7 + 80013fc: f85d 7b04 ldr.w r7, [sp], #4 + 8001400: 4770 bx lr + ... + +08001404 : + * @brief RTC Initialization Function + * @param None + * @retval None + */ +static void MX_RTC_Init(void) +{ + 8001404: b580 push {r7, lr} + 8001406: b086 sub sp, #24 + 8001408: af00 add r7, sp, #0 + + /* USER CODE BEGIN RTC_Init 0 */ + + /* USER CODE END RTC_Init 0 */ + + RTC_TimeTypeDef sTime = {0}; + 800140a: 1d3b adds r3, r7, #4 + 800140c: 2200 movs r2, #0 + 800140e: 601a str r2, [r3, #0] + 8001410: 605a str r2, [r3, #4] + 8001412: 609a str r2, [r3, #8] + 8001414: 60da str r2, [r3, #12] + 8001416: 611a str r2, [r3, #16] + RTC_DateTypeDef sDate = {0}; + 8001418: 2300 movs r3, #0 + 800141a: 603b str r3, [r7, #0] + + /* USER CODE END RTC_Init 1 */ + + /** Initialize RTC Only + */ + hrtc.Instance = RTC; + 800141c: 4b27 ldr r3, [pc, #156] @ (80014bc ) + 800141e: 4a28 ldr r2, [pc, #160] @ (80014c0 ) + 8001420: 601a str r2, [r3, #0] + hrtc.Init.HourFormat = RTC_HOURFORMAT_24; + 8001422: 4b26 ldr r3, [pc, #152] @ (80014bc ) + 8001424: 2200 movs r2, #0 + 8001426: 605a str r2, [r3, #4] + hrtc.Init.AsynchPrediv = CFG_RTC_ASYNCH_PRESCALER; + 8001428: 4b24 ldr r3, [pc, #144] @ (80014bc ) + 800142a: 220f movs r2, #15 + 800142c: 609a str r2, [r3, #8] + hrtc.Init.SynchPrediv = CFG_RTC_SYNCH_PRESCALER; + 800142e: 4b23 ldr r3, [pc, #140] @ (80014bc ) + 8001430: f647 72ff movw r2, #32767 @ 0x7fff + 8001434: 60da str r2, [r3, #12] + hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; + 8001436: 4b21 ldr r3, [pc, #132] @ (80014bc ) + 8001438: 2200 movs r2, #0 + 800143a: 611a str r2, [r3, #16] + hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; + 800143c: 4b1f ldr r3, [pc, #124] @ (80014bc ) + 800143e: 2200 movs r2, #0 + 8001440: 619a str r2, [r3, #24] + hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; + 8001442: 4b1e ldr r3, [pc, #120] @ (80014bc ) + 8001444: 2200 movs r2, #0 + 8001446: 61da str r2, [r3, #28] + hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE; + 8001448: 4b1c ldr r3, [pc, #112] @ (80014bc ) + 800144a: 2200 movs r2, #0 + 800144c: 615a str r2, [r3, #20] + if (HAL_RTC_Init(&hrtc) != HAL_OK) + 800144e: 481b ldr r0, [pc, #108] @ (80014bc ) + 8001450: f002 fd7e bl 8003f50 + 8001454: 4603 mov r3, r0 + 8001456: 2b00 cmp r3, #0 + 8001458: d001 beq.n 800145e + { + Error_Handler(); + 800145a: f000 f85f bl 800151c + + /* USER CODE END Check_RTC_BKUP */ + + /** Initialize RTC and set the Time and Date + */ + sTime.Hours = 0x0; + 800145e: 2300 movs r3, #0 + 8001460: 713b strb r3, [r7, #4] + sTime.Minutes = 0x0; + 8001462: 2300 movs r3, #0 + 8001464: 717b strb r3, [r7, #5] + sTime.Seconds = 0x0; + 8001466: 2300 movs r3, #0 + 8001468: 71bb strb r3, [r7, #6] + sTime.SubSeconds = 0x0; + 800146a: 2300 movs r3, #0 + 800146c: 60bb str r3, [r7, #8] + sTime.DayLightSaving = RTC_DAYLIGHTSAVING_NONE; + 800146e: 2300 movs r3, #0 + 8001470: 613b str r3, [r7, #16] + sTime.StoreOperation = RTC_STOREOPERATION_RESET; + 8001472: 2300 movs r3, #0 + 8001474: 617b str r3, [r7, #20] + if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK) + 8001476: 1d3b adds r3, r7, #4 + 8001478: 2201 movs r2, #1 + 800147a: 4619 mov r1, r3 + 800147c: 480f ldr r0, [pc, #60] @ (80014bc ) + 800147e: f002 fdef bl 8004060 + 8001482: 4603 mov r3, r0 + 8001484: 2b00 cmp r3, #0 + 8001486: d001 beq.n 800148c + { + Error_Handler(); + 8001488: f000 f848 bl 800151c + } + sDate.WeekDay = RTC_WEEKDAY_MONDAY; + 800148c: 2301 movs r3, #1 + 800148e: 703b strb r3, [r7, #0] + sDate.Month = RTC_MONTH_JANUARY; + 8001490: 2301 movs r3, #1 + 8001492: 707b strb r3, [r7, #1] + sDate.Date = 0x1; + 8001494: 2301 movs r3, #1 + 8001496: 70bb strb r3, [r7, #2] + sDate.Year = 0x0; + 8001498: 2300 movs r3, #0 + 800149a: 70fb strb r3, [r7, #3] + + if (HAL_RTC_SetDate(&hrtc, &sDate, RTC_FORMAT_BCD) != HAL_OK) + 800149c: 463b mov r3, r7 + 800149e: 2201 movs r2, #1 + 80014a0: 4619 mov r1, r3 + 80014a2: 4806 ldr r0, [pc, #24] @ (80014bc ) + 80014a4: f002 fe7b bl 800419e + 80014a8: 4603 mov r3, r0 + 80014aa: 2b00 cmp r3, #0 + 80014ac: d001 beq.n 80014b2 + { + Error_Handler(); + 80014ae: f000 f835 bl 800151c + } + /* USER CODE BEGIN RTC_Init 2 */ + + /* USER CODE END RTC_Init 2 */ + +} + 80014b2: bf00 nop + 80014b4: 3718 adds r7, #24 + 80014b6: 46bd mov sp, r7 + 80014b8: bd80 pop {r7, pc} + 80014ba: bf00 nop + 80014bc: 200001cc .word 0x200001cc + 80014c0: 40002800 .word 0x40002800 + +080014c4 : + * @brief GPIO Initialization Function + * @param None + * @retval None + */ +static void MX_GPIO_Init(void) +{ + 80014c4: b580 push {r7, lr} + 80014c6: b086 sub sp, #24 + 80014c8: af00 add r7, sp, #0 + GPIO_InitTypeDef GPIO_InitStruct = {0}; + 80014ca: 1d3b adds r3, r7, #4 + 80014cc: 2200 movs r2, #0 + 80014ce: 601a str r2, [r3, #0] + 80014d0: 605a str r2, [r3, #4] + 80014d2: 609a str r2, [r3, #8] + 80014d4: 60da str r2, [r3, #12] + 80014d6: 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(); + 80014d8: 2004 movs r0, #4 + 80014da: f7ff fe7d bl 80011d8 + __HAL_RCC_GPIOA_CLK_ENABLE(); + 80014de: 2001 movs r0, #1 + 80014e0: f7ff fe7a bl 80011d8 + __HAL_RCC_GPIOB_CLK_ENABLE(); + 80014e4: 2002 movs r0, #2 + 80014e6: f7ff fe77 bl 80011d8 + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOB, GPIO_PIN_4|GPIO_PIN_5, GPIO_PIN_SET); + 80014ea: 2201 movs r2, #1 + 80014ec: 2130 movs r1, #48 @ 0x30 + 80014ee: 480a ldr r0, [pc, #40] @ (8001518 ) + 80014f0: f000 fd86 bl 8002000 + + /*Configure GPIO pins : PB4 PB5 */ + GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5; + 80014f4: 2330 movs r3, #48 @ 0x30 + 80014f6: 607b str r3, [r7, #4] + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + 80014f8: 2301 movs r3, #1 + 80014fa: 60bb str r3, [r7, #8] + GPIO_InitStruct.Pull = GPIO_PULLUP; + 80014fc: 2301 movs r3, #1 + 80014fe: 60fb str r3, [r7, #12] + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + 8001500: 2300 movs r3, #0 + 8001502: 613b str r3, [r7, #16] + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + 8001504: 1d3b adds r3, r7, #4 + 8001506: 4619 mov r1, r3 + 8001508: 4803 ldr r0, [pc, #12] @ (8001518 ) + 800150a: f000 fc09 bl 8001d20 + + /* USER CODE BEGIN MX_GPIO_Init_2 */ + + /* USER CODE END MX_GPIO_Init_2 */ +} + 800150e: bf00 nop + 8001510: 3718 adds r7, #24 + 8001512: 46bd mov sp, r7 + 8001514: bd80 pop {r7, pc} + 8001516: bf00 nop + 8001518: 48000400 .word 0x48000400 + +0800151c : +/** + * @brief This function is executed in case of error occurrence. + * @retval None + */ +void Error_Handler(void) +{ + 800151c: b480 push {r7} + 800151e: af00 add r7, sp, #0 + __ASM volatile ("cpsid i" : : : "memory"); + 8001520: b672 cpsid i +} + 8001522: 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) + 8001524: bf00 nop + 8001526: e7fd b.n 8001524 + +08001528 : + * @brief Enable RTC + * @rmtoll BDCR RTCEN LL_RCC_EnableRTC + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableRTC(void) +{ + 8001528: b480 push {r7} + 800152a: af00 add r7, sp, #0 + SET_BIT(RCC->BDCR, RCC_BDCR_RTCEN); + 800152c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8001530: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8001534: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8001538: f443 4300 orr.w r3, r3, #32768 @ 0x8000 + 800153c: f8c2 3090 str.w r3, [r2, #144] @ 0x90 +} + 8001540: bf00 nop + 8001542: 46bd mov sp, r7 + 8001544: f85d 7b04 ldr.w r7, [sp], #4 + 8001548: 4770 bx lr + +0800154a : +{ + 800154a: b480 push {r7} + 800154c: b085 sub sp, #20 + 800154e: af00 add r7, sp, #0 + 8001550: 6078 str r0, [r7, #4] + SET_BIT(RCC->AHB2ENR, Periphs); + 8001552: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8001556: 6cda ldr r2, [r3, #76] @ 0x4c + 8001558: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800155c: 687b ldr r3, [r7, #4] + 800155e: 4313 orrs r3, r2 + 8001560: 64cb str r3, [r1, #76] @ 0x4c + tmpreg = READ_BIT(RCC->AHB2ENR, Periphs); + 8001562: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8001566: 6cda ldr r2, [r3, #76] @ 0x4c + 8001568: 687b ldr r3, [r7, #4] + 800156a: 4013 ands r3, r2 + 800156c: 60fb str r3, [r7, #12] + (void)tmpreg; + 800156e: 68fb ldr r3, [r7, #12] +} + 8001570: bf00 nop + 8001572: 3714 adds r7, #20 + 8001574: 46bd mov sp, r7 + 8001576: f85d 7b04 ldr.w r7, [sp], #4 + 800157a: 4770 bx lr + +0800157c : + * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB3_GRP1_EnableClock(uint32_t Periphs) +{ + 800157c: b480 push {r7} + 800157e: b085 sub sp, #20 + 8001580: af00 add r7, sp, #0 + 8001582: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg; + SET_BIT(RCC->AHB3ENR, Periphs); + 8001584: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8001588: 6d1a ldr r2, [r3, #80] @ 0x50 + 800158a: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800158e: 687b ldr r3, [r7, #4] + 8001590: 4313 orrs r3, r2 + 8001592: 650b str r3, [r1, #80] @ 0x50 + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->AHB3ENR, Periphs); + 8001594: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8001598: 6d1a ldr r2, [r3, #80] @ 0x50 + 800159a: 687b ldr r3, [r7, #4] + 800159c: 4013 ands r3, r2 + 800159e: 60fb str r3, [r7, #12] + (void)tmpreg; + 80015a0: 68fb ldr r3, [r7, #12] +} + 80015a2: bf00 nop + 80015a4: 3714 adds r7, #20 + 80015a6: 46bd mov sp, r7 + 80015a8: f85d 7b04 ldr.w r7, [sp], #4 + 80015ac: 4770 bx lr + +080015ae : + * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs) +{ + 80015ae: b480 push {r7} + 80015b0: b085 sub sp, #20 + 80015b2: af00 add r7, sp, #0 + 80015b4: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg; + SET_BIT(RCC->APB1ENR1, Periphs); + 80015b6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80015ba: 6d9a ldr r2, [r3, #88] @ 0x58 + 80015bc: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80015c0: 687b ldr r3, [r7, #4] + 80015c2: 4313 orrs r3, r2 + 80015c4: 658b str r3, [r1, #88] @ 0x58 + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->APB1ENR1, Periphs); + 80015c6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80015ca: 6d9a ldr r2, [r3, #88] @ 0x58 + 80015cc: 687b ldr r3, [r7, #4] + 80015ce: 4013 ands r3, r2 + 80015d0: 60fb str r3, [r7, #12] + (void)tmpreg; + 80015d2: 68fb ldr r3, [r7, #12] +} + 80015d4: bf00 nop + 80015d6: 3714 adds r7, #20 + 80015d8: 46bd mov sp, r7 + 80015da: f85d 7b04 ldr.w r7, [sp], #4 + 80015de: 4770 bx lr + +080015e0 : +/* USER CODE END 0 */ +/** + * Initializes the Global MSP. + */ +void HAL_MspInit(void) +{ + 80015e0: b580 push {r7, lr} + 80015e2: af00 add r7, sp, #0 + + /* USER CODE BEGIN MspInit 0 */ + + /* USER CODE END MspInit 0 */ + + __HAL_RCC_HSEM_CLK_ENABLE(); + 80015e4: f44f 2000 mov.w r0, #524288 @ 0x80000 + 80015e8: f7ff ffc8 bl 800157c + + /* System interrupt init*/ + + /* Peripheral interrupt init */ + /* HSEM_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(HSEM_IRQn, 0, 0); + 80015ec: 2200 movs r2, #0 + 80015ee: 2100 movs r1, #0 + 80015f0: 202e movs r0, #46 @ 0x2e + 80015f2: f000 fb36 bl 8001c62 + HAL_NVIC_EnableIRQ(HSEM_IRQn); + 80015f6: 202e movs r0, #46 @ 0x2e + 80015f8: f000 fb4d bl 8001c96 + + /* USER CODE BEGIN MspInit 1 */ + + /* USER CODE END MspInit 1 */ +} + 80015fc: bf00 nop + 80015fe: bd80 pop {r7, pc} + +08001600 : + * This function configures the hardware resources used in this example + * @param hi2c: I2C handle pointer + * @retval None + */ +void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c) +{ + 8001600: b580 push {r7, lr} + 8001602: b09c sub sp, #112 @ 0x70 + 8001604: af00 add r7, sp, #0 + 8001606: 6078 str r0, [r7, #4] + GPIO_InitTypeDef GPIO_InitStruct = {0}; + 8001608: f107 035c add.w r3, r7, #92 @ 0x5c + 800160c: 2200 movs r2, #0 + 800160e: 601a str r2, [r3, #0] + 8001610: 605a str r2, [r3, #4] + 8001612: 609a str r2, [r3, #8] + 8001614: 60da str r2, [r3, #12] + 8001616: 611a str r2, [r3, #16] + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + 8001618: f107 030c add.w r3, r7, #12 + 800161c: 2250 movs r2, #80 @ 0x50 + 800161e: 2100 movs r1, #0 + 8001620: 4618 mov r0, r3 + 8001622: f006 fa80 bl 8007b26 + if(hi2c->Instance==I2C1) + 8001626: 687b ldr r3, [r7, #4] + 8001628: 681b ldr r3, [r3, #0] + 800162a: 4a16 ldr r2, [pc, #88] @ (8001684 ) + 800162c: 4293 cmp r3, r2 + 800162e: d125 bne.n 800167c + + /* USER CODE END I2C1_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2C1; + 8001630: 2304 movs r3, #4 + 8001632: 60fb str r3, [r7, #12] + PeriphClkInitStruct.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1; + 8001634: f44f 3340 mov.w r3, #196608 @ 0x30000 + 8001638: 62fb str r3, [r7, #44] @ 0x2c + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + 800163a: f107 030c add.w r3, r7, #12 + 800163e: 4618 mov r0, r3 + 8001640: f002 f9ff bl 8003a42 + 8001644: 4603 mov r3, r0 + 8001646: 2b00 cmp r3, #0 + 8001648: d001 beq.n 800164e + { + Error_Handler(); + 800164a: f7ff ff67 bl 800151c + } + + __HAL_RCC_GPIOB_CLK_ENABLE(); + 800164e: 2002 movs r0, #2 + 8001650: f7ff ff7b bl 800154a + /**I2C1 GPIO Configuration + PB6 ------> I2C1_SCL + PB7 ------> I2C1_SDA + */ + GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7; + 8001654: 23c0 movs r3, #192 @ 0xc0 + 8001656: 65fb str r3, [r7, #92] @ 0x5c + GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; + 8001658: 2312 movs r3, #18 + 800165a: 663b str r3, [r7, #96] @ 0x60 + GPIO_InitStruct.Pull = GPIO_NOPULL; + 800165c: 2300 movs r3, #0 + 800165e: 667b str r3, [r7, #100] @ 0x64 + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + 8001660: 2300 movs r3, #0 + 8001662: 66bb str r3, [r7, #104] @ 0x68 + GPIO_InitStruct.Alternate = GPIO_AF4_I2C1; + 8001664: 2304 movs r3, #4 + 8001666: 66fb str r3, [r7, #108] @ 0x6c + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + 8001668: f107 035c add.w r3, r7, #92 @ 0x5c + 800166c: 4619 mov r1, r3 + 800166e: 4806 ldr r0, [pc, #24] @ (8001688 ) + 8001670: f000 fb56 bl 8001d20 + + /* Peripheral clock enable */ + __HAL_RCC_I2C1_CLK_ENABLE(); + 8001674: f44f 1000 mov.w r0, #2097152 @ 0x200000 + 8001678: f7ff ff99 bl 80015ae + + /* USER CODE END I2C1_MspInit 1 */ + + } + +} + 800167c: bf00 nop + 800167e: 3770 adds r7, #112 @ 0x70 + 8001680: 46bd mov sp, r7 + 8001682: bd80 pop {r7, pc} + 8001684: 40005400 .word 0x40005400 + 8001688: 48000400 .word 0x48000400 + +0800168c : + * This function configures the hardware resources used in this example + * @param hipcc: IPCC handle pointer + * @retval None + */ +void HAL_IPCC_MspInit(IPCC_HandleTypeDef* hipcc) +{ + 800168c: b580 push {r7, lr} + 800168e: b082 sub sp, #8 + 8001690: af00 add r7, sp, #0 + 8001692: 6078 str r0, [r7, #4] + if(hipcc->Instance==IPCC) + 8001694: 687b ldr r3, [r7, #4] + 8001696: 681b ldr r3, [r3, #0] + 8001698: 4a0d ldr r2, [pc, #52] @ (80016d0 ) + 800169a: 4293 cmp r3, r2 + 800169c: d113 bne.n 80016c6 + { + /* USER CODE BEGIN IPCC_MspInit 0 */ + + /* USER CODE END IPCC_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_IPCC_CLK_ENABLE(); + 800169e: f44f 1080 mov.w r0, #1048576 @ 0x100000 + 80016a2: f7ff ff6b bl 800157c + /* IPCC interrupt Init */ + HAL_NVIC_SetPriority(IPCC_C1_RX_IRQn, 0, 0); + 80016a6: 2200 movs r2, #0 + 80016a8: 2100 movs r1, #0 + 80016aa: 202c movs r0, #44 @ 0x2c + 80016ac: f000 fad9 bl 8001c62 + HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn); + 80016b0: 202c movs r0, #44 @ 0x2c + 80016b2: f000 faf0 bl 8001c96 + HAL_NVIC_SetPriority(IPCC_C1_TX_IRQn, 0, 0); + 80016b6: 2200 movs r2, #0 + 80016b8: 2100 movs r1, #0 + 80016ba: 202d movs r0, #45 @ 0x2d + 80016bc: f000 fad1 bl 8001c62 + HAL_NVIC_EnableIRQ(IPCC_C1_TX_IRQn); + 80016c0: 202d movs r0, #45 @ 0x2d + 80016c2: f000 fae8 bl 8001c96 + + /* USER CODE END IPCC_MspInit 1 */ + + } + +} + 80016c6: bf00 nop + 80016c8: 3708 adds r7, #8 + 80016ca: 46bd mov sp, r7 + 80016cc: bd80 pop {r7, pc} + 80016ce: bf00 nop + 80016d0: 58000c00 .word 0x58000c00 + +080016d4 : + * This function configures the hardware resources used in this example + * @param hrtc: RTC handle pointer + * @retval None + */ +void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc) +{ + 80016d4: b580 push {r7, lr} + 80016d6: b096 sub sp, #88 @ 0x58 + 80016d8: af00 add r7, sp, #0 + 80016da: 6078 str r0, [r7, #4] + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; + 80016dc: f107 0308 add.w r3, r7, #8 + 80016e0: 2250 movs r2, #80 @ 0x50 + 80016e2: 2100 movs r1, #0 + 80016e4: 4618 mov r0, r3 + 80016e6: f006 fa1e bl 8007b26 + if(hrtc->Instance==RTC) + 80016ea: 687b ldr r3, [r7, #4] + 80016ec: 681b ldr r3, [r3, #0] + 80016ee: 4a0e ldr r2, [pc, #56] @ (8001728 ) + 80016f0: 4293 cmp r3, r2 + 80016f2: d115 bne.n 8001720 + + /* USER CODE END RTC_MspInit 0 */ + + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC; + 80016f4: f44f 6300 mov.w r3, #2048 @ 0x800 + 80016f8: 60bb str r3, [r7, #8] + PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE; + 80016fa: f44f 7380 mov.w r3, #256 @ 0x100 + 80016fe: 64bb str r3, [r7, #72] @ 0x48 + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + 8001700: f107 0308 add.w r3, r7, #8 + 8001704: 4618 mov r0, r3 + 8001706: f002 f99c bl 8003a42 + 800170a: 4603 mov r3, r0 + 800170c: 2b00 cmp r3, #0 + 800170e: d001 beq.n 8001714 + { + Error_Handler(); + 8001710: f7ff ff04 bl 800151c + } + + /* Peripheral clock enable */ + __HAL_RCC_RTC_ENABLE(); + 8001714: f7ff ff08 bl 8001528 + __HAL_RCC_RTCAPB_CLK_ENABLE(); + 8001718: f44f 6080 mov.w r0, #1024 @ 0x400 + 800171c: f7ff ff47 bl 80015ae + + /* USER CODE END RTC_MspInit 1 */ + + } + +} + 8001720: bf00 nop + 8001722: 3758 adds r7, #88 @ 0x58 + 8001724: 46bd mov sp, r7 + 8001726: bd80 pop {r7, pc} + 8001728: 40002800 .word 0x40002800 + +0800172c : +/******************************************************************************/ +/** + * @brief This function handles Non maskable interrupt. + */ +void NMI_Handler(void) +{ + 800172c: b480 push {r7} + 800172e: 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) + 8001730: bf00 nop + 8001732: e7fd b.n 8001730 + +08001734 : + +/** + * @brief This function handles Hard fault interrupt. + */ +void HardFault_Handler(void) +{ + 8001734: b480 push {r7} + 8001736: af00 add r7, sp, #0 + /* USER CODE BEGIN HardFault_IRQn 0 */ + + /* USER CODE END HardFault_IRQn 0 */ + while (1) + 8001738: bf00 nop + 800173a: e7fd b.n 8001738 + +0800173c : + +/** + * @brief This function handles Memory management fault. + */ +void MemManage_Handler(void) +{ + 800173c: b480 push {r7} + 800173e: af00 add r7, sp, #0 + /* USER CODE BEGIN MemoryManagement_IRQn 0 */ + + /* USER CODE END MemoryManagement_IRQn 0 */ + while (1) + 8001740: bf00 nop + 8001742: e7fd b.n 8001740 + +08001744 : + +/** + * @brief This function handles Prefetch fault, memory access fault. + */ +void BusFault_Handler(void) +{ + 8001744: b480 push {r7} + 8001746: af00 add r7, sp, #0 + /* USER CODE BEGIN BusFault_IRQn 0 */ + + /* USER CODE END BusFault_IRQn 0 */ + while (1) + 8001748: bf00 nop + 800174a: e7fd b.n 8001748 + +0800174c : + +/** + * @brief This function handles Undefined instruction or illegal state. + */ +void UsageFault_Handler(void) +{ + 800174c: b480 push {r7} + 800174e: af00 add r7, sp, #0 + /* USER CODE BEGIN UsageFault_IRQn 0 */ + + /* USER CODE END UsageFault_IRQn 0 */ + while (1) + 8001750: bf00 nop + 8001752: e7fd b.n 8001750 + +08001754 : + +/** + * @brief This function handles System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + 8001754: b480 push {r7} + 8001756: af00 add r7, sp, #0 + + /* USER CODE END SVCall_IRQn 0 */ + /* USER CODE BEGIN SVCall_IRQn 1 */ + + /* USER CODE END SVCall_IRQn 1 */ +} + 8001758: bf00 nop + 800175a: 46bd mov sp, r7 + 800175c: f85d 7b04 ldr.w r7, [sp], #4 + 8001760: 4770 bx lr + +08001762 : + +/** + * @brief This function handles Debug monitor. + */ +void DebugMon_Handler(void) +{ + 8001762: b480 push {r7} + 8001764: af00 add r7, sp, #0 + + /* USER CODE END DebugMonitor_IRQn 0 */ + /* USER CODE BEGIN DebugMonitor_IRQn 1 */ + + /* USER CODE END DebugMonitor_IRQn 1 */ +} + 8001766: bf00 nop + 8001768: 46bd mov sp, r7 + 800176a: f85d 7b04 ldr.w r7, [sp], #4 + 800176e: 4770 bx lr + +08001770 : + +/** + * @brief This function handles Pendable request for system service. + */ +void PendSV_Handler(void) +{ + 8001770: b480 push {r7} + 8001772: af00 add r7, sp, #0 + + /* USER CODE END PendSV_IRQn 0 */ + /* USER CODE BEGIN PendSV_IRQn 1 */ + + /* USER CODE END PendSV_IRQn 1 */ +} + 8001774: bf00 nop + 8001776: 46bd mov sp, r7 + 8001778: f85d 7b04 ldr.w r7, [sp], #4 + 800177c: 4770 bx lr + +0800177e : + +/** + * @brief This function handles System tick timer. + */ +void SysTick_Handler(void) +{ + 800177e: b580 push {r7, lr} + 8001780: af00 add r7, sp, #0 + /* USER CODE BEGIN SysTick_IRQn 0 */ + + /* USER CODE END SysTick_IRQn 0 */ + HAL_IncTick(); + 8001782: f000 f8fb bl 800197c + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + 8001786: bf00 nop + 8001788: bd80 pop {r7, pc} + +0800178a : + +/** + * @brief This function handles IPCC RX occupied interrupt. + */ +void IPCC_C1_RX_IRQHandler(void) +{ + 800178a: b580 push {r7, lr} + 800178c: af00 add r7, sp, #0 + /* USER CODE BEGIN IPCC_C1_RX_IRQn 0 */ + + /* USER CODE END IPCC_C1_RX_IRQn 0 */ + HAL_IPCC_RX_IRQHandler(&hipcc); + 800178e: f005 fd01 bl 8007194 + /* USER CODE BEGIN IPCC_C1_RX_IRQn 1 */ + + /* USER CODE END IPCC_C1_RX_IRQn 1 */ +} + 8001792: bf00 nop + 8001794: bd80 pop {r7, pc} + +08001796 : + +/** + * @brief This function handles IPCC TX free interrupt. + */ +void IPCC_C1_TX_IRQHandler(void) +{ + 8001796: b580 push {r7, lr} + 8001798: af00 add r7, sp, #0 + /* USER CODE BEGIN IPCC_C1_TX_IRQn 0 */ + + /* USER CODE END IPCC_C1_TX_IRQn 0 */ + HAL_IPCC_TX_IRQHandler(&hipcc); + 800179a: f005 fd31 bl 8007200 + /* USER CODE BEGIN IPCC_C1_TX_IRQn 1 */ + + /* USER CODE END IPCC_C1_TX_IRQn 1 */ +} + 800179e: bf00 nop + 80017a0: bd80 pop {r7, pc} + +080017a2 : + +/** + * @brief This function handles HSEM global interrupt. + */ +void HSEM_IRQHandler(void) +{ + 80017a2: b580 push {r7, lr} + 80017a4: af00 add r7, sp, #0 + /* USER CODE BEGIN HSEM_IRQn 0 */ + + /* USER CODE END HSEM_IRQn 0 */ + HAL_HSEM_IRQHandler(); + 80017a6: f000 fc43 bl 8002030 + /* USER CODE BEGIN HSEM_IRQn 1 */ + + /* USER CODE END HSEM_IRQn 1 */ +} + 80017aa: bf00 nop + 80017ac: bd80 pop {r7, pc} + ... + +080017b0 : + * @brief Setup the microcontroller system. + * @param None + * @retval None + */ +void SystemInit(void) +{ + 80017b0: b480 push {r7} + 80017b2: af00 add r7, sp, #0 + SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; +#endif /* USER_VECT_TAB_ADDRESS */ + + /* FPU settings ------------------------------------------------------------*/ +#if (__FPU_PRESENT == 1) && (__FPU_USED == 1) + SCB->CPACR |= ((3UL << (10UL * 2UL)) | (3UL << (11UL * 2UL))); /* set CP10 and CP11 Full Access */ + 80017b4: 4b24 ldr r3, [pc, #144] @ (8001848 ) + 80017b6: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 + 80017ba: 4a23 ldr r2, [pc, #140] @ (8001848 ) + 80017bc: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000 + 80017c0: f8c2 3088 str.w r3, [r2, #136] @ 0x88 +#endif /* FPU */ + + /* Reset the RCC clock configuration to the default reset state ------------*/ + /* Set MSION bit */ + RCC->CR |= RCC_CR_MSION; + 80017c4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80017c8: 681b ldr r3, [r3, #0] + 80017ca: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80017ce: f043 0301 orr.w r3, r3, #1 + 80017d2: 6013 str r3, [r2, #0] + + /* Reset CFGR register */ + RCC->CFGR = 0x00070000U; + 80017d4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80017d8: f44f 22e0 mov.w r2, #458752 @ 0x70000 + 80017dc: 609a str r2, [r3, #8] + + /* Reset PLLSAI1ON, PLLON, HSECSSON, HSEON, HSION, and MSIPLLON bits */ + RCC->CR &= (uint32_t)0xFAF6FEFBU; + 80017de: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80017e2: 681a ldr r2, [r3, #0] + 80017e4: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80017e8: 4b18 ldr r3, [pc, #96] @ (800184c ) + 80017ea: 4013 ands r3, r2 + 80017ec: 600b str r3, [r1, #0] + + /*!< Reset LSI1 and LSI2 bits */ + RCC->CSR &= (uint32_t)0xFFFFFFFAU; + 80017ee: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80017f2: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 80017f6: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80017fa: f023 0305 bic.w r3, r3, #5 + 80017fe: f8c2 3094 str.w r3, [r2, #148] @ 0x94 + + /*!< Reset HSI48ON bit */ + RCC->CRRCR &= (uint32_t)0xFFFFFFFEU; + 8001802: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8001806: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 + 800180a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 800180e: f023 0301 bic.w r3, r3, #1 + 8001812: f8c2 3098 str.w r3, [r2, #152] @ 0x98 + + /* Reset PLLCFGR register */ + RCC->PLLCFGR = 0x22041000U; + 8001816: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800181a: 4a0d ldr r2, [pc, #52] @ (8001850 ) + 800181c: 60da str r2, [r3, #12] + +#if defined(STM32WB55xx) || defined(STM32WB5Mxx) + /* Reset PLLSAI1CFGR register */ + RCC->PLLSAI1CFGR = 0x22041000U; + 800181e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8001822: 4a0b ldr r2, [pc, #44] @ (8001850 ) + 8001824: 611a str r2, [r3, #16] +#endif /* STM32WB55xx || STM32WB5Mxx */ + + /* Reset HSEBYP bit */ + RCC->CR &= 0xFFFBFFFFU; + 8001826: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800182a: 681b ldr r3, [r3, #0] + 800182c: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8001830: f423 2380 bic.w r3, r3, #262144 @ 0x40000 + 8001834: 6013 str r3, [r2, #0] + + /* Disable all interrupts */ + RCC->CIER = 0x00000000; + 8001836: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800183a: 2200 movs r2, #0 + 800183c: 619a str r2, [r3, #24] +} + 800183e: bf00 nop + 8001840: 46bd mov sp, r7 + 8001842: f85d 7b04 ldr.w r7, [sp], #4 + 8001846: 4770 bx lr + 8001848: e000ed00 .word 0xe000ed00 + 800184c: faf6fefb .word 0xfaf6fefb + 8001850: 22041000 .word 0x22041000 + +08001854 : + bl LoopCopyDataInit +.endm + +.section .text.data_initializers +CopyDataInit: + ldr r4, [r2, r3] + 8001854: 58d4 ldr r4, [r2, r3] + str r4, [r0, r3] + 8001856: 50c4 str r4, [r0, r3] + adds r3, r3, #4 + 8001858: 3304 adds r3, #4 + +0800185a : + +LoopCopyDataInit: + adds r4, r0, r3 + 800185a: 18c4 adds r4, r0, r3 + cmp r4, r1 + 800185c: 428c cmp r4, r1 + bcc CopyDataInit + 800185e: d3f9 bcc.n 8001854 + bx lr + 8001860: 4770 bx lr + +08001862 : + +FillZerobss: + str r3, [r0] + 8001862: 6003 str r3, [r0, #0] + adds r0, r0, #4 + 8001864: 3004 adds r0, #4 + +08001866 : + +LoopFillZerobss: + cmp r0, r1 + 8001866: 4288 cmp r0, r1 + bcc FillZerobss + 8001868: d3fb bcc.n 8001862 + bx lr + 800186a: 4770 bx lr + +0800186c : + + .section .text.Reset_Handler + .weak Reset_Handler + .type Reset_Handler, %function +Reset_Handler: + ldr r0, =_estack + 800186c: 480c ldr r0, [pc, #48] @ (80018a0 ) + mov sp, r0 /* set stack pointer */ + 800186e: 4685 mov sp, r0 +/* Call the clock system initialization function.*/ + bl SystemInit + 8001870: f7ff ff9e bl 80017b0 + +/* Copy the data segment initializers from flash to SRAM */ + INIT_DATA _sdata, _edata, _sidata + 8001874: 480b ldr r0, [pc, #44] @ (80018a4 ) + 8001876: 490c ldr r1, [pc, #48] @ (80018a8 ) + 8001878: 4a0c ldr r2, [pc, #48] @ (80018ac ) + 800187a: 2300 movs r3, #0 + 800187c: f7ff ffed bl 800185a + INIT_DATA _sMB_MEM2, _eMB_MEM2, _siMB_MEM2 + 8001880: 480b ldr r0, [pc, #44] @ (80018b0 ) + 8001882: 490c ldr r1, [pc, #48] @ (80018b4 ) + 8001884: 4a0c ldr r2, [pc, #48] @ (80018b8 ) + 8001886: 2300 movs r3, #0 + 8001888: f7ff ffe7 bl 800185a + +/* Zero fill the bss segments. */ + INIT_BSS _sbss, _ebss + 800188c: 480b ldr r0, [pc, #44] @ (80018bc ) + 800188e: 490c ldr r1, [pc, #48] @ (80018c0 ) + 8001890: 2300 movs r3, #0 + 8001892: f7ff ffe8 bl 8001866 + +/* Call static constructors */ + bl __libc_init_array + 8001896: f006 f94f bl 8007b38 <__libc_init_array> +/* Call the application s entry point.*/ + bl main + 800189a: f7ff fcb7 bl 800120c
+ +0800189e : + +LoopForever: + b LoopForever + 800189e: e7fe b.n 800189e + ldr r0, =_estack + 80018a0: 20030000 .word 0x20030000 + INIT_DATA _sdata, _edata, _sidata + 80018a4: 20000008 .word 0x20000008 + 80018a8: 2000002c .word 0x2000002c + 80018ac: 08007e30 .word 0x08007e30 + INIT_DATA _sMB_MEM2, _eMB_MEM2, _siMB_MEM2 + 80018b0: 200301e4 .word 0x200301e4 + 80018b4: 20030a67 .word 0x20030a67 + 80018b8: 08007ea2 .word 0x08007ea2 + INIT_BSS _sbss, _ebss + 80018bc: 20000080 .word 0x20000080 + 80018c0: 200003a4 .word 0x200003a4 + +080018c4 : + * @retval None +*/ + .section .text.Default_Handler,"ax",%progbits +Default_Handler: +Infinite_Loop: + b Infinite_Loop + 80018c4: e7fe b.n 80018c4 + ... + +080018c8 : + * 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) +{ + 80018c8: b580 push {r7, lr} + 80018ca: b082 sub sp, #8 + 80018cc: af00 add r7, sp, #0 + HAL_StatusTypeDef status = HAL_OK; + 80018ce: 2300 movs r3, #0 + 80018d0: 71fb strb r3, [r7, #7] +#if (DATA_CACHE_ENABLE == 0U) + __HAL_FLASH_DATA_CACHE_DISABLE(); +#endif /* DATA_CACHE_ENABLE */ + +#if (PREFETCH_ENABLE != 0U) + __HAL_FLASH_PREFETCH_BUFFER_ENABLE(); + 80018d2: 4b0c ldr r3, [pc, #48] @ (8001904 ) + 80018d4: 681b ldr r3, [r3, #0] + 80018d6: 4a0b ldr r2, [pc, #44] @ (8001904 ) + 80018d8: f443 7380 orr.w r3, r3, #256 @ 0x100 + 80018dc: 6013 str r3, [r2, #0] +#endif /* PREFETCH_ENABLE */ + + /* Set Interrupt Group Priority */ + HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); + 80018de: 2003 movs r0, #3 + 80018e0: f000 f9b4 bl 8001c4c + + /* Use SysTick as time base source and configure 1ms tick (default clock after Reset is MSI) */ + if (HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK) + 80018e4: 200f movs r0, #15 + 80018e6: f000 f80f bl 8001908 + 80018ea: 4603 mov r3, r0 + 80018ec: 2b00 cmp r3, #0 + 80018ee: d002 beq.n 80018f6 + { + status = HAL_ERROR; + 80018f0: 2301 movs r3, #1 + 80018f2: 71fb strb r3, [r7, #7] + 80018f4: e001 b.n 80018fa + } + else + { + /* Init the low level hardware */ + HAL_MspInit(); + 80018f6: f7ff fe73 bl 80015e0 + } + + /* Return function status */ + return status; + 80018fa: 79fb ldrb r3, [r7, #7] +} + 80018fc: 4618 mov r0, r3 + 80018fe: 3708 adds r7, #8 + 8001900: 46bd mov sp, r7 + 8001902: bd80 pop {r7, pc} + 8001904: 58004000 .word 0x58004000 + +08001908 : + * implementation in user file. + * @param TickPriority Tick interrupt priority. + * @retval HAL status + */ +__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) +{ + 8001908: b580 push {r7, lr} + 800190a: b084 sub sp, #16 + 800190c: af00 add r7, sp, #0 + 800190e: 6078 str r0, [r7, #4] + HAL_StatusTypeDef status = HAL_OK; + 8001910: 2300 movs r3, #0 + 8001912: 73fb strb r3, [r7, #15] + + if ((uint32_t)uwTickFreq != 0U) + 8001914: 4b17 ldr r3, [pc, #92] @ (8001974 ) + 8001916: 781b ldrb r3, [r3, #0] + 8001918: 2b00 cmp r3, #0 + 800191a: d024 beq.n 8001966 + { + /*Configure the SysTick to have interrupt in 1ms time basis*/ + if (HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq() / (1000U / (uint32_t)uwTickFreq)) == 0U) + 800191c: f001 fe2c bl 8003578 + 8001920: 4602 mov r2, r0 + 8001922: 4b14 ldr r3, [pc, #80] @ (8001974 ) + 8001924: 781b ldrb r3, [r3, #0] + 8001926: 4619 mov r1, r3 + 8001928: f44f 737a mov.w r3, #1000 @ 0x3e8 + 800192c: fbb3 f3f1 udiv r3, r3, r1 + 8001930: fbb2 f3f3 udiv r3, r2, r3 + 8001934: 4618 mov r0, r3 + 8001936: f000 f9ca bl 8001cce + 800193a: 4603 mov r3, r0 + 800193c: 2b00 cmp r3, #0 + 800193e: d10f bne.n 8001960 + { + /* Configure the SysTick IRQ priority */ + if (TickPriority < (1UL << __NVIC_PRIO_BITS)) + 8001940: 687b ldr r3, [r7, #4] + 8001942: 2b0f cmp r3, #15 + 8001944: d809 bhi.n 800195a + { + HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); + 8001946: 2200 movs r2, #0 + 8001948: 6879 ldr r1, [r7, #4] + 800194a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff + 800194e: f000 f988 bl 8001c62 + uwTickPrio = TickPriority; + 8001952: 4a09 ldr r2, [pc, #36] @ (8001978 ) + 8001954: 687b ldr r3, [r7, #4] + 8001956: 6013 str r3, [r2, #0] + 8001958: e007 b.n 800196a + } + else + { + status = HAL_ERROR; + 800195a: 2301 movs r3, #1 + 800195c: 73fb strb r3, [r7, #15] + 800195e: e004 b.n 800196a + } + } + else + { + status = HAL_ERROR; + 8001960: 2301 movs r3, #1 + 8001962: 73fb strb r3, [r7, #15] + 8001964: e001 b.n 800196a + } + } + else + { + status = HAL_ERROR; + 8001966: 2301 movs r3, #1 + 8001968: 73fb strb r3, [r7, #15] + } + + /* Return function status */ + return status; + 800196a: 7bfb ldrb r3, [r7, #15] +} + 800196c: 4618 mov r0, r3 + 800196e: 3710 adds r7, #16 + 8001970: 46bd mov sp, r7 + 8001972: bd80 pop {r7, pc} + 8001974: 20000010 .word 0x20000010 + 8001978: 2000000c .word 0x2000000c + +0800197c : + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @retval None + */ +__weak void HAL_IncTick(void) +{ + 800197c: b480 push {r7} + 800197e: af00 add r7, sp, #0 + uwTick += (uint32_t)uwTickFreq; + 8001980: 4b06 ldr r3, [pc, #24] @ (800199c ) + 8001982: 781b ldrb r3, [r3, #0] + 8001984: 461a mov r2, r3 + 8001986: 4b06 ldr r3, [pc, #24] @ (80019a0 ) + 8001988: 681b ldr r3, [r3, #0] + 800198a: 4413 add r3, r2 + 800198c: 4a04 ldr r2, [pc, #16] @ (80019a0 ) + 800198e: 6013 str r3, [r2, #0] +} + 8001990: bf00 nop + 8001992: 46bd mov sp, r7 + 8001994: f85d 7b04 ldr.w r7, [sp], #4 + 8001998: 4770 bx lr + 800199a: bf00 nop + 800199c: 20000010 .word 0x20000010 + 80019a0: 200001f0 .word 0x200001f0 + +080019a4 : + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @retval tick value + */ +__weak uint32_t HAL_GetTick(void) +{ + 80019a4: b480 push {r7} + 80019a6: af00 add r7, sp, #0 + return uwTick; + 80019a8: 4b03 ldr r3, [pc, #12] @ (80019b8 ) + 80019aa: 681b ldr r3, [r3, #0] +} + 80019ac: 4618 mov r0, r3 + 80019ae: 46bd mov sp, r7 + 80019b0: f85d 7b04 ldr.w r7, [sp], #4 + 80019b4: 4770 bx lr + 80019b6: bf00 nop + 80019b8: 200001f0 .word 0x200001f0 + +080019bc : +/** + * @brief This function returns a tick priority. + * @retval tick priority + */ +uint32_t HAL_GetTickPrio(void) +{ + 80019bc: b480 push {r7} + 80019be: af00 add r7, sp, #0 + return uwTickPrio; + 80019c0: 4b03 ldr r3, [pc, #12] @ (80019d0 ) + 80019c2: 681b ldr r3, [r3, #0] +} + 80019c4: 4618 mov r0, r3 + 80019c6: 46bd mov sp, r7 + 80019c8: f85d 7b04 ldr.w r7, [sp], #4 + 80019cc: 4770 bx lr + 80019ce: bf00 nop + 80019d0: 2000000c .word 0x2000000c + +080019d4 : + * @brief Return tick frequency. + * @retval Tick frequency. + * Value of @ref HAL_TickFreqTypeDef. + */ +HAL_TickFreqTypeDef HAL_GetTickFreq(void) +{ + 80019d4: b480 push {r7} + 80019d6: af00 add r7, sp, #0 + return uwTickFreq; + 80019d8: 4b03 ldr r3, [pc, #12] @ (80019e8 ) + 80019da: 781b ldrb r3, [r3, #0] +} + 80019dc: 4618 mov r0, r3 + 80019de: 46bd mov sp, r7 + 80019e0: f85d 7b04 ldr.w r7, [sp], #4 + 80019e4: 4770 bx lr + 80019e6: bf00 nop + 80019e8: 20000010 .word 0x20000010 + +080019ec <__NVIC_SetPriorityGrouping>: + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + 80019ec: b480 push {r7} + 80019ee: b085 sub sp, #20 + 80019f0: af00 add r7, sp, #0 + 80019f2: 6078 str r0, [r7, #4] + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + 80019f4: 687b ldr r3, [r7, #4] + 80019f6: f003 0307 and.w r3, r3, #7 + 80019fa: 60fb str r3, [r7, #12] + + reg_value = SCB->AIRCR; /* read old register configuration */ + 80019fc: 4b0c ldr r3, [pc, #48] @ (8001a30 <__NVIC_SetPriorityGrouping+0x44>) + 80019fe: 68db ldr r3, [r3, #12] + 8001a00: 60bb str r3, [r7, #8] + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + 8001a02: 68ba ldr r2, [r7, #8] + 8001a04: f64f 03ff movw r3, #63743 @ 0xf8ff + 8001a08: 4013 ands r3, r2 + 8001a0a: 60bb str r3, [r7, #8] + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + 8001a0c: 68fb ldr r3, [r7, #12] + 8001a0e: 021a lsls r2, r3, #8 + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + 8001a10: 68bb ldr r3, [r7, #8] + 8001a12: 4313 orrs r3, r2 + reg_value = (reg_value | + 8001a14: f043 63bf orr.w r3, r3, #100139008 @ 0x5f80000 + 8001a18: f443 3300 orr.w r3, r3, #131072 @ 0x20000 + 8001a1c: 60bb str r3, [r7, #8] + SCB->AIRCR = reg_value; + 8001a1e: 4a04 ldr r2, [pc, #16] @ (8001a30 <__NVIC_SetPriorityGrouping+0x44>) + 8001a20: 68bb ldr r3, [r7, #8] + 8001a22: 60d3 str r3, [r2, #12] +} + 8001a24: bf00 nop + 8001a26: 3714 adds r7, #20 + 8001a28: 46bd mov sp, r7 + 8001a2a: f85d 7b04 ldr.w r7, [sp], #4 + 8001a2e: 4770 bx lr + 8001a30: e000ed00 .word 0xe000ed00 + +08001a34 <__NVIC_GetPriorityGrouping>: + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + 8001a34: b480 push {r7} + 8001a36: af00 add r7, sp, #0 + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); + 8001a38: 4b04 ldr r3, [pc, #16] @ (8001a4c <__NVIC_GetPriorityGrouping+0x18>) + 8001a3a: 68db ldr r3, [r3, #12] + 8001a3c: 0a1b lsrs r3, r3, #8 + 8001a3e: f003 0307 and.w r3, r3, #7 +} + 8001a42: 4618 mov r0, r3 + 8001a44: 46bd mov sp, r7 + 8001a46: f85d 7b04 ldr.w r7, [sp], #4 + 8001a4a: 4770 bx lr + 8001a4c: e000ed00 .word 0xe000ed00 + +08001a50 <__NVIC_EnableIRQ>: + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + 8001a50: b480 push {r7} + 8001a52: b083 sub sp, #12 + 8001a54: af00 add r7, sp, #0 + 8001a56: 4603 mov r3, r0 + 8001a58: 71fb strb r3, [r7, #7] + if ((int32_t)(IRQn) >= 0) + 8001a5a: f997 3007 ldrsb.w r3, [r7, #7] + 8001a5e: 2b00 cmp r3, #0 + 8001a60: db0b blt.n 8001a7a <__NVIC_EnableIRQ+0x2a> + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + 8001a62: 79fb ldrb r3, [r7, #7] + 8001a64: f003 021f and.w r2, r3, #31 + 8001a68: 4907 ldr r1, [pc, #28] @ (8001a88 <__NVIC_EnableIRQ+0x38>) + 8001a6a: f997 3007 ldrsb.w r3, [r7, #7] + 8001a6e: 095b lsrs r3, r3, #5 + 8001a70: 2001 movs r0, #1 + 8001a72: fa00 f202 lsl.w r2, r0, r2 + 8001a76: f841 2023 str.w r2, [r1, r3, lsl #2] + __COMPILER_BARRIER(); + } +} + 8001a7a: bf00 nop + 8001a7c: 370c adds r7, #12 + 8001a7e: 46bd mov sp, r7 + 8001a80: f85d 7b04 ldr.w r7, [sp], #4 + 8001a84: 4770 bx lr + 8001a86: bf00 nop + 8001a88: e000e100 .word 0xe000e100 + +08001a8c <__NVIC_DisableIRQ>: + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + 8001a8c: b480 push {r7} + 8001a8e: b083 sub sp, #12 + 8001a90: af00 add r7, sp, #0 + 8001a92: 4603 mov r3, r0 + 8001a94: 71fb strb r3, [r7, #7] + if ((int32_t)(IRQn) >= 0) + 8001a96: f997 3007 ldrsb.w r3, [r7, #7] + 8001a9a: 2b00 cmp r3, #0 + 8001a9c: db12 blt.n 8001ac4 <__NVIC_DisableIRQ+0x38> + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + 8001a9e: 79fb ldrb r3, [r7, #7] + 8001aa0: f003 021f and.w r2, r3, #31 + 8001aa4: 490a ldr r1, [pc, #40] @ (8001ad0 <__NVIC_DisableIRQ+0x44>) + 8001aa6: f997 3007 ldrsb.w r3, [r7, #7] + 8001aaa: 095b lsrs r3, r3, #5 + 8001aac: 2001 movs r0, #1 + 8001aae: fa00 f202 lsl.w r2, r0, r2 + 8001ab2: 3320 adds r3, #32 + 8001ab4: f841 2023 str.w r2, [r1, r3, lsl #2] + __ASM volatile ("dsb 0xF":::"memory"); + 8001ab8: f3bf 8f4f dsb sy +} + 8001abc: bf00 nop + __ASM volatile ("isb 0xF":::"memory"); + 8001abe: f3bf 8f6f isb sy +} + 8001ac2: bf00 nop + __DSB(); + __ISB(); + } +} + 8001ac4: bf00 nop + 8001ac6: 370c adds r7, #12 + 8001ac8: 46bd mov sp, r7 + 8001aca: f85d 7b04 ldr.w r7, [sp], #4 + 8001ace: 4770 bx lr + 8001ad0: e000e100 .word 0xe000e100 + +08001ad4 <__NVIC_SetPendingIRQ>: + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + 8001ad4: b480 push {r7} + 8001ad6: b083 sub sp, #12 + 8001ad8: af00 add r7, sp, #0 + 8001ada: 4603 mov r3, r0 + 8001adc: 71fb strb r3, [r7, #7] + if ((int32_t)(IRQn) >= 0) + 8001ade: f997 3007 ldrsb.w r3, [r7, #7] + 8001ae2: 2b00 cmp r3, #0 + 8001ae4: db0c blt.n 8001b00 <__NVIC_SetPendingIRQ+0x2c> + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + 8001ae6: 79fb ldrb r3, [r7, #7] + 8001ae8: f003 021f and.w r2, r3, #31 + 8001aec: 4907 ldr r1, [pc, #28] @ (8001b0c <__NVIC_SetPendingIRQ+0x38>) + 8001aee: f997 3007 ldrsb.w r3, [r7, #7] + 8001af2: 095b lsrs r3, r3, #5 + 8001af4: 2001 movs r0, #1 + 8001af6: fa00 f202 lsl.w r2, r0, r2 + 8001afa: 3340 adds r3, #64 @ 0x40 + 8001afc: f841 2023 str.w r2, [r1, r3, lsl #2] + } +} + 8001b00: bf00 nop + 8001b02: 370c adds r7, #12 + 8001b04: 46bd mov sp, r7 + 8001b06: f85d 7b04 ldr.w r7, [sp], #4 + 8001b0a: 4770 bx lr + 8001b0c: e000e100 .word 0xe000e100 + +08001b10 <__NVIC_ClearPendingIRQ>: + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + 8001b10: b480 push {r7} + 8001b12: b083 sub sp, #12 + 8001b14: af00 add r7, sp, #0 + 8001b16: 4603 mov r3, r0 + 8001b18: 71fb strb r3, [r7, #7] + if ((int32_t)(IRQn) >= 0) + 8001b1a: f997 3007 ldrsb.w r3, [r7, #7] + 8001b1e: 2b00 cmp r3, #0 + 8001b20: db0c blt.n 8001b3c <__NVIC_ClearPendingIRQ+0x2c> + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + 8001b22: 79fb ldrb r3, [r7, #7] + 8001b24: f003 021f and.w r2, r3, #31 + 8001b28: 4907 ldr r1, [pc, #28] @ (8001b48 <__NVIC_ClearPendingIRQ+0x38>) + 8001b2a: f997 3007 ldrsb.w r3, [r7, #7] + 8001b2e: 095b lsrs r3, r3, #5 + 8001b30: 2001 movs r0, #1 + 8001b32: fa00 f202 lsl.w r2, r0, r2 + 8001b36: 3360 adds r3, #96 @ 0x60 + 8001b38: f841 2023 str.w r2, [r1, r3, lsl #2] + } +} + 8001b3c: bf00 nop + 8001b3e: 370c adds r7, #12 + 8001b40: 46bd mov sp, r7 + 8001b42: f85d 7b04 ldr.w r7, [sp], #4 + 8001b46: 4770 bx lr + 8001b48: e000e100 .word 0xe000e100 + +08001b4c <__NVIC_SetPriority>: + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + 8001b4c: b480 push {r7} + 8001b4e: b083 sub sp, #12 + 8001b50: af00 add r7, sp, #0 + 8001b52: 4603 mov r3, r0 + 8001b54: 6039 str r1, [r7, #0] + 8001b56: 71fb strb r3, [r7, #7] + if ((int32_t)(IRQn) >= 0) + 8001b58: f997 3007 ldrsb.w r3, [r7, #7] + 8001b5c: 2b00 cmp r3, #0 + 8001b5e: db0a blt.n 8001b76 <__NVIC_SetPriority+0x2a> + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + 8001b60: 683b ldr r3, [r7, #0] + 8001b62: b2da uxtb r2, r3 + 8001b64: 490c ldr r1, [pc, #48] @ (8001b98 <__NVIC_SetPriority+0x4c>) + 8001b66: f997 3007 ldrsb.w r3, [r7, #7] + 8001b6a: 0112 lsls r2, r2, #4 + 8001b6c: b2d2 uxtb r2, r2 + 8001b6e: 440b add r3, r1 + 8001b70: f883 2300 strb.w r2, [r3, #768] @ 0x300 + } + else + { + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + 8001b74: e00a b.n 8001b8c <__NVIC_SetPriority+0x40> + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + 8001b76: 683b ldr r3, [r7, #0] + 8001b78: b2da uxtb r2, r3 + 8001b7a: 4908 ldr r1, [pc, #32] @ (8001b9c <__NVIC_SetPriority+0x50>) + 8001b7c: 79fb ldrb r3, [r7, #7] + 8001b7e: f003 030f and.w r3, r3, #15 + 8001b82: 3b04 subs r3, #4 + 8001b84: 0112 lsls r2, r2, #4 + 8001b86: b2d2 uxtb r2, r2 + 8001b88: 440b add r3, r1 + 8001b8a: 761a strb r2, [r3, #24] +} + 8001b8c: bf00 nop + 8001b8e: 370c adds r7, #12 + 8001b90: 46bd mov sp, r7 + 8001b92: f85d 7b04 ldr.w r7, [sp], #4 + 8001b96: 4770 bx lr + 8001b98: e000e100 .word 0xe000e100 + 8001b9c: e000ed00 .word 0xe000ed00 + +08001ba0 : + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + 8001ba0: b480 push {r7} + 8001ba2: b089 sub sp, #36 @ 0x24 + 8001ba4: af00 add r7, sp, #0 + 8001ba6: 60f8 str r0, [r7, #12] + 8001ba8: 60b9 str r1, [r7, #8] + 8001baa: 607a str r2, [r7, #4] + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + 8001bac: 68fb ldr r3, [r7, #12] + 8001bae: f003 0307 and.w r3, r3, #7 + 8001bb2: 61fb str r3, [r7, #28] + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + 8001bb4: 69fb ldr r3, [r7, #28] + 8001bb6: f1c3 0307 rsb r3, r3, #7 + 8001bba: 2b04 cmp r3, #4 + 8001bbc: bf28 it cs + 8001bbe: 2304 movcs r3, #4 + 8001bc0: 61bb str r3, [r7, #24] + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + 8001bc2: 69fb ldr r3, [r7, #28] + 8001bc4: 3304 adds r3, #4 + 8001bc6: 2b06 cmp r3, #6 + 8001bc8: d902 bls.n 8001bd0 + 8001bca: 69fb ldr r3, [r7, #28] + 8001bcc: 3b03 subs r3, #3 + 8001bce: e000 b.n 8001bd2 + 8001bd0: 2300 movs r3, #0 + 8001bd2: 617b str r3, [r7, #20] + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + 8001bd4: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff + 8001bd8: 69bb ldr r3, [r7, #24] + 8001bda: fa02 f303 lsl.w r3, r2, r3 + 8001bde: 43da mvns r2, r3 + 8001be0: 68bb ldr r3, [r7, #8] + 8001be2: 401a ands r2, r3 + 8001be4: 697b ldr r3, [r7, #20] + 8001be6: 409a lsls r2, r3 + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + 8001be8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff + 8001bec: 697b ldr r3, [r7, #20] + 8001bee: fa01 f303 lsl.w r3, r1, r3 + 8001bf2: 43d9 mvns r1, r3 + 8001bf4: 687b ldr r3, [r7, #4] + 8001bf6: 400b ands r3, r1 + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + 8001bf8: 4313 orrs r3, r2 + ); +} + 8001bfa: 4618 mov r0, r3 + 8001bfc: 3724 adds r7, #36 @ 0x24 + 8001bfe: 46bd mov sp, r7 + 8001c00: f85d 7b04 ldr.w r7, [sp], #4 + 8001c04: 4770 bx lr + ... + +08001c08 : + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + 8001c08: b580 push {r7, lr} + 8001c0a: b082 sub sp, #8 + 8001c0c: af00 add r7, sp, #0 + 8001c0e: 6078 str r0, [r7, #4] + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + 8001c10: 687b ldr r3, [r7, #4] + 8001c12: 3b01 subs r3, #1 + 8001c14: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 + 8001c18: d301 bcc.n 8001c1e + { + return (1UL); /* Reload value impossible */ + 8001c1a: 2301 movs r3, #1 + 8001c1c: e00f b.n 8001c3e + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + 8001c1e: 4a0a ldr r2, [pc, #40] @ (8001c48 ) + 8001c20: 687b ldr r3, [r7, #4] + 8001c22: 3b01 subs r3, #1 + 8001c24: 6053 str r3, [r2, #4] + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + 8001c26: 210f movs r1, #15 + 8001c28: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff + 8001c2c: f7ff ff8e bl 8001b4c <__NVIC_SetPriority> + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + 8001c30: 4b05 ldr r3, [pc, #20] @ (8001c48 ) + 8001c32: 2200 movs r2, #0 + 8001c34: 609a str r2, [r3, #8] + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + 8001c36: 4b04 ldr r3, [pc, #16] @ (8001c48 ) + 8001c38: 2207 movs r2, #7 + 8001c3a: 601a str r2, [r3, #0] + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ + 8001c3c: 2300 movs r3, #0 +} + 8001c3e: 4618 mov r0, r3 + 8001c40: 3708 adds r7, #8 + 8001c42: 46bd mov sp, r7 + 8001c44: bd80 pop {r7, pc} + 8001c46: bf00 nop + 8001c48: e000e010 .word 0xe000e010 + +08001c4c : + * @note When the NVIC_PriorityGroup_0 is selected, IRQ pre-emption is no more possible. + * The pending IRQ priority will be managed only by the subpriority. + * @retval None + */ +void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + 8001c4c: b580 push {r7, lr} + 8001c4e: b082 sub sp, #8 + 8001c50: af00 add r7, sp, #0 + 8001c52: 6078 str r0, [r7, #4] + /* Check the parameters */ + assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup)); + + /* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */ + NVIC_SetPriorityGrouping(PriorityGroup); + 8001c54: 6878 ldr r0, [r7, #4] + 8001c56: f7ff fec9 bl 80019ec <__NVIC_SetPriorityGrouping> +} + 8001c5a: bf00 nop + 8001c5c: 3708 adds r7, #8 + 8001c5e: 46bd mov sp, r7 + 8001c60: bd80 pop {r7, pc} + +08001c62 : + * This parameter can be a value between 0 and 15 + * A lower priority value indicates a higher priority. + * @retval None + */ +void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority) +{ + 8001c62: b580 push {r7, lr} + 8001c64: b086 sub sp, #24 + 8001c66: af00 add r7, sp, #0 + 8001c68: 4603 mov r3, r0 + 8001c6a: 60b9 str r1, [r7, #8] + 8001c6c: 607a str r2, [r7, #4] + 8001c6e: 73fb strb r3, [r7, #15] + + /* Check the parameters */ + assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); + assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); + + prioritygroup = NVIC_GetPriorityGrouping(); + 8001c70: f7ff fee0 bl 8001a34 <__NVIC_GetPriorityGrouping> + 8001c74: 6178 str r0, [r7, #20] + + NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); + 8001c76: 687a ldr r2, [r7, #4] + 8001c78: 68b9 ldr r1, [r7, #8] + 8001c7a: 6978 ldr r0, [r7, #20] + 8001c7c: f7ff ff90 bl 8001ba0 + 8001c80: 4602 mov r2, r0 + 8001c82: f997 300f ldrsb.w r3, [r7, #15] + 8001c86: 4611 mov r1, r2 + 8001c88: 4618 mov r0, r3 + 8001c8a: f7ff ff5f bl 8001b4c <__NVIC_SetPriority> +} + 8001c8e: bf00 nop + 8001c90: 3718 adds r7, #24 + 8001c92: 46bd mov sp, r7 + 8001c94: bd80 pop {r7, pc} + +08001c96 : + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval None + */ +void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) +{ + 8001c96: b580 push {r7, lr} + 8001c98: b082 sub sp, #8 + 8001c9a: af00 add r7, sp, #0 + 8001c9c: 4603 mov r3, r0 + 8001c9e: 71fb strb r3, [r7, #7] + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Enable interrupt */ + NVIC_EnableIRQ(IRQn); + 8001ca0: f997 3007 ldrsb.w r3, [r7, #7] + 8001ca4: 4618 mov r0, r3 + 8001ca6: f7ff fed3 bl 8001a50 <__NVIC_EnableIRQ> +} + 8001caa: bf00 nop + 8001cac: 3708 adds r7, #8 + 8001cae: 46bd mov sp, r7 + 8001cb0: bd80 pop {r7, pc} + +08001cb2 : + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval None + */ +void HAL_NVIC_DisableIRQ(IRQn_Type IRQn) +{ + 8001cb2: b580 push {r7, lr} + 8001cb4: b082 sub sp, #8 + 8001cb6: af00 add r7, sp, #0 + 8001cb8: 4603 mov r3, r0 + 8001cba: 71fb strb r3, [r7, #7] + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Disable interrupt */ + NVIC_DisableIRQ(IRQn); + 8001cbc: f997 3007 ldrsb.w r3, [r7, #7] + 8001cc0: 4618 mov r0, r3 + 8001cc2: f7ff fee3 bl 8001a8c <__NVIC_DisableIRQ> +} + 8001cc6: bf00 nop + 8001cc8: 3708 adds r7, #8 + 8001cca: 46bd mov sp, r7 + 8001ccc: bd80 pop {r7, pc} + +08001cce : + * @param TicksNumb Specifies the ticks Number of ticks between two interrupts. + * @retval status: - 0 Function succeeded. + * - 1 Function failed. + */ +uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb) +{ + 8001cce: b580 push {r7, lr} + 8001cd0: b082 sub sp, #8 + 8001cd2: af00 add r7, sp, #0 + 8001cd4: 6078 str r0, [r7, #4] + return SysTick_Config(TicksNumb); + 8001cd6: 6878 ldr r0, [r7, #4] + 8001cd8: f7ff ff96 bl 8001c08 + 8001cdc: 4603 mov r3, r0 +} + 8001cde: 4618 mov r0, r3 + 8001ce0: 3708 adds r7, #8 + 8001ce2: 46bd mov sp, r7 + 8001ce4: bd80 pop {r7, pc} + +08001ce6 : + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval None + */ +void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + 8001ce6: b580 push {r7, lr} + 8001ce8: b082 sub sp, #8 + 8001cea: af00 add r7, sp, #0 + 8001cec: 4603 mov r3, r0 + 8001cee: 71fb strb r3, [r7, #7] + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Set interrupt pending */ + NVIC_SetPendingIRQ(IRQn); + 8001cf0: f997 3007 ldrsb.w r3, [r7, #7] + 8001cf4: 4618 mov r0, r3 + 8001cf6: f7ff feed bl 8001ad4 <__NVIC_SetPendingIRQ> +} + 8001cfa: bf00 nop + 8001cfc: 3708 adds r7, #8 + 8001cfe: 46bd mov sp, r7 + 8001d00: bd80 pop {r7, pc} + +08001d02 : + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval None + */ +void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + 8001d02: b580 push {r7, lr} + 8001d04: b082 sub sp, #8 + 8001d06: af00 add r7, sp, #0 + 8001d08: 4603 mov r3, r0 + 8001d0a: 71fb strb r3, [r7, #7] + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Clear pending interrupt */ + NVIC_ClearPendingIRQ(IRQn); + 8001d0c: f997 3007 ldrsb.w r3, [r7, #7] + 8001d10: 4618 mov r0, r3 + 8001d12: f7ff fefd bl 8001b10 <__NVIC_ClearPendingIRQ> +} + 8001d16: bf00 nop + 8001d18: 3708 adds r7, #8 + 8001d1a: 46bd mov sp, r7 + 8001d1c: bd80 pop {r7, pc} + ... + +08001d20 : + * @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains + * the configuration information for the specified GPIO peripheral. + * @retval None + */ +void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init) +{ + 8001d20: b480 push {r7} + 8001d22: b087 sub sp, #28 + 8001d24: af00 add r7, sp, #0 + 8001d26: 6078 str r0, [r7, #4] + 8001d28: 6039 str r1, [r7, #0] + uint32_t position = 0x00u; + 8001d2a: 2300 movs r3, #0 + 8001d2c: 617b str r3, [r7, #20] + assert_param(IS_GPIO_PIN(GPIO_Init->Pin)); + assert_param(IS_GPIO_MODE(GPIO_Init->Mode)); + assert_param(IS_GPIO_PULL(GPIO_Init->Pull)); + + /* Configure the port pins */ + while (((GPIO_Init->Pin) >> position) != 0x00u) + 8001d2e: e14c b.n 8001fca + { + /* Get current io position */ + iocurrent = (GPIO_Init->Pin) & (1uL << position); + 8001d30: 683b ldr r3, [r7, #0] + 8001d32: 681a ldr r2, [r3, #0] + 8001d34: 2101 movs r1, #1 + 8001d36: 697b ldr r3, [r7, #20] + 8001d38: fa01 f303 lsl.w r3, r1, r3 + 8001d3c: 4013 ands r3, r2 + 8001d3e: 60fb str r3, [r7, #12] + + if (iocurrent != 0x00u) + 8001d40: 68fb ldr r3, [r7, #12] + 8001d42: 2b00 cmp r3, #0 + 8001d44: f000 813e beq.w 8001fc4 + { + /*--------------------- GPIO Mode Configuration ------------------------*/ + /* In case of Output or Alternate function mode selection */ + if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)) + 8001d48: 683b ldr r3, [r7, #0] + 8001d4a: 685b ldr r3, [r3, #4] + 8001d4c: f003 0303 and.w r3, r3, #3 + 8001d50: 2b01 cmp r3, #1 + 8001d52: d005 beq.n 8001d60 + 8001d54: 683b ldr r3, [r7, #0] + 8001d56: 685b ldr r3, [r3, #4] + 8001d58: f003 0303 and.w r3, r3, #3 + 8001d5c: 2b02 cmp r3, #2 + 8001d5e: d130 bne.n 8001dc2 + { + /* Check the Speed parameter */ + assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); + /* Configure the IO Speed */ + temp = GPIOx->OSPEEDR; + 8001d60: 687b ldr r3, [r7, #4] + 8001d62: 689b ldr r3, [r3, #8] + 8001d64: 613b str r3, [r7, #16] + temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2u)); + 8001d66: 697b ldr r3, [r7, #20] + 8001d68: 005b lsls r3, r3, #1 + 8001d6a: 2203 movs r2, #3 + 8001d6c: fa02 f303 lsl.w r3, r2, r3 + 8001d70: 43db mvns r3, r3 + 8001d72: 693a ldr r2, [r7, #16] + 8001d74: 4013 ands r3, r2 + 8001d76: 613b str r3, [r7, #16] + temp |= (GPIO_Init->Speed << (position * 2u)); + 8001d78: 683b ldr r3, [r7, #0] + 8001d7a: 68da ldr r2, [r3, #12] + 8001d7c: 697b ldr r3, [r7, #20] + 8001d7e: 005b lsls r3, r3, #1 + 8001d80: fa02 f303 lsl.w r3, r2, r3 + 8001d84: 693a ldr r2, [r7, #16] + 8001d86: 4313 orrs r3, r2 + 8001d88: 613b str r3, [r7, #16] + GPIOx->OSPEEDR = temp; + 8001d8a: 687b ldr r3, [r7, #4] + 8001d8c: 693a ldr r2, [r7, #16] + 8001d8e: 609a str r2, [r3, #8] + + /* Configure the IO Output Type */ + temp = GPIOx->OTYPER; + 8001d90: 687b ldr r3, [r7, #4] + 8001d92: 685b ldr r3, [r3, #4] + 8001d94: 613b str r3, [r7, #16] + temp &= ~(GPIO_OTYPER_OT0 << position) ; + 8001d96: 2201 movs r2, #1 + 8001d98: 697b ldr r3, [r7, #20] + 8001d9a: fa02 f303 lsl.w r3, r2, r3 + 8001d9e: 43db mvns r3, r3 + 8001da0: 693a ldr r2, [r7, #16] + 8001da2: 4013 ands r3, r2 + 8001da4: 613b str r3, [r7, #16] + temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); + 8001da6: 683b ldr r3, [r7, #0] + 8001da8: 685b ldr r3, [r3, #4] + 8001daa: 091b lsrs r3, r3, #4 + 8001dac: f003 0201 and.w r2, r3, #1 + 8001db0: 697b ldr r3, [r7, #20] + 8001db2: fa02 f303 lsl.w r3, r2, r3 + 8001db6: 693a ldr r2, [r7, #16] + 8001db8: 4313 orrs r3, r2 + 8001dba: 613b str r3, [r7, #16] + GPIOx->OTYPER = temp; + 8001dbc: 687b ldr r3, [r7, #4] + 8001dbe: 693a ldr r2, [r7, #16] + 8001dc0: 605a str r2, [r3, #4] + } + + /* Activate the Pull-up or Pull down resistor for the current IO */ + if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) + 8001dc2: 683b ldr r3, [r7, #0] + 8001dc4: 685b ldr r3, [r3, #4] + 8001dc6: f003 0303 and.w r3, r3, #3 + 8001dca: 2b03 cmp r3, #3 + 8001dcc: d017 beq.n 8001dfe + { + temp = GPIOx->PUPDR; + 8001dce: 687b ldr r3, [r7, #4] + 8001dd0: 68db ldr r3, [r3, #12] + 8001dd2: 613b str r3, [r7, #16] + temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U)); + 8001dd4: 697b ldr r3, [r7, #20] + 8001dd6: 005b lsls r3, r3, #1 + 8001dd8: 2203 movs r2, #3 + 8001dda: fa02 f303 lsl.w r3, r2, r3 + 8001dde: 43db mvns r3, r3 + 8001de0: 693a ldr r2, [r7, #16] + 8001de2: 4013 ands r3, r2 + 8001de4: 613b str r3, [r7, #16] + temp |= ((GPIO_Init->Pull) << (position * 2U)); + 8001de6: 683b ldr r3, [r7, #0] + 8001de8: 689a ldr r2, [r3, #8] + 8001dea: 697b ldr r3, [r7, #20] + 8001dec: 005b lsls r3, r3, #1 + 8001dee: fa02 f303 lsl.w r3, r2, r3 + 8001df2: 693a ldr r2, [r7, #16] + 8001df4: 4313 orrs r3, r2 + 8001df6: 613b str r3, [r7, #16] + GPIOx->PUPDR = temp; + 8001df8: 687b ldr r3, [r7, #4] + 8001dfa: 693a ldr r2, [r7, #16] + 8001dfc: 60da str r2, [r3, #12] + } + + /* In case of Alternate function mode selection */ + if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) + 8001dfe: 683b ldr r3, [r7, #0] + 8001e00: 685b ldr r3, [r3, #4] + 8001e02: f003 0303 and.w r3, r3, #3 + 8001e06: 2b02 cmp r3, #2 + 8001e08: d123 bne.n 8001e52 + /* Check the Alternate function parameters */ + assert_param(IS_GPIO_AF_INSTANCE(GPIOx)); + assert_param(IS_GPIO_AF(GPIO_Init->Alternate)); + + /* Configure Alternate function mapped with the current IO */ + temp = GPIOx->AFR[position >> 3u]; + 8001e0a: 697b ldr r3, [r7, #20] + 8001e0c: 08da lsrs r2, r3, #3 + 8001e0e: 687b ldr r3, [r7, #4] + 8001e10: 3208 adds r2, #8 + 8001e12: f853 3022 ldr.w r3, [r3, r2, lsl #2] + 8001e16: 613b str r3, [r7, #16] + temp &= ~(0xFu << ((position & 0x07u) * 4u)); + 8001e18: 697b ldr r3, [r7, #20] + 8001e1a: f003 0307 and.w r3, r3, #7 + 8001e1e: 009b lsls r3, r3, #2 + 8001e20: 220f movs r2, #15 + 8001e22: fa02 f303 lsl.w r3, r2, r3 + 8001e26: 43db mvns r3, r3 + 8001e28: 693a ldr r2, [r7, #16] + 8001e2a: 4013 ands r3, r2 + 8001e2c: 613b str r3, [r7, #16] + temp |= ((GPIO_Init->Alternate) << ((position & 0x07u) * 4u)); + 8001e2e: 683b ldr r3, [r7, #0] + 8001e30: 691a ldr r2, [r3, #16] + 8001e32: 697b ldr r3, [r7, #20] + 8001e34: f003 0307 and.w r3, r3, #7 + 8001e38: 009b lsls r3, r3, #2 + 8001e3a: fa02 f303 lsl.w r3, r2, r3 + 8001e3e: 693a ldr r2, [r7, #16] + 8001e40: 4313 orrs r3, r2 + 8001e42: 613b str r3, [r7, #16] + GPIOx->AFR[position >> 3u] = temp; + 8001e44: 697b ldr r3, [r7, #20] + 8001e46: 08da lsrs r2, r3, #3 + 8001e48: 687b ldr r3, [r7, #4] + 8001e4a: 3208 adds r2, #8 + 8001e4c: 6939 ldr r1, [r7, #16] + 8001e4e: f843 1022 str.w r1, [r3, r2, lsl #2] + } + + /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ + temp = GPIOx->MODER; + 8001e52: 687b ldr r3, [r7, #4] + 8001e54: 681b ldr r3, [r3, #0] + 8001e56: 613b str r3, [r7, #16] + temp &= ~(GPIO_MODER_MODE0 << (position * 2u)); + 8001e58: 697b ldr r3, [r7, #20] + 8001e5a: 005b lsls r3, r3, #1 + 8001e5c: 2203 movs r2, #3 + 8001e5e: fa02 f303 lsl.w r3, r2, r3 + 8001e62: 43db mvns r3, r3 + 8001e64: 693a ldr r2, [r7, #16] + 8001e66: 4013 ands r3, r2 + 8001e68: 613b str r3, [r7, #16] + temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2u)); + 8001e6a: 683b ldr r3, [r7, #0] + 8001e6c: 685b ldr r3, [r3, #4] + 8001e6e: f003 0203 and.w r2, r3, #3 + 8001e72: 697b ldr r3, [r7, #20] + 8001e74: 005b lsls r3, r3, #1 + 8001e76: fa02 f303 lsl.w r3, r2, r3 + 8001e7a: 693a ldr r2, [r7, #16] + 8001e7c: 4313 orrs r3, r2 + 8001e7e: 613b str r3, [r7, #16] + GPIOx->MODER = temp; + 8001e80: 687b ldr r3, [r7, #4] + 8001e82: 693a ldr r2, [r7, #16] + 8001e84: 601a str r2, [r3, #0] + + /*--------------------- EXTI Mode Configuration ------------------------*/ + /* Configure the External Interrupt or event for the current IO */ + if ((GPIO_Init->Mode & EXTI_MODE) != 0x00u) + 8001e86: 683b ldr r3, [r7, #0] + 8001e88: 685b ldr r3, [r3, #4] + 8001e8a: f403 3340 and.w r3, r3, #196608 @ 0x30000 + 8001e8e: 2b00 cmp r3, #0 + 8001e90: f000 8098 beq.w 8001fc4 + { + temp = SYSCFG->EXTICR[position >> 2u]; + 8001e94: 4a54 ldr r2, [pc, #336] @ (8001fe8 ) + 8001e96: 697b ldr r3, [r7, #20] + 8001e98: 089b lsrs r3, r3, #2 + 8001e9a: 3302 adds r3, #2 + 8001e9c: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 8001ea0: 613b str r3, [r7, #16] + temp &= ~(0x0FuL << (4u * (position & 0x03u))); + 8001ea2: 697b ldr r3, [r7, #20] + 8001ea4: f003 0303 and.w r3, r3, #3 + 8001ea8: 009b lsls r3, r3, #2 + 8001eaa: 220f movs r2, #15 + 8001eac: fa02 f303 lsl.w r3, r2, r3 + 8001eb0: 43db mvns r3, r3 + 8001eb2: 693a ldr r2, [r7, #16] + 8001eb4: 4013 ands r3, r2 + 8001eb6: 613b str r3, [r7, #16] + temp |= (GPIO_GET_INDEX(GPIOx) << (4u * (position & 0x03u))); + 8001eb8: 687b ldr r3, [r7, #4] + 8001eba: f1b3 4f90 cmp.w r3, #1207959552 @ 0x48000000 + 8001ebe: d019 beq.n 8001ef4 + 8001ec0: 687b ldr r3, [r7, #4] + 8001ec2: 4a4a ldr r2, [pc, #296] @ (8001fec ) + 8001ec4: 4293 cmp r3, r2 + 8001ec6: d013 beq.n 8001ef0 + 8001ec8: 687b ldr r3, [r7, #4] + 8001eca: 4a49 ldr r2, [pc, #292] @ (8001ff0 ) + 8001ecc: 4293 cmp r3, r2 + 8001ece: d00d beq.n 8001eec + 8001ed0: 687b ldr r3, [r7, #4] + 8001ed2: 4a48 ldr r2, [pc, #288] @ (8001ff4 ) + 8001ed4: 4293 cmp r3, r2 + 8001ed6: d007 beq.n 8001ee8 + 8001ed8: 687b ldr r3, [r7, #4] + 8001eda: 4a47 ldr r2, [pc, #284] @ (8001ff8 ) + 8001edc: 4293 cmp r3, r2 + 8001ede: d101 bne.n 8001ee4 + 8001ee0: 2304 movs r3, #4 + 8001ee2: e008 b.n 8001ef6 + 8001ee4: 2307 movs r3, #7 + 8001ee6: e006 b.n 8001ef6 + 8001ee8: 2303 movs r3, #3 + 8001eea: e004 b.n 8001ef6 + 8001eec: 2302 movs r3, #2 + 8001eee: e002 b.n 8001ef6 + 8001ef0: 2301 movs r3, #1 + 8001ef2: e000 b.n 8001ef6 + 8001ef4: 2300 movs r3, #0 + 8001ef6: 697a ldr r2, [r7, #20] + 8001ef8: f002 0203 and.w r2, r2, #3 + 8001efc: 0092 lsls r2, r2, #2 + 8001efe: 4093 lsls r3, r2 + 8001f00: 693a ldr r2, [r7, #16] + 8001f02: 4313 orrs r3, r2 + 8001f04: 613b str r3, [r7, #16] + SYSCFG->EXTICR[position >> 2u] = temp; + 8001f06: 4938 ldr r1, [pc, #224] @ (8001fe8 ) + 8001f08: 697b ldr r3, [r7, #20] + 8001f0a: 089b lsrs r3, r3, #2 + 8001f0c: 3302 adds r3, #2 + 8001f0e: 693a ldr r2, [r7, #16] + 8001f10: f841 2023 str.w r2, [r1, r3, lsl #2] + + /* Clear Rising Falling edge configuration */ + temp = EXTI->RTSR1; + 8001f14: 4b39 ldr r3, [pc, #228] @ (8001ffc ) + 8001f16: 681b ldr r3, [r3, #0] + 8001f18: 613b str r3, [r7, #16] + temp &= ~(iocurrent); + 8001f1a: 68fb ldr r3, [r7, #12] + 8001f1c: 43db mvns r3, r3 + 8001f1e: 693a ldr r2, [r7, #16] + 8001f20: 4013 ands r3, r2 + 8001f22: 613b str r3, [r7, #16] + if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00u) + 8001f24: 683b ldr r3, [r7, #0] + 8001f26: 685b ldr r3, [r3, #4] + 8001f28: f403 1380 and.w r3, r3, #1048576 @ 0x100000 + 8001f2c: 2b00 cmp r3, #0 + 8001f2e: d003 beq.n 8001f38 + { + temp |= iocurrent; + 8001f30: 693a ldr r2, [r7, #16] + 8001f32: 68fb ldr r3, [r7, #12] + 8001f34: 4313 orrs r3, r2 + 8001f36: 613b str r3, [r7, #16] + } + EXTI->RTSR1 = temp; + 8001f38: 4a30 ldr r2, [pc, #192] @ (8001ffc ) + 8001f3a: 693b ldr r3, [r7, #16] + 8001f3c: 6013 str r3, [r2, #0] + + temp = EXTI->FTSR1; + 8001f3e: 4b2f ldr r3, [pc, #188] @ (8001ffc ) + 8001f40: 685b ldr r3, [r3, #4] + 8001f42: 613b str r3, [r7, #16] + temp &= ~(iocurrent); + 8001f44: 68fb ldr r3, [r7, #12] + 8001f46: 43db mvns r3, r3 + 8001f48: 693a ldr r2, [r7, #16] + 8001f4a: 4013 ands r3, r2 + 8001f4c: 613b str r3, [r7, #16] + if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00u) + 8001f4e: 683b ldr r3, [r7, #0] + 8001f50: 685b ldr r3, [r3, #4] + 8001f52: f403 1300 and.w r3, r3, #2097152 @ 0x200000 + 8001f56: 2b00 cmp r3, #0 + 8001f58: d003 beq.n 8001f62 + { + temp |= iocurrent; + 8001f5a: 693a ldr r2, [r7, #16] + 8001f5c: 68fb ldr r3, [r7, #12] + 8001f5e: 4313 orrs r3, r2 + 8001f60: 613b str r3, [r7, #16] + } + EXTI->FTSR1 = temp; + 8001f62: 4a26 ldr r2, [pc, #152] @ (8001ffc ) + 8001f64: 693b ldr r3, [r7, #16] + 8001f66: 6053 str r3, [r2, #4] + + /* Clear EXTI line configuration */ + temp = EXTI->IMR1; + 8001f68: 4b24 ldr r3, [pc, #144] @ (8001ffc ) + 8001f6a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 + 8001f6e: 613b str r3, [r7, #16] + temp &= ~(iocurrent); + 8001f70: 68fb ldr r3, [r7, #12] + 8001f72: 43db mvns r3, r3 + 8001f74: 693a ldr r2, [r7, #16] + 8001f76: 4013 ands r3, r2 + 8001f78: 613b str r3, [r7, #16] + if ((GPIO_Init->Mode & EXTI_IT) != 0x00u) + 8001f7a: 683b ldr r3, [r7, #0] + 8001f7c: 685b ldr r3, [r3, #4] + 8001f7e: f403 3380 and.w r3, r3, #65536 @ 0x10000 + 8001f82: 2b00 cmp r3, #0 + 8001f84: d003 beq.n 8001f8e + { + temp |= iocurrent; + 8001f86: 693a ldr r2, [r7, #16] + 8001f88: 68fb ldr r3, [r7, #12] + 8001f8a: 4313 orrs r3, r2 + 8001f8c: 613b str r3, [r7, #16] + } + EXTI->IMR1 = temp; + 8001f8e: 4a1b ldr r2, [pc, #108] @ (8001ffc ) + 8001f90: 693b ldr r3, [r7, #16] + 8001f92: f8c2 3080 str.w r3, [r2, #128] @ 0x80 + + temp = EXTI->EMR1; + 8001f96: 4b19 ldr r3, [pc, #100] @ (8001ffc ) + 8001f98: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 + 8001f9c: 613b str r3, [r7, #16] + temp &= ~(iocurrent); + 8001f9e: 68fb ldr r3, [r7, #12] + 8001fa0: 43db mvns r3, r3 + 8001fa2: 693a ldr r2, [r7, #16] + 8001fa4: 4013 ands r3, r2 + 8001fa6: 613b str r3, [r7, #16] + if ((GPIO_Init->Mode & EXTI_EVT) != 0x00u) + 8001fa8: 683b ldr r3, [r7, #0] + 8001faa: 685b ldr r3, [r3, #4] + 8001fac: f403 3300 and.w r3, r3, #131072 @ 0x20000 + 8001fb0: 2b00 cmp r3, #0 + 8001fb2: d003 beq.n 8001fbc + { + temp |= iocurrent; + 8001fb4: 693a ldr r2, [r7, #16] + 8001fb6: 68fb ldr r3, [r7, #12] + 8001fb8: 4313 orrs r3, r2 + 8001fba: 613b str r3, [r7, #16] + } + EXTI->EMR1 = temp; + 8001fbc: 4a0f ldr r2, [pc, #60] @ (8001ffc ) + 8001fbe: 693b ldr r3, [r7, #16] + 8001fc0: f8c2 3084 str.w r3, [r2, #132] @ 0x84 + } + } + + position++; + 8001fc4: 697b ldr r3, [r7, #20] + 8001fc6: 3301 adds r3, #1 + 8001fc8: 617b str r3, [r7, #20] + while (((GPIO_Init->Pin) >> position) != 0x00u) + 8001fca: 683b ldr r3, [r7, #0] + 8001fcc: 681a ldr r2, [r3, #0] + 8001fce: 697b ldr r3, [r7, #20] + 8001fd0: fa22 f303 lsr.w r3, r2, r3 + 8001fd4: 2b00 cmp r3, #0 + 8001fd6: f47f aeab bne.w 8001d30 + } +} + 8001fda: bf00 nop + 8001fdc: bf00 nop + 8001fde: 371c adds r7, #28 + 8001fe0: 46bd mov sp, r7 + 8001fe2: f85d 7b04 ldr.w r7, [sp], #4 + 8001fe6: 4770 bx lr + 8001fe8: 40010000 .word 0x40010000 + 8001fec: 48000400 .word 0x48000400 + 8001ff0: 48000800 .word 0x48000800 + 8001ff4: 48000c00 .word 0x48000c00 + 8001ff8: 48001000 .word 0x48001000 + 8001ffc: 58000800 .word 0x58000800 + +08002000 : + * @arg GPIO_PIN_RESET: to clear the port pin + * @arg GPIO_PIN_SET: to set the port pin + * @retval None + */ +void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState) +{ + 8002000: b480 push {r7} + 8002002: b083 sub sp, #12 + 8002004: af00 add r7, sp, #0 + 8002006: 6078 str r0, [r7, #4] + 8002008: 460b mov r3, r1 + 800200a: 807b strh r3, [r7, #2] + 800200c: 4613 mov r3, r2 + 800200e: 707b strb r3, [r7, #1] + /* Check the parameters */ + assert_param(IS_GPIO_PIN(GPIO_Pin)); + assert_param(IS_GPIO_PIN_ACTION(PinState)); + + if (PinState != GPIO_PIN_RESET) + 8002010: 787b ldrb r3, [r7, #1] + 8002012: 2b00 cmp r3, #0 + 8002014: d003 beq.n 800201e + { + GPIOx->BSRR = (uint32_t)GPIO_Pin; + 8002016: 887a ldrh r2, [r7, #2] + 8002018: 687b ldr r3, [r7, #4] + 800201a: 619a str r2, [r3, #24] + } + else + { + GPIOx->BRR = (uint32_t)GPIO_Pin; + } +} + 800201c: e002 b.n 8002024 + GPIOx->BRR = (uint32_t)GPIO_Pin; + 800201e: 887a ldrh r2, [r7, #2] + 8002020: 687b ldr r3, [r7, #4] + 8002022: 629a str r2, [r3, #40] @ 0x28 +} + 8002024: bf00 nop + 8002026: 370c adds r7, #12 + 8002028: 46bd mov sp, r7 + 800202a: f85d 7b04 ldr.w r7, [sp], #4 + 800202e: 4770 bx lr + +08002030 : +/** + * @brief This function handles HSEM interrupt request + * @retval None + */ +void HAL_HSEM_IRQHandler(void) +{ + 8002030: b580 push {r7, lr} + 8002032: b082 sub sp, #8 + 8002034: af00 add r7, sp, #0 + uint32_t statusreg; + /* Get the list of masked freed semaphores*/ + statusreg = HSEM_COMMON->MISR; + 8002036: 4b0a ldr r3, [pc, #40] @ (8002060 ) + 8002038: 68db ldr r3, [r3, #12] + 800203a: 607b str r3, [r7, #4] + + /*Disable Interrupts*/ + HSEM_COMMON->IER &= ~((uint32_t)statusreg); + 800203c: 4b08 ldr r3, [pc, #32] @ (8002060 ) + 800203e: 681a ldr r2, [r3, #0] + 8002040: 687b ldr r3, [r7, #4] + 8002042: 43db mvns r3, r3 + 8002044: 4906 ldr r1, [pc, #24] @ (8002060 ) + 8002046: 4013 ands r3, r2 + 8002048: 600b str r3, [r1, #0] + + /*Clear Flags*/ + HSEM_COMMON->ICR = ((uint32_t)statusreg); + 800204a: 4a05 ldr r2, [pc, #20] @ (8002060 ) + 800204c: 687b ldr r3, [r7, #4] + 800204e: 6053 str r3, [r2, #4] + + /* Call FreeCallback */ + HAL_HSEM_FreeCallback(statusreg); + 8002050: 6878 ldr r0, [r7, #4] + 8002052: f000 f807 bl 8002064 +} + 8002056: bf00 nop + 8002058: 3708 adds r7, #8 + 800205a: 46bd mov sp, r7 + 800205c: bd80 pop {r7, pc} + 800205e: bf00 nop + 8002060: 58001500 .word 0x58001500 + +08002064 : + * @brief Semaphore Released Callback. + * @param SemMask: Mask of Released semaphores + * @retval None + */ +__weak void HAL_HSEM_FreeCallback(uint32_t SemMask) +{ + 8002064: b480 push {r7} + 8002066: b083 sub sp, #12 + 8002068: af00 add r7, sp, #0 + 800206a: 6078 str r0, [r7, #4] + UNUSED(SemMask); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_HSEM_FreeCallback can be implemented in the user file + */ +} + 800206c: bf00 nop + 800206e: 370c adds r7, #12 + 8002070: 46bd mov sp, r7 + 8002072: f85d 7b04 ldr.w r7, [sp], #4 + 8002076: 4770 bx lr + +08002078 : + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Init(I2C_HandleTypeDef *hi2c) +{ + 8002078: b580 push {r7, lr} + 800207a: b082 sub sp, #8 + 800207c: af00 add r7, sp, #0 + 800207e: 6078 str r0, [r7, #4] + /* Check the I2C handle allocation */ + if (hi2c == NULL) + 8002080: 687b ldr r3, [r7, #4] + 8002082: 2b00 cmp r3, #0 + 8002084: d101 bne.n 800208a + { + return HAL_ERROR; + 8002086: 2301 movs r3, #1 + 8002088: e08d b.n 80021a6 + assert_param(IS_I2C_OWN_ADDRESS2(hi2c->Init.OwnAddress2)); + assert_param(IS_I2C_OWN_ADDRESS2_MASK(hi2c->Init.OwnAddress2Masks)); + assert_param(IS_I2C_GENERAL_CALL(hi2c->Init.GeneralCallMode)); + assert_param(IS_I2C_NO_STRETCH(hi2c->Init.NoStretchMode)); + + if (hi2c->State == HAL_I2C_STATE_RESET) + 800208a: 687b ldr r3, [r7, #4] + 800208c: f893 3041 ldrb.w r3, [r3, #65] @ 0x41 + 8002090: b2db uxtb r3, r3 + 8002092: 2b00 cmp r3, #0 + 8002094: d106 bne.n 80020a4 + { + /* Allocate lock resource and initialize it */ + hi2c->Lock = HAL_UNLOCKED; + 8002096: 687b ldr r3, [r7, #4] + 8002098: 2200 movs r2, #0 + 800209a: f883 2040 strb.w r2, [r3, #64] @ 0x40 + + /* Init the low level hardware : GPIO, CLOCK, CORTEX...etc */ + hi2c->MspInitCallback(hi2c); +#else + /* Init the low level hardware : GPIO, CLOCK, CORTEX...etc */ + HAL_I2C_MspInit(hi2c); + 800209e: 6878 ldr r0, [r7, #4] + 80020a0: f7ff faae bl 8001600 +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + + hi2c->State = HAL_I2C_STATE_BUSY; + 80020a4: 687b ldr r3, [r7, #4] + 80020a6: 2224 movs r2, #36 @ 0x24 + 80020a8: f883 2041 strb.w r2, [r3, #65] @ 0x41 + + /* Disable the selected I2C peripheral */ + __HAL_I2C_DISABLE(hi2c); + 80020ac: 687b ldr r3, [r7, #4] + 80020ae: 681b ldr r3, [r3, #0] + 80020b0: 681a ldr r2, [r3, #0] + 80020b2: 687b ldr r3, [r7, #4] + 80020b4: 681b ldr r3, [r3, #0] + 80020b6: f022 0201 bic.w r2, r2, #1 + 80020ba: 601a str r2, [r3, #0] + + /*---------------------------- I2Cx TIMINGR Configuration ------------------*/ + /* Configure I2Cx: Frequency range */ + hi2c->Instance->TIMINGR = hi2c->Init.Timing & TIMING_CLEAR_MASK; + 80020bc: 687b ldr r3, [r7, #4] + 80020be: 685a ldr r2, [r3, #4] + 80020c0: 687b ldr r3, [r7, #4] + 80020c2: 681b ldr r3, [r3, #0] + 80020c4: f022 6270 bic.w r2, r2, #251658240 @ 0xf000000 + 80020c8: 611a str r2, [r3, #16] + + /*---------------------------- I2Cx OAR1 Configuration ---------------------*/ + /* Disable Own Address1 before set the Own Address1 configuration */ + hi2c->Instance->OAR1 &= ~I2C_OAR1_OA1EN; + 80020ca: 687b ldr r3, [r7, #4] + 80020cc: 681b ldr r3, [r3, #0] + 80020ce: 689a ldr r2, [r3, #8] + 80020d0: 687b ldr r3, [r7, #4] + 80020d2: 681b ldr r3, [r3, #0] + 80020d4: f422 4200 bic.w r2, r2, #32768 @ 0x8000 + 80020d8: 609a str r2, [r3, #8] + + /* Configure I2Cx: Own Address1 and ack own address1 mode */ + if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_7BIT) + 80020da: 687b ldr r3, [r7, #4] + 80020dc: 68db ldr r3, [r3, #12] + 80020de: 2b01 cmp r3, #1 + 80020e0: d107 bne.n 80020f2 + { + hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | hi2c->Init.OwnAddress1); + 80020e2: 687b ldr r3, [r7, #4] + 80020e4: 689a ldr r2, [r3, #8] + 80020e6: 687b ldr r3, [r7, #4] + 80020e8: 681b ldr r3, [r3, #0] + 80020ea: f442 4200 orr.w r2, r2, #32768 @ 0x8000 + 80020ee: 609a str r2, [r3, #8] + 80020f0: e006 b.n 8002100 + } + else /* I2C_ADDRESSINGMODE_10BIT */ + { + hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | I2C_OAR1_OA1MODE | hi2c->Init.OwnAddress1); + 80020f2: 687b ldr r3, [r7, #4] + 80020f4: 689a ldr r2, [r3, #8] + 80020f6: 687b ldr r3, [r7, #4] + 80020f8: 681b ldr r3, [r3, #0] + 80020fa: f442 4204 orr.w r2, r2, #33792 @ 0x8400 + 80020fe: 609a str r2, [r3, #8] + } + + /*---------------------------- I2Cx CR2 Configuration ----------------------*/ + /* Configure I2Cx: Addressing Master mode */ + if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT) + 8002100: 687b ldr r3, [r7, #4] + 8002102: 68db ldr r3, [r3, #12] + 8002104: 2b02 cmp r3, #2 + 8002106: d108 bne.n 800211a + { + SET_BIT(hi2c->Instance->CR2, I2C_CR2_ADD10); + 8002108: 687b ldr r3, [r7, #4] + 800210a: 681b ldr r3, [r3, #0] + 800210c: 685a ldr r2, [r3, #4] + 800210e: 687b ldr r3, [r7, #4] + 8002110: 681b ldr r3, [r3, #0] + 8002112: f442 6200 orr.w r2, r2, #2048 @ 0x800 + 8002116: 605a str r2, [r3, #4] + 8002118: e007 b.n 800212a + } + else + { + /* Clear the I2C ADD10 bit */ + CLEAR_BIT(hi2c->Instance->CR2, I2C_CR2_ADD10); + 800211a: 687b ldr r3, [r7, #4] + 800211c: 681b ldr r3, [r3, #0] + 800211e: 685a ldr r2, [r3, #4] + 8002120: 687b ldr r3, [r7, #4] + 8002122: 681b ldr r3, [r3, #0] + 8002124: f422 6200 bic.w r2, r2, #2048 @ 0x800 + 8002128: 605a str r2, [r3, #4] + } + /* Enable the AUTOEND by default, and enable NACK (should be disable only during Slave process */ + hi2c->Instance->CR2 |= (I2C_CR2_AUTOEND | I2C_CR2_NACK); + 800212a: 687b ldr r3, [r7, #4] + 800212c: 681b ldr r3, [r3, #0] + 800212e: 685b ldr r3, [r3, #4] + 8002130: 687a ldr r2, [r7, #4] + 8002132: 6812 ldr r2, [r2, #0] + 8002134: f043 7300 orr.w r3, r3, #33554432 @ 0x2000000 + 8002138: f443 4300 orr.w r3, r3, #32768 @ 0x8000 + 800213c: 6053 str r3, [r2, #4] + + /*---------------------------- I2Cx OAR2 Configuration ---------------------*/ + /* Disable Own Address2 before set the Own Address2 configuration */ + hi2c->Instance->OAR2 &= ~I2C_DUALADDRESS_ENABLE; + 800213e: 687b ldr r3, [r7, #4] + 8002140: 681b ldr r3, [r3, #0] + 8002142: 68da ldr r2, [r3, #12] + 8002144: 687b ldr r3, [r7, #4] + 8002146: 681b ldr r3, [r3, #0] + 8002148: f422 4200 bic.w r2, r2, #32768 @ 0x8000 + 800214c: 60da str r2, [r3, #12] + + /* Configure I2Cx: Dual mode and Own Address2 */ + hi2c->Instance->OAR2 = (hi2c->Init.DualAddressMode | hi2c->Init.OwnAddress2 | \ + 800214e: 687b ldr r3, [r7, #4] + 8002150: 691a ldr r2, [r3, #16] + 8002152: 687b ldr r3, [r7, #4] + 8002154: 695b ldr r3, [r3, #20] + 8002156: ea42 0103 orr.w r1, r2, r3 + (hi2c->Init.OwnAddress2Masks << 8)); + 800215a: 687b ldr r3, [r7, #4] + 800215c: 699b ldr r3, [r3, #24] + 800215e: 021a lsls r2, r3, #8 + hi2c->Instance->OAR2 = (hi2c->Init.DualAddressMode | hi2c->Init.OwnAddress2 | \ + 8002160: 687b ldr r3, [r7, #4] + 8002162: 681b ldr r3, [r3, #0] + 8002164: 430a orrs r2, r1 + 8002166: 60da str r2, [r3, #12] + + /*---------------------------- I2Cx CR1 Configuration ----------------------*/ + /* Configure I2Cx: Generalcall and NoStretch mode */ + hi2c->Instance->CR1 = (hi2c->Init.GeneralCallMode | hi2c->Init.NoStretchMode); + 8002168: 687b ldr r3, [r7, #4] + 800216a: 69d9 ldr r1, [r3, #28] + 800216c: 687b ldr r3, [r7, #4] + 800216e: 6a1a ldr r2, [r3, #32] + 8002170: 687b ldr r3, [r7, #4] + 8002172: 681b ldr r3, [r3, #0] + 8002174: 430a orrs r2, r1 + 8002176: 601a str r2, [r3, #0] + + /* Enable the selected I2C peripheral */ + __HAL_I2C_ENABLE(hi2c); + 8002178: 687b ldr r3, [r7, #4] + 800217a: 681b ldr r3, [r3, #0] + 800217c: 681a ldr r2, [r3, #0] + 800217e: 687b ldr r3, [r7, #4] + 8002180: 681b ldr r3, [r3, #0] + 8002182: f042 0201 orr.w r2, r2, #1 + 8002186: 601a str r2, [r3, #0] + + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + 8002188: 687b ldr r3, [r7, #4] + 800218a: 2200 movs r2, #0 + 800218c: 645a str r2, [r3, #68] @ 0x44 + hi2c->State = HAL_I2C_STATE_READY; + 800218e: 687b ldr r3, [r7, #4] + 8002190: 2220 movs r2, #32 + 8002192: f883 2041 strb.w r2, [r3, #65] @ 0x41 + hi2c->PreviousState = I2C_STATE_NONE; + 8002196: 687b ldr r3, [r7, #4] + 8002198: 2200 movs r2, #0 + 800219a: 631a str r2, [r3, #48] @ 0x30 + hi2c->Mode = HAL_I2C_MODE_NONE; + 800219c: 687b ldr r3, [r7, #4] + 800219e: 2200 movs r2, #0 + 80021a0: f883 2042 strb.w r2, [r3, #66] @ 0x42 + + return HAL_OK; + 80021a4: 2300 movs r3, #0 +} + 80021a6: 4618 mov r0, r3 + 80021a8: 3708 adds r7, #8 + 80021aa: 46bd mov sp, r7 + 80021ac: bd80 pop {r7, pc} + +080021ae : + * the configuration information for the specified I2Cx peripheral. + * @param AnalogFilter New state of the Analog filter. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter) +{ + 80021ae: b480 push {r7} + 80021b0: b083 sub sp, #12 + 80021b2: af00 add r7, sp, #0 + 80021b4: 6078 str r0, [r7, #4] + 80021b6: 6039 str r1, [r7, #0] + /* Check the parameters */ + assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); + assert_param(IS_I2C_ANALOG_FILTER(AnalogFilter)); + + if (hi2c->State == HAL_I2C_STATE_READY) + 80021b8: 687b ldr r3, [r7, #4] + 80021ba: f893 3041 ldrb.w r3, [r3, #65] @ 0x41 + 80021be: b2db uxtb r3, r3 + 80021c0: 2b20 cmp r3, #32 + 80021c2: d138 bne.n 8002236 + { + /* Process Locked */ + __HAL_LOCK(hi2c); + 80021c4: 687b ldr r3, [r7, #4] + 80021c6: f893 3040 ldrb.w r3, [r3, #64] @ 0x40 + 80021ca: 2b01 cmp r3, #1 + 80021cc: d101 bne.n 80021d2 + 80021ce: 2302 movs r3, #2 + 80021d0: e032 b.n 8002238 + 80021d2: 687b ldr r3, [r7, #4] + 80021d4: 2201 movs r2, #1 + 80021d6: f883 2040 strb.w r2, [r3, #64] @ 0x40 + + hi2c->State = HAL_I2C_STATE_BUSY; + 80021da: 687b ldr r3, [r7, #4] + 80021dc: 2224 movs r2, #36 @ 0x24 + 80021de: f883 2041 strb.w r2, [r3, #65] @ 0x41 + + /* Disable the selected I2C peripheral */ + __HAL_I2C_DISABLE(hi2c); + 80021e2: 687b ldr r3, [r7, #4] + 80021e4: 681b ldr r3, [r3, #0] + 80021e6: 681a ldr r2, [r3, #0] + 80021e8: 687b ldr r3, [r7, #4] + 80021ea: 681b ldr r3, [r3, #0] + 80021ec: f022 0201 bic.w r2, r2, #1 + 80021f0: 601a str r2, [r3, #0] + + /* Reset I2Cx ANOFF bit */ + hi2c->Instance->CR1 &= ~(I2C_CR1_ANFOFF); + 80021f2: 687b ldr r3, [r7, #4] + 80021f4: 681b ldr r3, [r3, #0] + 80021f6: 681a ldr r2, [r3, #0] + 80021f8: 687b ldr r3, [r7, #4] + 80021fa: 681b ldr r3, [r3, #0] + 80021fc: f422 5280 bic.w r2, r2, #4096 @ 0x1000 + 8002200: 601a str r2, [r3, #0] + + /* Set analog filter bit*/ + hi2c->Instance->CR1 |= AnalogFilter; + 8002202: 687b ldr r3, [r7, #4] + 8002204: 681b ldr r3, [r3, #0] + 8002206: 6819 ldr r1, [r3, #0] + 8002208: 687b ldr r3, [r7, #4] + 800220a: 681b ldr r3, [r3, #0] + 800220c: 683a ldr r2, [r7, #0] + 800220e: 430a orrs r2, r1 + 8002210: 601a str r2, [r3, #0] + + __HAL_I2C_ENABLE(hi2c); + 8002212: 687b ldr r3, [r7, #4] + 8002214: 681b ldr r3, [r3, #0] + 8002216: 681a ldr r2, [r3, #0] + 8002218: 687b ldr r3, [r7, #4] + 800221a: 681b ldr r3, [r3, #0] + 800221c: f042 0201 orr.w r2, r2, #1 + 8002220: 601a str r2, [r3, #0] + + hi2c->State = HAL_I2C_STATE_READY; + 8002222: 687b ldr r3, [r7, #4] + 8002224: 2220 movs r2, #32 + 8002226: f883 2041 strb.w r2, [r3, #65] @ 0x41 + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + 800222a: 687b ldr r3, [r7, #4] + 800222c: 2200 movs r2, #0 + 800222e: f883 2040 strb.w r2, [r3, #64] @ 0x40 + + return HAL_OK; + 8002232: 2300 movs r3, #0 + 8002234: e000 b.n 8002238 + } + else + { + return HAL_BUSY; + 8002236: 2302 movs r3, #2 + } +} + 8002238: 4618 mov r0, r3 + 800223a: 370c adds r7, #12 + 800223c: 46bd mov sp, r7 + 800223e: f85d 7b04 ldr.w r7, [sp], #4 + 8002242: 4770 bx lr + +08002244 : + * the configuration information for the specified I2Cx peripheral. + * @param DigitalFilter Coefficient of digital noise filter between Min_Data=0x00 and Max_Data=0x0F. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter) +{ + 8002244: b480 push {r7} + 8002246: b085 sub sp, #20 + 8002248: af00 add r7, sp, #0 + 800224a: 6078 str r0, [r7, #4] + 800224c: 6039 str r1, [r7, #0] + + /* Check the parameters */ + assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); + assert_param(IS_I2C_DIGITAL_FILTER(DigitalFilter)); + + if (hi2c->State == HAL_I2C_STATE_READY) + 800224e: 687b ldr r3, [r7, #4] + 8002250: f893 3041 ldrb.w r3, [r3, #65] @ 0x41 + 8002254: b2db uxtb r3, r3 + 8002256: 2b20 cmp r3, #32 + 8002258: d139 bne.n 80022ce + { + /* Process Locked */ + __HAL_LOCK(hi2c); + 800225a: 687b ldr r3, [r7, #4] + 800225c: f893 3040 ldrb.w r3, [r3, #64] @ 0x40 + 8002260: 2b01 cmp r3, #1 + 8002262: d101 bne.n 8002268 + 8002264: 2302 movs r3, #2 + 8002266: e033 b.n 80022d0 + 8002268: 687b ldr r3, [r7, #4] + 800226a: 2201 movs r2, #1 + 800226c: f883 2040 strb.w r2, [r3, #64] @ 0x40 + + hi2c->State = HAL_I2C_STATE_BUSY; + 8002270: 687b ldr r3, [r7, #4] + 8002272: 2224 movs r2, #36 @ 0x24 + 8002274: f883 2041 strb.w r2, [r3, #65] @ 0x41 + + /* Disable the selected I2C peripheral */ + __HAL_I2C_DISABLE(hi2c); + 8002278: 687b ldr r3, [r7, #4] + 800227a: 681b ldr r3, [r3, #0] + 800227c: 681a ldr r2, [r3, #0] + 800227e: 687b ldr r3, [r7, #4] + 8002280: 681b ldr r3, [r3, #0] + 8002282: f022 0201 bic.w r2, r2, #1 + 8002286: 601a str r2, [r3, #0] + + /* Get the old register value */ + tmpreg = hi2c->Instance->CR1; + 8002288: 687b ldr r3, [r7, #4] + 800228a: 681b ldr r3, [r3, #0] + 800228c: 681b ldr r3, [r3, #0] + 800228e: 60fb str r3, [r7, #12] + + /* Reset I2Cx DNF bits [11:8] */ + tmpreg &= ~(I2C_CR1_DNF); + 8002290: 68fb ldr r3, [r7, #12] + 8002292: f423 6370 bic.w r3, r3, #3840 @ 0xf00 + 8002296: 60fb str r3, [r7, #12] + + /* Set I2Cx DNF coefficient */ + tmpreg |= DigitalFilter << 8U; + 8002298: 683b ldr r3, [r7, #0] + 800229a: 021b lsls r3, r3, #8 + 800229c: 68fa ldr r2, [r7, #12] + 800229e: 4313 orrs r3, r2 + 80022a0: 60fb str r3, [r7, #12] + + /* Store the new register value */ + hi2c->Instance->CR1 = tmpreg; + 80022a2: 687b ldr r3, [r7, #4] + 80022a4: 681b ldr r3, [r3, #0] + 80022a6: 68fa ldr r2, [r7, #12] + 80022a8: 601a str r2, [r3, #0] + + __HAL_I2C_ENABLE(hi2c); + 80022aa: 687b ldr r3, [r7, #4] + 80022ac: 681b ldr r3, [r3, #0] + 80022ae: 681a ldr r2, [r3, #0] + 80022b0: 687b ldr r3, [r7, #4] + 80022b2: 681b ldr r3, [r3, #0] + 80022b4: f042 0201 orr.w r2, r2, #1 + 80022b8: 601a str r2, [r3, #0] + + hi2c->State = HAL_I2C_STATE_READY; + 80022ba: 687b ldr r3, [r7, #4] + 80022bc: 2220 movs r2, #32 + 80022be: f883 2041 strb.w r2, [r3, #65] @ 0x41 + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + 80022c2: 687b ldr r3, [r7, #4] + 80022c4: 2200 movs r2, #0 + 80022c6: f883 2040 strb.w r2, [r3, #64] @ 0x40 + + return HAL_OK; + 80022ca: 2300 movs r3, #0 + 80022cc: e000 b.n 80022d0 + } + else + { + return HAL_BUSY; + 80022ce: 2302 movs r3, #2 + } +} + 80022d0: 4618 mov r0, r3 + 80022d2: 3714 adds r7, #20 + 80022d4: 46bd mov sp, r7 + 80022d6: f85d 7b04 ldr.w r7, [sp], #4 + 80022da: 4770 bx lr + +080022dc : + * @brief Initialize the IPCC peripheral. + * @param hipcc IPCC handle + * @retval HAL status + */ +HAL_StatusTypeDef HAL_IPCC_Init(IPCC_HandleTypeDef *hipcc) +{ + 80022dc: b580 push {r7, lr} + 80022de: b084 sub sp, #16 + 80022e0: af00 add r7, sp, #0 + 80022e2: 6078 str r0, [r7, #4] + HAL_StatusTypeDef err = HAL_OK; + 80022e4: 2300 movs r3, #0 + 80022e6: 73fb strb r3, [r7, #15] + + /* Check the IPCC handle allocation */ + if (hipcc != NULL) + 80022e8: 687b ldr r3, [r7, #4] + 80022ea: 2b00 cmp r3, #0 + 80022ec: d01e beq.n 800232c + { + /* Check the parameters */ + assert_param(IS_IPCC_ALL_INSTANCE(hipcc->Instance)); + + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + 80022ee: 4b13 ldr r3, [pc, #76] @ (800233c ) + 80022f0: 60bb str r3, [r7, #8] + + if (hipcc->State == HAL_IPCC_STATE_RESET) + 80022f2: 687b ldr r3, [r7, #4] + 80022f4: f893 3038 ldrb.w r3, [r3, #56] @ 0x38 + 80022f8: b2db uxtb r3, r3 + 80022fa: 2b00 cmp r3, #0 + 80022fc: d102 bne.n 8002304 + { + /* Init the low level hardware : CLOCK, NVIC */ + HAL_IPCC_MspInit(hipcc); + 80022fe: 6878 ldr r0, [r7, #4] + 8002300: f7ff f9c4 bl 800168c + } + + /* Reset all registers of the current cpu to default state */ + IPCC_Reset_Register(currentInstance); + 8002304: 68b8 ldr r0, [r7, #8] + 8002306: f000 f85b bl 80023c0 + + /* Activate the interrupts */ + currentInstance->CR |= (IPCC_CR_RXOIE | IPCC_CR_TXFIE); + 800230a: 68bb ldr r3, [r7, #8] + 800230c: 681b ldr r3, [r3, #0] + 800230e: f043 1201 orr.w r2, r3, #65537 @ 0x10001 + 8002312: 68bb ldr r3, [r7, #8] + 8002314: 601a str r2, [r3, #0] + + /* Clear callback pointers */ + IPCC_SetDefaultCallbacks(hipcc); + 8002316: 6878 ldr r0, [r7, #4] + 8002318: f000 f82c bl 8002374 + + /* Reset all callback notification request */ + hipcc->callbackRequest = 0; + 800231c: 687b ldr r3, [r7, #4] + 800231e: 2200 movs r2, #0 + 8002320: 635a str r2, [r3, #52] @ 0x34 + + hipcc->State = HAL_IPCC_STATE_READY; + 8002322: 687b ldr r3, [r7, #4] + 8002324: 2201 movs r2, #1 + 8002326: f883 2038 strb.w r2, [r3, #56] @ 0x38 + 800232a: e001 b.n 8002330 + } + else + { + err = HAL_ERROR; + 800232c: 2301 movs r3, #1 + 800232e: 73fb strb r3, [r7, #15] + } + + return err; + 8002330: 7bfb ldrb r3, [r7, #15] +} + 8002332: 4618 mov r0, r3 + 8002334: 3710 adds r7, #16 + 8002336: 46bd mov sp, r7 + 8002338: bd80 pop {r7, pc} + 800233a: bf00 nop + 800233c: 58000c00 .word 0x58000c00 + +08002340 : + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + */ +__weak void HAL_IPCC_RxCallback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + 8002340: b480 push {r7} + 8002342: b085 sub sp, #20 + 8002344: af00 add r7, sp, #0 + 8002346: 60f8 str r0, [r7, #12] + 8002348: 60b9 str r1, [r7, #8] + 800234a: 4613 mov r3, r2 + 800234c: 71fb strb r3, [r7, #7] + UNUSED(ChannelDir); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_IPCC_RxCallback can be implemented in the user file + */ +} + 800234e: bf00 nop + 8002350: 3714 adds r7, #20 + 8002352: 46bd mov sp, r7 + 8002354: f85d 7b04 ldr.w r7, [sp], #4 + 8002358: 4770 bx lr + +0800235a : + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + */ +__weak void HAL_IPCC_TxCallback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + 800235a: b480 push {r7} + 800235c: b085 sub sp, #20 + 800235e: af00 add r7, sp, #0 + 8002360: 60f8 str r0, [r7, #12] + 8002362: 60b9 str r1, [r7, #8] + 8002364: 4613 mov r3, r2 + 8002366: 71fb strb r3, [r7, #7] + UNUSED(ChannelDir); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_IPCC_TxCallback can be implemented in the user file + */ +} + 8002368: bf00 nop + 800236a: 3714 adds r7, #20 + 800236c: 46bd mov sp, r7 + 800236e: f85d 7b04 ldr.w r7, [sp], #4 + 8002372: 4770 bx lr + +08002374 : +/** + * @brief Reset all callbacks of the handle to NULL. + * @param hipcc IPCC handle + */ +void IPCC_SetDefaultCallbacks(IPCC_HandleTypeDef *hipcc) +{ + 8002374: b480 push {r7} + 8002376: b085 sub sp, #20 + 8002378: af00 add r7, sp, #0 + 800237a: 6078 str r0, [r7, #4] + uint32_t i; + /* Set all callbacks to default */ + for (i = 0; i < IPCC_CHANNEL_NUMBER; i++) + 800237c: 2300 movs r3, #0 + 800237e: 60fb str r3, [r7, #12] + 8002380: e00f b.n 80023a2 + { + hipcc->ChannelCallbackRx[i] = HAL_IPCC_RxCallback; + 8002382: 687a ldr r2, [r7, #4] + 8002384: 68fb ldr r3, [r7, #12] + 8002386: 009b lsls r3, r3, #2 + 8002388: 4413 add r3, r2 + 800238a: 4a0b ldr r2, [pc, #44] @ (80023b8 ) + 800238c: 605a str r2, [r3, #4] + hipcc->ChannelCallbackTx[i] = HAL_IPCC_TxCallback; + 800238e: 687a ldr r2, [r7, #4] + 8002390: 68fb ldr r3, [r7, #12] + 8002392: 3306 adds r3, #6 + 8002394: 009b lsls r3, r3, #2 + 8002396: 4413 add r3, r2 + 8002398: 4a08 ldr r2, [pc, #32] @ (80023bc ) + 800239a: 605a str r2, [r3, #4] + for (i = 0; i < IPCC_CHANNEL_NUMBER; i++) + 800239c: 68fb ldr r3, [r7, #12] + 800239e: 3301 adds r3, #1 + 80023a0: 60fb str r3, [r7, #12] + 80023a2: 68fb ldr r3, [r7, #12] + 80023a4: 2b05 cmp r3, #5 + 80023a6: d9ec bls.n 8002382 + } +} + 80023a8: bf00 nop + 80023aa: bf00 nop + 80023ac: 3714 adds r7, #20 + 80023ae: 46bd mov sp, r7 + 80023b0: f85d 7b04 ldr.w r7, [sp], #4 + 80023b4: 4770 bx lr + 80023b6: bf00 nop + 80023b8: 08002341 .word 0x08002341 + 80023bc: 0800235b .word 0x0800235b + +080023c0 : +/** + * @brief Reset IPCC register to default value for the concerned instance. + * @param Instance pointer to register + */ +void IPCC_Reset_Register(IPCC_CommonTypeDef *Instance) +{ + 80023c0: b480 push {r7} + 80023c2: b083 sub sp, #12 + 80023c4: af00 add r7, sp, #0 + 80023c6: 6078 str r0, [r7, #4] + /* Disable RX and TX interrupts */ + Instance->CR = 0x00000000U; + 80023c8: 687b ldr r3, [r7, #4] + 80023ca: 2200 movs r2, #0 + 80023cc: 601a str r2, [r3, #0] + + /* Mask RX and TX interrupts */ + Instance->MR = (IPCC_ALL_TX_BUF | IPCC_ALL_RX_BUF); + 80023ce: 687b ldr r3, [r7, #4] + 80023d0: f04f 123f mov.w r2, #4128831 @ 0x3f003f + 80023d4: 605a str r2, [r3, #4] + + /* Clear RX status */ + Instance->SCR = IPCC_ALL_RX_BUF; + 80023d6: 687b ldr r3, [r7, #4] + 80023d8: 223f movs r2, #63 @ 0x3f + 80023da: 609a str r2, [r3, #8] +} + 80023dc: bf00 nop + 80023de: 370c adds r7, #12 + 80023e0: 46bd mov sp, r7 + 80023e2: f85d 7b04 ldr.w r7, [sp], #4 + 80023e6: 4770 bx lr + +080023e8 : + * @note LSEON bit that switches on and off the LSE crystal belongs as well to the + * back-up domain. + * @retval None + */ +void HAL_PWR_EnableBkUpAccess(void) +{ + 80023e8: b480 push {r7} + 80023ea: af00 add r7, sp, #0 + SET_BIT(PWR->CR1, PWR_CR1_DBP); + 80023ec: 4b05 ldr r3, [pc, #20] @ (8002404 ) + 80023ee: 681b ldr r3, [r3, #0] + 80023f0: 4a04 ldr r2, [pc, #16] @ (8002404 ) + 80023f2: f443 7380 orr.w r3, r3, #256 @ 0x100 + 80023f6: 6013 str r3, [r2, #0] +} + 80023f8: bf00 nop + 80023fa: 46bd mov sp, r7 + 80023fc: f85d 7b04 ldr.w r7, [sp], #4 + 8002400: 4770 bx lr + 8002402: bf00 nop + 8002404: 58000400 .word 0x58000400 + +08002408 : +/** + * @brief Return Voltage Scaling Range. + * @retval VOS bit field (PWR_REGULATOR_VOLTAGE_RANGE1 or PWR_REGULATOR_VOLTAGE_RANGE2) + */ +uint32_t HAL_PWREx_GetVoltageRange(void) +{ + 8002408: b480 push {r7} + 800240a: af00 add r7, sp, #0 + return (PWR->CR1 & PWR_CR1_VOS); + 800240c: 4b04 ldr r3, [pc, #16] @ (8002420 ) + 800240e: 681b ldr r3, [r3, #0] + 8002410: f403 63c0 and.w r3, r3, #1536 @ 0x600 +} + 8002414: 4618 mov r0, r3 + 8002416: 46bd mov sp, r7 + 8002418: f85d 7b04 ldr.w r7, [sp], #4 + 800241c: 4770 bx lr + 800241e: bf00 nop + 8002420: 58000400 .word 0x58000400 + +08002424 : + * @arg @ref PWR_STOPENTRY_WFI Enter Stop mode with WFI instruction + * @arg @ref PWR_STOPENTRY_WFE Enter Stop mode with WFE instruction + * @retval None + */ +void HAL_PWREx_EnterSTOP2Mode(uint8_t STOPEntry) +{ + 8002424: b480 push {r7} + 8002426: b083 sub sp, #12 + 8002428: af00 add r7, sp, #0 + 800242a: 4603 mov r3, r0 + 800242c: 71fb strb r3, [r7, #7] + /* Check the parameter */ + assert_param(IS_PWR_STOP_ENTRY(STOPEntry)); + + /* Set Stop mode 2 */ + MODIFY_REG(PWR->CR1, PWR_CR1_LPMS, PWR_LOWPOWERMODE_STOP2); + 800242e: 4b11 ldr r3, [pc, #68] @ (8002474 ) + 8002430: 681b ldr r3, [r3, #0] + 8002432: f023 0307 bic.w r3, r3, #7 + 8002436: 4a0f ldr r2, [pc, #60] @ (8002474 ) + 8002438: f043 0302 orr.w r3, r3, #2 + 800243c: 6013 str r3, [r2, #0] + + /* Set SLEEPDEEP bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + 800243e: 4b0e ldr r3, [pc, #56] @ (8002478 ) + 8002440: 691b ldr r3, [r3, #16] + 8002442: 4a0d ldr r2, [pc, #52] @ (8002478 ) + 8002444: f043 0304 orr.w r3, r3, #4 + 8002448: 6113 str r3, [r2, #16] + + /* Select Stop mode entry --------------------------------------------------*/ + if (STOPEntry == PWR_STOPENTRY_WFI) + 800244a: 79fb ldrb r3, [r7, #7] + 800244c: 2b01 cmp r3, #1 + 800244e: d101 bne.n 8002454 + { + /* Request Wait For Interrupt */ + __WFI(); + 8002450: bf30 wfi + 8002452: e002 b.n 800245a + } + else + { + /* Request Wait For Event */ + __SEV(); + 8002454: bf40 sev + __WFE(); + 8002456: bf20 wfe + __WFE(); + 8002458: bf20 wfe + } + + /* Reset SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + 800245a: 4b07 ldr r3, [pc, #28] @ (8002478 ) + 800245c: 691b ldr r3, [r3, #16] + 800245e: 4a06 ldr r2, [pc, #24] @ (8002478 ) + 8002460: f023 0304 bic.w r3, r3, #4 + 8002464: 6113 str r3, [r2, #16] +} + 8002466: bf00 nop + 8002468: 370c adds r7, #12 + 800246a: 46bd mov sp, r7 + 800246c: f85d 7b04 ldr.w r7, [sp], #4 + 8002470: 4770 bx lr + 8002472: bf00 nop + 8002474: 58000400 .word 0x58000400 + 8002478: e000ed00 .word 0xe000ed00 + +0800247c : +{ + 800247c: b480 push {r7} + 800247e: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CR, RCC_CR_HSEPRE) == (RCC_CR_HSEPRE)) ? 1UL : 0UL); + 8002480: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002484: 681b ldr r3, [r3, #0] + 8002486: f403 1380 and.w r3, r3, #1048576 @ 0x100000 + 800248a: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 + 800248e: d101 bne.n 8002494 + 8002490: 2301 movs r3, #1 + 8002492: e000 b.n 8002496 + 8002494: 2300 movs r3, #0 +} + 8002496: 4618 mov r0, r3 + 8002498: 46bd mov sp, r7 + 800249a: f85d 7b04 ldr.w r7, [sp], #4 + 800249e: 4770 bx lr + +080024a0 : +{ + 80024a0: b480 push {r7} + 80024a2: af00 add r7, sp, #0 + SET_BIT(RCC->CR, RCC_CR_HSEON); + 80024a4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80024a8: 681b ldr r3, [r3, #0] + 80024aa: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80024ae: f443 3380 orr.w r3, r3, #65536 @ 0x10000 + 80024b2: 6013 str r3, [r2, #0] +} + 80024b4: bf00 nop + 80024b6: 46bd mov sp, r7 + 80024b8: f85d 7b04 ldr.w r7, [sp], #4 + 80024bc: 4770 bx lr + +080024be : +{ + 80024be: b480 push {r7} + 80024c0: af00 add r7, sp, #0 + CLEAR_BIT(RCC->CR, RCC_CR_HSEON); + 80024c2: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80024c6: 681b ldr r3, [r3, #0] + 80024c8: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80024cc: f423 3380 bic.w r3, r3, #65536 @ 0x10000 + 80024d0: 6013 str r3, [r2, #0] +} + 80024d2: bf00 nop + 80024d4: 46bd mov sp, r7 + 80024d6: f85d 7b04 ldr.w r7, [sp], #4 + 80024da: 4770 bx lr + +080024dc : +{ + 80024dc: b480 push {r7} + 80024de: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CR, RCC_CR_HSERDY) == (RCC_CR_HSERDY)) ? 1UL : 0UL); + 80024e0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80024e4: 681b ldr r3, [r3, #0] + 80024e6: f403 3300 and.w r3, r3, #131072 @ 0x20000 + 80024ea: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 + 80024ee: d101 bne.n 80024f4 + 80024f0: 2301 movs r3, #1 + 80024f2: e000 b.n 80024f6 + 80024f4: 2300 movs r3, #0 +} + 80024f6: 4618 mov r0, r3 + 80024f8: 46bd mov sp, r7 + 80024fa: f85d 7b04 ldr.w r7, [sp], #4 + 80024fe: 4770 bx lr + +08002500 : +{ + 8002500: b480 push {r7} + 8002502: af00 add r7, sp, #0 + SET_BIT(RCC->CR, RCC_CR_HSION); + 8002504: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002508: 681b ldr r3, [r3, #0] + 800250a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 800250e: f443 7380 orr.w r3, r3, #256 @ 0x100 + 8002512: 6013 str r3, [r2, #0] +} + 8002514: bf00 nop + 8002516: 46bd mov sp, r7 + 8002518: f85d 7b04 ldr.w r7, [sp], #4 + 800251c: 4770 bx lr + +0800251e : +{ + 800251e: b480 push {r7} + 8002520: af00 add r7, sp, #0 + CLEAR_BIT(RCC->CR, RCC_CR_HSION); + 8002522: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002526: 681b ldr r3, [r3, #0] + 8002528: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 800252c: f423 7380 bic.w r3, r3, #256 @ 0x100 + 8002530: 6013 str r3, [r2, #0] +} + 8002532: bf00 nop + 8002534: 46bd mov sp, r7 + 8002536: f85d 7b04 ldr.w r7, [sp], #4 + 800253a: 4770 bx lr + +0800253c : +{ + 800253c: b480 push {r7} + 800253e: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CR, RCC_CR_HSIRDY) == (RCC_CR_HSIRDY)) ? 1UL : 0UL); + 8002540: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002544: 681b ldr r3, [r3, #0] + 8002546: f403 6380 and.w r3, r3, #1024 @ 0x400 + 800254a: f5b3 6f80 cmp.w r3, #1024 @ 0x400 + 800254e: d101 bne.n 8002554 + 8002550: 2301 movs r3, #1 + 8002552: e000 b.n 8002556 + 8002554: 2300 movs r3, #0 +} + 8002556: 4618 mov r0, r3 + 8002558: 46bd mov sp, r7 + 800255a: f85d 7b04 ldr.w r7, [sp], #4 + 800255e: 4770 bx lr + +08002560 : +{ + 8002560: b480 push {r7} + 8002562: b083 sub sp, #12 + 8002564: af00 add r7, sp, #0 + 8002566: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->ICSCR, RCC_ICSCR_HSITRIM, Value << RCC_ICSCR_HSITRIM_Pos); + 8002568: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800256c: 685b ldr r3, [r3, #4] + 800256e: f023 42fe bic.w r2, r3, #2130706432 @ 0x7f000000 + 8002572: 687b ldr r3, [r7, #4] + 8002574: 061b lsls r3, r3, #24 + 8002576: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800257a: 4313 orrs r3, r2 + 800257c: 604b str r3, [r1, #4] +} + 800257e: bf00 nop + 8002580: 370c adds r7, #12 + 8002582: 46bd mov sp, r7 + 8002584: f85d 7b04 ldr.w r7, [sp], #4 + 8002588: 4770 bx lr + +0800258a : +{ + 800258a: b480 push {r7} + 800258c: af00 add r7, sp, #0 + SET_BIT(RCC->CRRCR, RCC_CRRCR_HSI48ON); + 800258e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002592: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 + 8002596: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 800259a: f043 0301 orr.w r3, r3, #1 + 800259e: f8c2 3098 str.w r3, [r2, #152] @ 0x98 +} + 80025a2: bf00 nop + 80025a4: 46bd mov sp, r7 + 80025a6: f85d 7b04 ldr.w r7, [sp], #4 + 80025aa: 4770 bx lr + +080025ac : +{ + 80025ac: b480 push {r7} + 80025ae: af00 add r7, sp, #0 + CLEAR_BIT(RCC->CRRCR, RCC_CRRCR_HSI48ON); + 80025b0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80025b4: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 + 80025b8: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80025bc: f023 0301 bic.w r3, r3, #1 + 80025c0: f8c2 3098 str.w r3, [r2, #152] @ 0x98 +} + 80025c4: bf00 nop + 80025c6: 46bd mov sp, r7 + 80025c8: f85d 7b04 ldr.w r7, [sp], #4 + 80025cc: 4770 bx lr + +080025ce : +{ + 80025ce: b480 push {r7} + 80025d0: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CRRCR, RCC_CRRCR_HSI48RDY) == (RCC_CRRCR_HSI48RDY)) ? 1UL : 0UL); + 80025d2: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80025d6: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 + 80025da: f003 0302 and.w r3, r3, #2 + 80025de: 2b02 cmp r3, #2 + 80025e0: d101 bne.n 80025e6 + 80025e2: 2301 movs r3, #1 + 80025e4: e000 b.n 80025e8 + 80025e6: 2300 movs r3, #0 +} + 80025e8: 4618 mov r0, r3 + 80025ea: 46bd mov sp, r7 + 80025ec: f85d 7b04 ldr.w r7, [sp], #4 + 80025f0: 4770 bx lr + +080025f2 : +{ + 80025f2: b480 push {r7} + 80025f4: af00 add r7, sp, #0 + SET_BIT(RCC->BDCR, RCC_BDCR_LSEON); + 80025f6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80025fa: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 80025fe: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8002602: f043 0301 orr.w r3, r3, #1 + 8002606: f8c2 3090 str.w r3, [r2, #144] @ 0x90 +} + 800260a: bf00 nop + 800260c: 46bd mov sp, r7 + 800260e: f85d 7b04 ldr.w r7, [sp], #4 + 8002612: 4770 bx lr + +08002614 : +{ + 8002614: b480 push {r7} + 8002616: af00 add r7, sp, #0 + CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON); + 8002618: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800261c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8002620: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8002624: f023 0301 bic.w r3, r3, #1 + 8002628: f8c2 3090 str.w r3, [r2, #144] @ 0x90 +} + 800262c: bf00 nop + 800262e: 46bd mov sp, r7 + 8002630: f85d 7b04 ldr.w r7, [sp], #4 + 8002634: 4770 bx lr + +08002636 : +{ + 8002636: b480 push {r7} + 8002638: af00 add r7, sp, #0 + SET_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); + 800263a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800263e: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8002642: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8002646: f043 0304 orr.w r3, r3, #4 + 800264a: f8c2 3090 str.w r3, [r2, #144] @ 0x90 +} + 800264e: bf00 nop + 8002650: 46bd mov sp, r7 + 8002652: f85d 7b04 ldr.w r7, [sp], #4 + 8002656: 4770 bx lr + +08002658 : +{ + 8002658: b480 push {r7} + 800265a: af00 add r7, sp, #0 + CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); + 800265c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002660: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8002664: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8002668: f023 0304 bic.w r3, r3, #4 + 800266c: f8c2 3090 str.w r3, [r2, #144] @ 0x90 +} + 8002670: bf00 nop + 8002672: 46bd mov sp, r7 + 8002674: f85d 7b04 ldr.w r7, [sp], #4 + 8002678: 4770 bx lr + +0800267a : +{ + 800267a: b480 push {r7} + 800267c: af00 add r7, sp, #0 + return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == (RCC_BDCR_LSERDY)) ? 1UL : 0UL); + 800267e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002682: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8002686: f003 0302 and.w r3, r3, #2 + 800268a: 2b02 cmp r3, #2 + 800268c: d101 bne.n 8002692 + 800268e: 2301 movs r3, #1 + 8002690: e000 b.n 8002694 + 8002692: 2300 movs r3, #0 +} + 8002694: 4618 mov r0, r3 + 8002696: 46bd mov sp, r7 + 8002698: f85d 7b04 ldr.w r7, [sp], #4 + 800269c: 4770 bx lr + +0800269e : +{ + 800269e: b480 push {r7} + 80026a0: af00 add r7, sp, #0 + SET_BIT(RCC->CSR, RCC_CSR_LSI1ON); + 80026a2: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80026a6: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 80026aa: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80026ae: f043 0301 orr.w r3, r3, #1 + 80026b2: f8c2 3094 str.w r3, [r2, #148] @ 0x94 +} + 80026b6: bf00 nop + 80026b8: 46bd mov sp, r7 + 80026ba: f85d 7b04 ldr.w r7, [sp], #4 + 80026be: 4770 bx lr + +080026c0 : +{ + 80026c0: b480 push {r7} + 80026c2: af00 add r7, sp, #0 + CLEAR_BIT(RCC->CSR, RCC_CSR_LSI1ON); + 80026c4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80026c8: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 80026cc: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80026d0: f023 0301 bic.w r3, r3, #1 + 80026d4: f8c2 3094 str.w r3, [r2, #148] @ 0x94 +} + 80026d8: bf00 nop + 80026da: 46bd mov sp, r7 + 80026dc: f85d 7b04 ldr.w r7, [sp], #4 + 80026e0: 4770 bx lr + +080026e2 : +{ + 80026e2: b480 push {r7} + 80026e4: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CSR, RCC_CSR_LSI1RDY) == (RCC_CSR_LSI1RDY)) ? 1UL : 0UL); + 80026e6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80026ea: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 80026ee: f003 0302 and.w r3, r3, #2 + 80026f2: 2b02 cmp r3, #2 + 80026f4: d101 bne.n 80026fa + 80026f6: 2301 movs r3, #1 + 80026f8: e000 b.n 80026fc + 80026fa: 2300 movs r3, #0 +} + 80026fc: 4618 mov r0, r3 + 80026fe: 46bd mov sp, r7 + 8002700: f85d 7b04 ldr.w r7, [sp], #4 + 8002704: 4770 bx lr + +08002706 : +{ + 8002706: b480 push {r7} + 8002708: af00 add r7, sp, #0 + SET_BIT(RCC->CSR, RCC_CSR_LSI2ON); + 800270a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800270e: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 8002712: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8002716: f043 0304 orr.w r3, r3, #4 + 800271a: f8c2 3094 str.w r3, [r2, #148] @ 0x94 +} + 800271e: bf00 nop + 8002720: 46bd mov sp, r7 + 8002722: f85d 7b04 ldr.w r7, [sp], #4 + 8002726: 4770 bx lr + +08002728 : +{ + 8002728: b480 push {r7} + 800272a: af00 add r7, sp, #0 + CLEAR_BIT(RCC->CSR, RCC_CSR_LSI2ON); + 800272c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002730: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 8002734: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8002738: f023 0304 bic.w r3, r3, #4 + 800273c: f8c2 3094 str.w r3, [r2, #148] @ 0x94 +} + 8002740: bf00 nop + 8002742: 46bd mov sp, r7 + 8002744: f85d 7b04 ldr.w r7, [sp], #4 + 8002748: 4770 bx lr + +0800274a : +{ + 800274a: b480 push {r7} + 800274c: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CSR, RCC_CSR_LSI2RDY) == (RCC_CSR_LSI2RDY)) ? 1UL : 0UL); + 800274e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002752: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 8002756: f003 0308 and.w r3, r3, #8 + 800275a: 2b08 cmp r3, #8 + 800275c: d101 bne.n 8002762 + 800275e: 2301 movs r3, #1 + 8002760: e000 b.n 8002764 + 8002762: 2300 movs r3, #0 +} + 8002764: 4618 mov r0, r3 + 8002766: 46bd mov sp, r7 + 8002768: f85d 7b04 ldr.w r7, [sp], #4 + 800276c: 4770 bx lr + +0800276e : +{ + 800276e: b480 push {r7} + 8002770: b083 sub sp, #12 + 8002772: af00 add r7, sp, #0 + 8002774: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CSR, RCC_CSR_LSI2TRIM, Value << RCC_CSR_LSI2TRIM_Pos); + 8002776: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800277a: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 800277e: f423 6270 bic.w r2, r3, #3840 @ 0xf00 + 8002782: 687b ldr r3, [r7, #4] + 8002784: 021b lsls r3, r3, #8 + 8002786: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800278a: 4313 orrs r3, r2 + 800278c: f8c1 3094 str.w r3, [r1, #148] @ 0x94 +} + 8002790: bf00 nop + 8002792: 370c adds r7, #12 + 8002794: 46bd mov sp, r7 + 8002796: f85d 7b04 ldr.w r7, [sp], #4 + 800279a: 4770 bx lr + +0800279c : +{ + 800279c: b480 push {r7} + 800279e: af00 add r7, sp, #0 + SET_BIT(RCC->CR, RCC_CR_MSION); + 80027a0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80027a4: 681b ldr r3, [r3, #0] + 80027a6: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80027aa: f043 0301 orr.w r3, r3, #1 + 80027ae: 6013 str r3, [r2, #0] +} + 80027b0: bf00 nop + 80027b2: 46bd mov sp, r7 + 80027b4: f85d 7b04 ldr.w r7, [sp], #4 + 80027b8: 4770 bx lr + +080027ba : +{ + 80027ba: b480 push {r7} + 80027bc: af00 add r7, sp, #0 + CLEAR_BIT(RCC->CR, RCC_CR_MSION); + 80027be: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80027c2: 681b ldr r3, [r3, #0] + 80027c4: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80027c8: f023 0301 bic.w r3, r3, #1 + 80027cc: 6013 str r3, [r2, #0] +} + 80027ce: bf00 nop + 80027d0: 46bd mov sp, r7 + 80027d2: f85d 7b04 ldr.w r7, [sp], #4 + 80027d6: 4770 bx lr + +080027d8 : +{ + 80027d8: b480 push {r7} + 80027da: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CR, RCC_CR_MSIRDY) == (RCC_CR_MSIRDY)) ? 1UL : 0UL); + 80027dc: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80027e0: 681b ldr r3, [r3, #0] + 80027e2: f003 0302 and.w r3, r3, #2 + 80027e6: 2b02 cmp r3, #2 + 80027e8: d101 bne.n 80027ee + 80027ea: 2301 movs r3, #1 + 80027ec: e000 b.n 80027f0 + 80027ee: 2300 movs r3, #0 +} + 80027f0: 4618 mov r0, r3 + 80027f2: 46bd mov sp, r7 + 80027f4: f85d 7b04 ldr.w r7, [sp], #4 + 80027f8: 4770 bx lr + +080027fa : +{ + 80027fa: b480 push {r7} + 80027fc: b083 sub sp, #12 + 80027fe: af00 add r7, sp, #0 + 8002800: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CR, RCC_CR_MSIRANGE, Range); + 8002802: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002806: 681b ldr r3, [r3, #0] + 8002808: f023 02f0 bic.w r2, r3, #240 @ 0xf0 + 800280c: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8002810: 687b ldr r3, [r7, #4] + 8002812: 4313 orrs r3, r2 + 8002814: 600b str r3, [r1, #0] +} + 8002816: bf00 nop + 8002818: 370c adds r7, #12 + 800281a: 46bd mov sp, r7 + 800281c: f85d 7b04 ldr.w r7, [sp], #4 + 8002820: 4770 bx lr + +08002822 : +{ + 8002822: b480 push {r7} + 8002824: b083 sub sp, #12 + 8002826: af00 add r7, sp, #0 + uint32_t msiRange = READ_BIT(RCC->CR, RCC_CR_MSIRANGE); + 8002828: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800282c: 681b ldr r3, [r3, #0] + 800282e: f003 03f0 and.w r3, r3, #240 @ 0xf0 + 8002832: 607b str r3, [r7, #4] + if (msiRange > LL_RCC_MSIRANGE_11) + 8002834: 687b ldr r3, [r7, #4] + 8002836: 2bb0 cmp r3, #176 @ 0xb0 + 8002838: d901 bls.n 800283e + msiRange = LL_RCC_MSIRANGE_11; + 800283a: 23b0 movs r3, #176 @ 0xb0 + 800283c: 607b str r3, [r7, #4] + return msiRange; + 800283e: 687b ldr r3, [r7, #4] +} + 8002840: 4618 mov r0, r3 + 8002842: 370c adds r7, #12 + 8002844: 46bd mov sp, r7 + 8002846: f85d 7b04 ldr.w r7, [sp], #4 + 800284a: 4770 bx lr + +0800284c : +{ + 800284c: b480 push {r7} + 800284e: b083 sub sp, #12 + 8002850: af00 add r7, sp, #0 + 8002852: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->ICSCR, RCC_ICSCR_MSITRIM, Value << RCC_ICSCR_MSITRIM_Pos); + 8002854: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002858: 685b ldr r3, [r3, #4] + 800285a: f423 427f bic.w r2, r3, #65280 @ 0xff00 + 800285e: 687b ldr r3, [r7, #4] + 8002860: 021b lsls r3, r3, #8 + 8002862: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8002866: 4313 orrs r3, r2 + 8002868: 604b str r3, [r1, #4] +} + 800286a: bf00 nop + 800286c: 370c adds r7, #12 + 800286e: 46bd mov sp, r7 + 8002870: f85d 7b04 ldr.w r7, [sp], #4 + 8002874: 4770 bx lr + +08002876 : +{ + 8002876: b480 push {r7} + 8002878: b083 sub sp, #12 + 800287a: af00 add r7, sp, #0 + 800287c: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, Source); + 800287e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002882: 689b ldr r3, [r3, #8] + 8002884: f023 0203 bic.w r2, r3, #3 + 8002888: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800288c: 687b ldr r3, [r7, #4] + 800288e: 4313 orrs r3, r2 + 8002890: 608b str r3, [r1, #8] +} + 8002892: bf00 nop + 8002894: 370c adds r7, #12 + 8002896: 46bd mov sp, r7 + 8002898: f85d 7b04 ldr.w r7, [sp], #4 + 800289c: 4770 bx lr + +0800289e : +{ + 800289e: b480 push {r7} + 80028a0: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_SWS)); + 80028a2: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80028a6: 689b ldr r3, [r3, #8] + 80028a8: f003 030c and.w r3, r3, #12 +} + 80028ac: 4618 mov r0, r3 + 80028ae: 46bd mov sp, r7 + 80028b0: f85d 7b04 ldr.w r7, [sp], #4 + 80028b4: 4770 bx lr + +080028b6 : +{ + 80028b6: b480 push {r7} + 80028b8: b083 sub sp, #12 + 80028ba: af00 add r7, sp, #0 + 80028bc: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, Prescaler); + 80028be: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80028c2: 689b ldr r3, [r3, #8] + 80028c4: f023 02f0 bic.w r2, r3, #240 @ 0xf0 + 80028c8: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80028cc: 687b ldr r3, [r7, #4] + 80028ce: 4313 orrs r3, r2 + 80028d0: 608b str r3, [r1, #8] +} + 80028d2: bf00 nop + 80028d4: 370c adds r7, #12 + 80028d6: 46bd mov sp, r7 + 80028d8: f85d 7b04 ldr.w r7, [sp], #4 + 80028dc: 4770 bx lr + +080028de : +{ + 80028de: b480 push {r7} + 80028e0: b083 sub sp, #12 + 80028e2: af00 add r7, sp, #0 + 80028e4: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->EXTCFGR, RCC_EXTCFGR_C2HPRE, Prescaler); + 80028e6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80028ea: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 + 80028ee: f023 02f0 bic.w r2, r3, #240 @ 0xf0 + 80028f2: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80028f6: 687b ldr r3, [r7, #4] + 80028f8: 4313 orrs r3, r2 + 80028fa: f8c1 3108 str.w r3, [r1, #264] @ 0x108 +} + 80028fe: bf00 nop + 8002900: 370c adds r7, #12 + 8002902: 46bd mov sp, r7 + 8002904: f85d 7b04 ldr.w r7, [sp], #4 + 8002908: 4770 bx lr + +0800290a : +{ + 800290a: b480 push {r7} + 800290c: b083 sub sp, #12 + 800290e: af00 add r7, sp, #0 + 8002910: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->EXTCFGR, RCC_EXTCFGR_SHDHPRE, Prescaler >> 4); + 8002912: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002916: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 + 800291a: f023 020f bic.w r2, r3, #15 + 800291e: 687b ldr r3, [r7, #4] + 8002920: 091b lsrs r3, r3, #4 + 8002922: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8002926: 4313 orrs r3, r2 + 8002928: f8c1 3108 str.w r3, [r1, #264] @ 0x108 +} + 800292c: bf00 nop + 800292e: 370c adds r7, #12 + 8002930: 46bd mov sp, r7 + 8002932: f85d 7b04 ldr.w r7, [sp], #4 + 8002936: 4770 bx lr + +08002938 : +{ + 8002938: b480 push {r7} + 800293a: b083 sub sp, #12 + 800293c: af00 add r7, sp, #0 + 800293e: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, Prescaler); + 8002940: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002944: 689b ldr r3, [r3, #8] + 8002946: f423 62e0 bic.w r2, r3, #1792 @ 0x700 + 800294a: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800294e: 687b ldr r3, [r7, #4] + 8002950: 4313 orrs r3, r2 + 8002952: 608b str r3, [r1, #8] +} + 8002954: bf00 nop + 8002956: 370c adds r7, #12 + 8002958: 46bd mov sp, r7 + 800295a: f85d 7b04 ldr.w r7, [sp], #4 + 800295e: 4770 bx lr + +08002960 : +{ + 8002960: b480 push {r7} + 8002962: b083 sub sp, #12 + 8002964: af00 add r7, sp, #0 + 8002966: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, Prescaler); + 8002968: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800296c: 689b ldr r3, [r3, #8] + 800296e: f423 5260 bic.w r2, r3, #14336 @ 0x3800 + 8002972: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8002976: 687b ldr r3, [r7, #4] + 8002978: 4313 orrs r3, r2 + 800297a: 608b str r3, [r1, #8] +} + 800297c: bf00 nop + 800297e: 370c adds r7, #12 + 8002980: 46bd mov sp, r7 + 8002982: f85d 7b04 ldr.w r7, [sp], #4 + 8002986: 4770 bx lr + +08002988 : +{ + 8002988: b480 push {r7} + 800298a: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_HPRE)); + 800298c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002990: 689b ldr r3, [r3, #8] + 8002992: f003 03f0 and.w r3, r3, #240 @ 0xf0 +} + 8002996: 4618 mov r0, r3 + 8002998: 46bd mov sp, r7 + 800299a: f85d 7b04 ldr.w r7, [sp], #4 + 800299e: 4770 bx lr + +080029a0 : +{ + 80029a0: b480 push {r7} + 80029a2: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(RCC->EXTCFGR, RCC_EXTCFGR_SHDHPRE) << 4); + 80029a4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80029a8: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 + 80029ac: 011b lsls r3, r3, #4 + 80029ae: f003 03f0 and.w r3, r3, #240 @ 0xf0 +} + 80029b2: 4618 mov r0, r3 + 80029b4: 46bd mov sp, r7 + 80029b6: f85d 7b04 ldr.w r7, [sp], #4 + 80029ba: 4770 bx lr + +080029bc : + * @brief Enable PLL + * @rmtoll CR PLLON LL_RCC_PLL_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_Enable(void) +{ + 80029bc: b480 push {r7} + 80029be: af00 add r7, sp, #0 + SET_BIT(RCC->CR, RCC_CR_PLLON); + 80029c0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80029c4: 681b ldr r3, [r3, #0] + 80029c6: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80029ca: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 + 80029ce: 6013 str r3, [r2, #0] +} + 80029d0: bf00 nop + 80029d2: 46bd mov sp, r7 + 80029d4: f85d 7b04 ldr.w r7, [sp], #4 + 80029d8: 4770 bx lr + +080029da : + * @note Cannot be disabled if the PLL clock is used as the system clock + * @rmtoll CR PLLON LL_RCC_PLL_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_Disable(void) +{ + 80029da: b480 push {r7} + 80029dc: af00 add r7, sp, #0 + CLEAR_BIT(RCC->CR, RCC_CR_PLLON); + 80029de: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80029e2: 681b ldr r3, [r3, #0] + 80029e4: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80029e8: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 + 80029ec: 6013 str r3, [r2, #0] +} + 80029ee: bf00 nop + 80029f0: 46bd mov sp, r7 + 80029f2: f85d 7b04 ldr.w r7, [sp], #4 + 80029f6: 4770 bx lr + +080029f8 : + * @brief Check if PLL Ready + * @rmtoll CR PLLRDY LL_RCC_PLL_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_IsReady(void) +{ + 80029f8: b480 push {r7} + 80029fa: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CR, RCC_CR_PLLRDY) == (RCC_CR_PLLRDY)) ? 1UL : 0UL); + 80029fc: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002a00: 681b ldr r3, [r3, #0] + 8002a02: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 + 8002a06: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000 + 8002a0a: d101 bne.n 8002a10 + 8002a0c: 2301 movs r3, #1 + 8002a0e: e000 b.n 8002a12 + 8002a10: 2300 movs r3, #0 +} + 8002a12: 4618 mov r0, r3 + 8002a14: 46bd mov sp, r7 + 8002a16: f85d 7b04 ldr.w r7, [sp], #4 + 8002a1a: 4770 bx lr + +08002a1c : + * @brief Get Main PLL multiplication factor for VCO + * @rmtoll PLLCFGR PLLN LL_RCC_PLL_GetN + * @retval Between 6 and 127 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetN(void) +{ + 8002a1c: b480 push {r7} + 8002a1e: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos); + 8002a20: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002a24: 68db ldr r3, [r3, #12] + 8002a26: 0a1b lsrs r3, r3, #8 + 8002a28: f003 037f and.w r3, r3, #127 @ 0x7f +} + 8002a2c: 4618 mov r0, r3 + 8002a2e: 46bd mov sp, r7 + 8002a30: f85d 7b04 ldr.w r7, [sp], #4 + 8002a34: 4770 bx lr + +08002a36 : + * @arg @ref LL_RCC_PLLR_DIV_6 + * @arg @ref LL_RCC_PLLR_DIV_7 + * @arg @ref LL_RCC_PLLR_DIV_8 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetR(void) +{ + 8002a36: b480 push {r7} + 8002a38: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLR)); + 8002a3a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002a3e: 68db ldr r3, [r3, #12] + 8002a40: f003 4360 and.w r3, r3, #3758096384 @ 0xe0000000 +} + 8002a44: 4618 mov r0, r3 + 8002a46: 46bd mov sp, r7 + 8002a48: f85d 7b04 ldr.w r7, [sp], #4 + 8002a4c: 4770 bx lr + +08002a4e : + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetDivider(void) +{ + 8002a4e: b480 push {r7} + 8002a50: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLM)); + 8002a52: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002a56: 68db ldr r3, [r3, #12] + 8002a58: f003 0370 and.w r3, r3, #112 @ 0x70 +} + 8002a5c: 4618 mov r0, r3 + 8002a5e: 46bd mov sp, r7 + 8002a60: f85d 7b04 ldr.w r7, [sp], #4 + 8002a64: 4770 bx lr + +08002a66 : + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetMainSource(void) +{ + 8002a66: b480 push {r7} + 8002a68: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC)); + 8002a6a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002a6e: 68db ldr r3, [r3, #12] + 8002a70: f003 0303 and.w r3, r3, #3 +} + 8002a74: 4618 mov r0, r3 + 8002a76: 46bd mov sp, r7 + 8002a78: f85d 7b04 ldr.w r7, [sp], #4 + 8002a7c: 4770 bx lr + +08002a7e : + * @brief Check if HCLK1 prescaler flag value has been applied or not + * @rmtoll CFGR HPREF LL_RCC_IsActiveFlag_HPRE + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HPRE(void) +{ + 8002a7e: b480 push {r7} + 8002a80: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CFGR, RCC_CFGR_HPREF) == (RCC_CFGR_HPREF)) ? 1UL : 0UL); + 8002a82: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002a86: 689b ldr r3, [r3, #8] + 8002a88: f403 3380 and.w r3, r3, #65536 @ 0x10000 + 8002a8c: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 + 8002a90: d101 bne.n 8002a96 + 8002a92: 2301 movs r3, #1 + 8002a94: e000 b.n 8002a98 + 8002a96: 2300 movs r3, #0 +} + 8002a98: 4618 mov r0, r3 + 8002a9a: 46bd mov sp, r7 + 8002a9c: f85d 7b04 ldr.w r7, [sp], #4 + 8002aa0: 4770 bx lr + +08002aa2 : + * @brief Check if HCLK2 prescaler flag value has been applied or not + * @rmtoll EXTCFGR C2HPREF LL_RCC_IsActiveFlag_C2HPRE + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_C2HPRE(void) +{ + 8002aa2: b480 push {r7} + 8002aa4: af00 add r7, sp, #0 + return ((READ_BIT(RCC->EXTCFGR, RCC_EXTCFGR_C2HPREF) == (RCC_EXTCFGR_C2HPREF)) ? 1UL : 0UL); + 8002aa6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002aaa: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 + 8002aae: f403 3300 and.w r3, r3, #131072 @ 0x20000 + 8002ab2: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 + 8002ab6: d101 bne.n 8002abc + 8002ab8: 2301 movs r3, #1 + 8002aba: e000 b.n 8002abe + 8002abc: 2300 movs r3, #0 +} + 8002abe: 4618 mov r0, r3 + 8002ac0: 46bd mov sp, r7 + 8002ac2: f85d 7b04 ldr.w r7, [sp], #4 + 8002ac6: 4770 bx lr + +08002ac8 : + * @brief Check if HCLK4 prescaler flag value has been applied or not + * @rmtoll EXTCFGR SHDHPREF LL_RCC_IsActiveFlag_SHDHPRE + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SHDHPRE(void) +{ + 8002ac8: b480 push {r7} + 8002aca: af00 add r7, sp, #0 + return ((READ_BIT(RCC->EXTCFGR, RCC_EXTCFGR_SHDHPREF) == (RCC_EXTCFGR_SHDHPREF)) ? 1UL : 0UL); + 8002acc: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002ad0: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 + 8002ad4: f403 3380 and.w r3, r3, #65536 @ 0x10000 + 8002ad8: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 + 8002adc: d101 bne.n 8002ae2 + 8002ade: 2301 movs r3, #1 + 8002ae0: e000 b.n 8002ae4 + 8002ae2: 2300 movs r3, #0 +} + 8002ae4: 4618 mov r0, r3 + 8002ae6: 46bd mov sp, r7 + 8002ae8: f85d 7b04 ldr.w r7, [sp], #4 + 8002aec: 4770 bx lr + +08002aee : + * @brief Check if PLCK1 prescaler flag value has been applied or not + * @rmtoll CFGR PPRE1F LL_RCC_IsActiveFlag_PPRE1 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PPRE1(void) +{ + 8002aee: b480 push {r7} + 8002af0: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CFGR, RCC_CFGR_PPRE1F) == (RCC_CFGR_PPRE1F)) ? 1UL : 0UL); + 8002af2: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002af6: 689b ldr r3, [r3, #8] + 8002af8: f403 3300 and.w r3, r3, #131072 @ 0x20000 + 8002afc: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 + 8002b00: d101 bne.n 8002b06 + 8002b02: 2301 movs r3, #1 + 8002b04: e000 b.n 8002b08 + 8002b06: 2300 movs r3, #0 +} + 8002b08: 4618 mov r0, r3 + 8002b0a: 46bd mov sp, r7 + 8002b0c: f85d 7b04 ldr.w r7, [sp], #4 + 8002b10: 4770 bx lr + +08002b12 : + * @brief Check if PLCK2 prescaler flag value has been applied or not + * @rmtoll CFGR PPRE2F LL_RCC_IsActiveFlag_PPRE2 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PPRE2(void) +{ + 8002b12: b480 push {r7} + 8002b14: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CFGR, RCC_CFGR_PPRE2F) == (RCC_CFGR_PPRE2F)) ? 1UL : 0UL); + 8002b16: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8002b1a: 689b ldr r3, [r3, #8] + 8002b1c: f403 2380 and.w r3, r3, #262144 @ 0x40000 + 8002b20: f5b3 2f80 cmp.w r3, #262144 @ 0x40000 + 8002b24: d101 bne.n 8002b2a + 8002b26: 2301 movs r3, #1 + 8002b28: e000 b.n 8002b2c + 8002b2a: 2300 movs r3, #0 +} + 8002b2c: 4618 mov r0, r3 + 8002b2e: 46bd mov sp, r7 + 8002b30: f85d 7b04 ldr.w r7, [sp], #4 + 8002b34: 4770 bx lr + ... + +08002b38 : + * @note The PLL is not disabled when used as system clock. + * @note The PLL source is not updated when used as PLLSAI1 clock source. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct) +{ + 8002b38: b590 push {r4, r7, lr} + 8002b3a: b08d sub sp, #52 @ 0x34 + 8002b3c: af00 add r7, sp, #0 + 8002b3e: 6078 str r0, [r7, #4] + uint32_t tickstart; + + /* Check Null pointer */ + if (RCC_OscInitStruct == NULL) + 8002b40: 687b ldr r3, [r7, #4] + 8002b42: 2b00 cmp r3, #0 + 8002b44: d101 bne.n 8002b4a + { + return HAL_ERROR; + 8002b46: 2301 movs r3, #1 + 8002b48: e363 b.n 8003212 + + /* Check the parameters */ + assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); + + /*----------------------------- MSI Configuration --------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_MSI) == RCC_OSCILLATORTYPE_MSI) + 8002b4a: 687b ldr r3, [r7, #4] + 8002b4c: 681b ldr r3, [r3, #0] + 8002b4e: f003 0320 and.w r3, r3, #32 + 8002b52: 2b00 cmp r3, #0 + 8002b54: f000 808d beq.w 8002c72 + assert_param(IS_RCC_MSI(RCC_OscInitStruct->MSIState)); + assert_param(IS_RCC_MSICALIBRATION_VALUE(RCC_OscInitStruct->MSICalibrationValue)); + assert_param(IS_RCC_MSI_CLOCK_RANGE(RCC_OscInitStruct->MSIClockRange)); + + /* When the MSI is used as system clock it will not be disabled */ + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + 8002b58: f7ff fea1 bl 800289e + 8002b5c: 62f8 str r0, [r7, #44] @ 0x2c + const uint32_t temp_plloscsrc = __HAL_RCC_GET_PLL_OSCSOURCE(); + 8002b5e: f7ff ff82 bl 8002a66 + 8002b62: 62b8 str r0, [r7, #40] @ 0x28 + if ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_MSI) || + 8002b64: 6afb ldr r3, [r7, #44] @ 0x2c + 8002b66: 2b00 cmp r3, #0 + 8002b68: d005 beq.n 8002b76 + 8002b6a: 6afb ldr r3, [r7, #44] @ 0x2c + 8002b6c: 2b0c cmp r3, #12 + 8002b6e: d147 bne.n 8002c00 + ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_plloscsrc == RCC_PLLSOURCE_MSI))) + 8002b70: 6abb ldr r3, [r7, #40] @ 0x28 + 8002b72: 2b01 cmp r3, #1 + 8002b74: d144 bne.n 8002c00 + { + if (RCC_OscInitStruct->MSIState == RCC_MSI_OFF) + 8002b76: 687b ldr r3, [r7, #4] + 8002b78: 69db ldr r3, [r3, #28] + 8002b7a: 2b00 cmp r3, #0 + 8002b7c: d101 bne.n 8002b82 + { + return HAL_ERROR; + 8002b7e: 2301 movs r3, #1 + 8002b80: e347 b.n 8003212 + else + { + /* To correctly read data from FLASH memory, the number of wait states (LATENCY) + must be correctly programmed according to the frequency of the AHB4 clock + and the supply voltage of the device. */ + if (RCC_OscInitStruct->MSIClockRange > __HAL_RCC_GET_MSI_RANGE()) + 8002b82: 687b ldr r3, [r7, #4] + 8002b84: 6a5c ldr r4, [r3, #36] @ 0x24 + 8002b86: f7ff fe4c bl 8002822 + 8002b8a: 4603 mov r3, r0 + 8002b8c: 429c cmp r4, r3 + 8002b8e: d914 bls.n 8002bba + { + /* First increase number of wait states update if necessary */ + if (RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK) + 8002b90: 687b ldr r3, [r7, #4] + 8002b92: 6a5b ldr r3, [r3, #36] @ 0x24 + 8002b94: 4618 mov r0, r3 + 8002b96: f000 fd03 bl 80035a0 + 8002b9a: 4603 mov r3, r0 + 8002b9c: 2b00 cmp r3, #0 + 8002b9e: d001 beq.n 8002ba4 + { + return HAL_ERROR; + 8002ba0: 2301 movs r3, #1 + 8002ba2: e336 b.n 8003212 + } + + /* Selects the Multiple Speed oscillator (MSI) clock range .*/ + __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange); + 8002ba4: 687b ldr r3, [r7, #4] + 8002ba6: 6a5b ldr r3, [r3, #36] @ 0x24 + 8002ba8: 4618 mov r0, r3 + 8002baa: f7ff fe26 bl 80027fa + /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/ + __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue); + 8002bae: 687b ldr r3, [r7, #4] + 8002bb0: 6a1b ldr r3, [r3, #32] + 8002bb2: 4618 mov r0, r3 + 8002bb4: f7ff fe4a bl 800284c + 8002bb8: e013 b.n 8002be2 + } + else + { + /* Else, keep current flash latency while decreasing applies */ + /* Selects the Multiple Speed oscillator (MSI) clock range .*/ + __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange); + 8002bba: 687b ldr r3, [r7, #4] + 8002bbc: 6a5b ldr r3, [r3, #36] @ 0x24 + 8002bbe: 4618 mov r0, r3 + 8002bc0: f7ff fe1b bl 80027fa + /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/ + __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue); + 8002bc4: 687b ldr r3, [r7, #4] + 8002bc6: 6a1b ldr r3, [r3, #32] + 8002bc8: 4618 mov r0, r3 + 8002bca: f7ff fe3f bl 800284c + + /* Decrease number of wait states update if necessary */ + if (RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK) + 8002bce: 687b ldr r3, [r7, #4] + 8002bd0: 6a5b ldr r3, [r3, #36] @ 0x24 + 8002bd2: 4618 mov r0, r3 + 8002bd4: f000 fce4 bl 80035a0 + 8002bd8: 4603 mov r3, r0 + 8002bda: 2b00 cmp r3, #0 + 8002bdc: d001 beq.n 8002be2 + { + return HAL_ERROR; + 8002bde: 2301 movs r3, #1 + 8002be0: e317 b.n 8003212 + } + } + + /* Update the SystemCoreClock global variable */ + SystemCoreClock = HAL_RCC_GetHCLKFreq(); + 8002be2: f000 fcc9 bl 8003578 + 8002be6: 4603 mov r3, r0 + 8002be8: 4aa4 ldr r2, [pc, #656] @ (8002e7c ) + 8002bea: 6013 str r3, [r2, #0] + + if (HAL_InitTick(uwTickPrio) != HAL_OK) + 8002bec: 4ba4 ldr r3, [pc, #656] @ (8002e80 ) + 8002bee: 681b ldr r3, [r3, #0] + 8002bf0: 4618 mov r0, r3 + 8002bf2: f7fe fe89 bl 8001908 + 8002bf6: 4603 mov r3, r0 + 8002bf8: 2b00 cmp r3, #0 + 8002bfa: d039 beq.n 8002c70 + { + return HAL_ERROR; + 8002bfc: 2301 movs r3, #1 + 8002bfe: e308 b.n 8003212 + } + } + else + { + /* Check the MSI State */ + if (RCC_OscInitStruct->MSIState != RCC_MSI_OFF) + 8002c00: 687b ldr r3, [r7, #4] + 8002c02: 69db ldr r3, [r3, #28] + 8002c04: 2b00 cmp r3, #0 + 8002c06: d01e beq.n 8002c46 + { + /* Enable the Internal High Speed oscillator (MSI). */ + __HAL_RCC_MSI_ENABLE(); + 8002c08: f7ff fdc8 bl 800279c + + /* Get timeout */ + tickstart = HAL_GetTick(); + 8002c0c: f7fe feca bl 80019a4 + 8002c10: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till MSI is ready */ + while (LL_RCC_MSI_IsReady() == 0U) + 8002c12: e008 b.n 8002c26 + { + if ((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE) + 8002c14: f7fe fec6 bl 80019a4 + 8002c18: 4602 mov r2, r0 + 8002c1a: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002c1c: 1ad3 subs r3, r2, r3 + 8002c1e: 2b02 cmp r3, #2 + 8002c20: d901 bls.n 8002c26 + { + return HAL_TIMEOUT; + 8002c22: 2303 movs r3, #3 + 8002c24: e2f5 b.n 8003212 + while (LL_RCC_MSI_IsReady() == 0U) + 8002c26: f7ff fdd7 bl 80027d8 + 8002c2a: 4603 mov r3, r0 + 8002c2c: 2b00 cmp r3, #0 + 8002c2e: d0f1 beq.n 8002c14 + } + } + + /* Selects the Multiple Speed oscillator (MSI) clock range .*/ + __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange); + 8002c30: 687b ldr r3, [r7, #4] + 8002c32: 6a5b ldr r3, [r3, #36] @ 0x24 + 8002c34: 4618 mov r0, r3 + 8002c36: f7ff fde0 bl 80027fa + /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/ + __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue); + 8002c3a: 687b ldr r3, [r7, #4] + 8002c3c: 6a1b ldr r3, [r3, #32] + 8002c3e: 4618 mov r0, r3 + 8002c40: f7ff fe04 bl 800284c + 8002c44: e015 b.n 8002c72 + + } + else + { + /* Disable the Internal High Speed oscillator (MSI). */ + __HAL_RCC_MSI_DISABLE(); + 8002c46: f7ff fdb8 bl 80027ba + + /* Get timeout */ + tickstart = HAL_GetTick(); + 8002c4a: f7fe feab bl 80019a4 + 8002c4e: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till MSI is disabled */ + while (LL_RCC_MSI_IsReady() != 0U) + 8002c50: e008 b.n 8002c64 + { + if ((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE) + 8002c52: f7fe fea7 bl 80019a4 + 8002c56: 4602 mov r2, r0 + 8002c58: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002c5a: 1ad3 subs r3, r2, r3 + 8002c5c: 2b02 cmp r3, #2 + 8002c5e: d901 bls.n 8002c64 + { + return HAL_TIMEOUT; + 8002c60: 2303 movs r3, #3 + 8002c62: e2d6 b.n 8003212 + while (LL_RCC_MSI_IsReady() != 0U) + 8002c64: f7ff fdb8 bl 80027d8 + 8002c68: 4603 mov r3, r0 + 8002c6a: 2b00 cmp r3, #0 + 8002c6c: d1f1 bne.n 8002c52 + 8002c6e: e000 b.n 8002c72 + if (RCC_OscInitStruct->MSIState == RCC_MSI_OFF) + 8002c70: bf00 nop + } + } + } + + /*------------------------------- HSE Configuration ------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) + 8002c72: 687b ldr r3, [r7, #4] + 8002c74: 681b ldr r3, [r3, #0] + 8002c76: f003 0301 and.w r3, r3, #1 + 8002c7a: 2b00 cmp r3, #0 + 8002c7c: d047 beq.n 8002d0e + { + /* Check the parameters */ + assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); + + /* When the HSE is used as system clock or clock source for PLL in these cases it is not allowed to be disabled */ + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + 8002c7e: f7ff fe0e bl 800289e + 8002c82: 6238 str r0, [r7, #32] + const uint32_t temp_plloscsrc = __HAL_RCC_GET_PLL_OSCSOURCE(); + 8002c84: f7ff feef bl 8002a66 + 8002c88: 61f8 str r0, [r7, #28] + if ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSE) || + 8002c8a: 6a3b ldr r3, [r7, #32] + 8002c8c: 2b08 cmp r3, #8 + 8002c8e: d005 beq.n 8002c9c + 8002c90: 6a3b ldr r3, [r7, #32] + 8002c92: 2b0c cmp r3, #12 + 8002c94: d108 bne.n 8002ca8 + ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_plloscsrc == RCC_PLLSOURCE_HSE))) + 8002c96: 69fb ldr r3, [r7, #28] + 8002c98: 2b03 cmp r3, #3 + 8002c9a: d105 bne.n 8002ca8 + { + if (RCC_OscInitStruct->HSEState == RCC_HSE_OFF) + 8002c9c: 687b ldr r3, [r7, #4] + 8002c9e: 685b ldr r3, [r3, #4] + 8002ca0: 2b00 cmp r3, #0 + 8002ca2: d134 bne.n 8002d0e + { + return HAL_ERROR; + 8002ca4: 2301 movs r3, #1 + 8002ca6: e2b4 b.n 8003212 + } + } + else + { + /* Set the new HSE configuration ---------------------------------------*/ + __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); + 8002ca8: 687b ldr r3, [r7, #4] + 8002caa: 685b ldr r3, [r3, #4] + 8002cac: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 + 8002cb0: d102 bne.n 8002cb8 + 8002cb2: f7ff fbf5 bl 80024a0 + 8002cb6: e001 b.n 8002cbc + 8002cb8: f7ff fc01 bl 80024be + + /* Check the HSE State */ + if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF) + 8002cbc: 687b ldr r3, [r7, #4] + 8002cbe: 685b ldr r3, [r3, #4] + 8002cc0: 2b00 cmp r3, #0 + 8002cc2: d012 beq.n 8002cea + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002cc4: f7fe fe6e bl 80019a4 + 8002cc8: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till HSE is ready */ + while (LL_RCC_HSE_IsReady() == 0U) + 8002cca: e008 b.n 8002cde + { + if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) + 8002ccc: f7fe fe6a bl 80019a4 + 8002cd0: 4602 mov r2, r0 + 8002cd2: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002cd4: 1ad3 subs r3, r2, r3 + 8002cd6: 2b64 cmp r3, #100 @ 0x64 + 8002cd8: d901 bls.n 8002cde + { + return HAL_TIMEOUT; + 8002cda: 2303 movs r3, #3 + 8002cdc: e299 b.n 8003212 + while (LL_RCC_HSE_IsReady() == 0U) + 8002cde: f7ff fbfd bl 80024dc + 8002ce2: 4603 mov r3, r0 + 8002ce4: 2b00 cmp r3, #0 + 8002ce6: d0f1 beq.n 8002ccc + 8002ce8: e011 b.n 8002d0e + } + } + else + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002cea: f7fe fe5b bl 80019a4 + 8002cee: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till HSE is disabled */ + while (LL_RCC_HSE_IsReady() != 0U) + 8002cf0: e008 b.n 8002d04 + { + if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) + 8002cf2: f7fe fe57 bl 80019a4 + 8002cf6: 4602 mov r2, r0 + 8002cf8: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002cfa: 1ad3 subs r3, r2, r3 + 8002cfc: 2b64 cmp r3, #100 @ 0x64 + 8002cfe: d901 bls.n 8002d04 + { + return HAL_TIMEOUT; + 8002d00: 2303 movs r3, #3 + 8002d02: e286 b.n 8003212 + while (LL_RCC_HSE_IsReady() != 0U) + 8002d04: f7ff fbea bl 80024dc + 8002d08: 4603 mov r3, r0 + 8002d0a: 2b00 cmp r3, #0 + 8002d0c: d1f1 bne.n 8002cf2 + } + } + } + + /*----------------------------- HSI Configuration --------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) + 8002d0e: 687b ldr r3, [r7, #4] + 8002d10: 681b ldr r3, [r3, #0] + 8002d12: f003 0302 and.w r3, r3, #2 + 8002d16: 2b00 cmp r3, #0 + 8002d18: d04c beq.n 8002db4 + /* Check the parameters */ + assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState)); + assert_param(IS_RCC_HSI_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue)); + + /* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */ + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + 8002d1a: f7ff fdc0 bl 800289e + 8002d1e: 61b8 str r0, [r7, #24] + const uint32_t temp_plloscsrc = __HAL_RCC_GET_PLL_OSCSOURCE(); + 8002d20: f7ff fea1 bl 8002a66 + 8002d24: 6178 str r0, [r7, #20] + if ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSI) || + 8002d26: 69bb ldr r3, [r7, #24] + 8002d28: 2b04 cmp r3, #4 + 8002d2a: d005 beq.n 8002d38 + 8002d2c: 69bb ldr r3, [r7, #24] + 8002d2e: 2b0c cmp r3, #12 + 8002d30: d10e bne.n 8002d50 + ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_plloscsrc == RCC_PLLSOURCE_HSI))) + 8002d32: 697b ldr r3, [r7, #20] + 8002d34: 2b02 cmp r3, #2 + 8002d36: d10b bne.n 8002d50 + { + /* When HSI is used as system clock it will not be disabled */ + if (RCC_OscInitStruct->HSIState == RCC_HSI_OFF) + 8002d38: 687b ldr r3, [r7, #4] + 8002d3a: 68db ldr r3, [r3, #12] + 8002d3c: 2b00 cmp r3, #0 + 8002d3e: d101 bne.n 8002d44 + { + return HAL_ERROR; + 8002d40: 2301 movs r3, #1 + 8002d42: e266 b.n 8003212 + } + /* Otherwise, just the calibration is allowed */ + else + { + /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ + __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); + 8002d44: 687b ldr r3, [r7, #4] + 8002d46: 691b ldr r3, [r3, #16] + 8002d48: 4618 mov r0, r3 + 8002d4a: f7ff fc09 bl 8002560 + if (RCC_OscInitStruct->HSIState == RCC_HSI_OFF) + 8002d4e: e031 b.n 8002db4 + } + } + else + { + /* Check the HSI State */ + if (RCC_OscInitStruct->HSIState != RCC_HSI_OFF) + 8002d50: 687b ldr r3, [r7, #4] + 8002d52: 68db ldr r3, [r3, #12] + 8002d54: 2b00 cmp r3, #0 + 8002d56: d019 beq.n 8002d8c + { + /* Enable the Internal High Speed oscillator (HSI). */ + __HAL_RCC_HSI_ENABLE(); + 8002d58: f7ff fbd2 bl 8002500 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002d5c: f7fe fe22 bl 80019a4 + 8002d60: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till HSI is ready */ + while (LL_RCC_HSI_IsReady() == 0U) + 8002d62: e008 b.n 8002d76 + { + if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) + 8002d64: f7fe fe1e bl 80019a4 + 8002d68: 4602 mov r2, r0 + 8002d6a: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002d6c: 1ad3 subs r3, r2, r3 + 8002d6e: 2b02 cmp r3, #2 + 8002d70: d901 bls.n 8002d76 + { + return HAL_TIMEOUT; + 8002d72: 2303 movs r3, #3 + 8002d74: e24d b.n 8003212 + while (LL_RCC_HSI_IsReady() == 0U) + 8002d76: f7ff fbe1 bl 800253c + 8002d7a: 4603 mov r3, r0 + 8002d7c: 2b00 cmp r3, #0 + 8002d7e: d0f1 beq.n 8002d64 + } + } + + /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ + __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); + 8002d80: 687b ldr r3, [r7, #4] + 8002d82: 691b ldr r3, [r3, #16] + 8002d84: 4618 mov r0, r3 + 8002d86: f7ff fbeb bl 8002560 + 8002d8a: e013 b.n 8002db4 + } + else + { + /* Disable the Internal High Speed oscillator (HSI). */ + __HAL_RCC_HSI_DISABLE(); + 8002d8c: f7ff fbc7 bl 800251e + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002d90: f7fe fe08 bl 80019a4 + 8002d94: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till HSI is disabled */ + while (LL_RCC_HSI_IsReady() != 0U) + 8002d96: e008 b.n 8002daa + { + if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) + 8002d98: f7fe fe04 bl 80019a4 + 8002d9c: 4602 mov r2, r0 + 8002d9e: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002da0: 1ad3 subs r3, r2, r3 + 8002da2: 2b02 cmp r3, #2 + 8002da4: d901 bls.n 8002daa + { + return HAL_TIMEOUT; + 8002da6: 2303 movs r3, #3 + 8002da8: e233 b.n 8003212 + while (LL_RCC_HSI_IsReady() != 0U) + 8002daa: f7ff fbc7 bl 800253c + 8002dae: 4603 mov r3, r0 + 8002db0: 2b00 cmp r3, #0 + 8002db2: d1f1 bne.n 8002d98 + } + } + } + /*------------------------------ LSI Configuration (LSI1 or LSI2) -------------------------*/ + + if ((((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI1) == RCC_OSCILLATORTYPE_LSI1) || \ + 8002db4: 687b ldr r3, [r7, #4] + 8002db6: 681b ldr r3, [r3, #0] + 8002db8: f003 0308 and.w r3, r3, #8 + 8002dbc: 2b00 cmp r3, #0 + 8002dbe: d106 bne.n 8002dce + (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI2) == RCC_OSCILLATORTYPE_LSI2)) + 8002dc0: 687b ldr r3, [r7, #4] + 8002dc2: 681b ldr r3, [r3, #0] + 8002dc4: f003 0310 and.w r3, r3, #16 + if ((((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI1) == RCC_OSCILLATORTYPE_LSI1) || \ + 8002dc8: 2b00 cmp r3, #0 + 8002dca: f000 80a3 beq.w 8002f14 + { + /* Check the parameters */ + assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); + + /* Check the LSI State */ + if (RCC_OscInitStruct->LSIState != RCC_LSI_OFF) + 8002dce: 687b ldr r3, [r7, #4] + 8002dd0: 695b ldr r3, [r3, #20] + 8002dd2: 2b00 cmp r3, #0 + 8002dd4: d076 beq.n 8002ec4 + { + /*------------------------------ LSI2 selected by default (when Switch ON) -------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI2) == RCC_OSCILLATORTYPE_LSI2) + 8002dd6: 687b ldr r3, [r7, #4] + 8002dd8: 681b ldr r3, [r3, #0] + 8002dda: f003 0310 and.w r3, r3, #16 + 8002dde: 2b00 cmp r3, #0 + 8002de0: d046 beq.n 8002e70 + { + assert_param(IS_RCC_LSI2_CALIBRATION_VALUE(RCC_OscInitStruct->LSI2CalibrationValue)); + + /* 1. Check LSI1 state and enable if required */ + if (LL_RCC_LSI1_IsReady() == 0U) + 8002de2: f7ff fc7e bl 80026e2 + 8002de6: 4603 mov r3, r0 + 8002de8: 2b00 cmp r3, #0 + 8002dea: d113 bne.n 8002e14 + { + /* This is required to enable LSI1 before enabling LSI2 */ + __HAL_RCC_LSI1_ENABLE(); + 8002dec: f7ff fc57 bl 800269e + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002df0: f7fe fdd8 bl 80019a4 + 8002df4: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till LSI1 is ready */ + while (LL_RCC_LSI1_IsReady() == 0U) + 8002df6: e008 b.n 8002e0a + { + if ((HAL_GetTick() - tickstart) > LSI1_TIMEOUT_VALUE) + 8002df8: f7fe fdd4 bl 80019a4 + 8002dfc: 4602 mov r2, r0 + 8002dfe: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002e00: 1ad3 subs r3, r2, r3 + 8002e02: 2b02 cmp r3, #2 + 8002e04: d901 bls.n 8002e0a + { + return HAL_TIMEOUT; + 8002e06: 2303 movs r3, #3 + 8002e08: e203 b.n 8003212 + while (LL_RCC_LSI1_IsReady() == 0U) + 8002e0a: f7ff fc6a bl 80026e2 + 8002e0e: 4603 mov r3, r0 + 8002e10: 2b00 cmp r3, #0 + 8002e12: d0f1 beq.n 8002df8 + } + } + } + + /* 2. Enable the Internal Low Speed oscillator (LSI2) and set trimming value */ + __HAL_RCC_LSI2_ENABLE(); + 8002e14: f7ff fc77 bl 8002706 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002e18: f7fe fdc4 bl 80019a4 + 8002e1c: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till LSI2 is ready */ + while (LL_RCC_LSI2_IsReady() == 0U) + 8002e1e: e008 b.n 8002e32 + { + if ((HAL_GetTick() - tickstart) > LSI2_TIMEOUT_VALUE) + 8002e20: f7fe fdc0 bl 80019a4 + 8002e24: 4602 mov r2, r0 + 8002e26: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002e28: 1ad3 subs r3, r2, r3 + 8002e2a: 2b03 cmp r3, #3 + 8002e2c: d901 bls.n 8002e32 + { + return HAL_TIMEOUT; + 8002e2e: 2303 movs r3, #3 + 8002e30: e1ef b.n 8003212 + while (LL_RCC_LSI2_IsReady() == 0U) + 8002e32: f7ff fc8a bl 800274a + 8002e36: 4603 mov r3, r0 + 8002e38: 2b00 cmp r3, #0 + 8002e3a: d0f1 beq.n 8002e20 + } + } + /* Adjusts the Internal Low Spee oscillator (LSI2) calibration value */ + __HAL_RCC_LSI2_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->LSI2CalibrationValue); + 8002e3c: 687b ldr r3, [r7, #4] + 8002e3e: 699b ldr r3, [r3, #24] + 8002e40: 4618 mov r0, r3 + 8002e42: f7ff fc94 bl 800276e + + /* 3. Disable LSI1 */ + + /* LSI1 was initially not enable, require to disable it */ + __HAL_RCC_LSI1_DISABLE(); + 8002e46: f7ff fc3b bl 80026c0 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002e4a: f7fe fdab bl 80019a4 + 8002e4e: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till LSI1 is disabled */ + while (LL_RCC_LSI1_IsReady() != 0U) + 8002e50: e008 b.n 8002e64 + { + if ((HAL_GetTick() - tickstart) > LSI1_TIMEOUT_VALUE) + 8002e52: f7fe fda7 bl 80019a4 + 8002e56: 4602 mov r2, r0 + 8002e58: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002e5a: 1ad3 subs r3, r2, r3 + 8002e5c: 2b02 cmp r3, #2 + 8002e5e: d901 bls.n 8002e64 + { + return HAL_TIMEOUT; + 8002e60: 2303 movs r3, #3 + 8002e62: e1d6 b.n 8003212 + while (LL_RCC_LSI1_IsReady() != 0U) + 8002e64: f7ff fc3d bl 80026e2 + 8002e68: 4603 mov r3, r0 + 8002e6a: 2b00 cmp r3, #0 + 8002e6c: d1f1 bne.n 8002e52 + 8002e6e: e051 b.n 8002f14 + else + { + /*------------------------------ LSI1 selected (only if LSI2 OFF)-------------------------*/ + + /* 1. Enable the Internal Low Speed oscillator (LSI1). */ + __HAL_RCC_LSI1_ENABLE(); + 8002e70: f7ff fc15 bl 800269e + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002e74: f7fe fd96 bl 80019a4 + 8002e78: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till LSI1 is ready */ + while (LL_RCC_LSI1_IsReady() == 0U) + 8002e7a: e00c b.n 8002e96 + 8002e7c: 20000008 .word 0x20000008 + 8002e80: 2000000c .word 0x2000000c + { + if ((HAL_GetTick() - tickstart) > LSI1_TIMEOUT_VALUE) + 8002e84: f7fe fd8e bl 80019a4 + 8002e88: 4602 mov r2, r0 + 8002e8a: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002e8c: 1ad3 subs r3, r2, r3 + 8002e8e: 2b02 cmp r3, #2 + 8002e90: d901 bls.n 8002e96 + { + return HAL_TIMEOUT; + 8002e92: 2303 movs r3, #3 + 8002e94: e1bd b.n 8003212 + while (LL_RCC_LSI1_IsReady() == 0U) + 8002e96: f7ff fc24 bl 80026e2 + 8002e9a: 4603 mov r3, r0 + 8002e9c: 2b00 cmp r3, #0 + 8002e9e: d0f1 beq.n 8002e84 + } + } + /*2. Switch OFF LSI2*/ + + /* Disable the Internal Low Speed oscillator (LSI2). */ + __HAL_RCC_LSI2_DISABLE(); + 8002ea0: f7ff fc42 bl 8002728 + + /* Wait till LSI2 is disabled */ + while (LL_RCC_LSI2_IsReady() != 0U) + 8002ea4: e008 b.n 8002eb8 + { + if ((HAL_GetTick() - tickstart) > LSI2_TIMEOUT_VALUE) + 8002ea6: f7fe fd7d bl 80019a4 + 8002eaa: 4602 mov r2, r0 + 8002eac: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002eae: 1ad3 subs r3, r2, r3 + 8002eb0: 2b03 cmp r3, #3 + 8002eb2: d901 bls.n 8002eb8 + { + return HAL_TIMEOUT; + 8002eb4: 2303 movs r3, #3 + 8002eb6: e1ac b.n 8003212 + while (LL_RCC_LSI2_IsReady() != 0U) + 8002eb8: f7ff fc47 bl 800274a + 8002ebc: 4603 mov r3, r0 + 8002ebe: 2b00 cmp r3, #0 + 8002ec0: d1f1 bne.n 8002ea6 + 8002ec2: e027 b.n 8002f14 + } + else + { + + /* Disable the Internal Low Speed oscillator (LSI2). */ + __HAL_RCC_LSI2_DISABLE(); + 8002ec4: f7ff fc30 bl 8002728 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002ec8: f7fe fd6c bl 80019a4 + 8002ecc: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till LSI2 is disabled */ + while (LL_RCC_LSI2_IsReady() != 0U) + 8002ece: e008 b.n 8002ee2 + { + if ((HAL_GetTick() - tickstart) > LSI2_TIMEOUT_VALUE) + 8002ed0: f7fe fd68 bl 80019a4 + 8002ed4: 4602 mov r2, r0 + 8002ed6: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002ed8: 1ad3 subs r3, r2, r3 + 8002eda: 2b03 cmp r3, #3 + 8002edc: d901 bls.n 8002ee2 + { + return HAL_TIMEOUT; + 8002ede: 2303 movs r3, #3 + 8002ee0: e197 b.n 8003212 + while (LL_RCC_LSI2_IsReady() != 0U) + 8002ee2: f7ff fc32 bl 800274a + 8002ee6: 4603 mov r3, r0 + 8002ee8: 2b00 cmp r3, #0 + 8002eea: d1f1 bne.n 8002ed0 + } + } + + /* Disable the Internal Low Speed oscillator (LSI1). */ + __HAL_RCC_LSI1_DISABLE(); + 8002eec: f7ff fbe8 bl 80026c0 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002ef0: f7fe fd58 bl 80019a4 + 8002ef4: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till LSI1 is disabled */ + while (LL_RCC_LSI1_IsReady() != 0U) + 8002ef6: e008 b.n 8002f0a + { + if ((HAL_GetTick() - tickstart) > LSI1_TIMEOUT_VALUE) + 8002ef8: f7fe fd54 bl 80019a4 + 8002efc: 4602 mov r2, r0 + 8002efe: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002f00: 1ad3 subs r3, r2, r3 + 8002f02: 2b02 cmp r3, #2 + 8002f04: d901 bls.n 8002f0a + { + return HAL_TIMEOUT; + 8002f06: 2303 movs r3, #3 + 8002f08: e183 b.n 8003212 + while (LL_RCC_LSI1_IsReady() != 0U) + 8002f0a: f7ff fbea bl 80026e2 + 8002f0e: 4603 mov r3, r0 + 8002f10: 2b00 cmp r3, #0 + 8002f12: d1f1 bne.n 8002ef8 + } + } + } + + /*------------------------------ LSE Configuration -------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) + 8002f14: 687b ldr r3, [r7, #4] + 8002f16: 681b ldr r3, [r3, #0] + 8002f18: f003 0304 and.w r3, r3, #4 + 8002f1c: 2b00 cmp r3, #0 + 8002f1e: d05b beq.n 8002fd8 + assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); + + /* Update LSE configuration in Backup Domain control register */ + /* Requires to enable write access to Backup Domain of necessary */ + + if (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP)) + 8002f20: 4ba7 ldr r3, [pc, #668] @ (80031c0 ) + 8002f22: 681b ldr r3, [r3, #0] + 8002f24: f403 7380 and.w r3, r3, #256 @ 0x100 + 8002f28: 2b00 cmp r3, #0 + 8002f2a: d114 bne.n 8002f56 + { + /* Enable write access to Backup domain */ + HAL_PWR_EnableBkUpAccess(); + 8002f2c: f7ff fa5c bl 80023e8 + + /* Wait for Backup domain Write protection disable */ + tickstart = HAL_GetTick(); + 8002f30: f7fe fd38 bl 80019a4 + 8002f34: 6278 str r0, [r7, #36] @ 0x24 + + while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP)) + 8002f36: e008 b.n 8002f4a + { + if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) + 8002f38: f7fe fd34 bl 80019a4 + 8002f3c: 4602 mov r2, r0 + 8002f3e: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002f40: 1ad3 subs r3, r2, r3 + 8002f42: 2b02 cmp r3, #2 + 8002f44: d901 bls.n 8002f4a + { + return HAL_TIMEOUT; + 8002f46: 2303 movs r3, #3 + 8002f48: e163 b.n 8003212 + while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP)) + 8002f4a: 4b9d ldr r3, [pc, #628] @ (80031c0 ) + 8002f4c: 681b ldr r3, [r3, #0] + 8002f4e: f403 7380 and.w r3, r3, #256 @ 0x100 + 8002f52: 2b00 cmp r3, #0 + 8002f54: d0f0 beq.n 8002f38 + } + } + } + + /* Set the new LSE configuration -----------------------------------------*/ + __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); + 8002f56: 687b ldr r3, [r7, #4] + 8002f58: 689b ldr r3, [r3, #8] + 8002f5a: 2b01 cmp r3, #1 + 8002f5c: d102 bne.n 8002f64 + 8002f5e: f7ff fb48 bl 80025f2 + 8002f62: e00c b.n 8002f7e + 8002f64: 687b ldr r3, [r7, #4] + 8002f66: 689b ldr r3, [r3, #8] + 8002f68: 2b05 cmp r3, #5 + 8002f6a: d104 bne.n 8002f76 + 8002f6c: f7ff fb63 bl 8002636 + 8002f70: f7ff fb3f bl 80025f2 + 8002f74: e003 b.n 8002f7e + 8002f76: f7ff fb4d bl 8002614 + 8002f7a: f7ff fb6d bl 8002658 + + /* Check the LSE State */ + if (RCC_OscInitStruct->LSEState != RCC_LSE_OFF) + 8002f7e: 687b ldr r3, [r7, #4] + 8002f80: 689b ldr r3, [r3, #8] + 8002f82: 2b00 cmp r3, #0 + 8002f84: d014 beq.n 8002fb0 + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002f86: f7fe fd0d bl 80019a4 + 8002f8a: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till LSE is ready */ + while (LL_RCC_LSE_IsReady() == 0U) + 8002f8c: e00a b.n 8002fa4 + { + if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) + 8002f8e: f7fe fd09 bl 80019a4 + 8002f92: 4602 mov r2, r0 + 8002f94: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002f96: 1ad3 subs r3, r2, r3 + 8002f98: f241 3288 movw r2, #5000 @ 0x1388 + 8002f9c: 4293 cmp r3, r2 + 8002f9e: d901 bls.n 8002fa4 + { + return HAL_TIMEOUT; + 8002fa0: 2303 movs r3, #3 + 8002fa2: e136 b.n 8003212 + while (LL_RCC_LSE_IsReady() == 0U) + 8002fa4: f7ff fb69 bl 800267a + 8002fa8: 4603 mov r3, r0 + 8002faa: 2b00 cmp r3, #0 + 8002fac: d0ef beq.n 8002f8e + 8002fae: e013 b.n 8002fd8 + } + } + else + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002fb0: f7fe fcf8 bl 80019a4 + 8002fb4: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till LSE is disabled */ + while (LL_RCC_LSE_IsReady() != 0U) + 8002fb6: e00a b.n 8002fce + { + if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) + 8002fb8: f7fe fcf4 bl 80019a4 + 8002fbc: 4602 mov r2, r0 + 8002fbe: 6a7b ldr r3, [r7, #36] @ 0x24 + 8002fc0: 1ad3 subs r3, r2, r3 + 8002fc2: f241 3288 movw r2, #5000 @ 0x1388 + 8002fc6: 4293 cmp r3, r2 + 8002fc8: d901 bls.n 8002fce + { + return HAL_TIMEOUT; + 8002fca: 2303 movs r3, #3 + 8002fcc: e121 b.n 8003212 + while (LL_RCC_LSE_IsReady() != 0U) + 8002fce: f7ff fb54 bl 800267a + 8002fd2: 4603 mov r3, r0 + 8002fd4: 2b00 cmp r3, #0 + 8002fd6: d1ef bne.n 8002fb8 + } + + } +#if defined(RCC_HSI48_SUPPORT) + /*------------------------------ HSI48 Configuration -----------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48) + 8002fd8: 687b ldr r3, [r7, #4] + 8002fda: 681b ldr r3, [r3, #0] + 8002fdc: f003 0340 and.w r3, r3, #64 @ 0x40 + 8002fe0: 2b00 cmp r3, #0 + 8002fe2: d02c beq.n 800303e + { + /* Check the parameters */ + assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State)); + + /* Check the HSI State */ + if (RCC_OscInitStruct->HSI48State != RCC_HSI48_OFF) + 8002fe4: 687b ldr r3, [r7, #4] + 8002fe6: 6a9b ldr r3, [r3, #40] @ 0x28 + 8002fe8: 2b00 cmp r3, #0 + 8002fea: d014 beq.n 8003016 + { + /* Enable the Internal Low Speed oscillator (HSI48). */ + __HAL_RCC_HSI48_ENABLE(); + 8002fec: f7ff facd bl 800258a + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8002ff0: f7fe fcd8 bl 80019a4 + 8002ff4: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till HSI48 is ready */ + while (LL_RCC_HSI48_IsReady() == 0U) + 8002ff6: e008 b.n 800300a + { + if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) + 8002ff8: f7fe fcd4 bl 80019a4 + 8002ffc: 4602 mov r2, r0 + 8002ffe: 6a7b ldr r3, [r7, #36] @ 0x24 + 8003000: 1ad3 subs r3, r2, r3 + 8003002: 2b02 cmp r3, #2 + 8003004: d901 bls.n 800300a + { + return HAL_TIMEOUT; + 8003006: 2303 movs r3, #3 + 8003008: e103 b.n 8003212 + while (LL_RCC_HSI48_IsReady() == 0U) + 800300a: f7ff fae0 bl 80025ce + 800300e: 4603 mov r3, r0 + 8003010: 2b00 cmp r3, #0 + 8003012: d0f1 beq.n 8002ff8 + 8003014: e013 b.n 800303e + } + } + else + { + /* Disable the Internal Low Speed oscillator (HSI48). */ + __HAL_RCC_HSI48_DISABLE(); + 8003016: f7ff fac9 bl 80025ac + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 800301a: f7fe fcc3 bl 80019a4 + 800301e: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till HSI48 is disabled */ + while (LL_RCC_HSI48_IsReady() != 0U) + 8003020: e008 b.n 8003034 + { + if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) + 8003022: f7fe fcbf bl 80019a4 + 8003026: 4602 mov r2, r0 + 8003028: 6a7b ldr r3, [r7, #36] @ 0x24 + 800302a: 1ad3 subs r3, r2, r3 + 800302c: 2b02 cmp r3, #2 + 800302e: d901 bls.n 8003034 + { + return HAL_TIMEOUT; + 8003030: 2303 movs r3, #3 + 8003032: e0ee b.n 8003212 + while (LL_RCC_HSI48_IsReady() != 0U) + 8003034: f7ff facb bl 80025ce + 8003038: 4603 mov r3, r0 + 800303a: 2b00 cmp r3, #0 + 800303c: d1f1 bne.n 8003022 +#endif /* RCC_HSI48_SUPPORT */ + /*-------------------------------- PLL Configuration -----------------------*/ + /* Check the parameters */ + assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); + + if (RCC_OscInitStruct->PLL.PLLState != RCC_PLL_NONE) + 800303e: 687b ldr r3, [r7, #4] + 8003040: 6adb ldr r3, [r3, #44] @ 0x2c + 8003042: 2b00 cmp r3, #0 + 8003044: f000 80e4 beq.w 8003210 + { + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + 8003048: f7ff fc29 bl 800289e + 800304c: 6138 str r0, [r7, #16] + const uint32_t temp_pllconfig = RCC->PLLCFGR; + 800304e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003052: 68db ldr r3, [r3, #12] + 8003054: 60fb str r3, [r7, #12] + + /* PLL On ? */ + if (RCC_OscInitStruct->PLL.PLLState == RCC_PLL_ON) + 8003056: 687b ldr r3, [r7, #4] + 8003058: 6adb ldr r3, [r3, #44] @ 0x2c + 800305a: 2b02 cmp r3, #2 + 800305c: f040 80b4 bne.w 80031c8 + assert_param(IS_RCC_PLLP_VALUE(RCC_OscInitStruct->PLL.PLLP)); + assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ)); + assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR)); + + /* Do nothing if PLL configuration is unchanged */ + if ((READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || + 8003060: 68fb ldr r3, [r7, #12] + 8003062: f003 0203 and.w r2, r3, #3 + 8003066: 687b ldr r3, [r7, #4] + 8003068: 6b1b ldr r3, [r3, #48] @ 0x30 + 800306a: 429a cmp r2, r3 + 800306c: d123 bne.n 80030b6 + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) || + 800306e: 68fb ldr r3, [r7, #12] + 8003070: f003 0270 and.w r2, r3, #112 @ 0x70 + 8003074: 687b ldr r3, [r7, #4] + 8003076: 6b5b ldr r3, [r3, #52] @ 0x34 + if ((READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || + 8003078: 429a cmp r2, r3 + 800307a: d11c bne.n 80030b6 + ((READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos) != RCC_OscInitStruct->PLL.PLLN) || + 800307c: 68fb ldr r3, [r7, #12] + 800307e: 0a1b lsrs r3, r3, #8 + 8003080: f003 027f and.w r2, r3, #127 @ 0x7f + 8003084: 687b ldr r3, [r7, #4] + 8003086: 6b9b ldr r3, [r3, #56] @ 0x38 + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) || + 8003088: 429a cmp r2, r3 + 800308a: d114 bne.n 80030b6 + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLP) != RCC_OscInitStruct->PLL.PLLP) || + 800308c: 68fb ldr r3, [r7, #12] + 800308e: f403 1278 and.w r2, r3, #4063232 @ 0x3e0000 + 8003092: 687b ldr r3, [r7, #4] + 8003094: 6bdb ldr r3, [r3, #60] @ 0x3c + ((READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos) != RCC_OscInitStruct->PLL.PLLN) || + 8003096: 429a cmp r2, r3 + 8003098: d10d bne.n 80030b6 + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLQ) != RCC_OscInitStruct->PLL.PLLQ) || + 800309a: 68fb ldr r3, [r7, #12] + 800309c: f003 6260 and.w r2, r3, #234881024 @ 0xe000000 + 80030a0: 687b ldr r3, [r7, #4] + 80030a2: 6c1b ldr r3, [r3, #64] @ 0x40 + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLP) != RCC_OscInitStruct->PLL.PLLP) || + 80030a4: 429a cmp r2, r3 + 80030a6: d106 bne.n 80030b6 + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLR) != RCC_OscInitStruct->PLL.PLLR)) + 80030a8: 68fb ldr r3, [r7, #12] + 80030aa: f003 4260 and.w r2, r3, #3758096384 @ 0xe0000000 + 80030ae: 687b ldr r3, [r7, #4] + 80030b0: 6c5b ldr r3, [r3, #68] @ 0x44 + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLQ) != RCC_OscInitStruct->PLL.PLLQ) || + 80030b2: 429a cmp r2, r3 + 80030b4: d05d beq.n 8003172 + { + /* Check if the PLL is used as system clock or not */ + if (temp_sysclksrc != RCC_SYSCLKSOURCE_STATUS_PLLCLK) + 80030b6: 693b ldr r3, [r7, #16] + 80030b8: 2b0c cmp r3, #12 + 80030ba: d058 beq.n 800316e + { +#if defined(SAI1) + /* Check if main PLL can be updated */ + /* Not possible if the source is shared by other enabled PLLSAIx */ + if (READ_BIT(RCC->CR, RCC_CR_PLLSAI1ON) != 0U) + 80030bc: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80030c0: 681b ldr r3, [r3, #0] + 80030c2: f003 6380 and.w r3, r3, #67108864 @ 0x4000000 + 80030c6: 2b00 cmp r3, #0 + 80030c8: d001 beq.n 80030ce + + { + return HAL_ERROR; + 80030ca: 2301 movs r3, #1 + 80030cc: e0a1 b.n 8003212 + } + else +#endif /* SAI1 */ + { + /* Disable the main PLL. */ + __HAL_RCC_PLL_DISABLE(); + 80030ce: f7ff fc84 bl 80029da + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 80030d2: f7fe fc67 bl 80019a4 + 80030d6: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till PLL is ready */ + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U) + 80030d8: e008 b.n 80030ec + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + 80030da: f7fe fc63 bl 80019a4 + 80030de: 4602 mov r2, r0 + 80030e0: 6a7b ldr r3, [r7, #36] @ 0x24 + 80030e2: 1ad3 subs r3, r2, r3 + 80030e4: 2b02 cmp r3, #2 + 80030e6: d901 bls.n 80030ec + { + return HAL_TIMEOUT; + 80030e8: 2303 movs r3, #3 + 80030ea: e092 b.n 8003212 + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U) + 80030ec: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80030f0: 681b ldr r3, [r3, #0] + 80030f2: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 + 80030f6: 2b00 cmp r3, #0 + 80030f8: d1ef bne.n 80030da + } + } + + /* Configure the main PLL clock source, multiplication and division factors. */ + __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, + 80030fa: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80030fe: 68da ldr r2, [r3, #12] + 8003100: 4b30 ldr r3, [pc, #192] @ (80031c4 ) + 8003102: 4013 ands r3, r2 + 8003104: 687a ldr r2, [r7, #4] + 8003106: 6b11 ldr r1, [r2, #48] @ 0x30 + 8003108: 687a ldr r2, [r7, #4] + 800310a: 6b52 ldr r2, [r2, #52] @ 0x34 + 800310c: 4311 orrs r1, r2 + 800310e: 687a ldr r2, [r7, #4] + 8003110: 6b92 ldr r2, [r2, #56] @ 0x38 + 8003112: 0212 lsls r2, r2, #8 + 8003114: 4311 orrs r1, r2 + 8003116: 687a ldr r2, [r7, #4] + 8003118: 6bd2 ldr r2, [r2, #60] @ 0x3c + 800311a: 4311 orrs r1, r2 + 800311c: 687a ldr r2, [r7, #4] + 800311e: 6c12 ldr r2, [r2, #64] @ 0x40 + 8003120: 4311 orrs r1, r2 + 8003122: 687a ldr r2, [r7, #4] + 8003124: 6c52 ldr r2, [r2, #68] @ 0x44 + 8003126: 430a orrs r2, r1 + 8003128: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800312c: 4313 orrs r3, r2 + 800312e: 60cb str r3, [r1, #12] + RCC_OscInitStruct->PLL.PLLP, + RCC_OscInitStruct->PLL.PLLQ, + RCC_OscInitStruct->PLL.PLLR); + + /* Enable the main PLL. */ + __HAL_RCC_PLL_ENABLE(); + 8003130: f7ff fc44 bl 80029bc + + /* Enable PLL System Clock output. */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SYSCLK); + 8003134: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003138: 68db ldr r3, [r3, #12] + 800313a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 800313e: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000 + 8003142: 60d3 str r3, [r2, #12] + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003144: f7fe fc2e bl 80019a4 + 8003148: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till PLL is ready */ + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U) + 800314a: e008 b.n 800315e + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + 800314c: f7fe fc2a bl 80019a4 + 8003150: 4602 mov r2, r0 + 8003152: 6a7b ldr r3, [r7, #36] @ 0x24 + 8003154: 1ad3 subs r3, r2, r3 + 8003156: 2b02 cmp r3, #2 + 8003158: d901 bls.n 800315e + { + return HAL_TIMEOUT; + 800315a: 2303 movs r3, #3 + 800315c: e059 b.n 8003212 + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U) + 800315e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003162: 681b ldr r3, [r3, #0] + 8003164: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 + 8003168: 2b00 cmp r3, #0 + 800316a: d0ef beq.n 800314c + if (temp_sysclksrc != RCC_SYSCLKSOURCE_STATUS_PLLCLK) + 800316c: e050 b.n 8003210 + } + } + else + { + /* PLL is already used as System core clock */ + return HAL_ERROR; + 800316e: 2301 movs r3, #1 + 8003170: e04f b.n 8003212 + } + else + { + /* PLL configuration is unchanged */ + /* Re-enable PLL if it was disabled (ie. low power mode) */ + if (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U) + 8003172: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003176: 681b ldr r3, [r3, #0] + 8003178: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 + 800317c: 2b00 cmp r3, #0 + 800317e: d147 bne.n 8003210 + { + /* Enable the main PLL. */ + __HAL_RCC_PLL_ENABLE(); + 8003180: f7ff fc1c bl 80029bc + + /* Enable PLL System Clock output. */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SYSCLK); + 8003184: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003188: 68db ldr r3, [r3, #12] + 800318a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 800318e: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000 + 8003192: 60d3 str r3, [r2, #12] + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003194: f7fe fc06 bl 80019a4 + 8003198: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till PLL is ready */ + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U) + 800319a: e008 b.n 80031ae + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + 800319c: f7fe fc02 bl 80019a4 + 80031a0: 4602 mov r2, r0 + 80031a2: 6a7b ldr r3, [r7, #36] @ 0x24 + 80031a4: 1ad3 subs r3, r2, r3 + 80031a6: 2b02 cmp r3, #2 + 80031a8: d901 bls.n 80031ae + { + return HAL_TIMEOUT; + 80031aa: 2303 movs r3, #3 + 80031ac: e031 b.n 8003212 + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U) + 80031ae: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80031b2: 681b ldr r3, [r3, #0] + 80031b4: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 + 80031b8: 2b00 cmp r3, #0 + 80031ba: d0ef beq.n 800319c + 80031bc: e028 b.n 8003210 + 80031be: bf00 nop + 80031c0: 58000400 .word 0x58000400 + 80031c4: 11c1808c .word 0x11c1808c + } + } + else + { + /* Check that PLL is not used as system clock or not */ + if (temp_sysclksrc != RCC_SYSCLKSOURCE_STATUS_PLLCLK) + 80031c8: 693b ldr r3, [r7, #16] + 80031ca: 2b0c cmp r3, #12 + 80031cc: d01e beq.n 800320c + { + /* Disable the main PLL. */ + __HAL_RCC_PLL_DISABLE(); + 80031ce: f7ff fc04 bl 80029da + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 80031d2: f7fe fbe7 bl 80019a4 + 80031d6: 6278 str r0, [r7, #36] @ 0x24 + + /* Wait till PLL is disabled */ + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U) + 80031d8: e008 b.n 80031ec + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + 80031da: f7fe fbe3 bl 80019a4 + 80031de: 4602 mov r2, r0 + 80031e0: 6a7b ldr r3, [r7, #36] @ 0x24 + 80031e2: 1ad3 subs r3, r2, r3 + 80031e4: 2b02 cmp r3, #2 + 80031e6: d901 bls.n 80031ec + { + return HAL_TIMEOUT; + 80031e8: 2303 movs r3, #3 + 80031ea: e012 b.n 8003212 + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U) + 80031ec: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80031f0: 681b ldr r3, [r3, #0] + 80031f2: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 + 80031f6: 2b00 cmp r3, #0 + 80031f8: d1ef bne.n 80031da + } + } + + /* Disable the PLL source and outputs to save power when PLL is off */ +#if defined(SAI1) && defined(USB) + CLEAR_BIT(RCC->PLLCFGR, (RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLPEN | RCC_PLLCFGR_PLLQEN | RCC_PLLCFGR_PLLREN)); + 80031fa: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80031fe: 68da ldr r2, [r3, #12] + 8003200: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003204: 4b05 ldr r3, [pc, #20] @ (800321c ) + 8003206: 4013 ands r3, r2 + 8003208: 60cb str r3, [r1, #12] + 800320a: e001 b.n 8003210 +#endif /* SAI1 && USB */ + } + else + { + /* PLL is already used as System core clock */ + return HAL_ERROR; + 800320c: 2301 movs r3, #1 + 800320e: e000 b.n 8003212 + } + } + } + return HAL_OK; + 8003210: 2300 movs r3, #0 +} + 8003212: 4618 mov r0, r3 + 8003214: 3734 adds r7, #52 @ 0x34 + 8003216: 46bd mov sp, r7 + 8003218: bd90 pop {r4, r7, pc} + 800321a: bf00 nop + 800321c: eefefffc .word 0xeefefffc + +08003220 : + * HPRE[3:0] bits to ensure that HCLK1 not exceed the maximum allowed frequency + * (for more details refer to section above "Initialization/de-initialization functions") + * @retval None + */ +HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency) +{ + 8003220: b580 push {r7, lr} + 8003222: b084 sub sp, #16 + 8003224: af00 add r7, sp, #0 + 8003226: 6078 str r0, [r7, #4] + 8003228: 6039 str r1, [r7, #0] + uint32_t tickstart; + + /* Check Null pointer */ + if (RCC_ClkInitStruct == NULL) + 800322a: 687b ldr r3, [r7, #4] + 800322c: 2b00 cmp r3, #0 + 800322e: d101 bne.n 8003234 + { + return HAL_ERROR; + 8003230: 2301 movs r3, #1 + 8003232: e12d b.n 8003490 + /* To correctly read data from FLASH memory, the number of wait states (LATENCY) + must be correctly programmed according to the frequency of the FLASH clock + (HCLK4) and the supply voltage of the device. */ + + /* Increasing the number of wait states because of higher CPU frequency */ + if (FLatency > __HAL_FLASH_GET_LATENCY()) + 8003234: 4b98 ldr r3, [pc, #608] @ (8003498 ) + 8003236: 681b ldr r3, [r3, #0] + 8003238: f003 0307 and.w r3, r3, #7 + 800323c: 683a ldr r2, [r7, #0] + 800323e: 429a cmp r2, r3 + 8003240: d91b bls.n 800327a + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + __HAL_FLASH_SET_LATENCY(FLatency); + 8003242: 4b95 ldr r3, [pc, #596] @ (8003498 ) + 8003244: 681b ldr r3, [r3, #0] + 8003246: f023 0207 bic.w r2, r3, #7 + 800324a: 4993 ldr r1, [pc, #588] @ (8003498 ) + 800324c: 683b ldr r3, [r7, #0] + 800324e: 4313 orrs r3, r2 + 8003250: 600b str r3, [r1, #0] + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003252: f7fe fba7 bl 80019a4 + 8003256: 60f8 str r0, [r7, #12] + + /* Check that the new number of wait states is taken into account to access the Flash + memory by reading the FLASH_ACR register */ + while (__HAL_FLASH_GET_LATENCY() != FLatency) + 8003258: e008 b.n 800326c + { + if ((HAL_GetTick() - tickstart) > LATENCY_TIMEOUT_VALUE) + 800325a: f7fe fba3 bl 80019a4 + 800325e: 4602 mov r2, r0 + 8003260: 68fb ldr r3, [r7, #12] + 8003262: 1ad3 subs r3, r2, r3 + 8003264: 2b02 cmp r3, #2 + 8003266: d901 bls.n 800326c + { + return HAL_TIMEOUT; + 8003268: 2303 movs r3, #3 + 800326a: e111 b.n 8003490 + while (__HAL_FLASH_GET_LATENCY() != FLatency) + 800326c: 4b8a ldr r3, [pc, #552] @ (8003498 ) + 800326e: 681b ldr r3, [r3, #0] + 8003270: f003 0307 and.w r3, r3, #7 + 8003274: 683a ldr r2, [r7, #0] + 8003276: 429a cmp r2, r3 + 8003278: d1ef bne.n 800325a + } + } + } + + /*-------------------------- HCLK1 Configuration --------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) + 800327a: 687b ldr r3, [r7, #4] + 800327c: 681b ldr r3, [r3, #0] + 800327e: f003 0302 and.w r3, r3, #2 + 8003282: 2b00 cmp r3, #0 + 8003284: d016 beq.n 80032b4 + { + assert_param(IS_RCC_HCLKx(RCC_ClkInitStruct->AHBCLKDivider)); + LL_RCC_SetAHBPrescaler(RCC_ClkInitStruct->AHBCLKDivider); + 8003286: 687b ldr r3, [r7, #4] + 8003288: 689b ldr r3, [r3, #8] + 800328a: 4618 mov r0, r3 + 800328c: f7ff fb13 bl 80028b6 + + /* HCLK1 prescaler flag when value applied */ + tickstart = HAL_GetTick(); + 8003290: f7fe fb88 bl 80019a4 + 8003294: 60f8 str r0, [r7, #12] + while (LL_RCC_IsActiveFlag_HPRE() == 0U) + 8003296: e008 b.n 80032aa + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + 8003298: f7fe fb84 bl 80019a4 + 800329c: 4602 mov r2, r0 + 800329e: 68fb ldr r3, [r7, #12] + 80032a0: 1ad3 subs r3, r2, r3 + 80032a2: 2b02 cmp r3, #2 + 80032a4: d901 bls.n 80032aa + { + return HAL_TIMEOUT; + 80032a6: 2303 movs r3, #3 + 80032a8: e0f2 b.n 8003490 + while (LL_RCC_IsActiveFlag_HPRE() == 0U) + 80032aa: f7ff fbe8 bl 8002a7e + 80032ae: 4603 mov r3, r0 + 80032b0: 2b00 cmp r3, #0 + 80032b2: d0f1 beq.n 8003298 + } + } + } + + /*-------------------------- HCLK2 Configuration --------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK2) == RCC_CLOCKTYPE_HCLK2) + 80032b4: 687b ldr r3, [r7, #4] + 80032b6: 681b ldr r3, [r3, #0] + 80032b8: f003 0320 and.w r3, r3, #32 + 80032bc: 2b00 cmp r3, #0 + 80032be: d016 beq.n 80032ee + { + assert_param(IS_RCC_HCLKx(RCC_ClkInitStruct->AHBCLK2Divider)); + LL_C2_RCC_SetAHBPrescaler(RCC_ClkInitStruct->AHBCLK2Divider); + 80032c0: 687b ldr r3, [r7, #4] + 80032c2: 695b ldr r3, [r3, #20] + 80032c4: 4618 mov r0, r3 + 80032c6: f7ff fb0a bl 80028de + + /* HCLK2 prescaler flag when value applied */ + tickstart = HAL_GetTick(); + 80032ca: f7fe fb6b bl 80019a4 + 80032ce: 60f8 str r0, [r7, #12] + while (LL_RCC_IsActiveFlag_C2HPRE() == 0U) + 80032d0: e008 b.n 80032e4 + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + 80032d2: f7fe fb67 bl 80019a4 + 80032d6: 4602 mov r2, r0 + 80032d8: 68fb ldr r3, [r7, #12] + 80032da: 1ad3 subs r3, r2, r3 + 80032dc: 2b02 cmp r3, #2 + 80032de: d901 bls.n 80032e4 + { + return HAL_TIMEOUT; + 80032e0: 2303 movs r3, #3 + 80032e2: e0d5 b.n 8003490 + while (LL_RCC_IsActiveFlag_C2HPRE() == 0U) + 80032e4: f7ff fbdd bl 8002aa2 + 80032e8: 4603 mov r3, r0 + 80032ea: 2b00 cmp r3, #0 + 80032ec: d0f1 beq.n 80032d2 + } + } + } + /*-------------------------- HCLK4 Configuration --------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK4) == RCC_CLOCKTYPE_HCLK4) + 80032ee: 687b ldr r3, [r7, #4] + 80032f0: 681b ldr r3, [r3, #0] + 80032f2: f003 0340 and.w r3, r3, #64 @ 0x40 + 80032f6: 2b00 cmp r3, #0 + 80032f8: d016 beq.n 8003328 + { + assert_param(IS_RCC_HCLKx(RCC_ClkInitStruct->AHBCLK4Divider)); + LL_RCC_SetAHB4Prescaler(RCC_ClkInitStruct->AHBCLK4Divider); + 80032fa: 687b ldr r3, [r7, #4] + 80032fc: 699b ldr r3, [r3, #24] + 80032fe: 4618 mov r0, r3 + 8003300: f7ff fb03 bl 800290a + + /* AHB shared prescaler flag when value applied */ + tickstart = HAL_GetTick(); + 8003304: f7fe fb4e bl 80019a4 + 8003308: 60f8 str r0, [r7, #12] + while (LL_RCC_IsActiveFlag_SHDHPRE() == 0U) + 800330a: e008 b.n 800331e + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + 800330c: f7fe fb4a bl 80019a4 + 8003310: 4602 mov r2, r0 + 8003312: 68fb ldr r3, [r7, #12] + 8003314: 1ad3 subs r3, r2, r3 + 8003316: 2b02 cmp r3, #2 + 8003318: d901 bls.n 800331e + { + return HAL_TIMEOUT; + 800331a: 2303 movs r3, #3 + 800331c: e0b8 b.n 8003490 + while (LL_RCC_IsActiveFlag_SHDHPRE() == 0U) + 800331e: f7ff fbd3 bl 8002ac8 + 8003322: 4603 mov r3, r0 + 8003324: 2b00 cmp r3, #0 + 8003326: d0f1 beq.n 800330c + } + } + } + + /*-------------------------- PCLK1 Configuration ---------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) + 8003328: 687b ldr r3, [r7, #4] + 800332a: 681b ldr r3, [r3, #0] + 800332c: f003 0304 and.w r3, r3, #4 + 8003330: 2b00 cmp r3, #0 + 8003332: d016 beq.n 8003362 + { + assert_param(IS_RCC_PCLKx(RCC_ClkInitStruct->APB1CLKDivider)); + LL_RCC_SetAPB1Prescaler(RCC_ClkInitStruct->APB1CLKDivider); + 8003334: 687b ldr r3, [r7, #4] + 8003336: 68db ldr r3, [r3, #12] + 8003338: 4618 mov r0, r3 + 800333a: f7ff fafd bl 8002938 + + /* APB1 prescaler flag when value applied */ + tickstart = HAL_GetTick(); + 800333e: f7fe fb31 bl 80019a4 + 8003342: 60f8 str r0, [r7, #12] + while (LL_RCC_IsActiveFlag_PPRE1() == 0U) + 8003344: e008 b.n 8003358 + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + 8003346: f7fe fb2d bl 80019a4 + 800334a: 4602 mov r2, r0 + 800334c: 68fb ldr r3, [r7, #12] + 800334e: 1ad3 subs r3, r2, r3 + 8003350: 2b02 cmp r3, #2 + 8003352: d901 bls.n 8003358 + { + return HAL_TIMEOUT; + 8003354: 2303 movs r3, #3 + 8003356: e09b b.n 8003490 + while (LL_RCC_IsActiveFlag_PPRE1() == 0U) + 8003358: f7ff fbc9 bl 8002aee + 800335c: 4603 mov r3, r0 + 800335e: 2b00 cmp r3, #0 + 8003360: d0f1 beq.n 8003346 + } + } + } + + /*-------------------------- PCLK2 Configuration ---------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) + 8003362: 687b ldr r3, [r7, #4] + 8003364: 681b ldr r3, [r3, #0] + 8003366: f003 0308 and.w r3, r3, #8 + 800336a: 2b00 cmp r3, #0 + 800336c: d017 beq.n 800339e + { + assert_param(IS_RCC_PCLKx(RCC_ClkInitStruct->APB2CLKDivider)); + LL_RCC_SetAPB2Prescaler((RCC_ClkInitStruct->APB2CLKDivider) << 3U); + 800336e: 687b ldr r3, [r7, #4] + 8003370: 691b ldr r3, [r3, #16] + 8003372: 00db lsls r3, r3, #3 + 8003374: 4618 mov r0, r3 + 8003376: f7ff faf3 bl 8002960 + + /* APB2 prescaler flag when value applied */ + tickstart = HAL_GetTick(); + 800337a: f7fe fb13 bl 80019a4 + 800337e: 60f8 str r0, [r7, #12] + while (LL_RCC_IsActiveFlag_PPRE2() == 0U) + 8003380: e008 b.n 8003394 + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + 8003382: f7fe fb0f bl 80019a4 + 8003386: 4602 mov r2, r0 + 8003388: 68fb ldr r3, [r7, #12] + 800338a: 1ad3 subs r3, r2, r3 + 800338c: 2b02 cmp r3, #2 + 800338e: d901 bls.n 8003394 + { + return HAL_TIMEOUT; + 8003390: 2303 movs r3, #3 + 8003392: e07d b.n 8003490 + while (LL_RCC_IsActiveFlag_PPRE2() == 0U) + 8003394: f7ff fbbd bl 8002b12 + 8003398: 4603 mov r3, r0 + 800339a: 2b00 cmp r3, #0 + 800339c: d0f1 beq.n 8003382 + } + } + } + + /*------------------------- SYSCLK Configuration ---------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) + 800339e: 687b ldr r3, [r7, #4] + 80033a0: 681b ldr r3, [r3, #0] + 80033a2: f003 0301 and.w r3, r3, #1 + 80033a6: 2b00 cmp r3, #0 + 80033a8: d043 beq.n 8003432 + { + assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); + + /* HSE is selected as System Clock Source */ + if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) + 80033aa: 687b ldr r3, [r7, #4] + 80033ac: 685b ldr r3, [r3, #4] + 80033ae: 2b02 cmp r3, #2 + 80033b0: d106 bne.n 80033c0 + { + /* Check the HSE ready flag */ + if (LL_RCC_HSE_IsReady() == 0U) + 80033b2: f7ff f893 bl 80024dc + 80033b6: 4603 mov r3, r0 + 80033b8: 2b00 cmp r3, #0 + 80033ba: d11e bne.n 80033fa + { + return HAL_ERROR; + 80033bc: 2301 movs r3, #1 + 80033be: e067 b.n 8003490 + } + } + /* PLL is selected as System Clock Source */ + else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) + 80033c0: 687b ldr r3, [r7, #4] + 80033c2: 685b ldr r3, [r3, #4] + 80033c4: 2b03 cmp r3, #3 + 80033c6: d106 bne.n 80033d6 + { + /* Check the PLL ready flag */ + if (LL_RCC_PLL_IsReady() == 0U) + 80033c8: f7ff fb16 bl 80029f8 + 80033cc: 4603 mov r3, r0 + 80033ce: 2b00 cmp r3, #0 + 80033d0: d113 bne.n 80033fa + { + return HAL_ERROR; + 80033d2: 2301 movs r3, #1 + 80033d4: e05c b.n 8003490 + } + } + /* MSI is selected as System Clock Source */ + else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_MSI) + 80033d6: 687b ldr r3, [r7, #4] + 80033d8: 685b ldr r3, [r3, #4] + 80033da: 2b00 cmp r3, #0 + 80033dc: d106 bne.n 80033ec + { + /* Check the MSI ready flag */ + if (LL_RCC_MSI_IsReady() == 0U) + 80033de: f7ff f9fb bl 80027d8 + 80033e2: 4603 mov r3, r0 + 80033e4: 2b00 cmp r3, #0 + 80033e6: d108 bne.n 80033fa + { + return HAL_ERROR; + 80033e8: 2301 movs r3, #1 + 80033ea: e051 b.n 8003490 + } + /* HSI is selected as System Clock Source */ + else + { + /* Check the HSI ready flag */ + if (LL_RCC_HSI_IsReady() == 0U) + 80033ec: f7ff f8a6 bl 800253c + 80033f0: 4603 mov r3, r0 + 80033f2: 2b00 cmp r3, #0 + 80033f4: d101 bne.n 80033fa + { + return HAL_ERROR; + 80033f6: 2301 movs r3, #1 + 80033f8: e04a b.n 8003490 + } + + } + + /* apply system clock switch */ + LL_RCC_SetSysClkSource(RCC_ClkInitStruct->SYSCLKSource); + 80033fa: 687b ldr r3, [r7, #4] + 80033fc: 685b ldr r3, [r3, #4] + 80033fe: 4618 mov r0, r3 + 8003400: f7ff fa39 bl 8002876 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003404: f7fe face bl 80019a4 + 8003408: 60f8 str r0, [r7, #12] + + /* check system clock source switch status */ + while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) + 800340a: e00a b.n 8003422 + { + if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) + 800340c: f7fe faca bl 80019a4 + 8003410: 4602 mov r2, r0 + 8003412: 68fb ldr r3, [r7, #12] + 8003414: 1ad3 subs r3, r2, r3 + 8003416: f241 3288 movw r2, #5000 @ 0x1388 + 800341a: 4293 cmp r3, r2 + 800341c: d901 bls.n 8003422 + { + return HAL_TIMEOUT; + 800341e: 2303 movs r3, #3 + 8003420: e036 b.n 8003490 + while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) + 8003422: f7ff fa3c bl 800289e + 8003426: 4602 mov r2, r0 + 8003428: 687b ldr r3, [r7, #4] + 800342a: 685b ldr r3, [r3, #4] + 800342c: 009b lsls r3, r3, #2 + 800342e: 429a cmp r2, r3 + 8003430: d1ec bne.n 800340c + } + } + } + + /* Decreasing the number of wait states because of lower CPU frequency */ + if (FLatency < __HAL_FLASH_GET_LATENCY()) + 8003432: 4b19 ldr r3, [pc, #100] @ (8003498 ) + 8003434: 681b ldr r3, [r3, #0] + 8003436: f003 0307 and.w r3, r3, #7 + 800343a: 683a ldr r2, [r7, #0] + 800343c: 429a cmp r2, r3 + 800343e: d21b bcs.n 8003478 + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + __HAL_FLASH_SET_LATENCY(FLatency); + 8003440: 4b15 ldr r3, [pc, #84] @ (8003498 ) + 8003442: 681b ldr r3, [r3, #0] + 8003444: f023 0207 bic.w r2, r3, #7 + 8003448: 4913 ldr r1, [pc, #76] @ (8003498 ) + 800344a: 683b ldr r3, [r7, #0] + 800344c: 4313 orrs r3, r2 + 800344e: 600b str r3, [r1, #0] + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003450: f7fe faa8 bl 80019a4 + 8003454: 60f8 str r0, [r7, #12] + + /* Check that the new number of wait states is taken into account to access the Flash + memory by reading the FLASH_ACR register */ + while (__HAL_FLASH_GET_LATENCY() != FLatency) + 8003456: e008 b.n 800346a + { + if ((HAL_GetTick() - tickstart) > LATENCY_TIMEOUT_VALUE) + 8003458: f7fe faa4 bl 80019a4 + 800345c: 4602 mov r2, r0 + 800345e: 68fb ldr r3, [r7, #12] + 8003460: 1ad3 subs r3, r2, r3 + 8003462: 2b02 cmp r3, #2 + 8003464: d901 bls.n 800346a + { + return HAL_TIMEOUT; + 8003466: 2303 movs r3, #3 + 8003468: e012 b.n 8003490 + while (__HAL_FLASH_GET_LATENCY() != FLatency) + 800346a: 4b0b ldr r3, [pc, #44] @ (8003498 ) + 800346c: 681b ldr r3, [r3, #0] + 800346e: f003 0307 and.w r3, r3, #7 + 8003472: 683a ldr r2, [r7, #0] + 8003474: 429a cmp r2, r3 + 8003476: d1ef bne.n 8003458 + } + + /*---------------------------------------------------------------------------*/ + + /* Update the SystemCoreClock global variable */ + SystemCoreClock = HAL_RCC_GetHCLKFreq(); + 8003478: f000 f87e bl 8003578 + 800347c: 4603 mov r3, r0 + 800347e: 4a07 ldr r2, [pc, #28] @ (800349c ) + 8003480: 6013 str r3, [r2, #0] + + /* Configure the source of time base considering new system clocks settings*/ + return HAL_InitTick(HAL_GetTickPrio()); + 8003482: f7fe fa9b bl 80019bc + 8003486: 4603 mov r3, r0 + 8003488: 4618 mov r0, r3 + 800348a: f7fe fa3d bl 8001908 + 800348e: 4603 mov r3, r0 +} + 8003490: 4618 mov r0, r3 + 8003492: 3710 adds r7, #16 + 8003494: 46bd mov sp, r7 + 8003496: bd80 pop {r7, pc} + 8003498: 58004000 .word 0x58004000 + 800349c: 20000008 .word 0x20000008 + +080034a0 : + * + * + * @retval SYSCLK frequency + */ +uint32_t HAL_RCC_GetSysClockFreq(void) +{ + 80034a0: b590 push {r4, r7, lr} + 80034a2: b085 sub sp, #20 + 80034a4: af00 add r7, sp, #0 + uint32_t pllsource; + uint32_t sysclockfreq; + uint32_t pllinputfreq; + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + 80034a6: f7ff f9fa bl 800289e + 80034aa: 6078 str r0, [r7, #4] + + if (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_MSI) + 80034ac: 687b ldr r3, [r7, #4] + 80034ae: 2b00 cmp r3, #0 + 80034b0: d10a bne.n 80034c8 + { + /* Retrieve MSI frequency range in HZ*/ + /* MSI used as system clock source */ + sysclockfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + 80034b2: f7ff f9b6 bl 8002822 + 80034b6: 4603 mov r3, r0 + 80034b8: 091b lsrs r3, r3, #4 + 80034ba: f003 030f and.w r3, r3, #15 + 80034be: 4a2b ldr r2, [pc, #172] @ (800356c ) + 80034c0: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80034c4: 60fb str r3, [r7, #12] + 80034c6: e04b b.n 8003560 + } + else if (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSI) + 80034c8: 687b ldr r3, [r7, #4] + 80034ca: 2b04 cmp r3, #4 + 80034cc: d102 bne.n 80034d4 + { + /* HSI used as system clock source */ + sysclockfreq = HSI_VALUE; + 80034ce: 4b28 ldr r3, [pc, #160] @ (8003570 ) + 80034d0: 60fb str r3, [r7, #12] + 80034d2: e045 b.n 8003560 + } + else if (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSE) + 80034d4: 687b ldr r3, [r7, #4] + 80034d6: 2b08 cmp r3, #8 + 80034d8: d10a bne.n 80034f0 + { + /* HSE used as system clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + 80034da: f7fe ffcf bl 800247c + 80034de: 4603 mov r3, r0 + 80034e0: 2b01 cmp r3, #1 + 80034e2: d102 bne.n 80034ea + { + sysclockfreq = HSE_VALUE / 2U; + 80034e4: 4b22 ldr r3, [pc, #136] @ (8003570 ) + 80034e6: 60fb str r3, [r7, #12] + 80034e8: e03a b.n 8003560 + } + else + { + sysclockfreq = HSE_VALUE; + 80034ea: 4b22 ldr r3, [pc, #136] @ (8003574 ) + 80034ec: 60fb str r3, [r7, #12] + 80034ee: e037 b.n 8003560 + } + } + else + { + /* PLL used as system clock source */ + pllsource = LL_RCC_PLL_GetMainSource(); + 80034f0: f7ff fab9 bl 8002a66 + 80034f4: 6038 str r0, [r7, #0] + switch (pllsource) + 80034f6: 683b ldr r3, [r7, #0] + 80034f8: 2b02 cmp r3, #2 + 80034fa: d003 beq.n 8003504 + 80034fc: 683b ldr r3, [r7, #0] + 80034fe: 2b03 cmp r3, #3 + 8003500: d003 beq.n 800350a + 8003502: e00d b.n 8003520 + { + case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ + pllinputfreq = HSI_VALUE; + 8003504: 4b1a ldr r3, [pc, #104] @ (8003570 ) + 8003506: 60bb str r3, [r7, #8] + break; + 8003508: e015 b.n 8003536 + case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + 800350a: f7fe ffb7 bl 800247c + 800350e: 4603 mov r3, r0 + 8003510: 2b01 cmp r3, #1 + 8003512: d102 bne.n 800351a + { + pllinputfreq = HSE_VALUE / 2U; + 8003514: 4b16 ldr r3, [pc, #88] @ (8003570 ) + 8003516: 60bb str r3, [r7, #8] + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + 8003518: e00d b.n 8003536 + pllinputfreq = HSE_VALUE; + 800351a: 4b16 ldr r3, [pc, #88] @ (8003574 ) + 800351c: 60bb str r3, [r7, #8] + break; + 800351e: e00a b.n 8003536 + case RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */ + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + 8003520: f7ff f97f bl 8002822 + 8003524: 4603 mov r3, r0 + 8003526: 091b lsrs r3, r3, #4 + 8003528: f003 030f and.w r3, r3, #15 + 800352c: 4a0f ldr r2, [pc, #60] @ (800356c ) + 800352e: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 8003532: 60bb str r3, [r7, #8] + break; + 8003534: bf00 nop + } + sysclockfreq = __LL_RCC_CALC_PLLCLK_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), LL_RCC_PLL_GetN(), + 8003536: f7ff fa71 bl 8002a1c + 800353a: 4602 mov r2, r0 + 800353c: 68bb ldr r3, [r7, #8] + 800353e: fb03 f402 mul.w r4, r3, r2 + 8003542: f7ff fa84 bl 8002a4e + 8003546: 4603 mov r3, r0 + 8003548: 091b lsrs r3, r3, #4 + 800354a: 3301 adds r3, #1 + 800354c: fbb4 f4f3 udiv r4, r4, r3 + 8003550: f7ff fa71 bl 8002a36 + 8003554: 4603 mov r3, r0 + 8003556: 0f5b lsrs r3, r3, #29 + 8003558: 3301 adds r3, #1 + 800355a: fbb4 f3f3 udiv r3, r4, r3 + 800355e: 60fb str r3, [r7, #12] + LL_RCC_PLL_GetR()); + } + + return sysclockfreq; + 8003560: 68fb ldr r3, [r7, #12] +} + 8003562: 4618 mov r0, r3 + 8003564: 3714 adds r7, #20 + 8003566: 46bd mov sp, r7 + 8003568: bd90 pop {r4, r7, pc} + 800356a: bf00 nop + 800356c: 08007db0 .word 0x08007db0 + 8003570: 00f42400 .word 0x00f42400 + 8003574: 01e84800 .word 0x01e84800 + +08003578 : +/** + * @brief Return the HCLK frequency. + * @retval HCLK frequency in Hz + */ +uint32_t HAL_RCC_GetHCLKFreq(void) +{ + 8003578: b598 push {r3, r4, r7, lr} + 800357a: af00 add r7, sp, #0 + /* Get SysClock and Compute HCLK1 frequency ---------------------------*/ + return ((uint32_t)(__LL_RCC_CALC_HCLK1_FREQ(HAL_RCC_GetSysClockFreq(), LL_RCC_GetAHBPrescaler()))); + 800357c: f7ff ff90 bl 80034a0 + 8003580: 4604 mov r4, r0 + 8003582: f7ff fa01 bl 8002988 + 8003586: 4603 mov r3, r0 + 8003588: 091b lsrs r3, r3, #4 + 800358a: f003 030f and.w r3, r3, #15 + 800358e: 4a03 ldr r2, [pc, #12] @ (800359c ) + 8003590: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 8003594: fbb4 f3f3 udiv r3, r4, r3 +} + 8003598: 4618 mov r0, r3 + 800359a: bd98 pop {r3, r4, r7, pc} + 800359c: 08007d70 .word 0x08007d70 + +080035a0 : + voltage range. + * @param MSI_Range MSI range value from @ref RCC_MSIRANGE_0 to @ref RCC_MSIRANGE_11 + * @retval HAL status + */ +static HAL_StatusTypeDef RCC_SetFlashLatencyFromMSIRange(uint32_t MSI_Range) +{ + 80035a0: b590 push {r4, r7, lr} + 80035a2: b085 sub sp, #20 + 80035a4: af00 add r7, sp, #0 + 80035a6: 6078 str r0, [r7, #4] + + /* Check the parameters */ + assert_param(IS_RCC_MSI_CLOCK_RANGE(MSI_Range)); + + /* MSI frequency range in Hz */ + if (MSI_Range > RCC_MSIRANGE_11) + 80035a8: 687b ldr r3, [r7, #4] + 80035aa: 2bb0 cmp r3, #176 @ 0xb0 + 80035ac: d903 bls.n 80035b6 + { + msifreq = __LL_RCC_CALC_MSI_FREQ(RCC_MSIRANGE_11); + 80035ae: 4b15 ldr r3, [pc, #84] @ (8003604 ) + 80035b0: 6adb ldr r3, [r3, #44] @ 0x2c + 80035b2: 60fb str r3, [r7, #12] + 80035b4: e007 b.n 80035c6 + } + else + { + msifreq = __LL_RCC_CALC_MSI_FREQ(MSI_Range); + 80035b6: 687b ldr r3, [r7, #4] + 80035b8: 091b lsrs r3, r3, #4 + 80035ba: f003 030f and.w r3, r3, #15 + 80035be: 4a11 ldr r2, [pc, #68] @ (8003604 ) + 80035c0: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80035c4: 60fb str r3, [r7, #12] + } + + flash_clksrcfreq = __LL_RCC_CALC_HCLK4_FREQ(msifreq, LL_RCC_GetAHB4Prescaler()); + 80035c6: f7ff f9eb bl 80029a0 + 80035ca: 4603 mov r3, r0 + 80035cc: 091b lsrs r3, r3, #4 + 80035ce: f003 030f and.w r3, r3, #15 + 80035d2: 4a0d ldr r2, [pc, #52] @ (8003608 ) + 80035d4: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80035d8: 68fa ldr r2, [r7, #12] + 80035da: fbb2 f3f3 udiv r3, r2, r3 + 80035de: 60bb str r3, [r7, #8] + +#if defined(PWR_CR1_VOS) + return RCC_SetFlashLatency((flash_clksrcfreq / MEGA_HZ), HAL_PWREx_GetVoltageRange()); + 80035e0: 68bb ldr r3, [r7, #8] + 80035e2: 4a0a ldr r2, [pc, #40] @ (800360c ) + 80035e4: fba2 2303 umull r2, r3, r2, r3 + 80035e8: 0c9c lsrs r4, r3, #18 + 80035ea: f7fe ff0d bl 8002408 + 80035ee: 4603 mov r3, r0 + 80035f0: 4619 mov r1, r3 + 80035f2: 4620 mov r0, r4 + 80035f4: f000 f80c bl 8003610 + 80035f8: 4603 mov r3, r0 +#else + return RCC_SetFlashLatency((flash_clksrcfreq / MEGA_HZ), PWR_REGULATOR_VOLTAGE_SCALE1); +#endif /* PWR_CR1_VOS */ +} + 80035fa: 4618 mov r0, r3 + 80035fc: 3714 adds r7, #20 + 80035fe: 46bd mov sp, r7 + 8003600: bd90 pop {r4, r7, pc} + 8003602: bf00 nop + 8003604: 08007db0 .word 0x08007db0 + 8003608: 08007d70 .word 0x08007d70 + 800360c: 431bde83 .word 0x431bde83 + +08003610 : + * @param Flash_ClkSrcFreq Flash Clock Source (in MHz) + * @param VCORE_Voltage Current Vcore voltage (PWR_REGULATOR_VOLTAGE_SCALE1 or PWR_REGULATOR_VOLTAGE_SCALE2) + * @retval HAL status + */ +static HAL_StatusTypeDef RCC_SetFlashLatency(uint32_t Flash_ClkSrcFreq, uint32_t VCORE_Voltage) +{ + 8003610: b590 push {r4, r7, lr} + 8003612: b093 sub sp, #76 @ 0x4c + 8003614: af00 add r7, sp, #0 + 8003616: 6078 str r0, [r7, #4] + 8003618: 6039 str r1, [r7, #0] + /* Flash Clock source (HCLK4) range in MHz with a VCORE is range1 */ + const uint32_t FLASH_CLK_SRC_RANGE_VOS1[] = {18UL, 36UL, 54UL, 64UL}; + 800361a: 4b37 ldr r3, [pc, #220] @ (80036f8 ) + 800361c: f107 0428 add.w r4, r7, #40 @ 0x28 + 8003620: cb0f ldmia r3, {r0, r1, r2, r3} + 8003622: e884 000f stmia.w r4, {r0, r1, r2, r3} +#if defined(PWR_CR1_VOS) + /* Flash Clock source (HCLK4) range in MHz with a VCORE is range2 */ + const uint32_t FLASH_CLK_SRC_RANGE_VOS2[] = {6UL, 12UL, 16UL}; + 8003626: 4a35 ldr r2, [pc, #212] @ (80036fc ) + 8003628: f107 031c add.w r3, r7, #28 + 800362c: ca07 ldmia r2, {r0, r1, r2} + 800362e: e883 0007 stmia.w r3, {r0, r1, r2} +#endif /* PWR_CR1_VOS */ + /* Flash Latency range */ + const uint32_t FLASH_LATENCY_RANGE[] = {FLASH_LATENCY_0, FLASH_LATENCY_1, FLASH_LATENCY_2, FLASH_LATENCY_3}; + 8003632: 4b33 ldr r3, [pc, #204] @ (8003700 ) + 8003634: f107 040c add.w r4, r7, #12 + 8003638: cb0f ldmia r3, {r0, r1, r2, r3} + 800363a: e884 000f stmia.w r4, {r0, r1, r2, r3} + uint32_t latency = FLASH_LATENCY_0; /* default value 0WS */ + 800363e: 2300 movs r3, #0 + 8003640: 647b str r3, [r7, #68] @ 0x44 + uint32_t tickstart; + +#if defined(PWR_CR1_VOS) + if (VCORE_Voltage == PWR_REGULATOR_VOLTAGE_SCALE1) + 8003642: 683b ldr r3, [r7, #0] + 8003644: f5b3 7f00 cmp.w r3, #512 @ 0x200 + 8003648: d11a bne.n 8003680 + { + for (uint32_t index = 0; index < __COUNTOF(FLASH_CLK_SRC_RANGE_VOS1); index++) + 800364a: 2300 movs r3, #0 + 800364c: 643b str r3, [r7, #64] @ 0x40 + 800364e: e013 b.n 8003678 + { + if (Flash_ClkSrcFreq <= FLASH_CLK_SRC_RANGE_VOS1[index]) + 8003650: 6c3b ldr r3, [r7, #64] @ 0x40 + 8003652: 009b lsls r3, r3, #2 + 8003654: 3348 adds r3, #72 @ 0x48 + 8003656: 443b add r3, r7 + 8003658: f853 3c20 ldr.w r3, [r3, #-32] + 800365c: 687a ldr r2, [r7, #4] + 800365e: 429a cmp r2, r3 + 8003660: d807 bhi.n 8003672 + { + latency = FLASH_LATENCY_RANGE[index]; + 8003662: 6c3b ldr r3, [r7, #64] @ 0x40 + 8003664: 009b lsls r3, r3, #2 + 8003666: 3348 adds r3, #72 @ 0x48 + 8003668: 443b add r3, r7 + 800366a: f853 3c3c ldr.w r3, [r3, #-60] + 800366e: 647b str r3, [r7, #68] @ 0x44 + break; + 8003670: e020 b.n 80036b4 + for (uint32_t index = 0; index < __COUNTOF(FLASH_CLK_SRC_RANGE_VOS1); index++) + 8003672: 6c3b ldr r3, [r7, #64] @ 0x40 + 8003674: 3301 adds r3, #1 + 8003676: 643b str r3, [r7, #64] @ 0x40 + 8003678: 6c3b ldr r3, [r7, #64] @ 0x40 + 800367a: 2b03 cmp r3, #3 + 800367c: d9e8 bls.n 8003650 + 800367e: e019 b.n 80036b4 + } + } + } + else /* PWR_REGULATOR_VOLTAGE_SCALE2 */ + { + for (uint32_t index = 0; index < __COUNTOF(FLASH_CLK_SRC_RANGE_VOS2); index++) + 8003680: 2300 movs r3, #0 + 8003682: 63fb str r3, [r7, #60] @ 0x3c + 8003684: e013 b.n 80036ae + { + if (Flash_ClkSrcFreq <= FLASH_CLK_SRC_RANGE_VOS2[index]) + 8003686: 6bfb ldr r3, [r7, #60] @ 0x3c + 8003688: 009b lsls r3, r3, #2 + 800368a: 3348 adds r3, #72 @ 0x48 + 800368c: 443b add r3, r7 + 800368e: f853 3c2c ldr.w r3, [r3, #-44] + 8003692: 687a ldr r2, [r7, #4] + 8003694: 429a cmp r2, r3 + 8003696: d807 bhi.n 80036a8 + { + latency = FLASH_LATENCY_RANGE[index]; + 8003698: 6bfb ldr r3, [r7, #60] @ 0x3c + 800369a: 009b lsls r3, r3, #2 + 800369c: 3348 adds r3, #72 @ 0x48 + 800369e: 443b add r3, r7 + 80036a0: f853 3c3c ldr.w r3, [r3, #-60] + 80036a4: 647b str r3, [r7, #68] @ 0x44 + break; + 80036a6: e005 b.n 80036b4 + for (uint32_t index = 0; index < __COUNTOF(FLASH_CLK_SRC_RANGE_VOS2); index++) + 80036a8: 6bfb ldr r3, [r7, #60] @ 0x3c + 80036aa: 3301 adds r3, #1 + 80036ac: 63fb str r3, [r7, #60] @ 0x3c + 80036ae: 6bfb ldr r3, [r7, #60] @ 0x3c + 80036b0: 2b02 cmp r3, #2 + 80036b2: d9e8 bls.n 8003686 + break; + } + } +#endif /* PWR_CR1_VOS */ + + __HAL_FLASH_SET_LATENCY(latency); + 80036b4: 4b13 ldr r3, [pc, #76] @ (8003704 ) + 80036b6: 681b ldr r3, [r3, #0] + 80036b8: f023 0207 bic.w r2, r3, #7 + 80036bc: 4911 ldr r1, [pc, #68] @ (8003704 ) + 80036be: 6c7b ldr r3, [r7, #68] @ 0x44 + 80036c0: 4313 orrs r3, r2 + 80036c2: 600b str r3, [r1, #0] + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 80036c4: f7fe f96e bl 80019a4 + 80036c8: 63b8 str r0, [r7, #56] @ 0x38 + + /* Check that the new number of wait states is taken into account to access the Flash + memory by reading the FLASH_ACR register */ + while (__HAL_FLASH_GET_LATENCY() != latency) + 80036ca: e008 b.n 80036de + { + if ((HAL_GetTick() - tickstart) > LATENCY_TIMEOUT_VALUE) + 80036cc: f7fe f96a bl 80019a4 + 80036d0: 4602 mov r2, r0 + 80036d2: 6bbb ldr r3, [r7, #56] @ 0x38 + 80036d4: 1ad3 subs r3, r2, r3 + 80036d6: 2b02 cmp r3, #2 + 80036d8: d901 bls.n 80036de + { + return HAL_TIMEOUT; + 80036da: 2303 movs r3, #3 + 80036dc: e007 b.n 80036ee + while (__HAL_FLASH_GET_LATENCY() != latency) + 80036de: 4b09 ldr r3, [pc, #36] @ (8003704 ) + 80036e0: 681b ldr r3, [r3, #0] + 80036e2: f003 0307 and.w r3, r3, #7 + 80036e6: 6c7a ldr r2, [r7, #68] @ 0x44 + 80036e8: 429a cmp r2, r3 + 80036ea: d1ef bne.n 80036cc + } + } + return HAL_OK; + 80036ec: 2300 movs r3, #0 +} + 80036ee: 4618 mov r0, r3 + 80036f0: 374c adds r7, #76 @ 0x4c + 80036f2: 46bd mov sp, r7 + 80036f4: bd90 pop {r4, r7, pc} + 80036f6: bf00 nop + 80036f8: 08007bd0 .word 0x08007bd0 + 80036fc: 08007be0 .word 0x08007be0 + 8003700: 08007bec .word 0x08007bec + 8003704: 58004000 .word 0x58004000 + +08003708 : +{ + 8003708: b480 push {r7} + 800370a: af00 add r7, sp, #0 + return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSEON) == (RCC_BDCR_LSEON)) ? 1UL : 0UL); + 800370c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003710: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8003714: f003 0301 and.w r3, r3, #1 + 8003718: 2b01 cmp r3, #1 + 800371a: d101 bne.n 8003720 + 800371c: 2301 movs r3, #1 + 800371e: e000 b.n 8003722 + 8003720: 2300 movs r3, #0 +} + 8003722: 4618 mov r0, r3 + 8003724: 46bd mov sp, r7 + 8003726: f85d 7b04 ldr.w r7, [sp], #4 + 800372a: 4770 bx lr + +0800372c : +{ + 800372c: b480 push {r7} + 800372e: af00 add r7, sp, #0 + return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == (RCC_BDCR_LSERDY)) ? 1UL : 0UL); + 8003730: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003734: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8003738: f003 0302 and.w r3, r3, #2 + 800373c: 2b02 cmp r3, #2 + 800373e: d101 bne.n 8003744 + 8003740: 2301 movs r3, #1 + 8003742: e000 b.n 8003746 + 8003744: 2300 movs r3, #0 +} + 8003746: 4618 mov r0, r3 + 8003748: 46bd mov sp, r7 + 800374a: f85d 7b04 ldr.w r7, [sp], #4 + 800374e: 4770 bx lr + +08003750 : +{ + 8003750: b480 push {r7} + 8003752: b083 sub sp, #12 + 8003754: af00 add r7, sp, #0 + 8003756: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CSR, RCC_CSR_RFWKPSEL, Source); + 8003758: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800375c: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 + 8003760: f423 4240 bic.w r2, r3, #49152 @ 0xc000 + 8003764: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003768: 687b ldr r3, [r7, #4] + 800376a: 4313 orrs r3, r2 + 800376c: f8c1 3094 str.w r3, [r1, #148] @ 0x94 +} + 8003770: bf00 nop + 8003772: 370c adds r7, #12 + 8003774: 46bd mov sp, r7 + 8003776: f85d 7b04 ldr.w r7, [sp], #4 + 800377a: 4770 bx lr + +0800377c : +{ + 800377c: b480 push {r7} + 800377e: b083 sub sp, #12 + 8003780: af00 add r7, sp, #0 + 8003782: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->SMPSCR, RCC_SMPSCR_SMPSSEL, SMPSSource); + 8003784: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003788: 6a5b ldr r3, [r3, #36] @ 0x24 + 800378a: f023 0203 bic.w r2, r3, #3 + 800378e: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003792: 687b ldr r3, [r7, #4] + 8003794: 4313 orrs r3, r2 + 8003796: 624b str r3, [r1, #36] @ 0x24 +} + 8003798: bf00 nop + 800379a: 370c adds r7, #12 + 800379c: 46bd mov sp, r7 + 800379e: f85d 7b04 ldr.w r7, [sp], #4 + 80037a2: 4770 bx lr + +080037a4 : +{ + 80037a4: b480 push {r7} + 80037a6: b083 sub sp, #12 + 80037a8: af00 add r7, sp, #0 + 80037aa: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->SMPSCR, RCC_SMPSCR_SMPSDIV, Prescaler); + 80037ac: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80037b0: 6a5b ldr r3, [r3, #36] @ 0x24 + 80037b2: f023 0230 bic.w r2, r3, #48 @ 0x30 + 80037b6: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80037ba: 687b ldr r3, [r7, #4] + 80037bc: 4313 orrs r3, r2 + 80037be: 624b str r3, [r1, #36] @ 0x24 +} + 80037c0: bf00 nop + 80037c2: 370c adds r7, #12 + 80037c4: 46bd mov sp, r7 + 80037c6: f85d 7b04 ldr.w r7, [sp], #4 + 80037ca: 4770 bx lr + +080037cc : +{ + 80037cc: b480 push {r7} + 80037ce: b083 sub sp, #12 + 80037d0: af00 add r7, sp, #0 + 80037d2: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_USART1SEL, USARTxSource); + 80037d4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80037d8: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 + 80037dc: f023 0203 bic.w r2, r3, #3 + 80037e0: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80037e4: 687b ldr r3, [r7, #4] + 80037e6: 4313 orrs r3, r2 + 80037e8: f8c1 3088 str.w r3, [r1, #136] @ 0x88 +} + 80037ec: bf00 nop + 80037ee: 370c adds r7, #12 + 80037f0: 46bd mov sp, r7 + 80037f2: f85d 7b04 ldr.w r7, [sp], #4 + 80037f6: 4770 bx lr + +080037f8 : +{ + 80037f8: b480 push {r7} + 80037fa: b083 sub sp, #12 + 80037fc: af00 add r7, sp, #0 + 80037fe: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_LPUART1SEL, LPUARTxSource); + 8003800: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003804: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 + 8003808: f423 6240 bic.w r2, r3, #3072 @ 0xc00 + 800380c: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003810: 687b ldr r3, [r7, #4] + 8003812: 4313 orrs r3, r2 + 8003814: f8c1 3088 str.w r3, [r1, #136] @ 0x88 +} + 8003818: bf00 nop + 800381a: 370c adds r7, #12 + 800381c: 46bd mov sp, r7 + 800381e: f85d 7b04 ldr.w r7, [sp], #4 + 8003822: 4770 bx lr + +08003824 : +{ + 8003824: b480 push {r7} + 8003826: b083 sub sp, #12 + 8003828: af00 add r7, sp, #0 + 800382a: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CCIPR, ((I2CxSource >> 4) & 0x000FF000U), ((I2CxSource << 4) & 0x000FF000U)); + 800382c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003830: f8d3 2088 ldr.w r2, [r3, #136] @ 0x88 + 8003834: 687b ldr r3, [r7, #4] + 8003836: 091b lsrs r3, r3, #4 + 8003838: f403 237f and.w r3, r3, #1044480 @ 0xff000 + 800383c: 43db mvns r3, r3 + 800383e: 401a ands r2, r3 + 8003840: 687b ldr r3, [r7, #4] + 8003842: 011b lsls r3, r3, #4 + 8003844: f403 237f and.w r3, r3, #1044480 @ 0xff000 + 8003848: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 800384c: 4313 orrs r3, r2 + 800384e: f8c1 3088 str.w r3, [r1, #136] @ 0x88 +} + 8003852: bf00 nop + 8003854: 370c adds r7, #12 + 8003856: 46bd mov sp, r7 + 8003858: f85d 7b04 ldr.w r7, [sp], #4 + 800385c: 4770 bx lr + +0800385e : +{ + 800385e: b480 push {r7} + 8003860: b083 sub sp, #12 + 8003862: af00 add r7, sp, #0 + 8003864: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CCIPR, (LPTIMxSource & 0xFFFF0000U), (LPTIMxSource << 16)); + 8003866: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800386a: f8d3 2088 ldr.w r2, [r3, #136] @ 0x88 + 800386e: 687b ldr r3, [r7, #4] + 8003870: 0c1b lsrs r3, r3, #16 + 8003872: 041b lsls r3, r3, #16 + 8003874: 43db mvns r3, r3 + 8003876: 401a ands r2, r3 + 8003878: 687b ldr r3, [r7, #4] + 800387a: 041b lsls r3, r3, #16 + 800387c: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003880: 4313 orrs r3, r2 + 8003882: f8c1 3088 str.w r3, [r1, #136] @ 0x88 +} + 8003886: bf00 nop + 8003888: 370c adds r7, #12 + 800388a: 46bd mov sp, r7 + 800388c: f85d 7b04 ldr.w r7, [sp], #4 + 8003890: 4770 bx lr + +08003892 : +{ + 8003892: b480 push {r7} + 8003894: b083 sub sp, #12 + 8003896: af00 add r7, sp, #0 + 8003898: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_SAI1SEL, SAIxSource); + 800389a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800389e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 + 80038a2: f423 0240 bic.w r2, r3, #12582912 @ 0xc00000 + 80038a6: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80038aa: 687b ldr r3, [r7, #4] + 80038ac: 4313 orrs r3, r2 + 80038ae: f8c1 3088 str.w r3, [r1, #136] @ 0x88 +} + 80038b2: bf00 nop + 80038b4: 370c adds r7, #12 + 80038b6: 46bd mov sp, r7 + 80038b8: f85d 7b04 ldr.w r7, [sp], #4 + 80038bc: 4770 bx lr + +080038be : +{ + 80038be: b480 push {r7} + 80038c0: b083 sub sp, #12 + 80038c2: af00 add r7, sp, #0 + 80038c4: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_RNGSEL, RNGxSource); + 80038c6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80038ca: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 + 80038ce: f023 4240 bic.w r2, r3, #3221225472 @ 0xc0000000 + 80038d2: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 80038d6: 687b ldr r3, [r7, #4] + 80038d8: 4313 orrs r3, r2 + 80038da: f8c1 3088 str.w r3, [r1, #136] @ 0x88 +} + 80038de: bf00 nop + 80038e0: 370c adds r7, #12 + 80038e2: 46bd mov sp, r7 + 80038e4: f85d 7b04 ldr.w r7, [sp], #4 + 80038e8: 4770 bx lr + +080038ea : +{ + 80038ea: b480 push {r7} + 80038ec: b083 sub sp, #12 + 80038ee: af00 add r7, sp, #0 + 80038f0: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_CLK48SEL, CLK48xSource); + 80038f2: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80038f6: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 + 80038fa: f023 6240 bic.w r2, r3, #201326592 @ 0xc000000 + 80038fe: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003902: 687b ldr r3, [r7, #4] + 8003904: 4313 orrs r3, r2 + 8003906: f8c1 3088 str.w r3, [r1, #136] @ 0x88 +} + 800390a: bf00 nop + 800390c: 370c adds r7, #12 + 800390e: 46bd mov sp, r7 + 8003910: f85d 7b04 ldr.w r7, [sp], #4 + 8003914: 4770 bx lr + +08003916 : +{ + 8003916: b580 push {r7, lr} + 8003918: b082 sub sp, #8 + 800391a: af00 add r7, sp, #0 + 800391c: 6078 str r0, [r7, #4] + LL_RCC_SetCLK48ClockSource(USBxSource); + 800391e: 6878 ldr r0, [r7, #4] + 8003920: f7ff ffe3 bl 80038ea +} + 8003924: bf00 nop + 8003926: 3708 adds r7, #8 + 8003928: 46bd mov sp, r7 + 800392a: bd80 pop {r7, pc} + +0800392c : +{ + 800392c: b480 push {r7} + 800392e: b083 sub sp, #12 + 8003930: af00 add r7, sp, #0 + 8003932: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_ADCSEL, ADCxSource); + 8003934: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003938: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 + 800393c: f023 5240 bic.w r2, r3, #805306368 @ 0x30000000 + 8003940: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003944: 687b ldr r3, [r7, #4] + 8003946: 4313 orrs r3, r2 + 8003948: f8c1 3088 str.w r3, [r1, #136] @ 0x88 +} + 800394c: bf00 nop + 800394e: 370c adds r7, #12 + 8003950: 46bd mov sp, r7 + 8003952: f85d 7b04 ldr.w r7, [sp], #4 + 8003956: 4770 bx lr + +08003958 : +{ + 8003958: b480 push {r7} + 800395a: b083 sub sp, #12 + 800395c: af00 add r7, sp, #0 + 800395e: 6078 str r0, [r7, #4] + MODIFY_REG(RCC->BDCR, RCC_BDCR_RTCSEL, Source); + 8003960: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003964: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8003968: f423 7240 bic.w r2, r3, #768 @ 0x300 + 800396c: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003970: 687b ldr r3, [r7, #4] + 8003972: 4313 orrs r3, r2 + 8003974: f8c1 3090 str.w r3, [r1, #144] @ 0x90 +} + 8003978: bf00 nop + 800397a: 370c adds r7, #12 + 800397c: 46bd mov sp, r7 + 800397e: f85d 7b04 ldr.w r7, [sp], #4 + 8003982: 4770 bx lr + +08003984 : +{ + 8003984: b480 push {r7} + 8003986: af00 add r7, sp, #0 + return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL)); + 8003988: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800398c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8003990: f403 7340 and.w r3, r3, #768 @ 0x300 +} + 8003994: 4618 mov r0, r3 + 8003996: 46bd mov sp, r7 + 8003998: f85d 7b04 ldr.w r7, [sp], #4 + 800399c: 4770 bx lr + +0800399e : +{ + 800399e: b480 push {r7} + 80039a0: af00 add r7, sp, #0 + SET_BIT(RCC->BDCR, RCC_BDCR_BDRST); + 80039a2: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80039a6: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 80039aa: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80039ae: f443 3380 orr.w r3, r3, #65536 @ 0x10000 + 80039b2: f8c2 3090 str.w r3, [r2, #144] @ 0x90 +} + 80039b6: bf00 nop + 80039b8: 46bd mov sp, r7 + 80039ba: f85d 7b04 ldr.w r7, [sp], #4 + 80039be: 4770 bx lr + +080039c0 : +{ + 80039c0: b480 push {r7} + 80039c2: af00 add r7, sp, #0 + CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST); + 80039c4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80039c8: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 80039cc: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80039d0: f423 3380 bic.w r3, r3, #65536 @ 0x10000 + 80039d4: f8c2 3090 str.w r3, [r2, #144] @ 0x90 +} + 80039d8: bf00 nop + 80039da: 46bd mov sp, r7 + 80039dc: f85d 7b04 ldr.w r7, [sp], #4 + 80039e0: 4770 bx lr + +080039e2 : +{ + 80039e2: b480 push {r7} + 80039e4: af00 add r7, sp, #0 + SET_BIT(RCC->CR, RCC_CR_PLLSAI1ON); + 80039e6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 80039ea: 681b ldr r3, [r3, #0] + 80039ec: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 80039f0: f043 6380 orr.w r3, r3, #67108864 @ 0x4000000 + 80039f4: 6013 str r3, [r2, #0] +} + 80039f6: bf00 nop + 80039f8: 46bd mov sp, r7 + 80039fa: f85d 7b04 ldr.w r7, [sp], #4 + 80039fe: 4770 bx lr + +08003a00 : +{ + 8003a00: b480 push {r7} + 8003a02: af00 add r7, sp, #0 + CLEAR_BIT(RCC->CR, RCC_CR_PLLSAI1ON); + 8003a04: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003a08: 681b ldr r3, [r3, #0] + 8003a0a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8003a0e: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 + 8003a12: 6013 str r3, [r2, #0] +} + 8003a14: bf00 nop + 8003a16: 46bd mov sp, r7 + 8003a18: f85d 7b04 ldr.w r7, [sp], #4 + 8003a1c: 4770 bx lr + +08003a1e : +{ + 8003a1e: b480 push {r7} + 8003a20: af00 add r7, sp, #0 + return ((READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) == (RCC_CR_PLLSAI1RDY)) ? 1UL : 0UL); + 8003a22: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003a26: 681b ldr r3, [r3, #0] + 8003a28: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 + 8003a2c: f1b3 6f00 cmp.w r3, #134217728 @ 0x8000000 + 8003a30: d101 bne.n 8003a36 + 8003a32: 2301 movs r3, #1 + 8003a34: e000 b.n 8003a38 + 8003a36: 2300 movs r3, #0 +} + 8003a38: 4618 mov r0, r3 + 8003a3a: 46bd mov sp, r7 + 8003a3c: f85d 7b04 ldr.w r7, [sp], #4 + 8003a40: 4770 bx lr + +08003a42 : + * the RTC clock source: in this case the access to Backup domain is enabled. + * + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) +{ + 8003a42: b580 push {r7, lr} + 8003a44: b088 sub sp, #32 + 8003a46: af00 add r7, sp, #0 + 8003a48: 6078 str r0, [r7, #4] + uint32_t tickstart; + HAL_StatusTypeDef ret = HAL_OK; /* Intermediate status */ + 8003a4a: 2300 movs r3, #0 + 8003a4c: 77fb strb r3, [r7, #31] + HAL_StatusTypeDef status = HAL_OK; /* Final status */ + 8003a4e: 2300 movs r3, #0 + 8003a50: 77bb strb r3, [r7, #30] + /* Check the parameters */ + assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection)); + +#if defined(SAI1) + /*-------------------------- SAI1 clock source configuration ---------------------*/ + if ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1)) + 8003a52: 687b ldr r3, [r7, #4] + 8003a54: 681b ldr r3, [r3, #0] + 8003a56: f003 0340 and.w r3, r3, #64 @ 0x40 + 8003a5a: 2b00 cmp r3, #0 + 8003a5c: d034 beq.n 8003ac8 + { + /* Check the parameters */ + assert_param(IS_RCC_SAI1CLK(PeriphClkInit->Sai1ClockSelection)); + + switch (PeriphClkInit->Sai1ClockSelection) + 8003a5e: 687b ldr r3, [r7, #4] + 8003a60: 6b1b ldr r3, [r3, #48] @ 0x30 + 8003a62: f5b3 0f40 cmp.w r3, #12582912 @ 0xc00000 + 8003a66: d021 beq.n 8003aac + 8003a68: f5b3 0f40 cmp.w r3, #12582912 @ 0xc00000 + 8003a6c: d81b bhi.n 8003aa6 + 8003a6e: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000 + 8003a72: d01d beq.n 8003ab0 + 8003a74: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000 + 8003a78: d815 bhi.n 8003aa6 + 8003a7a: 2b00 cmp r3, #0 + 8003a7c: d00b beq.n 8003a96 + 8003a7e: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000 + 8003a82: d110 bne.n 8003aa6 + { + case RCC_SAI1CLKSOURCE_PLL: /* PLL is used as clock source for SAI1 */ + /* Enable SAI1 Clock output generated form System PLL . */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SAI1CLK); + 8003a84: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003a88: 68db ldr r3, [r3, #12] + 8003a8a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8003a8e: f443 3380 orr.w r3, r3, #65536 @ 0x10000 + 8003a92: 60d3 str r3, [r2, #12] + + /* SAI1 clock source config set later after clock selection check */ + break; + 8003a94: e00d b.n 8003ab2 + + case RCC_SAI1CLKSOURCE_PLLSAI1: /* PLLSAI1 is used as clock source for SAI1 */ + /* PLLSAI1 parameters N & P configuration and clock output (PLLSAI1ClockOut) */ + ret = RCCEx_PLLSAI1_ConfigNP(&(PeriphClkInit->PLLSAI1)); + 8003a96: 687b ldr r3, [r7, #4] + 8003a98: 3304 adds r3, #4 + 8003a9a: 4618 mov r0, r3 + 8003a9c: f000 f947 bl 8003d2e + 8003aa0: 4603 mov r3, r0 + 8003aa2: 77fb strb r3, [r7, #31] + /* SAI1 clock source config set later after clock selection check */ + break; + 8003aa4: e005 b.n 8003ab2 + case RCC_SAI1CLKSOURCE_HSI: + + break; + + default: + ret = HAL_ERROR; + 8003aa6: 2301 movs r3, #1 + 8003aa8: 77fb strb r3, [r7, #31] + break; + 8003aaa: e002 b.n 8003ab2 + break; + 8003aac: bf00 nop + 8003aae: e000 b.n 8003ab2 + break; + 8003ab0: bf00 nop + } + + if (ret == HAL_OK) + 8003ab2: 7ffb ldrb r3, [r7, #31] + 8003ab4: 2b00 cmp r3, #0 + 8003ab6: d105 bne.n 8003ac4 + { + /* Set the source of SAI1 clock*/ + __HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection); + 8003ab8: 687b ldr r3, [r7, #4] + 8003aba: 6b1b ldr r3, [r3, #48] @ 0x30 + 8003abc: 4618 mov r0, r3 + 8003abe: f7ff fee8 bl 8003892 + 8003ac2: e001 b.n 8003ac8 + } + else + { + /* set overall return value */ + status = ret; + 8003ac4: 7ffb ldrb r3, [r7, #31] + 8003ac6: 77bb strb r3, [r7, #30] + } + } +#endif /* SAI1 */ + + /*-------------------------- RTC clock source configuration ----------------------*/ + if ((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC) + 8003ac8: 687b ldr r3, [r7, #4] + 8003aca: 681b ldr r3, [r3, #0] + 8003acc: f403 6300 and.w r3, r3, #2048 @ 0x800 + 8003ad0: 2b00 cmp r3, #0 + 8003ad2: d046 beq.n 8003b62 + { + uint32_t rtcclocksource = LL_RCC_GetRTCClockSource(); + 8003ad4: f7ff ff56 bl 8003984 + 8003ad8: 61b8 str r0, [r7, #24] + + /* Check for RTC Parameters used to output RTCCLK */ + assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection)); + + /* Configure the clock source only if a different source is expected */ + if (rtcclocksource != PeriphClkInit->RTCClockSelection) + 8003ada: 687b ldr r3, [r7, #4] + 8003adc: 6c1b ldr r3, [r3, #64] @ 0x40 + 8003ade: 69ba ldr r2, [r7, #24] + 8003ae0: 429a cmp r2, r3 + 8003ae2: d03c beq.n 8003b5e + { + /* Enable write access to Backup domain */ + HAL_PWR_EnableBkUpAccess(); + 8003ae4: f7fe fc80 bl 80023e8 + + /* If a clock source is not yet selected */ + if (rtcclocksource == RCC_RTCCLKSOURCE_NONE) + 8003ae8: 69bb ldr r3, [r7, #24] + 8003aea: 2b00 cmp r3, #0 + 8003aec: d105 bne.n 8003afa + { + /* Directly set the configuration of the clock source selection */ + LL_RCC_SetRTCClockSource(PeriphClkInit->RTCClockSelection); + 8003aee: 687b ldr r3, [r7, #4] + 8003af0: 6c1b ldr r3, [r3, #64] @ 0x40 + 8003af2: 4618 mov r0, r3 + 8003af4: f7ff ff30 bl 8003958 + 8003af8: e02e b.n 8003b58 + } + else /* A clock source is already selected */ + { + /* Store the content of BDCR register before the reset of Backup Domain */ + uint32_t bdcr = LL_RCC_ReadReg(BDCR); + 8003afa: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003afe: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 + 8003b02: 617b str r3, [r7, #20] + + /* RTC Clock selection can be changed only if the Backup Domain is reset */ + LL_RCC_ForceBackupDomainReset(); + 8003b04: f7ff ff4b bl 800399e + LL_RCC_ReleaseBackupDomainReset(); + 8003b08: f7ff ff5a bl 80039c0 + + /* Set the value of the clock source selection */ + MODIFY_REG(bdcr, RCC_BDCR_RTCSEL, PeriphClkInit->RTCClockSelection); + 8003b0c: 697b ldr r3, [r7, #20] + 8003b0e: f423 7240 bic.w r2, r3, #768 @ 0x300 + 8003b12: 687b ldr r3, [r7, #4] + 8003b14: 6c1b ldr r3, [r3, #64] @ 0x40 + 8003b16: 4313 orrs r3, r2 + 8003b18: 617b str r3, [r7, #20] + + /* Restore the content of BDCR register */ + LL_RCC_WriteReg(BDCR, bdcr); + 8003b1a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8003b1e: 697b ldr r3, [r7, #20] + 8003b20: f8c2 3090 str.w r3, [r2, #144] @ 0x90 + + /* Wait for LSE reactivation if LSE was enable prior to Backup Domain reset */ + if (LL_RCC_LSE_IsEnabled() == 1U) + 8003b24: f7ff fdf0 bl 8003708 + 8003b28: 4603 mov r3, r0 + 8003b2a: 2b01 cmp r3, #1 + 8003b2c: d114 bne.n 8003b58 + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003b2e: f7fd ff39 bl 80019a4 + 8003b32: 6138 str r0, [r7, #16] + + /* Wait till LSE is ready */ + while (LL_RCC_LSE_IsReady() != 1U) + 8003b34: e00b b.n 8003b4e + { + if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) + 8003b36: f7fd ff35 bl 80019a4 + 8003b3a: 4602 mov r2, r0 + 8003b3c: 693b ldr r3, [r7, #16] + 8003b3e: 1ad3 subs r3, r2, r3 + 8003b40: f241 3288 movw r2, #5000 @ 0x1388 + 8003b44: 4293 cmp r3, r2 + 8003b46: d902 bls.n 8003b4e + { + ret = HAL_TIMEOUT; + 8003b48: 2303 movs r3, #3 + 8003b4a: 77fb strb r3, [r7, #31] + break; + 8003b4c: e004 b.n 8003b58 + while (LL_RCC_LSE_IsReady() != 1U) + 8003b4e: f7ff fded bl 800372c + 8003b52: 4603 mov r3, r0 + 8003b54: 2b01 cmp r3, #1 + 8003b56: d1ee bne.n 8003b36 + } + } + } + + /* set overall return value */ + status = ret; + 8003b58: 7ffb ldrb r3, [r7, #31] + 8003b5a: 77bb strb r3, [r7, #30] + 8003b5c: e001 b.n 8003b62 + } + else + { + /* set overall return value */ + status = ret; + 8003b5e: 7ffb ldrb r3, [r7, #31] + 8003b60: 77bb strb r3, [r7, #30] + } + + } + + /*-------------------------- USART1 clock source configuration -------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1) + 8003b62: 687b ldr r3, [r7, #4] + 8003b64: 681b ldr r3, [r3, #0] + 8003b66: f003 0301 and.w r3, r3, #1 + 8003b6a: 2b00 cmp r3, #0 + 8003b6c: d004 beq.n 8003b78 + { + /* Check the parameters */ + assert_param(IS_RCC_USART1CLKSOURCE(PeriphClkInit->Usart1ClockSelection)); + + /* Configure the USART1 clock source */ + __HAL_RCC_USART1_CONFIG(PeriphClkInit->Usart1ClockSelection); + 8003b6e: 687b ldr r3, [r7, #4] + 8003b70: 699b ldr r3, [r3, #24] + 8003b72: 4618 mov r0, r3 + 8003b74: f7ff fe2a bl 80037cc + } + +#if defined(LPUART1) + /*-------------------------- LPUART1 clock source configuration ------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPUART1) == RCC_PERIPHCLK_LPUART1) + 8003b78: 687b ldr r3, [r7, #4] + 8003b7a: 681b ldr r3, [r3, #0] + 8003b7c: f003 0302 and.w r3, r3, #2 + 8003b80: 2b00 cmp r3, #0 + 8003b82: d004 beq.n 8003b8e + { + /* Check the parameters */ + assert_param(IS_RCC_LPUART1CLKSOURCE(PeriphClkInit->Lpuart1ClockSelection)); + + /* Configure the LPUAR1 clock source */ + __HAL_RCC_LPUART1_CONFIG(PeriphClkInit->Lpuart1ClockSelection); + 8003b84: 687b ldr r3, [r7, #4] + 8003b86: 69db ldr r3, [r3, #28] + 8003b88: 4618 mov r0, r3 + 8003b8a: f7ff fe35 bl 80037f8 + } +#endif /* LPUART1 */ + + /*-------------------------- LPTIM1 clock source configuration -------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == (RCC_PERIPHCLK_LPTIM1)) + 8003b8e: 687b ldr r3, [r7, #4] + 8003b90: 681b ldr r3, [r3, #0] + 8003b92: f003 0310 and.w r3, r3, #16 + 8003b96: 2b00 cmp r3, #0 + 8003b98: d004 beq.n 8003ba4 + { + assert_param(IS_RCC_LPTIM1CLK(PeriphClkInit->Lptim1ClockSelection)); + __HAL_RCC_LPTIM1_CONFIG(PeriphClkInit->Lptim1ClockSelection); + 8003b9a: 687b ldr r3, [r7, #4] + 8003b9c: 6a9b ldr r3, [r3, #40] @ 0x28 + 8003b9e: 4618 mov r0, r3 + 8003ba0: f7ff fe5d bl 800385e + } + + /*-------------------------- LPTIM2 clock source configuration -------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM2) == (RCC_PERIPHCLK_LPTIM2)) + 8003ba4: 687b ldr r3, [r7, #4] + 8003ba6: 681b ldr r3, [r3, #0] + 8003ba8: f003 0320 and.w r3, r3, #32 + 8003bac: 2b00 cmp r3, #0 + 8003bae: d004 beq.n 8003bba + { + assert_param(IS_RCC_LPTIM2CLK(PeriphClkInit->Lptim2ClockSelection)); + __HAL_RCC_LPTIM2_CONFIG(PeriphClkInit->Lptim2ClockSelection); + 8003bb0: 687b ldr r3, [r7, #4] + 8003bb2: 6adb ldr r3, [r3, #44] @ 0x2c + 8003bb4: 4618 mov r0, r3 + 8003bb6: f7ff fe52 bl 800385e + } + + /*-------------------------- I2C1 clock source configuration ---------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1) + 8003bba: 687b ldr r3, [r7, #4] + 8003bbc: 681b ldr r3, [r3, #0] + 8003bbe: f003 0304 and.w r3, r3, #4 + 8003bc2: 2b00 cmp r3, #0 + 8003bc4: d004 beq.n 8003bd0 + { + /* Check the parameters */ + assert_param(IS_RCC_I2C1CLKSOURCE(PeriphClkInit->I2c1ClockSelection)); + + /* Configure the I2C1 clock source */ + __HAL_RCC_I2C1_CONFIG(PeriphClkInit->I2c1ClockSelection); + 8003bc6: 687b ldr r3, [r7, #4] + 8003bc8: 6a1b ldr r3, [r3, #32] + 8003bca: 4618 mov r0, r3 + 8003bcc: f7ff fe2a bl 8003824 + } + +#if defined(I2C3) + /*-------------------------- I2C3 clock source configuration ---------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C3) == RCC_PERIPHCLK_I2C3) + 8003bd0: 687b ldr r3, [r7, #4] + 8003bd2: 681b ldr r3, [r3, #0] + 8003bd4: f003 0308 and.w r3, r3, #8 + 8003bd8: 2b00 cmp r3, #0 + 8003bda: d004 beq.n 8003be6 + { + /* Check the parameters */ + assert_param(IS_RCC_I2C3CLKSOURCE(PeriphClkInit->I2c3ClockSelection)); + + /* Configure the I2C3 clock source */ + __HAL_RCC_I2C3_CONFIG(PeriphClkInit->I2c3ClockSelection); + 8003bdc: 687b ldr r3, [r7, #4] + 8003bde: 6a5b ldr r3, [r3, #36] @ 0x24 + 8003be0: 4618 mov r0, r3 + 8003be2: f7ff fe1f bl 8003824 + } +#endif /* I2C3 */ + +#if defined(USB) + /*-------------------------- USB clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == (RCC_PERIPHCLK_USB)) + 8003be6: 687b ldr r3, [r7, #4] + 8003be8: 681b ldr r3, [r3, #0] + 8003bea: f403 7380 and.w r3, r3, #256 @ 0x100 + 8003bee: 2b00 cmp r3, #0 + 8003bf0: d022 beq.n 8003c38 + { + assert_param(IS_RCC_USBCLKSOURCE(PeriphClkInit->UsbClockSelection)); + __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection); + 8003bf2: 687b ldr r3, [r7, #4] + 8003bf4: 6b5b ldr r3, [r3, #52] @ 0x34 + 8003bf6: 4618 mov r0, r3 + 8003bf8: f7ff fe8d bl 8003916 + + if (PeriphClkInit->UsbClockSelection == RCC_USBCLKSOURCE_PLL) + 8003bfc: 687b ldr r3, [r7, #4] + 8003bfe: 6b5b ldr r3, [r3, #52] @ 0x34 + 8003c00: f1b3 6f00 cmp.w r3, #134217728 @ 0x8000000 + 8003c04: d107 bne.n 8003c16 + { + /* Enable PLLQ output */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_USBCLK); + 8003c06: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003c0a: 68db ldr r3, [r3, #12] + 8003c0c: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8003c10: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 + 8003c14: 60d3 str r3, [r2, #12] + } +#if defined(SAI1) + if (PeriphClkInit->UsbClockSelection == RCC_USBCLKSOURCE_PLLSAI1) + 8003c16: 687b ldr r3, [r7, #4] + 8003c18: 6b5b ldr r3, [r3, #52] @ 0x34 + 8003c1a: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000 + 8003c1e: d10b bne.n 8003c38 + { + /* PLLSAI1 parameters N & Q configuration and clock output (PLLSAI1ClockOut) */ + ret = RCCEx_PLLSAI1_ConfigNQ(&(PeriphClkInit->PLLSAI1)); + 8003c20: 687b ldr r3, [r7, #4] + 8003c22: 3304 adds r3, #4 + 8003c24: 4618 mov r0, r3 + 8003c26: f000 f8dd bl 8003de4 + 8003c2a: 4603 mov r3, r0 + 8003c2c: 77fb strb r3, [r7, #31] + + if (ret != HAL_OK) + 8003c2e: 7ffb ldrb r3, [r7, #31] + 8003c30: 2b00 cmp r3, #0 + 8003c32: d001 beq.n 8003c38 + { + /* set overall return value */ + status = ret; + 8003c34: 7ffb ldrb r3, [r7, #31] + 8003c36: 77bb strb r3, [r7, #30] +#endif /* SAI1 */ + } +#endif /* USB */ + + /*-------------------------- RNG clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RNG) == (RCC_PERIPHCLK_RNG)) + 8003c38: 687b ldr r3, [r7, #4] + 8003c3a: 681b ldr r3, [r3, #0] + 8003c3c: f403 7300 and.w r3, r3, #512 @ 0x200 + 8003c40: 2b00 cmp r3, #0 + 8003c42: d02b beq.n 8003c9c + { + /* Check the parameters */ + assert_param(IS_RCC_RNGCLKSOURCE(PeriphClkInit->RngClockSelection)); + + /* Configure the RNG clock source */ + __HAL_RCC_RNG_CONFIG(PeriphClkInit->RngClockSelection); + 8003c44: 687b ldr r3, [r7, #4] + 8003c46: 6b9b ldr r3, [r3, #56] @ 0x38 + 8003c48: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 + 8003c4c: d008 beq.n 8003c60 + 8003c4e: 687b ldr r3, [r7, #4] + 8003c50: 6b9b ldr r3, [r3, #56] @ 0x38 + 8003c52: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 + 8003c56: d003 beq.n 8003c60 + 8003c58: 687b ldr r3, [r7, #4] + 8003c5a: 6b9b ldr r3, [r3, #56] @ 0x38 + 8003c5c: 2b00 cmp r3, #0 + 8003c5e: d105 bne.n 8003c6c + 8003c60: 687b ldr r3, [r7, #4] + 8003c62: 6b9b ldr r3, [r3, #56] @ 0x38 + 8003c64: 4618 mov r0, r3 + 8003c66: f7ff fe2a bl 80038be + 8003c6a: e00a b.n 8003c82 + 8003c6c: 687b ldr r3, [r7, #4] + 8003c6e: 6b9b ldr r3, [r3, #56] @ 0x38 + 8003c70: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 + 8003c74: 60fb str r3, [r7, #12] + 8003c76: 2000 movs r0, #0 + 8003c78: f7ff fe21 bl 80038be + 8003c7c: 68f8 ldr r0, [r7, #12] + 8003c7e: f7ff fe34 bl 80038ea + + if (PeriphClkInit->RngClockSelection == RCC_RNGCLKSOURCE_PLL) + 8003c82: 687b ldr r3, [r7, #4] + 8003c84: 6b9b ldr r3, [r3, #56] @ 0x38 + 8003c86: f1b3 5fc0 cmp.w r3, #402653184 @ 0x18000000 + 8003c8a: d107 bne.n 8003c9c + { + /* Enable PLLQ output */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_RNGCLK); + 8003c8c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003c90: 68db ldr r3, [r3, #12] + 8003c92: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8003c96: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 + 8003c9a: 60d3 str r3, [r2, #12] + } + } + + /*-------------------------- ADC clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC) + 8003c9c: 687b ldr r3, [r7, #4] + 8003c9e: 681b ldr r3, [r3, #0] + 8003ca0: f403 6380 and.w r3, r3, #1024 @ 0x400 + 8003ca4: 2b00 cmp r3, #0 + 8003ca6: d022 beq.n 8003cee + { + /* Check the parameters */ + assert_param(IS_RCC_ADCCLKSOURCE(PeriphClkInit->AdcClockSelection)); + + /* Configure the ADC interface clock source */ + __HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection); + 8003ca8: 687b ldr r3, [r7, #4] + 8003caa: 6bdb ldr r3, [r3, #60] @ 0x3c + 8003cac: 4618 mov r0, r3 + 8003cae: f7ff fe3d bl 800392c + + if (PeriphClkInit->AdcClockSelection == RCC_ADCCLKSOURCE_PLL) + 8003cb2: 687b ldr r3, [r7, #4] + 8003cb4: 6bdb ldr r3, [r3, #60] @ 0x3c + 8003cb6: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 + 8003cba: d107 bne.n 8003ccc + { + /* Enable RCC_PLL_RNGCLK output */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_ADCCLK); + 8003cbc: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003cc0: 68db ldr r3, [r3, #12] + 8003cc2: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 + 8003cc6: f443 3380 orr.w r3, r3, #65536 @ 0x10000 + 8003cca: 60d3 str r3, [r2, #12] + } + +#if defined(SAI1) + if (PeriphClkInit->AdcClockSelection == RCC_ADCCLKSOURCE_PLLSAI1) + 8003ccc: 687b ldr r3, [r7, #4] + 8003cce: 6bdb ldr r3, [r3, #60] @ 0x3c + 8003cd0: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 + 8003cd4: d10b bne.n 8003cee + { + /* PLLSAI1 parameters N & R configuration and clock output (PLLSAI1ClockOut) */ + ret = RCCEx_PLLSAI1_ConfigNR(&(PeriphClkInit->PLLSAI1)); + 8003cd6: 687b ldr r3, [r7, #4] + 8003cd8: 3304 adds r3, #4 + 8003cda: 4618 mov r0, r3 + 8003cdc: f000 f8dd bl 8003e9a + 8003ce0: 4603 mov r3, r0 + 8003ce2: 77fb strb r3, [r7, #31] + + if (ret != HAL_OK) + 8003ce4: 7ffb ldrb r3, [r7, #31] + 8003ce6: 2b00 cmp r3, #0 + 8003ce8: d001 beq.n 8003cee + { + /* set overall return value */ + status = ret; + 8003cea: 7ffb ldrb r3, [r7, #31] + 8003cec: 77bb strb r3, [r7, #30] + } +#endif /* SAI1 */ + } + + /*-------------------------- RFWKP clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RFWAKEUP) == RCC_PERIPHCLK_RFWAKEUP) + 8003cee: 687b ldr r3, [r7, #4] + 8003cf0: 681b ldr r3, [r3, #0] + 8003cf2: f403 5380 and.w r3, r3, #4096 @ 0x1000 + 8003cf6: 2b00 cmp r3, #0 + 8003cf8: d004 beq.n 8003d04 + { + /* Check the parameters */ + assert_param(IS_RCC_RFWKPCLKSOURCE(PeriphClkInit->RFWakeUpClockSelection)); + + /* Configure the RFWKP interface clock source */ + __HAL_RCC_RFWAKEUP_CONFIG(PeriphClkInit->RFWakeUpClockSelection); + 8003cfa: 687b ldr r3, [r7, #4] + 8003cfc: 6c5b ldr r3, [r3, #68] @ 0x44 + 8003cfe: 4618 mov r0, r3 + 8003d00: f7ff fd26 bl 8003750 + + } + +#if defined(RCC_SMPS_SUPPORT) + /*-------------------------- SMPS clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SMPS) == RCC_PERIPHCLK_SMPS) + 8003d04: 687b ldr r3, [r7, #4] + 8003d06: 681b ldr r3, [r3, #0] + 8003d08: f403 5300 and.w r3, r3, #8192 @ 0x2000 + 8003d0c: 2b00 cmp r3, #0 + 8003d0e: d009 beq.n 8003d24 + /* Check the parameters */ + assert_param(IS_RCC_SMPSCLKDIV(PeriphClkInit->SmpsDivSelection)); + assert_param(IS_RCC_SMPSCLKSOURCE(PeriphClkInit->SmpsClockSelection)); + + /* Configure the SMPS interface clock division factor */ + __HAL_RCC_SMPS_DIV_CONFIG(PeriphClkInit->SmpsDivSelection); + 8003d10: 687b ldr r3, [r7, #4] + 8003d12: 6cdb ldr r3, [r3, #76] @ 0x4c + 8003d14: 4618 mov r0, r3 + 8003d16: f7ff fd45 bl 80037a4 + + /* Configure the SMPS interface clock source */ + __HAL_RCC_SMPS_CONFIG(PeriphClkInit->SmpsClockSelection); + 8003d1a: 687b ldr r3, [r7, #4] + 8003d1c: 6c9b ldr r3, [r3, #72] @ 0x48 + 8003d1e: 4618 mov r0, r3 + 8003d20: f7ff fd2c bl 800377c + } +#endif /* RCC_SMPS_SUPPORT */ + + return status; + 8003d24: 7fbb ldrb r3, [r7, #30] +} + 8003d26: 4618 mov r0, r3 + 8003d28: 3720 adds r7, #32 + 8003d2a: 46bd mov sp, r7 + 8003d2c: bd80 pop {r7, pc} + +08003d2e : + * @note PLLSAI1 is temporary disable to apply new parameters + * + * @retval HAL status + */ +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNP(RCC_PLLSAI1InitTypeDef *PLLSAI1) +{ + 8003d2e: b580 push {r7, lr} + 8003d30: b084 sub sp, #16 + 8003d32: af00 add r7, sp, #0 + 8003d34: 6078 str r0, [r7, #4] + uint32_t tickstart; + HAL_StatusTypeDef status = HAL_OK; + 8003d36: 2300 movs r3, #0 + 8003d38: 73fb strb r3, [r7, #15] + assert_param(IS_RCC_PLLN_VALUE(PLLSAI1->PLLN)); + assert_param(IS_RCC_PLLP_VALUE(PLLSAI1->PLLP)); + assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PLLSAI1->PLLSAI1ClockOut)); + + /* Disable the PLLSAI1 */ + __HAL_RCC_PLLSAI1_DISABLE(); + 8003d3a: f7ff fe61 bl 8003a00 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003d3e: f7fd fe31 bl 80019a4 + 8003d42: 60b8 str r0, [r7, #8] + + /* Wait till PLLSAI1 is ready to be updated */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + 8003d44: e009 b.n 8003d5a + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + 8003d46: f7fd fe2d bl 80019a4 + 8003d4a: 4602 mov r2, r0 + 8003d4c: 68bb ldr r3, [r7, #8] + 8003d4e: 1ad3 subs r3, r2, r3 + 8003d50: 2b02 cmp r3, #2 + 8003d52: d902 bls.n 8003d5a + { + status = HAL_TIMEOUT; + 8003d54: 2303 movs r3, #3 + 8003d56: 73fb strb r3, [r7, #15] + break; + 8003d58: e004 b.n 8003d64 + while (LL_RCC_PLLSAI1_IsReady() != 0U) + 8003d5a: f7ff fe60 bl 8003a1e + 8003d5e: 4603 mov r3, r0 + 8003d60: 2b00 cmp r3, #0 + 8003d62: d1f0 bne.n 8003d46 + } + } + + if (status == HAL_OK) + 8003d64: 7bfb ldrb r3, [r7, #15] + 8003d66: 2b00 cmp r3, #0 + 8003d68: d137 bne.n 8003dda + { + /* Configure the PLLSAI1 Multiplication factor N */ + __HAL_RCC_PLLSAI1_MULN_CONFIG(PLLSAI1->PLLN); + 8003d6a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003d6e: 691b ldr r3, [r3, #16] + 8003d70: f423 42fe bic.w r2, r3, #32512 @ 0x7f00 + 8003d74: 687b ldr r3, [r7, #4] + 8003d76: 681b ldr r3, [r3, #0] + 8003d78: 021b lsls r3, r3, #8 + 8003d7a: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003d7e: 4313 orrs r3, r2 + 8003d80: 610b str r3, [r1, #16] + + /* Configure the PLLSAI1 Division factor P */ + __HAL_RCC_PLLSAI1_DIVP_CONFIG(PLLSAI1->PLLP); + 8003d82: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003d86: 691b ldr r3, [r3, #16] + 8003d88: f423 1278 bic.w r2, r3, #4063232 @ 0x3e0000 + 8003d8c: 687b ldr r3, [r7, #4] + 8003d8e: 685b ldr r3, [r3, #4] + 8003d90: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003d94: 4313 orrs r3, r2 + 8003d96: 610b str r3, [r1, #16] + + /* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/ + __HAL_RCC_PLLSAI1_ENABLE(); + 8003d98: f7ff fe23 bl 80039e2 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003d9c: f7fd fe02 bl 80019a4 + 8003da0: 60b8 str r0, [r7, #8] + + /* Wait till PLLSAI1 is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 1U) + 8003da2: e009 b.n 8003db8 + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + 8003da4: f7fd fdfe bl 80019a4 + 8003da8: 4602 mov r2, r0 + 8003daa: 68bb ldr r3, [r7, #8] + 8003dac: 1ad3 subs r3, r2, r3 + 8003dae: 2b02 cmp r3, #2 + 8003db0: d902 bls.n 8003db8 + { + status = HAL_TIMEOUT; + 8003db2: 2303 movs r3, #3 + 8003db4: 73fb strb r3, [r7, #15] + break; + 8003db6: e004 b.n 8003dc2 + while (LL_RCC_PLLSAI1_IsReady() != 1U) + 8003db8: f7ff fe31 bl 8003a1e + 8003dbc: 4603 mov r3, r0 + 8003dbe: 2b01 cmp r3, #1 + 8003dc0: d1f0 bne.n 8003da4 + } + } + + if (status == HAL_OK) + 8003dc2: 7bfb ldrb r3, [r7, #15] + 8003dc4: 2b00 cmp r3, #0 + 8003dc6: d108 bne.n 8003dda + { + /* Configure the PLLSAI1 Clock output(s) */ + __HAL_RCC_PLLSAI1CLKOUT_ENABLE(PLLSAI1->PLLSAI1ClockOut); + 8003dc8: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003dcc: 691a ldr r2, [r3, #16] + 8003dce: 687b ldr r3, [r7, #4] + 8003dd0: 691b ldr r3, [r3, #16] + 8003dd2: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003dd6: 4313 orrs r3, r2 + 8003dd8: 610b str r3, [r1, #16] + } + } + + return status; + 8003dda: 7bfb ldrb r3, [r7, #15] +} + 8003ddc: 4618 mov r0, r3 + 8003dde: 3710 adds r7, #16 + 8003de0: 46bd mov sp, r7 + 8003de2: bd80 pop {r7, pc} + +08003de4 : + * @note PLLSAI1 is temporary disable to apply new parameters + * + * @retval HAL status + */ +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNQ(RCC_PLLSAI1InitTypeDef *PLLSAI1) +{ + 8003de4: b580 push {r7, lr} + 8003de6: b084 sub sp, #16 + 8003de8: af00 add r7, sp, #0 + 8003dea: 6078 str r0, [r7, #4] + uint32_t tickstart; + HAL_StatusTypeDef status = HAL_OK; + 8003dec: 2300 movs r3, #0 + 8003dee: 73fb strb r3, [r7, #15] + assert_param(IS_RCC_PLLN_VALUE(PLLSAI1->PLLN)); + assert_param(IS_RCC_PLLQ_VALUE(PLLSAI1->PLLQ)); + assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PLLSAI1->PLLSAI1ClockOut)); + + /* Disable the PLLSAI1 */ + __HAL_RCC_PLLSAI1_DISABLE(); + 8003df0: f7ff fe06 bl 8003a00 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003df4: f7fd fdd6 bl 80019a4 + 8003df8: 60b8 str r0, [r7, #8] + + /* Wait till PLLSAI1 is ready to be updated */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + 8003dfa: e009 b.n 8003e10 + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + 8003dfc: f7fd fdd2 bl 80019a4 + 8003e00: 4602 mov r2, r0 + 8003e02: 68bb ldr r3, [r7, #8] + 8003e04: 1ad3 subs r3, r2, r3 + 8003e06: 2b02 cmp r3, #2 + 8003e08: d902 bls.n 8003e10 + { + status = HAL_TIMEOUT; + 8003e0a: 2303 movs r3, #3 + 8003e0c: 73fb strb r3, [r7, #15] + break; + 8003e0e: e004 b.n 8003e1a + while (LL_RCC_PLLSAI1_IsReady() != 0U) + 8003e10: f7ff fe05 bl 8003a1e + 8003e14: 4603 mov r3, r0 + 8003e16: 2b00 cmp r3, #0 + 8003e18: d1f0 bne.n 8003dfc + } + } + + if (status == HAL_OK) + 8003e1a: 7bfb ldrb r3, [r7, #15] + 8003e1c: 2b00 cmp r3, #0 + 8003e1e: d137 bne.n 8003e90 + { + /* Configure the PLLSAI1 Multiplication factor N */ + __HAL_RCC_PLLSAI1_MULN_CONFIG(PLLSAI1->PLLN); + 8003e20: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003e24: 691b ldr r3, [r3, #16] + 8003e26: f423 42fe bic.w r2, r3, #32512 @ 0x7f00 + 8003e2a: 687b ldr r3, [r7, #4] + 8003e2c: 681b ldr r3, [r3, #0] + 8003e2e: 021b lsls r3, r3, #8 + 8003e30: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003e34: 4313 orrs r3, r2 + 8003e36: 610b str r3, [r1, #16] + /* Configure the PLLSAI1 Division factor Q */ + __HAL_RCC_PLLSAI1_DIVQ_CONFIG(PLLSAI1->PLLQ); + 8003e38: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003e3c: 691b ldr r3, [r3, #16] + 8003e3e: f023 6260 bic.w r2, r3, #234881024 @ 0xe000000 + 8003e42: 687b ldr r3, [r7, #4] + 8003e44: 689b ldr r3, [r3, #8] + 8003e46: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003e4a: 4313 orrs r3, r2 + 8003e4c: 610b str r3, [r1, #16] + + /* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/ + __HAL_RCC_PLLSAI1_ENABLE(); + 8003e4e: f7ff fdc8 bl 80039e2 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003e52: f7fd fda7 bl 80019a4 + 8003e56: 60b8 str r0, [r7, #8] + + /* Wait till PLLSAI1 is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 1U) + 8003e58: e009 b.n 8003e6e + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + 8003e5a: f7fd fda3 bl 80019a4 + 8003e5e: 4602 mov r2, r0 + 8003e60: 68bb ldr r3, [r7, #8] + 8003e62: 1ad3 subs r3, r2, r3 + 8003e64: 2b02 cmp r3, #2 + 8003e66: d902 bls.n 8003e6e + { + status = HAL_TIMEOUT; + 8003e68: 2303 movs r3, #3 + 8003e6a: 73fb strb r3, [r7, #15] + break; + 8003e6c: e004 b.n 8003e78 + while (LL_RCC_PLLSAI1_IsReady() != 1U) + 8003e6e: f7ff fdd6 bl 8003a1e + 8003e72: 4603 mov r3, r0 + 8003e74: 2b01 cmp r3, #1 + 8003e76: d1f0 bne.n 8003e5a + } + } + + if (status == HAL_OK) + 8003e78: 7bfb ldrb r3, [r7, #15] + 8003e7a: 2b00 cmp r3, #0 + 8003e7c: d108 bne.n 8003e90 + { + /* Configure the PLLSAI1 Clock output(s) */ + __HAL_RCC_PLLSAI1CLKOUT_ENABLE(PLLSAI1->PLLSAI1ClockOut); + 8003e7e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003e82: 691a ldr r2, [r3, #16] + 8003e84: 687b ldr r3, [r7, #4] + 8003e86: 691b ldr r3, [r3, #16] + 8003e88: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003e8c: 4313 orrs r3, r2 + 8003e8e: 610b str r3, [r1, #16] + } + } + + return status; + 8003e90: 7bfb ldrb r3, [r7, #15] +} + 8003e92: 4618 mov r0, r3 + 8003e94: 3710 adds r7, #16 + 8003e96: 46bd mov sp, r7 + 8003e98: bd80 pop {r7, pc} + +08003e9a : + * @note PLLSAI1 is temporary disable to apply new parameters + * + * @retval HAL status + */ +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNR(RCC_PLLSAI1InitTypeDef *PLLSAI1) +{ + 8003e9a: b580 push {r7, lr} + 8003e9c: b084 sub sp, #16 + 8003e9e: af00 add r7, sp, #0 + 8003ea0: 6078 str r0, [r7, #4] + uint32_t tickstart; + HAL_StatusTypeDef status = HAL_OK; + 8003ea2: 2300 movs r3, #0 + 8003ea4: 73fb strb r3, [r7, #15] + assert_param(IS_RCC_PLLN_VALUE(PLLSAI1->PLLN)); + assert_param(IS_RCC_PLLR_VALUE(PLLSAI1->PLLR)); + assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PLLSAI1->PLLSAI1ClockOut)); + + /* Disable the PLLSAI1 */ + __HAL_RCC_PLLSAI1_DISABLE(); + 8003ea6: f7ff fdab bl 8003a00 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003eaa: f7fd fd7b bl 80019a4 + 8003eae: 60b8 str r0, [r7, #8] + + /* Wait till PLLSAI1 is ready to be updated */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + 8003eb0: e009 b.n 8003ec6 + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + 8003eb2: f7fd fd77 bl 80019a4 + 8003eb6: 4602 mov r2, r0 + 8003eb8: 68bb ldr r3, [r7, #8] + 8003eba: 1ad3 subs r3, r2, r3 + 8003ebc: 2b02 cmp r3, #2 + 8003ebe: d902 bls.n 8003ec6 + { + status = HAL_TIMEOUT; + 8003ec0: 2303 movs r3, #3 + 8003ec2: 73fb strb r3, [r7, #15] + break; + 8003ec4: e004 b.n 8003ed0 + while (LL_RCC_PLLSAI1_IsReady() != 0U) + 8003ec6: f7ff fdaa bl 8003a1e + 8003eca: 4603 mov r3, r0 + 8003ecc: 2b00 cmp r3, #0 + 8003ece: d1f0 bne.n 8003eb2 + } + } + + if (status == HAL_OK) + 8003ed0: 7bfb ldrb r3, [r7, #15] + 8003ed2: 2b00 cmp r3, #0 + 8003ed4: d137 bne.n 8003f46 + { + /* Configure the PLLSAI1 Multiplication factor N */ + __HAL_RCC_PLLSAI1_MULN_CONFIG(PLLSAI1->PLLN); + 8003ed6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003eda: 691b ldr r3, [r3, #16] + 8003edc: f423 42fe bic.w r2, r3, #32512 @ 0x7f00 + 8003ee0: 687b ldr r3, [r7, #4] + 8003ee2: 681b ldr r3, [r3, #0] + 8003ee4: 021b lsls r3, r3, #8 + 8003ee6: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003eea: 4313 orrs r3, r2 + 8003eec: 610b str r3, [r1, #16] + /* Configure the PLLSAI1 Division factor R */ + __HAL_RCC_PLLSAI1_DIVR_CONFIG(PLLSAI1->PLLR); + 8003eee: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003ef2: 691b ldr r3, [r3, #16] + 8003ef4: f023 4260 bic.w r2, r3, #3758096384 @ 0xe0000000 + 8003ef8: 687b ldr r3, [r7, #4] + 8003efa: 68db ldr r3, [r3, #12] + 8003efc: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003f00: 4313 orrs r3, r2 + 8003f02: 610b str r3, [r1, #16] + + /* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/ + __HAL_RCC_PLLSAI1_ENABLE(); + 8003f04: f7ff fd6d bl 80039e2 + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + 8003f08: f7fd fd4c bl 80019a4 + 8003f0c: 60b8 str r0, [r7, #8] + + /* Wait till PLLSAI1 is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 1U) + 8003f0e: e009 b.n 8003f24 + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + 8003f10: f7fd fd48 bl 80019a4 + 8003f14: 4602 mov r2, r0 + 8003f16: 68bb ldr r3, [r7, #8] + 8003f18: 1ad3 subs r3, r2, r3 + 8003f1a: 2b02 cmp r3, #2 + 8003f1c: d902 bls.n 8003f24 + { + status = HAL_TIMEOUT; + 8003f1e: 2303 movs r3, #3 + 8003f20: 73fb strb r3, [r7, #15] + break; + 8003f22: e004 b.n 8003f2e + while (LL_RCC_PLLSAI1_IsReady() != 1U) + 8003f24: f7ff fd7b bl 8003a1e + 8003f28: 4603 mov r3, r0 + 8003f2a: 2b01 cmp r3, #1 + 8003f2c: d1f0 bne.n 8003f10 + } + } + + if (status == HAL_OK) + 8003f2e: 7bfb ldrb r3, [r7, #15] + 8003f30: 2b00 cmp r3, #0 + 8003f32: d108 bne.n 8003f46 + { + /* Configure the PLLSAI1 Clock output(s) */ + __HAL_RCC_PLLSAI1CLKOUT_ENABLE(PLLSAI1->PLLSAI1ClockOut); + 8003f34: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8003f38: 691a ldr r2, [r3, #16] + 8003f3a: 687b ldr r3, [r7, #4] + 8003f3c: 691b ldr r3, [r3, #16] + 8003f3e: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8003f42: 4313 orrs r3, r2 + 8003f44: 610b str r3, [r1, #16] + } + } + + return status; + 8003f46: 7bfb ldrb r3, [r7, #15] +} + 8003f48: 4618 mov r0, r3 + 8003f4a: 3710 adds r7, #16 + 8003f4c: 46bd mov sp, r7 + 8003f4e: bd80 pop {r7, pc} + +08003f50 : + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc) +{ + 8003f50: b580 push {r7, lr} + 8003f52: b084 sub sp, #16 + 8003f54: af00 add r7, sp, #0 + 8003f56: 6078 str r0, [r7, #4] + HAL_StatusTypeDef status; + + /* Check RTC handler validity */ + if (hrtc == NULL) + 8003f58: 687b ldr r3, [r7, #4] + 8003f5a: 2b00 cmp r3, #0 + 8003f5c: d101 bne.n 8003f62 + { + return HAL_ERROR; + 8003f5e: 2301 movs r3, #1 + 8003f60: e07a b.n 8004058 + { + hrtc->MspDeInitCallback = HAL_RTC_MspDeInit; + } + } +#else /* USE_HAL_RTC_REGISTER_CALLBACKS */ + if (hrtc->State == HAL_RTC_STATE_RESET) + 8003f62: 687b ldr r3, [r7, #4] + 8003f64: f893 3021 ldrb.w r3, [r3, #33] @ 0x21 + 8003f68: b2db uxtb r3, r3 + 8003f6a: 2b00 cmp r3, #0 + 8003f6c: d106 bne.n 8003f7c + { + /* Allocate lock resource and initialize it */ + hrtc->Lock = HAL_UNLOCKED; + 8003f6e: 687b ldr r3, [r7, #4] + 8003f70: 2200 movs r2, #0 + 8003f72: f883 2020 strb.w r2, [r3, #32] + + /* Initialize RTC MSP */ + HAL_RTC_MspInit(hrtc); + 8003f76: 6878 ldr r0, [r7, #4] + 8003f78: f7fd fbac bl 80016d4 + } +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + + /* Set RTC state */ + hrtc->State = HAL_RTC_STATE_BUSY; + 8003f7c: 687b ldr r3, [r7, #4] + 8003f7e: 2202 movs r2, #2 + 8003f80: f883 2021 strb.w r2, [r3, #33] @ 0x21 + + /* Check whether the calendar needs to be initialized */ + if (__HAL_RTC_IS_CALENDAR_INITIALIZED(hrtc) == 0U) + 8003f84: 687b ldr r3, [r7, #4] + 8003f86: 681b ldr r3, [r3, #0] + 8003f88: 68db ldr r3, [r3, #12] + 8003f8a: f003 0310 and.w r3, r3, #16 + 8003f8e: 2b10 cmp r3, #16 + 8003f90: d058 beq.n 8004044 + { + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + 8003f92: 687b ldr r3, [r7, #4] + 8003f94: 681b ldr r3, [r3, #0] + 8003f96: 22ca movs r2, #202 @ 0xca + 8003f98: 625a str r2, [r3, #36] @ 0x24 + 8003f9a: 687b ldr r3, [r7, #4] + 8003f9c: 681b ldr r3, [r3, #0] + 8003f9e: 2253 movs r2, #83 @ 0x53 + 8003fa0: 625a str r2, [r3, #36] @ 0x24 + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + 8003fa2: 6878 ldr r0, [r7, #4] + 8003fa4: f000 f9aa bl 80042fc + 8003fa8: 4603 mov r3, r0 + 8003faa: 73fb strb r3, [r7, #15] + + if (status == HAL_OK) + 8003fac: 7bfb ldrb r3, [r7, #15] + 8003fae: 2b00 cmp r3, #0 + 8003fb0: d12c bne.n 800400c + { + /* Clear RTC_CR FMT, OSEL and POL Bits */ + hrtc->Instance->CR &= ((uint32_t)~(RTC_CR_FMT | RTC_CR_OSEL | RTC_CR_POL)); + 8003fb2: 687b ldr r3, [r7, #4] + 8003fb4: 681b ldr r3, [r3, #0] + 8003fb6: 689b ldr r3, [r3, #8] + 8003fb8: 687a ldr r2, [r7, #4] + 8003fba: 6812 ldr r2, [r2, #0] + 8003fbc: f423 03e0 bic.w r3, r3, #7340032 @ 0x700000 + 8003fc0: f023 0340 bic.w r3, r3, #64 @ 0x40 + 8003fc4: 6093 str r3, [r2, #8] + /* Set RTC_CR register */ + hrtc->Instance->CR |= (uint32_t)(hrtc->Init.HourFormat | hrtc->Init.OutPut | hrtc->Init.OutPutPolarity); + 8003fc6: 687b ldr r3, [r7, #4] + 8003fc8: 681b ldr r3, [r3, #0] + 8003fca: 6899 ldr r1, [r3, #8] + 8003fcc: 687b ldr r3, [r7, #4] + 8003fce: 685a ldr r2, [r3, #4] + 8003fd0: 687b ldr r3, [r7, #4] + 8003fd2: 691b ldr r3, [r3, #16] + 8003fd4: 431a orrs r2, r3 + 8003fd6: 687b ldr r3, [r7, #4] + 8003fd8: 699b ldr r3, [r3, #24] + 8003fda: 431a orrs r2, r3 + 8003fdc: 687b ldr r3, [r7, #4] + 8003fde: 681b ldr r3, [r3, #0] + 8003fe0: 430a orrs r2, r1 + 8003fe2: 609a str r2, [r3, #8] + + /* Configure the RTC PRER */ + hrtc->Instance->PRER = (uint32_t)(hrtc->Init.SynchPrediv); + 8003fe4: 687b ldr r3, [r7, #4] + 8003fe6: 681b ldr r3, [r3, #0] + 8003fe8: 687a ldr r2, [r7, #4] + 8003fea: 68d2 ldr r2, [r2, #12] + 8003fec: 611a str r2, [r3, #16] + hrtc->Instance->PRER |= (uint32_t)(hrtc->Init.AsynchPrediv << RTC_PRER_PREDIV_A_Pos); + 8003fee: 687b ldr r3, [r7, #4] + 8003ff0: 681b ldr r3, [r3, #0] + 8003ff2: 6919 ldr r1, [r3, #16] + 8003ff4: 687b ldr r3, [r7, #4] + 8003ff6: 689b ldr r3, [r3, #8] + 8003ff8: 041a lsls r2, r3, #16 + 8003ffa: 687b ldr r3, [r7, #4] + 8003ffc: 681b ldr r3, [r3, #0] + 8003ffe: 430a orrs r2, r1 + 8004000: 611a str r2, [r3, #16] + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + 8004002: 6878 ldr r0, [r7, #4] + 8004004: f000 f9b2 bl 800436c + 8004008: 4603 mov r3, r0 + 800400a: 73fb strb r3, [r7, #15] + } + + if (status == HAL_OK) + 800400c: 7bfb ldrb r3, [r7, #15] + 800400e: 2b00 cmp r3, #0 + 8004010: d113 bne.n 800403a + { +#if defined(RTC_OR_ALARMOUTTYPE) + hrtc->Instance->OR &= (uint32_t)~(RTC_OUTPUT_TYPE_PUSHPULL | RTC_OUTPUT_REMAP_POS1); + 8004012: 687b ldr r3, [r7, #4] + 8004014: 681b ldr r3, [r3, #0] + 8004016: 6cda ldr r2, [r3, #76] @ 0x4c + 8004018: 687b ldr r3, [r7, #4] + 800401a: 681b ldr r3, [r3, #0] + 800401c: f022 0203 bic.w r2, r2, #3 + 8004020: 64da str r2, [r3, #76] @ 0x4c + hrtc->Instance->OR |= (uint32_t)(hrtc->Init.OutPutType | hrtc->Init.OutPutRemap); + 8004022: 687b ldr r3, [r7, #4] + 8004024: 681b ldr r3, [r3, #0] + 8004026: 6cd9 ldr r1, [r3, #76] @ 0x4c + 8004028: 687b ldr r3, [r7, #4] + 800402a: 69da ldr r2, [r3, #28] + 800402c: 687b ldr r3, [r7, #4] + 800402e: 695b ldr r3, [r3, #20] + 8004030: 431a orrs r2, r3 + 8004032: 687b ldr r3, [r7, #4] + 8004034: 681b ldr r3, [r3, #0] + 8004036: 430a orrs r2, r1 + 8004038: 64da str r2, [r3, #76] @ 0x4c + hrtc->Instance->OR |= (uint32_t)(hrtc->Init.OutPutRemap); +#endif /* RTC_OR_ALARMOUTTYPE */ + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + 800403a: 687b ldr r3, [r7, #4] + 800403c: 681b ldr r3, [r3, #0] + 800403e: 22ff movs r2, #255 @ 0xff + 8004040: 625a str r2, [r3, #36] @ 0x24 + 8004042: e001 b.n 8004048 + } + else + { + /* The calendar is already initialized */ + status = HAL_OK; + 8004044: 2300 movs r3, #0 + 8004046: 73fb strb r3, [r7, #15] + } + + if (status == HAL_OK) + 8004048: 7bfb ldrb r3, [r7, #15] + 800404a: 2b00 cmp r3, #0 + 800404c: d103 bne.n 8004056 + { + hrtc->State = HAL_RTC_STATE_READY; + 800404e: 687b ldr r3, [r7, #4] + 8004050: 2201 movs r2, #1 + 8004052: f883 2021 strb.w r2, [r3, #33] @ 0x21 + } + + return status; + 8004056: 7bfb ldrb r3, [r7, #15] +} + 8004058: 4618 mov r0, r3 + 800405a: 3710 adds r7, #16 + 800405c: 46bd mov sp, r7 + 800405e: bd80 pop {r7, pc} + +08004060 : + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) +{ + 8004060: b590 push {r4, r7, lr} + 8004062: b087 sub sp, #28 + 8004064: af00 add r7, sp, #0 + 8004066: 60f8 str r0, [r7, #12] + 8004068: 60b9 str r1, [r7, #8] + 800406a: 607a str r2, [r7, #4] + uint32_t tmpreg = 0U; + 800406c: 2300 movs r3, #0 + 800406e: 617b str r3, [r7, #20] + assert_param(IS_RTC_FORMAT(Format)); + assert_param(IS_RTC_DAYLIGHT_SAVING(sTime->DayLightSaving)); + assert_param(IS_RTC_STORE_OPERATION(sTime->StoreOperation)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + 8004070: 68fb ldr r3, [r7, #12] + 8004072: f893 3020 ldrb.w r3, [r3, #32] + 8004076: 2b01 cmp r3, #1 + 8004078: d101 bne.n 800407e + 800407a: 2302 movs r3, #2 + 800407c: e08b b.n 8004196 + 800407e: 68fb ldr r3, [r7, #12] + 8004080: 2201 movs r2, #1 + 8004082: f883 2020 strb.w r2, [r3, #32] + + hrtc->State = HAL_RTC_STATE_BUSY; + 8004086: 68fb ldr r3, [r7, #12] + 8004088: 2202 movs r2, #2 + 800408a: f883 2021 strb.w r2, [r3, #33] @ 0x21 + + if (Format == RTC_FORMAT_BIN) + 800408e: 687b ldr r3, [r7, #4] + 8004090: 2b00 cmp r3, #0 + 8004092: d126 bne.n 80040e2 + { + if ((hrtc->Instance->CR & RTC_CR_FMT) != 0U) + 8004094: 68fb ldr r3, [r7, #12] + 8004096: 681b ldr r3, [r3, #0] + 8004098: 689b ldr r3, [r3, #8] + 800409a: f003 0340 and.w r3, r3, #64 @ 0x40 + 800409e: 2b00 cmp r3, #0 + 80040a0: d102 bne.n 80040a8 + assert_param(IS_RTC_HOUR12(sTime->Hours)); + assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat)); + } + else + { + sTime->TimeFormat = 0x00U; + 80040a2: 68bb ldr r3, [r7, #8] + 80040a4: 2200 movs r2, #0 + 80040a6: 70da strb r2, [r3, #3] + assert_param(IS_RTC_HOUR24(sTime->Hours)); + } + assert_param(IS_RTC_MINUTES(sTime->Minutes)); + assert_param(IS_RTC_SECONDS(sTime->Seconds)); + + tmpreg = (uint32_t)(( (uint32_t)RTC_ByteToBcd2(sTime->Hours) << RTC_TR_HU_Pos) | \ + 80040a8: 68bb ldr r3, [r7, #8] + 80040aa: 781b ldrb r3, [r3, #0] + 80040ac: 4618 mov r0, r3 + 80040ae: f000 f983 bl 80043b8 + 80040b2: 4603 mov r3, r0 + 80040b4: 041c lsls r4, r3, #16 + ( (uint32_t)RTC_ByteToBcd2(sTime->Minutes) << RTC_TR_MNU_Pos) | \ + 80040b6: 68bb ldr r3, [r7, #8] + 80040b8: 785b ldrb r3, [r3, #1] + 80040ba: 4618 mov r0, r3 + 80040bc: f000 f97c bl 80043b8 + 80040c0: 4603 mov r3, r0 + 80040c2: 021b lsls r3, r3, #8 + tmpreg = (uint32_t)(( (uint32_t)RTC_ByteToBcd2(sTime->Hours) << RTC_TR_HU_Pos) | \ + 80040c4: 431c orrs r4, r3 + ( (uint32_t)RTC_ByteToBcd2(sTime->Seconds)) | \ + 80040c6: 68bb ldr r3, [r7, #8] + 80040c8: 789b ldrb r3, [r3, #2] + 80040ca: 4618 mov r0, r3 + 80040cc: f000 f974 bl 80043b8 + 80040d0: 4603 mov r3, r0 + ( (uint32_t)RTC_ByteToBcd2(sTime->Minutes) << RTC_TR_MNU_Pos) | \ + 80040d2: ea44 0203 orr.w r2, r4, r3 + (((uint32_t)sTime->TimeFormat) << RTC_TR_PM_Pos)); + 80040d6: 68bb ldr r3, [r7, #8] + 80040d8: 78db ldrb r3, [r3, #3] + 80040da: 059b lsls r3, r3, #22 + tmpreg = (uint32_t)(( (uint32_t)RTC_ByteToBcd2(sTime->Hours) << RTC_TR_HU_Pos) | \ + 80040dc: 4313 orrs r3, r2 + 80040de: 617b str r3, [r7, #20] + 80040e0: e018 b.n 8004114 + } + else + { + if ((hrtc->Instance->CR & RTC_CR_FMT) != 0U) + 80040e2: 68fb ldr r3, [r7, #12] + 80040e4: 681b ldr r3, [r3, #0] + 80040e6: 689b ldr r3, [r3, #8] + 80040e8: f003 0340 and.w r3, r3, #64 @ 0x40 + 80040ec: 2b00 cmp r3, #0 + 80040ee: d102 bne.n 80040f6 + assert_param(IS_RTC_HOUR12(RTC_Bcd2ToByte(sTime->Hours))); + assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat)); + } + else + { + sTime->TimeFormat = 0x00U; + 80040f0: 68bb ldr r3, [r7, #8] + 80040f2: 2200 movs r2, #0 + 80040f4: 70da strb r2, [r3, #3] + assert_param(IS_RTC_HOUR24(RTC_Bcd2ToByte(sTime->Hours))); + } + assert_param(IS_RTC_MINUTES(RTC_Bcd2ToByte(sTime->Minutes))); + assert_param(IS_RTC_SECONDS(RTC_Bcd2ToByte(sTime->Seconds))); + tmpreg = (((uint32_t)(sTime->Hours) << RTC_TR_HU_Pos) | \ + 80040f6: 68bb ldr r3, [r7, #8] + 80040f8: 781b ldrb r3, [r3, #0] + 80040fa: 041a lsls r2, r3, #16 + ((uint32_t)(sTime->Minutes) << RTC_TR_MNU_Pos) | \ + 80040fc: 68bb ldr r3, [r7, #8] + 80040fe: 785b ldrb r3, [r3, #1] + 8004100: 021b lsls r3, r3, #8 + tmpreg = (((uint32_t)(sTime->Hours) << RTC_TR_HU_Pos) | \ + 8004102: 4313 orrs r3, r2 + ((uint32_t) sTime->Seconds) | \ + 8004104: 68ba ldr r2, [r7, #8] + 8004106: 7892 ldrb r2, [r2, #2] + ((uint32_t)(sTime->Minutes) << RTC_TR_MNU_Pos) | \ + 8004108: 431a orrs r2, r3 + ((uint32_t)(sTime->TimeFormat) << RTC_TR_PM_Pos)); + 800410a: 68bb ldr r3, [r7, #8] + 800410c: 78db ldrb r3, [r3, #3] + 800410e: 059b lsls r3, r3, #22 + tmpreg = (((uint32_t)(sTime->Hours) << RTC_TR_HU_Pos) | \ + 8004110: 4313 orrs r3, r2 + 8004112: 617b str r3, [r7, #20] + } + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + 8004114: 68fb ldr r3, [r7, #12] + 8004116: 681b ldr r3, [r3, #0] + 8004118: 22ca movs r2, #202 @ 0xca + 800411a: 625a str r2, [r3, #36] @ 0x24 + 800411c: 68fb ldr r3, [r7, #12] + 800411e: 681b ldr r3, [r3, #0] + 8004120: 2253 movs r2, #83 @ 0x53 + 8004122: 625a str r2, [r3, #36] @ 0x24 + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + 8004124: 68f8 ldr r0, [r7, #12] + 8004126: f000 f8e9 bl 80042fc + 800412a: 4603 mov r3, r0 + 800412c: 74fb strb r3, [r7, #19] + + if (status == HAL_OK) + 800412e: 7cfb ldrb r3, [r7, #19] + 8004130: 2b00 cmp r3, #0 + 8004132: d120 bne.n 8004176 + { + /* Set the RTC_TR register */ + hrtc->Instance->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); + 8004134: 68fb ldr r3, [r7, #12] + 8004136: 681a ldr r2, [r3, #0] + 8004138: 697b ldr r3, [r7, #20] + 800413a: f003 337f and.w r3, r3, #2139062143 @ 0x7f7f7f7f + 800413e: f023 43fe bic.w r3, r3, #2130706432 @ 0x7f000000 + 8004142: 6013 str r3, [r2, #0] + + /* Clear the bits to be configured (Deprecated. Use HAL_RTC_DST_xxx functions instead) */ + hrtc->Instance->CR &= (uint32_t)~RTC_CR_BKP; + 8004144: 68fb ldr r3, [r7, #12] + 8004146: 681b ldr r3, [r3, #0] + 8004148: 689a ldr r2, [r3, #8] + 800414a: 68fb ldr r3, [r7, #12] + 800414c: 681b ldr r3, [r3, #0] + 800414e: f422 2280 bic.w r2, r2, #262144 @ 0x40000 + 8004152: 609a str r2, [r3, #8] + + /* Configure the RTC_CR register (Deprecated. Use HAL_RTC_DST_xxx functions instead) */ + hrtc->Instance->CR |= (uint32_t)(sTime->DayLightSaving | sTime->StoreOperation); + 8004154: 68fb ldr r3, [r7, #12] + 8004156: 681b ldr r3, [r3, #0] + 8004158: 6899 ldr r1, [r3, #8] + 800415a: 68bb ldr r3, [r7, #8] + 800415c: 68da ldr r2, [r3, #12] + 800415e: 68bb ldr r3, [r7, #8] + 8004160: 691b ldr r3, [r3, #16] + 8004162: 431a orrs r2, r3 + 8004164: 68fb ldr r3, [r7, #12] + 8004166: 681b ldr r3, [r3, #0] + 8004168: 430a orrs r2, r1 + 800416a: 609a str r2, [r3, #8] + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + 800416c: 68f8 ldr r0, [r7, #12] + 800416e: f000 f8fd bl 800436c + 8004172: 4603 mov r3, r0 + 8004174: 74fb strb r3, [r7, #19] + } + + if (status == HAL_OK) + 8004176: 7cfb ldrb r3, [r7, #19] + 8004178: 2b00 cmp r3, #0 + 800417a: d103 bne.n 8004184 + { + hrtc->State = HAL_RTC_STATE_READY; + 800417c: 68fb ldr r3, [r7, #12] + 800417e: 2201 movs r2, #1 + 8004180: f883 2021 strb.w r2, [r3, #33] @ 0x21 + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + 8004184: 68fb ldr r3, [r7, #12] + 8004186: 681b ldr r3, [r3, #0] + 8004188: 22ff movs r2, #255 @ 0xff + 800418a: 625a str r2, [r3, #36] @ 0x24 + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + 800418c: 68fb ldr r3, [r7, #12] + 800418e: 2200 movs r2, #0 + 8004190: f883 2020 strb.w r2, [r3, #32] + + return status; + 8004194: 7cfb ldrb r3, [r7, #19] +} + 8004196: 4618 mov r0, r3 + 8004198: 371c adds r7, #28 + 800419a: 46bd mov sp, r7 + 800419c: bd90 pop {r4, r7, pc} + +0800419e : + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) +{ + 800419e: b590 push {r4, r7, lr} + 80041a0: b087 sub sp, #28 + 80041a2: af00 add r7, sp, #0 + 80041a4: 60f8 str r0, [r7, #12] + 80041a6: 60b9 str r1, [r7, #8] + 80041a8: 607a str r2, [r7, #4] + uint32_t datetmpreg = 0U; + 80041aa: 2300 movs r3, #0 + 80041ac: 617b str r3, [r7, #20] + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + 80041ae: 68fb ldr r3, [r7, #12] + 80041b0: f893 3020 ldrb.w r3, [r3, #32] + 80041b4: 2b01 cmp r3, #1 + 80041b6: d101 bne.n 80041bc + 80041b8: 2302 movs r3, #2 + 80041ba: e075 b.n 80042a8 + 80041bc: 68fb ldr r3, [r7, #12] + 80041be: 2201 movs r2, #1 + 80041c0: f883 2020 strb.w r2, [r3, #32] + + hrtc->State = HAL_RTC_STATE_BUSY; + 80041c4: 68fb ldr r3, [r7, #12] + 80041c6: 2202 movs r2, #2 + 80041c8: f883 2021 strb.w r2, [r3, #33] @ 0x21 + + if ((Format == RTC_FORMAT_BIN) && ((sDate->Month & 0x10U) == 0x10U)) + 80041cc: 687b ldr r3, [r7, #4] + 80041ce: 2b00 cmp r3, #0 + 80041d0: d10e bne.n 80041f0 + 80041d2: 68bb ldr r3, [r7, #8] + 80041d4: 785b ldrb r3, [r3, #1] + 80041d6: f003 0310 and.w r3, r3, #16 + 80041da: 2b00 cmp r3, #0 + 80041dc: d008 beq.n 80041f0 + { + sDate->Month = (uint8_t)((sDate->Month & (uint8_t)~(0x10U)) + (uint8_t)0x0AU); + 80041de: 68bb ldr r3, [r7, #8] + 80041e0: 785b ldrb r3, [r3, #1] + 80041e2: f023 0310 bic.w r3, r3, #16 + 80041e6: b2db uxtb r3, r3 + 80041e8: 330a adds r3, #10 + 80041ea: b2da uxtb r2, r3 + 80041ec: 68bb ldr r3, [r7, #8] + 80041ee: 705a strb r2, [r3, #1] + } + + assert_param(IS_RTC_WEEKDAY(sDate->WeekDay)); + + if (Format == RTC_FORMAT_BIN) + 80041f0: 687b ldr r3, [r7, #4] + 80041f2: 2b00 cmp r3, #0 + 80041f4: d11c bne.n 8004230 + { + assert_param(IS_RTC_YEAR(sDate->Year)); + assert_param(IS_RTC_MONTH(sDate->Month)); + assert_param(IS_RTC_DATE(sDate->Date)); + + datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << RTC_DR_YU_Pos) | \ + 80041f6: 68bb ldr r3, [r7, #8] + 80041f8: 78db ldrb r3, [r3, #3] + 80041fa: 4618 mov r0, r3 + 80041fc: f000 f8dc bl 80043b8 + 8004200: 4603 mov r3, r0 + 8004202: 041c lsls r4, r3, #16 + ((uint32_t)RTC_ByteToBcd2(sDate->Month) << RTC_DR_MU_Pos) | \ + 8004204: 68bb ldr r3, [r7, #8] + 8004206: 785b ldrb r3, [r3, #1] + 8004208: 4618 mov r0, r3 + 800420a: f000 f8d5 bl 80043b8 + 800420e: 4603 mov r3, r0 + 8004210: 021b lsls r3, r3, #8 + datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << RTC_DR_YU_Pos) | \ + 8004212: 431c orrs r4, r3 + ((uint32_t)RTC_ByteToBcd2(sDate->Date)) | \ + 8004214: 68bb ldr r3, [r7, #8] + 8004216: 789b ldrb r3, [r3, #2] + 8004218: 4618 mov r0, r3 + 800421a: f000 f8cd bl 80043b8 + 800421e: 4603 mov r3, r0 + ((uint32_t)RTC_ByteToBcd2(sDate->Month) << RTC_DR_MU_Pos) | \ + 8004220: ea44 0203 orr.w r2, r4, r3 + ((uint32_t)sDate->WeekDay << RTC_DR_WDU_Pos)); + 8004224: 68bb ldr r3, [r7, #8] + 8004226: 781b ldrb r3, [r3, #0] + 8004228: 035b lsls r3, r3, #13 + datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << RTC_DR_YU_Pos) | \ + 800422a: 4313 orrs r3, r2 + 800422c: 617b str r3, [r7, #20] + 800422e: e00e b.n 800424e + { + assert_param(IS_RTC_YEAR(RTC_Bcd2ToByte(sDate->Year))); + assert_param(IS_RTC_MONTH(RTC_Bcd2ToByte(sDate->Month))); + assert_param(IS_RTC_DATE(RTC_Bcd2ToByte(sDate->Date))); + + datetmpreg = ((((uint32_t)sDate->Year) << RTC_DR_YU_Pos) | \ + 8004230: 68bb ldr r3, [r7, #8] + 8004232: 78db ldrb r3, [r3, #3] + 8004234: 041a lsls r2, r3, #16 + (((uint32_t)sDate->Month) << RTC_DR_MU_Pos) | \ + 8004236: 68bb ldr r3, [r7, #8] + 8004238: 785b ldrb r3, [r3, #1] + 800423a: 021b lsls r3, r3, #8 + datetmpreg = ((((uint32_t)sDate->Year) << RTC_DR_YU_Pos) | \ + 800423c: 4313 orrs r3, r2 + ((uint32_t) sDate->Date) | \ + 800423e: 68ba ldr r2, [r7, #8] + 8004240: 7892 ldrb r2, [r2, #2] + (((uint32_t)sDate->Month) << RTC_DR_MU_Pos) | \ + 8004242: 431a orrs r2, r3 + (((uint32_t)sDate->WeekDay) << RTC_DR_WDU_Pos)); + 8004244: 68bb ldr r3, [r7, #8] + 8004246: 781b ldrb r3, [r3, #0] + 8004248: 035b lsls r3, r3, #13 + datetmpreg = ((((uint32_t)sDate->Year) << RTC_DR_YU_Pos) | \ + 800424a: 4313 orrs r3, r2 + 800424c: 617b str r3, [r7, #20] + } + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + 800424e: 68fb ldr r3, [r7, #12] + 8004250: 681b ldr r3, [r3, #0] + 8004252: 22ca movs r2, #202 @ 0xca + 8004254: 625a str r2, [r3, #36] @ 0x24 + 8004256: 68fb ldr r3, [r7, #12] + 8004258: 681b ldr r3, [r3, #0] + 800425a: 2253 movs r2, #83 @ 0x53 + 800425c: 625a str r2, [r3, #36] @ 0x24 + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + 800425e: 68f8 ldr r0, [r7, #12] + 8004260: f000 f84c bl 80042fc + 8004264: 4603 mov r3, r0 + 8004266: 74fb strb r3, [r7, #19] + + if (status == HAL_OK) + 8004268: 7cfb ldrb r3, [r7, #19] + 800426a: 2b00 cmp r3, #0 + 800426c: d10c bne.n 8004288 + { + /* Set the RTC_DR register */ + hrtc->Instance->DR = (uint32_t)(datetmpreg & RTC_DR_RESERVED_MASK); + 800426e: 68fb ldr r3, [r7, #12] + 8004270: 681a ldr r2, [r3, #0] + 8004272: 697b ldr r3, [r7, #20] + 8004274: f023 437f bic.w r3, r3, #4278190080 @ 0xff000000 + 8004278: f023 03c0 bic.w r3, r3, #192 @ 0xc0 + 800427c: 6053 str r3, [r2, #4] + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + 800427e: 68f8 ldr r0, [r7, #12] + 8004280: f000 f874 bl 800436c + 8004284: 4603 mov r3, r0 + 8004286: 74fb strb r3, [r7, #19] + } + + if (status == HAL_OK) + 8004288: 7cfb ldrb r3, [r7, #19] + 800428a: 2b00 cmp r3, #0 + 800428c: d103 bne.n 8004296 + { + hrtc->State = HAL_RTC_STATE_READY; + 800428e: 68fb ldr r3, [r7, #12] + 8004290: 2201 movs r2, #1 + 8004292: f883 2021 strb.w r2, [r3, #33] @ 0x21 + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + 8004296: 68fb ldr r3, [r7, #12] + 8004298: 681b ldr r3, [r3, #0] + 800429a: 22ff movs r2, #255 @ 0xff + 800429c: 625a str r2, [r3, #36] @ 0x24 + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + 800429e: 68fb ldr r3, [r7, #12] + 80042a0: 2200 movs r2, #0 + 80042a2: f883 2020 strb.w r2, [r3, #32] + + return status; + 80042a6: 7cfb ldrb r3, [r7, #19] +} + 80042a8: 4618 mov r0, r3 + 80042aa: 371c adds r7, #28 + 80042ac: 46bd mov sp, r7 + 80042ae: bd90 pop {r4, r7, pc} + +080042b0 : + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef *hrtc) +{ + 80042b0: b580 push {r7, lr} + 80042b2: b084 sub sp, #16 + 80042b4: af00 add r7, sp, #0 + 80042b6: 6078 str r0, [r7, #4] + uint32_t tickstart = 0U; + 80042b8: 2300 movs r3, #0 + 80042ba: 60fb str r3, [r7, #12] + + /* Clear RSF flag, keep reserved bits at reset values (setting other flags has no effect) */ + hrtc->Instance->ISR = ((uint32_t)(RTC_RSF_MASK & RTC_ISR_RESERVED_MASK)); + 80042bc: 687b ldr r3, [r7, #4] + 80042be: 681b ldr r3, [r3, #0] + 80042c0: 4a0d ldr r2, [pc, #52] @ (80042f8 ) + 80042c2: 60da str r2, [r3, #12] + + /* Get tick */ + tickstart = HAL_GetTick(); + 80042c4: f7fd fb6e bl 80019a4 + 80042c8: 60f8 str r0, [r7, #12] + + /* Wait the registers to be synchronised */ + while ((hrtc->Instance->ISR & RTC_ISR_RSF) == 0U) + 80042ca: e009 b.n 80042e0 + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + 80042cc: f7fd fb6a bl 80019a4 + 80042d0: 4602 mov r2, r0 + 80042d2: 68fb ldr r3, [r7, #12] + 80042d4: 1ad3 subs r3, r2, r3 + 80042d6: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 + 80042da: d901 bls.n 80042e0 + { + return HAL_TIMEOUT; + 80042dc: 2303 movs r3, #3 + 80042de: e007 b.n 80042f0 + while ((hrtc->Instance->ISR & RTC_ISR_RSF) == 0U) + 80042e0: 687b ldr r3, [r7, #4] + 80042e2: 681b ldr r3, [r3, #0] + 80042e4: 68db ldr r3, [r3, #12] + 80042e6: f003 0320 and.w r3, r3, #32 + 80042ea: 2b00 cmp r3, #0 + 80042ec: d0ee beq.n 80042cc + } + } + + return HAL_OK; + 80042ee: 2300 movs r3, #0 +} + 80042f0: 4618 mov r0, r3 + 80042f2: 3710 adds r7, #16 + 80042f4: 46bd mov sp, r7 + 80042f6: bd80 pop {r7, pc} + 80042f8: 0001ff5f .word 0x0001ff5f + +080042fc : + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc) +{ + 80042fc: b580 push {r7, lr} + 80042fe: b084 sub sp, #16 + 8004300: af00 add r7, sp, #0 + 8004302: 6078 str r0, [r7, #4] + uint32_t tickstart = 0U; + 8004304: 2300 movs r3, #0 + 8004306: 60bb str r3, [r7, #8] + HAL_StatusTypeDef status = HAL_OK; + 8004308: 2300 movs r3, #0 + 800430a: 73fb strb r3, [r7, #15] + + /* Check that Initialization mode is not already set */ + if (READ_BIT(hrtc->Instance->ISR, RTC_ISR_INITF) == 0U) + 800430c: 687b ldr r3, [r7, #4] + 800430e: 681b ldr r3, [r3, #0] + 8004310: 68db ldr r3, [r3, #12] + 8004312: f003 0340 and.w r3, r3, #64 @ 0x40 + 8004316: 2b00 cmp r3, #0 + 8004318: d123 bne.n 8004362 + { + /* Set INIT bit to enter Initialization mode */ + SET_BIT(hrtc->Instance->ISR, RTC_ISR_INIT); + 800431a: 687b ldr r3, [r7, #4] + 800431c: 681b ldr r3, [r3, #0] + 800431e: 68da ldr r2, [r3, #12] + 8004320: 687b ldr r3, [r7, #4] + 8004322: 681b ldr r3, [r3, #0] + 8004324: f042 0280 orr.w r2, r2, #128 @ 0x80 + 8004328: 60da str r2, [r3, #12] + + /* Get tick */ + tickstart = HAL_GetTick(); + 800432a: f7fd fb3b bl 80019a4 + 800432e: 60b8 str r0, [r7, #8] + + /* Wait till RTC is in INIT state and if timeout is reached exit */ + while ((READ_BIT(hrtc->Instance->ISR, RTC_ISR_INITF) == 0U) && (status != HAL_ERROR)) + 8004330: e00d b.n 800434e + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + 8004332: f7fd fb37 bl 80019a4 + 8004336: 4602 mov r2, r0 + 8004338: 68bb ldr r3, [r7, #8] + 800433a: 1ad3 subs r3, r2, r3 + 800433c: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 + 8004340: d905 bls.n 800434e + { + /* Set RTC state */ + hrtc->State = HAL_RTC_STATE_ERROR; + 8004342: 687b ldr r3, [r7, #4] + 8004344: 2204 movs r2, #4 + 8004346: f883 2021 strb.w r2, [r3, #33] @ 0x21 + status = HAL_ERROR; + 800434a: 2301 movs r3, #1 + 800434c: 73fb strb r3, [r7, #15] + while ((READ_BIT(hrtc->Instance->ISR, RTC_ISR_INITF) == 0U) && (status != HAL_ERROR)) + 800434e: 687b ldr r3, [r7, #4] + 8004350: 681b ldr r3, [r3, #0] + 8004352: 68db ldr r3, [r3, #12] + 8004354: f003 0340 and.w r3, r3, #64 @ 0x40 + 8004358: 2b00 cmp r3, #0 + 800435a: d102 bne.n 8004362 + 800435c: 7bfb ldrb r3, [r7, #15] + 800435e: 2b01 cmp r3, #1 + 8004360: d1e7 bne.n 8004332 + } + } + } + + return status; + 8004362: 7bfb ldrb r3, [r7, #15] +} + 8004364: 4618 mov r0, r3 + 8004366: 3710 adds r7, #16 + 8004368: 46bd mov sp, r7 + 800436a: bd80 pop {r7, pc} + +0800436c : + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef RTC_ExitInitMode(RTC_HandleTypeDef *hrtc) +{ + 800436c: b580 push {r7, lr} + 800436e: b084 sub sp, #16 + 8004370: af00 add r7, sp, #0 + 8004372: 6078 str r0, [r7, #4] + HAL_StatusTypeDef status = HAL_OK; + 8004374: 2300 movs r3, #0 + 8004376: 73fb strb r3, [r7, #15] + + /* Clear INIT bit to exit Initialization mode */ + CLEAR_BIT(hrtc->Instance->ISR, RTC_ISR_INIT); + 8004378: 687b ldr r3, [r7, #4] + 800437a: 681b ldr r3, [r3, #0] + 800437c: 68da ldr r2, [r3, #12] + 800437e: 687b ldr r3, [r7, #4] + 8004380: 681b ldr r3, [r3, #0] + 8004382: f022 0280 bic.w r2, r2, #128 @ 0x80 + 8004386: 60da str r2, [r3, #12] + + /* If CR_BYPSHAD bit = 0, wait for synchro */ + if (READ_BIT(hrtc->Instance->CR, RTC_CR_BYPSHAD) == 0U) + 8004388: 687b ldr r3, [r7, #4] + 800438a: 681b ldr r3, [r3, #0] + 800438c: 689b ldr r3, [r3, #8] + 800438e: f003 0320 and.w r3, r3, #32 + 8004392: 2b00 cmp r3, #0 + 8004394: d10b bne.n 80043ae + { + if (HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) + 8004396: 6878 ldr r0, [r7, #4] + 8004398: f7ff ff8a bl 80042b0 + 800439c: 4603 mov r3, r0 + 800439e: 2b00 cmp r3, #0 + 80043a0: d005 beq.n 80043ae + { + /* Set RTC state */ + hrtc->State = HAL_RTC_STATE_ERROR; + 80043a2: 687b ldr r3, [r7, #4] + 80043a4: 2204 movs r2, #4 + 80043a6: f883 2021 strb.w r2, [r3, #33] @ 0x21 + status = HAL_ERROR; + 80043aa: 2301 movs r3, #1 + 80043ac: 73fb strb r3, [r7, #15] + } + } + + return status; + 80043ae: 7bfb ldrb r3, [r7, #15] +} + 80043b0: 4618 mov r0, r3 + 80043b2: 3710 adds r7, #16 + 80043b4: 46bd mov sp, r7 + 80043b6: bd80 pop {r7, pc} + +080043b8 : + * @brief Converts a 2-digit number from decimal to BCD format. + * @param number decimal-formatted number (from 0 to 99) to be converted + * @retval Converted byte + */ +uint8_t RTC_ByteToBcd2(uint8_t number) +{ + 80043b8: b480 push {r7} + 80043ba: b085 sub sp, #20 + 80043bc: af00 add r7, sp, #0 + 80043be: 4603 mov r3, r0 + 80043c0: 71fb strb r3, [r7, #7] + uint32_t bcdhigh = 0U; + 80043c2: 2300 movs r3, #0 + 80043c4: 60fb str r3, [r7, #12] + + while (number >= 10U) + 80043c6: e005 b.n 80043d4 + { + bcdhigh++; + 80043c8: 68fb ldr r3, [r7, #12] + 80043ca: 3301 adds r3, #1 + 80043cc: 60fb str r3, [r7, #12] + number -= 10U; + 80043ce: 79fb ldrb r3, [r7, #7] + 80043d0: 3b0a subs r3, #10 + 80043d2: 71fb strb r3, [r7, #7] + while (number >= 10U) + 80043d4: 79fb ldrb r3, [r7, #7] + 80043d6: 2b09 cmp r3, #9 + 80043d8: d8f6 bhi.n 80043c8 + } + + return ((uint8_t)(bcdhigh << 4U) | number); + 80043da: 68fb ldr r3, [r7, #12] + 80043dc: b2db uxtb r3, r3 + 80043de: 011b lsls r3, r3, #4 + 80043e0: b2da uxtb r2, r3 + 80043e2: 79fb ldrb r3, [r7, #7] + 80043e4: 4313 orrs r3, r2 + 80043e6: b2db uxtb r3, r3 +} + 80043e8: 4618 mov r0, r3 + 80043ea: 3714 adds r7, #20 + 80043ec: 46bd mov sp, r7 + 80043ee: f85d 7b04 ldr.w r7, [sp], #4 + 80043f2: 4770 bx lr + +080043f4 : + */ + +#include "auto/ble_gap_aci.h" + +tBleStatus aci_gap_set_non_discoverable( void ) +{ + 80043f4: b580 push {r7, lr} + 80043f6: b088 sub sp, #32 + 80043f8: af00 add r7, sp, #0 + struct hci_request rq; + tBleStatus status = 0; + 80043fa: 2300 movs r3, #0 + 80043fc: 71fb strb r3, [r7, #7] + Osal_MemSet( &rq, 0, sizeof(rq) ); + 80043fe: f107 0308 add.w r3, r7, #8 + 8004402: 2218 movs r2, #24 + 8004404: 2100 movs r1, #0 + 8004406: 4618 mov r0, r3 + 8004408: f001 f8dd bl 80055c6 + rq.ogf = 0x3f; + 800440c: 233f movs r3, #63 @ 0x3f + 800440e: 813b strh r3, [r7, #8] + rq.ocf = 0x081; + 8004410: 2381 movs r3, #129 @ 0x81 + 8004412: 817b strh r3, [r7, #10] + rq.rparam = &status; + 8004414: 1dfb adds r3, r7, #7 + 8004416: 61bb str r3, [r7, #24] + rq.rlen = 1; + 8004418: 2301 movs r3, #1 + 800441a: 61fb str r3, [r7, #28] + if ( hci_send_req(&rq, FALSE) < 0 ) + 800441c: f107 0308 add.w r3, r7, #8 + 8004420: 2100 movs r1, #0 + 8004422: 4618 mov r0, r3 + 8004424: f001 fc5e bl 8005ce4 + 8004428: 4603 mov r3, r0 + 800442a: 2b00 cmp r3, #0 + 800442c: da01 bge.n 8004432 + return BLE_STATUS_TIMEOUT; + 800442e: 23ff movs r3, #255 @ 0xff + 8004430: e000 b.n 8004434 + return status; + 8004432: 79fb ldrb r3, [r7, #7] +} + 8004434: 4618 mov r0, r3 + 8004436: 3720 adds r7, #32 + 8004438: 46bd mov sp, r7 + 800443a: bd80 pop {r7, pc} + +0800443c : + const uint8_t* Local_Name, + uint8_t Service_Uuid_length, + const uint8_t* Service_Uuid_List, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max ) +{ + 800443c: b5b0 push {r4, r5, r7, lr} + 800443e: b0ce sub sp, #312 @ 0x138 + 8004440: af00 add r7, sp, #0 + 8004442: 4605 mov r5, r0 + 8004444: 460c mov r4, r1 + 8004446: 4610 mov r0, r2 + 8004448: 4619 mov r1, r3 + 800444a: f507 739c add.w r3, r7, #312 @ 0x138 + 800444e: f2a3 1331 subw r3, r3, #305 @ 0x131 + 8004452: 462a mov r2, r5 + 8004454: 701a strb r2, [r3, #0] + 8004456: f507 739c add.w r3, r7, #312 @ 0x138 + 800445a: f5a3 739a sub.w r3, r3, #308 @ 0x134 + 800445e: 4622 mov r2, r4 + 8004460: 801a strh r2, [r3, #0] + 8004462: f507 739c add.w r3, r7, #312 @ 0x138 + 8004466: f5a3 739b sub.w r3, r3, #310 @ 0x136 + 800446a: 4602 mov r2, r0 + 800446c: 801a strh r2, [r3, #0] + 800446e: f507 739c add.w r3, r7, #312 @ 0x138 + 8004472: f5a3 7399 sub.w r3, r3, #306 @ 0x132 + 8004476: 460a mov r2, r1 + 8004478: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_discoverable_cp0 *cp0 = (aci_gap_set_discoverable_cp0*)(cmd_buffer); + 800447a: f107 0310 add.w r3, r7, #16 + 800447e: f8c7 3134 str.w r3, [r7, #308] @ 0x134 + aci_gap_set_discoverable_cp1 *cp1 = (aci_gap_set_discoverable_cp1*)(cmd_buffer + 1 + 2 + 2 + 1 + 1 + 1 + Local_Name_Length * (sizeof(uint8_t))); + 8004482: f897 314c ldrb.w r3, [r7, #332] @ 0x14c + 8004486: 3308 adds r3, #8 + 8004488: f107 0210 add.w r2, r7, #16 + 800448c: 4413 add r3, r2 + 800448e: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + aci_gap_set_discoverable_cp2 *cp2 = (aci_gap_set_discoverable_cp2*)(cmd_buffer + 1 + 2 + 2 + 1 + 1 + 1 + Local_Name_Length * (sizeof(uint8_t)) + 1 + Service_Uuid_length * (sizeof(uint8_t))); + 8004492: f897 214c ldrb.w r2, [r7, #332] @ 0x14c + 8004496: f897 3154 ldrb.w r3, [r7, #340] @ 0x154 + 800449a: 4413 add r3, r2 + 800449c: 3309 adds r3, #9 + 800449e: f107 0210 add.w r2, r7, #16 + 80044a2: 4413 add r3, r2 + 80044a4: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 80044a8: f507 739c add.w r3, r7, #312 @ 0x138 + 80044ac: f2a3 1329 subw r3, r3, #297 @ 0x129 + 80044b0: 2200 movs r2, #0 + 80044b2: 701a strb r2, [r3, #0] + int index_input = 0; + 80044b4: 2300 movs r3, #0 + 80044b6: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Advertising_Type = Advertising_Type; + 80044ba: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 80044be: f507 729c add.w r2, r7, #312 @ 0x138 + 80044c2: f2a2 1231 subw r2, r2, #305 @ 0x131 + 80044c6: 7812 ldrb r2, [r2, #0] + 80044c8: 701a strb r2, [r3, #0] + index_input += 1; + 80044ca: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80044ce: 3301 adds r3, #1 + 80044d0: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Advertising_Interval_Min = Advertising_Interval_Min; + 80044d4: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 80044d8: f507 729c add.w r2, r7, #312 @ 0x138 + 80044dc: f5a2 729a sub.w r2, r2, #308 @ 0x134 + 80044e0: 8812 ldrh r2, [r2, #0] + 80044e2: f8a3 2001 strh.w r2, [r3, #1] + index_input += 2; + 80044e6: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80044ea: 3302 adds r3, #2 + 80044ec: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Advertising_Interval_Max = Advertising_Interval_Max; + 80044f0: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 80044f4: f507 729c add.w r2, r7, #312 @ 0x138 + 80044f8: f5a2 729b sub.w r2, r2, #310 @ 0x136 + 80044fc: 8812 ldrh r2, [r2, #0] + 80044fe: f8a3 2003 strh.w r2, [r3, #3] + index_input += 2; + 8004502: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004506: 3302 adds r3, #2 + 8004508: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Own_Address_Type = Own_Address_Type; + 800450c: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 8004510: f507 729c add.w r2, r7, #312 @ 0x138 + 8004514: f5a2 7299 sub.w r2, r2, #306 @ 0x132 + 8004518: 7812 ldrb r2, [r2, #0] + 800451a: 715a strb r2, [r3, #5] + index_input += 1; + 800451c: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004520: 3301 adds r3, #1 + 8004522: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Advertising_Filter_Policy = Advertising_Filter_Policy; + 8004526: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 800452a: f897 2148 ldrb.w r2, [r7, #328] @ 0x148 + 800452e: 719a strb r2, [r3, #6] + index_input += 1; + 8004530: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004534: 3301 adds r3, #1 + 8004536: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Local_Name_Length = Local_Name_Length; + 800453a: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 800453e: f897 214c ldrb.w r2, [r7, #332] @ 0x14c + 8004542: 71da strb r2, [r3, #7] + index_input += 1; + 8004544: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004548: 3301 adds r3, #1 + 800454a: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + /* var_len_data input */ + { + Osal_MemCpy( (void*)&cp0->Local_Name, (const void*)Local_Name, Local_Name_Length ); + 800454e: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 8004552: 3308 adds r3, #8 + 8004554: f897 214c ldrb.w r2, [r7, #332] @ 0x14c + 8004558: f8d7 1150 ldr.w r1, [r7, #336] @ 0x150 + 800455c: 4618 mov r0, r3 + 800455e: f001 f822 bl 80055a6 + index_input += Local_Name_Length; + 8004562: f897 314c ldrb.w r3, [r7, #332] @ 0x14c + 8004566: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 + 800456a: 4413 add r3, r2 + 800456c: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + { + cp1->Service_Uuid_length = Service_Uuid_length; + 8004570: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004574: f897 2154 ldrb.w r2, [r7, #340] @ 0x154 + 8004578: 701a strb r2, [r3, #0] + } + index_input += 1; + 800457a: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800457e: 3301 adds r3, #1 + 8004580: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemCpy( (void*)&cp1->Service_Uuid_List, (const void*)Service_Uuid_List, Service_Uuid_length ); + 8004584: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004588: 3301 adds r3, #1 + 800458a: f897 2154 ldrb.w r2, [r7, #340] @ 0x154 + 800458e: f8d7 1158 ldr.w r1, [r7, #344] @ 0x158 + 8004592: 4618 mov r0, r3 + 8004594: f001 f807 bl 80055a6 + index_input += Service_Uuid_length; + 8004598: f897 3154 ldrb.w r3, [r7, #340] @ 0x154 + 800459c: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 + 80045a0: 4413 add r3, r2 + 80045a2: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + { + cp2->Conn_Interval_Min = Conn_Interval_Min; + 80045a6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80045aa: f8b7 215c ldrh.w r2, [r7, #348] @ 0x15c + 80045ae: 801a strh r2, [r3, #0] + } + index_input += 2; + 80045b0: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80045b4: 3302 adds r3, #2 + 80045b6: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + { + cp2->Conn_Interval_Max = Conn_Interval_Max; + 80045ba: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80045be: f8b7 2160 ldrh.w r2, [r7, #352] @ 0x160 + 80045c2: 805a strh r2, [r3, #2] + } + index_input += 2; + 80045c4: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80045c8: 3302 adds r3, #2 + 80045ca: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + 80045ce: f507 7388 add.w r3, r7, #272 @ 0x110 + 80045d2: 2218 movs r2, #24 + 80045d4: 2100 movs r1, #0 + 80045d6: 4618 mov r0, r3 + 80045d8: f000 fff5 bl 80055c6 + rq.ogf = 0x3f; + 80045dc: 233f movs r3, #63 @ 0x3f + 80045de: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x083; + 80045e2: 2383 movs r3, #131 @ 0x83 + 80045e4: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 80045e8: f107 0310 add.w r3, r7, #16 + 80045ec: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 80045f0: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80045f4: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 80045f8: f107 030f add.w r3, r7, #15 + 80045fc: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 8004600: 2301 movs r3, #1 + 8004602: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 8004606: f507 7388 add.w r3, r7, #272 @ 0x110 + 800460a: 2100 movs r1, #0 + 800460c: 4618 mov r0, r3 + 800460e: f001 fb69 bl 8005ce4 + 8004612: 4603 mov r3, r0 + 8004614: 2b00 cmp r3, #0 + 8004616: da01 bge.n 800461c + return BLE_STATUS_TIMEOUT; + 8004618: 23ff movs r3, #255 @ 0xff + 800461a: e004 b.n 8004626 + return status; + 800461c: f507 739c add.w r3, r7, #312 @ 0x138 + 8004620: f2a3 1329 subw r3, r3, #297 @ 0x129 + 8004624: 781b ldrb r3, [r3, #0] +} + 8004626: 4618 mov r0, r3 + 8004628: f507 779c add.w r7, r7, #312 @ 0x138 + 800462c: 46bd mov sp, r7 + 800462e: bdb0 pop {r4, r5, r7, pc} + +08004630 : + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_io_capability( uint8_t IO_Capability ) +{ + 8004630: b580 push {r7, lr} + 8004632: b0cc sub sp, #304 @ 0x130 + 8004634: af00 add r7, sp, #0 + 8004636: 4602 mov r2, r0 + 8004638: f507 7398 add.w r3, r7, #304 @ 0x130 + 800463c: f2a3 1329 subw r3, r3, #297 @ 0x129 + 8004640: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_io_capability_cp0 *cp0 = (aci_gap_set_io_capability_cp0*)(cmd_buffer); + 8004642: f107 0310 add.w r3, r7, #16 + 8004646: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 800464a: f507 7398 add.w r3, r7, #304 @ 0x130 + 800464e: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8004652: 2200 movs r2, #0 + 8004654: 701a strb r2, [r3, #0] + int index_input = 0; + 8004656: 2300 movs r3, #0 + 8004658: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->IO_Capability = IO_Capability; + 800465c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004660: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004664: f2a2 1229 subw r2, r2, #297 @ 0x129 + 8004668: 7812 ldrb r2, [r2, #0] + 800466a: 701a strb r2, [r3, #0] + index_input += 1; + 800466c: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004670: 3301 adds r3, #1 + 8004672: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8004676: f507 7388 add.w r3, r7, #272 @ 0x110 + 800467a: 2218 movs r2, #24 + 800467c: 2100 movs r1, #0 + 800467e: 4618 mov r0, r3 + 8004680: f000 ffa1 bl 80055c6 + rq.ogf = 0x3f; + 8004684: 233f movs r3, #63 @ 0x3f + 8004686: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x085; + 800468a: 2385 movs r3, #133 @ 0x85 + 800468c: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 8004690: f107 0310 add.w r3, r7, #16 + 8004694: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8004698: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800469c: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 80046a0: f107 030f add.w r3, r7, #15 + 80046a4: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 80046a8: 2301 movs r3, #1 + 80046aa: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 80046ae: f507 7388 add.w r3, r7, #272 @ 0x110 + 80046b2: 2100 movs r1, #0 + 80046b4: 4618 mov r0, r3 + 80046b6: f001 fb15 bl 8005ce4 + 80046ba: 4603 mov r3, r0 + 80046bc: 2b00 cmp r3, #0 + 80046be: da01 bge.n 80046c4 + return BLE_STATUS_TIMEOUT; + 80046c0: 23ff movs r3, #255 @ 0xff + 80046c2: e004 b.n 80046ce + return status; + 80046c4: f507 7398 add.w r3, r7, #304 @ 0x130 + 80046c8: f2a3 1321 subw r3, r3, #289 @ 0x121 + 80046cc: 781b ldrb r3, [r3, #0] +} + 80046ce: 4618 mov r0, r3 + 80046d0: f507 7798 add.w r7, r7, #304 @ 0x130 + 80046d4: 46bd mov sp, r7 + 80046d6: bd80 pop {r7, pc} + +080046d8 : + uint8_t Min_Encryption_Key_Size, + uint8_t Max_Encryption_Key_Size, + uint8_t Use_Fixed_Pin, + uint32_t Fixed_Pin, + uint8_t Identity_Address_Type ) +{ + 80046d8: b5b0 push {r4, r5, r7, lr} + 80046da: b0cc sub sp, #304 @ 0x130 + 80046dc: af00 add r7, sp, #0 + 80046de: 4605 mov r5, r0 + 80046e0: 460c mov r4, r1 + 80046e2: 4610 mov r0, r2 + 80046e4: 4619 mov r1, r3 + 80046e6: f507 7398 add.w r3, r7, #304 @ 0x130 + 80046ea: f2a3 1329 subw r3, r3, #297 @ 0x129 + 80046ee: 462a mov r2, r5 + 80046f0: 701a strb r2, [r3, #0] + 80046f2: f507 7398 add.w r3, r7, #304 @ 0x130 + 80046f6: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 80046fa: 4622 mov r2, r4 + 80046fc: 701a strb r2, [r3, #0] + 80046fe: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004702: f2a3 132b subw r3, r3, #299 @ 0x12b + 8004706: 4602 mov r2, r0 + 8004708: 701a strb r2, [r3, #0] + 800470a: f507 7398 add.w r3, r7, #304 @ 0x130 + 800470e: f5a3 7396 sub.w r3, r3, #300 @ 0x12c + 8004712: 460a mov r2, r1 + 8004714: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_authentication_requirement_cp0 *cp0 = (aci_gap_set_authentication_requirement_cp0*)(cmd_buffer); + 8004716: f107 0310 add.w r3, r7, #16 + 800471a: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 800471e: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004722: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8004726: 2200 movs r2, #0 + 8004728: 701a strb r2, [r3, #0] + int index_input = 0; + 800472a: 2300 movs r3, #0 + 800472c: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Bonding_Mode = Bonding_Mode; + 8004730: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004734: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004738: f2a2 1229 subw r2, r2, #297 @ 0x129 + 800473c: 7812 ldrb r2, [r2, #0] + 800473e: 701a strb r2, [r3, #0] + index_input += 1; + 8004740: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004744: 3301 adds r3, #1 + 8004746: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->MITM_Mode = MITM_Mode; + 800474a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 800474e: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004752: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 8004756: 7812 ldrb r2, [r2, #0] + 8004758: 705a strb r2, [r3, #1] + index_input += 1; + 800475a: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800475e: 3301 adds r3, #1 + 8004760: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->SC_Support = SC_Support; + 8004764: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004768: f507 7298 add.w r2, r7, #304 @ 0x130 + 800476c: f2a2 122b subw r2, r2, #299 @ 0x12b + 8004770: 7812 ldrb r2, [r2, #0] + 8004772: 709a strb r2, [r3, #2] + index_input += 1; + 8004774: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004778: 3301 adds r3, #1 + 800477a: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->KeyPress_Notification_Support = KeyPress_Notification_Support; + 800477e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004782: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004786: f5a2 7296 sub.w r2, r2, #300 @ 0x12c + 800478a: 7812 ldrb r2, [r2, #0] + 800478c: 70da strb r2, [r3, #3] + index_input += 1; + 800478e: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004792: 3301 adds r3, #1 + 8004794: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Min_Encryption_Key_Size = Min_Encryption_Key_Size; + 8004798: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 800479c: f897 2140 ldrb.w r2, [r7, #320] @ 0x140 + 80047a0: 711a strb r2, [r3, #4] + index_input += 1; + 80047a2: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80047a6: 3301 adds r3, #1 + 80047a8: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Max_Encryption_Key_Size = Max_Encryption_Key_Size; + 80047ac: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80047b0: f897 2144 ldrb.w r2, [r7, #324] @ 0x144 + 80047b4: 715a strb r2, [r3, #5] + index_input += 1; + 80047b6: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80047ba: 3301 adds r3, #1 + 80047bc: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Use_Fixed_Pin = Use_Fixed_Pin; + 80047c0: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80047c4: f897 2148 ldrb.w r2, [r7, #328] @ 0x148 + 80047c8: 719a strb r2, [r3, #6] + index_input += 1; + 80047ca: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80047ce: 3301 adds r3, #1 + 80047d0: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Fixed_Pin = Fixed_Pin; + 80047d4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80047d8: f8d7 214c ldr.w r2, [r7, #332] @ 0x14c + 80047dc: f8c3 2007 str.w r2, [r3, #7] + index_input += 4; + 80047e0: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80047e4: 3304 adds r3, #4 + 80047e6: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Identity_Address_Type = Identity_Address_Type; + 80047ea: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80047ee: f897 2150 ldrb.w r2, [r7, #336] @ 0x150 + 80047f2: 72da strb r2, [r3, #11] + index_input += 1; + 80047f4: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80047f8: 3301 adds r3, #1 + 80047fa: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 80047fe: f507 7388 add.w r3, r7, #272 @ 0x110 + 8004802: 2218 movs r2, #24 + 8004804: 2100 movs r1, #0 + 8004806: 4618 mov r0, r3 + 8004808: f000 fedd bl 80055c6 + rq.ogf = 0x3f; + 800480c: 233f movs r3, #63 @ 0x3f + 800480e: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x086; + 8004812: 2386 movs r3, #134 @ 0x86 + 8004814: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 8004818: f107 0310 add.w r3, r7, #16 + 800481c: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8004820: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004824: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 8004828: f107 030f add.w r3, r7, #15 + 800482c: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 8004830: 2301 movs r3, #1 + 8004832: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 8004836: f507 7388 add.w r3, r7, #272 @ 0x110 + 800483a: 2100 movs r1, #0 + 800483c: 4618 mov r0, r3 + 800483e: f001 fa51 bl 8005ce4 + 8004842: 4603 mov r3, r0 + 8004844: 2b00 cmp r3, #0 + 8004846: da01 bge.n 800484c + return BLE_STATUS_TIMEOUT; + 8004848: 23ff movs r3, #255 @ 0xff + 800484a: e004 b.n 8004856 + return status; + 800484c: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004850: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8004854: 781b ldrb r3, [r3, #0] +} + 8004856: 4618 mov r0, r3 + 8004858: f507 7798 add.w r7, r7, #304 @ 0x130 + 800485c: 46bd mov sp, r7 + 800485e: bdb0 pop {r4, r5, r7, pc} + +08004860 : + uint8_t privacy_enabled, + uint8_t device_name_char_len, + uint16_t* Service_Handle, + uint16_t* Dev_Name_Char_Handle, + uint16_t* Appearance_Char_Handle ) +{ + 8004860: b590 push {r4, r7, lr} + 8004862: b0cd sub sp, #308 @ 0x134 + 8004864: af00 add r7, sp, #0 + 8004866: 4604 mov r4, r0 + 8004868: 4608 mov r0, r1 + 800486a: 4611 mov r1, r2 + 800486c: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004870: f5a2 7298 sub.w r2, r2, #304 @ 0x130 + 8004874: 6013 str r3, [r2, #0] + 8004876: f507 7398 add.w r3, r7, #304 @ 0x130 + 800487a: f2a3 1329 subw r3, r3, #297 @ 0x129 + 800487e: 4622 mov r2, r4 + 8004880: 701a strb r2, [r3, #0] + 8004882: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004886: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 800488a: 4602 mov r2, r0 + 800488c: 701a strb r2, [r3, #0] + 800488e: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004892: f2a3 132b subw r3, r3, #299 @ 0x12b + 8004896: 460a mov r2, r1 + 8004898: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_init_cp0 *cp0 = (aci_gap_init_cp0*)(cmd_buffer); + 800489a: f107 0310 add.w r3, r7, #16 + 800489e: f8c7 312c str.w r3, [r7, #300] @ 0x12c + aci_gap_init_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + 80048a2: f107 0308 add.w r3, r7, #8 + 80048a6: 2207 movs r2, #7 + 80048a8: 2100 movs r1, #0 + 80048aa: 4618 mov r0, r3 + 80048ac: f000 fe8b bl 80055c6 + int index_input = 0; + 80048b0: 2300 movs r3, #0 + 80048b2: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Role = Role; + 80048b6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80048ba: f507 7298 add.w r2, r7, #304 @ 0x130 + 80048be: f2a2 1229 subw r2, r2, #297 @ 0x129 + 80048c2: 7812 ldrb r2, [r2, #0] + 80048c4: 701a strb r2, [r3, #0] + index_input += 1; + 80048c6: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80048ca: 3301 adds r3, #1 + 80048cc: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->privacy_enabled = privacy_enabled; + 80048d0: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80048d4: f507 7298 add.w r2, r7, #304 @ 0x130 + 80048d8: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 80048dc: 7812 ldrb r2, [r2, #0] + 80048de: 705a strb r2, [r3, #1] + index_input += 1; + 80048e0: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80048e4: 3301 adds r3, #1 + 80048e6: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->device_name_char_len = device_name_char_len; + 80048ea: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80048ee: f507 7298 add.w r2, r7, #304 @ 0x130 + 80048f2: f2a2 122b subw r2, r2, #299 @ 0x12b + 80048f6: 7812 ldrb r2, [r2, #0] + 80048f8: 709a strb r2, [r3, #2] + index_input += 1; + 80048fa: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80048fe: 3301 adds r3, #1 + 8004900: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8004904: f507 7388 add.w r3, r7, #272 @ 0x110 + 8004908: 2218 movs r2, #24 + 800490a: 2100 movs r1, #0 + 800490c: 4618 mov r0, r3 + 800490e: f000 fe5a bl 80055c6 + rq.ogf = 0x3f; + 8004912: 233f movs r3, #63 @ 0x3f + 8004914: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x08a; + 8004918: 238a movs r3, #138 @ 0x8a + 800491a: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 800491e: f107 0310 add.w r3, r7, #16 + 8004922: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8004926: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800492a: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &resp; + 800492e: f107 0308 add.w r3, r7, #8 + 8004932: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = sizeof(resp); + 8004936: 2307 movs r3, #7 + 8004938: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 800493c: f507 7388 add.w r3, r7, #272 @ 0x110 + 8004940: 2100 movs r1, #0 + 8004942: 4618 mov r0, r3 + 8004944: f001 f9ce bl 8005ce4 + 8004948: 4603 mov r3, r0 + 800494a: 2b00 cmp r3, #0 + 800494c: da01 bge.n 8004952 + return BLE_STATUS_TIMEOUT; + 800494e: 23ff movs r3, #255 @ 0xff + 8004950: e02e b.n 80049b0 + if ( resp.Status ) + 8004952: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004956: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 800495a: 781b ldrb r3, [r3, #0] + 800495c: 2b00 cmp r3, #0 + 800495e: d005 beq.n 800496c + return resp.Status; + 8004960: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004964: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 8004968: 781b ldrb r3, [r3, #0] + 800496a: e021 b.n 80049b0 + *Service_Handle = resp.Service_Handle; + 800496c: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004970: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 8004974: f8b3 3001 ldrh.w r3, [r3, #1] + 8004978: b29a uxth r2, r3 + 800497a: f507 7398 add.w r3, r7, #304 @ 0x130 + 800497e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 + 8004982: 681b ldr r3, [r3, #0] + 8004984: 801a strh r2, [r3, #0] + *Dev_Name_Char_Handle = resp.Dev_Name_Char_Handle; + 8004986: f507 7398 add.w r3, r7, #304 @ 0x130 + 800498a: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 800498e: f8b3 3003 ldrh.w r3, [r3, #3] + 8004992: b29a uxth r2, r3 + 8004994: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 + 8004998: 801a strh r2, [r3, #0] + *Appearance_Char_Handle = resp.Appearance_Char_Handle; + 800499a: f507 7398 add.w r3, r7, #304 @ 0x130 + 800499e: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 80049a2: f8b3 3005 ldrh.w r3, [r3, #5] + 80049a6: b29a uxth r2, r3 + 80049a8: f8d7 3144 ldr.w r3, [r7, #324] @ 0x144 + 80049ac: 801a strh r2, [r3, #0] + return BLE_STATUS_SUCCESS; + 80049ae: 2300 movs r3, #0 +} + 80049b0: 4618 mov r0, r3 + 80049b2: f507 779a add.w r7, r7, #308 @ 0x134 + 80049b6: 46bd mov sp, r7 + 80049b8: bd90 pop {r4, r7, pc} + +080049ba : + return status; +} + +tBleStatus aci_gap_update_adv_data( uint8_t AdvDataLen, + const uint8_t* AdvData ) +{ + 80049ba: b580 push {r7, lr} + 80049bc: b0cc sub sp, #304 @ 0x130 + 80049be: af00 add r7, sp, #0 + 80049c0: 4602 mov r2, r0 + 80049c2: f507 7398 add.w r3, r7, #304 @ 0x130 + 80049c6: f5a3 7398 sub.w r3, r3, #304 @ 0x130 + 80049ca: 6019 str r1, [r3, #0] + 80049cc: f507 7398 add.w r3, r7, #304 @ 0x130 + 80049d0: f2a3 1329 subw r3, r3, #297 @ 0x129 + 80049d4: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_update_adv_data_cp0 *cp0 = (aci_gap_update_adv_data_cp0*)(cmd_buffer); + 80049d6: f107 0310 add.w r3, r7, #16 + 80049da: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 80049de: f507 7398 add.w r3, r7, #304 @ 0x130 + 80049e2: f2a3 1321 subw r3, r3, #289 @ 0x121 + 80049e6: 2200 movs r2, #0 + 80049e8: 701a strb r2, [r3, #0] + int index_input = 0; + 80049ea: 2300 movs r3, #0 + 80049ec: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->AdvDataLen = AdvDataLen; + 80049f0: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80049f4: f507 7298 add.w r2, r7, #304 @ 0x130 + 80049f8: f2a2 1229 subw r2, r2, #297 @ 0x129 + 80049fc: 7812 ldrb r2, [r2, #0] + 80049fe: 701a strb r2, [r3, #0] + index_input += 1; + 8004a00: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004a04: 3301 adds r3, #1 + 8004a06: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemCpy( (void*)&cp0->AdvData, (const void*)AdvData, AdvDataLen ); + 8004a0a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004a0e: 1c58 adds r0, r3, #1 + 8004a10: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004a14: f2a3 1329 subw r3, r3, #297 @ 0x129 + 8004a18: 781a ldrb r2, [r3, #0] + 8004a1a: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004a1e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 + 8004a22: 6819 ldr r1, [r3, #0] + 8004a24: f000 fdbf bl 80055a6 + index_input += AdvDataLen; + 8004a28: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004a2c: f2a3 1329 subw r3, r3, #297 @ 0x129 + 8004a30: 781b ldrb r3, [r3, #0] + 8004a32: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 + 8004a36: 4413 add r3, r2 + 8004a38: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8004a3c: f507 7388 add.w r3, r7, #272 @ 0x110 + 8004a40: 2218 movs r2, #24 + 8004a42: 2100 movs r1, #0 + 8004a44: 4618 mov r0, r3 + 8004a46: f000 fdbe bl 80055c6 + rq.ogf = 0x3f; + 8004a4a: 233f movs r3, #63 @ 0x3f + 8004a4c: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x08e; + 8004a50: 238e movs r3, #142 @ 0x8e + 8004a52: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 8004a56: f107 0310 add.w r3, r7, #16 + 8004a5a: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8004a5e: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004a62: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 8004a66: f107 030f add.w r3, r7, #15 + 8004a6a: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 8004a6e: 2301 movs r3, #1 + 8004a70: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 8004a74: f507 7388 add.w r3, r7, #272 @ 0x110 + 8004a78: 2100 movs r1, #0 + 8004a7a: 4618 mov r0, r3 + 8004a7c: f001 f932 bl 8005ce4 + 8004a80: 4603 mov r3, r0 + 8004a82: 2b00 cmp r3, #0 + 8004a84: da01 bge.n 8004a8a + return BLE_STATUS_TIMEOUT; + 8004a86: 23ff movs r3, #255 @ 0xff + 8004a88: e004 b.n 8004a94 + return status; + 8004a8a: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004a8e: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8004a92: 781b ldrb r3, [r3, #0] +} + 8004a94: 4618 mov r0, r3 + 8004a96: f507 7798 add.w r7, r7, #304 @ 0x130 + 8004a9a: 46bd mov sp, r7 + 8004a9c: bd80 pop {r7, pc} + +08004a9e : + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_configure_filter_accept_list( void ) +{ + 8004a9e: b580 push {r7, lr} + 8004aa0: b088 sub sp, #32 + 8004aa2: af00 add r7, sp, #0 + struct hci_request rq; + tBleStatus status = 0; + 8004aa4: 2300 movs r3, #0 + 8004aa6: 71fb strb r3, [r7, #7] + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8004aa8: f107 0308 add.w r3, r7, #8 + 8004aac: 2218 movs r2, #24 + 8004aae: 2100 movs r1, #0 + 8004ab0: 4618 mov r0, r3 + 8004ab2: f000 fd88 bl 80055c6 + rq.ogf = 0x3f; + 8004ab6: 233f movs r3, #63 @ 0x3f + 8004ab8: 813b strh r3, [r7, #8] + rq.ocf = 0x092; + 8004aba: 2392 movs r3, #146 @ 0x92 + 8004abc: 817b strh r3, [r7, #10] + rq.rparam = &status; + 8004abe: 1dfb adds r3, r7, #7 + 8004ac0: 61bb str r3, [r7, #24] + rq.rlen = 1; + 8004ac2: 2301 movs r3, #1 + 8004ac4: 61fb str r3, [r7, #28] + if ( hci_send_req(&rq, FALSE) < 0 ) + 8004ac6: f107 0308 add.w r3, r7, #8 + 8004aca: 2100 movs r1, #0 + 8004acc: 4618 mov r0, r3 + 8004ace: f001 f909 bl 8005ce4 + 8004ad2: 4603 mov r3, r0 + 8004ad4: 2b00 cmp r3, #0 + 8004ad6: da01 bge.n 8004adc + return BLE_STATUS_TIMEOUT; + 8004ad8: 23ff movs r3, #255 @ 0xff + 8004ada: e000 b.n 8004ade + return status; + 8004adc: 79fb ldrb r3, [r7, #7] +} + 8004ade: 4618 mov r0, r3 + 8004ae0: 3720 adds r7, #32 + 8004ae2: 46bd mov sp, r7 + 8004ae4: bd80 pop {r7, pc} + +08004ae6 : + */ + +#include "auto/ble_gatt_aci.h" + +tBleStatus aci_gatt_init( void ) +{ + 8004ae6: b580 push {r7, lr} + 8004ae8: b088 sub sp, #32 + 8004aea: af00 add r7, sp, #0 + struct hci_request rq; + tBleStatus status = 0; + 8004aec: 2300 movs r3, #0 + 8004aee: 71fb strb r3, [r7, #7] + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8004af0: f107 0308 add.w r3, r7, #8 + 8004af4: 2218 movs r2, #24 + 8004af6: 2100 movs r1, #0 + 8004af8: 4618 mov r0, r3 + 8004afa: f000 fd64 bl 80055c6 + rq.ogf = 0x3f; + 8004afe: 233f movs r3, #63 @ 0x3f + 8004b00: 813b strh r3, [r7, #8] + rq.ocf = 0x101; + 8004b02: f240 1301 movw r3, #257 @ 0x101 + 8004b06: 817b strh r3, [r7, #10] + rq.rparam = &status; + 8004b08: 1dfb adds r3, r7, #7 + 8004b0a: 61bb str r3, [r7, #24] + rq.rlen = 1; + 8004b0c: 2301 movs r3, #1 + 8004b0e: 61fb str r3, [r7, #28] + if ( hci_send_req(&rq, FALSE) < 0 ) + 8004b10: f107 0308 add.w r3, r7, #8 + 8004b14: 2100 movs r1, #0 + 8004b16: 4618 mov r0, r3 + 8004b18: f001 f8e4 bl 8005ce4 + 8004b1c: 4603 mov r3, r0 + 8004b1e: 2b00 cmp r3, #0 + 8004b20: da01 bge.n 8004b26 + return BLE_STATUS_TIMEOUT; + 8004b22: 23ff movs r3, #255 @ 0xff + 8004b24: e000 b.n 8004b28 + return status; + 8004b26: 79fb ldrb r3, [r7, #7] +} + 8004b28: 4618 mov r0, r3 + 8004b2a: 3720 adds r7, #32 + 8004b2c: 46bd mov sp, r7 + 8004b2e: bd80 pop {r7, pc} + +08004b30 : +tBleStatus aci_gatt_add_service( uint8_t Service_UUID_Type, + const Service_UUID_t* Service_UUID, + uint8_t Service_Type, + uint8_t Max_Attribute_Records, + uint16_t* Service_Handle ) +{ + 8004b30: b590 push {r4, r7, lr} + 8004b32: b0cf sub sp, #316 @ 0x13c + 8004b34: af00 add r7, sp, #0 + 8004b36: 4604 mov r4, r0 + 8004b38: f507 709c add.w r0, r7, #312 @ 0x138 + 8004b3c: f5a0 709c sub.w r0, r0, #312 @ 0x138 + 8004b40: 6001 str r1, [r0, #0] + 8004b42: 4610 mov r0, r2 + 8004b44: 4619 mov r1, r3 + 8004b46: f507 739c add.w r3, r7, #312 @ 0x138 + 8004b4a: f2a3 1331 subw r3, r3, #305 @ 0x131 + 8004b4e: 4622 mov r2, r4 + 8004b50: 701a strb r2, [r3, #0] + 8004b52: f507 739c add.w r3, r7, #312 @ 0x138 + 8004b56: f5a3 7399 sub.w r3, r3, #306 @ 0x132 + 8004b5a: 4602 mov r2, r0 + 8004b5c: 701a strb r2, [r3, #0] + 8004b5e: f507 739c add.w r3, r7, #312 @ 0x138 + 8004b62: f2a3 1333 subw r3, r3, #307 @ 0x133 + 8004b66: 460a mov r2, r1 + 8004b68: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_add_service_cp0 *cp0 = (aci_gatt_add_service_cp0*)(cmd_buffer); + 8004b6a: f107 0310 add.w r3, r7, #16 + 8004b6e: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + aci_gatt_add_service_cp1 *cp1 = (aci_gatt_add_service_cp1*)(cmd_buffer + 1 + (Service_UUID_Type == 1 ? 2 : (Service_UUID_Type == 2 ? 16 : 0))); + 8004b72: f507 739c add.w r3, r7, #312 @ 0x138 + 8004b76: f2a3 1331 subw r3, r3, #305 @ 0x131 + 8004b7a: 781b ldrb r3, [r3, #0] + 8004b7c: 2b01 cmp r3, #1 + 8004b7e: d00a beq.n 8004b96 + 8004b80: f507 739c add.w r3, r7, #312 @ 0x138 + 8004b84: f2a3 1331 subw r3, r3, #305 @ 0x131 + 8004b88: 781b ldrb r3, [r3, #0] + 8004b8a: 2b02 cmp r3, #2 + 8004b8c: d101 bne.n 8004b92 + 8004b8e: 2311 movs r3, #17 + 8004b90: e002 b.n 8004b98 + 8004b92: 2301 movs r3, #1 + 8004b94: e000 b.n 8004b98 + 8004b96: 2303 movs r3, #3 + 8004b98: f107 0210 add.w r2, r7, #16 + 8004b9c: 4413 add r3, r2 + 8004b9e: f8c7 312c str.w r3, [r7, #300] @ 0x12c + aci_gatt_add_service_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + 8004ba2: f107 030c add.w r3, r7, #12 + 8004ba6: 2203 movs r2, #3 + 8004ba8: 2100 movs r1, #0 + 8004baa: 4618 mov r0, r3 + 8004bac: f000 fd0b bl 80055c6 + int index_input = 0; + 8004bb0: 2300 movs r3, #0 + 8004bb2: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Service_UUID_Type = Service_UUID_Type; + 8004bb6: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004bba: f507 729c add.w r2, r7, #312 @ 0x138 + 8004bbe: f2a2 1231 subw r2, r2, #305 @ 0x131 + 8004bc2: 7812 ldrb r2, [r2, #0] + 8004bc4: 701a strb r2, [r3, #0] + index_input += 1; + 8004bc6: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004bca: 3301 adds r3, #1 + 8004bcc: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + /* var_len_data input */ + { + uint8_t size; + switch ( Service_UUID_Type ) + 8004bd0: f507 739c add.w r3, r7, #312 @ 0x138 + 8004bd4: f2a3 1331 subw r3, r3, #305 @ 0x131 + 8004bd8: 781b ldrb r3, [r3, #0] + 8004bda: 2b01 cmp r3, #1 + 8004bdc: d002 beq.n 8004be4 + 8004bde: 2b02 cmp r3, #2 + 8004be0: d004 beq.n 8004bec + 8004be2: e007 b.n 8004bf4 + { + case 1: size = 2; break; + 8004be4: 2302 movs r3, #2 + 8004be6: f887 3137 strb.w r3, [r7, #311] @ 0x137 + 8004bea: e005 b.n 8004bf8 + case 2: size = 16; break; + 8004bec: 2310 movs r3, #16 + 8004bee: f887 3137 strb.w r3, [r7, #311] @ 0x137 + 8004bf2: e001 b.n 8004bf8 + default: return BLE_STATUS_ERROR; + 8004bf4: 2397 movs r3, #151 @ 0x97 + 8004bf6: e06c b.n 8004cd2 + } + Osal_MemCpy( (void*)&cp0->Service_UUID, (const void*)Service_UUID, size ); + 8004bf8: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004bfc: 1c58 adds r0, r3, #1 + 8004bfe: f897 2137 ldrb.w r2, [r7, #311] @ 0x137 + 8004c02: f507 739c add.w r3, r7, #312 @ 0x138 + 8004c06: f5a3 739c sub.w r3, r3, #312 @ 0x138 + 8004c0a: 6819 ldr r1, [r3, #0] + 8004c0c: f000 fccb bl 80055a6 + index_input += size; + 8004c10: f897 3137 ldrb.w r3, [r7, #311] @ 0x137 + 8004c14: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 + 8004c18: 4413 add r3, r2 + 8004c1a: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + { + cp1->Service_Type = Service_Type; + 8004c1e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004c22: f507 729c add.w r2, r7, #312 @ 0x138 + 8004c26: f5a2 7299 sub.w r2, r2, #306 @ 0x132 + 8004c2a: 7812 ldrb r2, [r2, #0] + 8004c2c: 701a strb r2, [r3, #0] + } + index_input += 1; + 8004c2e: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004c32: 3301 adds r3, #1 + 8004c34: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + { + cp1->Max_Attribute_Records = Max_Attribute_Records; + 8004c38: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004c3c: f507 729c add.w r2, r7, #312 @ 0x138 + 8004c40: f2a2 1233 subw r2, r2, #307 @ 0x133 + 8004c44: 7812 ldrb r2, [r2, #0] + 8004c46: 705a strb r2, [r3, #1] + } + index_input += 1; + 8004c48: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004c4c: 3301 adds r3, #1 + 8004c4e: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8004c52: f507 7388 add.w r3, r7, #272 @ 0x110 + 8004c56: 2218 movs r2, #24 + 8004c58: 2100 movs r1, #0 + 8004c5a: 4618 mov r0, r3 + 8004c5c: f000 fcb3 bl 80055c6 + rq.ogf = 0x3f; + 8004c60: 233f movs r3, #63 @ 0x3f + 8004c62: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x102; + 8004c66: f44f 7381 mov.w r3, #258 @ 0x102 + 8004c6a: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 8004c6e: f107 0310 add.w r3, r7, #16 + 8004c72: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8004c76: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004c7a: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &resp; + 8004c7e: f107 030c add.w r3, r7, #12 + 8004c82: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = sizeof(resp); + 8004c86: 2303 movs r3, #3 + 8004c88: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 8004c8c: f507 7388 add.w r3, r7, #272 @ 0x110 + 8004c90: 2100 movs r1, #0 + 8004c92: 4618 mov r0, r3 + 8004c94: f001 f826 bl 8005ce4 + 8004c98: 4603 mov r3, r0 + 8004c9a: 2b00 cmp r3, #0 + 8004c9c: da01 bge.n 8004ca2 + return BLE_STATUS_TIMEOUT; + 8004c9e: 23ff movs r3, #255 @ 0xff + 8004ca0: e017 b.n 8004cd2 + if ( resp.Status ) + 8004ca2: f507 739c add.w r3, r7, #312 @ 0x138 + 8004ca6: f5a3 7396 sub.w r3, r3, #300 @ 0x12c + 8004caa: 781b ldrb r3, [r3, #0] + 8004cac: 2b00 cmp r3, #0 + 8004cae: d005 beq.n 8004cbc + return resp.Status; + 8004cb0: f507 739c add.w r3, r7, #312 @ 0x138 + 8004cb4: f5a3 7396 sub.w r3, r3, #300 @ 0x12c + 8004cb8: 781b ldrb r3, [r3, #0] + 8004cba: e00a b.n 8004cd2 + *Service_Handle = resp.Service_Handle; + 8004cbc: f507 739c add.w r3, r7, #312 @ 0x138 + 8004cc0: f5a3 7396 sub.w r3, r3, #300 @ 0x12c + 8004cc4: f8b3 3001 ldrh.w r3, [r3, #1] + 8004cc8: b29a uxth r2, r3 + 8004cca: f8d7 3148 ldr.w r3, [r7, #328] @ 0x148 + 8004cce: 801a strh r2, [r3, #0] + return BLE_STATUS_SUCCESS; + 8004cd0: 2300 movs r3, #0 +} + 8004cd2: 4618 mov r0, r3 + 8004cd4: f507 779e add.w r7, r7, #316 @ 0x13c + 8004cd8: 46bd mov sp, r7 + 8004cda: bd90 pop {r4, r7, pc} + +08004cdc : + uint8_t Security_Permissions, + uint8_t GATT_Evt_Mask, + uint8_t Enc_Key_Size, + uint8_t Is_Variable, + uint16_t* Char_Handle ) +{ + 8004cdc: b590 push {r4, r7, lr} + 8004cde: b0d1 sub sp, #324 @ 0x144 + 8004ce0: af00 add r7, sp, #0 + 8004ce2: 4604 mov r4, r0 + 8004ce4: 4608 mov r0, r1 + 8004ce6: f507 71a0 add.w r1, r7, #320 @ 0x140 + 8004cea: f5a1 719c sub.w r1, r1, #312 @ 0x138 + 8004cee: 600a str r2, [r1, #0] + 8004cf0: 4619 mov r1, r3 + 8004cf2: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004cf6: f5a3 7399 sub.w r3, r3, #306 @ 0x132 + 8004cfa: 4622 mov r2, r4 + 8004cfc: 801a strh r2, [r3, #0] + 8004cfe: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004d02: f2a3 1333 subw r3, r3, #307 @ 0x133 + 8004d06: 4602 mov r2, r0 + 8004d08: 701a strb r2, [r3, #0] + 8004d0a: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004d0e: f5a3 739d sub.w r3, r3, #314 @ 0x13a + 8004d12: 460a mov r2, r1 + 8004d14: 801a strh r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_add_char_cp0 *cp0 = (aci_gatt_add_char_cp0*)(cmd_buffer); + 8004d16: f107 0318 add.w r3, r7, #24 + 8004d1a: f8c7 3138 str.w r3, [r7, #312] @ 0x138 + aci_gatt_add_char_cp1 *cp1 = (aci_gatt_add_char_cp1*)(cmd_buffer + 2 + 1 + (Char_UUID_Type == 1 ? 2 : (Char_UUID_Type == 2 ? 16 : 0))); + 8004d1e: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004d22: f2a3 1333 subw r3, r3, #307 @ 0x133 + 8004d26: 781b ldrb r3, [r3, #0] + 8004d28: 2b01 cmp r3, #1 + 8004d2a: d00a beq.n 8004d42 + 8004d2c: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004d30: f2a3 1333 subw r3, r3, #307 @ 0x133 + 8004d34: 781b ldrb r3, [r3, #0] + 8004d36: 2b02 cmp r3, #2 + 8004d38: d101 bne.n 8004d3e + 8004d3a: 2313 movs r3, #19 + 8004d3c: e002 b.n 8004d44 + 8004d3e: 2303 movs r3, #3 + 8004d40: e000 b.n 8004d44 + 8004d42: 2305 movs r3, #5 + 8004d44: f107 0218 add.w r2, r7, #24 + 8004d48: 4413 add r3, r2 + 8004d4a: f8c7 3134 str.w r3, [r7, #308] @ 0x134 + aci_gatt_add_char_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + 8004d4e: f107 0314 add.w r3, r7, #20 + 8004d52: 2203 movs r2, #3 + 8004d54: 2100 movs r1, #0 + 8004d56: 4618 mov r0, r3 + 8004d58: f000 fc35 bl 80055c6 + int index_input = 0; + 8004d5c: 2300 movs r3, #0 + 8004d5e: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + cp0->Service_Handle = Service_Handle; + 8004d62: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 + 8004d66: f507 72a0 add.w r2, r7, #320 @ 0x140 + 8004d6a: f5a2 7299 sub.w r2, r2, #306 @ 0x132 + 8004d6e: 8812 ldrh r2, [r2, #0] + 8004d70: 801a strh r2, [r3, #0] + index_input += 2; + 8004d72: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004d76: 3302 adds r3, #2 + 8004d78: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + cp0->Char_UUID_Type = Char_UUID_Type; + 8004d7c: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 + 8004d80: f507 72a0 add.w r2, r7, #320 @ 0x140 + 8004d84: f2a2 1233 subw r2, r2, #307 @ 0x133 + 8004d88: 7812 ldrb r2, [r2, #0] + 8004d8a: 709a strb r2, [r3, #2] + index_input += 1; + 8004d8c: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004d90: 3301 adds r3, #1 + 8004d92: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + /* var_len_data input */ + { + uint8_t size; + switch ( Char_UUID_Type ) + 8004d96: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004d9a: f2a3 1333 subw r3, r3, #307 @ 0x133 + 8004d9e: 781b ldrb r3, [r3, #0] + 8004da0: 2b01 cmp r3, #1 + 8004da2: d002 beq.n 8004daa + 8004da4: 2b02 cmp r3, #2 + 8004da6: d004 beq.n 8004db2 + 8004da8: e007 b.n 8004dba + { + case 1: size = 2; break; + 8004daa: 2302 movs r3, #2 + 8004dac: f887 313f strb.w r3, [r7, #319] @ 0x13f + 8004db0: e005 b.n 8004dbe + case 2: size = 16; break; + 8004db2: 2310 movs r3, #16 + 8004db4: f887 313f strb.w r3, [r7, #319] @ 0x13f + 8004db8: e001 b.n 8004dbe + default: return BLE_STATUS_ERROR; + 8004dba: 2397 movs r3, #151 @ 0x97 + 8004dbc: e091 b.n 8004ee2 + } + Osal_MemCpy( (void*)&cp0->Char_UUID, (const void*)Char_UUID, size ); + 8004dbe: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 + 8004dc2: 1cd8 adds r0, r3, #3 + 8004dc4: f897 213f ldrb.w r2, [r7, #319] @ 0x13f + 8004dc8: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004dcc: f5a3 739c sub.w r3, r3, #312 @ 0x138 + 8004dd0: 6819 ldr r1, [r3, #0] + 8004dd2: f000 fbe8 bl 80055a6 + index_input += size; + 8004dd6: f897 313f ldrb.w r3, [r7, #319] @ 0x13f + 8004dda: f8d7 2130 ldr.w r2, [r7, #304] @ 0x130 + 8004dde: 4413 add r3, r2 + 8004de0: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + { + cp1->Char_Value_Length = Char_Value_Length; + 8004de4: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 8004de8: f507 72a0 add.w r2, r7, #320 @ 0x140 + 8004dec: f5a2 729d sub.w r2, r2, #314 @ 0x13a + 8004df0: 8812 ldrh r2, [r2, #0] + 8004df2: 801a strh r2, [r3, #0] + } + index_input += 2; + 8004df4: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004df8: 3302 adds r3, #2 + 8004dfa: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + { + cp1->Char_Properties = Char_Properties; + 8004dfe: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 8004e02: f897 2150 ldrb.w r2, [r7, #336] @ 0x150 + 8004e06: 709a strb r2, [r3, #2] + } + index_input += 1; + 8004e08: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004e0c: 3301 adds r3, #1 + 8004e0e: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + { + cp1->Security_Permissions = Security_Permissions; + 8004e12: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 8004e16: f897 2154 ldrb.w r2, [r7, #340] @ 0x154 + 8004e1a: 70da strb r2, [r3, #3] + } + index_input += 1; + 8004e1c: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004e20: 3301 adds r3, #1 + 8004e22: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + { + cp1->GATT_Evt_Mask = GATT_Evt_Mask; + 8004e26: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 8004e2a: f897 2158 ldrb.w r2, [r7, #344] @ 0x158 + 8004e2e: 711a strb r2, [r3, #4] + } + index_input += 1; + 8004e30: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004e34: 3301 adds r3, #1 + 8004e36: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + { + cp1->Enc_Key_Size = Enc_Key_Size; + 8004e3a: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 8004e3e: f897 215c ldrb.w r2, [r7, #348] @ 0x15c + 8004e42: 715a strb r2, [r3, #5] + } + index_input += 1; + 8004e44: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004e48: 3301 adds r3, #1 + 8004e4a: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + { + cp1->Is_Variable = Is_Variable; + 8004e4e: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 8004e52: f897 2160 ldrb.w r2, [r7, #352] @ 0x160 + 8004e56: 719a strb r2, [r3, #6] + } + index_input += 1; + 8004e58: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004e5c: 3301 adds r3, #1 + 8004e5e: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8004e62: f507 738c add.w r3, r7, #280 @ 0x118 + 8004e66: 2218 movs r2, #24 + 8004e68: 2100 movs r1, #0 + 8004e6a: 4618 mov r0, r3 + 8004e6c: f000 fbab bl 80055c6 + rq.ogf = 0x3f; + 8004e70: 233f movs r3, #63 @ 0x3f + 8004e72: f8a7 3118 strh.w r3, [r7, #280] @ 0x118 + rq.ocf = 0x104; + 8004e76: f44f 7382 mov.w r3, #260 @ 0x104 + 8004e7a: f8a7 311a strh.w r3, [r7, #282] @ 0x11a + rq.cparam = cmd_buffer; + 8004e7e: f107 0318 add.w r3, r7, #24 + 8004e82: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.clen = index_input; + 8004e86: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8004e8a: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + rq.rparam = &resp; + 8004e8e: f107 0314 add.w r3, r7, #20 + 8004e92: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + rq.rlen = sizeof(resp); + 8004e96: 2303 movs r3, #3 + 8004e98: f8c7 312c str.w r3, [r7, #300] @ 0x12c + if ( hci_send_req(&rq, FALSE) < 0 ) + 8004e9c: f507 738c add.w r3, r7, #280 @ 0x118 + 8004ea0: 2100 movs r1, #0 + 8004ea2: 4618 mov r0, r3 + 8004ea4: f000 ff1e bl 8005ce4 + 8004ea8: 4603 mov r3, r0 + 8004eaa: 2b00 cmp r3, #0 + 8004eac: da01 bge.n 8004eb2 + return BLE_STATUS_TIMEOUT; + 8004eae: 23ff movs r3, #255 @ 0xff + 8004eb0: e017 b.n 8004ee2 + if ( resp.Status ) + 8004eb2: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004eb6: f5a3 7396 sub.w r3, r3, #300 @ 0x12c + 8004eba: 781b ldrb r3, [r3, #0] + 8004ebc: 2b00 cmp r3, #0 + 8004ebe: d005 beq.n 8004ecc + return resp.Status; + 8004ec0: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004ec4: f5a3 7396 sub.w r3, r3, #300 @ 0x12c + 8004ec8: 781b ldrb r3, [r3, #0] + 8004eca: e00a b.n 8004ee2 + *Char_Handle = resp.Char_Handle; + 8004ecc: f507 73a0 add.w r3, r7, #320 @ 0x140 + 8004ed0: f5a3 7396 sub.w r3, r3, #300 @ 0x12c + 8004ed4: f8b3 3001 ldrh.w r3, [r3, #1] + 8004ed8: b29a uxth r2, r3 + 8004eda: f8d7 3164 ldr.w r3, [r7, #356] @ 0x164 + 8004ede: 801a strh r2, [r3, #0] + return BLE_STATUS_SUCCESS; + 8004ee0: 2300 movs r3, #0 +} + 8004ee2: 4618 mov r0, r3 + 8004ee4: f507 77a2 add.w r7, r7, #324 @ 0x144 + 8004ee8: 46bd mov sp, r7 + 8004eea: bd90 pop {r4, r7, pc} + +08004eec : +tBleStatus aci_gatt_update_char_value( uint16_t Service_Handle, + uint16_t Char_Handle, + uint8_t Val_Offset, + uint8_t Char_Value_Length, + const uint8_t* Char_Value ) +{ + 8004eec: b5b0 push {r4, r5, r7, lr} + 8004eee: b0cc sub sp, #304 @ 0x130 + 8004ef0: af00 add r7, sp, #0 + 8004ef2: 4605 mov r5, r0 + 8004ef4: 460c mov r4, r1 + 8004ef6: 4610 mov r0, r2 + 8004ef8: 4619 mov r1, r3 + 8004efa: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004efe: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 8004f02: 462a mov r2, r5 + 8004f04: 801a strh r2, [r3, #0] + 8004f06: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004f0a: f5a3 7396 sub.w r3, r3, #300 @ 0x12c + 8004f0e: 4622 mov r2, r4 + 8004f10: 801a strh r2, [r3, #0] + 8004f12: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004f16: f2a3 132d subw r3, r3, #301 @ 0x12d + 8004f1a: 4602 mov r2, r0 + 8004f1c: 701a strb r2, [r3, #0] + 8004f1e: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004f22: f5a3 7397 sub.w r3, r3, #302 @ 0x12e + 8004f26: 460a mov r2, r1 + 8004f28: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_update_char_value_cp0 *cp0 = (aci_gatt_update_char_value_cp0*)(cmd_buffer); + 8004f2a: f107 0310 add.w r3, r7, #16 + 8004f2e: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 8004f32: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004f36: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8004f3a: 2200 movs r2, #0 + 8004f3c: 701a strb r2, [r3, #0] + int index_input = 0; + 8004f3e: 2300 movs r3, #0 + 8004f40: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Service_Handle = Service_Handle; + 8004f44: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004f48: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004f4c: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 8004f50: 8812 ldrh r2, [r2, #0] + 8004f52: 801a strh r2, [r3, #0] + index_input += 2; + 8004f54: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004f58: 3302 adds r3, #2 + 8004f5a: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Char_Handle = Char_Handle; + 8004f5e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004f62: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004f66: f5a2 7296 sub.w r2, r2, #300 @ 0x12c + 8004f6a: 8812 ldrh r2, [r2, #0] + 8004f6c: 805a strh r2, [r3, #2] + index_input += 2; + 8004f6e: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004f72: 3302 adds r3, #2 + 8004f74: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Val_Offset = Val_Offset; + 8004f78: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004f7c: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004f80: f2a2 122d subw r2, r2, #301 @ 0x12d + 8004f84: 7812 ldrb r2, [r2, #0] + 8004f86: 711a strb r2, [r3, #4] + index_input += 1; + 8004f88: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004f8c: 3301 adds r3, #1 + 8004f8e: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Char_Value_Length = Char_Value_Length; + 8004f92: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004f96: f507 7298 add.w r2, r7, #304 @ 0x130 + 8004f9a: f5a2 7297 sub.w r2, r2, #302 @ 0x12e + 8004f9e: 7812 ldrb r2, [r2, #0] + 8004fa0: 715a strb r2, [r3, #5] + index_input += 1; + 8004fa2: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8004fa6: 3301 adds r3, #1 + 8004fa8: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemCpy( (void*)&cp0->Char_Value, (const void*)Char_Value, Char_Value_Length ); + 8004fac: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8004fb0: 1d98 adds r0, r3, #6 + 8004fb2: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004fb6: f5a3 7397 sub.w r3, r3, #302 @ 0x12e + 8004fba: 781b ldrb r3, [r3, #0] + 8004fbc: 461a mov r2, r3 + 8004fbe: f8d7 1140 ldr.w r1, [r7, #320] @ 0x140 + 8004fc2: f000 faf0 bl 80055a6 + index_input += Char_Value_Length; + 8004fc6: f507 7398 add.w r3, r7, #304 @ 0x130 + 8004fca: f5a3 7397 sub.w r3, r3, #302 @ 0x12e + 8004fce: 781b ldrb r3, [r3, #0] + 8004fd0: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 + 8004fd4: 4413 add r3, r2 + 8004fd6: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8004fda: f507 7388 add.w r3, r7, #272 @ 0x110 + 8004fde: 2218 movs r2, #24 + 8004fe0: 2100 movs r1, #0 + 8004fe2: 4618 mov r0, r3 + 8004fe4: f000 faef bl 80055c6 + rq.ogf = 0x3f; + 8004fe8: 233f movs r3, #63 @ 0x3f + 8004fea: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x106; + 8004fee: f44f 7383 mov.w r3, #262 @ 0x106 + 8004ff2: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 8004ff6: f107 0310 add.w r3, r7, #16 + 8004ffa: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8004ffe: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8005002: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 8005006: f107 030f add.w r3, r7, #15 + 800500a: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 800500e: 2301 movs r3, #1 + 8005010: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 8005014: f507 7388 add.w r3, r7, #272 @ 0x110 + 8005018: 2100 movs r1, #0 + 800501a: 4618 mov r0, r3 + 800501c: f000 fe62 bl 8005ce4 + 8005020: 4603 mov r3, r0 + 8005022: 2b00 cmp r3, #0 + 8005024: da01 bge.n 800502a + return BLE_STATUS_TIMEOUT; + 8005026: 23ff movs r3, #255 @ 0xff + 8005028: e004 b.n 8005034 + return status; + 800502a: f507 7398 add.w r3, r7, #304 @ 0x130 + 800502e: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8005032: 781b ldrb r3, [r3, #0] +} + 8005034: 4618 mov r0, r3 + 8005036: f507 7798 add.w r7, r7, #304 @ 0x130 + 800503a: 46bd mov sp, r7 + 800503c: bdb0 pop {r4, r5, r7, pc} + +0800503e : + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_confirm_indication( uint16_t Connection_Handle ) +{ + 800503e: b580 push {r7, lr} + 8005040: b0cc sub sp, #304 @ 0x130 + 8005042: af00 add r7, sp, #0 + 8005044: 4602 mov r2, r0 + 8005046: f507 7398 add.w r3, r7, #304 @ 0x130 + 800504a: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 800504e: 801a strh r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_confirm_indication_cp0 *cp0 = (aci_gatt_confirm_indication_cp0*)(cmd_buffer); + 8005050: f107 0310 add.w r3, r7, #16 + 8005054: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 8005058: f507 7398 add.w r3, r7, #304 @ 0x130 + 800505c: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8005060: 2200 movs r2, #0 + 8005062: 701a strb r2, [r3, #0] + int index_input = 0; + 8005064: 2300 movs r3, #0 + 8005066: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Connection_Handle = Connection_Handle; + 800506a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 800506e: f507 7298 add.w r2, r7, #304 @ 0x130 + 8005072: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 8005076: 8812 ldrh r2, [r2, #0] + 8005078: 801a strh r2, [r3, #0] + index_input += 2; + 800507a: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800507e: 3302 adds r3, #2 + 8005080: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8005084: f507 7388 add.w r3, r7, #272 @ 0x110 + 8005088: 2218 movs r2, #24 + 800508a: 2100 movs r1, #0 + 800508c: 4618 mov r0, r3 + 800508e: f000 fa9a bl 80055c6 + rq.ogf = 0x3f; + 8005092: 233f movs r3, #63 @ 0x3f + 8005094: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x125; + 8005098: f240 1325 movw r3, #293 @ 0x125 + 800509c: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 80050a0: f107 0310 add.w r3, r7, #16 + 80050a4: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 80050a8: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80050ac: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 80050b0: f107 030f add.w r3, r7, #15 + 80050b4: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 80050b8: 2301 movs r3, #1 + 80050ba: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 80050be: f507 7388 add.w r3, r7, #272 @ 0x110 + 80050c2: 2100 movs r1, #0 + 80050c4: 4618 mov r0, r3 + 80050c6: f000 fe0d bl 8005ce4 + 80050ca: 4603 mov r3, r0 + 80050cc: 2b00 cmp r3, #0 + 80050ce: da01 bge.n 80050d4 + return BLE_STATUS_TIMEOUT; + 80050d0: 23ff movs r3, #255 @ 0xff + 80050d2: e004 b.n 80050de + return status; + 80050d4: f507 7398 add.w r3, r7, #304 @ 0x130 + 80050d8: f2a3 1321 subw r3, r3, #289 @ 0x121 + 80050dc: 781b ldrb r3, [r3, #0] +} + 80050de: 4618 mov r0, r3 + 80050e0: f507 7798 add.w r7, r7, #304 @ 0x130 + 80050e4: 46bd mov sp, r7 + 80050e6: bd80 pop {r7, pc} + +080050e8 : +#include "auto/ble_hal_aci.h" + +tBleStatus aci_hal_write_config_data( uint8_t Offset, + uint8_t Length, + const uint8_t* Value ) +{ + 80050e8: b580 push {r7, lr} + 80050ea: b0cc sub sp, #304 @ 0x130 + 80050ec: af00 add r7, sp, #0 + 80050ee: f507 7398 add.w r3, r7, #304 @ 0x130 + 80050f2: f5a3 7398 sub.w r3, r3, #304 @ 0x130 + 80050f6: 601a str r2, [r3, #0] + 80050f8: f507 7398 add.w r3, r7, #304 @ 0x130 + 80050fc: f2a3 1329 subw r3, r3, #297 @ 0x129 + 8005100: 4602 mov r2, r0 + 8005102: 701a strb r2, [r3, #0] + 8005104: f507 7398 add.w r3, r7, #304 @ 0x130 + 8005108: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 800510c: 460a mov r2, r1 + 800510e: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_write_config_data_cp0 *cp0 = (aci_hal_write_config_data_cp0*)(cmd_buffer); + 8005110: f107 0310 add.w r3, r7, #16 + 8005114: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 8005118: f507 7398 add.w r3, r7, #304 @ 0x130 + 800511c: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8005120: 2200 movs r2, #0 + 8005122: 701a strb r2, [r3, #0] + int index_input = 0; + 8005124: 2300 movs r3, #0 + 8005126: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Offset = Offset; + 800512a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 800512e: f507 7298 add.w r2, r7, #304 @ 0x130 + 8005132: f2a2 1229 subw r2, r2, #297 @ 0x129 + 8005136: 7812 ldrb r2, [r2, #0] + 8005138: 701a strb r2, [r3, #0] + index_input += 1; + 800513a: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800513e: 3301 adds r3, #1 + 8005140: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Length = Length; + 8005144: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8005148: f507 7298 add.w r2, r7, #304 @ 0x130 + 800514c: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 8005150: 7812 ldrb r2, [r2, #0] + 8005152: 705a strb r2, [r3, #1] + index_input += 1; + 8005154: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8005158: 3301 adds r3, #1 + 800515a: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemCpy( (void*)&cp0->Value, (const void*)Value, Length ); + 800515e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8005162: 1c98 adds r0, r3, #2 + 8005164: f507 7398 add.w r3, r7, #304 @ 0x130 + 8005168: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 800516c: 781a ldrb r2, [r3, #0] + 800516e: f507 7398 add.w r3, r7, #304 @ 0x130 + 8005172: f5a3 7398 sub.w r3, r3, #304 @ 0x130 + 8005176: 6819 ldr r1, [r3, #0] + 8005178: f000 fa15 bl 80055a6 + index_input += Length; + 800517c: f507 7398 add.w r3, r7, #304 @ 0x130 + 8005180: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 8005184: 781b ldrb r3, [r3, #0] + 8005186: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 + 800518a: 4413 add r3, r2 + 800518c: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8005190: f507 7388 add.w r3, r7, #272 @ 0x110 + 8005194: 2218 movs r2, #24 + 8005196: 2100 movs r1, #0 + 8005198: 4618 mov r0, r3 + 800519a: f000 fa14 bl 80055c6 + rq.ogf = 0x3f; + 800519e: 233f movs r3, #63 @ 0x3f + 80051a0: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x00c; + 80051a4: 230c movs r3, #12 + 80051a6: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 80051aa: f107 0310 add.w r3, r7, #16 + 80051ae: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 80051b2: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 80051b6: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 80051ba: f107 030f add.w r3, r7, #15 + 80051be: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 80051c2: 2301 movs r3, #1 + 80051c4: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 80051c8: f507 7388 add.w r3, r7, #272 @ 0x110 + 80051cc: 2100 movs r1, #0 + 80051ce: 4618 mov r0, r3 + 80051d0: f000 fd88 bl 8005ce4 + 80051d4: 4603 mov r3, r0 + 80051d6: 2b00 cmp r3, #0 + 80051d8: da01 bge.n 80051de + return BLE_STATUS_TIMEOUT; + 80051da: 23ff movs r3, #255 @ 0xff + 80051dc: e004 b.n 80051e8 + return status; + 80051de: f507 7398 add.w r3, r7, #304 @ 0x130 + 80051e2: f2a3 1321 subw r3, r3, #289 @ 0x121 + 80051e6: 781b ldrb r3, [r3, #0] +} + 80051e8: 4618 mov r0, r3 + 80051ea: f507 7798 add.w r7, r7, #304 @ 0x130 + 80051ee: 46bd mov sp, r7 + 80051f0: bd80 pop {r7, pc} + +080051f2 : + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_set_tx_power_level( uint8_t En_High_Power, + uint8_t PA_Level ) +{ + 80051f2: b580 push {r7, lr} + 80051f4: b0cc sub sp, #304 @ 0x130 + 80051f6: af00 add r7, sp, #0 + 80051f8: 4602 mov r2, r0 + 80051fa: f507 7398 add.w r3, r7, #304 @ 0x130 + 80051fe: f2a3 1329 subw r3, r3, #297 @ 0x129 + 8005202: 701a strb r2, [r3, #0] + 8005204: f507 7398 add.w r3, r7, #304 @ 0x130 + 8005208: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 800520c: 460a mov r2, r1 + 800520e: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_set_tx_power_level_cp0 *cp0 = (aci_hal_set_tx_power_level_cp0*)(cmd_buffer); + 8005210: f107 0310 add.w r3, r7, #16 + 8005214: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 8005218: f507 7398 add.w r3, r7, #304 @ 0x130 + 800521c: f2a3 1321 subw r3, r3, #289 @ 0x121 + 8005220: 2200 movs r2, #0 + 8005222: 701a strb r2, [r3, #0] + int index_input = 0; + 8005224: 2300 movs r3, #0 + 8005226: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->En_High_Power = En_High_Power; + 800522a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 800522e: f507 7298 add.w r2, r7, #304 @ 0x130 + 8005232: f2a2 1229 subw r2, r2, #297 @ 0x129 + 8005236: 7812 ldrb r2, [r2, #0] + 8005238: 701a strb r2, [r3, #0] + index_input += 1; + 800523a: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800523e: 3301 adds r3, #1 + 8005240: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->PA_Level = PA_Level; + 8005244: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8005248: f507 7298 add.w r2, r7, #304 @ 0x130 + 800524c: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 8005250: 7812 ldrb r2, [r2, #0] + 8005252: 705a strb r2, [r3, #1] + index_input += 1; + 8005254: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8005258: 3301 adds r3, #1 + 800525a: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 800525e: f507 7388 add.w r3, r7, #272 @ 0x110 + 8005262: 2218 movs r2, #24 + 8005264: 2100 movs r1, #0 + 8005266: 4618 mov r0, r3 + 8005268: f000 f9ad bl 80055c6 + rq.ogf = 0x3f; + 800526c: 233f movs r3, #63 @ 0x3f + 800526e: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x00f; + 8005272: 230f movs r3, #15 + 8005274: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 8005278: f107 0310 add.w r3, r7, #16 + 800527c: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8005280: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8005284: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 8005288: f107 030f add.w r3, r7, #15 + 800528c: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 8005290: 2301 movs r3, #1 + 8005292: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 8005296: f507 7388 add.w r3, r7, #272 @ 0x110 + 800529a: 2100 movs r1, #0 + 800529c: 4618 mov r0, r3 + 800529e: f000 fd21 bl 8005ce4 + 80052a2: 4603 mov r3, r0 + 80052a4: 2b00 cmp r3, #0 + 80052a6: da01 bge.n 80052ac + return BLE_STATUS_TIMEOUT; + 80052a8: 23ff movs r3, #255 @ 0xff + 80052aa: e004 b.n 80052b6 + return status; + 80052ac: f507 7398 add.w r3, r7, #304 @ 0x130 + 80052b0: f2a3 1321 subw r3, r3, #289 @ 0x121 + 80052b4: 781b ldrb r3, [r3, #0] +} + 80052b6: 4618 mov r0, r3 + 80052b8: f507 7798 add.w r7, r7, #304 @ 0x130 + 80052bc: 46bd mov sp, r7 + 80052be: bd80 pop {r7, pc} + +080052c0 : + Osal_MemCpy( (void*)Link_Connection_Handle, (const void*)resp.Link_Connection_Handle, 16 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_set_radio_activity_mask( uint16_t Radio_Activity_Mask ) +{ + 80052c0: b580 push {r7, lr} + 80052c2: b0cc sub sp, #304 @ 0x130 + 80052c4: af00 add r7, sp, #0 + 80052c6: 4602 mov r2, r0 + 80052c8: f507 7398 add.w r3, r7, #304 @ 0x130 + 80052cc: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 80052d0: 801a strh r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_set_radio_activity_mask_cp0 *cp0 = (aci_hal_set_radio_activity_mask_cp0*)(cmd_buffer); + 80052d2: f107 0310 add.w r3, r7, #16 + 80052d6: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 80052da: f507 7398 add.w r3, r7, #304 @ 0x130 + 80052de: f2a3 1321 subw r3, r3, #289 @ 0x121 + 80052e2: 2200 movs r2, #0 + 80052e4: 701a strb r2, [r3, #0] + int index_input = 0; + 80052e6: 2300 movs r3, #0 + 80052e8: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->Radio_Activity_Mask = Radio_Activity_Mask; + 80052ec: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80052f0: f507 7298 add.w r2, r7, #304 @ 0x130 + 80052f4: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 80052f8: 8812 ldrh r2, [r2, #0] + 80052fa: 801a strh r2, [r3, #0] + index_input += 2; + 80052fc: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8005300: 3302 adds r3, #2 + 8005302: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8005306: f507 7388 add.w r3, r7, #272 @ 0x110 + 800530a: 2218 movs r2, #24 + 800530c: 2100 movs r1, #0 + 800530e: 4618 mov r0, r3 + 8005310: f000 f959 bl 80055c6 + rq.ogf = 0x3f; + 8005314: 233f movs r3, #63 @ 0x3f + 8005316: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x018; + 800531a: 2318 movs r3, #24 + 800531c: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 8005320: f107 0310 add.w r3, r7, #16 + 8005324: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8005328: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800532c: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 8005330: f107 030f add.w r3, r7, #15 + 8005334: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 8005338: 2301 movs r3, #1 + 800533a: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 800533e: f507 7388 add.w r3, r7, #272 @ 0x110 + 8005342: 2100 movs r1, #0 + 8005344: 4618 mov r0, r3 + 8005346: f000 fccd bl 8005ce4 + 800534a: 4603 mov r3, r0 + 800534c: 2b00 cmp r3, #0 + 800534e: da01 bge.n 8005354 + return BLE_STATUS_TIMEOUT; + 8005350: 23ff movs r3, #255 @ 0xff + 8005352: e004 b.n 800535e + return status; + 8005354: f507 7398 add.w r3, r7, #304 @ 0x130 + 8005358: f2a3 1321 subw r3, r3, #289 @ 0x121 + 800535c: 781b ldrb r3, [r3, #0] +} + 800535e: 4618 mov r0, r3 + 8005360: f507 7798 add.w r7, r7, #304 @ 0x130 + 8005364: 46bd mov sp, r7 + 8005366: bd80 pop {r7, pc} + +08005368 : + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_reset( void ) +{ + 8005368: b580 push {r7, lr} + 800536a: b088 sub sp, #32 + 800536c: af00 add r7, sp, #0 + struct hci_request rq; + tBleStatus status = 0; + 800536e: 2300 movs r3, #0 + 8005370: 71fb strb r3, [r7, #7] + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8005372: f107 0308 add.w r3, r7, #8 + 8005376: 2218 movs r2, #24 + 8005378: 2100 movs r1, #0 + 800537a: 4618 mov r0, r3 + 800537c: f000 f923 bl 80055c6 + rq.ogf = 0x03; + 8005380: 2303 movs r3, #3 + 8005382: 813b strh r3, [r7, #8] + rq.ocf = 0x003; + 8005384: 2303 movs r3, #3 + 8005386: 817b strh r3, [r7, #10] + rq.rparam = &status; + 8005388: 1dfb adds r3, r7, #7 + 800538a: 61bb str r3, [r7, #24] + rq.rlen = 1; + 800538c: 2301 movs r3, #1 + 800538e: 61fb str r3, [r7, #28] + if ( hci_send_req(&rq, FALSE) < 0 ) + 8005390: f107 0308 add.w r3, r7, #8 + 8005394: 2100 movs r1, #0 + 8005396: 4618 mov r0, r3 + 8005398: f000 fca4 bl 8005ce4 + 800539c: 4603 mov r3, r0 + 800539e: 2b00 cmp r3, #0 + 80053a0: da01 bge.n 80053a6 + return BLE_STATUS_TIMEOUT; + 80053a2: 23ff movs r3, #255 @ 0xff + 80053a4: e000 b.n 80053a8 + return status; + 80053a6: 79fb ldrb r3, [r7, #7] +} + 80053a8: 4618 mov r0, r3 + 80053aa: 3720 adds r7, #32 + 80053ac: 46bd mov sp, r7 + 80053ae: bd80 pop {r7, pc} + +080053b0 : +} + +tBleStatus hci_le_read_phy( uint16_t Connection_Handle, + uint8_t* TX_PHY, + uint8_t* RX_PHY ) +{ + 80053b0: b580 push {r7, lr} + 80053b2: b0ce sub sp, #312 @ 0x138 + 80053b4: af00 add r7, sp, #0 + 80053b6: f507 739c add.w r3, r7, #312 @ 0x138 + 80053ba: f5a3 7398 sub.w r3, r3, #304 @ 0x130 + 80053be: 6019 str r1, [r3, #0] + 80053c0: f507 739c add.w r3, r7, #312 @ 0x138 + 80053c4: f5a3 739a sub.w r3, r3, #308 @ 0x134 + 80053c8: 601a str r2, [r3, #0] + 80053ca: f507 739c add.w r3, r7, #312 @ 0x138 + 80053ce: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 80053d2: 4602 mov r2, r0 + 80053d4: 801a strh r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_read_phy_cp0 *cp0 = (hci_le_read_phy_cp0*)(cmd_buffer); + 80053d6: f107 0318 add.w r3, r7, #24 + 80053da: f8c7 3134 str.w r3, [r7, #308] @ 0x134 + hci_le_read_phy_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + 80053de: f107 0310 add.w r3, r7, #16 + 80053e2: 2205 movs r2, #5 + 80053e4: 2100 movs r1, #0 + 80053e6: 4618 mov r0, r3 + 80053e8: f000 f8ed bl 80055c6 + int index_input = 0; + 80053ec: 2300 movs r3, #0 + 80053ee: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + cp0->Connection_Handle = Connection_Handle; + 80053f2: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 + 80053f6: f507 729c add.w r2, r7, #312 @ 0x138 + 80053fa: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 80053fe: 8812 ldrh r2, [r2, #0] + 8005400: 801a strh r2, [r3, #0] + index_input += 2; + 8005402: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8005406: 3302 adds r3, #2 + 8005408: f8c7 3130 str.w r3, [r7, #304] @ 0x130 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 800540c: f507 738c add.w r3, r7, #280 @ 0x118 + 8005410: 2218 movs r2, #24 + 8005412: 2100 movs r1, #0 + 8005414: 4618 mov r0, r3 + 8005416: f000 f8d6 bl 80055c6 + rq.ogf = 0x08; + 800541a: 2308 movs r3, #8 + 800541c: f8a7 3118 strh.w r3, [r7, #280] @ 0x118 + rq.ocf = 0x030; + 8005420: 2330 movs r3, #48 @ 0x30 + 8005422: f8a7 311a strh.w r3, [r7, #282] @ 0x11a + rq.cparam = cmd_buffer; + 8005426: f107 0318 add.w r3, r7, #24 + 800542a: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.clen = index_input; + 800542e: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 + 8005432: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + rq.rparam = &resp; + 8005436: f107 0310 add.w r3, r7, #16 + 800543a: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + rq.rlen = sizeof(resp); + 800543e: 2305 movs r3, #5 + 8005440: f8c7 312c str.w r3, [r7, #300] @ 0x12c + if ( hci_send_req(&rq, FALSE) < 0 ) + 8005444: f507 738c add.w r3, r7, #280 @ 0x118 + 8005448: 2100 movs r1, #0 + 800544a: 4618 mov r0, r3 + 800544c: f000 fc4a bl 8005ce4 + 8005450: 4603 mov r3, r0 + 8005452: 2b00 cmp r3, #0 + 8005454: da01 bge.n 800545a + return BLE_STATUS_TIMEOUT; + 8005456: 23ff movs r3, #255 @ 0xff + 8005458: e023 b.n 80054a2 + if ( resp.Status ) + 800545a: f507 739c add.w r3, r7, #312 @ 0x138 + 800545e: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 8005462: 781b ldrb r3, [r3, #0] + 8005464: 2b00 cmp r3, #0 + 8005466: d005 beq.n 8005474 + return resp.Status; + 8005468: f507 739c add.w r3, r7, #312 @ 0x138 + 800546c: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 8005470: 781b ldrb r3, [r3, #0] + 8005472: e016 b.n 80054a2 + *TX_PHY = resp.TX_PHY; + 8005474: f507 739c add.w r3, r7, #312 @ 0x138 + 8005478: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 800547c: 78da ldrb r2, [r3, #3] + 800547e: f507 739c add.w r3, r7, #312 @ 0x138 + 8005482: f5a3 7398 sub.w r3, r3, #304 @ 0x130 + 8005486: 681b ldr r3, [r3, #0] + 8005488: 701a strb r2, [r3, #0] + *RX_PHY = resp.RX_PHY; + 800548a: f507 739c add.w r3, r7, #312 @ 0x138 + 800548e: f5a3 7394 sub.w r3, r3, #296 @ 0x128 + 8005492: 791a ldrb r2, [r3, #4] + 8005494: f507 739c add.w r3, r7, #312 @ 0x138 + 8005498: f5a3 739a sub.w r3, r3, #308 @ 0x134 + 800549c: 681b ldr r3, [r3, #0] + 800549e: 701a strb r2, [r3, #0] + return BLE_STATUS_SUCCESS; + 80054a0: 2300 movs r3, #0 +} + 80054a2: 4618 mov r0, r3 + 80054a4: f507 779c add.w r7, r7, #312 @ 0x138 + 80054a8: 46bd mov sp, r7 + 80054aa: bd80 pop {r7, pc} + +080054ac : + +tBleStatus hci_le_set_default_phy( uint8_t ALL_PHYS, + uint8_t TX_PHYS, + uint8_t RX_PHYS ) +{ + 80054ac: b590 push {r4, r7, lr} + 80054ae: b0cd sub sp, #308 @ 0x134 + 80054b0: af00 add r7, sp, #0 + 80054b2: 4604 mov r4, r0 + 80054b4: 4608 mov r0, r1 + 80054b6: 4611 mov r1, r2 + 80054b8: f507 7398 add.w r3, r7, #304 @ 0x130 + 80054bc: f2a3 1329 subw r3, r3, #297 @ 0x129 + 80054c0: 4622 mov r2, r4 + 80054c2: 701a strb r2, [r3, #0] + 80054c4: f507 7398 add.w r3, r7, #304 @ 0x130 + 80054c8: f5a3 7395 sub.w r3, r3, #298 @ 0x12a + 80054cc: 4602 mov r2, r0 + 80054ce: 701a strb r2, [r3, #0] + 80054d0: f507 7398 add.w r3, r7, #304 @ 0x130 + 80054d4: f2a3 132b subw r3, r3, #299 @ 0x12b + 80054d8: 460a mov r2, r1 + 80054da: 701a strb r2, [r3, #0] + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_default_phy_cp0 *cp0 = (hci_le_set_default_phy_cp0*)(cmd_buffer); + 80054dc: f107 0310 add.w r3, r7, #16 + 80054e0: f8c7 312c str.w r3, [r7, #300] @ 0x12c + tBleStatus status = 0; + 80054e4: f507 7398 add.w r3, r7, #304 @ 0x130 + 80054e8: f2a3 1321 subw r3, r3, #289 @ 0x121 + 80054ec: 2200 movs r2, #0 + 80054ee: 701a strb r2, [r3, #0] + int index_input = 0; + 80054f0: 2300 movs r3, #0 + 80054f2: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->ALL_PHYS = ALL_PHYS; + 80054f6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 80054fa: f507 7298 add.w r2, r7, #304 @ 0x130 + 80054fe: f2a2 1229 subw r2, r2, #297 @ 0x129 + 8005502: 7812 ldrb r2, [r2, #0] + 8005504: 701a strb r2, [r3, #0] + index_input += 1; + 8005506: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800550a: 3301 adds r3, #1 + 800550c: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->TX_PHYS = TX_PHYS; + 8005510: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 8005514: f507 7298 add.w r2, r7, #304 @ 0x130 + 8005518: f5a2 7295 sub.w r2, r2, #298 @ 0x12a + 800551c: 7812 ldrb r2, [r2, #0] + 800551e: 705a strb r2, [r3, #1] + index_input += 1; + 8005520: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 8005524: 3301 adds r3, #1 + 8005526: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + cp0->RX_PHYS = RX_PHYS; + 800552a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c + 800552e: f507 7298 add.w r2, r7, #304 @ 0x130 + 8005532: f2a2 122b subw r2, r2, #299 @ 0x12b + 8005536: 7812 ldrb r2, [r2, #0] + 8005538: 709a strb r2, [r3, #2] + index_input += 1; + 800553a: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800553e: 3301 adds r3, #1 + 8005540: f8c7 3128 str.w r3, [r7, #296] @ 0x128 + Osal_MemSet( &rq, 0, sizeof(rq) ); + 8005544: f507 7388 add.w r3, r7, #272 @ 0x110 + 8005548: 2218 movs r2, #24 + 800554a: 2100 movs r1, #0 + 800554c: 4618 mov r0, r3 + 800554e: f000 f83a bl 80055c6 + rq.ogf = 0x08; + 8005552: 2308 movs r3, #8 + 8005554: f8a7 3110 strh.w r3, [r7, #272] @ 0x110 + rq.ocf = 0x031; + 8005558: 2331 movs r3, #49 @ 0x31 + 800555a: f8a7 3112 strh.w r3, [r7, #274] @ 0x112 + rq.cparam = cmd_buffer; + 800555e: f107 0310 add.w r3, r7, #16 + 8005562: f8c7 3118 str.w r3, [r7, #280] @ 0x118 + rq.clen = index_input; + 8005566: f8d7 3128 ldr.w r3, [r7, #296] @ 0x128 + 800556a: f8c7 311c str.w r3, [r7, #284] @ 0x11c + rq.rparam = &status; + 800556e: f107 030f add.w r3, r7, #15 + 8005572: f8c7 3120 str.w r3, [r7, #288] @ 0x120 + rq.rlen = 1; + 8005576: 2301 movs r3, #1 + 8005578: f8c7 3124 str.w r3, [r7, #292] @ 0x124 + if ( hci_send_req(&rq, FALSE) < 0 ) + 800557c: f507 7388 add.w r3, r7, #272 @ 0x110 + 8005580: 2100 movs r1, #0 + 8005582: 4618 mov r0, r3 + 8005584: f000 fbae bl 8005ce4 + 8005588: 4603 mov r3, r0 + 800558a: 2b00 cmp r3, #0 + 800558c: da01 bge.n 8005592 + return BLE_STATUS_TIMEOUT; + 800558e: 23ff movs r3, #255 @ 0xff + 8005590: e004 b.n 800559c + return status; + 8005592: f507 7398 add.w r3, r7, #304 @ 0x130 + 8005596: f2a3 1321 subw r3, r3, #289 @ 0x121 + 800559a: 781b ldrb r3, [r3, #0] +} + 800559c: 4618 mov r0, r3 + 800559e: f507 779a add.w r7, r7, #308 @ 0x134 + 80055a2: 46bd mov sp, r7 + 80055a4: bd90 pop {r4, r7, pc} + +080055a6 : + * Osal_MemCpy + * + */ + +void* Osal_MemCpy( void *dest, const void *src, unsigned int size ) +{ + 80055a6: b580 push {r7, lr} + 80055a8: b084 sub sp, #16 + 80055aa: af00 add r7, sp, #0 + 80055ac: 60f8 str r0, [r7, #12] + 80055ae: 60b9 str r1, [r7, #8] + 80055b0: 607a str r2, [r7, #4] + return memcpy( dest, src, size ); + 80055b2: 687a ldr r2, [r7, #4] + 80055b4: 68b9 ldr r1, [r7, #8] + 80055b6: 68f8 ldr r0, [r7, #12] + 80055b8: f002 fae2 bl 8007b80 + 80055bc: 4603 mov r3, r0 +} + 80055be: 4618 mov r0, r3 + 80055c0: 3710 adds r7, #16 + 80055c2: 46bd mov sp, r7 + 80055c4: bd80 pop {r7, pc} + +080055c6 : + * Osal_MemSet + * + */ + +void* Osal_MemSet( void *ptr, int value, unsigned int size ) +{ + 80055c6: b580 push {r7, lr} + 80055c8: b084 sub sp, #16 + 80055ca: af00 add r7, sp, #0 + 80055cc: 60f8 str r0, [r7, #12] + 80055ce: 60b9 str r1, [r7, #8] + 80055d0: 607a str r2, [r7, #4] + return memset( ptr, value, size ); + 80055d2: 687a ldr r2, [r7, #4] + 80055d4: 68b9 ldr r1, [r7, #8] + 80055d6: 68f8 ldr r0, [r7, #12] + 80055d8: f002 faa5 bl 8007b26 + 80055dc: 4603 mov r3, r0 +} + 80055de: 4618 mov r0, r3 + 80055e0: 3710 adds r7, #16 + 80055e2: 46bd mov sp, r7 + 80055e4: bd80 pop {r7, pc} + ... + +080055e8 : + * @brief Event handler + * @param Event: Address of the buffer holding the Event + * @retval Ack: Return whether the Event has been managed or not + */ +static SVCCTL_EvtAckStatus_t PeerToPeer_Event_Handler(void *Event) +{ + 80055e8: b580 push {r7, lr} + 80055ea: b08a sub sp, #40 @ 0x28 + 80055ec: af00 add r7, sp, #0 + 80055ee: 6078 str r0, [r7, #4] + hci_event_pckt *event_pckt; + evt_blecore_aci *blecore_evt; + aci_gatt_attribute_modified_event_rp0 * attribute_modified; + P2PS_STM_App_Notification_evt_t Notification; + + return_value = SVCCTL_EvtNotAck; + 80055f0: 2300 movs r3, #0 + 80055f2: f887 3027 strb.w r3, [r7, #39] @ 0x27 + event_pckt = (hci_event_pckt *)(((hci_uart_pckt*)Event)->data); + 80055f6: 687b ldr r3, [r7, #4] + 80055f8: 3301 adds r3, #1 + 80055fa: 623b str r3, [r7, #32] + + switch(event_pckt->evt) + 80055fc: 6a3b ldr r3, [r7, #32] + 80055fe: 781b ldrb r3, [r3, #0] + 8005600: 2bff cmp r3, #255 @ 0xff + 8005602: d14c bne.n 800569e + { + case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE: + { + blecore_evt = (evt_blecore_aci*)event_pckt->data; + 8005604: 6a3b ldr r3, [r7, #32] + 8005606: 3302 adds r3, #2 + 8005608: 61fb str r3, [r7, #28] + switch(blecore_evt->ecode) + 800560a: 69fb ldr r3, [r7, #28] + 800560c: 881b ldrh r3, [r3, #0] + 800560e: b29b uxth r3, r3 + 8005610: 461a mov r2, r3 + 8005612: f640 4301 movw r3, #3073 @ 0xc01 + 8005616: 429a cmp r2, r3 + 8005618: d13d bne.n 8005696 + { + case ACI_GATT_ATTRIBUTE_MODIFIED_VSEVT_CODE: + { + attribute_modified = (aci_gatt_attribute_modified_event_rp0*)blecore_evt->data; + 800561a: 69fb ldr r3, [r7, #28] + 800561c: 3302 adds r3, #2 + 800561e: 61bb str r3, [r7, #24] + if(attribute_modified->Attr_Handle == (aPeerToPeerContext.P2PNotifyServerToClientCharHdle + 2)) + 8005620: 69bb ldr r3, [r7, #24] + 8005622: 885b ldrh r3, [r3, #2] + 8005624: b29b uxth r3, r3 + 8005626: 461a mov r2, r3 + 8005628: 4b20 ldr r3, [pc, #128] @ (80056ac ) + 800562a: 889b ldrh r3, [r3, #4] + 800562c: 3302 adds r3, #2 + 800562e: 429a cmp r2, r3 + 8005630: d118 bne.n 8005664 + { + /** + * Descriptor handle + */ + return_value = SVCCTL_EvtAckFlowEnable; + 8005632: 2301 movs r3, #1 + 8005634: f887 3027 strb.w r3, [r7, #39] @ 0x27 + /** + * Notify to application + */ + if(attribute_modified->Attr_Data[0] & COMSVC_Notification) + 8005638: 69bb ldr r3, [r7, #24] + 800563a: 7a1b ldrb r3, [r3, #8] + 800563c: f003 0301 and.w r3, r3, #1 + 8005640: 2b00 cmp r3, #0 + 8005642: d007 beq.n 8005654 + { + Notification.P2P_Evt_Opcode = P2PS_STM__NOTIFY_ENABLED_EVT; + 8005644: 2300 movs r3, #0 + 8005646: 723b strb r3, [r7, #8] + P2PS_STM_App_Notification(&Notification); + 8005648: f107 0308 add.w r3, r7, #8 + 800564c: 4618 mov r0, r3 + 800564e: f001 fc5f bl 8006f10 + Notification.DataTransfered.pPayload=attribute_modified->Attr_Data; + P2PS_STM_App_Notification(&Notification); + } +#endif + } + break; + 8005652: e022 b.n 800569a + Notification.P2P_Evt_Opcode = P2PS_STM_NOTIFY_DISABLED_EVT; + 8005654: 2301 movs r3, #1 + 8005656: 723b strb r3, [r7, #8] + P2PS_STM_App_Notification(&Notification); + 8005658: f107 0308 add.w r3, r7, #8 + 800565c: 4618 mov r0, r3 + 800565e: f001 fc57 bl 8006f10 + break; + 8005662: e01a b.n 800569a + else if(attribute_modified->Attr_Handle == (aPeerToPeerContext.P2PWriteClientToServerCharHdle + 1)) + 8005664: 69bb ldr r3, [r7, #24] + 8005666: 885b ldrh r3, [r3, #2] + 8005668: b29b uxth r3, r3 + 800566a: 461a mov r2, r3 + 800566c: 4b0f ldr r3, [pc, #60] @ (80056ac ) + 800566e: 885b ldrh r3, [r3, #2] + 8005670: 3301 adds r3, #1 + 8005672: 429a cmp r2, r3 + 8005674: d111 bne.n 800569a + Notification.P2P_Evt_Opcode = P2PS_STM_WRITE_EVT; + 8005676: 2303 movs r3, #3 + 8005678: 723b strb r3, [r7, #8] + Notification.DataTransfered.Length=attribute_modified->Attr_Data_Length; + 800567a: 69bb ldr r3, [r7, #24] + 800567c: 88db ldrh r3, [r3, #6] + 800567e: b29b uxth r3, r3 + 8005680: b2db uxtb r3, r3 + 8005682: 743b strb r3, [r7, #16] + Notification.DataTransfered.pPayload=attribute_modified->Attr_Data; + 8005684: 69bb ldr r3, [r7, #24] + 8005686: 3308 adds r3, #8 + 8005688: 60fb str r3, [r7, #12] + P2PS_STM_App_Notification(&Notification); + 800568a: f107 0308 add.w r3, r7, #8 + 800568e: 4618 mov r0, r3 + 8005690: f001 fc3e bl 8006f10 + break; + 8005694: e001 b.n 800569a + + default: + break; + 8005696: bf00 nop + 8005698: e002 b.n 80056a0 + break; + 800569a: bf00 nop + } + } + break; /* HCI_HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE_SPECIFIC */ + 800569c: e000 b.n 80056a0 + + default: + break; + 800569e: bf00 nop + } + + return(return_value); + 80056a0: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 +}/* end SVCCTL_EvtAckStatus_t */ + 80056a4: 4618 mov r0, r3 + 80056a6: 3728 adds r7, #40 @ 0x28 + 80056a8: 46bd mov sp, r7 + 80056aa: bd80 pop {r7, pc} + 80056ac: 2000002c .word 0x2000002c + +080056b0 : + * @brief Service initialization + * @param None + * @retval None + */ +void P2PS_STM_Init(void) +{ + 80056b0: b580 push {r7, lr} + 80056b2: b08a sub sp, #40 @ 0x28 + 80056b4: af06 add r7, sp, #24 + Char_UUID_t uuid16; + + /** + * Register the event handler to the BLE controller + */ + SVCCTL_RegisterSvcHandler(PeerToPeer_Event_Handler); + 80056b6: 484a ldr r0, [pc, #296] @ (80057e0 ) + 80056b8: f000 f94a bl 8005950 + * 2 for P2P Write characteristic + + * 2 for P2P Notify characteristic + + * 1 for client char configuration descriptor + + * + */ + COPY_P2P_SERVICE_UUID(uuid16.Char_UUID_128); + 80056bc: 238f movs r3, #143 @ 0x8f + 80056be: 703b strb r3, [r7, #0] + 80056c0: 23e5 movs r3, #229 @ 0xe5 + 80056c2: 707b strb r3, [r7, #1] + 80056c4: 23b3 movs r3, #179 @ 0xb3 + 80056c6: 70bb strb r3, [r7, #2] + 80056c8: 23d5 movs r3, #213 @ 0xd5 + 80056ca: 70fb strb r3, [r7, #3] + 80056cc: 232e movs r3, #46 @ 0x2e + 80056ce: 713b strb r3, [r7, #4] + 80056d0: 237f movs r3, #127 @ 0x7f + 80056d2: 717b strb r3, [r7, #5] + 80056d4: 234a movs r3, #74 @ 0x4a + 80056d6: 71bb strb r3, [r7, #6] + 80056d8: 2398 movs r3, #152 @ 0x98 + 80056da: 71fb strb r3, [r7, #7] + 80056dc: 232a movs r3, #42 @ 0x2a + 80056de: 723b strb r3, [r7, #8] + 80056e0: 2348 movs r3, #72 @ 0x48 + 80056e2: 727b strb r3, [r7, #9] + 80056e4: 237a movs r3, #122 @ 0x7a + 80056e6: 72bb strb r3, [r7, #10] + 80056e8: 23cc movs r3, #204 @ 0xcc + 80056ea: 72fb strb r3, [r7, #11] + 80056ec: 2340 movs r3, #64 @ 0x40 + 80056ee: 733b strb r3, [r7, #12] + 80056f0: 23fe movs r3, #254 @ 0xfe + 80056f2: 737b strb r3, [r7, #13] + 80056f4: 2300 movs r3, #0 + 80056f6: 73bb strb r3, [r7, #14] + 80056f8: 2300 movs r3, #0 + 80056fa: 73fb strb r3, [r7, #15] + aci_gatt_add_service(UUID_TYPE_128, + 80056fc: 4639 mov r1, r7 + 80056fe: 4b39 ldr r3, [pc, #228] @ (80057e4 ) + 8005700: 9300 str r3, [sp, #0] + 8005702: 2306 movs r3, #6 + 8005704: 2201 movs r2, #1 + 8005706: 2002 movs r0, #2 + 8005708: f7ff fa12 bl 8004b30 + &(aPeerToPeerContext.PeerToPeerSvcHdle)); + + /** + * Add LED Characteristic + */ + COPY_P2P_WRITE_CHAR_UUID(uuid16.Char_UUID_128); + 800570c: 2319 movs r3, #25 + 800570e: 703b strb r3, [r7, #0] + 8005710: 23ed movs r3, #237 @ 0xed + 8005712: 707b strb r3, [r7, #1] + 8005714: 2382 movs r3, #130 @ 0x82 + 8005716: 70bb strb r3, [r7, #2] + 8005718: 23ae movs r3, #174 @ 0xae + 800571a: 70fb strb r3, [r7, #3] + 800571c: 23ed movs r3, #237 @ 0xed + 800571e: 713b strb r3, [r7, #4] + 8005720: 2321 movs r3, #33 @ 0x21 + 8005722: 717b strb r3, [r7, #5] + 8005724: 234c movs r3, #76 @ 0x4c + 8005726: 71bb strb r3, [r7, #6] + 8005728: 239d movs r3, #157 @ 0x9d + 800572a: 71fb strb r3, [r7, #7] + 800572c: 2341 movs r3, #65 @ 0x41 + 800572e: 723b strb r3, [r7, #8] + 8005730: 2345 movs r3, #69 @ 0x45 + 8005732: 727b strb r3, [r7, #9] + 8005734: 2322 movs r3, #34 @ 0x22 + 8005736: 72bb strb r3, [r7, #10] + 8005738: 238e movs r3, #142 @ 0x8e + 800573a: 72fb strb r3, [r7, #11] + 800573c: 2341 movs r3, #65 @ 0x41 + 800573e: 733b strb r3, [r7, #12] + 8005740: 23fe movs r3, #254 @ 0xfe + 8005742: 737b strb r3, [r7, #13] + 8005744: 2300 movs r3, #0 + 8005746: 73bb strb r3, [r7, #14] + 8005748: 2300 movs r3, #0 + 800574a: 73fb strb r3, [r7, #15] + aci_gatt_add_char(aPeerToPeerContext.PeerToPeerSvcHdle, + 800574c: 4b25 ldr r3, [pc, #148] @ (80057e4 ) + 800574e: 8818 ldrh r0, [r3, #0] + 8005750: 463a mov r2, r7 + 8005752: 4b25 ldr r3, [pc, #148] @ (80057e8 ) + 8005754: 9305 str r3, [sp, #20] + 8005756: 2301 movs r3, #1 + 8005758: 9304 str r3, [sp, #16] + 800575a: 230a movs r3, #10 + 800575c: 9303 str r3, [sp, #12] + 800575e: 2301 movs r3, #1 + 8005760: 9302 str r3, [sp, #8] + 8005762: 2300 movs r3, #0 + 8005764: 9301 str r3, [sp, #4] + 8005766: 2306 movs r3, #6 + 8005768: 9300 str r3, [sp, #0] + 800576a: 2302 movs r3, #2 + 800576c: 2102 movs r1, #2 + 800576e: f7ff fab5 bl 8004cdc + &(aPeerToPeerContext.P2PWriteClientToServerCharHdle)); + + /** + * Add Button Characteristic + */ + COPY_P2P_NOTIFY_UUID(uuid16.Char_UUID_128); + 8005772: 2319 movs r3, #25 + 8005774: 703b strb r3, [r7, #0] + 8005776: 23ed movs r3, #237 @ 0xed + 8005778: 707b strb r3, [r7, #1] + 800577a: 2382 movs r3, #130 @ 0x82 + 800577c: 70bb strb r3, [r7, #2] + 800577e: 23ae movs r3, #174 @ 0xae + 8005780: 70fb strb r3, [r7, #3] + 8005782: 23ed movs r3, #237 @ 0xed + 8005784: 713b strb r3, [r7, #4] + 8005786: 2321 movs r3, #33 @ 0x21 + 8005788: 717b strb r3, [r7, #5] + 800578a: 234c movs r3, #76 @ 0x4c + 800578c: 71bb strb r3, [r7, #6] + 800578e: 239d movs r3, #157 @ 0x9d + 8005790: 71fb strb r3, [r7, #7] + 8005792: 2341 movs r3, #65 @ 0x41 + 8005794: 723b strb r3, [r7, #8] + 8005796: 2345 movs r3, #69 @ 0x45 + 8005798: 727b strb r3, [r7, #9] + 800579a: 2322 movs r3, #34 @ 0x22 + 800579c: 72bb strb r3, [r7, #10] + 800579e: 238e movs r3, #142 @ 0x8e + 80057a0: 72fb strb r3, [r7, #11] + 80057a2: 2342 movs r3, #66 @ 0x42 + 80057a4: 733b strb r3, [r7, #12] + 80057a6: 23fe movs r3, #254 @ 0xfe + 80057a8: 737b strb r3, [r7, #13] + 80057aa: 2300 movs r3, #0 + 80057ac: 73bb strb r3, [r7, #14] + 80057ae: 2300 movs r3, #0 + 80057b0: 73fb strb r3, [r7, #15] + aci_gatt_add_char(aPeerToPeerContext.PeerToPeerSvcHdle, + 80057b2: 4b0c ldr r3, [pc, #48] @ (80057e4 ) + 80057b4: 8818 ldrh r0, [r3, #0] + 80057b6: 463a mov r2, r7 + 80057b8: 4b0c ldr r3, [pc, #48] @ (80057ec ) + 80057ba: 9305 str r3, [sp, #20] + 80057bc: 2301 movs r3, #1 + 80057be: 9304 str r3, [sp, #16] + 80057c0: 230a movs r3, #10 + 80057c2: 9303 str r3, [sp, #12] + 80057c4: 2301 movs r3, #1 + 80057c6: 9302 str r3, [sp, #8] + 80057c8: 2300 movs r3, #0 + 80057ca: 9301 str r3, [sp, #4] + 80057cc: 2310 movs r3, #16 + 80057ce: 9300 str r3, [sp, #0] + 80057d0: 2302 movs r3, #2 + 80057d2: 2102 movs r1, #2 + 80057d4: f7ff fa82 bl 8004cdc + 0, + &(aPeerToPeerContext.RebootReqCharHdle)); +#endif + + + return; + 80057d8: bf00 nop +} + 80057da: 3710 adds r7, #16 + 80057dc: 46bd mov sp, r7 + 80057de: bd80 pop {r7, pc} + 80057e0: 080055e9 .word 0x080055e9 + 80057e4: 2000002c .word 0x2000002c + 80057e8: 2000002e .word 0x2000002e + 80057ec: 20000030 .word 0x20000030 + +080057f0 : +/* Private functions ----------------------------------------------------------*/ +/* Weak functions ----------------------------------------------------------*/ +void BVOPUS_STM_Init(void); + +__WEAK void BAS_Init( void ) +{ + 80057f0: b480 push {r7} + 80057f2: af00 add r7, sp, #0 + return; + 80057f4: bf00 nop +} + 80057f6: 46bd mov sp, r7 + 80057f8: f85d 7b04 ldr.w r7, [sp], #4 + 80057fc: 4770 bx lr + +080057fe : + +__WEAK void BLS_Init( void ) +{ + 80057fe: b480 push {r7} + 8005800: af00 add r7, sp, #0 + return; + 8005802: bf00 nop +} + 8005804: 46bd mov sp, r7 + 8005806: f85d 7b04 ldr.w r7, [sp], #4 + 800580a: 4770 bx lr + +0800580c : +__WEAK void CRS_STM_Init( void ) +{ + 800580c: b480 push {r7} + 800580e: af00 add r7, sp, #0 + return; + 8005810: bf00 nop +} + 8005812: 46bd mov sp, r7 + 8005814: f85d 7b04 ldr.w r7, [sp], #4 + 8005818: 4770 bx lr + +0800581a : +__WEAK void DIS_Init( void ) +{ + 800581a: b480 push {r7} + 800581c: af00 add r7, sp, #0 + return; + 800581e: bf00 nop +} + 8005820: 46bd mov sp, r7 + 8005822: f85d 7b04 ldr.w r7, [sp], #4 + 8005826: 4770 bx lr + +08005828 : +__WEAK void EDS_STM_Init( void ) +{ + 8005828: b480 push {r7} + 800582a: af00 add r7, sp, #0 + return; + 800582c: bf00 nop +} + 800582e: 46bd mov sp, r7 + 8005830: f85d 7b04 ldr.w r7, [sp], #4 + 8005834: 4770 bx lr + +08005836 : +__WEAK void HIDS_Init( void ) +{ + 8005836: b480 push {r7} + 8005838: af00 add r7, sp, #0 + return; + 800583a: bf00 nop +} + 800583c: 46bd mov sp, r7 + 800583e: f85d 7b04 ldr.w r7, [sp], #4 + 8005842: 4770 bx lr + +08005844 : +__WEAK void HRS_Init( void ) +{ + 8005844: b480 push {r7} + 8005846: af00 add r7, sp, #0 + return; + 8005848: bf00 nop +} + 800584a: 46bd mov sp, r7 + 800584c: f85d 7b04 ldr.w r7, [sp], #4 + 8005850: 4770 bx lr + +08005852 : +__WEAK void HTS_Init( void ) +{ + 8005852: b480 push {r7} + 8005854: af00 add r7, sp, #0 + return; + 8005856: bf00 nop +} + 8005858: 46bd mov sp, r7 + 800585a: f85d 7b04 ldr.w r7, [sp], #4 + 800585e: 4770 bx lr + +08005860 : +__WEAK void IAS_Init( void ) +{ + 8005860: b480 push {r7} + 8005862: af00 add r7, sp, #0 + return; + 8005864: bf00 nop +} + 8005866: 46bd mov sp, r7 + 8005868: f85d 7b04 ldr.w r7, [sp], #4 + 800586c: 4770 bx lr + +0800586e : +__WEAK void LLS_Init( void ) +{ + 800586e: b480 push {r7} + 8005870: af00 add r7, sp, #0 + return; + 8005872: bf00 nop +} + 8005874: 46bd mov sp, r7 + 8005876: f85d 7b04 ldr.w r7, [sp], #4 + 800587a: 4770 bx lr + +0800587c : +__WEAK void TPS_Init( void ) +{ + 800587c: b480 push {r7} + 800587e: af00 add r7, sp, #0 + return; + 8005880: bf00 nop +} + 8005882: 46bd mov sp, r7 + 8005884: f85d 7b04 ldr.w r7, [sp], #4 + 8005888: 4770 bx lr + +0800588a : +__WEAK void MOTENV_STM_Init( void ) +{ + 800588a: b480 push {r7} + 800588c: af00 add r7, sp, #0 + return; + 800588e: bf00 nop +} + 8005890: 46bd mov sp, r7 + 8005892: f85d 7b04 ldr.w r7, [sp], #4 + 8005896: 4770 bx lr + +08005898 : +__WEAK void P2PS_STM_Init( void ) +{ + return; +} +__WEAK void ZDD_STM_Init( void ) +{ + 8005898: b480 push {r7} + 800589a: af00 add r7, sp, #0 + return; + 800589c: bf00 nop +} + 800589e: 46bd mov sp, r7 + 80058a0: f85d 7b04 ldr.w r7, [sp], #4 + 80058a4: 4770 bx lr + +080058a6 : +__WEAK void OTAS_STM_Init( void ) +{ + 80058a6: b480 push {r7} + 80058a8: af00 add r7, sp, #0 + return; + 80058aa: bf00 nop +} + 80058ac: 46bd mov sp, r7 + 80058ae: f85d 7b04 ldr.w r7, [sp], #4 + 80058b2: 4770 bx lr + +080058b4 : +__WEAK void MESH_Init( void ) +{ + 80058b4: b480 push {r7} + 80058b6: af00 add r7, sp, #0 + return; + 80058b8: bf00 nop +} + 80058ba: 46bd mov sp, r7 + 80058bc: f85d 7b04 ldr.w r7, [sp], #4 + 80058c0: 4770 bx lr + +080058c2 : +__WEAK void BVOPUS_STM_Init( void ) +{ + 80058c2: b480 push {r7} + 80058c4: af00 add r7, sp, #0 + return; + 80058c6: bf00 nop +} + 80058c8: 46bd mov sp, r7 + 80058ca: f85d 7b04 ldr.w r7, [sp], #4 + 80058ce: 4770 bx lr + +080058d0 : +__WEAK void SVCCTL_InitCustomSvc( void ) +{ + 80058d0: b480 push {r7} + 80058d2: af00 add r7, sp, #0 + return; + 80058d4: bf00 nop +} + 80058d6: 46bd mov sp, r7 + 80058d8: f85d 7b04 ldr.w r7, [sp], #4 + 80058dc: 4770 bx lr + ... + +080058e0 : + +/* Functions Definition ------------------------------------------------------*/ + +void SVCCTL_Init( void ) +{ + 80058e0: b580 push {r7, lr} + 80058e2: af00 add r7, sp, #0 + + /** + * Initialize the number of registered Handler + */ + SVCCTL_EvtHandler.NbreOfRegisteredHandler = 0; + 80058e4: 4b04 ldr r3, [pc, #16] @ (80058f8 ) + 80058e6: 2200 movs r2, #0 + 80058e8: 771a strb r2, [r3, #28] + SVCCTL_CltHandler.NbreOfRegisteredHandler = 0; + 80058ea: 4b04 ldr r3, [pc, #16] @ (80058fc ) + 80058ec: 2200 movs r2, #0 + 80058ee: 701a strb r2, [r3, #0] + + /** + * Add and Initialize requested services + */ + SVCCTL_SvcInit(); + 80058f0: f000 f806 bl 8005900 + + return; + 80058f4: bf00 nop +} + 80058f6: bd80 pop {r7, pc} + 80058f8: 20000034 .word 0x20000034 + 80058fc: 20000054 .word 0x20000054 + +08005900 : + +__WEAK void SVCCTL_SvcInit(void) +{ + 8005900: b580 push {r7, lr} + 8005902: af00 add r7, sp, #0 + BAS_Init(); + 8005904: f7ff ff74 bl 80057f0 + + BLS_Init(); + 8005908: f7ff ff79 bl 80057fe + + CRS_STM_Init(); + 800590c: f7ff ff7e bl 800580c + + DIS_Init(); + 8005910: f7ff ff83 bl 800581a + + EDS_STM_Init(); + 8005914: f7ff ff88 bl 8005828 + + HIDS_Init(); + 8005918: f7ff ff8d bl 8005836 + + HRS_Init(); + 800591c: f7ff ff92 bl 8005844 + + HTS_Init(); + 8005920: f7ff ff97 bl 8005852 + + IAS_Init(); + 8005924: f7ff ff9c bl 8005860 + + LLS_Init(); + 8005928: f7ff ffa1 bl 800586e + + TPS_Init(); + 800592c: f7ff ffa6 bl 800587c + + MOTENV_STM_Init(); + 8005930: f7ff ffab bl 800588a + + P2PS_STM_Init(); + 8005934: f7ff febc bl 80056b0 + + ZDD_STM_Init(); + 8005938: f7ff ffae bl 8005898 + + OTAS_STM_Init(); + 800593c: f7ff ffb3 bl 80058a6 + + BVOPUS_STM_Init(); + 8005940: f7ff ffbf bl 80058c2 + + MESH_Init(); + 8005944: f7ff ffb6 bl 80058b4 + + SVCCTL_InitCustomSvc(); + 8005948: f7ff ffc2 bl 80058d0 + + return; + 800594c: bf00 nop +} + 800594e: bd80 pop {r7, pc} + +08005950 : + * @brief BLE Controller initialization + * @param None + * @retval None + */ +void SVCCTL_RegisterSvcHandler( SVC_CTL_p_EvtHandler_t pfBLE_SVC_Service_Event_Handler ) +{ + 8005950: b480 push {r7} + 8005952: b083 sub sp, #12 + 8005954: af00 add r7, sp, #0 + 8005956: 6078 str r0, [r7, #4] +#if (BLE_CFG_SVC_MAX_NBR_CB > 0) + SVCCTL_EvtHandler.SVCCTL__SvcHandlerTab[SVCCTL_EvtHandler.NbreOfRegisteredHandler] = pfBLE_SVC_Service_Event_Handler; + 8005958: 4b09 ldr r3, [pc, #36] @ (8005980 ) + 800595a: 7f1b ldrb r3, [r3, #28] + 800595c: 4619 mov r1, r3 + 800595e: 4a08 ldr r2, [pc, #32] @ (8005980 ) + 8005960: 687b ldr r3, [r7, #4] + 8005962: f842 3021 str.w r3, [r2, r1, lsl #2] + SVCCTL_EvtHandler.NbreOfRegisteredHandler++; + 8005966: 4b06 ldr r3, [pc, #24] @ (8005980 ) + 8005968: 7f1b ldrb r3, [r3, #28] + 800596a: 3301 adds r3, #1 + 800596c: b2da uxtb r2, r3 + 800596e: 4b04 ldr r3, [pc, #16] @ (8005980 ) + 8005970: 771a strb r2, [r3, #28] +#else + (void)(pfBLE_SVC_Service_Event_Handler); +#endif + + return; + 8005972: bf00 nop +} + 8005974: 370c adds r7, #12 + 8005976: 46bd mov sp, r7 + 8005978: f85d 7b04 ldr.w r7, [sp], #4 + 800597c: 4770 bx lr + 800597e: bf00 nop + 8005980: 20000034 .word 0x20000034 + +08005984 : + + return; +} + +__WEAK SVCCTL_UserEvtFlowStatus_t SVCCTL_UserEvtRx( void *pckt ) +{ + 8005984: b580 push {r7, lr} + 8005986: b086 sub sp, #24 + 8005988: af00 add r7, sp, #0 + 800598a: 6078 str r0, [r7, #4] + evt_blecore_aci *blecore_evt; + SVCCTL_EvtAckStatus_t event_notification_status; + SVCCTL_UserEvtFlowStatus_t return_status; + uint8_t index; + + event_pckt = (hci_event_pckt*) ((hci_uart_pckt *) pckt)->data; + 800598c: 687b ldr r3, [r7, #4] + 800598e: 3301 adds r3, #1 + 8005990: 613b str r3, [r7, #16] + event_notification_status = SVCCTL_EvtNotAck; + 8005992: 2300 movs r3, #0 + 8005994: 75fb strb r3, [r7, #23] + + switch (event_pckt->evt) + 8005996: 693b ldr r3, [r7, #16] + 8005998: 781b ldrb r3, [r3, #0] + 800599a: 2bff cmp r3, #255 @ 0xff + 800599c: d125 bne.n 80059ea + { + case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE: + { + blecore_evt = (evt_blecore_aci*) event_pckt->data; + 800599e: 693b ldr r3, [r7, #16] + 80059a0: 3302 adds r3, #2 + 80059a2: 60fb str r3, [r7, #12] + + switch ((blecore_evt->ecode) & SVCCTL_EGID_EVT_MASK) + 80059a4: 68fb ldr r3, [r7, #12] + 80059a6: 881b ldrh r3, [r3, #0] + 80059a8: b29b uxth r3, r3 + 80059aa: f403 437f and.w r3, r3, #65280 @ 0xff00 + 80059ae: f5b3 6f40 cmp.w r3, #3072 @ 0xc00 + 80059b2: d118 bne.n 80059e6 + { + case SVCCTL_GATT_EVT_TYPE: +#if (BLE_CFG_SVC_MAX_NBR_CB > 0) + /* For Service event handler */ + for (index = 0; index < SVCCTL_EvtHandler.NbreOfRegisteredHandler; index++) + 80059b4: 2300 movs r3, #0 + 80059b6: 757b strb r3, [r7, #21] + 80059b8: e00d b.n 80059d6 + { + event_notification_status = SVCCTL_EvtHandler.SVCCTL__SvcHandlerTab[index](pckt); + 80059ba: 7d7b ldrb r3, [r7, #21] + 80059bc: 4a1a ldr r2, [pc, #104] @ (8005a28 ) + 80059be: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80059c2: 6878 ldr r0, [r7, #4] + 80059c4: 4798 blx r3 + 80059c6: 4603 mov r3, r0 + 80059c8: 75fb strb r3, [r7, #23] + /** + * When a GATT event has been acknowledged by a Service, there is no need to call the other registered handlers + * a GATT event is relevant for only one Service + */ + if (event_notification_status != SVCCTL_EvtNotAck) + 80059ca: 7dfb ldrb r3, [r7, #23] + 80059cc: 2b00 cmp r3, #0 + 80059ce: d108 bne.n 80059e2 + for (index = 0; index < SVCCTL_EvtHandler.NbreOfRegisteredHandler; index++) + 80059d0: 7d7b ldrb r3, [r7, #21] + 80059d2: 3301 adds r3, #1 + 80059d4: 757b strb r3, [r7, #21] + 80059d6: 4b14 ldr r3, [pc, #80] @ (8005a28 ) + 80059d8: 7f1b ldrb r3, [r3, #28] + 80059da: 7d7a ldrb r2, [r7, #21] + 80059dc: 429a cmp r2, r3 + 80059de: d3ec bcc.n 80059ba + */ + break; + } + } +#endif + break; + 80059e0: e002 b.n 80059e8 + break; + 80059e2: bf00 nop + break; + 80059e4: e000 b.n 80059e8 + + default: + break; + 80059e6: bf00 nop + } + } + break; /* HCI_HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE_SPECIFIC */ + 80059e8: e000 b.n 80059ec + + default: + break; + 80059ea: bf00 nop + + /** + * When no registered handlers (either Service or Client) has acknowledged the GATT event, it is reported to the application + * a GAP event is always reported to the application. + */ + switch (event_notification_status) + 80059ec: 7dfb ldrb r3, [r7, #23] + 80059ee: 2b02 cmp r3, #2 + 80059f0: d00f beq.n 8005a12 + 80059f2: 2b02 cmp r3, #2 + 80059f4: dc10 bgt.n 8005a18 + 80059f6: 2b00 cmp r3, #0 + 80059f8: d002 beq.n 8005a00 + 80059fa: 2b01 cmp r3, #1 + 80059fc: d006 beq.n 8005a0c + 80059fe: e00b b.n 8005a18 + case SVCCTL_EvtNotAck: + /** + * The event has NOT been managed. + * It shall be passed to the application for processing + */ + return_status = SVCCTL_App_Notification(pckt); + 8005a00: 6878 ldr r0, [r7, #4] + 8005a02: f000 ffb1 bl 8006968 + 8005a06: 4603 mov r3, r0 + 8005a08: 75bb strb r3, [r7, #22] + break; + 8005a0a: e008 b.n 8005a1e + + case SVCCTL_EvtAckFlowEnable: + return_status = SVCCTL_UserEvtFlowEnable; + 8005a0c: 2301 movs r3, #1 + 8005a0e: 75bb strb r3, [r7, #22] + break; + 8005a10: e005 b.n 8005a1e + + case SVCCTL_EvtAckFlowDisable: + return_status = SVCCTL_UserEvtFlowDisable; + 8005a12: 2300 movs r3, #0 + 8005a14: 75bb strb r3, [r7, #22] + break; + 8005a16: e002 b.n 8005a1e + + default: + return_status = SVCCTL_UserEvtFlowEnable; + 8005a18: 2301 movs r3, #1 + 8005a1a: 75bb strb r3, [r7, #22] + break; + 8005a1c: bf00 nop + } + + return (return_status); + 8005a1e: 7dbb ldrb r3, [r7, #22] +} + 8005a20: 4618 mov r0, r3 + 8005a22: 3718 adds r7, #24 + 8005a24: 46bd mov sp, r7 + 8005a26: bd80 pop {r7, pc} + 8005a28: 20000034 .word 0x20000034 + +08005a2c : + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_BLE_Init( SHCI_C2_Ble_Init_Cmd_Packet_t *pCmdPacket ) +{ + 8005a2c: b580 push {r7, lr} + 8005a2e: b088 sub sp, #32 + 8005a30: af00 add r7, sp, #0 + 8005a32: 6078 str r0, [r7, #4] + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + 8005a34: f107 030c add.w r3, r7, #12 + 8005a38: 61fb str r3, [r7, #28] + + shci_send( SHCI_OPCODE_C2_BLE_INIT, + sizeof( SHCI_C2_Ble_Init_Cmd_Param_t ), + (uint8_t*)&pCmdPacket->Param, + 8005a3a: 687b ldr r3, [r7, #4] + 8005a3c: f103 020c add.w r2, r3, #12 + shci_send( SHCI_OPCODE_C2_BLE_INIT, + 8005a40: 69fb ldr r3, [r7, #28] + 8005a42: 212f movs r1, #47 @ 0x2f + 8005a44: f64f 4066 movw r0, #64614 @ 0xfc66 + 8005a48: f000 fae8 bl 800601c + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); + 8005a4c: 69fb ldr r3, [r7, #28] + 8005a4e: 330b adds r3, #11 + 8005a50: 78db ldrb r3, [r3, #3] +} + 8005a52: 4618 mov r0, r3 + 8005a54: 3720 adds r7, #32 + 8005a56: 46bd mov sp, r7 + 8005a58: bd80 pop {r7, pc} + +08005a5a : + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_DEBUG_Init( SHCI_C2_DEBUG_Init_Cmd_Packet_t *pCmdPacket ) +{ + 8005a5a: b580 push {r7, lr} + 8005a5c: b088 sub sp, #32 + 8005a5e: af00 add r7, sp, #0 + 8005a60: 6078 str r0, [r7, #4] + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + 8005a62: f107 030c add.w r3, r7, #12 + 8005a66: 61fb str r3, [r7, #28] + + shci_send( SHCI_OPCODE_C2_DEBUG_INIT, + sizeof( SHCI_C2_DEBUG_init_Cmd_Param_t ), + (uint8_t*)&pCmdPacket->Param, + 8005a68: 687b ldr r3, [r7, #4] + 8005a6a: f103 020c add.w r2, r3, #12 + shci_send( SHCI_OPCODE_C2_DEBUG_INIT, + 8005a6e: 69fb ldr r3, [r7, #28] + 8005a70: 210f movs r1, #15 + 8005a72: f64f 4068 movw r0, #64616 @ 0xfc68 + 8005a76: f000 fad1 bl 800601c + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); + 8005a7a: 69fb ldr r3, [r7, #28] + 8005a7c: 330b adds r3, #11 + 8005a7e: 78db ldrb r3, [r3, #3] +} + 8005a80: 4618 mov r0, r3 + 8005a82: 3720 adds r7, #32 + 8005a84: 46bd mov sp, r7 + 8005a86: bd80 pop {r7, pc} + +08005a88 : + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_Config(SHCI_C2_CONFIG_Cmd_Param_t *pCmdPacket) +{ + 8005a88: b580 push {r7, lr} + 8005a8a: b088 sub sp, #32 + 8005a8c: af00 add r7, sp, #0 + 8005a8e: 6078 str r0, [r7, #4] + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + 8005a90: f107 030c add.w r3, r7, #12 + 8005a94: 61fb str r3, [r7, #28] + + shci_send( SHCI_OPCODE_C2_CONFIG, + 8005a96: 69fb ldr r3, [r7, #28] + 8005a98: 687a ldr r2, [r7, #4] + 8005a9a: 2110 movs r1, #16 + 8005a9c: f64f 4075 movw r0, #64629 @ 0xfc75 + 8005aa0: f000 fabc bl 800601c + sizeof(SHCI_C2_CONFIG_Cmd_Param_t), + (uint8_t*)pCmdPacket, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); + 8005aa4: 69fb ldr r3, [r7, #28] + 8005aa6: 330b adds r3, #11 + 8005aa8: 78db ldrb r3, [r3, #3] +} + 8005aaa: 4618 mov r0, r3 + 8005aac: 3720 adds r7, #32 + 8005aae: 46bd mov sp, r7 + 8005ab0: bd80 pop {r7, pc} + ... + +08005ab4 : + * Local System COMMAND + * These commands are NOT sent to the CPU2 + */ + +SHCI_CmdStatus_t SHCI_GetWirelessFwInfo( WirelessFwInfo_t* pWirelessInfo ) +{ + 8005ab4: b480 push {r7} + 8005ab6: b08b sub sp, #44 @ 0x2c + 8005ab8: af00 add r7, sp, #0 + 8005aba: 6078 str r0, [r7, #4] + uint32_t ipccdba = 0; + 8005abc: 2300 movs r3, #0 + 8005abe: 613b str r3, [r7, #16] + MB_RefTable_t * p_RefTable = NULL; + 8005ac0: 2300 movs r3, #0 + 8005ac2: 60fb str r3, [r7, #12] + uint32_t wireless_firmware_version = 0; + 8005ac4: 2300 movs r3, #0 + 8005ac6: 627b str r3, [r7, #36] @ 0x24 + uint32_t wireless_firmware_memorySize = 0; + 8005ac8: 2300 movs r3, #0 + 8005aca: 623b str r3, [r7, #32] + uint32_t wireless_firmware_infoStack = 0; + 8005acc: 2300 movs r3, #0 + 8005ace: 61fb str r3, [r7, #28] + MB_FUS_DeviceInfoTable_t * p_fus_device_info_table = NULL; + 8005ad0: 2300 movs r3, #0 + 8005ad2: 60bb str r3, [r7, #8] + uint32_t fus_version = 0; + 8005ad4: 2300 movs r3, #0 + 8005ad6: 61bb str r3, [r7, #24] + uint32_t fus_memorySize = 0; + 8005ad8: 2300 movs r3, #0 + 8005ada: 617b str r3, [r7, #20] + + ipccdba = READ_BIT( FLASH->IPCCBR, FLASH_IPCCBR_IPCCDBA ); + 8005adc: 4b4a ldr r3, [pc, #296] @ (8005c08 ) + 8005ade: 6bdb ldr r3, [r3, #60] @ 0x3c + 8005ae0: f3c3 030d ubfx r3, r3, #0, #14 + 8005ae4: 613b str r3, [r7, #16] + /** + * The Device Info Table mapping depends on which firmware is running on CPU2. + * If the FUS is running on CPU2, FUS_DEVICE_INFO_TABLE_VALIDITY_KEYWORD shall be written in the table. + * Otherwise, it means the Wireless Firmware is running on the CPU2 + */ + p_fus_device_info_table = (MB_FUS_DeviceInfoTable_t*)(*(uint32_t*)((ipccdba<<2) + SRAM2A_BASE)); + 8005ae6: 693b ldr r3, [r7, #16] + 8005ae8: 009b lsls r3, r3, #2 + 8005aea: f103 5300 add.w r3, r3, #536870912 @ 0x20000000 + 8005aee: f503 3340 add.w r3, r3, #196608 @ 0x30000 + 8005af2: 681b ldr r3, [r3, #0] + 8005af4: 60bb str r3, [r7, #8] + + if(p_fus_device_info_table->DeviceInfoTableState == FUS_DEVICE_INFO_TABLE_VALIDITY_KEYWORD) + 8005af6: 68bb ldr r3, [r7, #8] + 8005af8: 681b ldr r3, [r3, #0] + 8005afa: 4a44 ldr r2, [pc, #272] @ (8005c0c ) + 8005afc: 4293 cmp r3, r2 + 8005afe: d10f bne.n 8005b20 + /* The FUS is running on CPU2 */ + /** + * Retrieve the WirelessFwInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + wireless_firmware_version = p_fus_device_info_table->WirelessStackVersion; + 8005b00: 68bb ldr r3, [r7, #8] + 8005b02: 695b ldr r3, [r3, #20] + 8005b04: 627b str r3, [r7, #36] @ 0x24 + wireless_firmware_memorySize = p_fus_device_info_table->WirelessStackMemorySize; + 8005b06: 68bb ldr r3, [r7, #8] + 8005b08: 699b ldr r3, [r3, #24] + 8005b0a: 623b str r3, [r7, #32] + wireless_firmware_infoStack = p_fus_device_info_table->WirelessFirmwareBleInfo; + 8005b0c: 68bb ldr r3, [r7, #8] + 8005b0e: 69db ldr r3, [r3, #28] + 8005b10: 61fb str r3, [r7, #28] + + /** + * Retrieve the FusInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + fus_version = p_fus_device_info_table->FusVersion; + 8005b12: 68bb ldr r3, [r7, #8] + 8005b14: 68db ldr r3, [r3, #12] + 8005b16: 61bb str r3, [r7, #24] + fus_memorySize = p_fus_device_info_table->FusMemorySize; + 8005b18: 68bb ldr r3, [r7, #8] + 8005b1a: 691b ldr r3, [r3, #16] + 8005b1c: 617b str r3, [r7, #20] + 8005b1e: e01a b.n 8005b56 + } + else + { + /* The Wireless Firmware is running on CPU2 */ + p_RefTable = (MB_RefTable_t*)((ipccdba<<2) + SRAM2A_BASE); + 8005b20: 693b ldr r3, [r7, #16] + 8005b22: 009b lsls r3, r3, #2 + 8005b24: f103 5300 add.w r3, r3, #536870912 @ 0x20000000 + 8005b28: f503 3340 add.w r3, r3, #196608 @ 0x30000 + 8005b2c: 60fb str r3, [r7, #12] + + /** + * Retrieve the WirelessFwInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + wireless_firmware_version = p_RefTable->p_device_info_table->WirelessFwInfoTable.Version; + 8005b2e: 68fb ldr r3, [r7, #12] + 8005b30: 681b ldr r3, [r3, #0] + 8005b32: 691b ldr r3, [r3, #16] + 8005b34: 627b str r3, [r7, #36] @ 0x24 + wireless_firmware_memorySize = p_RefTable->p_device_info_table->WirelessFwInfoTable.MemorySize; + 8005b36: 68fb ldr r3, [r7, #12] + 8005b38: 681b ldr r3, [r3, #0] + 8005b3a: 695b ldr r3, [r3, #20] + 8005b3c: 623b str r3, [r7, #32] + wireless_firmware_infoStack = p_RefTable->p_device_info_table->WirelessFwInfoTable.InfoStack; + 8005b3e: 68fb ldr r3, [r7, #12] + 8005b40: 681b ldr r3, [r3, #0] + 8005b42: 699b ldr r3, [r3, #24] + 8005b44: 61fb str r3, [r7, #28] + + /** + * Retrieve the FusInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + fus_version = p_RefTable->p_device_info_table->FusInfoTable.Version; + 8005b46: 68fb ldr r3, [r7, #12] + 8005b48: 681b ldr r3, [r3, #0] + 8005b4a: 685b ldr r3, [r3, #4] + 8005b4c: 61bb str r3, [r7, #24] + fus_memorySize = p_RefTable->p_device_info_table->FusInfoTable.MemorySize; + 8005b4e: 68fb ldr r3, [r7, #12] + 8005b50: 681b ldr r3, [r3, #0] + 8005b52: 689b ldr r3, [r3, #8] + 8005b54: 617b str r3, [r7, #20] + + /** + * Retrieve the WirelessFwInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + pWirelessInfo->VersionMajor = ((wireless_firmware_version & INFO_VERSION_MAJOR_MASK) >> INFO_VERSION_MAJOR_OFFSET); + 8005b56: 6a7b ldr r3, [r7, #36] @ 0x24 + 8005b58: 0e1b lsrs r3, r3, #24 + 8005b5a: b2da uxtb r2, r3 + 8005b5c: 687b ldr r3, [r7, #4] + 8005b5e: 701a strb r2, [r3, #0] + pWirelessInfo->VersionMinor = ((wireless_firmware_version & INFO_VERSION_MINOR_MASK) >> INFO_VERSION_MINOR_OFFSET); + 8005b60: 6a7b ldr r3, [r7, #36] @ 0x24 + 8005b62: 0c1b lsrs r3, r3, #16 + 8005b64: b2da uxtb r2, r3 + 8005b66: 687b ldr r3, [r7, #4] + 8005b68: 705a strb r2, [r3, #1] + pWirelessInfo->VersionSub = ((wireless_firmware_version & INFO_VERSION_SUB_MASK) >> INFO_VERSION_SUB_OFFSET); + 8005b6a: 6a7b ldr r3, [r7, #36] @ 0x24 + 8005b6c: 0a1b lsrs r3, r3, #8 + 8005b6e: b2da uxtb r2, r3 + 8005b70: 687b ldr r3, [r7, #4] + 8005b72: 709a strb r2, [r3, #2] + pWirelessInfo->VersionBranch = ((wireless_firmware_version & INFO_VERSION_BRANCH_MASK) >> INFO_VERSION_BRANCH_OFFSET); + 8005b74: 6a7b ldr r3, [r7, #36] @ 0x24 + 8005b76: 091b lsrs r3, r3, #4 + 8005b78: b2db uxtb r3, r3 + 8005b7a: f003 030f and.w r3, r3, #15 + 8005b7e: b2da uxtb r2, r3 + 8005b80: 687b ldr r3, [r7, #4] + 8005b82: 70da strb r2, [r3, #3] + pWirelessInfo->VersionReleaseType = ((wireless_firmware_version & INFO_VERSION_TYPE_MASK) >> INFO_VERSION_TYPE_OFFSET); + 8005b84: 6a7b ldr r3, [r7, #36] @ 0x24 + 8005b86: b2db uxtb r3, r3 + 8005b88: f003 030f and.w r3, r3, #15 + 8005b8c: b2da uxtb r2, r3 + 8005b8e: 687b ldr r3, [r7, #4] + 8005b90: 711a strb r2, [r3, #4] + + pWirelessInfo->MemorySizeSram2B = ((wireless_firmware_memorySize & INFO_SIZE_SRAM2B_MASK) >> INFO_SIZE_SRAM2B_OFFSET); + 8005b92: 6a3b ldr r3, [r7, #32] + 8005b94: 0e1b lsrs r3, r3, #24 + 8005b96: b2da uxtb r2, r3 + 8005b98: 687b ldr r3, [r7, #4] + 8005b9a: 715a strb r2, [r3, #5] + pWirelessInfo->MemorySizeSram2A = ((wireless_firmware_memorySize & INFO_SIZE_SRAM2A_MASK) >> INFO_SIZE_SRAM2A_OFFSET); + 8005b9c: 6a3b ldr r3, [r7, #32] + 8005b9e: 0c1b lsrs r3, r3, #16 + 8005ba0: b2da uxtb r2, r3 + 8005ba2: 687b ldr r3, [r7, #4] + 8005ba4: 719a strb r2, [r3, #6] + pWirelessInfo->MemorySizeSram1 = ((wireless_firmware_memorySize & INFO_SIZE_SRAM1_MASK) >> INFO_SIZE_SRAM1_OFFSET); + 8005ba6: 6a3b ldr r3, [r7, #32] + 8005ba8: 0a1b lsrs r3, r3, #8 + 8005baa: b2da uxtb r2, r3 + 8005bac: 687b ldr r3, [r7, #4] + 8005bae: 71da strb r2, [r3, #7] + pWirelessInfo->MemorySizeFlash = ((wireless_firmware_memorySize & INFO_SIZE_FLASH_MASK) >> INFO_SIZE_FLASH_OFFSET); + 8005bb0: 6a3b ldr r3, [r7, #32] + 8005bb2: b2da uxtb r2, r3 + 8005bb4: 687b ldr r3, [r7, #4] + 8005bb6: 721a strb r2, [r3, #8] + + pWirelessInfo->StackType = ((wireless_firmware_infoStack & INFO_STACK_TYPE_MASK) >> INFO_STACK_TYPE_OFFSET); + 8005bb8: 69fb ldr r3, [r7, #28] + 8005bba: b2da uxtb r2, r3 + 8005bbc: 687b ldr r3, [r7, #4] + 8005bbe: 725a strb r2, [r3, #9] + + /** + * Retrieve the FusInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + pWirelessInfo->FusVersionMajor = ((fus_version & INFO_VERSION_MAJOR_MASK) >> INFO_VERSION_MAJOR_OFFSET); + 8005bc0: 69bb ldr r3, [r7, #24] + 8005bc2: 0e1b lsrs r3, r3, #24 + 8005bc4: b2da uxtb r2, r3 + 8005bc6: 687b ldr r3, [r7, #4] + 8005bc8: 729a strb r2, [r3, #10] + pWirelessInfo->FusVersionMinor = ((fus_version & INFO_VERSION_MINOR_MASK) >> INFO_VERSION_MINOR_OFFSET); + 8005bca: 69bb ldr r3, [r7, #24] + 8005bcc: 0c1b lsrs r3, r3, #16 + 8005bce: b2da uxtb r2, r3 + 8005bd0: 687b ldr r3, [r7, #4] + 8005bd2: 72da strb r2, [r3, #11] + pWirelessInfo->FusVersionSub = ((fus_version & INFO_VERSION_SUB_MASK) >> INFO_VERSION_SUB_OFFSET); + 8005bd4: 69bb ldr r3, [r7, #24] + 8005bd6: 0a1b lsrs r3, r3, #8 + 8005bd8: b2da uxtb r2, r3 + 8005bda: 687b ldr r3, [r7, #4] + 8005bdc: 731a strb r2, [r3, #12] + + pWirelessInfo->FusMemorySizeSram2B = ((fus_memorySize & INFO_SIZE_SRAM2B_MASK) >> INFO_SIZE_SRAM2B_OFFSET); + 8005bde: 697b ldr r3, [r7, #20] + 8005be0: 0e1b lsrs r3, r3, #24 + 8005be2: b2da uxtb r2, r3 + 8005be4: 687b ldr r3, [r7, #4] + 8005be6: 735a strb r2, [r3, #13] + pWirelessInfo->FusMemorySizeSram2A = ((fus_memorySize & INFO_SIZE_SRAM2A_MASK) >> INFO_SIZE_SRAM2A_OFFSET); + 8005be8: 697b ldr r3, [r7, #20] + 8005bea: 0c1b lsrs r3, r3, #16 + 8005bec: b2da uxtb r2, r3 + 8005bee: 687b ldr r3, [r7, #4] + 8005bf0: 739a strb r2, [r3, #14] + pWirelessInfo->FusMemorySizeFlash = ((fus_memorySize & INFO_SIZE_FLASH_MASK) >> INFO_SIZE_FLASH_OFFSET); + 8005bf2: 697b ldr r3, [r7, #20] + 8005bf4: b2da uxtb r2, r3 + 8005bf6: 687b ldr r3, [r7, #4] + 8005bf8: 73da strb r2, [r3, #15] + + return (SHCI_Success); + 8005bfa: 2300 movs r3, #0 +} + 8005bfc: 4618 mov r0, r3 + 8005bfe: 372c adds r7, #44 @ 0x2c + 8005c00: 46bd mov sp, r7 + 8005c02: f85d 7b04 ldr.w r7, [sp], #4 + 8005c06: 4770 bx lr + 8005c08: 58004000 .word 0x58004000 + 8005c0c: a94656b9 .word 0xa94656b9 + +08005c10 : +static void TlEvtReceived(TL_EvtPacket_t *hcievt); +static void TlInit( TL_CmdPacket_t * p_cmdbuffer ); + +/* Interface ------- ---------------------------------------------------------*/ +void hci_init(void(* UserEvtRx)(void* pData), void* pConf) +{ + 8005c10: b580 push {r7, lr} + 8005c12: b082 sub sp, #8 + 8005c14: af00 add r7, sp, #0 + 8005c16: 6078 str r0, [r7, #4] + 8005c18: 6039 str r1, [r7, #0] + StatusNotCallBackFunction = ((HCI_TL_HciInitConf_t *)pConf)->StatusNotCallBack; + 8005c1a: 683b ldr r3, [r7, #0] + 8005c1c: 685b ldr r3, [r3, #4] + 8005c1e: 4a08 ldr r2, [pc, #32] @ (8005c40 ) + 8005c20: 6013 str r3, [r2, #0] + hciContext.UserEvtRx = UserEvtRx; + 8005c22: 4a08 ldr r2, [pc, #32] @ (8005c44 ) + 8005c24: 687b ldr r3, [r7, #4] + 8005c26: 61d3 str r3, [r2, #28] + + hci_register_io_bus (&hciContext.io); + 8005c28: 4806 ldr r0, [pc, #24] @ (8005c44 ) + 8005c2a: f000 f979 bl 8005f20 + + TlInit((TL_CmdPacket_t *)(((HCI_TL_HciInitConf_t *)pConf)->p_cmdbuffer)); + 8005c2e: 683b ldr r3, [r7, #0] + 8005c30: 681b ldr r3, [r3, #0] + 8005c32: 4618 mov r0, r3 + 8005c34: f000 f8da bl 8005dec + + return; + 8005c38: bf00 nop +} + 8005c3a: 3708 adds r7, #8 + 8005c3c: 46bd mov sp, r7 + 8005c3e: bd80 pop {r7, pc} + 8005c40: 2000021c .word 0x2000021c + 8005c44: 200001f4 .word 0x200001f4 + +08005c48 : + +void hci_user_evt_proc(void) +{ + 8005c48: b580 push {r7, lr} + 8005c4a: b084 sub sp, #16 + 8005c4c: af00 add r7, sp, #0 + /** + * It is more secure to use LST_remove_head()/LST_insert_head() compare to LST_get_next_node()/LST_remove_node() + * in case the user overwrite the header where the next/prev pointers are located + */ + + if((LST_is_empty(&HciAsynchEventQueue) == FALSE) && (UserEventFlow != HCI_TL_UserEventFlow_Disable)) + 8005c4e: 4822 ldr r0, [pc, #136] @ (8005cd8 ) + 8005c50: f000 fd3e bl 80066d0 + 8005c54: 4603 mov r3, r0 + 8005c56: 2b00 cmp r3, #0 + 8005c58: d12b bne.n 8005cb2 + 8005c5a: 4b20 ldr r3, [pc, #128] @ (8005cdc ) + 8005c5c: 781b ldrb r3, [r3, #0] + 8005c5e: 2b00 cmp r3, #0 + 8005c60: d027 beq.n 8005cb2 + { + LST_remove_head ( &HciAsynchEventQueue, (tListNode **)&phcievtbuffer ); + 8005c62: f107 030c add.w r3, r7, #12 + 8005c66: 4619 mov r1, r3 + 8005c68: 481b ldr r0, [pc, #108] @ (8005cd8 ) + 8005c6a: f000 fdc0 bl 80067ee + + if (hciContext.UserEvtRx != NULL) + 8005c6e: 4b1c ldr r3, [pc, #112] @ (8005ce0 ) + 8005c70: 69db ldr r3, [r3, #28] + 8005c72: 2b00 cmp r3, #0 + 8005c74: d00c beq.n 8005c90 + { + UserEvtRxParam.pckt = phcievtbuffer; + 8005c76: 68fb ldr r3, [r7, #12] + 8005c78: 60bb str r3, [r7, #8] + UserEvtRxParam.status = HCI_TL_UserEventFlow_Enable; + 8005c7a: 2301 movs r3, #1 + 8005c7c: 713b strb r3, [r7, #4] + hciContext.UserEvtRx((void *)&UserEvtRxParam); + 8005c7e: 4b18 ldr r3, [pc, #96] @ (8005ce0 ) + 8005c80: 69db ldr r3, [r3, #28] + 8005c82: 1d3a adds r2, r7, #4 + 8005c84: 4610 mov r0, r2 + 8005c86: 4798 blx r3 + UserEventFlow = UserEvtRxParam.status; + 8005c88: 793a ldrb r2, [r7, #4] + 8005c8a: 4b14 ldr r3, [pc, #80] @ (8005cdc ) + 8005c8c: 701a strb r2, [r3, #0] + 8005c8e: e002 b.n 8005c96 + } + else + { + UserEventFlow = HCI_TL_UserEventFlow_Enable; + 8005c90: 4b12 ldr r3, [pc, #72] @ (8005cdc ) + 8005c92: 2201 movs r2, #1 + 8005c94: 701a strb r2, [r3, #0] + } + + if(UserEventFlow != HCI_TL_UserEventFlow_Disable) + 8005c96: 4b11 ldr r3, [pc, #68] @ (8005cdc ) + 8005c98: 781b ldrb r3, [r3, #0] + 8005c9a: 2b00 cmp r3, #0 + 8005c9c: d004 beq.n 8005ca8 + { + TL_MM_EvtDone( phcievtbuffer ); + 8005c9e: 68fb ldr r3, [r7, #12] + 8005ca0: 4618 mov r0, r3 + 8005ca2: f000 fc11 bl 80064c8 + 8005ca6: e004 b.n 8005cb2 + else + { + /** + * put back the event in the queue + */ + LST_insert_head ( &HciAsynchEventQueue, (tListNode *)phcievtbuffer ); + 8005ca8: 68fb ldr r3, [r7, #12] + 8005caa: 4619 mov r1, r3 + 8005cac: 480a ldr r0, [pc, #40] @ (8005cd8 ) + 8005cae: f000 fd31 bl 8006714 + } + } + + if((LST_is_empty(&HciAsynchEventQueue) == FALSE) && (UserEventFlow != HCI_TL_UserEventFlow_Disable)) + 8005cb2: 4809 ldr r0, [pc, #36] @ (8005cd8 ) + 8005cb4: f000 fd0c bl 80066d0 + 8005cb8: 4603 mov r3, r0 + 8005cba: 2b00 cmp r3, #0 + 8005cbc: d107 bne.n 8005cce + 8005cbe: 4b07 ldr r3, [pc, #28] @ (8005cdc ) + 8005cc0: 781b ldrb r3, [r3, #0] + 8005cc2: 2b00 cmp r3, #0 + 8005cc4: d003 beq.n 8005cce + { + hci_notify_asynch_evt((void*) &HciAsynchEventQueue); + 8005cc6: 4804 ldr r0, [pc, #16] @ (8005cd8 ) + 8005cc8: f001 f8c9 bl 8006e5e + } + + + return; + 8005ccc: bf00 nop + 8005cce: bf00 nop +} + 8005cd0: 3710 adds r7, #16 + 8005cd2: 46bd mov sp, r7 + 8005cd4: bd80 pop {r7, pc} + 8005cd6: bf00 nop + 8005cd8: 2000005c .word 0x2000005c + 8005cdc: 20000068 .word 0x20000068 + 8005ce0: 200001f4 .word 0x200001f4 + +08005ce4 : + + return; +} + +int hci_send_req(struct hci_request *p_cmd, uint8_t async) +{ + 8005ce4: b580 push {r7, lr} + 8005ce6: b088 sub sp, #32 + 8005ce8: af00 add r7, sp, #0 + 8005cea: 6078 str r0, [r7, #4] + 8005cec: 460b mov r3, r1 + 8005cee: 70fb strb r3, [r7, #3] + TL_CsEvt_t *pcommand_status_event; + TL_EvtPacket_t *pevtpacket; + uint8_t hci_cmd_complete_return_parameters_length; + HCI_TL_CmdStatus_t local_cmd_status; + + NotifyCmdStatus(HCI_TL_CmdBusy); + 8005cf0: 2000 movs r0, #0 + 8005cf2: f000 f8d1 bl 8005e98 + local_cmd_status = HCI_TL_CmdBusy; + 8005cf6: 2300 movs r3, #0 + 8005cf8: 77fb strb r3, [r7, #31] + opcode = ((p_cmd->ocf) & 0x03ff) | ((p_cmd->ogf) << 10); + 8005cfa: 687b ldr r3, [r7, #4] + 8005cfc: 885b ldrh r3, [r3, #2] + 8005cfe: b21b sxth r3, r3 + 8005d00: f3c3 0309 ubfx r3, r3, #0, #10 + 8005d04: b21a sxth r2, r3 + 8005d06: 687b ldr r3, [r7, #4] + 8005d08: 881b ldrh r3, [r3, #0] + 8005d0a: b21b sxth r3, r3 + 8005d0c: 029b lsls r3, r3, #10 + 8005d0e: b21b sxth r3, r3 + 8005d10: 4313 orrs r3, r2 + 8005d12: b21b sxth r3, r3 + 8005d14: 83bb strh r3, [r7, #28] + + CmdRspStatusFlag = HCI_TL_CMD_RESP_WAIT; + 8005d16: 4b33 ldr r3, [pc, #204] @ (8005de4 ) + 8005d18: 2201 movs r2, #1 + 8005d1a: 701a strb r2, [r3, #0] + SendCmd(opcode, p_cmd->clen, p_cmd->cparam); + 8005d1c: 687b ldr r3, [r7, #4] + 8005d1e: 68db ldr r3, [r3, #12] + 8005d20: b2d9 uxtb r1, r3 + 8005d22: 687b ldr r3, [r7, #4] + 8005d24: 689a ldr r2, [r3, #8] + 8005d26: 8bbb ldrh r3, [r7, #28] + 8005d28: 4618 mov r0, r3 + 8005d2a: f000 f88f bl 8005e4c + + while(local_cmd_status == HCI_TL_CmdBusy) + 8005d2e: e04e b.n 8005dce + { + hci_cmd_resp_wait(HCI_TL_DEFAULT_TIMEOUT); + 8005d30: f248 00e8 movw r0, #33000 @ 0x80e8 + 8005d34: f001 f8aa bl 8006e8c + + /** + * Process Cmd Event + */ + while(LST_is_empty(&HciCmdEventQueue) == FALSE) + 8005d38: e043 b.n 8005dc2 + { + LST_remove_head (&HciCmdEventQueue, (tListNode **)&pevtpacket); + 8005d3a: f107 030c add.w r3, r7, #12 + 8005d3e: 4619 mov r1, r3 + 8005d40: 4829 ldr r0, [pc, #164] @ (8005de8 ) + 8005d42: f000 fd54 bl 80067ee + + if(pevtpacket->evtserial.evt.evtcode == TL_BLEEVT_CS_OPCODE) + 8005d46: 68fb ldr r3, [r7, #12] + 8005d48: 7a5b ldrb r3, [r3, #9] + 8005d4a: 2b0f cmp r3, #15 + 8005d4c: d114 bne.n 8005d78 + { + pcommand_status_event = (TL_CsEvt_t*)pevtpacket->evtserial.evt.payload; + 8005d4e: 68fb ldr r3, [r7, #12] + 8005d50: 330b adds r3, #11 + 8005d52: 613b str r3, [r7, #16] + if(pcommand_status_event->cmdcode == opcode) + 8005d54: 693b ldr r3, [r7, #16] + 8005d56: 885b ldrh r3, [r3, #2] + 8005d58: b29b uxth r3, r3 + 8005d5a: 8bba ldrh r2, [r7, #28] + 8005d5c: 429a cmp r2, r3 + 8005d5e: d104 bne.n 8005d6a + { + *(uint8_t *)(p_cmd->rparam) = pcommand_status_event->status; + 8005d60: 687b ldr r3, [r7, #4] + 8005d62: 691b ldr r3, [r3, #16] + 8005d64: 693a ldr r2, [r7, #16] + 8005d66: 7812 ldrb r2, [r2, #0] + 8005d68: 701a strb r2, [r3, #0] + } + + if(pcommand_status_event->numcmd != 0) + 8005d6a: 693b ldr r3, [r7, #16] + 8005d6c: 785b ldrb r3, [r3, #1] + 8005d6e: 2b00 cmp r3, #0 + 8005d70: d027 beq.n 8005dc2 + { + local_cmd_status = HCI_TL_CmdAvailable; + 8005d72: 2301 movs r3, #1 + 8005d74: 77fb strb r3, [r7, #31] + 8005d76: e024 b.n 8005dc2 + } + } + else + { + pcommand_complete_event = (TL_CcEvt_t*)pevtpacket->evtserial.evt.payload; + 8005d78: 68fb ldr r3, [r7, #12] + 8005d7a: 330b adds r3, #11 + 8005d7c: 61bb str r3, [r7, #24] + + if(pcommand_complete_event->cmdcode == opcode) + 8005d7e: 69bb ldr r3, [r7, #24] + 8005d80: f8b3 3001 ldrh.w r3, [r3, #1] + 8005d84: b29b uxth r3, r3 + 8005d86: 8bba ldrh r2, [r7, #28] + 8005d88: 429a cmp r2, r3 + 8005d8a: d114 bne.n 8005db6 + { + hci_cmd_complete_return_parameters_length = pevtpacket->evtserial.evt.plen - TL_EVT_HDR_SIZE; + 8005d8c: 68fb ldr r3, [r7, #12] + 8005d8e: 7a9b ldrb r3, [r3, #10] + 8005d90: 3b03 subs r3, #3 + 8005d92: 75fb strb r3, [r7, #23] + p_cmd->rlen = MIN(hci_cmd_complete_return_parameters_length, p_cmd->rlen); + 8005d94: 687b ldr r3, [r7, #4] + 8005d96: 695a ldr r2, [r3, #20] + 8005d98: 7dfb ldrb r3, [r7, #23] + 8005d9a: 429a cmp r2, r3 + 8005d9c: bfa8 it ge + 8005d9e: 461a movge r2, r3 + 8005da0: 687b ldr r3, [r7, #4] + 8005da2: 615a str r2, [r3, #20] + memcpy(p_cmd->rparam, pcommand_complete_event->payload, p_cmd->rlen); + 8005da4: 687b ldr r3, [r7, #4] + 8005da6: 6918 ldr r0, [r3, #16] + 8005da8: 69bb ldr r3, [r7, #24] + 8005daa: 1cd9 adds r1, r3, #3 + 8005dac: 687b ldr r3, [r7, #4] + 8005dae: 695b ldr r3, [r3, #20] + 8005db0: 461a mov r2, r3 + 8005db2: f001 fee5 bl 8007b80 + } + + if(pcommand_complete_event->numcmd != 0) + 8005db6: 69bb ldr r3, [r7, #24] + 8005db8: 781b ldrb r3, [r3, #0] + 8005dba: 2b00 cmp r3, #0 + 8005dbc: d001 beq.n 8005dc2 + { + local_cmd_status = HCI_TL_CmdAvailable; + 8005dbe: 2301 movs r3, #1 + 8005dc0: 77fb strb r3, [r7, #31] + while(LST_is_empty(&HciCmdEventQueue) == FALSE) + 8005dc2: 4809 ldr r0, [pc, #36] @ (8005de8 ) + 8005dc4: f000 fc84 bl 80066d0 + 8005dc8: 4603 mov r3, r0 + 8005dca: 2b00 cmp r3, #0 + 8005dcc: d0b5 beq.n 8005d3a + while(local_cmd_status == HCI_TL_CmdBusy) + 8005dce: 7ffb ldrb r3, [r7, #31] + 8005dd0: 2b00 cmp r3, #0 + 8005dd2: d0ad beq.n 8005d30 + } + } + } + } + + NotifyCmdStatus(HCI_TL_CmdAvailable); + 8005dd4: 2001 movs r0, #1 + 8005dd6: f000 f85f bl 8005e98 + + return 0; + 8005dda: 2300 movs r3, #0 +} + 8005ddc: 4618 mov r0, r3 + 8005dde: 3720 adds r7, #32 + 8005de0: 46bd mov sp, r7 + 8005de2: bd80 pop {r7, pc} + 8005de4: 20000220 .word 0x20000220 + 8005de8: 20000214 .word 0x20000214 + +08005dec : + +/* Private functions ---------------------------------------------------------*/ +static void TlInit( TL_CmdPacket_t * p_cmdbuffer ) +{ + 8005dec: b580 push {r7, lr} + 8005dee: b086 sub sp, #24 + 8005df0: af00 add r7, sp, #0 + 8005df2: 6078 str r0, [r7, #4] + TL_BLE_InitConf_t Conf; + + /** + * Always initialize the command event queue + */ + LST_init_head (&HciCmdEventQueue); + 8005df4: 480f ldr r0, [pc, #60] @ (8005e34 ) + 8005df6: f000 fc5b bl 80066b0 + + pCmdBuffer = p_cmdbuffer; + 8005dfa: 4a0f ldr r2, [pc, #60] @ (8005e38 ) + 8005dfc: 687b ldr r3, [r7, #4] + 8005dfe: 6013 str r3, [r2, #0] + + LST_init_head (&HciAsynchEventQueue); + 8005e00: 480e ldr r0, [pc, #56] @ (8005e3c ) + 8005e02: f000 fc55 bl 80066b0 + + UserEventFlow = HCI_TL_UserEventFlow_Enable; + 8005e06: 4b0e ldr r3, [pc, #56] @ (8005e40 ) + 8005e08: 2201 movs r2, #1 + 8005e0a: 701a strb r2, [r3, #0] + + /* Initialize low level driver */ + if (hciContext.io.Init) + 8005e0c: 4b0d ldr r3, [pc, #52] @ (8005e44 ) + 8005e0e: 681b ldr r3, [r3, #0] + 8005e10: 2b00 cmp r3, #0 + 8005e12: d00a beq.n 8005e2a + { + + Conf.p_cmdbuffer = (uint8_t *)p_cmdbuffer; + 8005e14: 687b ldr r3, [r7, #4] + 8005e16: 613b str r3, [r7, #16] + Conf.IoBusEvtCallBack = TlEvtReceived; + 8005e18: 4b0b ldr r3, [pc, #44] @ (8005e48 ) + 8005e1a: 60bb str r3, [r7, #8] + hciContext.io.Init(&Conf); + 8005e1c: 4b09 ldr r3, [pc, #36] @ (8005e44 ) + 8005e1e: 681b ldr r3, [r3, #0] + 8005e20: f107 0208 add.w r2, r7, #8 + 8005e24: 4610 mov r0, r2 + 8005e26: 4798 blx r3 + } + + return; + 8005e28: bf00 nop + 8005e2a: bf00 nop +} + 8005e2c: 3718 adds r7, #24 + 8005e2e: 46bd mov sp, r7 + 8005e30: bd80 pop {r7, pc} + 8005e32: bf00 nop + 8005e34: 20000214 .word 0x20000214 + 8005e38: 20000064 .word 0x20000064 + 8005e3c: 2000005c .word 0x2000005c + 8005e40: 20000068 .word 0x20000068 + 8005e44: 200001f4 .word 0x200001f4 + 8005e48: 08005ed9 .word 0x08005ed9 + +08005e4c : + +static void SendCmd(uint16_t opcode, uint8_t plen, void *param) +{ + 8005e4c: b580 push {r7, lr} + 8005e4e: b082 sub sp, #8 + 8005e50: af00 add r7, sp, #0 + 8005e52: 4603 mov r3, r0 + 8005e54: 603a str r2, [r7, #0] + 8005e56: 80fb strh r3, [r7, #6] + 8005e58: 460b mov r3, r1 + 8005e5a: 717b strb r3, [r7, #5] + pCmdBuffer->cmdserial.cmd.cmdcode = opcode; + 8005e5c: 4b0c ldr r3, [pc, #48] @ (8005e90 ) + 8005e5e: 681b ldr r3, [r3, #0] + 8005e60: 88fa ldrh r2, [r7, #6] + 8005e62: f8a3 2009 strh.w r2, [r3, #9] + pCmdBuffer->cmdserial.cmd.plen = plen; + 8005e66: 4b0a ldr r3, [pc, #40] @ (8005e90 ) + 8005e68: 681b ldr r3, [r3, #0] + 8005e6a: 797a ldrb r2, [r7, #5] + 8005e6c: 72da strb r2, [r3, #11] + memcpy( pCmdBuffer->cmdserial.cmd.payload, param, plen ); + 8005e6e: 4b08 ldr r3, [pc, #32] @ (8005e90 ) + 8005e70: 681b ldr r3, [r3, #0] + 8005e72: 330c adds r3, #12 + 8005e74: 797a ldrb r2, [r7, #5] + 8005e76: 6839 ldr r1, [r7, #0] + 8005e78: 4618 mov r0, r3 + 8005e7a: f001 fe81 bl 8007b80 + + hciContext.io.Send(0,0); + 8005e7e: 4b05 ldr r3, [pc, #20] @ (8005e94 ) + 8005e80: 691b ldr r3, [r3, #16] + 8005e82: 2100 movs r1, #0 + 8005e84: 2000 movs r0, #0 + 8005e86: 4798 blx r3 + + return; + 8005e88: bf00 nop +} + 8005e8a: 3708 adds r7, #8 + 8005e8c: 46bd mov sp, r7 + 8005e8e: bd80 pop {r7, pc} + 8005e90: 20000064 .word 0x20000064 + 8005e94: 200001f4 .word 0x200001f4 + +08005e98 : + +static void NotifyCmdStatus(HCI_TL_CmdStatus_t hcicmdstatus) +{ + 8005e98: b580 push {r7, lr} + 8005e9a: b082 sub sp, #8 + 8005e9c: af00 add r7, sp, #0 + 8005e9e: 4603 mov r3, r0 + 8005ea0: 71fb strb r3, [r7, #7] + if(hcicmdstatus == HCI_TL_CmdBusy) + 8005ea2: 79fb ldrb r3, [r7, #7] + 8005ea4: 2b00 cmp r3, #0 + 8005ea6: d108 bne.n 8005eba + { + if(StatusNotCallBackFunction != 0) + 8005ea8: 4b0a ldr r3, [pc, #40] @ (8005ed4 ) + 8005eaa: 681b ldr r3, [r3, #0] + 8005eac: 2b00 cmp r3, #0 + 8005eae: d00d beq.n 8005ecc + { + StatusNotCallBackFunction(HCI_TL_CmdBusy); + 8005eb0: 4b08 ldr r3, [pc, #32] @ (8005ed4 ) + 8005eb2: 681b ldr r3, [r3, #0] + 8005eb4: 2000 movs r0, #0 + 8005eb6: 4798 blx r3 + { + StatusNotCallBackFunction(HCI_TL_CmdAvailable); + } + } + + return; + 8005eb8: e008 b.n 8005ecc + if(StatusNotCallBackFunction != 0) + 8005eba: 4b06 ldr r3, [pc, #24] @ (8005ed4 ) + 8005ebc: 681b ldr r3, [r3, #0] + 8005ebe: 2b00 cmp r3, #0 + 8005ec0: d004 beq.n 8005ecc + StatusNotCallBackFunction(HCI_TL_CmdAvailable); + 8005ec2: 4b04 ldr r3, [pc, #16] @ (8005ed4 ) + 8005ec4: 681b ldr r3, [r3, #0] + 8005ec6: 2001 movs r0, #1 + 8005ec8: 4798 blx r3 + return; + 8005eca: bf00 nop + 8005ecc: bf00 nop +} + 8005ece: 3708 adds r7, #8 + 8005ed0: 46bd mov sp, r7 + 8005ed2: bd80 pop {r7, pc} + 8005ed4: 2000021c .word 0x2000021c + +08005ed8 : + +static void TlEvtReceived(TL_EvtPacket_t *hcievt) +{ + 8005ed8: b580 push {r7, lr} + 8005eda: b082 sub sp, #8 + 8005edc: af00 add r7, sp, #0 + 8005ede: 6078 str r0, [r7, #4] + if ( ((hcievt->evtserial.evt.evtcode) == TL_BLEEVT_CS_OPCODE) || ((hcievt->evtserial.evt.evtcode) == TL_BLEEVT_CC_OPCODE ) ) + 8005ee0: 687b ldr r3, [r7, #4] + 8005ee2: 7a5b ldrb r3, [r3, #9] + 8005ee4: 2b0f cmp r3, #15 + 8005ee6: d003 beq.n 8005ef0 + 8005ee8: 687b ldr r3, [r7, #4] + 8005eea: 7a5b ldrb r3, [r3, #9] + 8005eec: 2b0e cmp r3, #14 + 8005eee: d107 bne.n 8005f00 + { + LST_insert_tail(&HciCmdEventQueue, (tListNode *)hcievt); + 8005ef0: 6879 ldr r1, [r7, #4] + 8005ef2: 4809 ldr r0, [pc, #36] @ (8005f18 ) + 8005ef4: f000 fc34 bl 8006760 + hci_cmd_resp_release(0); /**< Notify the application a full Cmd Event has been received */ + 8005ef8: 2000 movs r0, #0 + 8005efa: f000 ffbc bl 8006e76 + 8005efe: e006 b.n 8005f0e + } + else + { + LST_insert_tail(&HciAsynchEventQueue, (tListNode *)hcievt); + 8005f00: 6879 ldr r1, [r7, #4] + 8005f02: 4806 ldr r0, [pc, #24] @ (8005f1c ) + 8005f04: f000 fc2c bl 8006760 + hci_notify_asynch_evt((void*) &HciAsynchEventQueue); /**< Notify the application a full HCI event has been received */ + 8005f08: 4804 ldr r0, [pc, #16] @ (8005f1c ) + 8005f0a: f000 ffa8 bl 8006e5e + } + + return; + 8005f0e: bf00 nop +} + 8005f10: 3708 adds r7, #8 + 8005f12: 46bd mov sp, r7 + 8005f14: bd80 pop {r7, pc} + 8005f16: bf00 nop + 8005f18: 20000214 .word 0x20000214 + 8005f1c: 2000005c .word 0x2000005c + +08005f20 : +#include "hci_tl.h" +#include "tl.h" + + +void hci_register_io_bus(tHciIO* fops) +{ + 8005f20: b480 push {r7} + 8005f22: b083 sub sp, #12 + 8005f24: af00 add r7, sp, #0 + 8005f26: 6078 str r0, [r7, #4] + /* Register IO bus services */ + fops->Init = TL_BLE_Init; + 8005f28: 687b ldr r3, [r7, #4] + 8005f2a: 4a05 ldr r2, [pc, #20] @ (8005f40 ) + 8005f2c: 601a str r2, [r3, #0] + fops->Send = TL_BLE_SendCmd; + 8005f2e: 687b ldr r3, [r7, #4] + 8005f30: 4a04 ldr r2, [pc, #16] @ (8005f44 ) + 8005f32: 611a str r2, [r3, #16] + + return; + 8005f34: bf00 nop +} + 8005f36: 370c adds r7, #12 + 8005f38: 46bd mov sp, r7 + 8005f3a: f85d 7b04 ldr.w r7, [sp], #4 + 8005f3e: 4770 bx lr + 8005f40: 08006239 .word 0x08006239 + 8005f44: 080062a1 .word 0x080062a1 + +08005f48 : +static void TlUserEvtReceived(TL_EvtPacket_t *shcievt); +static void TlInit( TL_CmdPacket_t * p_cmdbuffer ); + +/* Interface ------- ---------------------------------------------------------*/ +void shci_init(void(* UserEvtRx)(void* pData), void* pConf) +{ + 8005f48: b580 push {r7, lr} + 8005f4a: b082 sub sp, #8 + 8005f4c: af00 add r7, sp, #0 + 8005f4e: 6078 str r0, [r7, #4] + 8005f50: 6039 str r1, [r7, #0] + StatusNotCallBackFunction = ((SHCI_TL_HciInitConf_t *)pConf)->StatusNotCallBack; + 8005f52: 683b ldr r3, [r7, #0] + 8005f54: 685b ldr r3, [r3, #4] + 8005f56: 4a08 ldr r2, [pc, #32] @ (8005f78 ) + 8005f58: 6013 str r3, [r2, #0] + shciContext.UserEvtRx = UserEvtRx; + 8005f5a: 4a08 ldr r2, [pc, #32] @ (8005f7c ) + 8005f5c: 687b ldr r3, [r7, #4] + 8005f5e: 61d3 str r3, [r2, #28] + + shci_register_io_bus (&shciContext.io); + 8005f60: 4806 ldr r0, [pc, #24] @ (8005f7c ) + 8005f62: f000 f915 bl 8006190 + + TlInit((TL_CmdPacket_t *)(((SHCI_TL_HciInitConf_t *)pConf)->p_cmdbuffer)); + 8005f66: 683b ldr r3, [r7, #0] + 8005f68: 681b ldr r3, [r3, #0] + 8005f6a: 4618 mov r0, r3 + 8005f6c: f000 f898 bl 80060a0 + + return; + 8005f70: bf00 nop +} + 8005f72: 3708 adds r7, #8 + 8005f74: 46bd mov sp, r7 + 8005f76: bd80 pop {r7, pc} + 8005f78: 20000244 .word 0x20000244 + 8005f7c: 20000224 .word 0x20000224 + +08005f80 : + +void shci_user_evt_proc(void) +{ + 8005f80: b580 push {r7, lr} + 8005f82: b084 sub sp, #16 + 8005f84: af00 add r7, sp, #0 + + /** + * It is more secure to use LST_remove_head()/LST_insert_head() compare to LST_get_next_node()/LST_remove_node() + * in case the user overwrite the header where the next/prev pointers are located + */ + if((LST_is_empty(&SHciAsynchEventQueue) == FALSE) && (SHCI_TL_UserEventFlow != SHCI_TL_UserEventFlow_Disable)) + 8005f86: 4822 ldr r0, [pc, #136] @ (8006010 ) + 8005f88: f000 fba2 bl 80066d0 + 8005f8c: 4603 mov r3, r0 + 8005f8e: 2b00 cmp r3, #0 + 8005f90: d12b bne.n 8005fea + 8005f92: 4b20 ldr r3, [pc, #128] @ (8006014 ) + 8005f94: 781b ldrb r3, [r3, #0] + 8005f96: 2b00 cmp r3, #0 + 8005f98: d027 beq.n 8005fea + { + LST_remove_head ( &SHciAsynchEventQueue, (tListNode **)&phcievtbuffer ); + 8005f9a: f107 030c add.w r3, r7, #12 + 8005f9e: 4619 mov r1, r3 + 8005fa0: 481b ldr r0, [pc, #108] @ (8006010 ) + 8005fa2: f000 fc24 bl 80067ee + + if (shciContext.UserEvtRx != NULL) + 8005fa6: 4b1c ldr r3, [pc, #112] @ (8006018 ) + 8005fa8: 69db ldr r3, [r3, #28] + 8005faa: 2b00 cmp r3, #0 + 8005fac: d00c beq.n 8005fc8 + { + UserEvtRxParam.pckt = phcievtbuffer; + 8005fae: 68fb ldr r3, [r7, #12] + 8005fb0: 60bb str r3, [r7, #8] + UserEvtRxParam.status = SHCI_TL_UserEventFlow_Enable; + 8005fb2: 2301 movs r3, #1 + 8005fb4: 713b strb r3, [r7, #4] + shciContext.UserEvtRx((void *)&UserEvtRxParam); + 8005fb6: 4b18 ldr r3, [pc, #96] @ (8006018 ) + 8005fb8: 69db ldr r3, [r3, #28] + 8005fba: 1d3a adds r2, r7, #4 + 8005fbc: 4610 mov r0, r2 + 8005fbe: 4798 blx r3 + SHCI_TL_UserEventFlow = UserEvtRxParam.status; + 8005fc0: 793a ldrb r2, [r7, #4] + 8005fc2: 4b14 ldr r3, [pc, #80] @ (8006014 ) + 8005fc4: 701a strb r2, [r3, #0] + 8005fc6: e002 b.n 8005fce + } + else + { + SHCI_TL_UserEventFlow = SHCI_TL_UserEventFlow_Enable; + 8005fc8: 4b12 ldr r3, [pc, #72] @ (8006014 ) + 8005fca: 2201 movs r2, #1 + 8005fcc: 701a strb r2, [r3, #0] + } + + if(SHCI_TL_UserEventFlow != SHCI_TL_UserEventFlow_Disable) + 8005fce: 4b11 ldr r3, [pc, #68] @ (8006014 ) + 8005fd0: 781b ldrb r3, [r3, #0] + 8005fd2: 2b00 cmp r3, #0 + 8005fd4: d004 beq.n 8005fe0 + { + TL_MM_EvtDone( phcievtbuffer ); + 8005fd6: 68fb ldr r3, [r7, #12] + 8005fd8: 4618 mov r0, r3 + 8005fda: f000 fa75 bl 80064c8 + 8005fde: e004 b.n 8005fea + else + { + /** + * put back the event in the queue + */ + LST_insert_head ( &SHciAsynchEventQueue, (tListNode *)phcievtbuffer ); + 8005fe0: 68fb ldr r3, [r7, #12] + 8005fe2: 4619 mov r1, r3 + 8005fe4: 480a ldr r0, [pc, #40] @ (8006010 ) + 8005fe6: f000 fb95 bl 8006714 + } + } + + if((LST_is_empty(&SHciAsynchEventQueue) == FALSE) && (SHCI_TL_UserEventFlow != SHCI_TL_UserEventFlow_Disable)) + 8005fea: 4809 ldr r0, [pc, #36] @ (8006010 ) + 8005fec: f000 fb70 bl 80066d0 + 8005ff0: 4603 mov r3, r0 + 8005ff2: 2b00 cmp r3, #0 + 8005ff4: d107 bne.n 8006006 + 8005ff6: 4b07 ldr r3, [pc, #28] @ (8006014 ) + 8005ff8: 781b ldrb r3, [r3, #0] + 8005ffa: 2b00 cmp r3, #0 + 8005ffc: d003 beq.n 8006006 + { + shci_notify_asynch_evt((void*) &SHciAsynchEventQueue); + 8005ffe: 4804 ldr r0, [pc, #16] @ (8006010 ) + 8006000: f7fa fb07 bl 8000612 + } + + + return; + 8006004: bf00 nop + 8006006: bf00 nop +} + 8006008: 3710 adds r7, #16 + 800600a: 46bd mov sp, r7 + 800600c: bd80 pop {r7, pc} + 800600e: bf00 nop + 8006010: 2000006c .word 0x2000006c + 8006014: 2000007c .word 0x2000007c + 8006018: 20000224 .word 0x20000224 + +0800601c : + + return; +} + +void shci_send( uint16_t cmd_code, uint8_t len_cmd_payload, uint8_t * p_cmd_payload, TL_EvtPacket_t * p_rsp ) +{ + 800601c: b580 push {r7, lr} + 800601e: b084 sub sp, #16 + 8006020: af00 add r7, sp, #0 + 8006022: 60ba str r2, [r7, #8] + 8006024: 607b str r3, [r7, #4] + 8006026: 4603 mov r3, r0 + 8006028: 81fb strh r3, [r7, #14] + 800602a: 460b mov r3, r1 + 800602c: 737b strb r3, [r7, #13] + Cmd_SetStatus(SHCI_TL_CmdBusy); + 800602e: 2000 movs r0, #0 + 8006030: f000 f868 bl 8006104 + + pCmdBuffer->cmdserial.cmd.cmdcode = cmd_code; + 8006034: 4b17 ldr r3, [pc, #92] @ (8006094 ) + 8006036: 681b ldr r3, [r3, #0] + 8006038: 89fa ldrh r2, [r7, #14] + 800603a: f8a3 2009 strh.w r2, [r3, #9] + pCmdBuffer->cmdserial.cmd.plen = len_cmd_payload; + 800603e: 4b15 ldr r3, [pc, #84] @ (8006094 ) + 8006040: 681b ldr r3, [r3, #0] + 8006042: 7b7a ldrb r2, [r7, #13] + 8006044: 72da strb r2, [r3, #11] + + memcpy(pCmdBuffer->cmdserial.cmd.payload, p_cmd_payload, len_cmd_payload ); + 8006046: 4b13 ldr r3, [pc, #76] @ (8006094 ) + 8006048: 681b ldr r3, [r3, #0] + 800604a: 330c adds r3, #12 + 800604c: 7b7a ldrb r2, [r7, #13] + 800604e: 68b9 ldr r1, [r7, #8] + 8006050: 4618 mov r0, r3 + 8006052: f001 fd95 bl 8007b80 + CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT; + 8006056: 4b10 ldr r3, [pc, #64] @ (8006098 ) + 8006058: 2201 movs r2, #1 + 800605a: 701a strb r2, [r3, #0] + shciContext.io.Send(0,0); + 800605c: 4b0f ldr r3, [pc, #60] @ (800609c ) + 800605e: 691b ldr r3, [r3, #16] + 8006060: 2100 movs r1, #0 + 8006062: 2000 movs r0, #0 + 8006064: 4798 blx r3 + + shci_cmd_resp_wait(SHCI_TL_DEFAULT_TIMEOUT); + 8006066: f248 00e8 movw r0, #33000 @ 0x80e8 + 800606a: f7fa fae9 bl 8000640 + + /** + * The command complete of a system command does not have the header + * It starts immediately with the evtserial field + */ + memcpy( &(p_rsp->evtserial), pCmdBuffer, ((TL_EvtSerial_t*)pCmdBuffer)->evt.plen + TL_EVT_HDR_SIZE ); + 800606e: 687b ldr r3, [r7, #4] + 8006070: f103 0008 add.w r0, r3, #8 + 8006074: 4b07 ldr r3, [pc, #28] @ (8006094 ) + 8006076: 6819 ldr r1, [r3, #0] + 8006078: 4b06 ldr r3, [pc, #24] @ (8006094 ) + 800607a: 681b ldr r3, [r3, #0] + 800607c: 789b ldrb r3, [r3, #2] + 800607e: 3303 adds r3, #3 + 8006080: 461a mov r2, r3 + 8006082: f001 fd7d bl 8007b80 + + Cmd_SetStatus(SHCI_TL_CmdAvailable); + 8006086: 2001 movs r0, #1 + 8006088: f000 f83c bl 8006104 + + return; + 800608c: bf00 nop +} + 800608e: 3710 adds r7, #16 + 8006090: 46bd mov sp, r7 + 8006092: bd80 pop {r7, pc} + 8006094: 20000078 .word 0x20000078 + 8006098: 20000248 .word 0x20000248 + 800609c: 20000224 .word 0x20000224 + +080060a0 : + +/* Private functions ---------------------------------------------------------*/ +static void TlInit( TL_CmdPacket_t * p_cmdbuffer ) +{ + 80060a0: b580 push {r7, lr} + 80060a2: b086 sub sp, #24 + 80060a4: af00 add r7, sp, #0 + 80060a6: 6078 str r0, [r7, #4] + TL_SYS_InitConf_t Conf; + + pCmdBuffer = p_cmdbuffer; + 80060a8: 4a10 ldr r2, [pc, #64] @ (80060ec ) + 80060aa: 687b ldr r3, [r7, #4] + 80060ac: 6013 str r3, [r2, #0] + + LST_init_head (&SHciAsynchEventQueue); + 80060ae: 4810 ldr r0, [pc, #64] @ (80060f0 ) + 80060b0: f000 fafe bl 80066b0 + + Cmd_SetStatus(SHCI_TL_CmdAvailable); + 80060b4: 2001 movs r0, #1 + 80060b6: f000 f825 bl 8006104 + + SHCI_TL_UserEventFlow = SHCI_TL_UserEventFlow_Enable; + 80060ba: 4b0e ldr r3, [pc, #56] @ (80060f4 ) + 80060bc: 2201 movs r2, #1 + 80060be: 701a strb r2, [r3, #0] + + /* Initialize low level driver */ + if (shciContext.io.Init) + 80060c0: 4b0d ldr r3, [pc, #52] @ (80060f8 ) + 80060c2: 681b ldr r3, [r3, #0] + 80060c4: 2b00 cmp r3, #0 + 80060c6: d00c beq.n 80060e2 + { + + Conf.p_cmdbuffer = (uint8_t *)p_cmdbuffer; + 80060c8: 687b ldr r3, [r7, #4] + 80060ca: 617b str r3, [r7, #20] + Conf.IoBusCallBackCmdEvt = TlCmdEvtReceived; + 80060cc: 4b0b ldr r3, [pc, #44] @ (80060fc ) + 80060ce: 60fb str r3, [r7, #12] + Conf.IoBusCallBackUserEvt = TlUserEvtReceived; + 80060d0: 4b0b ldr r3, [pc, #44] @ (8006100 ) + 80060d2: 613b str r3, [r7, #16] + shciContext.io.Init(&Conf); + 80060d4: 4b08 ldr r3, [pc, #32] @ (80060f8 ) + 80060d6: 681b ldr r3, [r3, #0] + 80060d8: f107 020c add.w r2, r7, #12 + 80060dc: 4610 mov r0, r2 + 80060de: 4798 blx r3 + } + + return; + 80060e0: bf00 nop + 80060e2: bf00 nop +} + 80060e4: 3718 adds r7, #24 + 80060e6: 46bd mov sp, r7 + 80060e8: bd80 pop {r7, pc} + 80060ea: bf00 nop + 80060ec: 20000078 .word 0x20000078 + 80060f0: 2000006c .word 0x2000006c + 80060f4: 2000007c .word 0x2000007c + 80060f8: 20000224 .word 0x20000224 + 80060fc: 08006155 .word 0x08006155 + 8006100: 0800616d .word 0x0800616d + +08006104 : + +static void Cmd_SetStatus(SHCI_TL_CmdStatus_t shcicmdstatus) +{ + 8006104: b580 push {r7, lr} + 8006106: b082 sub sp, #8 + 8006108: af00 add r7, sp, #0 + 800610a: 4603 mov r3, r0 + 800610c: 71fb strb r3, [r7, #7] + if(shcicmdstatus == SHCI_TL_CmdBusy) + 800610e: 79fb ldrb r3, [r7, #7] + 8006110: 2b00 cmp r3, #0 + 8006112: d10b bne.n 800612c + { + if(StatusNotCallBackFunction != 0) + 8006114: 4b0d ldr r3, [pc, #52] @ (800614c ) + 8006116: 681b ldr r3, [r3, #0] + 8006118: 2b00 cmp r3, #0 + 800611a: d003 beq.n 8006124 + { + StatusNotCallBackFunction( SHCI_TL_CmdBusy ); + 800611c: 4b0b ldr r3, [pc, #44] @ (800614c ) + 800611e: 681b ldr r3, [r3, #0] + 8006120: 2000 movs r0, #0 + 8006122: 4798 blx r3 + } + SHCICmdStatus = SHCI_TL_CmdBusy; + 8006124: 4b0a ldr r3, [pc, #40] @ (8006150 ) + 8006126: 2200 movs r2, #0 + 8006128: 701a strb r2, [r3, #0] + { + StatusNotCallBackFunction( SHCI_TL_CmdAvailable ); + } + } + + return; + 800612a: e00b b.n 8006144 + SHCICmdStatus = SHCI_TL_CmdAvailable; + 800612c: 4b08 ldr r3, [pc, #32] @ (8006150 ) + 800612e: 2201 movs r2, #1 + 8006130: 701a strb r2, [r3, #0] + if(StatusNotCallBackFunction != 0) + 8006132: 4b06 ldr r3, [pc, #24] @ (800614c ) + 8006134: 681b ldr r3, [r3, #0] + 8006136: 2b00 cmp r3, #0 + 8006138: d004 beq.n 8006144 + StatusNotCallBackFunction( SHCI_TL_CmdAvailable ); + 800613a: 4b04 ldr r3, [pc, #16] @ (800614c ) + 800613c: 681b ldr r3, [r3, #0] + 800613e: 2001 movs r0, #1 + 8006140: 4798 blx r3 + return; + 8006142: bf00 nop + 8006144: bf00 nop +} + 8006146: 3708 adds r7, #8 + 8006148: 46bd mov sp, r7 + 800614a: bd80 pop {r7, pc} + 800614c: 20000244 .word 0x20000244 + 8006150: 20000074 .word 0x20000074 + +08006154 : + +static void TlCmdEvtReceived(TL_EvtPacket_t *shcievt) +{ + 8006154: b580 push {r7, lr} + 8006156: b082 sub sp, #8 + 8006158: af00 add r7, sp, #0 + 800615a: 6078 str r0, [r7, #4] + (void)(shcievt); + shci_cmd_resp_release(0); /**< Notify the application the Cmd response has been received */ + 800615c: 2000 movs r0, #0 + 800615e: f7fa fa64 bl 800062a + + return; + 8006162: bf00 nop +} + 8006164: 3708 adds r7, #8 + 8006166: 46bd mov sp, r7 + 8006168: bd80 pop {r7, pc} + ... + +0800616c : + +static void TlUserEvtReceived(TL_EvtPacket_t *shcievt) +{ + 800616c: b580 push {r7, lr} + 800616e: b082 sub sp, #8 + 8006170: af00 add r7, sp, #0 + 8006172: 6078 str r0, [r7, #4] + LST_insert_tail(&SHciAsynchEventQueue, (tListNode *)shcievt); + 8006174: 6879 ldr r1, [r7, #4] + 8006176: 4805 ldr r0, [pc, #20] @ (800618c ) + 8006178: f000 faf2 bl 8006760 + shci_notify_asynch_evt((void*) &SHciAsynchEventQueue); /**< Notify the application a full HCI event has been received */ + 800617c: 4803 ldr r0, [pc, #12] @ (800618c ) + 800617e: f7fa fa48 bl 8000612 + + return; + 8006182: bf00 nop +} + 8006184: 3708 adds r7, #8 + 8006186: 46bd mov sp, r7 + 8006188: bd80 pop {r7, pc} + 800618a: bf00 nop + 800618c: 2000006c .word 0x2000006c + +08006190 : +#include "shci_tl.h" +#include "tl.h" + + +void shci_register_io_bus(tSHciIO* fops) +{ + 8006190: b480 push {r7} + 8006192: b083 sub sp, #12 + 8006194: af00 add r7, sp, #0 + 8006196: 6078 str r0, [r7, #4] + /* Register IO bus services */ + fops->Init = TL_SYS_Init; + 8006198: 687b ldr r3, [r7, #4] + 800619a: 4a05 ldr r2, [pc, #20] @ (80061b0 ) + 800619c: 601a str r2, [r3, #0] + fops->Send = TL_SYS_SendCmd; + 800619e: 687b ldr r3, [r7, #4] + 80061a0: 4a04 ldr r2, [pc, #16] @ (80061b4 ) + 80061a2: 611a str r2, [r3, #16] + + return; + 80061a4: bf00 nop +} + 80061a6: 370c adds r7, #12 + 80061a8: 46bd mov sp, r7 + 80061aa: f85d 7b04 ldr.w r7, [sp], #4 + 80061ae: 4770 bx lr + 80061b0: 08006355 .word 0x08006355 + 80061b4: 080063a9 .word 0x080063a9 + +080061b8 : + +/****************************************************************************** + * GENERAL - refer to AN5289 for functions description. + ******************************************************************************/ +void TL_Enable( void ) +{ + 80061b8: b580 push {r7, lr} + 80061ba: af00 add r7, sp, #0 + HW_IPCC_Enable(); + 80061bc: f001 f856 bl 800726c + + return; + 80061c0: bf00 nop +} + 80061c2: bd80 pop {r7, pc} + +080061c4 : + + +void TL_Init( void ) +{ + 80061c4: b580 push {r7, lr} + 80061c6: af00 add r7, sp, #0 + TL_RefTable.p_device_info_table = &TL_DeviceInfoTable; + 80061c8: 4b10 ldr r3, [pc, #64] @ (800620c ) + 80061ca: 4a11 ldr r2, [pc, #68] @ (8006210 ) + 80061cc: 601a str r2, [r3, #0] + TL_RefTable.p_ble_table = &TL_BleTable; + 80061ce: 4b0f ldr r3, [pc, #60] @ (800620c ) + 80061d0: 4a10 ldr r2, [pc, #64] @ (8006214 ) + 80061d2: 605a str r2, [r3, #4] + TL_RefTable.p_thread_table = &TL_ThreadTable; + 80061d4: 4b0d ldr r3, [pc, #52] @ (800620c ) + 80061d6: 4a10 ldr r2, [pc, #64] @ (8006218 ) + 80061d8: 609a str r2, [r3, #8] + TL_RefTable.p_lld_tests_table = &TL_LldTestsTable; + 80061da: 4b0c ldr r3, [pc, #48] @ (800620c ) + 80061dc: 4a0f ldr r2, [pc, #60] @ (800621c ) + 80061de: 621a str r2, [r3, #32] + TL_RefTable.p_ble_lld_table = &TL_BleLldTable; + 80061e0: 4b0a ldr r3, [pc, #40] @ (800620c ) + 80061e2: 4a0f ldr r2, [pc, #60] @ (8006220 ) + 80061e4: 625a str r2, [r3, #36] @ 0x24 + TL_RefTable.p_sys_table = &TL_SysTable; + 80061e6: 4b09 ldr r3, [pc, #36] @ (800620c ) + 80061e8: 4a0e ldr r2, [pc, #56] @ (8006224 ) + 80061ea: 60da str r2, [r3, #12] + TL_RefTable.p_mem_manager_table = &TL_MemManagerTable; + 80061ec: 4b07 ldr r3, [pc, #28] @ (800620c ) + 80061ee: 4a0e ldr r2, [pc, #56] @ (8006228 ) + 80061f0: 611a str r2, [r3, #16] + TL_RefTable.p_traces_table = &TL_TracesTable; + 80061f2: 4b06 ldr r3, [pc, #24] @ (800620c ) + 80061f4: 4a0d ldr r2, [pc, #52] @ (800622c ) + 80061f6: 615a str r2, [r3, #20] + TL_RefTable.p_mac_802_15_4_table = &TL_Mac_802_15_4_Table; + 80061f8: 4b04 ldr r3, [pc, #16] @ (800620c ) + 80061fa: 4a0d ldr r2, [pc, #52] @ (8006230 ) + 80061fc: 619a str r2, [r3, #24] + TL_RefTable.p_zigbee_table = &TL_Zigbee_Table; + 80061fe: 4b03 ldr r3, [pc, #12] @ (800620c ) + 8006200: 4a0c ldr r2, [pc, #48] @ (8006234 ) + 8006202: 61da str r2, [r3, #28] + HW_IPCC_Init(); + 8006204: f001 f846 bl 8007294 + + return; + 8006208: bf00 nop +} + 800620a: bd80 pop {r7, pc} + 800620c: 20030000 .word 0x20030000 + 8006210: 20030028 .word 0x20030028 + 8006214: 20030048 .word 0x20030048 + 8006218: 20030058 .word 0x20030058 + 800621c: 20030068 .word 0x20030068 + 8006220: 20030070 .word 0x20030070 + 8006224: 20030078 .word 0x20030078 + 8006228: 20030080 .word 0x20030080 + 800622c: 2003009c .word 0x2003009c + 8006230: 200300a0 .word 0x200300a0 + 8006234: 200300ac .word 0x200300ac + +08006238 : + +/****************************************************************************** + * BLE + ******************************************************************************/ +int32_t TL_BLE_Init( void* pConf ) +{ + 8006238: b580 push {r7, lr} + 800623a: b084 sub sp, #16 + 800623c: af00 add r7, sp, #0 + 800623e: 6078 str r0, [r7, #4] + MB_BleTable_t * p_bletable; + + TL_BLE_InitConf_t *pInitHciConf = (TL_BLE_InitConf_t *) pConf; + 8006240: 687b ldr r3, [r7, #4] + 8006242: 60fb str r3, [r7, #12] + + LST_init_head (&EvtQueue); + 8006244: 4811 ldr r0, [pc, #68] @ (800628c ) + 8006246: f000 fa33 bl 80066b0 + + p_bletable = TL_RefTable.p_ble_table; + 800624a: 4b11 ldr r3, [pc, #68] @ (8006290 ) + 800624c: 685b ldr r3, [r3, #4] + 800624e: 60bb str r3, [r7, #8] + + p_bletable->pcmd_buffer = pInitHciConf->p_cmdbuffer; + 8006250: 68fb ldr r3, [r7, #12] + 8006252: 689a ldr r2, [r3, #8] + 8006254: 68bb ldr r3, [r7, #8] + 8006256: 601a str r2, [r3, #0] + p_bletable->phci_acl_data_buffer = pInitHciConf->p_AclDataBuffer; + 8006258: 68fb ldr r3, [r7, #12] + 800625a: 68da ldr r2, [r3, #12] + 800625c: 68bb ldr r3, [r7, #8] + 800625e: 60da str r2, [r3, #12] + p_bletable->pcs_buffer = (uint8_t*)CsBuffer; + 8006260: 68bb ldr r3, [r7, #8] + 8006262: 4a0c ldr r2, [pc, #48] @ (8006294 ) + 8006264: 605a str r2, [r3, #4] + p_bletable->pevt_queue = (uint8_t*)&EvtQueue; + 8006266: 68bb ldr r3, [r7, #8] + 8006268: 4a08 ldr r2, [pc, #32] @ (800628c ) + 800626a: 609a str r2, [r3, #8] + + HW_IPCC_BLE_Init(); + 800626c: f001 f828 bl 80072c0 + + BLE_IoBusEvtCallBackFunction = pInitHciConf->IoBusEvtCallBack; + 8006270: 68fb ldr r3, [r7, #12] + 8006272: 681b ldr r3, [r3, #0] + 8006274: 4a08 ldr r2, [pc, #32] @ (8006298 ) + 8006276: 6013 str r3, [r2, #0] + BLE_IoBusAclDataTxAck = pInitHciConf->IoBusAclDataTxAck; + 8006278: 68fb ldr r3, [r7, #12] + 800627a: 685b ldr r3, [r3, #4] + 800627c: 4a07 ldr r2, [pc, #28] @ (800629c ) + 800627e: 6013 str r3, [r2, #0] + + return 0; + 8006280: 2300 movs r3, #0 +} + 8006282: 4618 mov r0, r3 + 8006284: 3710 adds r7, #16 + 8006286: 46bd mov sp, r7 + 8006288: bd80 pop {r7, pc} + 800628a: bf00 nop + 800628c: 200300c8 .word 0x200300c8 + 8006290: 20030000 .word 0x20030000 + 8006294: 20030a58 .word 0x20030a58 + 8006298: 20000254 .word 0x20000254 + 800629c: 20000258 .word 0x20000258 + +080062a0 : + +int32_t TL_BLE_SendCmd( uint8_t* buffer, uint16_t size ) +{ + 80062a0: b580 push {r7, lr} + 80062a2: b082 sub sp, #8 + 80062a4: af00 add r7, sp, #0 + 80062a6: 6078 str r0, [r7, #4] + 80062a8: 460b mov r3, r1 + 80062aa: 807b strh r3, [r7, #2] + (void)(buffer); + (void)(size); + + ((TL_CmdPacket_t*)(TL_RefTable.p_ble_table->pcmd_buffer))->cmdserial.type = TL_BLECMD_PKT_TYPE; + 80062ac: 4b09 ldr r3, [pc, #36] @ (80062d4 ) + 80062ae: 685b ldr r3, [r3, #4] + 80062b0: 681b ldr r3, [r3, #0] + 80062b2: 2201 movs r2, #1 + 80062b4: 721a strb r2, [r3, #8] + + OutputDbgTrace(TL_MB_BLE_CMD, TL_RefTable.p_ble_table->pcmd_buffer); + 80062b6: 4b07 ldr r3, [pc, #28] @ (80062d4 ) + 80062b8: 685b ldr r3, [r3, #4] + 80062ba: 681b ldr r3, [r3, #0] + 80062bc: 4619 mov r1, r3 + 80062be: 2001 movs r0, #1 + 80062c0: f000 f970 bl 80065a4 + + HW_IPCC_BLE_SendCmd(); + 80062c4: f001 f816 bl 80072f4 + + return 0; + 80062c8: 2300 movs r3, #0 +} + 80062ca: 4618 mov r0, r3 + 80062cc: 3708 adds r7, #8 + 80062ce: 46bd mov sp, r7 + 80062d0: bd80 pop {r7, pc} + 80062d2: bf00 nop + 80062d4: 20030000 .word 0x20030000 + +080062d8 : + +void HW_IPCC_BLE_RxEvtNot(void) +{ + 80062d8: b580 push {r7, lr} + 80062da: b082 sub sp, #8 + 80062dc: af00 add r7, sp, #0 + TL_EvtPacket_t *phcievt; + + while(LST_is_empty(&EvtQueue) == FALSE) + 80062de: e01c b.n 800631a + { + LST_remove_head (&EvtQueue, (tListNode **)&phcievt); + 80062e0: 1d3b adds r3, r7, #4 + 80062e2: 4619 mov r1, r3 + 80062e4: 4812 ldr r0, [pc, #72] @ (8006330 ) + 80062e6: f000 fa82 bl 80067ee + + if ( ((phcievt->evtserial.evt.evtcode) == TL_BLEEVT_CS_OPCODE) || ((phcievt->evtserial.evt.evtcode) == TL_BLEEVT_CC_OPCODE ) ) + 80062ea: 687b ldr r3, [r7, #4] + 80062ec: 7a5b ldrb r3, [r3, #9] + 80062ee: 2b0f cmp r3, #15 + 80062f0: d003 beq.n 80062fa + 80062f2: 687b ldr r3, [r7, #4] + 80062f4: 7a5b ldrb r3, [r3, #9] + 80062f6: 2b0e cmp r3, #14 + 80062f8: d105 bne.n 8006306 + { + OutputDbgTrace(TL_MB_BLE_CMD_RSP, (uint8_t*)phcievt); + 80062fa: 687b ldr r3, [r7, #4] + 80062fc: 4619 mov r1, r3 + 80062fe: 2002 movs r0, #2 + 8006300: f000 f950 bl 80065a4 + 8006304: e004 b.n 8006310 + } + else + { + OutputDbgTrace(TL_MB_BLE_ASYNCH_EVT, (uint8_t*)phcievt); + 8006306: 687b ldr r3, [r7, #4] + 8006308: 4619 mov r1, r3 + 800630a: 2005 movs r0, #5 + 800630c: f000 f94a bl 80065a4 + } + + BLE_IoBusEvtCallBackFunction(phcievt); + 8006310: 4b08 ldr r3, [pc, #32] @ (8006334 ) + 8006312: 681b ldr r3, [r3, #0] + 8006314: 687a ldr r2, [r7, #4] + 8006316: 4610 mov r0, r2 + 8006318: 4798 blx r3 + while(LST_is_empty(&EvtQueue) == FALSE) + 800631a: 4805 ldr r0, [pc, #20] @ (8006330 ) + 800631c: f000 f9d8 bl 80066d0 + 8006320: 4603 mov r3, r0 + 8006322: 2b00 cmp r3, #0 + 8006324: d0dc beq.n 80062e0 + } + + return; + 8006326: bf00 nop +} + 8006328: 3708 adds r7, #8 + 800632a: 46bd mov sp, r7 + 800632c: bd80 pop {r7, pc} + 800632e: bf00 nop + 8006330: 200300c8 .word 0x200300c8 + 8006334: 20000254 .word 0x20000254 + +08006338 : + + return 0; +} + +void HW_IPCC_BLE_AclDataAckNot(void) +{ + 8006338: b580 push {r7, lr} + 800633a: af00 add r7, sp, #0 + OutputDbgTrace(TL_MB_ACL_DATA_RSP, (uint8_t*)NULL); + 800633c: 2100 movs r1, #0 + 800633e: 2004 movs r0, #4 + 8006340: f000 f930 bl 80065a4 + + BLE_IoBusAclDataTxAck( ); + 8006344: 4b02 ldr r3, [pc, #8] @ (8006350 ) + 8006346: 681b ldr r3, [r3, #0] + 8006348: 4798 blx r3 + + return; + 800634a: bf00 nop +} + 800634c: bd80 pop {r7, pc} + 800634e: bf00 nop + 8006350: 20000258 .word 0x20000258 + +08006354 : + +/****************************************************************************** + * SYSTEM + ******************************************************************************/ +int32_t TL_SYS_Init( void* pConf ) +{ + 8006354: b580 push {r7, lr} + 8006356: b084 sub sp, #16 + 8006358: af00 add r7, sp, #0 + 800635a: 6078 str r0, [r7, #4] + MB_SysTable_t * p_systable; + + TL_SYS_InitConf_t *pInitHciConf = (TL_SYS_InitConf_t *) pConf; + 800635c: 687b ldr r3, [r7, #4] + 800635e: 60fb str r3, [r7, #12] + + LST_init_head (&SystemEvtQueue); + 8006360: 480d ldr r0, [pc, #52] @ (8006398 ) + 8006362: f000 f9a5 bl 80066b0 + p_systable = TL_RefTable.p_sys_table; + 8006366: 4b0d ldr r3, [pc, #52] @ (800639c ) + 8006368: 68db ldr r3, [r3, #12] + 800636a: 60bb str r3, [r7, #8] + p_systable->pcmd_buffer = pInitHciConf->p_cmdbuffer; + 800636c: 68fb ldr r3, [r7, #12] + 800636e: 689a ldr r2, [r3, #8] + 8006370: 68bb ldr r3, [r7, #8] + 8006372: 601a str r2, [r3, #0] + p_systable->sys_queue = (uint8_t*)&SystemEvtQueue; + 8006374: 68bb ldr r3, [r7, #8] + 8006376: 4a08 ldr r2, [pc, #32] @ (8006398 ) + 8006378: 605a str r2, [r3, #4] + + HW_IPCC_SYS_Init(); + 800637a: f000 ffed bl 8007358 + + SYS_CMD_IoBusCallBackFunction = pInitHciConf->IoBusCallBackCmdEvt; + 800637e: 68fb ldr r3, [r7, #12] + 8006380: 681b ldr r3, [r3, #0] + 8006382: 4a07 ldr r2, [pc, #28] @ (80063a0 ) + 8006384: 6013 str r3, [r2, #0] + SYS_EVT_IoBusCallBackFunction = pInitHciConf->IoBusCallBackUserEvt; + 8006386: 68fb ldr r3, [r7, #12] + 8006388: 685b ldr r3, [r3, #4] + 800638a: 4a06 ldr r2, [pc, #24] @ (80063a4 ) + 800638c: 6013 str r3, [r2, #0] + + return 0; + 800638e: 2300 movs r3, #0 +} + 8006390: 4618 mov r0, r3 + 8006392: 3710 adds r7, #16 + 8006394: 46bd mov sp, r7 + 8006396: bd80 pop {r7, pc} + 8006398: 200300d0 .word 0x200300d0 + 800639c: 20030000 .word 0x20030000 + 80063a0: 2000025c .word 0x2000025c + 80063a4: 20000260 .word 0x20000260 + +080063a8 : + +int32_t TL_SYS_SendCmd( uint8_t* buffer, uint16_t size ) +{ + 80063a8: b580 push {r7, lr} + 80063aa: b082 sub sp, #8 + 80063ac: af00 add r7, sp, #0 + 80063ae: 6078 str r0, [r7, #4] + 80063b0: 460b mov r3, r1 + 80063b2: 807b strh r3, [r7, #2] + (void)(buffer); + (void)(size); + + ((TL_CmdPacket_t *)(TL_RefTable.p_sys_table->pcmd_buffer))->cmdserial.type = TL_SYSCMD_PKT_TYPE; + 80063b4: 4b09 ldr r3, [pc, #36] @ (80063dc ) + 80063b6: 68db ldr r3, [r3, #12] + 80063b8: 681b ldr r3, [r3, #0] + 80063ba: 2210 movs r2, #16 + 80063bc: 721a strb r2, [r3, #8] + + OutputDbgTrace(TL_MB_SYS_CMD, TL_RefTable.p_sys_table->pcmd_buffer); + 80063be: 4b07 ldr r3, [pc, #28] @ (80063dc ) + 80063c0: 68db ldr r3, [r3, #12] + 80063c2: 681b ldr r3, [r3, #0] + 80063c4: 4619 mov r1, r3 + 80063c6: 2006 movs r0, #6 + 80063c8: f000 f8ec bl 80065a4 + + HW_IPCC_SYS_SendCmd(); + 80063cc: f000 ffde bl 800738c + + return 0; + 80063d0: 2300 movs r3, #0 +} + 80063d2: 4618 mov r0, r3 + 80063d4: 3708 adds r7, #8 + 80063d6: 46bd mov sp, r7 + 80063d8: bd80 pop {r7, pc} + 80063da: bf00 nop + 80063dc: 20030000 .word 0x20030000 + +080063e0 : + +void HW_IPCC_SYS_CmdEvtNot(void) +{ + 80063e0: b580 push {r7, lr} + 80063e2: af00 add r7, sp, #0 + OutputDbgTrace(TL_MB_SYS_CMD_RSP, (uint8_t*)(TL_RefTable.p_sys_table->pcmd_buffer) ); + 80063e4: 4b07 ldr r3, [pc, #28] @ (8006404 ) + 80063e6: 68db ldr r3, [r3, #12] + 80063e8: 681b ldr r3, [r3, #0] + 80063ea: 4619 mov r1, r3 + 80063ec: 2007 movs r0, #7 + 80063ee: f000 f8d9 bl 80065a4 + + SYS_CMD_IoBusCallBackFunction( (TL_EvtPacket_t*)(TL_RefTable.p_sys_table->pcmd_buffer) ); + 80063f2: 4b05 ldr r3, [pc, #20] @ (8006408 ) + 80063f4: 681b ldr r3, [r3, #0] + 80063f6: 4a03 ldr r2, [pc, #12] @ (8006404 ) + 80063f8: 68d2 ldr r2, [r2, #12] + 80063fa: 6812 ldr r2, [r2, #0] + 80063fc: 4610 mov r0, r2 + 80063fe: 4798 blx r3 + + return; + 8006400: bf00 nop +} + 8006402: bd80 pop {r7, pc} + 8006404: 20030000 .word 0x20030000 + 8006408: 2000025c .word 0x2000025c + +0800640c : + +void HW_IPCC_SYS_EvtNot( void ) +{ + 800640c: b580 push {r7, lr} + 800640e: b082 sub sp, #8 + 8006410: af00 add r7, sp, #0 + TL_EvtPacket_t *p_evt; + + while(LST_is_empty(&SystemEvtQueue) == FALSE) + 8006412: e00e b.n 8006432 + { + LST_remove_head (&SystemEvtQueue, (tListNode **)&p_evt); + 8006414: 1d3b adds r3, r7, #4 + 8006416: 4619 mov r1, r3 + 8006418: 480b ldr r0, [pc, #44] @ (8006448 ) + 800641a: f000 f9e8 bl 80067ee + + OutputDbgTrace(TL_MB_SYS_ASYNCH_EVT, (uint8_t*)p_evt ); + 800641e: 687b ldr r3, [r7, #4] + 8006420: 4619 mov r1, r3 + 8006422: 2008 movs r0, #8 + 8006424: f000 f8be bl 80065a4 + + SYS_EVT_IoBusCallBackFunction( p_evt ); + 8006428: 4b08 ldr r3, [pc, #32] @ (800644c ) + 800642a: 681b ldr r3, [r3, #0] + 800642c: 687a ldr r2, [r7, #4] + 800642e: 4610 mov r0, r2 + 8006430: 4798 blx r3 + while(LST_is_empty(&SystemEvtQueue) == FALSE) + 8006432: 4805 ldr r0, [pc, #20] @ (8006448 ) + 8006434: f000 f94c bl 80066d0 + 8006438: 4603 mov r3, r0 + 800643a: 2b00 cmp r3, #0 + 800643c: d0ea beq.n 8006414 + } + + return; + 800643e: bf00 nop +} + 8006440: 3708 adds r7, #8 + 8006442: 46bd mov sp, r7 + 8006444: bd80 pop {r7, pc} + 8006446: bf00 nop + 8006448: 200300d0 .word 0x200300d0 + 800644c: 20000260 .word 0x20000260 + +08006450 : + +/****************************************************************************** + * MEMORY MANAGER + ******************************************************************************/ +void TL_MM_Init( TL_MM_Config_t *p_Config ) +{ + 8006450: b580 push {r7, lr} + 8006452: b082 sub sp, #8 + 8006454: af00 add r7, sp, #0 + 8006456: 6078 str r0, [r7, #4] + static MB_MemManagerTable_t * p_mem_manager_table; + + LST_init_head (&FreeBufQueue); + 8006458: 4817 ldr r0, [pc, #92] @ (80064b8 ) + 800645a: f000 f929 bl 80066b0 + LST_init_head (&LocalFreeBufQueue); + 800645e: 4817 ldr r0, [pc, #92] @ (80064bc ) + 8006460: f000 f926 bl 80066b0 + + p_mem_manager_table = TL_RefTable.p_mem_manager_table; + 8006464: 4b16 ldr r3, [pc, #88] @ (80064c0 ) + 8006466: 691b ldr r3, [r3, #16] + 8006468: 4a16 ldr r2, [pc, #88] @ (80064c4 ) + 800646a: 6013 str r3, [r2, #0] + + p_mem_manager_table->blepool = p_Config->p_AsynchEvtPool; + 800646c: 4b15 ldr r3, [pc, #84] @ (80064c4 ) + 800646e: 681b ldr r3, [r3, #0] + 8006470: 687a ldr r2, [r7, #4] + 8006472: 6892 ldr r2, [r2, #8] + 8006474: 609a str r2, [r3, #8] + p_mem_manager_table->blepoolsize = p_Config->AsynchEvtPoolSize; + 8006476: 4b13 ldr r3, [pc, #76] @ (80064c4 ) + 8006478: 681b ldr r3, [r3, #0] + 800647a: 687a ldr r2, [r7, #4] + 800647c: 68d2 ldr r2, [r2, #12] + 800647e: 60da str r2, [r3, #12] + p_mem_manager_table->pevt_free_buffer_queue = (uint8_t*)&FreeBufQueue; + 8006480: 4b10 ldr r3, [pc, #64] @ (80064c4 ) + 8006482: 681b ldr r3, [r3, #0] + 8006484: 4a0c ldr r2, [pc, #48] @ (80064b8 ) + 8006486: 611a str r2, [r3, #16] + p_mem_manager_table->spare_ble_buffer = p_Config->p_BleSpareEvtBuffer; + 8006488: 4b0e ldr r3, [pc, #56] @ (80064c4 ) + 800648a: 681b ldr r3, [r3, #0] + 800648c: 687a ldr r2, [r7, #4] + 800648e: 6812 ldr r2, [r2, #0] + 8006490: 601a str r2, [r3, #0] + p_mem_manager_table->spare_sys_buffer = p_Config->p_SystemSpareEvtBuffer; + 8006492: 4b0c ldr r3, [pc, #48] @ (80064c4 ) + 8006494: 681b ldr r3, [r3, #0] + 8006496: 687a ldr r2, [r7, #4] + 8006498: 6852 ldr r2, [r2, #4] + 800649a: 605a str r2, [r3, #4] + p_mem_manager_table->traces_evt_pool = p_Config->p_TracesEvtPool; + 800649c: 4b09 ldr r3, [pc, #36] @ (80064c4 ) + 800649e: 681b ldr r3, [r3, #0] + 80064a0: 687a ldr r2, [r7, #4] + 80064a2: 6912 ldr r2, [r2, #16] + 80064a4: 615a str r2, [r3, #20] + p_mem_manager_table->tracespoolsize = p_Config->TracesEvtPoolSize; + 80064a6: 4b07 ldr r3, [pc, #28] @ (80064c4 ) + 80064a8: 681b ldr r3, [r3, #0] + 80064aa: 687a ldr r2, [r7, #4] + 80064ac: 6952 ldr r2, [r2, #20] + 80064ae: 619a str r2, [r3, #24] + + return; + 80064b0: bf00 nop +} + 80064b2: 3708 adds r7, #8 + 80064b4: 46bd mov sp, r7 + 80064b6: bd80 pop {r7, pc} + 80064b8: 200300b8 .word 0x200300b8 + 80064bc: 2000024c .word 0x2000024c + 80064c0: 20030000 .word 0x20030000 + 80064c4: 20000264 .word 0x20000264 + +080064c8 : + +void TL_MM_EvtDone(TL_EvtPacket_t * phcievt) +{ + 80064c8: b580 push {r7, lr} + 80064ca: b082 sub sp, #8 + 80064cc: af00 add r7, sp, #0 + 80064ce: 6078 str r0, [r7, #4] + LST_insert_tail(&LocalFreeBufQueue, (tListNode *)phcievt); + 80064d0: 6879 ldr r1, [r7, #4] + 80064d2: 4807 ldr r0, [pc, #28] @ (80064f0 ) + 80064d4: f000 f944 bl 8006760 + + OutputDbgTrace(TL_MB_MM_RELEASE_BUFFER, (uint8_t*)phcievt); + 80064d8: 6879 ldr r1, [r7, #4] + 80064da: 2000 movs r0, #0 + 80064dc: f000 f862 bl 80065a4 + + HW_IPCC_MM_SendFreeBuf( SendFreeBuf ); + 80064e0: 4804 ldr r0, [pc, #16] @ (80064f4 ) + 80064e2: f000 ff99 bl 8007418 + + return; + 80064e6: bf00 nop +} + 80064e8: 3708 adds r7, #8 + 80064ea: 46bd mov sp, r7 + 80064ec: bd80 pop {r7, pc} + 80064ee: bf00 nop + 80064f0: 2000024c .word 0x2000024c + 80064f4: 080064f9 .word 0x080064f9 + +080064f8 : + +static void SendFreeBuf( void ) +{ + 80064f8: b580 push {r7, lr} + 80064fa: b082 sub sp, #8 + 80064fc: af00 add r7, sp, #0 + tListNode *p_node; + + while ( FALSE == LST_is_empty (&LocalFreeBufQueue) ) + 80064fe: e00c b.n 800651a + { + LST_remove_head( &LocalFreeBufQueue, (tListNode **)&p_node ); + 8006500: 1d3b adds r3, r7, #4 + 8006502: 4619 mov r1, r3 + 8006504: 480a ldr r0, [pc, #40] @ (8006530 ) + 8006506: f000 f972 bl 80067ee + LST_insert_tail( (tListNode*)(TL_RefTable.p_mem_manager_table->pevt_free_buffer_queue), p_node ); + 800650a: 4b0a ldr r3, [pc, #40] @ (8006534 ) + 800650c: 691b ldr r3, [r3, #16] + 800650e: 691b ldr r3, [r3, #16] + 8006510: 687a ldr r2, [r7, #4] + 8006512: 4611 mov r1, r2 + 8006514: 4618 mov r0, r3 + 8006516: f000 f923 bl 8006760 + while ( FALSE == LST_is_empty (&LocalFreeBufQueue) ) + 800651a: 4805 ldr r0, [pc, #20] @ (8006530 ) + 800651c: f000 f8d8 bl 80066d0 + 8006520: 4603 mov r3, r0 + 8006522: 2b00 cmp r3, #0 + 8006524: d0ec beq.n 8006500 + } + + return; + 8006526: bf00 nop +} + 8006528: 3708 adds r7, #8 + 800652a: 46bd mov sp, r7 + 800652c: bd80 pop {r7, pc} + 800652e: bf00 nop + 8006530: 2000024c .word 0x2000024c + 8006534: 20030000 .word 0x20030000 + +08006538 : + +/****************************************************************************** + * TRACES + ******************************************************************************/ +void TL_TRACES_Init( void ) +{ + 8006538: b580 push {r7, lr} + 800653a: af00 add r7, sp, #0 + LST_init_head (&TracesEvtQueue); + 800653c: 4805 ldr r0, [pc, #20] @ (8006554 ) + 800653e: f000 f8b7 bl 80066b0 + + TL_RefTable.p_traces_table->traces_queue = (uint8_t*)&TracesEvtQueue; + 8006542: 4b05 ldr r3, [pc, #20] @ (8006558 ) + 8006544: 695b ldr r3, [r3, #20] + 8006546: 4a03 ldr r2, [pc, #12] @ (8006554 ) + 8006548: 601a str r2, [r3, #0] + + HW_IPCC_TRACES_Init(); + 800654a: f000 ffb7 bl 80074bc + + return; + 800654e: bf00 nop +} + 8006550: bd80 pop {r7, pc} + 8006552: bf00 nop + 8006554: 200300c0 .word 0x200300c0 + 8006558: 20030000 .word 0x20030000 + +0800655c : + +void HW_IPCC_TRACES_EvtNot(void) +{ + 800655c: b580 push {r7, lr} + 800655e: b082 sub sp, #8 + 8006560: af00 add r7, sp, #0 + TL_EvtPacket_t *phcievt; + + while(LST_is_empty(&TracesEvtQueue) == FALSE) + 8006562: e008 b.n 8006576 + { + LST_remove_head (&TracesEvtQueue, (tListNode **)&phcievt); + 8006564: 1d3b adds r3, r7, #4 + 8006566: 4619 mov r1, r3 + 8006568: 4808 ldr r0, [pc, #32] @ (800658c ) + 800656a: f000 f940 bl 80067ee + TL_TRACES_EvtReceived( phcievt ); + 800656e: 687b ldr r3, [r7, #4] + 8006570: 4618 mov r0, r3 + 8006572: f000 f80d bl 8006590 + while(LST_is_empty(&TracesEvtQueue) == FALSE) + 8006576: 4805 ldr r0, [pc, #20] @ (800658c ) + 8006578: f000 f8aa bl 80066d0 + 800657c: 4603 mov r3, r0 + 800657e: 2b00 cmp r3, #0 + 8006580: d0f0 beq.n 8006564 + } + + return; + 8006582: bf00 nop +} + 8006584: 3708 adds r7, #8 + 8006586: 46bd mov sp, r7 + 8006588: bd80 pop {r7, pc} + 800658a: bf00 nop + 800658c: 200300c0 .word 0x200300c0 + +08006590 : + +__WEAK void TL_TRACES_EvtReceived( TL_EvtPacket_t * hcievt ) +{ + 8006590: b480 push {r7} + 8006592: b083 sub sp, #12 + 8006594: af00 add r7, sp, #0 + 8006596: 6078 str r0, [r7, #4] + (void)(hcievt); +} + 8006598: bf00 nop + 800659a: 370c adds r7, #12 + 800659c: 46bd mov sp, r7 + 800659e: f85d 7b04 ldr.w r7, [sp], #4 + 80065a2: 4770 bx lr + +080065a4 : + +/****************************************************************************** +* DEBUG INFORMATION +******************************************************************************/ +static void OutputDbgTrace(TL_MB_PacketType_t packet_type, uint8_t* buffer) +{ + 80065a4: b480 push {r7} + 80065a6: b087 sub sp, #28 + 80065a8: af00 add r7, sp, #0 + 80065aa: 4603 mov r3, r0 + 80065ac: 6039 str r1, [r7, #0] + 80065ae: 71fb strb r3, [r7, #7] + TL_EvtPacket_t *p_evt_packet; + TL_CmdPacket_t *p_cmd_packet; + TL_AclDataPacket_t *p_acldata_packet; + TL_EvtSerial_t *p_cmd_rsp_packet; + + switch(packet_type) + 80065b0: 79fb ldrb r3, [r7, #7] + 80065b2: 2b08 cmp r3, #8 + 80065b4: d84c bhi.n 8006650 + 80065b6: a201 add r2, pc, #4 @ (adr r2, 80065bc ) + 80065b8: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 80065bc: 080065e1 .word 0x080065e1 + 80065c0: 08006605 .word 0x08006605 + 80065c4: 08006611 .word 0x08006611 + 80065c8: 0800660b .word 0x0800660b + 80065cc: 08006651 .word 0x08006651 + 80065d0: 08006625 .word 0x08006625 + 80065d4: 08006631 .word 0x08006631 + 80065d8: 08006637 .word 0x08006637 + 80065dc: 08006645 .word 0x08006645 + { + case TL_MB_MM_RELEASE_BUFFER: + p_evt_packet = (TL_EvtPacket_t*)buffer; + 80065e0: 683b ldr r3, [r7, #0] + 80065e2: 617b str r3, [r7, #20] + switch(p_evt_packet->evtserial.evt.evtcode) + 80065e4: 697b ldr r3, [r7, #20] + 80065e6: 7a5b ldrb r3, [r3, #9] + 80065e8: 2bff cmp r3, #255 @ 0xff + 80065ea: d005 beq.n 80065f8 + 80065ec: 2bff cmp r3, #255 @ 0xff + 80065ee: dc05 bgt.n 80065fc + 80065f0: 2b0e cmp r3, #14 + 80065f2: d005 beq.n 8006600 + 80065f4: 2b0f cmp r3, #15 + break; + + default: + TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet); + break; + 80065f6: e001 b.n 80065fc + break; + 80065f8: bf00 nop + 80065fa: e02a b.n 8006652 + break; + 80065fc: bf00 nop + 80065fe: e028 b.n 8006652 + break; + 8006600: bf00 nop + } + + TL_MM_DBG_MSG("\r\n"); + break; + 8006602: e026 b.n 8006652 + + case TL_MB_BLE_CMD: + p_cmd_packet = (TL_CmdPacket_t*)buffer; + 8006604: 683b ldr r3, [r7, #0] + 8006606: 60fb str r3, [r7, #12] + TL_HCI_CMD_DBG_BUF(p_cmd_packet->cmdserial.cmd.payload, p_cmd_packet->cmdserial.cmd.plen, ""); + } + TL_HCI_CMD_DBG_MSG("\r\n"); + + TL_HCI_CMD_DBG_RAW(&p_cmd_packet->cmdserial, p_cmd_packet->cmdserial.cmd.plen+TL_CMD_HDR_SIZE); + break; + 8006608: e023 b.n 8006652 + + case TL_MB_ACL_DATA: + (void)p_acldata_packet; + p_acldata_packet = (TL_AclDataPacket_t*)buffer; + 800660a: 683b ldr r3, [r7, #0] + 800660c: 60bb str r3, [r7, #8] + TL_HCI_CMD_DBG_MSG(" payload:"); + TL_HCI_CMD_DBG_BUF(p_acldata_packet->AclDataSerial.acl_data, p_acldata_packet->AclDataSerial.length, ""); + }*/ + TL_HCI_CMD_DBG_MSG("\r\n"); + /*TL_HCI_CMD_DBG_RAW(&p_acldata_packet->AclDataSerial, p_acldata_packet->AclDataSerial.length+TL_CMD_HDR_SIZE);*/ + break; + 800660e: e020 b.n 8006652 + TL_HCI_CMD_DBG_MSG(" ACL Data Tx Ack received") + TL_HCI_CMD_DBG_MSG("\r\n"); + break; + + case TL_MB_BLE_CMD_RSP: + p_evt_packet = (TL_EvtPacket_t*)buffer; + 8006610: 683b ldr r3, [r7, #0] + 8006612: 617b str r3, [r7, #20] + switch(p_evt_packet->evtserial.evt.evtcode) + 8006614: 697b ldr r3, [r7, #20] + 8006616: 7a5b ldrb r3, [r3, #9] + 8006618: 2b0e cmp r3, #14 + 800661a: d001 beq.n 8006620 + 800661c: 2b0f cmp r3, #15 + } + break; + + default: + TL_HCI_CMD_DBG_MSG("unknown ble rsp received: %02X", p_evt_packet->evtserial.evt.evtcode); + break; + 800661e: e000 b.n 8006622 + break; + 8006620: bf00 nop + } + + TL_HCI_CMD_DBG_MSG("\r\n"); + + TL_HCI_CMD_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE); + break; + 8006622: e016 b.n 8006652 + + case TL_MB_BLE_ASYNCH_EVT: + p_evt_packet = (TL_EvtPacket_t*)buffer; + 8006624: 683b ldr r3, [r7, #0] + 8006626: 617b str r3, [r7, #20] + if(p_evt_packet->evtserial.evt.evtcode != TL_BLEEVT_VS_OPCODE) + 8006628: 697b ldr r3, [r7, #20] + 800662a: 7a5b ldrb r3, [r3, #9] + 800662c: 2bff cmp r3, #255 @ 0xff + } + + TL_HCI_EVT_DBG_MSG("\r\n"); + + TL_HCI_EVT_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE); + break; + 800662e: e010 b.n 8006652 + + case TL_MB_SYS_CMD: + p_cmd_packet = (TL_CmdPacket_t*)buffer; + 8006630: 683b ldr r3, [r7, #0] + 8006632: 60fb str r3, [r7, #12] + TL_SHCI_CMD_DBG_BUF(p_cmd_packet->cmdserial.cmd.payload, p_cmd_packet->cmdserial.cmd.plen, ""); + } + TL_SHCI_CMD_DBG_MSG("\r\n"); + + TL_SHCI_CMD_DBG_RAW(&p_cmd_packet->cmdserial, p_cmd_packet->cmdserial.cmd.plen+TL_CMD_HDR_SIZE); + break; + 8006634: e00d b.n 8006652 + + case TL_MB_SYS_CMD_RSP: + p_cmd_rsp_packet = (TL_EvtSerial_t*)buffer; + 8006636: 683b ldr r3, [r7, #0] + 8006638: 613b str r3, [r7, #16] + switch(p_cmd_rsp_packet->evt.evtcode) + 800663a: 693b ldr r3, [r7, #16] + 800663c: 785b ldrb r3, [r3, #1] + 800663e: 2b0e cmp r3, #14 + } + break; + + default: + TL_SHCI_CMD_DBG_MSG("unknown sys rsp received: %02X", p_cmd_rsp_packet->evt.evtcode); + break; + 8006640: bf00 nop + } + + TL_SHCI_CMD_DBG_MSG("\r\n"); + + TL_SHCI_CMD_DBG_RAW(&p_cmd_rsp_packet->evt, p_cmd_rsp_packet->evt.plen+TL_EVT_HDR_SIZE); + break; + 8006642: e006 b.n 8006652 + + case TL_MB_SYS_ASYNCH_EVT: + p_evt_packet = (TL_EvtPacket_t*)buffer; + 8006644: 683b ldr r3, [r7, #0] + 8006646: 617b str r3, [r7, #20] + if(p_evt_packet->evtserial.evt.evtcode != TL_BLEEVT_VS_OPCODE) + 8006648: 697b ldr r3, [r7, #20] + 800664a: 7a5b ldrb r3, [r3, #9] + 800664c: 2bff cmp r3, #255 @ 0xff + } + + TL_SHCI_EVT_DBG_MSG("\r\n"); + + TL_SHCI_EVT_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE); + break; + 800664e: e000 b.n 8006652 + + default: + break; + 8006650: bf00 nop + } + + return; + 8006652: bf00 nop +} + 8006654: 371c adds r7, #28 + 8006656: 46bd mov sp, r7 + 8006658: f85d 7b04 ldr.w r7, [sp], #4 + 800665c: 4770 bx lr + 800665e: bf00 nop + +08006660 : +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Functions Definition ------------------------------------------------------*/ + +uint8_t * OTP_Read( uint8_t id ) +{ + 8006660: b480 push {r7} + 8006662: b085 sub sp, #20 + 8006664: af00 add r7, sp, #0 + 8006666: 4603 mov r3, r0 + 8006668: 71fb strb r3, [r7, #7] + uint8_t *p_id; + + p_id = (uint8_t*)(CFG_OTP_END_ADRESS - 7) ; + 800666a: 4b0f ldr r3, [pc, #60] @ (80066a8 ) + 800666c: 60fb str r3, [r7, #12] + + while( ((*( p_id + 7 )) != id) && ( p_id != (uint8_t*)CFG_OTP_BASE_ADDRESS) ) + 800666e: e002 b.n 8006676 + { + p_id -= 8 ; + 8006670: 68fb ldr r3, [r7, #12] + 8006672: 3b08 subs r3, #8 + 8006674: 60fb str r3, [r7, #12] + while( ((*( p_id + 7 )) != id) && ( p_id != (uint8_t*)CFG_OTP_BASE_ADDRESS) ) + 8006676: 68fb ldr r3, [r7, #12] + 8006678: 3307 adds r3, #7 + 800667a: 781b ldrb r3, [r3, #0] + 800667c: 79fa ldrb r2, [r7, #7] + 800667e: 429a cmp r2, r3 + 8006680: d003 beq.n 800668a + 8006682: 68fb ldr r3, [r7, #12] + 8006684: 4a09 ldr r2, [pc, #36] @ (80066ac ) + 8006686: 4293 cmp r3, r2 + 8006688: d1f2 bne.n 8006670 + } + + if((*( p_id + 7 )) != id) + 800668a: 68fb ldr r3, [r7, #12] + 800668c: 3307 adds r3, #7 + 800668e: 781b ldrb r3, [r3, #0] + 8006690: 79fa ldrb r2, [r7, #7] + 8006692: 429a cmp r2, r3 + 8006694: d001 beq.n 800669a + { + p_id = 0 ; + 8006696: 2300 movs r3, #0 + 8006698: 60fb str r3, [r7, #12] + } + + return p_id ; + 800669a: 68fb ldr r3, [r7, #12] +} + 800669c: 4618 mov r0, r3 + 800669e: 3714 adds r7, #20 + 80066a0: 46bd mov sp, r7 + 80066a2: f85d 7b04 ldr.w r7, [sp], #4 + 80066a6: 4770 bx lr + 80066a8: 1fff73f8 .word 0x1fff73f8 + 80066ac: 1fff7000 .word 0x1fff7000 + +080066b0 : + +/****************************************************************************** + * Function Definitions + ******************************************************************************/ +void LST_init_head (tListNode * listHead) +{ + 80066b0: b480 push {r7} + 80066b2: b083 sub sp, #12 + 80066b4: af00 add r7, sp, #0 + 80066b6: 6078 str r0, [r7, #4] + listHead->next = listHead; + 80066b8: 687b ldr r3, [r7, #4] + 80066ba: 687a ldr r2, [r7, #4] + 80066bc: 601a str r2, [r3, #0] + listHead->prev = listHead; + 80066be: 687b ldr r3, [r7, #4] + 80066c0: 687a ldr r2, [r7, #4] + 80066c2: 605a str r2, [r3, #4] +} + 80066c4: bf00 nop + 80066c6: 370c adds r7, #12 + 80066c8: 46bd mov sp, r7 + 80066ca: f85d 7b04 ldr.w r7, [sp], #4 + 80066ce: 4770 bx lr + +080066d0 : + +uint8_t LST_is_empty (tListNode * listHead) +{ + 80066d0: b480 push {r7} + 80066d2: b087 sub sp, #28 + 80066d4: af00 add r7, sp, #0 + 80066d6: 6078 str r0, [r7, #4] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80066d8: f3ef 8310 mrs r3, PRIMASK + 80066dc: 60fb str r3, [r7, #12] + return(result); + 80066de: 68fb ldr r3, [r7, #12] + uint32_t primask_bit; + uint8_t return_value; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + 80066e0: 613b str r3, [r7, #16] + __ASM volatile ("cpsid i" : : : "memory"); + 80066e2: b672 cpsid i +} + 80066e4: bf00 nop + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + if(listHead->next == listHead) + 80066e6: 687b ldr r3, [r7, #4] + 80066e8: 681b ldr r3, [r3, #0] + 80066ea: 687a ldr r2, [r7, #4] + 80066ec: 429a cmp r2, r3 + 80066ee: d102 bne.n 80066f6 + { + return_value = TRUE; + 80066f0: 2301 movs r3, #1 + 80066f2: 75fb strb r3, [r7, #23] + 80066f4: e001 b.n 80066fa + } + else + { + return_value = FALSE; + 80066f6: 2300 movs r3, #0 + 80066f8: 75fb strb r3, [r7, #23] + 80066fa: 693b ldr r3, [r7, #16] + 80066fc: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80066fe: 68bb ldr r3, [r7, #8] + 8006700: f383 8810 msr PRIMASK, r3 +} + 8006704: bf00 nop + } + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ + + return return_value; + 8006706: 7dfb ldrb r3, [r7, #23] +} + 8006708: 4618 mov r0, r3 + 800670a: 371c adds r7, #28 + 800670c: 46bd mov sp, r7 + 800670e: f85d 7b04 ldr.w r7, [sp], #4 + 8006712: 4770 bx lr + +08006714 : + +void LST_insert_head (tListNode * listHead, tListNode * node) +{ + 8006714: b480 push {r7} + 8006716: b087 sub sp, #28 + 8006718: af00 add r7, sp, #0 + 800671a: 6078 str r0, [r7, #4] + 800671c: 6039 str r1, [r7, #0] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 800671e: f3ef 8310 mrs r3, PRIMASK + 8006722: 60fb str r3, [r7, #12] + return(result); + 8006724: 68fb ldr r3, [r7, #12] + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + 8006726: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 8006728: b672 cpsid i +} + 800672a: bf00 nop + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + node->next = listHead->next; + 800672c: 687b ldr r3, [r7, #4] + 800672e: 681a ldr r2, [r3, #0] + 8006730: 683b ldr r3, [r7, #0] + 8006732: 601a str r2, [r3, #0] + node->prev = listHead; + 8006734: 683b ldr r3, [r7, #0] + 8006736: 687a ldr r2, [r7, #4] + 8006738: 605a str r2, [r3, #4] + listHead->next = node; + 800673a: 687b ldr r3, [r7, #4] + 800673c: 683a ldr r2, [r7, #0] + 800673e: 601a str r2, [r3, #0] + (node->next)->prev = node; + 8006740: 683b ldr r3, [r7, #0] + 8006742: 681b ldr r3, [r3, #0] + 8006744: 683a ldr r2, [r7, #0] + 8006746: 605a str r2, [r3, #4] + 8006748: 697b ldr r3, [r7, #20] + 800674a: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 800674c: 693b ldr r3, [r7, #16] + 800674e: f383 8810 msr PRIMASK, r3 +} + 8006752: bf00 nop + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + 8006754: bf00 nop + 8006756: 371c adds r7, #28 + 8006758: 46bd mov sp, r7 + 800675a: f85d 7b04 ldr.w r7, [sp], #4 + 800675e: 4770 bx lr + +08006760 : + + +void LST_insert_tail (tListNode * listHead, tListNode * node) +{ + 8006760: b480 push {r7} + 8006762: b087 sub sp, #28 + 8006764: af00 add r7, sp, #0 + 8006766: 6078 str r0, [r7, #4] + 8006768: 6039 str r1, [r7, #0] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 800676a: f3ef 8310 mrs r3, PRIMASK + 800676e: 60fb str r3, [r7, #12] + return(result); + 8006770: 68fb ldr r3, [r7, #12] + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + 8006772: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 8006774: b672 cpsid i +} + 8006776: bf00 nop + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + node->next = listHead; + 8006778: 683b ldr r3, [r7, #0] + 800677a: 687a ldr r2, [r7, #4] + 800677c: 601a str r2, [r3, #0] + node->prev = listHead->prev; + 800677e: 687b ldr r3, [r7, #4] + 8006780: 685a ldr r2, [r3, #4] + 8006782: 683b ldr r3, [r7, #0] + 8006784: 605a str r2, [r3, #4] + listHead->prev = node; + 8006786: 687b ldr r3, [r7, #4] + 8006788: 683a ldr r2, [r7, #0] + 800678a: 605a str r2, [r3, #4] + (node->prev)->next = node; + 800678c: 683b ldr r3, [r7, #0] + 800678e: 685b ldr r3, [r3, #4] + 8006790: 683a ldr r2, [r7, #0] + 8006792: 601a str r2, [r3, #0] + 8006794: 697b ldr r3, [r7, #20] + 8006796: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8006798: 693b ldr r3, [r7, #16] + 800679a: f383 8810 msr PRIMASK, r3 +} + 800679e: bf00 nop + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + 80067a0: bf00 nop + 80067a2: 371c adds r7, #28 + 80067a4: 46bd mov sp, r7 + 80067a6: f85d 7b04 ldr.w r7, [sp], #4 + 80067aa: 4770 bx lr + +080067ac : + + +void LST_remove_node (tListNode * node) +{ + 80067ac: b480 push {r7} + 80067ae: b087 sub sp, #28 + 80067b0: af00 add r7, sp, #0 + 80067b2: 6078 str r0, [r7, #4] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80067b4: f3ef 8310 mrs r3, PRIMASK + 80067b8: 60fb str r3, [r7, #12] + return(result); + 80067ba: 68fb ldr r3, [r7, #12] + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + 80067bc: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 80067be: b672 cpsid i +} + 80067c0: bf00 nop + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + (node->prev)->next = node->next; + 80067c2: 687b ldr r3, [r7, #4] + 80067c4: 685b ldr r3, [r3, #4] + 80067c6: 687a ldr r2, [r7, #4] + 80067c8: 6812 ldr r2, [r2, #0] + 80067ca: 601a str r2, [r3, #0] + (node->next)->prev = node->prev; + 80067cc: 687b ldr r3, [r7, #4] + 80067ce: 681b ldr r3, [r3, #0] + 80067d0: 687a ldr r2, [r7, #4] + 80067d2: 6852 ldr r2, [r2, #4] + 80067d4: 605a str r2, [r3, #4] + 80067d6: 697b ldr r3, [r7, #20] + 80067d8: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80067da: 693b ldr r3, [r7, #16] + 80067dc: f383 8810 msr PRIMASK, r3 +} + 80067e0: bf00 nop + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + 80067e2: bf00 nop + 80067e4: 371c adds r7, #28 + 80067e6: 46bd mov sp, r7 + 80067e8: f85d 7b04 ldr.w r7, [sp], #4 + 80067ec: 4770 bx lr + +080067ee : + + +void LST_remove_head (tListNode * listHead, tListNode ** node ) +{ + 80067ee: b580 push {r7, lr} + 80067f0: b086 sub sp, #24 + 80067f2: af00 add r7, sp, #0 + 80067f4: 6078 str r0, [r7, #4] + 80067f6: 6039 str r1, [r7, #0] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80067f8: f3ef 8310 mrs r3, PRIMASK + 80067fc: 60fb str r3, [r7, #12] + return(result); + 80067fe: 68fb ldr r3, [r7, #12] + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + 8006800: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 8006802: b672 cpsid i +} + 8006804: bf00 nop + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + *node = listHead->next; + 8006806: 687b ldr r3, [r7, #4] + 8006808: 681a ldr r2, [r3, #0] + 800680a: 683b ldr r3, [r7, #0] + 800680c: 601a str r2, [r3, #0] + LST_remove_node (listHead->next); + 800680e: 687b ldr r3, [r7, #4] + 8006810: 681b ldr r3, [r3, #0] + 8006812: 4618 mov r0, r3 + 8006814: f7ff ffca bl 80067ac + 8006818: 697b ldr r3, [r7, #20] + 800681a: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 800681c: 693b ldr r3, [r7, #16] + 800681e: f383 8810 msr PRIMASK, r3 +} + 8006822: bf00 nop + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + 8006824: bf00 nop + 8006826: 3718 adds r7, #24 + 8006828: 46bd mov sp, r7 + 800682a: bd80 pop {r7, pc} + +0800682c : + * @note The 64-bit UID64 may be used by Firmware to derive BLE 48-bit Device Address EUI-48 or + * 802.15.4 64-bit Device Address EUI-64. + * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF + */ +__STATIC_INLINE uint32_t LL_FLASH_GetUDN(void) +{ + 800682c: b480 push {r7} + 800682e: af00 add r7, sp, #0 + return (uint32_t)(READ_REG(*((uint32_t *)UID64_BASE))); + 8006830: 4b03 ldr r3, [pc, #12] @ (8006840 ) + 8006832: 681b ldr r3, [r3, #0] +} + 8006834: 4618 mov r0, r3 + 8006836: 46bd mov sp, r7 + 8006838: f85d 7b04 ldr.w r7, [sp], #4 + 800683c: 4770 bx lr + 800683e: bf00 nop + 8006840: 1fff7580 .word 0x1fff7580 + +08006844 : + * 802.15.4 64-bit Device Address EUI-64. + * For STM32WBxxxx devices, the device ID is 0x26 + * @retval Values between Min_Data=0x00 and Max_Data=0xFF (ex: Device ID is 0x26 for STM32WB55x) + */ +__STATIC_INLINE uint32_t LL_FLASH_GetDeviceID(void) +{ + 8006844: b480 push {r7} + 8006846: af00 add r7, sp, #0 + return (uint32_t)((READ_REG(*((uint32_t *)UID64_BASE + 1U))) & 0x000000FFU); + 8006848: 4b03 ldr r3, [pc, #12] @ (8006858 ) + 800684a: 681b ldr r3, [r3, #0] + 800684c: b2db uxtb r3, r3 +} + 800684e: 4618 mov r0, r3 + 8006850: 46bd mov sp, r7 + 8006852: f85d 7b04 ldr.w r7, [sp], #4 + 8006856: 4770 bx lr + 8006858: 1fff7584 .word 0x1fff7584 + +0800685c : + * 802.15.4 64-bit Device Address EUI-64. + * For STM32WBxxxx devices, the ST Company ID is 0x0080E1 + * @retval Values between Min_Data=0x00 and Max_Data=0xFFFFFF (ex: ST Company ID is 0x0080E1) + */ +__STATIC_INLINE uint32_t LL_FLASH_GetSTCompanyID(void) +{ + 800685c: b480 push {r7} + 800685e: af00 add r7, sp, #0 + return (uint32_t)(((READ_REG(*((uint32_t *)UID64_BASE + 1U))) >> 8U) & 0x00FFFFFFU); + 8006860: 4b03 ldr r3, [pc, #12] @ (8006870 ) + 8006862: 681b ldr r3, [r3, #0] + 8006864: 0a1b lsrs r3, r3, #8 +} + 8006866: 4618 mov r0, r3 + 8006868: 46bd mov sp, r7 + 800686a: f85d 7b04 ldr.w r7, [sp], #4 + 800686e: 4770 bx lr + 8006870: 1fff7584 .word 0x1fff7584 + +08006874 : + +/* USER CODE END EV */ + +/* Functions Definition ------------------------------------------------------*/ +void APP_BLE_Init(void) +{ + 8006874: b5b0 push {r4, r5, r7, lr} + 8006876: b090 sub sp, #64 @ 0x40 + 8006878: af00 add r7, sp, #0 + SHCI_CmdStatus_t status; +#if (RADIO_ACTIVITY_EVENT != 0) + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + 800687a: 2392 movs r3, #146 @ 0x92 + 800687c: f887 303f strb.w r3, [r7, #63] @ 0x3f +#endif /* RADIO_ACTIVITY_EVENT != 0 */ + /* USER CODE BEGIN APP_BLE_Init_1 */ + + /* USER CODE END APP_BLE_Init_1 */ + SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = + 8006880: 4b2f ldr r3, [pc, #188] @ (8006940 ) + 8006882: 463c mov r4, r7 + 8006884: 461d mov r5, r3 + 8006886: cd0f ldmia r5!, {r0, r1, r2, r3} + 8006888: c40f stmia r4!, {r0, r1, r2, r3} + 800688a: cd0f ldmia r5!, {r0, r1, r2, r3} + 800688c: c40f stmia r4!, {r0, r1, r2, r3} + 800688e: cd0f ldmia r5!, {r0, r1, r2, r3} + 8006890: c40f stmia r4!, {r0, r1, r2, r3} + 8006892: e895 0007 ldmia.w r5, {r0, r1, r2} + 8006896: c403 stmia r4!, {r0, r1} + 8006898: 8022 strh r2, [r4, #0] + 800689a: 3402 adds r4, #2 + 800689c: 0c13 lsrs r3, r2, #16 + 800689e: 7023 strb r3, [r4, #0] + }; + + /** + * Initialize Ble Transport Layer + */ + Ble_Tl_Init(); + 80068a0: f000 f918 bl 8006ad4 + + /** + * Do not allow standby in the application + */ + UTIL_LPM_SetOffMode(1 << CFG_LPM_APP_BLE, UTIL_LPM_DISABLE); + 80068a4: 2101 movs r1, #1 + 80068a6: 2002 movs r0, #2 + 80068a8: f000 fe40 bl 800752c + + /** + * Register the hci transport layer to handle BLE User Asynchronous Events + */ + UTIL_SEQ_RegTask(1<) + 80068ae: 2100 movs r1, #0 + 80068b0: 2002 movs r0, #2 + 80068b2: f000 ffed bl 8007890 + + /** + * Starts the BLE Stack on CPU2 + */ + status = SHCI_C2_BLE_Init(&ble_init_cmd_packet); + 80068b6: 463b mov r3, r7 + 80068b8: 4618 mov r0, r3 + 80068ba: f7ff f8b7 bl 8005a2c + 80068be: 4603 mov r3, r0 + 80068c0: f887 303e strb.w r3, [r7, #62] @ 0x3e + if (status != SHCI_Success) + 80068c4: f897 303e ldrb.w r3, [r7, #62] @ 0x3e + 80068c8: 2b00 cmp r3, #0 + 80068ca: d001 beq.n 80068d0 + { + APP_DBG_MSG(" Fail : SHCI_C2_BLE_Init command, result: 0x%02x\n\r", status); + /* if you are here, maybe CPU2 doesn't contain STM32WB_Copro_Wireless_Binaries, see Release_Notes.html */ + Error_Handler(); + 80068cc: f7fa fe26 bl 800151c + } + + /** + * Initialization of HCI & GATT & GAP layer + */ + Ble_Hci_Gap_Gatt_Init(); + 80068d0: f000 f916 bl 8006b00 + + /** + * Initialization of the BLE Services + */ + SVCCTL_Init(); + 80068d4: f7ff f804 bl 80058e0 + + /** + * Initialization of the BLE App Context + */ + BleApplicationContext.Device_Connection_Status = APP_BLE_IDLE; + 80068d8: 4b1b ldr r3, [pc, #108] @ (8006948 ) + 80068da: 2200 movs r2, #0 + 80068dc: f883 2080 strb.w r2, [r3, #128] @ 0x80 + BleApplicationContext.BleApplicationContext_legacy.connectionHandle = 0xFFFF; + 80068e0: 4b19 ldr r3, [pc, #100] @ (8006948 ) + 80068e2: f64f 72ff movw r2, #65535 @ 0xffff + 80068e6: 82da strh r2, [r3, #22] + + /** + * From here, all initialization are BLE application specific + */ + UTIL_SEQ_RegTask(1<) + 80068ea: 2100 movs r1, #0 + 80068ec: 2001 movs r0, #1 + 80068ee: f000 ffcf bl 8007890 +#if (BLE_CFG_OTA_REBOOT_CHAR != 0) + a_ManufData[sizeof(a_ManufData)-8] = CFG_FEATURE_OTA_REBOOT; +#endif /* BLE_CFG_OTA_REBOOT_CHAR != 0 */ + +#if (RADIO_ACTIVITY_EVENT != 0) + ret = aci_hal_set_radio_activity_mask(0x0006); + 80068f2: 2006 movs r0, #6 + 80068f4: f7fe fce4 bl 80052c0 + 80068f8: 4603 mov r3, r0 + 80068fa: f887 303f strb.w r3, [r7, #63] @ 0x3f +#endif /* L2CAP_REQUEST_NEW_CONN_PARAM != 0 */ + + /** + * Initialize P2P Server Application + */ + P2PS_APP_Init(); + 80068fe: f000 fb37 bl 8006f70 + /* USER CODE END APP_BLE_Init_3 */ + + /** + * Create timer to handle the Advertising Stop + */ + HW_TS_Create(CFG_TIM_PROC_ID_ISR, &(BleApplicationContext.Advertising_mgr_timer_Id), hw_ts_SingleShot, Adv_Cancel_Req); + 8006902: 4b13 ldr r3, [pc, #76] @ (8006950 ) + 8006904: 2200 movs r2, #0 + 8006906: 4913 ldr r1, [pc, #76] @ (8006954 ) + 8006908: 2000 movs r0, #0 + 800690a: f7fa facb bl 8000ea4 + /** + * Create timer to handle the Led Switch OFF + */ + HW_TS_Create(CFG_TIM_PROC_ID_ISR, &(BleApplicationContext.SwitchOffGPIO_timer_Id), hw_ts_SingleShot, Switch_OFF_GPIO); + 800690e: 4b12 ldr r3, [pc, #72] @ (8006958 ) + 8006910: 2200 movs r2, #0 + 8006912: 4912 ldr r1, [pc, #72] @ (800695c ) + 8006914: 2000 movs r0, #0 + 8006916: f7fa fac5 bl 8000ea4 + + /** + * Make device discoverable + */ + BleApplicationContext.BleApplicationContext_legacy.advtServUUID[0] = NULL; + 800691a: 4b0b ldr r3, [pc, #44] @ (8006948 ) + 800691c: 2200 movs r2, #0 + 800691e: 765a strb r2, [r3, #25] + BleApplicationContext.BleApplicationContext_legacy.advtServUUIDlen = 0; + 8006920: 4b09 ldr r3, [pc, #36] @ (8006948 ) + 8006922: 2200 movs r2, #0 + 8006924: 761a strb r2, [r3, #24] + + /* Initialize intervals for reconnexion without intervals update */ + AdvIntervalMin = CFG_FAST_CONN_ADV_INTERVAL_MIN; + 8006926: 4b0e ldr r3, [pc, #56] @ (8006960 ) + 8006928: 2280 movs r2, #128 @ 0x80 + 800692a: 801a strh r2, [r3, #0] + AdvIntervalMax = CFG_FAST_CONN_ADV_INTERVAL_MAX; + 800692c: 4b0d ldr r3, [pc, #52] @ (8006964 ) + 800692e: 22a0 movs r2, #160 @ 0xa0 + 8006930: 801a strh r2, [r3, #0] + + /** + * Start to Advertise to be connected by P2P Client + */ + Adv_Request(APP_BLE_FAST_ADV); + 8006932: 2001 movs r0, #1 + 8006934: f000 f9b6 bl 8006ca4 + + /* USER CODE BEGIN APP_BLE_Init_2 */ + + /* USER CODE END APP_BLE_Init_2 */ + + return; + 8006938: bf00 nop +} + 800693a: 3740 adds r7, #64 @ 0x40 + 800693c: 46bd mov sp, r7 + 800693e: bdb0 pop {r4, r5, r7, pc} + 8006940: 08007bfc .word 0x08007bfc + 8006944: 08005c49 .word 0x08005c49 + 8006948: 20000270 .word 0x20000270 + 800694c: 08006e0d .word 0x08006e0d + 8006950: 08006e41 .word 0x08006e41 + 8006954: 200002f1 .word 0x200002f1 + 8006958: 08006e51 .word 0x08006e51 + 800695c: 200002f2 .word 0x200002f2 + 8006960: 200002f4 .word 0x200002f4 + 8006964: 200002f6 .word 0x200002f6 + +08006968 : + +SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification(void *p_Pckt) +{ + 8006968: b580 push {r7, lr} + 800696a: b08a sub sp, #40 @ 0x28 + 800696c: af00 add r7, sp, #0 + 800696e: 6078 str r0, [r7, #4] + hci_event_pckt *p_event_pckt; + evt_le_meta_event *p_meta_evt; + evt_blecore_aci *p_blecore_evt; + uint8_t Tx_phy, Rx_phy; + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + 8006970: 2392 movs r3, #146 @ 0x92 + 8006972: f887 3027 strb.w r3, [r7, #39] @ 0x27 + + /* USER CODE BEGIN SVCCTL_App_Notification */ + + /* USER CODE END SVCCTL_App_Notification */ + + p_event_pckt = (hci_event_pckt*) ((hci_uart_pckt *) p_Pckt)->data; + 8006976: 687b ldr r3, [r7, #4] + 8006978: 3301 adds r3, #1 + 800697a: 623b str r3, [r7, #32] + + switch (p_event_pckt->evt) + 800697c: 6a3b ldr r3, [r7, #32] + 800697e: 781b ldrb r3, [r3, #0] + 8006980: 2bff cmp r3, #255 @ 0xff + 8006982: d076 beq.n 8006a72 + 8006984: 2bff cmp r3, #255 @ 0xff + 8006986: f300 8098 bgt.w 8006aba + 800698a: 2b05 cmp r3, #5 + 800698c: d002 beq.n 8006994 + 800698e: 2b3e cmp r3, #62 @ 0x3e + 8006990: d020 beq.n 80069d4 + + default: + /* USER CODE BEGIN ECODE_DEFAULT*/ + + /* USER CODE END ECODE_DEFAULT*/ + break; + 8006992: e092 b.n 8006aba + p_disconnection_complete_event = (hci_disconnection_complete_event_rp0 *) p_event_pckt->data; + 8006994: 6a3b ldr r3, [r7, #32] + 8006996: 3302 adds r3, #2 + 8006998: 60fb str r3, [r7, #12] + if (p_disconnection_complete_event->Connection_Handle == BleApplicationContext.BleApplicationContext_legacy.connectionHandle) + 800699a: 68fb ldr r3, [r7, #12] + 800699c: f8b3 3001 ldrh.w r3, [r3, #1] + 80069a0: b29a uxth r2, r3 + 80069a2: 4b4a ldr r3, [pc, #296] @ (8006acc ) + 80069a4: 8adb ldrh r3, [r3, #22] + 80069a6: 429a cmp r2, r3 + 80069a8: d106 bne.n 80069b8 + BleApplicationContext.BleApplicationContext_legacy.connectionHandle = 0; + 80069aa: 4b48 ldr r3, [pc, #288] @ (8006acc ) + 80069ac: 2200 movs r2, #0 + 80069ae: 82da strh r2, [r3, #22] + BleApplicationContext.Device_Connection_Status = APP_BLE_IDLE; + 80069b0: 4b46 ldr r3, [pc, #280] @ (8006acc ) + 80069b2: 2200 movs r2, #0 + 80069b4: f883 2080 strb.w r2, [r3, #128] @ 0x80 + Adv_Request(APP_BLE_FAST_ADV); + 80069b8: 2001 movs r0, #1 + 80069ba: f000 f973 bl 8006ca4 + HandleNotification.P2P_Evt_Opcode = PEER_DISCON_HANDLE_EVT; + 80069be: 4b44 ldr r3, [pc, #272] @ (8006ad0 ) + 80069c0: 2201 movs r2, #1 + 80069c2: 701a strb r2, [r3, #0] + HandleNotification.ConnectionHandle = BleApplicationContext.BleApplicationContext_legacy.connectionHandle; + 80069c4: 4b41 ldr r3, [pc, #260] @ (8006acc ) + 80069c6: 8ada ldrh r2, [r3, #22] + 80069c8: 4b41 ldr r3, [pc, #260] @ (8006ad0 ) + 80069ca: 805a strh r2, [r3, #2] + P2PS_APP_Notification(&HandleNotification); + 80069cc: 4840 ldr r0, [pc, #256] @ (8006ad0 ) + 80069ce: f000 fabb bl 8006f48 + break; /* HCI_DISCONNECTION_COMPLETE_EVT_CODE */ + 80069d2: e075 b.n 8006ac0 + p_meta_evt = (evt_le_meta_event*) p_event_pckt->data; + 80069d4: 6a3b ldr r3, [r7, #32] + 80069d6: 3302 adds r3, #2 + 80069d8: 61bb str r3, [r7, #24] + switch (p_meta_evt->subevent) + 80069da: 69bb ldr r3, [r7, #24] + 80069dc: 781b ldrb r3, [r3, #0] + 80069de: 2b0c cmp r3, #12 + 80069e0: d005 beq.n 80069ee + 80069e2: 2b0c cmp r3, #12 + 80069e4: dc41 bgt.n 8006a6a + 80069e6: 2b01 cmp r3, #1 + 80069e8: d017 beq.n 8006a1a + 80069ea: 2b03 cmp r3, #3 + break; + 80069ec: e03d b.n 8006a6a + p_evt_le_phy_update_complete = (hci_le_phy_update_complete_event_rp0*)p_meta_evt->data; + 80069ee: 69bb ldr r3, [r7, #24] + 80069f0: 3301 adds r3, #1 + 80069f2: 617b str r3, [r7, #20] + ret = hci_le_read_phy(BleApplicationContext.BleApplicationContext_legacy.connectionHandle, &Tx_phy, &Rx_phy); + 80069f4: 4b35 ldr r3, [pc, #212] @ (8006acc ) + 80069f6: 8adb ldrh r3, [r3, #22] + 80069f8: f107 020a add.w r2, r7, #10 + 80069fc: f107 010b add.w r1, r7, #11 + 8006a00: 4618 mov r0, r3 + 8006a02: f7fe fcd5 bl 80053b0 + 8006a06: 4603 mov r3, r0 + 8006a08: f887 3027 strb.w r3, [r7, #39] @ 0x27 + if (ret != BLE_STATUS_SUCCESS) + 8006a0c: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 + 8006a10: 2b00 cmp r3, #0 + 8006a12: d12c bne.n 8006a6e + if ((Tx_phy == TX_2M) && (Rx_phy == RX_2M)) + 8006a14: 7afb ldrb r3, [r7, #11] + 8006a16: 2b02 cmp r3, #2 + break; + 8006a18: e029 b.n 8006a6e + p_connection_complete_event = (hci_le_connection_complete_event_rp0 *) p_meta_evt->data; + 8006a1a: 69bb ldr r3, [r7, #24] + 8006a1c: 3301 adds r3, #1 + 8006a1e: 613b str r3, [r7, #16] + HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id); + 8006a20: 4b2a ldr r3, [pc, #168] @ (8006acc ) + 8006a22: f893 3081 ldrb.w r3, [r3, #129] @ 0x81 + 8006a26: 4618 mov r0, r3 + 8006a28: f7fa fab6 bl 8000f98 + if (BleApplicationContext.Device_Connection_Status == APP_BLE_LP_CONNECTING) + 8006a2c: 4b27 ldr r3, [pc, #156] @ (8006acc ) + 8006a2e: f893 3080 ldrb.w r3, [r3, #128] @ 0x80 + 8006a32: 2b04 cmp r3, #4 + 8006a34: d104 bne.n 8006a40 + BleApplicationContext.Device_Connection_Status = APP_BLE_CONNECTED_CLIENT; + 8006a36: 4b25 ldr r3, [pc, #148] @ (8006acc ) + 8006a38: 2206 movs r2, #6 + 8006a3a: f883 2080 strb.w r2, [r3, #128] @ 0x80 + 8006a3e: e003 b.n 8006a48 + BleApplicationContext.Device_Connection_Status = APP_BLE_CONNECTED_SERVER; + 8006a40: 4b22 ldr r3, [pc, #136] @ (8006acc ) + 8006a42: 2205 movs r2, #5 + 8006a44: f883 2080 strb.w r2, [r3, #128] @ 0x80 + BleApplicationContext.BleApplicationContext_legacy.connectionHandle = p_connection_complete_event->Connection_Handle; + 8006a48: 693b ldr r3, [r7, #16] + 8006a4a: f8b3 3001 ldrh.w r3, [r3, #1] + 8006a4e: b29a uxth r2, r3 + 8006a50: 4b1e ldr r3, [pc, #120] @ (8006acc ) + 8006a52: 82da strh r2, [r3, #22] + HandleNotification.P2P_Evt_Opcode = PEER_CONN_HANDLE_EVT; + 8006a54: 4b1e ldr r3, [pc, #120] @ (8006ad0 ) + 8006a56: 2200 movs r2, #0 + 8006a58: 701a strb r2, [r3, #0] + HandleNotification.ConnectionHandle = BleApplicationContext.BleApplicationContext_legacy.connectionHandle; + 8006a5a: 4b1c ldr r3, [pc, #112] @ (8006acc ) + 8006a5c: 8ada ldrh r2, [r3, #22] + 8006a5e: 4b1c ldr r3, [pc, #112] @ (8006ad0 ) + 8006a60: 805a strh r2, [r3, #2] + P2PS_APP_Notification(&HandleNotification); + 8006a62: 481b ldr r0, [pc, #108] @ (8006ad0 ) + 8006a64: f000 fa70 bl 8006f48 + break; /* HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE */ + 8006a68: e002 b.n 8006a70 + break; + 8006a6a: bf00 nop + 8006a6c: e028 b.n 8006ac0 + break; + 8006a6e: bf00 nop + break; /* HCI_LE_META_EVT_CODE */ + 8006a70: e026 b.n 8006ac0 + p_blecore_evt = (evt_blecore_aci*) p_event_pckt->data; + 8006a72: 6a3b ldr r3, [r7, #32] + 8006a74: 3302 adds r3, #2 + 8006a76: 61fb str r3, [r7, #28] + switch (p_blecore_evt->ecode) + 8006a78: 69fb ldr r3, [r7, #28] + 8006a7a: 881b ldrh r3, [r3, #0] + 8006a7c: b29b uxth r3, r3 + 8006a7e: f640 420e movw r2, #3086 @ 0xc0e + 8006a82: 4293 cmp r3, r2 + 8006a84: d00f beq.n 8006aa6 + 8006a86: f640 420e movw r2, #3086 @ 0xc0e + 8006a8a: 4293 cmp r3, r2 + 8006a8c: dc17 bgt.n 8006abe + 8006a8e: f5b3 6f00 cmp.w r3, #2048 @ 0x800 + 8006a92: d00e beq.n 8006ab2 + 8006a94: f5b3 6f00 cmp.w r3, #2048 @ 0x800 + 8006a98: dc11 bgt.n 8006abe + 8006a9a: 2b04 cmp r3, #4 + 8006a9c: d00b beq.n 8006ab6 + 8006a9e: f240 4207 movw r2, #1031 @ 0x407 + 8006aa2: 4293 cmp r3, r2 + break; /* ACI_GAP_PROC_COMPLETE_VSEVT_CODE */ + 8006aa4: e008 b.n 8006ab8 + aci_gatt_confirm_indication(BleApplicationContext.BleApplicationContext_legacy.connectionHandle); + 8006aa6: 4b09 ldr r3, [pc, #36] @ (8006acc ) + 8006aa8: 8adb ldrh r3, [r3, #22] + 8006aaa: 4618 mov r0, r3 + 8006aac: f7fe fac7 bl 800503e + break; + 8006ab0: e002 b.n 8006ab8 + break; + 8006ab2: bf00 nop + 8006ab4: e003 b.n 8006abe + break; /* ACI_HAL_END_OF_RADIO_ACTIVITY_VSEVT_CODE */ + 8006ab6: bf00 nop + break; /* HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE */ + 8006ab8: e001 b.n 8006abe + break; + 8006aba: bf00 nop + 8006abc: e000 b.n 8006ac0 + break; /* HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE */ + 8006abe: bf00 nop + } + + return (SVCCTL_UserEvtFlowEnable); + 8006ac0: 2301 movs r3, #1 +} + 8006ac2: 4618 mov r0, r3 + 8006ac4: 3728 adds r7, #40 @ 0x28 + 8006ac6: 46bd mov sp, r7 + 8006ac8: bd80 pop {r7, pc} + 8006aca: bf00 nop + 8006acc: 20000270 .word 0x20000270 + 8006ad0: 200002f8 .word 0x200002f8 + +08006ad4 : + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static void Ble_Tl_Init(void) +{ + 8006ad4: b580 push {r7, lr} + 8006ad6: b082 sub sp, #8 + 8006ad8: af00 add r7, sp, #0 + HCI_TL_HciInitConf_t Hci_Tl_Init_Conf; + + Hci_Tl_Init_Conf.p_cmdbuffer = (uint8_t*)&BleCmdBuffer; + 8006ada: 4b06 ldr r3, [pc, #24] @ (8006af4 ) + 8006adc: 603b str r3, [r7, #0] + Hci_Tl_Init_Conf.StatusNotCallBack = BLE_StatusNot; + 8006ade: 4b06 ldr r3, [pc, #24] @ (8006af8 ) + 8006ae0: 607b str r3, [r7, #4] + hci_init(BLE_UserEvtRx, (void*) &Hci_Tl_Init_Conf); + 8006ae2: 463b mov r3, r7 + 8006ae4: 4619 mov r1, r3 + 8006ae6: 4805 ldr r0, [pc, #20] @ (8006afc ) + 8006ae8: f7ff f892 bl 8005c10 + + return; + 8006aec: bf00 nop +} + 8006aee: 3708 adds r7, #8 + 8006af0: 46bd mov sp, r7 + 8006af2: bd80 pop {r7, pc} + 8006af4: 200300d8 .word 0x200300d8 + 8006af8: 08006edb .word 0x08006edb + 8006afc: 08006ea3 .word 0x08006ea3 + +08006b00 : + +static void Ble_Hci_Gap_Gatt_Init(void) +{ + 8006b00: b5f0 push {r4, r5, r6, r7, lr} + 8006b02: b08d sub sp, #52 @ 0x34 + 8006b04: af06 add r7, sp, #24 + uint8_t role; + uint16_t gap_service_handle, gap_dev_name_char_handle, gap_appearance_char_handle; + const uint8_t *p_bd_addr; + uint16_t a_appearance[1] = {BLE_CFG_GAP_APPEARANCE}; + 8006b06: 2300 movs r3, #0 + 8006b08: 803b strh r3, [r7, #0] + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + 8006b0a: 2392 movs r3, #146 @ 0x92 + 8006b0c: 75fb strb r3, [r7, #23] + + /** + * Initialize HCI layer + */ + /*HCI Reset to synchronise BLE Stack*/ + ret = hci_reset(); + 8006b0e: f7fe fc2b bl 8005368 + 8006b12: 4603 mov r3, r0 + 8006b14: 75fb strb r3, [r7, #23] + } + + /** + * Write the BD Address + */ + p_bd_addr = BleGetBdAddress(); + 8006b16: f000 f935 bl 8006d84 + 8006b1a: 6138 str r0, [r7, #16] + ret = aci_hal_write_config_data(CONFIG_DATA_PUBLIC_ADDRESS_OFFSET, CONFIG_DATA_PUBLIC_ADDRESS_LEN, (uint8_t*) p_bd_addr); + 8006b1c: 693a ldr r2, [r7, #16] + 8006b1e: 2106 movs r1, #6 + 8006b20: 2000 movs r0, #0 + 8006b22: f7fe fae1 bl 80050e8 + 8006b26: 4603 mov r3, r0 + 8006b28: 75fb strb r3, [r7, #23] + APP_DBG_MSG(" Public Bluetooth Address: %02x:%02x:%02x:%02x:%02x:%02x\n",p_bd_addr[5],p_bd_addr[4],p_bd_addr[3],p_bd_addr[2],p_bd_addr[1],p_bd_addr[0]); + } + +#if (CFG_BLE_ADDRESS_TYPE == GAP_PUBLIC_ADDR) + /* BLE MAC in ADV Packet */ + a_ManufData[ sizeof(a_ManufData)-6] = p_bd_addr[5]; + 8006b2a: 693b ldr r3, [r7, #16] + 8006b2c: 3305 adds r3, #5 + 8006b2e: 781a ldrb r2, [r3, #0] + 8006b30: 4b56 ldr r3, [pc, #344] @ (8006c8c ) + 8006b32: 721a strb r2, [r3, #8] + a_ManufData[ sizeof(a_ManufData)-5] = p_bd_addr[4]; + 8006b34: 693b ldr r3, [r7, #16] + 8006b36: 3304 adds r3, #4 + 8006b38: 781a ldrb r2, [r3, #0] + 8006b3a: 4b54 ldr r3, [pc, #336] @ (8006c8c ) + 8006b3c: 725a strb r2, [r3, #9] + a_ManufData[ sizeof(a_ManufData)-4] = p_bd_addr[3]; + 8006b3e: 693b ldr r3, [r7, #16] + 8006b40: 3303 adds r3, #3 + 8006b42: 781a ldrb r2, [r3, #0] + 8006b44: 4b51 ldr r3, [pc, #324] @ (8006c8c ) + 8006b46: 729a strb r2, [r3, #10] + a_ManufData[ sizeof(a_ManufData)-3] = p_bd_addr[2]; + 8006b48: 693b ldr r3, [r7, #16] + 8006b4a: 3302 adds r3, #2 + 8006b4c: 781a ldrb r2, [r3, #0] + 8006b4e: 4b4f ldr r3, [pc, #316] @ (8006c8c ) + 8006b50: 72da strb r2, [r3, #11] + a_ManufData[ sizeof(a_ManufData)-2] = p_bd_addr[1]; + 8006b52: 693b ldr r3, [r7, #16] + 8006b54: 3301 adds r3, #1 + 8006b56: 781a ldrb r2, [r3, #0] + 8006b58: 4b4c ldr r3, [pc, #304] @ (8006c8c ) + 8006b5a: 731a strb r2, [r3, #12] + a_ManufData[ sizeof(a_ManufData)-1] = p_bd_addr[0]; + 8006b5c: 693b ldr r3, [r7, #16] + 8006b5e: 781a ldrb r2, [r3, #0] + 8006b60: 4b4a ldr r3, [pc, #296] @ (8006c8c ) + 8006b62: 735a strb r2, [r3, #13] +#endif /* CFG_BLE_ADDRESS_TYPE != GAP_PUBLIC_ADDR */ + + /** + * Write Identity root key used to derive IRK and DHK(Legacy) + */ + ret = aci_hal_write_config_data(CONFIG_DATA_IR_OFFSET, CONFIG_DATA_IR_LEN, (uint8_t*)a_BLE_CfgIrValue); + 8006b64: 4a4a ldr r2, [pc, #296] @ (8006c90 ) + 8006b66: 2110 movs r1, #16 + 8006b68: 2018 movs r0, #24 + 8006b6a: f7fe fabd bl 80050e8 + 8006b6e: 4603 mov r3, r0 + 8006b70: 75fb strb r3, [r7, #23] + } + + /** + * Write Encryption root key used to derive LTK and CSRK + */ + ret = aci_hal_write_config_data(CONFIG_DATA_ER_OFFSET, CONFIG_DATA_ER_LEN, (uint8_t*)a_BLE_CfgErValue); + 8006b72: 4a48 ldr r2, [pc, #288] @ (8006c94 ) + 8006b74: 2110 movs r1, #16 + 8006b76: 2008 movs r0, #8 + 8006b78: f7fe fab6 bl 80050e8 + 8006b7c: 4603 mov r3, r0 + 8006b7e: 75fb strb r3, [r7, #23] + } + + /** + * Set TX Power. + */ + ret = aci_hal_set_tx_power_level(1, CFG_TX_POWER); + 8006b80: 2118 movs r1, #24 + 8006b82: 2001 movs r0, #1 + 8006b84: f7fe fb35 bl 80051f2 + 8006b88: 4603 mov r3, r0 + 8006b8a: 75fb strb r3, [r7, #23] + } + + /** + * Initialize GATT interface + */ + ret = aci_gatt_init(); + 8006b8c: f7fd ffab bl 8004ae6 + 8006b90: 4603 mov r3, r0 + 8006b92: 75fb strb r3, [r7, #23] + } + + /** + * Initialize GAP interface + */ + role = 0; + 8006b94: 2300 movs r3, #0 + 8006b96: 73fb strb r3, [r7, #15] + +#if (BLE_CFG_PERIPHERAL == 1) + role |= GAP_PERIPHERAL_ROLE; + 8006b98: 7bfb ldrb r3, [r7, #15] + 8006b9a: f043 0301 orr.w r3, r3, #1 + 8006b9e: 73fb strb r3, [r7, #15] + +/* USER CODE BEGIN Role_Mngt*/ + +/* USER CODE END Role_Mngt */ + + if (role > 0) + 8006ba0: 7bfb ldrb r3, [r7, #15] + 8006ba2: 2b00 cmp r3, #0 + 8006ba4: d01f beq.n 8006be6 + { + const char *name = "P2PSRV1"; + 8006ba6: 4b3c ldr r3, [pc, #240] @ (8006c98 ) + 8006ba8: 60bb str r3, [r7, #8] + ret = aci_gap_init(role, + 8006baa: 1dba adds r2, r7, #6 + 8006bac: 7bf8 ldrb r0, [r7, #15] + 8006bae: 1cbb adds r3, r7, #2 + 8006bb0: 9301 str r3, [sp, #4] + 8006bb2: 1d3b adds r3, r7, #4 + 8006bb4: 9300 str r3, [sp, #0] + 8006bb6: 4613 mov r3, r2 + 8006bb8: 2207 movs r2, #7 + 8006bba: 2100 movs r1, #0 + 8006bbc: f7fd fe50 bl 8004860 + 8006bc0: 4603 mov r3, r0 + 8006bc2: 75fb strb r3, [r7, #23] + else + { + APP_DBG_MSG(" Success: aci_gap_init command\n"); + } + + ret = aci_gatt_update_char_value(gap_service_handle, gap_dev_name_char_handle, 0, strlen(name), (uint8_t *) name); + 8006bc4: 88fc ldrh r4, [r7, #6] + 8006bc6: 88bd ldrh r5, [r7, #4] + 8006bc8: 68b8 ldr r0, [r7, #8] + 8006bca: f7f9 fad7 bl 800017c + 8006bce: 4603 mov r3, r0 + 8006bd0: b2da uxtb r2, r3 + 8006bd2: 68bb ldr r3, [r7, #8] + 8006bd4: 9300 str r3, [sp, #0] + 8006bd6: 4613 mov r3, r2 + 8006bd8: 2200 movs r2, #0 + 8006bda: 4629 mov r1, r5 + 8006bdc: 4620 mov r0, r4 + 8006bde: f7fe f985 bl 8004eec + 8006be2: 4603 mov r3, r0 + 8006be4: 75fb strb r3, [r7, #23] + { + BLE_DBG_SVCCTL_MSG(" Success: aci_gatt_update_char_value - Device Name\n"); + } + } + + ret = aci_gatt_update_char_value(gap_service_handle, + 8006be6: 88f8 ldrh r0, [r7, #6] + 8006be8: 8879 ldrh r1, [r7, #2] + 8006bea: 463b mov r3, r7 + 8006bec: 9300 str r3, [sp, #0] + 8006bee: 2302 movs r3, #2 + 8006bf0: 2200 movs r2, #0 + 8006bf2: f7fe f97b bl 8004eec + 8006bf6: 4603 mov r3, r0 + 8006bf8: 75fb strb r3, [r7, #23] + } + + /** + * Initialize Default PHY + */ + ret = hci_le_set_default_phy(ALL_PHYS_PREFERENCE,TX_2M_PREFERRED,RX_2M_PREFERRED); + 8006bfa: 2202 movs r2, #2 + 8006bfc: 2102 movs r1, #2 + 8006bfe: 2000 movs r0, #0 + 8006c00: f7fe fc54 bl 80054ac + 8006c04: 4603 mov r3, r0 + 8006c06: 75fb strb r3, [r7, #23] + } + + /** + * Initialize IO capability + */ + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.ioCapability = CFG_IO_CAPABILITY; + 8006c08: 4b24 ldr r3, [pc, #144] @ (8006c9c ) + 8006c0a: 2201 movs r2, #1 + 8006c0c: 701a strb r2, [r3, #0] + ret = aci_gap_set_io_capability(BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.ioCapability); + 8006c0e: 4b23 ldr r3, [pc, #140] @ (8006c9c ) + 8006c10: 781b ldrb r3, [r3, #0] + 8006c12: 4618 mov r0, r3 + 8006c14: f7fd fd0c bl 8004630 + 8006c18: 4603 mov r3, r0 + 8006c1a: 75fb strb r3, [r7, #23] + } + + /** + * Initialize authentication + */ + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode = CFG_MITM_PROTECTION; + 8006c1c: 4b1f ldr r3, [pc, #124] @ (8006c9c ) + 8006c1e: 2201 movs r2, #1 + 8006c20: 705a strb r2, [r3, #1] + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin = CFG_ENCRYPTION_KEY_SIZE_MIN; + 8006c22: 4b1e ldr r3, [pc, #120] @ (8006c9c ) + 8006c24: 2208 movs r2, #8 + 8006c26: 711a strb r2, [r3, #4] + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax = CFG_ENCRYPTION_KEY_SIZE_MAX; + 8006c28: 4b1c ldr r3, [pc, #112] @ (8006c9c ) + 8006c2a: 2210 movs r2, #16 + 8006c2c: 715a strb r2, [r3, #5] + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Use_Fixed_Pin = CFG_USED_FIXED_PIN; + 8006c2e: 4b1b ldr r3, [pc, #108] @ (8006c9c ) + 8006c30: 2200 movs r2, #0 + 8006c32: 70da strb r2, [r3, #3] + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Fixed_Pin = CFG_FIXED_PIN; + 8006c34: 4b19 ldr r3, [pc, #100] @ (8006c9c ) + 8006c36: 4a1a ldr r2, [pc, #104] @ (8006ca0 ) + 8006c38: 609a str r2, [r3, #8] + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode = CFG_BONDING_MODE; + 8006c3a: 4b18 ldr r3, [pc, #96] @ (8006c9c ) + 8006c3c: 2201 movs r2, #1 + 8006c3e: 709a strb r2, [r3, #2] + /* USER CODE BEGIN Ble_Hci_Gap_Gatt_Init_1*/ + + /* USER CODE END Ble_Hci_Gap_Gatt_Init_1*/ + + ret = aci_gap_set_authentication_requirement(BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode, + 8006c40: 4b16 ldr r3, [pc, #88] @ (8006c9c ) + 8006c42: 789c ldrb r4, [r3, #2] + 8006c44: 4b15 ldr r3, [pc, #84] @ (8006c9c ) + 8006c46: 785d ldrb r5, [r3, #1] + 8006c48: 4b14 ldr r3, [pc, #80] @ (8006c9c ) + 8006c4a: 791b ldrb r3, [r3, #4] + 8006c4c: 4a13 ldr r2, [pc, #76] @ (8006c9c ) + 8006c4e: 7952 ldrb r2, [r2, #5] + 8006c50: 4912 ldr r1, [pc, #72] @ (8006c9c ) + 8006c52: 78c9 ldrb r1, [r1, #3] + 8006c54: 4811 ldr r0, [pc, #68] @ (8006c9c ) + 8006c56: 6880 ldr r0, [r0, #8] + 8006c58: 2600 movs r6, #0 + 8006c5a: 9604 str r6, [sp, #16] + 8006c5c: 9003 str r0, [sp, #12] + 8006c5e: 9102 str r1, [sp, #8] + 8006c60: 9201 str r2, [sp, #4] + 8006c62: 9300 str r3, [sp, #0] + 8006c64: 2300 movs r3, #0 + 8006c66: 2201 movs r2, #1 + 8006c68: 4629 mov r1, r5 + 8006c6a: 4620 mov r0, r4 + 8006c6c: f7fd fd34 bl 80046d8 + 8006c70: 4603 mov r3, r0 + 8006c72: 75fb strb r3, [r7, #23] + } + + /** + * Initialize whitelist + */ + if (BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode) + 8006c74: 4b09 ldr r3, [pc, #36] @ (8006c9c ) + 8006c76: 789b ldrb r3, [r3, #2] + 8006c78: 2b00 cmp r3, #0 + 8006c7a: d003 beq.n 8006c84 + { + ret = aci_gap_configure_whitelist(); + 8006c7c: f7fd ff0f bl 8004a9e + 8006c80: 4603 mov r3, r0 + 8006c82: 75fb strb r3, [r7, #23] + { + APP_DBG_MSG(" Success: aci_gap_configure_whitelist command\n"); + } + } + APP_DBG_MSG("==>> End Ble_Hci_Gap_Gatt_Init function\n\r"); +} + 8006c84: bf00 nop + 8006c86: 371c adds r7, #28 + 8006c88: 46bd mov sp, r7 + 8006c8a: bdf0 pop {r4, r5, r6, r7, pc} + 8006c8c: 20000014 .word 0x20000014 + 8006c90: 08007df8 .word 0x08007df8 + 8006c94: 08007e08 .word 0x08007e08 + 8006c98: 08007c38 .word 0x08007c38 + 8006c9c: 20000270 .word 0x20000270 + 8006ca0: 0001b207 .word 0x0001b207 + +08006ca4 : + +static void Adv_Request(APP_BLE_ConnStatus_t NewStatus) +{ + 8006ca4: b580 push {r7, lr} + 8006ca6: b08c sub sp, #48 @ 0x30 + 8006ca8: af08 add r7, sp, #32 + 8006caa: 4603 mov r3, r0 + 8006cac: 71fb strb r3, [r7, #7] + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + 8006cae: 2392 movs r3, #146 @ 0x92 + 8006cb0: 72fb strb r3, [r7, #11] + uint16_t Min_Inter, Max_Inter; + + if (NewStatus == APP_BLE_FAST_ADV) + 8006cb2: 79fb ldrb r3, [r7, #7] + 8006cb4: 2b01 cmp r3, #1 + 8006cb6: d106 bne.n 8006cc6 + { + Min_Inter = AdvIntervalMin; + 8006cb8: 4b2b ldr r3, [pc, #172] @ (8006d68 ) + 8006cba: 881b ldrh r3, [r3, #0] + 8006cbc: 81fb strh r3, [r7, #14] + Max_Inter = AdvIntervalMax; + 8006cbe: 4b2b ldr r3, [pc, #172] @ (8006d6c ) + 8006cc0: 881b ldrh r3, [r3, #0] + 8006cc2: 81bb strh r3, [r7, #12] + 8006cc4: e005 b.n 8006cd2 + } + else + { + Min_Inter = CFG_LP_CONN_ADV_INTERVAL_MIN; + 8006cc6: f44f 63c8 mov.w r3, #1600 @ 0x640 + 8006cca: 81fb strh r3, [r7, #14] + Max_Inter = CFG_LP_CONN_ADV_INTERVAL_MAX; + 8006ccc: f44f 637a mov.w r3, #4000 @ 0xfa0 + 8006cd0: 81bb strh r3, [r7, #12] + + /** + * Stop the timer, it will be restarted for a new shot + * It does not hurt if the timer was not running + */ + HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id); + 8006cd2: 4b27 ldr r3, [pc, #156] @ (8006d70 ) + 8006cd4: f893 3081 ldrb.w r3, [r3, #129] @ 0x81 + 8006cd8: 4618 mov r0, r3 + 8006cda: f7fa f95d bl 8000f98 + + if ((NewStatus == APP_BLE_LP_ADV) + 8006cde: 79fb ldrb r3, [r7, #7] + 8006ce0: 2b02 cmp r3, #2 + 8006ce2: d10d bne.n 8006d00 + && ((BleApplicationContext.Device_Connection_Status == APP_BLE_FAST_ADV) + 8006ce4: 4b22 ldr r3, [pc, #136] @ (8006d70 ) + 8006ce6: f893 3080 ldrb.w r3, [r3, #128] @ 0x80 + 8006cea: 2b01 cmp r3, #1 + 8006cec: d004 beq.n 8006cf8 + || (BleApplicationContext.Device_Connection_Status == APP_BLE_LP_ADV))) + 8006cee: 4b20 ldr r3, [pc, #128] @ (8006d70 ) + 8006cf0: f893 3080 ldrb.w r3, [r3, #128] @ 0x80 + 8006cf4: 2b02 cmp r3, #2 + 8006cf6: d103 bne.n 8006d00 + { + /* Connection in ADVERTISE mode have to stop the current advertising */ + ret = aci_gap_set_non_discoverable(); + 8006cf8: f7fd fb7c bl 80043f4 + 8006cfc: 4603 mov r3, r0 + 8006cfe: 72fb strb r3, [r7, #11] + { + APP_DBG_MSG("==>> aci_gap_set_non_discoverable - Successfully Stopped Advertising \n"); + } + } + + BleApplicationContext.Device_Connection_Status = NewStatus; + 8006d00: 4a1b ldr r2, [pc, #108] @ (8006d70 ) + 8006d02: 79fb ldrb r3, [r7, #7] + 8006d04: f882 3080 strb.w r3, [r2, #128] @ 0x80 + /* Start Fast or Low Power Advertising */ + ret = aci_gap_set_discoverable(ADV_IND, + 8006d08: 4b19 ldr r3, [pc, #100] @ (8006d70 ) + 8006d0a: 7e1b ldrb r3, [r3, #24] + 8006d0c: 89ba ldrh r2, [r7, #12] + 8006d0e: 89f9 ldrh r1, [r7, #14] + 8006d10: 2000 movs r0, #0 + 8006d12: 9006 str r0, [sp, #24] + 8006d14: 2000 movs r0, #0 + 8006d16: 9005 str r0, [sp, #20] + 8006d18: 4816 ldr r0, [pc, #88] @ (8006d74 ) + 8006d1a: 9004 str r0, [sp, #16] + 8006d1c: 9303 str r3, [sp, #12] + 8006d1e: 4b16 ldr r3, [pc, #88] @ (8006d78 ) + 8006d20: 9302 str r3, [sp, #8] + 8006d22: 2308 movs r3, #8 + 8006d24: 9301 str r3, [sp, #4] + 8006d26: 2300 movs r3, #0 + 8006d28: 9300 str r3, [sp, #0] + 8006d2a: 2300 movs r3, #0 + 8006d2c: 2000 movs r0, #0 + 8006d2e: f7fd fb85 bl 800443c + 8006d32: 4603 mov r3, r0 + 8006d34: 72fb strb r3, [r7, #11] + { + APP_DBG_MSG("==>> aci_gap_set_discoverable - Success\n"); + } + + /* Update Advertising data */ + ret = aci_gap_update_adv_data(sizeof(a_ManufData), (uint8_t*) a_ManufData); + 8006d36: 4911 ldr r1, [pc, #68] @ (8006d7c ) + 8006d38: 200e movs r0, #14 + 8006d3a: f7fd fe3e bl 80049ba + 8006d3e: 4603 mov r3, r0 + 8006d40: 72fb strb r3, [r7, #11] + if (ret != BLE_STATUS_SUCCESS) + 8006d42: 7afb ldrb r3, [r7, #11] + 8006d44: 2b00 cmp r3, #0 + 8006d46: d10a bne.n 8006d5e + APP_DBG_MSG("==>> Start Low Power Advertising Failed , result: %d \n\r", ret); + } + } + else + { + if (NewStatus == APP_BLE_FAST_ADV) + 8006d48: 79fb ldrb r3, [r7, #7] + 8006d4a: 2b01 cmp r3, #1 + 8006d4c: d107 bne.n 8006d5e + { + APP_DBG_MSG("==>> Success: Start Fast Advertising \n\r"); + /* Start Timer to STOP ADV - TIMEOUT - and next Restart Low Power Advertising */ + HW_TS_Start(BleApplicationContext.Advertising_mgr_timer_Id, INITIAL_ADV_TIMEOUT); + 8006d4e: 4b08 ldr r3, [pc, #32] @ (8006d70 ) + 8006d50: f893 3081 ldrb.w r3, [r3, #129] @ 0x81 + 8006d54: 490a ldr r1, [pc, #40] @ (8006d80 ) + 8006d56: 4618 mov r0, r3 + 8006d58: f7fa f9a2 bl 80010a0 + { + APP_DBG_MSG("==>> Success: Start Low Power Advertising \n\r"); + } + } + + return; + 8006d5c: bf00 nop + 8006d5e: bf00 nop +} + 8006d60: 3710 adds r7, #16 + 8006d62: 46bd mov sp, r7 + 8006d64: bd80 pop {r7, pc} + 8006d66: bf00 nop + 8006d68: 200002f4 .word 0x200002f4 + 8006d6c: 200002f6 .word 0x200002f6 + 8006d70: 20000270 .word 0x20000270 + 8006d74: 20000289 .word 0x20000289 + 8006d78: 08007e18 .word 0x08007e18 + 8006d7c: 20000014 .word 0x20000014 + 8006d80: 0001e046 .word 0x0001e046 + +08006d84 : + +const uint8_t* BleGetBdAddress(void) +{ + 8006d84: b580 push {r7, lr} + 8006d86: b086 sub sp, #24 + 8006d88: af00 add r7, sp, #0 + const uint8_t *p_bd_addr; + uint32_t udn; + uint32_t company_id; + uint32_t device_id; + + udn = LL_FLASH_GetUDN(); + 8006d8a: f7ff fd4f bl 800682c + 8006d8e: 6138 str r0, [r7, #16] + + if (udn != 0xFFFFFFFF) + 8006d90: 693b ldr r3, [r7, #16] + 8006d92: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff + 8006d96: d023 beq.n 8006de0 + { + company_id = LL_FLASH_GetSTCompanyID(); + 8006d98: f7ff fd60 bl 800685c + 8006d9c: 60b8 str r0, [r7, #8] + device_id = LL_FLASH_GetDeviceID(); + 8006d9e: f7ff fd51 bl 8006844 + 8006da2: 6078 str r0, [r7, #4] + * bit[23:16] : Device ID. + * bit[15:0] : The last 16bits from the UDN + * Note: In order to use the Public Address in a final product, a dedicated + * 24bits company ID (OUI) shall be bought. + */ + a_BdAddrUdn[0] = (uint8_t)(udn & 0x000000FF); + 8006da4: 693b ldr r3, [r7, #16] + 8006da6: b2da uxtb r2, r3 + 8006da8: 4b16 ldr r3, [pc, #88] @ (8006e04 ) + 8006daa: 701a strb r2, [r3, #0] + a_BdAddrUdn[1] = (uint8_t)((udn & 0x0000FF00) >> 8); + 8006dac: 693b ldr r3, [r7, #16] + 8006dae: 0a1b lsrs r3, r3, #8 + 8006db0: b2da uxtb r2, r3 + 8006db2: 4b14 ldr r3, [pc, #80] @ (8006e04 ) + 8006db4: 705a strb r2, [r3, #1] + a_BdAddrUdn[2] = (uint8_t)device_id; + 8006db6: 687b ldr r3, [r7, #4] + 8006db8: b2da uxtb r2, r3 + 8006dba: 4b12 ldr r3, [pc, #72] @ (8006e04 ) + 8006dbc: 709a strb r2, [r3, #2] + a_BdAddrUdn[3] = (uint8_t)(company_id & 0x000000FF); + 8006dbe: 68bb ldr r3, [r7, #8] + 8006dc0: b2da uxtb r2, r3 + 8006dc2: 4b10 ldr r3, [pc, #64] @ (8006e04 ) + 8006dc4: 70da strb r2, [r3, #3] + a_BdAddrUdn[4] = (uint8_t)((company_id & 0x0000FF00) >> 8); + 8006dc6: 68bb ldr r3, [r7, #8] + 8006dc8: 0a1b lsrs r3, r3, #8 + 8006dca: b2da uxtb r2, r3 + 8006dcc: 4b0d ldr r3, [pc, #52] @ (8006e04 ) + 8006dce: 711a strb r2, [r3, #4] + a_BdAddrUdn[5] = (uint8_t)((company_id & 0x00FF0000) >> 16); + 8006dd0: 68bb ldr r3, [r7, #8] + 8006dd2: 0c1b lsrs r3, r3, #16 + 8006dd4: b2da uxtb r2, r3 + 8006dd6: 4b0b ldr r3, [pc, #44] @ (8006e04 ) + 8006dd8: 715a strb r2, [r3, #5] + + p_bd_addr = (const uint8_t *)a_BdAddrUdn; + 8006dda: 4b0a ldr r3, [pc, #40] @ (8006e04 ) + 8006ddc: 617b str r3, [r7, #20] + 8006dde: e00b b.n 8006df8 + } + else + { + p_otp_addr = OTP_Read(0); + 8006de0: 2000 movs r0, #0 + 8006de2: f7ff fc3d bl 8006660 + 8006de6: 60f8 str r0, [r7, #12] + if (p_otp_addr) + 8006de8: 68fb ldr r3, [r7, #12] + 8006dea: 2b00 cmp r3, #0 + 8006dec: d002 beq.n 8006df4 + { + p_bd_addr = ((OTP_ID0_t*)p_otp_addr)->bd_address; + 8006dee: 68fb ldr r3, [r7, #12] + 8006df0: 617b str r3, [r7, #20] + 8006df2: e001 b.n 8006df8 + } + else + { + p_bd_addr = a_MBdAddr; + 8006df4: 4b04 ldr r3, [pc, #16] @ (8006e08 ) + 8006df6: 617b str r3, [r7, #20] + } + } + + return p_bd_addr; + 8006df8: 697b ldr r3, [r7, #20] +} + 8006dfa: 4618 mov r0, r3 + 8006dfc: 3718 adds r7, #24 + 8006dfe: 46bd mov sp, r7 + 8006e00: bd80 pop {r7, pc} + 8006e02: bf00 nop + 8006e04: 20000268 .word 0x20000268 + 8006e08: 08007df0 .word 0x08007df0 + +08006e0c : + * + * SPECIFIC FUNCTIONS FOR P2P SERVER + * + *************************************************************/ +static void Adv_Cancel(void) +{ + 8006e0c: b580 push {r7, lr} + 8006e0e: b082 sub sp, #8 + 8006e10: af00 add r7, sp, #0 + /* USER CODE BEGIN Adv_Cancel_1 */ + + /* USER CODE END Adv_Cancel_1 */ + + if (BleApplicationContext.Device_Connection_Status != APP_BLE_CONNECTED_SERVER) + 8006e12: 4b0a ldr r3, [pc, #40] @ (8006e3c ) + 8006e14: f893 3080 ldrb.w r3, [r3, #128] @ 0x80 + 8006e18: 2b05 cmp r3, #5 + 8006e1a: d00a beq.n 8006e32 + { + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + 8006e1c: 2392 movs r3, #146 @ 0x92 + 8006e1e: 71fb strb r3, [r7, #7] + + ret = aci_gap_set_non_discoverable(); + 8006e20: f7fd fae8 bl 80043f4 + 8006e24: 4603 mov r3, r0 + 8006e26: 71fb strb r3, [r7, #7] + + BleApplicationContext.Device_Connection_Status = APP_BLE_IDLE; + 8006e28: 4b04 ldr r3, [pc, #16] @ (8006e3c ) + 8006e2a: 2200 movs r2, #0 + 8006e2c: f883 2080 strb.w r2, [r3, #128] @ 0x80 + + /* USER CODE BEGIN Adv_Cancel_2 */ + + /* USER CODE END Adv_Cancel_2 */ + + return; + 8006e30: bf00 nop + 8006e32: bf00 nop +} + 8006e34: 3708 adds r7, #8 + 8006e36: 46bd mov sp, r7 + 8006e38: bd80 pop {r7, pc} + 8006e3a: bf00 nop + 8006e3c: 20000270 .word 0x20000270 + +08006e40 : + +static void Adv_Cancel_Req(void) +{ + 8006e40: b580 push {r7, lr} + 8006e42: af00 add r7, sp, #0 + /* USER CODE BEGIN Adv_Cancel_Req_1 */ + + /* USER CODE END Adv_Cancel_Req_1 */ + + UTIL_SEQ_SetTask(1 << CFG_TASK_ADV_CANCEL_ID, CFG_SCH_PRIO_0); + 8006e44: 2100 movs r1, #0 + 8006e46: 2001 movs r0, #1 + 8006e48: f000 fd44 bl 80078d4 + + /* USER CODE BEGIN Adv_Cancel_Req_2 */ + + /* USER CODE END Adv_Cancel_Req_2 */ + + return; + 8006e4c: bf00 nop +} + 8006e4e: bd80 pop {r7, pc} + +08006e50 : + +static void Switch_OFF_GPIO() +{ + 8006e50: b480 push {r7} + 8006e52: af00 add r7, sp, #0 + /* USER CODE BEGIN Switch_OFF_GPIO */ + + /* USER CODE END Switch_OFF_GPIO */ +} + 8006e54: bf00 nop + 8006e56: 46bd mov sp, r7 + 8006e58: f85d 7b04 ldr.w r7, [sp], #4 + 8006e5c: 4770 bx lr + +08006e5e : + * + * WRAP FUNCTIONS + * + *************************************************************/ +void hci_notify_asynch_evt(void* p_Data) +{ + 8006e5e: b580 push {r7, lr} + 8006e60: b082 sub sp, #8 + 8006e62: af00 add r7, sp, #0 + 8006e64: 6078 str r0, [r7, #4] + UTIL_SEQ_SetTask(1 << CFG_TASK_HCI_ASYNCH_EVT_ID, CFG_SCH_PRIO_0); + 8006e66: 2100 movs r1, #0 + 8006e68: 2002 movs r0, #2 + 8006e6a: f000 fd33 bl 80078d4 + + return; + 8006e6e: bf00 nop +} + 8006e70: 3708 adds r7, #8 + 8006e72: 46bd mov sp, r7 + 8006e74: bd80 pop {r7, pc} + +08006e76 : + +void hci_cmd_resp_release(uint32_t Flag) +{ + 8006e76: b580 push {r7, lr} + 8006e78: b082 sub sp, #8 + 8006e7a: af00 add r7, sp, #0 + 8006e7c: 6078 str r0, [r7, #4] + UTIL_SEQ_SetEvt(1 << CFG_IDLEEVT_HCI_CMD_EVT_RSP_ID); + 8006e7e: 2001 movs r0, #1 + 8006e80: f000 fd94 bl 80079ac + + return; + 8006e84: bf00 nop +} + 8006e86: 3708 adds r7, #8 + 8006e88: 46bd mov sp, r7 + 8006e8a: bd80 pop {r7, pc} + +08006e8c : + +void hci_cmd_resp_wait(uint32_t Timeout) +{ + 8006e8c: b580 push {r7, lr} + 8006e8e: b082 sub sp, #8 + 8006e90: af00 add r7, sp, #0 + 8006e92: 6078 str r0, [r7, #4] + UTIL_SEQ_WaitEvt(1 << CFG_IDLEEVT_HCI_CMD_EVT_RSP_ID); + 8006e94: 2001 movs r0, #1 + 8006e96: f000 fda9 bl 80079ec + + return; + 8006e9a: bf00 nop +} + 8006e9c: 3708 adds r7, #8 + 8006e9e: 46bd mov sp, r7 + 8006ea0: bd80 pop {r7, pc} + +08006ea2 : + +static void BLE_UserEvtRx(void *p_Payload) +{ + 8006ea2: b580 push {r7, lr} + 8006ea4: b084 sub sp, #16 + 8006ea6: af00 add r7, sp, #0 + 8006ea8: 6078 str r0, [r7, #4] + SVCCTL_UserEvtFlowStatus_t svctl_return_status; + tHCI_UserEvtRxParam *p_param; + + p_param = (tHCI_UserEvtRxParam *)p_Payload; + 8006eaa: 687b ldr r3, [r7, #4] + 8006eac: 60fb str r3, [r7, #12] + + svctl_return_status = SVCCTL_UserEvtRx((void *)&(p_param->pckt->evtserial)); + 8006eae: 68fb ldr r3, [r7, #12] + 8006eb0: 685b ldr r3, [r3, #4] + 8006eb2: 3308 adds r3, #8 + 8006eb4: 4618 mov r0, r3 + 8006eb6: f7fe fd65 bl 8005984 + 8006eba: 4603 mov r3, r0 + 8006ebc: 72fb strb r3, [r7, #11] + if (svctl_return_status != SVCCTL_UserEvtFlowDisable) + 8006ebe: 7afb ldrb r3, [r7, #11] + 8006ec0: 2b00 cmp r3, #0 + 8006ec2: d003 beq.n 8006ecc + { + p_param->status = HCI_TL_UserEventFlow_Enable; + 8006ec4: 68fb ldr r3, [r7, #12] + 8006ec6: 2201 movs r2, #1 + 8006ec8: 701a strb r2, [r3, #0] + else + { + p_param->status = HCI_TL_UserEventFlow_Disable; + } + + return; + 8006eca: e003 b.n 8006ed4 + p_param->status = HCI_TL_UserEventFlow_Disable; + 8006ecc: 68fb ldr r3, [r7, #12] + 8006ece: 2200 movs r2, #0 + 8006ed0: 701a strb r2, [r3, #0] + return; + 8006ed2: bf00 nop +} + 8006ed4: 3710 adds r7, #16 + 8006ed6: 46bd mov sp, r7 + 8006ed8: bd80 pop {r7, pc} + +08006eda : + +static void BLE_StatusNot(HCI_TL_CmdStatus_t Status) +{ + 8006eda: b580 push {r7, lr} + 8006edc: b084 sub sp, #16 + 8006ede: af00 add r7, sp, #0 + 8006ee0: 4603 mov r3, r0 + 8006ee2: 71fb strb r3, [r7, #7] + uint32_t task_id_list; + switch (Status) + 8006ee4: 79fb ldrb r3, [r7, #7] + 8006ee6: 2b00 cmp r3, #0 + 8006ee8: d002 beq.n 8006ef0 + 8006eea: 2b01 cmp r3, #1 + 8006eec: d006 beq.n 8006efc + + default: + /* USER CODE BEGIN Status */ + + /* USER CODE END Status */ + break; + 8006eee: e00b b.n 8006f08 + task_id_list = (1 << CFG_LAST_TASK_ID_WITH_HCICMD) - 1; + 8006ef0: 2303 movs r3, #3 + 8006ef2: 60fb str r3, [r7, #12] + UTIL_SEQ_PauseTask(task_id_list); + 8006ef4: 68f8 ldr r0, [r7, #12] + 8006ef6: f000 fd19 bl 800792c + break; + 8006efa: e005 b.n 8006f08 + task_id_list = (1 << CFG_LAST_TASK_ID_WITH_HCICMD) - 1; + 8006efc: 2303 movs r3, #3 + 8006efe: 60fb str r3, [r7, #12] + UTIL_SEQ_ResumeTask(task_id_list); + 8006f00: 68f8 ldr r0, [r7, #12] + 8006f02: f000 fd33 bl 800796c + break; + 8006f06: bf00 nop + } + + return; + 8006f08: bf00 nop +} + 8006f0a: 3710 adds r7, #16 + 8006f0c: 46bd mov sp, r7 + 8006f0e: bd80 pop {r7, pc} + +08006f10 : + +/* USER CODE END PFP */ + +/* Functions Definition ------------------------------------------------------*/ +void P2PS_STM_App_Notification(P2PS_STM_App_Notification_evt_t *pNotification) +{ + 8006f10: b480 push {r7} + 8006f12: b083 sub sp, #12 + 8006f14: af00 add r7, sp, #0 + 8006f16: 6078 str r0, [r7, #4] +/* USER CODE BEGIN P2PS_STM_App_Notification_1 */ + +/* USER CODE END P2PS_STM_App_Notification_1 */ + switch(pNotification->P2P_Evt_Opcode) + 8006f18: 687b ldr r3, [r7, #4] + 8006f1a: 781b ldrb r3, [r3, #0] + 8006f1c: 2b03 cmp r3, #3 + 8006f1e: d006 beq.n 8006f2e + 8006f20: 2b03 cmp r3, #3 + 8006f22: dc06 bgt.n 8006f32 + 8006f24: 2b00 cmp r3, #0 + 8006f26: d006 beq.n 8006f36 + 8006f28: 2b01 cmp r3, #1 + 8006f2a: d006 beq.n 8006f3a + + default: +/* USER CODE BEGIN P2PS_STM_App_Notification_default */ + +/* USER CODE END P2PS_STM_App_Notification_default */ + break; + 8006f2c: e001 b.n 8006f32 + break; + 8006f2e: bf00 nop + 8006f30: e004 b.n 8006f3c + break; + 8006f32: bf00 nop + 8006f34: e002 b.n 8006f3c + break; + 8006f36: bf00 nop + 8006f38: e000 b.n 8006f3c + break; + 8006f3a: bf00 nop + } +/* USER CODE BEGIN P2PS_STM_App_Notification_2 */ + +/* USER CODE END P2PS_STM_App_Notification_2 */ + return; + 8006f3c: bf00 nop +} + 8006f3e: 370c adds r7, #12 + 8006f40: 46bd mov sp, r7 + 8006f42: f85d 7b04 ldr.w r7, [sp], #4 + 8006f46: 4770 bx lr + +08006f48 : + +void P2PS_APP_Notification(P2PS_APP_ConnHandle_Not_evt_t *pNotification) +{ + 8006f48: b480 push {r7} + 8006f4a: b083 sub sp, #12 + 8006f4c: af00 add r7, sp, #0 + 8006f4e: 6078 str r0, [r7, #4] +/* USER CODE BEGIN P2PS_APP_Notification_1 */ + +/* USER CODE END P2PS_APP_Notification_1 */ + switch(pNotification->P2P_Evt_Opcode) + 8006f50: 687b ldr r3, [r7, #4] + 8006f52: 781b ldrb r3, [r3, #0] + 8006f54: 2b00 cmp r3, #0 + 8006f56: d002 beq.n 8006f5e + 8006f58: 2b01 cmp r3, #1 + 8006f5a: d002 beq.n 8006f62 + + default: +/* USER CODE BEGIN P2PS_APP_Notification_default */ + +/* USER CODE END P2PS_APP_Notification_default */ + break; + 8006f5c: e002 b.n 8006f64 + break; + 8006f5e: bf00 nop + 8006f60: e000 b.n 8006f64 + break; + 8006f62: bf00 nop + } +/* USER CODE BEGIN P2PS_APP_Notification_2 */ + +/* USER CODE END P2PS_APP_Notification_2 */ + return; + 8006f64: bf00 nop +} + 8006f66: 370c adds r7, #12 + 8006f68: 46bd mov sp, r7 + 8006f6a: f85d 7b04 ldr.w r7, [sp], #4 + 8006f6e: 4770 bx lr + +08006f70 : + +void P2PS_APP_Init(void) +{ + 8006f70: b480 push {r7} + 8006f72: af00 add r7, sp, #0 +/* USER CODE BEGIN P2PS_APP_Init */ + +/* USER CODE END P2PS_APP_Init */ + return; + 8006f74: bf00 nop +} + 8006f76: 46bd mov sp, r7 + 8006f78: f85d 7b04 ldr.w r7, [sp], #4 + 8006f7c: 4770 bx lr + ... + +08006f80 : +{ + 8006f80: b480 push {r7} + 8006f82: af00 add r7, sp, #0 + SET_BIT(PWR->CR4, PWR_CR4_C2BOOT); + 8006f84: 4b05 ldr r3, [pc, #20] @ (8006f9c ) + 8006f86: 68db ldr r3, [r3, #12] + 8006f88: 4a04 ldr r2, [pc, #16] @ (8006f9c ) + 8006f8a: f443 4300 orr.w r3, r3, #32768 @ 0x8000 + 8006f8e: 60d3 str r3, [r2, #12] +} + 8006f90: bf00 nop + 8006f92: 46bd mov sp, r7 + 8006f94: f85d 7b04 ldr.w r7, [sp], #4 + 8006f98: 4770 bx lr + 8006f9a: bf00 nop + 8006f9c: 58000400 .word 0x58000400 + +08006fa0 : +{ + 8006fa0: b480 push {r7} + 8006fa2: b083 sub sp, #12 + 8006fa4: af00 add r7, sp, #0 + 8006fa6: 6078 str r0, [r7, #4] + SET_BIT(EXTI->C2EMR2, ExtiLine); + 8006fa8: 4b06 ldr r3, [pc, #24] @ (8006fc4 ) + 8006faa: f8d3 20d4 ldr.w r2, [r3, #212] @ 0xd4 + 8006fae: 4905 ldr r1, [pc, #20] @ (8006fc4 ) + 8006fb0: 687b ldr r3, [r7, #4] + 8006fb2: 4313 orrs r3, r2 + 8006fb4: f8c1 30d4 str.w r3, [r1, #212] @ 0xd4 +} + 8006fb8: bf00 nop + 8006fba: 370c adds r7, #12 + 8006fbc: 46bd mov sp, r7 + 8006fbe: f85d 7b04 ldr.w r7, [sp], #4 + 8006fc2: 4770 bx lr + 8006fc4: 58000800 .word 0x58000800 + +08006fc8 : + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableRisingTrig_32_63(uint32_t ExtiLine) +{ + 8006fc8: b480 push {r7} + 8006fca: b083 sub sp, #12 + 8006fcc: af00 add r7, sp, #0 + 8006fce: 6078 str r0, [r7, #4] + SET_BIT(EXTI->RTSR2, ExtiLine); + 8006fd0: 4b05 ldr r3, [pc, #20] @ (8006fe8 ) + 8006fd2: 6a1a ldr r2, [r3, #32] + 8006fd4: 4904 ldr r1, [pc, #16] @ (8006fe8 ) + 8006fd6: 687b ldr r3, [r7, #4] + 8006fd8: 4313 orrs r3, r2 + 8006fda: 620b str r3, [r1, #32] +} + 8006fdc: bf00 nop + 8006fde: 370c adds r7, #12 + 8006fe0: 46bd mov sp, r7 + 8006fe2: f85d 7b04 ldr.w r7, [sp], #4 + 8006fe6: 4770 bx lr + 8006fe8: 58000800 .word 0x58000800 + +08006fec : +{ + 8006fec: b480 push {r7} + 8006fee: b085 sub sp, #20 + 8006ff0: af00 add r7, sp, #0 + 8006ff2: 6078 str r0, [r7, #4] + SET_BIT(RCC->AHB3ENR, Periphs); + 8006ff4: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8006ff8: 6d1a ldr r2, [r3, #80] @ 0x50 + 8006ffa: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8006ffe: 687b ldr r3, [r7, #4] + 8007000: 4313 orrs r3, r2 + 8007002: 650b str r3, [r1, #80] @ 0x50 + tmpreg = READ_BIT(RCC->AHB3ENR, Periphs); + 8007004: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 8007008: 6d1a ldr r2, [r3, #80] @ 0x50 + 800700a: 687b ldr r3, [r7, #4] + 800700c: 4013 ands r3, r2 + 800700e: 60fb str r3, [r7, #12] + (void)tmpreg; + 8007010: 68fb ldr r3, [r7, #12] +} + 8007012: bf00 nop + 8007014: 3714 adds r7, #20 + 8007016: 46bd mov sp, r7 + 8007018: f85d 7b04 ldr.w r7, [sp], #4 + 800701c: 4770 bx lr + +0800701e : + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_FLASH + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB3_GRP1_EnableClock(uint32_t Periphs) +{ + 800701e: b480 push {r7} + 8007020: b085 sub sp, #20 + 8007022: af00 add r7, sp, #0 + 8007024: 6078 str r0, [r7, #4] + __IO uint32_t tmpreg; + SET_BIT(RCC->C2AHB3ENR, Periphs); + 8007026: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800702a: f8d3 2150 ldr.w r2, [r3, #336] @ 0x150 + 800702e: f04f 41b0 mov.w r1, #1476395008 @ 0x58000000 + 8007032: 687b ldr r3, [r7, #4] + 8007034: 4313 orrs r3, r2 + 8007036: f8c1 3150 str.w r3, [r1, #336] @ 0x150 + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2AHB3ENR, Periphs); + 800703a: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 + 800703e: f8d3 2150 ldr.w r2, [r3, #336] @ 0x150 + 8007042: 687b ldr r3, [r7, #4] + 8007044: 4013 ands r3, r2 + 8007046: 60fb str r3, [r7, #12] + (void)tmpreg; + 8007048: 68fb ldr r3, [r7, #12] +} + 800704a: bf00 nop + 800704c: 3714 adds r7, #20 + 800704e: 46bd mov sp, r7 + 8007050: f85d 7b04 ldr.w r7, [sp], #4 + 8007054: 4770 bx lr + +08007056 : + * @rmtoll C1CR TXFIE LL_C1_IPCC_EnableIT_TXF + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_EnableIT_TXF(IPCC_TypeDef *IPCCx) +{ + 8007056: b480 push {r7} + 8007058: b083 sub sp, #12 + 800705a: af00 add r7, sp, #0 + 800705c: 6078 str r0, [r7, #4] + SET_BIT(IPCCx->C1CR, IPCC_C1CR_TXFIE); + 800705e: 687b ldr r3, [r7, #4] + 8007060: 681b ldr r3, [r3, #0] + 8007062: f443 3280 orr.w r2, r3, #65536 @ 0x10000 + 8007066: 687b ldr r3, [r7, #4] + 8007068: 601a str r2, [r3, #0] +} + 800706a: bf00 nop + 800706c: 370c adds r7, #12 + 800706e: 46bd mov sp, r7 + 8007070: f85d 7b04 ldr.w r7, [sp], #4 + 8007074: 4770 bx lr + +08007076 : + * @rmtoll C1CR RXOIE LL_C1_IPCC_EnableIT_RXO + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_EnableIT_RXO(IPCC_TypeDef *IPCCx) +{ + 8007076: b480 push {r7} + 8007078: b083 sub sp, #12 + 800707a: af00 add r7, sp, #0 + 800707c: 6078 str r0, [r7, #4] + SET_BIT(IPCCx->C1CR, IPCC_C1CR_RXOIE); + 800707e: 687b ldr r3, [r7, #4] + 8007080: 681b ldr r3, [r3, #0] + 8007082: f043 0201 orr.w r2, r3, #1 + 8007086: 687b ldr r3, [r7, #4] + 8007088: 601a str r2, [r3, #0] +} + 800708a: bf00 nop + 800708c: 370c adds r7, #12 + 800708e: 46bd mov sp, r7 + 8007090: f85d 7b04 ldr.w r7, [sp], #4 + 8007094: 4770 bx lr + +08007096 : + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_EnableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + 8007096: b480 push {r7} + 8007098: b083 sub sp, #12 + 800709a: af00 add r7, sp, #0 + 800709c: 6078 str r0, [r7, #4] + 800709e: 6039 str r1, [r7, #0] + CLEAR_BIT(IPCCx->C1MR, Channel << IPCC_C1MR_CH1FM_Pos); + 80070a0: 687b ldr r3, [r7, #4] + 80070a2: 685a ldr r2, [r3, #4] + 80070a4: 683b ldr r3, [r7, #0] + 80070a6: 041b lsls r3, r3, #16 + 80070a8: 43db mvns r3, r3 + 80070aa: 401a ands r2, r3 + 80070ac: 687b ldr r3, [r7, #4] + 80070ae: 605a str r2, [r3, #4] +} + 80070b0: bf00 nop + 80070b2: 370c adds r7, #12 + 80070b4: 46bd mov sp, r7 + 80070b6: f85d 7b04 ldr.w r7, [sp], #4 + 80070ba: 4770 bx lr + +080070bc : + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_DisableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + 80070bc: b480 push {r7} + 80070be: b083 sub sp, #12 + 80070c0: af00 add r7, sp, #0 + 80070c2: 6078 str r0, [r7, #4] + 80070c4: 6039 str r1, [r7, #0] + SET_BIT(IPCCx->C1MR, Channel << IPCC_C1MR_CH1FM_Pos); + 80070c6: 687b ldr r3, [r7, #4] + 80070c8: 685a ldr r2, [r3, #4] + 80070ca: 683b ldr r3, [r7, #0] + 80070cc: 041b lsls r3, r3, #16 + 80070ce: 431a orrs r2, r3 + 80070d0: 687b ldr r3, [r7, #4] + 80070d2: 605a str r2, [r3, #4] +} + 80070d4: bf00 nop + 80070d6: 370c adds r7, #12 + 80070d8: 46bd mov sp, r7 + 80070da: f85d 7b04 ldr.w r7, [sp], #4 + 80070de: 4770 bx lr + +080070e0 : + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_EnableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + 80070e0: b480 push {r7} + 80070e2: b083 sub sp, #12 + 80070e4: af00 add r7, sp, #0 + 80070e6: 6078 str r0, [r7, #4] + 80070e8: 6039 str r1, [r7, #0] + CLEAR_BIT(IPCCx->C1MR, Channel); + 80070ea: 687b ldr r3, [r7, #4] + 80070ec: 685a ldr r2, [r3, #4] + 80070ee: 683b ldr r3, [r7, #0] + 80070f0: 43db mvns r3, r3 + 80070f2: 401a ands r2, r3 + 80070f4: 687b ldr r3, [r7, #4] + 80070f6: 605a str r2, [r3, #4] +} + 80070f8: bf00 nop + 80070fa: 370c adds r7, #12 + 80070fc: 46bd mov sp, r7 + 80070fe: f85d 7b04 ldr.w r7, [sp], #4 + 8007102: 4770 bx lr + +08007104 : + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_ClearFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + 8007104: b480 push {r7} + 8007106: b083 sub sp, #12 + 8007108: af00 add r7, sp, #0 + 800710a: 6078 str r0, [r7, #4] + 800710c: 6039 str r1, [r7, #0] + WRITE_REG(IPCCx->C1SCR, Channel); + 800710e: 687b ldr r3, [r7, #4] + 8007110: 683a ldr r2, [r7, #0] + 8007112: 609a str r2, [r3, #8] +} + 8007114: bf00 nop + 8007116: 370c adds r7, #12 + 8007118: 46bd mov sp, r7 + 800711a: f85d 7b04 ldr.w r7, [sp], #4 + 800711e: 4770 bx lr + +08007120 : + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_SetFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + 8007120: b480 push {r7} + 8007122: b083 sub sp, #12 + 8007124: af00 add r7, sp, #0 + 8007126: 6078 str r0, [r7, #4] + 8007128: 6039 str r1, [r7, #0] + WRITE_REG(IPCCx->C1SCR, Channel << IPCC_C1SCR_CH1S_Pos); + 800712a: 683b ldr r3, [r7, #0] + 800712c: 041a lsls r2, r3, #16 + 800712e: 687b ldr r3, [r7, #4] + 8007130: 609a str r2, [r3, #8] +} + 8007132: bf00 nop + 8007134: 370c adds r7, #12 + 8007136: 46bd mov sp, r7 + 8007138: f85d 7b04 ldr.w r7, [sp], #4 + 800713c: 4770 bx lr + +0800713e : + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C1_IPCC_IsActiveFlag_CHx(IPCC_TypeDef const *const IPCCx, uint32_t Channel) +{ + 800713e: b480 push {r7} + 8007140: b083 sub sp, #12 + 8007142: af00 add r7, sp, #0 + 8007144: 6078 str r0, [r7, #4] + 8007146: 6039 str r1, [r7, #0] + return ((READ_BIT(IPCCx->C1TOC2SR, Channel) == (Channel)) ? 1UL : 0UL); + 8007148: 687b ldr r3, [r7, #4] + 800714a: 68da ldr r2, [r3, #12] + 800714c: 683b ldr r3, [r7, #0] + 800714e: 4013 ands r3, r2 + 8007150: 683a ldr r2, [r7, #0] + 8007152: 429a cmp r2, r3 + 8007154: d101 bne.n 800715a + 8007156: 2301 movs r3, #1 + 8007158: e000 b.n 800715c + 800715a: 2300 movs r3, #0 +} + 800715c: 4618 mov r0, r3 + 800715e: 370c adds r7, #12 + 8007160: 46bd mov sp, r7 + 8007162: f85d 7b04 ldr.w r7, [sp], #4 + 8007166: 4770 bx lr + +08007168 : + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_IPCC_IsActiveFlag_CHx(IPCC_TypeDef const *const IPCCx, uint32_t Channel) +{ + 8007168: b480 push {r7} + 800716a: b083 sub sp, #12 + 800716c: af00 add r7, sp, #0 + 800716e: 6078 str r0, [r7, #4] + 8007170: 6039 str r1, [r7, #0] + return ((READ_BIT(IPCCx->C2TOC1SR, Channel) == (Channel)) ? 1UL : 0UL); + 8007172: 687b ldr r3, [r7, #4] + 8007174: 69da ldr r2, [r3, #28] + 8007176: 683b ldr r3, [r7, #0] + 8007178: 4013 ands r3, r2 + 800717a: 683a ldr r2, [r7, #0] + 800717c: 429a cmp r2, r3 + 800717e: d101 bne.n 8007184 + 8007180: 2301 movs r3, #1 + 8007182: e000 b.n 8007186 + 8007184: 2300 movs r3, #0 +} + 8007186: 4618 mov r0, r3 + 8007188: 370c adds r7, #12 + 800718a: 46bd mov sp, r7 + 800718c: f85d 7b04 ldr.w r7, [sp], #4 + 8007190: 4770 bx lr + ... + +08007194 : + +/****************************************************************************** + * INTERRUPT HANDLER + ******************************************************************************/ +void HW_IPCC_Rx_Handler( void ) +{ + 8007194: b580 push {r7, lr} + 8007196: af00 add r7, sp, #0 + if (HW_IPCC_RX_PENDING( HW_IPCC_SYSTEM_EVENT_CHANNEL )) + 8007198: 2102 movs r1, #2 + 800719a: 4818 ldr r0, [pc, #96] @ (80071fc ) + 800719c: f7ff ffe4 bl 8007168 + 80071a0: 4603 mov r3, r0 + 80071a2: 2b00 cmp r3, #0 + 80071a4: d008 beq.n 80071b8 + 80071a6: 4b15 ldr r3, [pc, #84] @ (80071fc ) + 80071a8: 685b ldr r3, [r3, #4] + 80071aa: f003 0302 and.w r3, r3, #2 + 80071ae: 2b00 cmp r3, #0 + 80071b0: d102 bne.n 80071b8 + { + HW_IPCC_SYS_EvtHandler(); + 80071b2: f000 f925 bl 8007400 + 80071b6: e01e b.n 80071f6 + else if (HW_IPCC_RX_PENDING( HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL )) + { + HW_IPCC_ZIGBEE_StackM0RequestHandler(); + } +#endif /* ZIGBEE_WB */ + else if (HW_IPCC_RX_PENDING( HW_IPCC_BLE_EVENT_CHANNEL )) + 80071b8: 2101 movs r1, #1 + 80071ba: 4810 ldr r0, [pc, #64] @ (80071fc ) + 80071bc: f7ff ffd4 bl 8007168 + 80071c0: 4603 mov r3, r0 + 80071c2: 2b00 cmp r3, #0 + 80071c4: d008 beq.n 80071d8 + 80071c6: 4b0d ldr r3, [pc, #52] @ (80071fc ) + 80071c8: 685b ldr r3, [r3, #4] + 80071ca: f003 0301 and.w r3, r3, #1 + 80071ce: 2b00 cmp r3, #0 + 80071d0: d102 bne.n 80071d8 + { + HW_IPCC_BLE_EvtHandler(); + 80071d2: f000 f899 bl 8007308 + 80071d6: e00e b.n 80071f6 + } + else if (HW_IPCC_RX_PENDING( HW_IPCC_TRACES_CHANNEL )) + 80071d8: 2108 movs r1, #8 + 80071da: 4808 ldr r0, [pc, #32] @ (80071fc ) + 80071dc: f7ff ffc4 bl 8007168 + 80071e0: 4603 mov r3, r0 + 80071e2: 2b00 cmp r3, #0 + 80071e4: d008 beq.n 80071f8 + 80071e6: 4b05 ldr r3, [pc, #20] @ (80071fc ) + 80071e8: 685b ldr r3, [r3, #4] + 80071ea: f003 0308 and.w r3, r3, #8 + 80071ee: 2b00 cmp r3, #0 + 80071f0: d102 bne.n 80071f8 + { + HW_IPCC_TRACES_EvtHandler(); + 80071f2: f000 f97d bl 80074f0 + } + + return; + 80071f6: bf00 nop + 80071f8: bf00 nop +} + 80071fa: bd80 pop {r7, pc} + 80071fc: 58000c00 .word 0x58000c00 + +08007200 : + +void HW_IPCC_Tx_Handler( void ) +{ + 8007200: b580 push {r7, lr} + 8007202: af00 add r7, sp, #0 + if (HW_IPCC_TX_PENDING( HW_IPCC_SYSTEM_CMD_RSP_CHANNEL )) + 8007204: 2102 movs r1, #2 + 8007206: 4818 ldr r0, [pc, #96] @ (8007268 ) + 8007208: f7ff ff99 bl 800713e + 800720c: 4603 mov r3, r0 + 800720e: 2b00 cmp r3, #0 + 8007210: d108 bne.n 8007224 + 8007212: 4b15 ldr r3, [pc, #84] @ (8007268 ) + 8007214: 685b ldr r3, [r3, #4] + 8007216: f403 3300 and.w r3, r3, #131072 @ 0x20000 + 800721a: 2b00 cmp r3, #0 + 800721c: d102 bne.n 8007224 + { + HW_IPCC_SYS_CmdEvtHandler(); + 800721e: f000 f8d3 bl 80073c8 + 8007222: e01e b.n 8007262 + if (HW_IPCC_TX_PENDING( HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL )) + { + HW_IPCC_ZIGBEE_CmdEvtHandler(); + } +#endif /* ZIGBEE_WB */ + else if (HW_IPCC_TX_PENDING( HW_IPCC_MM_RELEASE_BUFFER_CHANNEL )) + 8007224: 2108 movs r1, #8 + 8007226: 4810 ldr r0, [pc, #64] @ (8007268 ) + 8007228: f7ff ff89 bl 800713e + 800722c: 4603 mov r3, r0 + 800722e: 2b00 cmp r3, #0 + 8007230: d108 bne.n 8007244 + 8007232: 4b0d ldr r3, [pc, #52] @ (8007268 ) + 8007234: 685b ldr r3, [r3, #4] + 8007236: f403 2300 and.w r3, r3, #524288 @ 0x80000 + 800723a: 2b00 cmp r3, #0 + 800723c: d102 bne.n 8007244 + { + HW_IPCC_MM_FreeBufHandler(); + 800723e: f000 f919 bl 8007474 + 8007242: e00e b.n 8007262 + } + else if (HW_IPCC_TX_PENDING( HW_IPCC_HCI_ACL_DATA_CHANNEL )) + 8007244: 2120 movs r1, #32 + 8007246: 4808 ldr r0, [pc, #32] @ (8007268 ) + 8007248: f7ff ff79 bl 800713e + 800724c: 4603 mov r3, r0 + 800724e: 2b00 cmp r3, #0 + 8007250: d108 bne.n 8007264 + 8007252: 4b05 ldr r3, [pc, #20] @ (8007268 ) + 8007254: 685b ldr r3, [r3, #4] + 8007256: f403 1300 and.w r3, r3, #2097152 @ 0x200000 + 800725a: 2b00 cmp r3, #0 + 800725c: d102 bne.n 8007264 + { + HW_IPCC_BLE_AclDataEvtHandler(); + 800725e: f000 f85f bl 8007320 + } + + return; + 8007262: bf00 nop + 8007264: bf00 nop +} + 8007266: bd80 pop {r7, pc} + 8007268: 58000c00 .word 0x58000c00 + +0800726c : +/****************************************************************************** + * GENERAL + ******************************************************************************/ +void HW_IPCC_Enable( void ) +{ + 800726c: b580 push {r7, lr} + 800726e: af00 add r7, sp, #0 + /** + * Such as IPCC IP available to the CPU2, it is required to keep the IPCC clock running + * when FUS is running on CPU2 and CPU1 enters deep sleep mode + */ + LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_IPCC); + 8007270: f44f 1080 mov.w r0, #1048576 @ 0x100000 + 8007274: f7ff fed3 bl 800701e + + /** + * When the device is out of standby, it is required to use the EXTI mechanism to wakeup CPU2 + */ + LL_EXTI_EnableRisingTrig_32_63( LL_EXTI_LINE_41 ); + 8007278: f44f 7000 mov.w r0, #512 @ 0x200 + 800727c: f7ff fea4 bl 8006fc8 + /* It is required to have at least a system clock cycle before a SEV after LL_EXTI_EnableRisingTrig_32_63() */ + LL_C2_EXTI_EnableEvent_32_63( LL_EXTI_LINE_41 ); + 8007280: f44f 7000 mov.w r0, #512 @ 0x200 + 8007284: f7ff fe8c bl 8006fa0 + * When the CPU2 receives that command, it waits for its event input to be set to restart the CPU2 firmware. + * This is required because once C2BOOT has been set once, a clear/set on C2BOOT has no effect. + * When SHCI_C2_Reinit( ) is not called, generating an event to the CPU2 does not have any effect + * So, by default, the application shall both set the event flag and set the C2BOOT bit. + */ + __SEV( ); /* Set the internal event flag and send an event to the CPU2 */ + 8007288: bf40 sev + __WFE( ); /* Clear the internal event flag */ + 800728a: bf20 wfe + LL_PWR_EnableBootC2( ); + 800728c: f7ff fe78 bl 8006f80 + + return; + 8007290: bf00 nop +} + 8007292: bd80 pop {r7, pc} + +08007294 : + +void HW_IPCC_Init( void ) +{ + 8007294: b580 push {r7, lr} + 8007296: af00 add r7, sp, #0 + LL_AHB3_GRP1_EnableClock( LL_AHB3_GRP1_PERIPH_IPCC ); + 8007298: f44f 1080 mov.w r0, #1048576 @ 0x100000 + 800729c: f7ff fea6 bl 8006fec + + LL_C1_IPCC_EnableIT_RXO( IPCC ); + 80072a0: 4806 ldr r0, [pc, #24] @ (80072bc ) + 80072a2: f7ff fee8 bl 8007076 + LL_C1_IPCC_EnableIT_TXF( IPCC ); + 80072a6: 4805 ldr r0, [pc, #20] @ (80072bc ) + 80072a8: f7ff fed5 bl 8007056 + + HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn); + 80072ac: 202c movs r0, #44 @ 0x2c + 80072ae: f7fa fcf2 bl 8001c96 + HAL_NVIC_EnableIRQ(IPCC_C1_TX_IRQn); + 80072b2: 202d movs r0, #45 @ 0x2d + 80072b4: f7fa fcef bl 8001c96 + + return; + 80072b8: bf00 nop +} + 80072ba: bd80 pop {r7, pc} + 80072bc: 58000c00 .word 0x58000c00 + +080072c0 : + +/****************************************************************************** + * BLE + ******************************************************************************/ +void HW_IPCC_BLE_Init( void ) +{ + 80072c0: b580 push {r7, lr} + 80072c2: b084 sub sp, #16 + 80072c4: af00 add r7, sp, #0 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80072c6: f3ef 8310 mrs r3, PRIMASK + 80072ca: 607b str r3, [r7, #4] + return(result); + 80072cc: 687b ldr r3, [r7, #4] + UTILS_ENTER_CRITICAL_SECTION(); + 80072ce: 60fb str r3, [r7, #12] + __ASM volatile ("cpsid i" : : : "memory"); + 80072d0: b672 cpsid i +} + 80072d2: bf00 nop + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_BLE_EVENT_CHANNEL ); + 80072d4: 2101 movs r1, #1 + 80072d6: 4806 ldr r0, [pc, #24] @ (80072f0 ) + 80072d8: f7ff ff02 bl 80070e0 + 80072dc: 68fb ldr r3, [r7, #12] + 80072de: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80072e0: 68bb ldr r3, [r7, #8] + 80072e2: f383 8810 msr PRIMASK, r3 +} + 80072e6: bf00 nop + UTILS_EXIT_CRITICAL_SECTION(); + + return; + 80072e8: bf00 nop +} + 80072ea: 3710 adds r7, #16 + 80072ec: 46bd mov sp, r7 + 80072ee: bd80 pop {r7, pc} + 80072f0: 58000c00 .word 0x58000c00 + +080072f4 : + +void HW_IPCC_BLE_SendCmd( void ) +{ + 80072f4: b580 push {r7, lr} + 80072f6: af00 add r7, sp, #0 + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_BLE_CMD_CHANNEL ); + 80072f8: 2101 movs r1, #1 + 80072fa: 4802 ldr r0, [pc, #8] @ (8007304 ) + 80072fc: f7ff ff10 bl 8007120 + + return; + 8007300: bf00 nop +} + 8007302: bd80 pop {r7, pc} + 8007304: 58000c00 .word 0x58000c00 + +08007308 : + +static void HW_IPCC_BLE_EvtHandler( void ) +{ + 8007308: b580 push {r7, lr} + 800730a: af00 add r7, sp, #0 + HW_IPCC_BLE_RxEvtNot(); + 800730c: f7fe ffe4 bl 80062d8 + + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_BLE_EVENT_CHANNEL ); + 8007310: 2101 movs r1, #1 + 8007312: 4802 ldr r0, [pc, #8] @ (800731c ) + 8007314: f7ff fef6 bl 8007104 + + return; + 8007318: bf00 nop +} + 800731a: bd80 pop {r7, pc} + 800731c: 58000c00 .word 0x58000c00 + +08007320 : + + return; +} + +static void HW_IPCC_BLE_AclDataEvtHandler( void ) +{ + 8007320: b580 push {r7, lr} + 8007322: b084 sub sp, #16 + 8007324: af00 add r7, sp, #0 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8007326: f3ef 8310 mrs r3, PRIMASK + 800732a: 607b str r3, [r7, #4] + return(result); + 800732c: 687b ldr r3, [r7, #4] + UTILS_ENTER_CRITICAL_SECTION(); + 800732e: 60fb str r3, [r7, #12] + __ASM volatile ("cpsid i" : : : "memory"); + 8007330: b672 cpsid i +} + 8007332: bf00 nop + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_HCI_ACL_DATA_CHANNEL ); + 8007334: 2120 movs r1, #32 + 8007336: 4807 ldr r0, [pc, #28] @ (8007354 ) + 8007338: f7ff fec0 bl 80070bc + 800733c: 68fb ldr r3, [r7, #12] + 800733e: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8007340: 68bb ldr r3, [r7, #8] + 8007342: f383 8810 msr PRIMASK, r3 +} + 8007346: bf00 nop + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_BLE_AclDataAckNot(); + 8007348: f7fe fff6 bl 8006338 + + return; + 800734c: bf00 nop +} + 800734e: 3710 adds r7, #16 + 8007350: 46bd mov sp, r7 + 8007352: bd80 pop {r7, pc} + 8007354: 58000c00 .word 0x58000c00 + +08007358 : + +/****************************************************************************** + * SYSTEM + ******************************************************************************/ +void HW_IPCC_SYS_Init( void ) +{ + 8007358: b580 push {r7, lr} + 800735a: b084 sub sp, #16 + 800735c: af00 add r7, sp, #0 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 800735e: f3ef 8310 mrs r3, PRIMASK + 8007362: 607b str r3, [r7, #4] + return(result); + 8007364: 687b ldr r3, [r7, #4] + UTILS_ENTER_CRITICAL_SECTION(); + 8007366: 60fb str r3, [r7, #12] + __ASM volatile ("cpsid i" : : : "memory"); + 8007368: b672 cpsid i +} + 800736a: bf00 nop + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_SYSTEM_EVENT_CHANNEL ); + 800736c: 2102 movs r1, #2 + 800736e: 4806 ldr r0, [pc, #24] @ (8007388 ) + 8007370: f7ff feb6 bl 80070e0 + 8007374: 68fb ldr r3, [r7, #12] + 8007376: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8007378: 68bb ldr r3, [r7, #8] + 800737a: f383 8810 msr PRIMASK, r3 +} + 800737e: bf00 nop + UTILS_EXIT_CRITICAL_SECTION(); + + return; + 8007380: bf00 nop +} + 8007382: 3710 adds r7, #16 + 8007384: 46bd mov sp, r7 + 8007386: bd80 pop {r7, pc} + 8007388: 58000c00 .word 0x58000c00 + +0800738c : + +void HW_IPCC_SYS_SendCmd( void ) +{ + 800738c: b580 push {r7, lr} + 800738e: b084 sub sp, #16 + 8007390: af00 add r7, sp, #0 + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL ); + 8007392: 2102 movs r1, #2 + 8007394: 480b ldr r0, [pc, #44] @ (80073c4 ) + 8007396: f7ff fec3 bl 8007120 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 800739a: f3ef 8310 mrs r3, PRIMASK + 800739e: 607b str r3, [r7, #4] + return(result); + 80073a0: 687b ldr r3, [r7, #4] + UTILS_ENTER_CRITICAL_SECTION(); + 80073a2: 60fb str r3, [r7, #12] + __ASM volatile ("cpsid i" : : : "memory"); + 80073a4: b672 cpsid i +} + 80073a6: bf00 nop + LL_C1_IPCC_EnableTransmitChannel( IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL ); + 80073a8: 2102 movs r1, #2 + 80073aa: 4806 ldr r0, [pc, #24] @ (80073c4 ) + 80073ac: f7ff fe73 bl 8007096 + 80073b0: 68fb ldr r3, [r7, #12] + 80073b2: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80073b4: 68bb ldr r3, [r7, #8] + 80073b6: f383 8810 msr PRIMASK, r3 +} + 80073ba: bf00 nop + UTILS_EXIT_CRITICAL_SECTION(); + + return; + 80073bc: bf00 nop +} + 80073be: 3710 adds r7, #16 + 80073c0: 46bd mov sp, r7 + 80073c2: bd80 pop {r7, pc} + 80073c4: 58000c00 .word 0x58000c00 + +080073c8 : + +static void HW_IPCC_SYS_CmdEvtHandler( void ) +{ + 80073c8: b580 push {r7, lr} + 80073ca: b084 sub sp, #16 + 80073cc: af00 add r7, sp, #0 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80073ce: f3ef 8310 mrs r3, PRIMASK + 80073d2: 607b str r3, [r7, #4] + return(result); + 80073d4: 687b ldr r3, [r7, #4] + UTILS_ENTER_CRITICAL_SECTION(); + 80073d6: 60fb str r3, [r7, #12] + __ASM volatile ("cpsid i" : : : "memory"); + 80073d8: b672 cpsid i +} + 80073da: bf00 nop + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL ); + 80073dc: 2102 movs r1, #2 + 80073de: 4807 ldr r0, [pc, #28] @ (80073fc ) + 80073e0: f7ff fe6c bl 80070bc + 80073e4: 68fb ldr r3, [r7, #12] + 80073e6: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80073e8: 68bb ldr r3, [r7, #8] + 80073ea: f383 8810 msr PRIMASK, r3 +} + 80073ee: bf00 nop + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_SYS_CmdEvtNot(); + 80073f0: f7fe fff6 bl 80063e0 + + return; + 80073f4: bf00 nop +} + 80073f6: 3710 adds r7, #16 + 80073f8: 46bd mov sp, r7 + 80073fa: bd80 pop {r7, pc} + 80073fc: 58000c00 .word 0x58000c00 + +08007400 : + +static void HW_IPCC_SYS_EvtHandler( void ) +{ + 8007400: b580 push {r7, lr} + 8007402: af00 add r7, sp, #0 + HW_IPCC_SYS_EvtNot(); + 8007404: f7ff f802 bl 800640c + + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_SYSTEM_EVENT_CHANNEL ); + 8007408: 2102 movs r1, #2 + 800740a: 4802 ldr r0, [pc, #8] @ (8007414 ) + 800740c: f7ff fe7a bl 8007104 + + return; + 8007410: bf00 nop +} + 8007412: bd80 pop {r7, pc} + 8007414: 58000c00 .word 0x58000c00 + +08007418 : + +/****************************************************************************** + * MEMORY MANAGER + ******************************************************************************/ +void HW_IPCC_MM_SendFreeBuf( void (*cb)( void ) ) +{ + 8007418: b580 push {r7, lr} + 800741a: b086 sub sp, #24 + 800741c: af00 add r7, sp, #0 + 800741e: 6078 str r0, [r7, #4] + if ( LL_C1_IPCC_IsActiveFlag_CHx( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ) ) + 8007420: 2108 movs r1, #8 + 8007422: 4812 ldr r0, [pc, #72] @ (800746c ) + 8007424: f7ff fe8b bl 800713e + 8007428: 4603 mov r3, r0 + 800742a: 2b00 cmp r3, #0 + 800742c: d013 beq.n 8007456 + { + FreeBufCb = cb; + 800742e: 4a10 ldr r2, [pc, #64] @ (8007470 ) + 8007430: 687b ldr r3, [r7, #4] + 8007432: 6013 str r3, [r2, #0] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8007434: f3ef 8310 mrs r3, PRIMASK + 8007438: 60fb str r3, [r7, #12] + return(result); + 800743a: 68fb ldr r3, [r7, #12] + UTILS_ENTER_CRITICAL_SECTION(); + 800743c: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 800743e: b672 cpsid i +} + 8007440: bf00 nop + LL_C1_IPCC_EnableTransmitChannel( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ); + 8007442: 2108 movs r1, #8 + 8007444: 4809 ldr r0, [pc, #36] @ (800746c ) + 8007446: f7ff fe26 bl 8007096 + 800744a: 697b ldr r3, [r7, #20] + 800744c: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 800744e: 693b ldr r3, [r7, #16] + 8007450: f383 8810 msr PRIMASK, r3 +} + 8007454: e005 b.n 8007462 + UTILS_EXIT_CRITICAL_SECTION(); + } + else + { + cb(); + 8007456: 687b ldr r3, [r7, #4] + 8007458: 4798 blx r3 + + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ); + 800745a: 2108 movs r1, #8 + 800745c: 4803 ldr r0, [pc, #12] @ (800746c ) + 800745e: f7ff fe5f bl 8007120 + } + + return; + 8007462: bf00 nop +} + 8007464: 3718 adds r7, #24 + 8007466: 46bd mov sp, r7 + 8007468: bd80 pop {r7, pc} + 800746a: bf00 nop + 800746c: 58000c00 .word 0x58000c00 + 8007470: 200002fc .word 0x200002fc + +08007474 : + +static void HW_IPCC_MM_FreeBufHandler( void ) +{ + 8007474: b580 push {r7, lr} + 8007476: b084 sub sp, #16 + 8007478: af00 add r7, sp, #0 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 800747a: f3ef 8310 mrs r3, PRIMASK + 800747e: 607b str r3, [r7, #4] + return(result); + 8007480: 687b ldr r3, [r7, #4] + UTILS_ENTER_CRITICAL_SECTION(); + 8007482: 60fb str r3, [r7, #12] + __ASM volatile ("cpsid i" : : : "memory"); + 8007484: b672 cpsid i +} + 8007486: bf00 nop + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ); + 8007488: 2108 movs r1, #8 + 800748a: 480a ldr r0, [pc, #40] @ (80074b4 ) + 800748c: f7ff fe16 bl 80070bc + 8007490: 68fb ldr r3, [r7, #12] + 8007492: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8007494: 68bb ldr r3, [r7, #8] + 8007496: f383 8810 msr PRIMASK, r3 +} + 800749a: bf00 nop + UTILS_EXIT_CRITICAL_SECTION(); + + FreeBufCb(); + 800749c: 4b06 ldr r3, [pc, #24] @ (80074b8 ) + 800749e: 681b ldr r3, [r3, #0] + 80074a0: 4798 blx r3 + + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ); + 80074a2: 2108 movs r1, #8 + 80074a4: 4803 ldr r0, [pc, #12] @ (80074b4 ) + 80074a6: f7ff fe3b bl 8007120 + + return; + 80074aa: bf00 nop +} + 80074ac: 3710 adds r7, #16 + 80074ae: 46bd mov sp, r7 + 80074b0: bd80 pop {r7, pc} + 80074b2: bf00 nop + 80074b4: 58000c00 .word 0x58000c00 + 80074b8: 200002fc .word 0x200002fc + +080074bc : + +/****************************************************************************** + * TRACES + ******************************************************************************/ +void HW_IPCC_TRACES_Init( void ) +{ + 80074bc: b580 push {r7, lr} + 80074be: b084 sub sp, #16 + 80074c0: af00 add r7, sp, #0 + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80074c2: f3ef 8310 mrs r3, PRIMASK + 80074c6: 607b str r3, [r7, #4] + return(result); + 80074c8: 687b ldr r3, [r7, #4] + UTILS_ENTER_CRITICAL_SECTION(); + 80074ca: 60fb str r3, [r7, #12] + __ASM volatile ("cpsid i" : : : "memory"); + 80074cc: b672 cpsid i +} + 80074ce: bf00 nop + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_TRACES_CHANNEL ); + 80074d0: 2108 movs r1, #8 + 80074d2: 4806 ldr r0, [pc, #24] @ (80074ec ) + 80074d4: f7ff fe04 bl 80070e0 + 80074d8: 68fb ldr r3, [r7, #12] + 80074da: 60bb str r3, [r7, #8] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80074dc: 68bb ldr r3, [r7, #8] + 80074de: f383 8810 msr PRIMASK, r3 +} + 80074e2: bf00 nop + UTILS_EXIT_CRITICAL_SECTION(); + + return; + 80074e4: bf00 nop +} + 80074e6: 3710 adds r7, #16 + 80074e8: 46bd mov sp, r7 + 80074ea: bd80 pop {r7, pc} + 80074ec: 58000c00 .word 0x58000c00 + +080074f0 : + +static void HW_IPCC_TRACES_EvtHandler( void ) +{ + 80074f0: b580 push {r7, lr} + 80074f2: af00 add r7, sp, #0 + HW_IPCC_TRACES_EvtNot(); + 80074f4: f7ff f832 bl 800655c + + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_TRACES_CHANNEL ); + 80074f8: 2108 movs r1, #8 + 80074fa: 4802 ldr r0, [pc, #8] @ (8007504 ) + 80074fc: f7ff fe02 bl 8007104 + + return; + 8007500: bf00 nop +} + 8007502: bd80 pop {r7, pc} + 8007504: 58000c00 .word 0x58000c00 + +08007508 : + +/** @addtogroup TINY_LPM_Exported_function + * @{ + */ +void UTIL_LPM_Init( void ) +{ + 8007508: b480 push {r7} + 800750a: af00 add r7, sp, #0 + StopModeDisable = UTIL_LPM_NO_BIT_SET; + 800750c: 4b05 ldr r3, [pc, #20] @ (8007524 ) + 800750e: 2200 movs r2, #0 + 8007510: 601a str r2, [r3, #0] + OffModeDisable = UTIL_LPM_NO_BIT_SET; + 8007512: 4b05 ldr r3, [pc, #20] @ (8007528 ) + 8007514: 2200 movs r2, #0 + 8007516: 601a str r2, [r3, #0] + UTIL_LPM_INIT_CRITICAL_SECTION( ); +} + 8007518: bf00 nop + 800751a: 46bd mov sp, r7 + 800751c: f85d 7b04 ldr.w r7, [sp], #4 + 8007520: 4770 bx lr + 8007522: bf00 nop + 8007524: 20000300 .word 0x20000300 + 8007528: 20000304 .word 0x20000304 + +0800752c : + + UTIL_LPM_EXIT_CRITICAL_SECTION( ); +} + +void UTIL_LPM_SetOffMode( UTIL_LPM_bm_t lpm_id_bm, UTIL_LPM_State_t state ) +{ + 800752c: b480 push {r7} + 800752e: b087 sub sp, #28 + 8007530: af00 add r7, sp, #0 + 8007532: 6078 str r0, [r7, #4] + 8007534: 460b mov r3, r1 + 8007536: 70fb strb r3, [r7, #3] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8007538: f3ef 8310 mrs r3, PRIMASK + 800753c: 613b str r3, [r7, #16] + return(result); + 800753e: 693b ldr r3, [r7, #16] + UTIL_LPM_ENTER_CRITICAL_SECTION( ); + 8007540: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 8007542: b672 cpsid i +} + 8007544: bf00 nop + + switch(state) + 8007546: 78fb ldrb r3, [r7, #3] + 8007548: 2b00 cmp r3, #0 + 800754a: d008 beq.n 800755e + 800754c: 2b01 cmp r3, #1 + 800754e: d10e bne.n 800756e + { + case UTIL_LPM_DISABLE: + { + OffModeDisable |= lpm_id_bm; + 8007550: 4b0d ldr r3, [pc, #52] @ (8007588 ) + 8007552: 681a ldr r2, [r3, #0] + 8007554: 687b ldr r3, [r7, #4] + 8007556: 4313 orrs r3, r2 + 8007558: 4a0b ldr r2, [pc, #44] @ (8007588 ) + 800755a: 6013 str r3, [r2, #0] + break; + 800755c: e008 b.n 8007570 + } + case UTIL_LPM_ENABLE: + { + OffModeDisable &= ( ~lpm_id_bm ); + 800755e: 687b ldr r3, [r7, #4] + 8007560: 43da mvns r2, r3 + 8007562: 4b09 ldr r3, [pc, #36] @ (8007588 ) + 8007564: 681b ldr r3, [r3, #0] + 8007566: 4013 ands r3, r2 + 8007568: 4a07 ldr r2, [pc, #28] @ (8007588 ) + 800756a: 6013 str r3, [r2, #0] + break; + 800756c: e000 b.n 8007570 + } + default : + { + break; + 800756e: bf00 nop + 8007570: 697b ldr r3, [r7, #20] + 8007572: 60fb str r3, [r7, #12] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8007574: 68fb ldr r3, [r7, #12] + 8007576: f383 8810 msr PRIMASK, r3 +} + 800757a: bf00 nop + } + } + + UTIL_LPM_EXIT_CRITICAL_SECTION( ); +} + 800757c: bf00 nop + 800757e: 371c adds r7, #28 + 8007580: 46bd mov sp, r7 + 8007582: f85d 7b04 ldr.w r7, [sp], #4 + 8007586: 4770 bx lr + 8007588: 20000304 .word 0x20000304 + +0800758c : + * That is the reason why many variables that are used only in that function are declared static. + * Note: These variables could have been declared static in the function. + * + */ +void UTIL_SEQ_Run( UTIL_SEQ_bm_t Mask_bm ) +{ + 800758c: b580 push {r7, lr} + 800758e: b094 sub sp, #80 @ 0x50 + 8007590: af00 add r7, sp, #0 + 8007592: 6078 str r0, [r7, #4] + /* + * When this function is nested, the mask to be applied cannot be larger than the first call + * The mask is always getting smaller and smaller + * A copy is made of the mask set by UTIL_SEQ_Run() in case it is called again in the task + */ + super_mask_backup = SuperMask; + 8007594: 4b89 ldr r3, [pc, #548] @ (80077bc ) + 8007596: 681b ldr r3, [r3, #0] + 8007598: 62fb str r3, [r7, #44] @ 0x2c + SuperMask &= Mask_bm; + 800759a: 4b88 ldr r3, [pc, #544] @ (80077bc ) + 800759c: 681a ldr r2, [r3, #0] + 800759e: 687b ldr r3, [r7, #4] + 80075a0: 4013 ands r3, r2 + 80075a2: 4a86 ldr r2, [pc, #536] @ (80077bc ) + 80075a4: 6013 str r3, [r2, #0] + * TaskMask that comes from UTIL_SEQ_PauseTask() / UTIL_SEQ_ResumeTask + * SuperMask that comes from UTIL_SEQ_Run + * If the waited event is there, exit from UTIL_SEQ_Run() to return to the + * waiting task + */ + local_taskset = TaskSet; + 80075a6: 4b86 ldr r3, [pc, #536] @ (80077c0 ) + 80075a8: 681b ldr r3, [r3, #0] + 80075aa: 647b str r3, [r7, #68] @ 0x44 + local_evtset = EvtSet; + 80075ac: 4b85 ldr r3, [pc, #532] @ (80077c4 ) + 80075ae: 681b ldr r3, [r3, #0] + 80075b0: 643b str r3, [r7, #64] @ 0x40 + local_taskmask = TaskMask; + 80075b2: 4b85 ldr r3, [pc, #532] @ (80077c8 ) + 80075b4: 681b ldr r3, [r3, #0] + 80075b6: 63fb str r3, [r7, #60] @ 0x3c + local_evtwaited = EvtWaited; + 80075b8: 4b84 ldr r3, [pc, #528] @ (80077cc ) + 80075ba: 681b ldr r3, [r3, #0] + 80075bc: 63bb str r3, [r7, #56] @ 0x38 + while(((local_taskset & local_taskmask & SuperMask) != 0U) && ((local_evtset & local_evtwaited)==0U)) + 80075be: e112 b.n 80077e6 + { + counter = 0U; + 80075c0: 2300 movs r3, #0 + 80075c2: 64fb str r3, [r7, #76] @ 0x4c + /* + * When a flag is set, the associated bit is set in TaskPrio[counter].priority mask depending + * on the priority parameter given from UTIL_SEQ_SetTask() + * The while loop is looking for a flag set from the highest priority maskr to the lower + */ + while((TaskPrio[counter].priority & local_taskmask & SuperMask)== 0U) + 80075c4: e002 b.n 80075cc + { + counter++; + 80075c6: 6cfb ldr r3, [r7, #76] @ 0x4c + 80075c8: 3301 adds r3, #1 + 80075ca: 64fb str r3, [r7, #76] @ 0x4c + while((TaskPrio[counter].priority & local_taskmask & SuperMask)== 0U) + 80075cc: 4a80 ldr r2, [pc, #512] @ (80077d0 ) + 80075ce: 6cfb ldr r3, [r7, #76] @ 0x4c + 80075d0: f852 2033 ldr.w r2, [r2, r3, lsl #3] + 80075d4: 6bfb ldr r3, [r7, #60] @ 0x3c + 80075d6: 401a ands r2, r3 + 80075d8: 4b78 ldr r3, [pc, #480] @ (80077bc ) + 80075da: 681b ldr r3, [r3, #0] + 80075dc: 4013 ands r3, r2 + 80075de: 2b00 cmp r3, #0 + 80075e0: d0f1 beq.n 80075c6 + } + + current_task_set = TaskPrio[counter].priority & local_taskmask & SuperMask; + 80075e2: 4a7b ldr r2, [pc, #492] @ (80077d0 ) + 80075e4: 6cfb ldr r3, [r7, #76] @ 0x4c + 80075e6: f852 2033 ldr.w r2, [r2, r3, lsl #3] + 80075ea: 6bfb ldr r3, [r7, #60] @ 0x3c + 80075ec: 401a ands r2, r3 + 80075ee: 4b73 ldr r3, [pc, #460] @ (80077bc ) + 80075f0: 681b ldr r3, [r3, #0] + 80075f2: 4013 ands r3, r2 + 80075f4: 64bb str r3, [r7, #72] @ 0x48 + * the round_robin mask + * + * In the check below, the round_robin mask is reinitialize in case all pending + * tasks haven been executed at least once + */ + if ((TaskPrio[counter].round_robin & current_task_set) == 0U) + 80075f6: 4a76 ldr r2, [pc, #472] @ (80077d0 ) + 80075f8: 6cfb ldr r3, [r7, #76] @ 0x4c + 80075fa: 00db lsls r3, r3, #3 + 80075fc: 4413 add r3, r2 + 80075fe: 685a ldr r2, [r3, #4] + 8007600: 6cbb ldr r3, [r7, #72] @ 0x48 + 8007602: 4013 ands r3, r2 + 8007604: 2b00 cmp r3, #0 + 8007606: d106 bne.n 8007616 + { + TaskPrio[counter].round_robin = UTIL_SEQ_ALL_BIT_SET; + 8007608: 4a71 ldr r2, [pc, #452] @ (80077d0 ) + 800760a: 6cfb ldr r3, [r7, #76] @ 0x4c + 800760c: 00db lsls r3, r3, #3 + 800760e: 4413 add r3, r2 + 8007610: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff + 8007614: 605a str r2, [r3, #4] + + /* + * Compute the Stack Startving List + * This is the list of the task that have been set at least once minus the one that have been cleared ar least once + */ + task_starving_list = TaskSet; + 8007616: 4b6a ldr r3, [pc, #424] @ (80077c0 ) + 8007618: 681b ldr r3, [r3, #0] + 800761a: 62bb str r3, [r7, #40] @ 0x28 + * Such situation shall not happen when evaluating task_starving_list + * At any time, there should not be any bit reset in TaskPrio[counter].round_robin and reset in TaskClearList + * It is correct with regard to the Sequencer Architecture to set in TaskClearList all tasks that are said to be executed from TaskPrio[counter].round_robin + * This synchronizes both information before calculating the CurrentTaskIdx + */ + TaskClearList |= (~TaskPrio[counter].round_robin); + 800761c: 4a6c ldr r2, [pc, #432] @ (80077d0 ) + 800761e: 6cfb ldr r3, [r7, #76] @ 0x4c + 8007620: 00db lsls r3, r3, #3 + 8007622: 4413 add r3, r2 + 8007624: 685b ldr r3, [r3, #4] + 8007626: 43da mvns r2, r3 + 8007628: 4b6a ldr r3, [pc, #424] @ (80077d4 ) + 800762a: 681b ldr r3, [r3, #0] + 800762c: 4313 orrs r3, r2 + 800762e: 4a69 ldr r2, [pc, #420] @ (80077d4 ) + 8007630: 6013 str r3, [r2, #0] + + task_starving_list &= (~TaskClearList); + 8007632: 4b68 ldr r3, [pc, #416] @ (80077d4 ) + 8007634: 681b ldr r3, [r3, #0] + 8007636: 43db mvns r3, r3 + 8007638: 6aba ldr r2, [r7, #40] @ 0x28 + 800763a: 4013 ands r3, r2 + 800763c: 62bb str r3, [r7, #40] @ 0x28 + + /* + * Consider first the starving list and update current_task_set accordingly + */ + if ((task_starving_list & current_task_set) != 0U) + 800763e: 6aba ldr r2, [r7, #40] @ 0x28 + 8007640: 6cbb ldr r3, [r7, #72] @ 0x48 + 8007642: 4013 ands r3, r2 + 8007644: 2b00 cmp r3, #0 + 8007646: d003 beq.n 8007650 + { + current_task_set = (task_starving_list & current_task_set); + 8007648: 6cba ldr r2, [r7, #72] @ 0x48 + 800764a: 6abb ldr r3, [r7, #40] @ 0x28 + 800764c: 4013 ands r3, r2 + 800764e: 64bb str r3, [r7, #72] @ 0x48 + } + + /* + * Reinitialize the Starving List if required + */ + if(task_starving_list == 0) + 8007650: 6abb ldr r3, [r7, #40] @ 0x28 + 8007652: 2b00 cmp r3, #0 + 8007654: d102 bne.n 800765c + { + TaskClearList = 0; + 8007656: 4b5f ldr r3, [pc, #380] @ (80077d4 ) + 8007658: 2200 movs r2, #0 + 800765a: 601a str r2, [r3, #0] + /* + * Read the flag index of the task to be executed + * Once the index is read, the associated task will be executed even though a higher priority stack is requested + * before task execution. + */ + CurrentTaskIdx = (SEQ_BitPosition(current_task_set & TaskPrio[counter].round_robin)); + 800765c: 4a5c ldr r2, [pc, #368] @ (80077d0 ) + 800765e: 6cfb ldr r3, [r7, #76] @ 0x4c + 8007660: 00db lsls r3, r3, #3 + 8007662: 4413 add r3, r2 + 8007664: 685a ldr r2, [r3, #4] + 8007666: 6cbb ldr r3, [r7, #72] @ 0x48 + 8007668: 4013 ands r3, r2 + 800766a: 4618 mov r0, r3 + 800766c: f000 fa43 bl 8007af6 + 8007670: 4603 mov r3, r0 + 8007672: 461a mov r2, r3 + 8007674: 4b58 ldr r3, [pc, #352] @ (80077d8 ) + 8007676: 601a str r2, [r3, #0] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8007678: f3ef 8310 mrs r3, PRIMASK + 800767c: 61fb str r3, [r7, #28] + return(result); + 800767e: 69fb ldr r3, [r7, #28] + + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + 8007680: 627b str r3, [r7, #36] @ 0x24 + __ASM volatile ("cpsid i" : : : "memory"); + 8007682: b672 cpsid i +} + 8007684: bf00 nop + /* remove from the list or pending task the one that has been selected to be executed */ + TaskSet &= ~(1U << CurrentTaskIdx); + 8007686: 4b54 ldr r3, [pc, #336] @ (80077d8 ) + 8007688: 681b ldr r3, [r3, #0] + 800768a: 2201 movs r2, #1 + 800768c: fa02 f303 lsl.w r3, r2, r3 + 8007690: 43da mvns r2, r3 + 8007692: 4b4b ldr r3, [pc, #300] @ (80077c0 ) + 8007694: 681b ldr r3, [r3, #0] + 8007696: 4013 ands r3, r2 + 8007698: 4a49 ldr r2, [pc, #292] @ (80077c0 ) + 800769a: 6013 str r3, [r2, #0] + + /* + * remove from all priority mask the task that has been selected to be executed + */ + for (counter = UTIL_SEQ_CONF_PRIO_NBR; counter != 0U; counter--) + 800769c: 2301 movs r3, #1 + 800769e: 64fb str r3, [r7, #76] @ 0x4c + 80076a0: e013 b.n 80076ca + { + TaskPrio[counter - 1u].priority &= ~(1U << CurrentTaskIdx); + 80076a2: 6cfb ldr r3, [r7, #76] @ 0x4c + 80076a4: 3b01 subs r3, #1 + 80076a6: 4a4a ldr r2, [pc, #296] @ (80077d0 ) + 80076a8: f852 1033 ldr.w r1, [r2, r3, lsl #3] + 80076ac: 4b4a ldr r3, [pc, #296] @ (80077d8 ) + 80076ae: 681b ldr r3, [r3, #0] + 80076b0: 2201 movs r2, #1 + 80076b2: fa02 f303 lsl.w r3, r2, r3 + 80076b6: 43da mvns r2, r3 + 80076b8: 6cfb ldr r3, [r7, #76] @ 0x4c + 80076ba: 3b01 subs r3, #1 + 80076bc: 400a ands r2, r1 + 80076be: 4944 ldr r1, [pc, #272] @ (80077d0 ) + 80076c0: f841 2033 str.w r2, [r1, r3, lsl #3] + for (counter = UTIL_SEQ_CONF_PRIO_NBR; counter != 0U; counter--) + 80076c4: 6cfb ldr r3, [r7, #76] @ 0x4c + 80076c6: 3b01 subs r3, #1 + 80076c8: 64fb str r3, [r7, #76] @ 0x4c + 80076ca: 6cfb ldr r3, [r7, #76] @ 0x4c + 80076cc: 2b00 cmp r3, #0 + 80076ce: d1e8 bne.n 80076a2 + 80076d0: 6a7b ldr r3, [r7, #36] @ 0x24 + 80076d2: 61bb str r3, [r7, #24] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80076d4: 69bb ldr r3, [r7, #24] + 80076d6: f383 8810 msr PRIMASK, r3 +} + 80076da: bf00 nop + } + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + UTIL_SEQ_PreTask(CurrentTaskIdx); + 80076dc: 4b3e ldr r3, [pc, #248] @ (80077d8 ) + 80076de: 681b ldr r3, [r3, #0] + 80076e0: 4618 mov r0, r3 + 80076e2: f000 f9e9 bl 8007ab8 + + /* + * Check that function exists before calling it + */ + if ((CurrentTaskIdx < UTIL_SEQ_CONF_TASK_NBR) && (TaskCb[CurrentTaskIdx] != NULL)) + 80076e6: 4b3c ldr r3, [pc, #240] @ (80077d8 ) + 80076e8: 681b ldr r3, [r3, #0] + 80076ea: 2b1f cmp r3, #31 + 80076ec: d878 bhi.n 80077e0 + 80076ee: 4b3a ldr r3, [pc, #232] @ (80077d8 ) + 80076f0: 681b ldr r3, [r3, #0] + 80076f2: 4a3a ldr r2, [pc, #232] @ (80077dc ) + 80076f4: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 80076f8: 2b00 cmp r3, #0 + 80076fa: d071 beq.n 80077e0 + { + /* + * save the round-robin value to take into account the operation done in UTIL_SEQ_WaitEvt + */ + for (uint32_t index = 0; index < UTIL_SEQ_CONF_PRIO_NBR; index++) + 80076fc: 2300 movs r3, #0 + 80076fe: 637b str r3, [r7, #52] @ 0x34 + 8007700: e01e b.n 8007740 + { + TaskPrio[index].round_robin &= ~(1U << CurrentTaskIdx); + 8007702: 4a33 ldr r2, [pc, #204] @ (80077d0 ) + 8007704: 6b7b ldr r3, [r7, #52] @ 0x34 + 8007706: 00db lsls r3, r3, #3 + 8007708: 4413 add r3, r2 + 800770a: 685a ldr r2, [r3, #4] + 800770c: 4b32 ldr r3, [pc, #200] @ (80077d8 ) + 800770e: 681b ldr r3, [r3, #0] + 8007710: 2101 movs r1, #1 + 8007712: fa01 f303 lsl.w r3, r1, r3 + 8007716: 43db mvns r3, r3 + 8007718: 401a ands r2, r3 + 800771a: 492d ldr r1, [pc, #180] @ (80077d0 ) + 800771c: 6b7b ldr r3, [r7, #52] @ 0x34 + 800771e: 00db lsls r3, r3, #3 + 8007720: 440b add r3, r1 + 8007722: 605a str r2, [r3, #4] + round_robin[index] = TaskPrio[index].round_robin; + 8007724: 4a2a ldr r2, [pc, #168] @ (80077d0 ) + 8007726: 6b7b ldr r3, [r7, #52] @ 0x34 + 8007728: 00db lsls r3, r3, #3 + 800772a: 4413 add r3, r2 + 800772c: 685a ldr r2, [r3, #4] + 800772e: 6b7b ldr r3, [r7, #52] @ 0x34 + 8007730: 009b lsls r3, r3, #2 + 8007732: 3350 adds r3, #80 @ 0x50 + 8007734: 443b add r3, r7 + 8007736: f843 2c44 str.w r2, [r3, #-68] + for (uint32_t index = 0; index < UTIL_SEQ_CONF_PRIO_NBR; index++) + 800773a: 6b7b ldr r3, [r7, #52] @ 0x34 + 800773c: 3301 adds r3, #1 + 800773e: 637b str r3, [r7, #52] @ 0x34 + 8007740: 6b7b ldr r3, [r7, #52] @ 0x34 + 8007742: 2b00 cmp r3, #0 + 8007744: d0dd beq.n 8007702 + } + + /* Execute the task */ + TaskCb[CurrentTaskIdx]( ); + 8007746: 4b24 ldr r3, [pc, #144] @ (80077d8 ) + 8007748: 681b ldr r3, [r3, #0] + 800774a: 4a24 ldr r2, [pc, #144] @ (80077dc ) + 800774c: f852 3023 ldr.w r3, [r2, r3, lsl #2] + 8007750: 4798 blx r3 + + /* + * restore the round-robin context + */ + for (uint32_t index = 0; index < UTIL_SEQ_CONF_PRIO_NBR; index++) + 8007752: 2300 movs r3, #0 + 8007754: 633b str r3, [r7, #48] @ 0x30 + 8007756: e013 b.n 8007780 + { + TaskPrio[index].round_robin &= round_robin[index]; + 8007758: 4a1d ldr r2, [pc, #116] @ (80077d0 ) + 800775a: 6b3b ldr r3, [r7, #48] @ 0x30 + 800775c: 00db lsls r3, r3, #3 + 800775e: 4413 add r3, r2 + 8007760: 685a ldr r2, [r3, #4] + 8007762: 6b3b ldr r3, [r7, #48] @ 0x30 + 8007764: 009b lsls r3, r3, #2 + 8007766: 3350 adds r3, #80 @ 0x50 + 8007768: 443b add r3, r7 + 800776a: f853 3c44 ldr.w r3, [r3, #-68] + 800776e: 401a ands r2, r3 + 8007770: 4917 ldr r1, [pc, #92] @ (80077d0 ) + 8007772: 6b3b ldr r3, [r7, #48] @ 0x30 + 8007774: 00db lsls r3, r3, #3 + 8007776: 440b add r3, r1 + 8007778: 605a str r2, [r3, #4] + for (uint32_t index = 0; index < UTIL_SEQ_CONF_PRIO_NBR; index++) + 800777a: 6b3b ldr r3, [r7, #48] @ 0x30 + 800777c: 3301 adds r3, #1 + 800777e: 633b str r3, [r7, #48] @ 0x30 + 8007780: 6b3b ldr r3, [r7, #48] @ 0x30 + 8007782: 2b00 cmp r3, #0 + 8007784: d0e8 beq.n 8007758 + } + + UTIL_SEQ_PostTask(CurrentTaskIdx); + 8007786: 4b14 ldr r3, [pc, #80] @ (80077d8 ) + 8007788: 681b ldr r3, [r3, #0] + 800778a: 4618 mov r0, r3 + 800778c: f000 f99e bl 8007acc + + local_taskset = TaskSet; + 8007790: 4b0b ldr r3, [pc, #44] @ (80077c0 ) + 8007792: 681b ldr r3, [r3, #0] + 8007794: 647b str r3, [r7, #68] @ 0x44 + local_evtset = EvtSet; + 8007796: 4b0b ldr r3, [pc, #44] @ (80077c4 ) + 8007798: 681b ldr r3, [r3, #0] + 800779a: 643b str r3, [r7, #64] @ 0x40 + local_taskmask = TaskMask; + 800779c: 4b0a ldr r3, [pc, #40] @ (80077c8 ) + 800779e: 681b ldr r3, [r3, #0] + 80077a0: 63fb str r3, [r7, #60] @ 0x3c + local_evtwaited = EvtWaited; + 80077a2: 4b0a ldr r3, [pc, #40] @ (80077cc ) + 80077a4: 681b ldr r3, [r3, #0] + 80077a6: 63bb str r3, [r7, #56] @ 0x38 + + /* + * Update the two list for next round + */ + TaskClearList |= (1U << CurrentTaskIdx); + 80077a8: 4b0b ldr r3, [pc, #44] @ (80077d8 ) + 80077aa: 681b ldr r3, [r3, #0] + 80077ac: 2201 movs r2, #1 + 80077ae: 409a lsls r2, r3 + 80077b0: 4b08 ldr r3, [pc, #32] @ (80077d4 ) + 80077b2: 681b ldr r3, [r3, #0] + 80077b4: 4313 orrs r3, r2 + 80077b6: 4a07 ldr r2, [pc, #28] @ (80077d4 ) + 80077b8: 6013 str r3, [r2, #0] + 80077ba: e014 b.n 80077e6 + 80077bc: 20000028 .word 0x20000028 + 80077c0: 20000308 .word 0x20000308 + 80077c4: 2000030c .word 0x2000030c + 80077c8: 20000024 .word 0x20000024 + 80077cc: 20000310 .word 0x20000310 + 80077d0: 20000398 .word 0x20000398 + 80077d4: 200003a0 .word 0x200003a0 + 80077d8: 20000314 .word 0x20000314 + 80077dc: 20000318 .word 0x20000318 + else + { + /* + * must never occurs, it means there is a warning in the system + */ + UTIL_SEQ_CatchWarning(UTIL_SEQ_WARNING_INVALIDTASKID); + 80077e0: 2000 movs r0, #0 + 80077e2: f000 f97d bl 8007ae0 + while(((local_taskset & local_taskmask & SuperMask) != 0U) && ((local_evtset & local_evtwaited)==0U)) + 80077e6: 6c7a ldr r2, [r7, #68] @ 0x44 + 80077e8: 6bfb ldr r3, [r7, #60] @ 0x3c + 80077ea: 401a ands r2, r3 + 80077ec: 4b22 ldr r3, [pc, #136] @ (8007878 ) + 80077ee: 681b ldr r3, [r3, #0] + 80077f0: 4013 ands r3, r2 + 80077f2: 2b00 cmp r3, #0 + 80077f4: d005 beq.n 8007802 + 80077f6: 6c3a ldr r2, [r7, #64] @ 0x40 + 80077f8: 6bbb ldr r3, [r7, #56] @ 0x38 + 80077fa: 4013 ands r3, r2 + 80077fc: 2b00 cmp r3, #0 + 80077fe: f43f aedf beq.w 80075c0 + } + } + + /* the set of CurrentTaskIdx to no task running allows to call WaitEvt in the Pre/Post ilde context */ + CurrentTaskIdx = UTIL_SEQ_NOTASKRUNNING; + 8007802: 4b1e ldr r3, [pc, #120] @ (800787c ) + 8007804: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff + 8007808: 601a str r2, [r3, #0] + /* if a waited event is present, ignore the IDLE sequence */ + if ((local_evtset & EvtWaited)== 0U) + 800780a: 4b1d ldr r3, [pc, #116] @ (8007880 ) + 800780c: 681a ldr r2, [r3, #0] + 800780e: 6c3b ldr r3, [r7, #64] @ 0x40 + 8007810: 4013 ands r3, r2 + 8007812: 2b00 cmp r3, #0 + 8007814: d129 bne.n 800786a + { + UTIL_SEQ_PreIdle( ); + 8007816: f000 f941 bl 8007a9c + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 800781a: f3ef 8310 mrs r3, PRIMASK + 800781e: 617b str r3, [r7, #20] + return(result); + 8007820: 697b ldr r3, [r7, #20] + + UTIL_SEQ_ENTER_CRITICAL_SECTION_IDLE( ); + 8007822: 623b str r3, [r7, #32] + __ASM volatile ("cpsid i" : : : "memory"); + 8007824: b672 cpsid i +} + 8007826: bf00 nop + local_taskset = TaskSet; + 8007828: 4b16 ldr r3, [pc, #88] @ (8007884 ) + 800782a: 681b ldr r3, [r3, #0] + 800782c: 647b str r3, [r7, #68] @ 0x44 + local_evtset = EvtSet; + 800782e: 4b16 ldr r3, [pc, #88] @ (8007888 ) + 8007830: 681b ldr r3, [r3, #0] + 8007832: 643b str r3, [r7, #64] @ 0x40 + local_taskmask = TaskMask; + 8007834: 4b15 ldr r3, [pc, #84] @ (800788c ) + 8007836: 681b ldr r3, [r3, #0] + 8007838: 63fb str r3, [r7, #60] @ 0x3c + if ((local_taskset & local_taskmask & SuperMask) == 0U) + 800783a: 6c7a ldr r2, [r7, #68] @ 0x44 + 800783c: 6bfb ldr r3, [r7, #60] @ 0x3c + 800783e: 401a ands r2, r3 + 8007840: 4b0d ldr r3, [pc, #52] @ (8007878 ) + 8007842: 681b ldr r3, [r3, #0] + 8007844: 4013 ands r3, r2 + 8007846: 2b00 cmp r3, #0 + 8007848: d107 bne.n 800785a + { + if ((local_evtset & EvtWaited)== 0U) + 800784a: 4b0d ldr r3, [pc, #52] @ (8007880 ) + 800784c: 681a ldr r2, [r3, #0] + 800784e: 6c3b ldr r3, [r7, #64] @ 0x40 + 8007850: 4013 ands r3, r2 + 8007852: 2b00 cmp r3, #0 + 8007854: d101 bne.n 800785a + { + UTIL_SEQ_Idle( ); + 8007856: f7f8 fed5 bl 8000604 + 800785a: 6a3b ldr r3, [r7, #32] + 800785c: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 800785e: 693b ldr r3, [r7, #16] + 8007860: f383 8810 msr PRIMASK, r3 +} + 8007864: bf00 nop + } + } + UTIL_SEQ_EXIT_CRITICAL_SECTION_IDLE( ); + + UTIL_SEQ_PostIdle( ); + 8007866: f000 f920 bl 8007aaa + } + + /* restore the mask from UTIL_SEQ_Run() */ + SuperMask = super_mask_backup; + 800786a: 4a03 ldr r2, [pc, #12] @ (8007878 ) + 800786c: 6afb ldr r3, [r7, #44] @ 0x2c + 800786e: 6013 str r3, [r2, #0] + + return; + 8007870: bf00 nop +} + 8007872: 3750 adds r7, #80 @ 0x50 + 8007874: 46bd mov sp, r7 + 8007876: bd80 pop {r7, pc} + 8007878: 20000028 .word 0x20000028 + 800787c: 20000314 .word 0x20000314 + 8007880: 20000310 .word 0x20000310 + 8007884: 20000308 .word 0x20000308 + 8007888: 2000030c .word 0x2000030c + 800788c: 20000024 .word 0x20000024 + +08007890 : + +void UTIL_SEQ_RegTask(UTIL_SEQ_bm_t TaskId_bm, uint32_t Flags, void (*Task)( void )) +{ + 8007890: b580 push {r7, lr} + 8007892: b088 sub sp, #32 + 8007894: af00 add r7, sp, #0 + 8007896: 60f8 str r0, [r7, #12] + 8007898: 60b9 str r1, [r7, #8] + 800789a: 607a str r2, [r7, #4] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 800789c: f3ef 8310 mrs r3, PRIMASK + 80078a0: 617b str r3, [r7, #20] + return(result); + 80078a2: 697b ldr r3, [r7, #20] + (void)Flags; + UTIL_SEQ_ENTER_CRITICAL_SECTION(); + 80078a4: 61fb str r3, [r7, #28] + __ASM volatile ("cpsid i" : : : "memory"); + 80078a6: b672 cpsid i +} + 80078a8: bf00 nop + + TaskCb[SEQ_BitPosition(TaskId_bm)] = Task; + 80078aa: 68f8 ldr r0, [r7, #12] + 80078ac: f000 f923 bl 8007af6 + 80078b0: 4603 mov r3, r0 + 80078b2: 4619 mov r1, r3 + 80078b4: 4a06 ldr r2, [pc, #24] @ (80078d0 ) + 80078b6: 687b ldr r3, [r7, #4] + 80078b8: f842 3021 str.w r3, [r2, r1, lsl #2] + 80078bc: 69fb ldr r3, [r7, #28] + 80078be: 61bb str r3, [r7, #24] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80078c0: 69bb ldr r3, [r7, #24] + 80078c2: f383 8810 msr PRIMASK, r3 +} + 80078c6: bf00 nop + + UTIL_SEQ_EXIT_CRITICAL_SECTION(); + + return; + 80078c8: bf00 nop +} + 80078ca: 3720 adds r7, #32 + 80078cc: 46bd mov sp, r7 + 80078ce: bd80 pop {r7, pc} + 80078d0: 20000318 .word 0x20000318 + +080078d4 : + UTIL_SEQ_EXIT_CRITICAL_SECTION(); + return _status; +} + +void UTIL_SEQ_SetTask( UTIL_SEQ_bm_t TaskId_bm, uint32_t Task_Prio ) +{ + 80078d4: b480 push {r7} + 80078d6: b087 sub sp, #28 + 80078d8: af00 add r7, sp, #0 + 80078da: 6078 str r0, [r7, #4] + 80078dc: 6039 str r1, [r7, #0] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80078de: f3ef 8310 mrs r3, PRIMASK + 80078e2: 60fb str r3, [r7, #12] + return(result); + 80078e4: 68fb ldr r3, [r7, #12] + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + 80078e6: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 80078e8: b672 cpsid i +} + 80078ea: bf00 nop + + TaskSet |= TaskId_bm; + 80078ec: 4b0d ldr r3, [pc, #52] @ (8007924 ) + 80078ee: 681a ldr r2, [r3, #0] + 80078f0: 687b ldr r3, [r7, #4] + 80078f2: 4313 orrs r3, r2 + 80078f4: 4a0b ldr r2, [pc, #44] @ (8007924 ) + 80078f6: 6013 str r3, [r2, #0] + TaskPrio[Task_Prio].priority |= TaskId_bm; + 80078f8: 4a0b ldr r2, [pc, #44] @ (8007928 ) + 80078fa: 683b ldr r3, [r7, #0] + 80078fc: f852 2033 ldr.w r2, [r2, r3, lsl #3] + 8007900: 687b ldr r3, [r7, #4] + 8007902: 431a orrs r2, r3 + 8007904: 4908 ldr r1, [pc, #32] @ (8007928 ) + 8007906: 683b ldr r3, [r7, #0] + 8007908: f841 2033 str.w r2, [r1, r3, lsl #3] + 800790c: 697b ldr r3, [r7, #20] + 800790e: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8007910: 693b ldr r3, [r7, #16] + 8007912: f383 8810 msr PRIMASK, r3 +} + 8007916: bf00 nop + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; + 8007918: bf00 nop +} + 800791a: 371c adds r7, #28 + 800791c: 46bd mov sp, r7 + 800791e: f85d 7b04 ldr.w r7, [sp], #4 + 8007922: 4770 bx lr + 8007924: 20000308 .word 0x20000308 + 8007928: 20000398 .word 0x20000398 + +0800792c : + UTIL_SEQ_EXIT_CRITICAL_SECTION(); + return _status; +} + +void UTIL_SEQ_PauseTask( UTIL_SEQ_bm_t TaskId_bm ) +{ + 800792c: b480 push {r7} + 800792e: b087 sub sp, #28 + 8007930: af00 add r7, sp, #0 + 8007932: 6078 str r0, [r7, #4] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8007934: f3ef 8310 mrs r3, PRIMASK + 8007938: 60fb str r3, [r7, #12] + return(result); + 800793a: 68fb ldr r3, [r7, #12] + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + 800793c: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 800793e: b672 cpsid i +} + 8007940: bf00 nop + + TaskMask &= (~TaskId_bm); + 8007942: 687b ldr r3, [r7, #4] + 8007944: 43da mvns r2, r3 + 8007946: 4b08 ldr r3, [pc, #32] @ (8007968 ) + 8007948: 681b ldr r3, [r3, #0] + 800794a: 4013 ands r3, r2 + 800794c: 4a06 ldr r2, [pc, #24] @ (8007968 ) + 800794e: 6013 str r3, [r2, #0] + 8007950: 697b ldr r3, [r7, #20] + 8007952: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8007954: 693b ldr r3, [r7, #16] + 8007956: f383 8810 msr PRIMASK, r3 +} + 800795a: bf00 nop + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; + 800795c: bf00 nop +} + 800795e: 371c adds r7, #28 + 8007960: 46bd mov sp, r7 + 8007962: f85d 7b04 ldr.w r7, [sp], #4 + 8007966: 4770 bx lr + 8007968: 20000024 .word 0x20000024 + +0800796c : + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + return _status; +} + +void UTIL_SEQ_ResumeTask( UTIL_SEQ_bm_t TaskId_bm ) +{ + 800796c: b480 push {r7} + 800796e: b087 sub sp, #28 + 8007970: af00 add r7, sp, #0 + 8007972: 6078 str r0, [r7, #4] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8007974: f3ef 8310 mrs r3, PRIMASK + 8007978: 60fb str r3, [r7, #12] + return(result); + 800797a: 68fb ldr r3, [r7, #12] + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + 800797c: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 800797e: b672 cpsid i +} + 8007980: bf00 nop + + TaskMask |= TaskId_bm; + 8007982: 4b09 ldr r3, [pc, #36] @ (80079a8 ) + 8007984: 681a ldr r2, [r3, #0] + 8007986: 687b ldr r3, [r7, #4] + 8007988: 4313 orrs r3, r2 + 800798a: 4a07 ldr r2, [pc, #28] @ (80079a8 ) + 800798c: 6013 str r3, [r2, #0] + 800798e: 697b ldr r3, [r7, #20] + 8007990: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8007992: 693b ldr r3, [r7, #16] + 8007994: f383 8810 msr PRIMASK, r3 +} + 8007998: bf00 nop + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; + 800799a: bf00 nop +} + 800799c: 371c adds r7, #28 + 800799e: 46bd mov sp, r7 + 80079a0: f85d 7b04 ldr.w r7, [sp], #4 + 80079a4: 4770 bx lr + 80079a6: bf00 nop + 80079a8: 20000024 .word 0x20000024 + +080079ac : + +void UTIL_SEQ_SetEvt( UTIL_SEQ_bm_t EvtId_bm ) +{ + 80079ac: b480 push {r7} + 80079ae: b087 sub sp, #28 + 80079b0: af00 add r7, sp, #0 + 80079b2: 6078 str r0, [r7, #4] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 80079b4: f3ef 8310 mrs r3, PRIMASK + 80079b8: 60fb str r3, [r7, #12] + return(result); + 80079ba: 68fb ldr r3, [r7, #12] + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + 80079bc: 617b str r3, [r7, #20] + __ASM volatile ("cpsid i" : : : "memory"); + 80079be: b672 cpsid i +} + 80079c0: bf00 nop + + EvtSet |= EvtId_bm; + 80079c2: 4b09 ldr r3, [pc, #36] @ (80079e8 ) + 80079c4: 681a ldr r2, [r3, #0] + 80079c6: 687b ldr r3, [r7, #4] + 80079c8: 4313 orrs r3, r2 + 80079ca: 4a07 ldr r2, [pc, #28] @ (80079e8 ) + 80079cc: 6013 str r3, [r2, #0] + 80079ce: 697b ldr r3, [r7, #20] + 80079d0: 613b str r3, [r7, #16] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 80079d2: 693b ldr r3, [r7, #16] + 80079d4: f383 8810 msr PRIMASK, r3 +} + 80079d8: bf00 nop + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; + 80079da: bf00 nop +} + 80079dc: 371c adds r7, #28 + 80079de: 46bd mov sp, r7 + 80079e0: f85d 7b04 ldr.w r7, [sp], #4 + 80079e4: 4770 bx lr + 80079e6: bf00 nop + 80079e8: 2000030c .word 0x2000030c + +080079ec : + + return; +} + +void UTIL_SEQ_WaitEvt(UTIL_SEQ_bm_t EvtId_bm) +{ + 80079ec: b580 push {r7, lr} + 80079ee: b088 sub sp, #32 + 80079f0: af00 add r7, sp, #0 + 80079f2: 6078 str r0, [r7, #4] + UTIL_SEQ_bm_t wait_task_idx; + /* + * store in local the current_task_id_bm as the global variable CurrentTaskIdx + * may be overwritten in case there are nested call of UTIL_SEQ_Run() + */ + current_task_idx = CurrentTaskIdx; + 80079f4: 4b1f ldr r3, [pc, #124] @ (8007a74 ) + 80079f6: 681b ldr r3, [r3, #0] + 80079f8: 61bb str r3, [r7, #24] + if(UTIL_SEQ_NOTASKRUNNING == CurrentTaskIdx) + 80079fa: 4b1e ldr r3, [pc, #120] @ (8007a74 ) + 80079fc: 681b ldr r3, [r3, #0] + 80079fe: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff + 8007a02: d102 bne.n 8007a0a + { + wait_task_idx = 0u; + 8007a04: 2300 movs r3, #0 + 8007a06: 61fb str r3, [r7, #28] + 8007a08: e005 b.n 8007a16 + } + else + { + wait_task_idx = (uint32_t)1u << CurrentTaskIdx; + 8007a0a: 4b1a ldr r3, [pc, #104] @ (8007a74 ) + 8007a0c: 681b ldr r3, [r3, #0] + 8007a0e: 2201 movs r2, #1 + 8007a10: fa02 f303 lsl.w r3, r2, r3 + 8007a14: 61fb str r3, [r7, #28] + } + + /* backup the event id that was currently waited */ + event_waited_id_backup = EvtWaited; + 8007a16: 4b18 ldr r3, [pc, #96] @ (8007a78 ) + 8007a18: 681b ldr r3, [r3, #0] + 8007a1a: 617b str r3, [r7, #20] + EvtWaited = EvtId_bm; + 8007a1c: 4a16 ldr r2, [pc, #88] @ (8007a78 ) + 8007a1e: 687b ldr r3, [r7, #4] + 8007a20: 6013 str r3, [r2, #0] + * The system is waiting only for the last waited event. + * When it will go out, it will wait again from the previous one. + * It case it occurs while waiting for the second one, the while loop will exit immediately + */ + + while ((EvtSet & EvtId_bm) == 0U) + 8007a22: e003 b.n 8007a2c + { + UTIL_SEQ_EvtIdle(wait_task_idx, EvtId_bm); + 8007a24: 6879 ldr r1, [r7, #4] + 8007a26: 69f8 ldr r0, [r7, #28] + 8007a28: f000 f82a bl 8007a80 + while ((EvtSet & EvtId_bm) == 0U) + 8007a2c: 4b13 ldr r3, [pc, #76] @ (8007a7c ) + 8007a2e: 681a ldr r2, [r3, #0] + 8007a30: 687b ldr r3, [r7, #4] + 8007a32: 4013 ands r3, r2 + 8007a34: 2b00 cmp r3, #0 + 8007a36: d0f5 beq.n 8007a24 + /* + * Restore the CurrentTaskIdx that may have been modified by call of UTIL_SEQ_Run() + * from UTIL_SEQ_EvtIdle(). This is required so that a second call of UTIL_SEQ_WaitEvt() + * in the same process pass the correct current_task_id_bm in the call of UTIL_SEQ_EvtIdle() + */ + CurrentTaskIdx = current_task_idx; + 8007a38: 4a0e ldr r2, [pc, #56] @ (8007a74 ) + 8007a3a: 69bb ldr r3, [r7, #24] + 8007a3c: 6013 str r3, [r2, #0] + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + 8007a3e: f3ef 8310 mrs r3, PRIMASK + 8007a42: 60bb str r3, [r7, #8] + return(result); + 8007a44: 68bb ldr r3, [r7, #8] + + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + 8007a46: 613b str r3, [r7, #16] + __ASM volatile ("cpsid i" : : : "memory"); + 8007a48: b672 cpsid i +} + 8007a4a: bf00 nop + + EvtSet &= (~EvtId_bm); + 8007a4c: 687b ldr r3, [r7, #4] + 8007a4e: 43da mvns r2, r3 + 8007a50: 4b0a ldr r3, [pc, #40] @ (8007a7c ) + 8007a52: 681b ldr r3, [r3, #0] + 8007a54: 4013 ands r3, r2 + 8007a56: 4a09 ldr r2, [pc, #36] @ (8007a7c ) + 8007a58: 6013 str r3, [r2, #0] + 8007a5a: 693b ldr r3, [r7, #16] + 8007a5c: 60fb str r3, [r7, #12] + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); + 8007a5e: 68fb ldr r3, [r7, #12] + 8007a60: f383 8810 msr PRIMASK, r3 +} + 8007a64: bf00 nop + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + EvtWaited = event_waited_id_backup; + 8007a66: 4a04 ldr r2, [pc, #16] @ (8007a78 ) + 8007a68: 697b ldr r3, [r7, #20] + 8007a6a: 6013 str r3, [r2, #0] + return; + 8007a6c: bf00 nop +} + 8007a6e: 3720 adds r7, #32 + 8007a70: 46bd mov sp, r7 + 8007a72: bd80 pop {r7, pc} + 8007a74: 20000314 .word 0x20000314 + 8007a78: 20000310 .word 0x20000310 + 8007a7c: 2000030c .word 0x2000030c + +08007a80 : + UTIL_SEQ_bm_t local_evtwaited = EvtWaited; + return (EvtSet & local_evtwaited); +} + +__WEAK void UTIL_SEQ_EvtIdle( UTIL_SEQ_bm_t TaskId_bm, UTIL_SEQ_bm_t EvtWaited_bm ) +{ + 8007a80: b580 push {r7, lr} + 8007a82: b082 sub sp, #8 + 8007a84: af00 add r7, sp, #0 + 8007a86: 6078 str r0, [r7, #4] + 8007a88: 6039 str r1, [r7, #0] + (void)EvtWaited_bm; + UTIL_SEQ_Run(~TaskId_bm); + 8007a8a: 687b ldr r3, [r7, #4] + 8007a8c: 43db mvns r3, r3 + 8007a8e: 4618 mov r0, r3 + 8007a90: f7ff fd7c bl 800758c + return; + 8007a94: bf00 nop +} + 8007a96: 3708 adds r7, #8 + 8007a98: 46bd mov sp, r7 + 8007a9a: bd80 pop {r7, pc} + +08007a9c : +{ + return; +} + +__WEAK void UTIL_SEQ_PreIdle( void ) +{ + 8007a9c: b480 push {r7} + 8007a9e: af00 add r7, sp, #0 + /* + * Unless specified by the application, there is nothing to be done + */ + return; + 8007aa0: bf00 nop +} + 8007aa2: 46bd mov sp, r7 + 8007aa4: f85d 7b04 ldr.w r7, [sp], #4 + 8007aa8: 4770 bx lr + +08007aaa : + +__WEAK void UTIL_SEQ_PostIdle( void ) +{ + 8007aaa: b480 push {r7} + 8007aac: af00 add r7, sp, #0 + /* + * Unless specified by the application, there is nothing to be done + */ + return; + 8007aae: bf00 nop +} + 8007ab0: 46bd mov sp, r7 + 8007ab2: f85d 7b04 ldr.w r7, [sp], #4 + 8007ab6: 4770 bx lr + +08007ab8 : + +__WEAK void UTIL_SEQ_PreTask( uint32_t TaskId ) +{ + 8007ab8: b480 push {r7} + 8007aba: b083 sub sp, #12 + 8007abc: af00 add r7, sp, #0 + 8007abe: 6078 str r0, [r7, #4] + (void)TaskId; + return; + 8007ac0: bf00 nop +} + 8007ac2: 370c adds r7, #12 + 8007ac4: 46bd mov sp, r7 + 8007ac6: f85d 7b04 ldr.w r7, [sp], #4 + 8007aca: 4770 bx lr + +08007acc : + +__WEAK void UTIL_SEQ_PostTask( uint32_t TaskId ) +{ + 8007acc: b480 push {r7} + 8007ace: b083 sub sp, #12 + 8007ad0: af00 add r7, sp, #0 + 8007ad2: 6078 str r0, [r7, #4] + (void)TaskId; + return; + 8007ad4: bf00 nop +} + 8007ad6: 370c adds r7, #12 + 8007ad8: 46bd mov sp, r7 + 8007ada: f85d 7b04 ldr.w r7, [sp], #4 + 8007ade: 4770 bx lr + +08007ae0 : + +__WEAK void UTIL_SEQ_CatchWarning(UTIL_SEQ_WARNING WarningId) +{ + 8007ae0: b480 push {r7} + 8007ae2: b083 sub sp, #12 + 8007ae4: af00 add r7, sp, #0 + 8007ae6: 4603 mov r3, r0 + 8007ae8: 71fb strb r3, [r7, #7] + (void)WarningId; + return; + 8007aea: bf00 nop +} + 8007aec: 370c adds r7, #12 + 8007aee: 46bd mov sp, r7 + 8007af0: f85d 7b04 ldr.w r7, [sp], #4 + 8007af4: 4770 bx lr + +08007af6 : + * @brief return the position of the first bit set to 1 + * @param Value 32 bit value + * @retval bit position + */ +uint8_t SEQ_BitPosition(uint32_t Value) +{ + 8007af6: b480 push {r7} + 8007af8: b085 sub sp, #20 + 8007afa: af00 add r7, sp, #0 + 8007afc: 6078 str r0, [r7, #4] + 8007afe: 687b ldr r3, [r7, #4] + 8007b00: 60fb str r3, [r7, #12] + if (value == 0U) + 8007b02: 68fb ldr r3, [r7, #12] + 8007b04: 2b00 cmp r3, #0 + 8007b06: d101 bne.n 8007b0c + return 32U; + 8007b08: 2320 movs r3, #32 + 8007b0a: e003 b.n 8007b14 + return __builtin_clz(value); + 8007b0c: 68fb ldr r3, [r7, #12] + 8007b0e: fab3 f383 clz r3, r3 + 8007b12: b2db uxtb r3, r3 + return (uint8_t)(31 -__CLZ( Value )); + 8007b14: f1c3 031f rsb r3, r3, #31 + 8007b18: b2db uxtb r3, r3 +} + 8007b1a: 4618 mov r0, r3 + 8007b1c: 3714 adds r7, #20 + 8007b1e: 46bd mov sp, r7 + 8007b20: f85d 7b04 ldr.w r7, [sp], #4 + 8007b24: 4770 bx lr + +08007b26 : + 8007b26: 4402 add r2, r0 + 8007b28: 4603 mov r3, r0 + 8007b2a: 4293 cmp r3, r2 + 8007b2c: d100 bne.n 8007b30 + 8007b2e: 4770 bx lr + 8007b30: f803 1b01 strb.w r1, [r3], #1 + 8007b34: e7f9 b.n 8007b2a + ... + +08007b38 <__libc_init_array>: + 8007b38: b570 push {r4, r5, r6, lr} + 8007b3a: 4d0d ldr r5, [pc, #52] @ (8007b70 <__libc_init_array+0x38>) + 8007b3c: 4c0d ldr r4, [pc, #52] @ (8007b74 <__libc_init_array+0x3c>) + 8007b3e: 1b64 subs r4, r4, r5 + 8007b40: 10a4 asrs r4, r4, #2 + 8007b42: 2600 movs r6, #0 + 8007b44: 42a6 cmp r6, r4 + 8007b46: d109 bne.n 8007b5c <__libc_init_array+0x24> + 8007b48: 4d0b ldr r5, [pc, #44] @ (8007b78 <__libc_init_array+0x40>) + 8007b4a: 4c0c ldr r4, [pc, #48] @ (8007b7c <__libc_init_array+0x44>) + 8007b4c: f000 f826 bl 8007b9c <_init> + 8007b50: 1b64 subs r4, r4, r5 + 8007b52: 10a4 asrs r4, r4, #2 + 8007b54: 2600 movs r6, #0 + 8007b56: 42a6 cmp r6, r4 + 8007b58: d105 bne.n 8007b66 <__libc_init_array+0x2e> + 8007b5a: bd70 pop {r4, r5, r6, pc} + 8007b5c: f855 3b04 ldr.w r3, [r5], #4 + 8007b60: 4798 blx r3 + 8007b62: 3601 adds r6, #1 + 8007b64: e7ee b.n 8007b44 <__libc_init_array+0xc> + 8007b66: f855 3b04 ldr.w r3, [r5], #4 + 8007b6a: 4798 blx r3 + 8007b6c: 3601 adds r6, #1 + 8007b6e: e7f2 b.n 8007b56 <__libc_init_array+0x1e> + 8007b70: 08007e28 .word 0x08007e28 + 8007b74: 08007e28 .word 0x08007e28 + 8007b78: 08007e28 .word 0x08007e28 + 8007b7c: 08007e2c .word 0x08007e2c + +08007b80 : + 8007b80: 440a add r2, r1 + 8007b82: 4291 cmp r1, r2 + 8007b84: f100 33ff add.w r3, r0, #4294967295 @ 0xffffffff + 8007b88: d100 bne.n 8007b8c + 8007b8a: 4770 bx lr + 8007b8c: b510 push {r4, lr} + 8007b8e: f811 4b01 ldrb.w r4, [r1], #1 + 8007b92: f803 4f01 strb.w r4, [r3, #1]! + 8007b96: 4291 cmp r1, r2 + 8007b98: d1f9 bne.n 8007b8e + 8007b9a: bd10 pop {r4, pc} + +08007b9c <_init>: + 8007b9c: b5f8 push {r3, r4, r5, r6, r7, lr} + 8007b9e: bf00 nop + 8007ba0: bcf8 pop {r3, r4, r5, r6, r7} + 8007ba2: bc08 pop {r3} + 8007ba4: 469e mov lr, r3 + 8007ba6: 4770 bx lr + +08007ba8 <_fini>: + 8007ba8: b5f8 push {r3, r4, r5, r6, r7, lr} + 8007baa: bf00 nop + 8007bac: bcf8 pop {r3, r4, r5, r6, r7} + 8007bae: bc08 pop {r3} + 8007bb0: 469e mov lr, r3 + 8007bb2: 4770 bx lr diff --git a/firmware/memory_chip_gone/Debug/memory_chip_gone.map b/firmware/memory_chip_gone/Debug/memory_chip_gone.map new file mode 100644 index 0000000..1c1192f --- /dev/null +++ b/firmware/memory_chip_gone/Debug/memory_chip_gone.map @@ -0,0 +1,10836 @@ +Archive member included to satisfy reference by file (symbol) + +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-exit.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o (exit) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-exit.o) (__stdio_exit_handler) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fwalk.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) (_fwalk_sglue) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) + ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o (printf) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) (__sread) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-vprintf.o) + ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o (vprintf) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcmp.o) + ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o (memcmp) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memset.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o (memset) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strrchr.o) + ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o (strrchr) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-closer.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) (_close_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-closer.o) (errno) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-impure.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) (_impure_ptr) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lseekr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) (_lseek_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-readr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) (_read_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-writer.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) (_write_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-errno.o) + ./Core/Src/syscalls.o (__errno) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-init.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o (__libc_init_array) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) (__retarget_lock_init_recursive) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcpy-stub.o) + ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o (memcpy) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strlen.o) + ./STM32_WPAN/App/app_ble.o (strlen) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-freer.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) (_free_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) (_malloc_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mlock.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-freer.o) (__malloc_lock) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) (_vfprintf_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) (_printf_i) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) (_fflush_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) (__sfvwrite_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wbuf.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) (__swbuf_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wsetup.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) (__swsetup_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memmove.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) (memmove) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strchr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strrchr.o) (strchr) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-sbrkr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) (_sbrk_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memchr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) (memchr) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reallocr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) (_realloc_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wsetup.o) (__smakebuf_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fstatr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) (_fstat_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-isattyr.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) (_isatty_r) +/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-msizer.o) + /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reallocr.o) (_malloc_usable_size_r) + +Discarded input sections + + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crti.o + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crti.o + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crti.o + .data 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + .rodata 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + .text 0x00000000 0x7c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o + .ARM.extab 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o + .ARM.exidx 0x00000000 0x10 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o + .ARM.attributes + 0x00000000 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_debug.o + .text 0x00000000 0x0 ./Core/Src/app_debug.o + .data 0x00000000 0x0 ./Core/Src/app_debug.o + .bss 0x00000000 0x0 ./Core/Src/app_debug.o + .text.LL_EXTI_EnableIT_32_63 + 0x00000000 0x28 ./Core/Src/app_debug.o + .text.LL_AHB2_GRP1_EnableClock + 0x00000000 0x32 ./Core/Src/app_debug.o + .text.LL_C2_AHB2_GRP1_EnableClock + 0x00000000 0x38 ./Core/Src/app_debug.o + .text.APPD_Init + 0x00000000 0x20 ./Core/Src/app_debug.o + .text.APPD_SetCPU2GpioConfig + 0x00000000 0x144 ./Core/Src/app_debug.o + .text.APPD_BleDtbCfg + 0x00000000 0xe ./Core/Src/app_debug.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/app_entry.o + .text 0x00000000 0x0 ./Core/Src/app_entry.o + .data 0x00000000 0x0 ./Core/Src/app_entry.o + .bss 0x00000000 0x0 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0xad8 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x22 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x8e ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x51 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x103 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x6a ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1df ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x61 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x2a ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x43 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x34 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x190 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x370 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x16 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x4a ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x34 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x10 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x58 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x8e ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x185 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x10 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x3c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x20 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x10 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x16 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x146 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x16 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x16 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x29 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x4c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x89 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x2e ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x2e ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x22 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0xfb ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1011 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x11f ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x12adb ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x6c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x13c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x350b ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x56 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x3f5 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x286 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x30d ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x17e ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x43 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x236 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x24a ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x57b ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x2e ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x100 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1ba ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1cd ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x4a ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x22c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x55 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0xa5 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x4a ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x381 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x13d ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x141 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x4ff ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x874 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x259 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1bb1 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0xe4 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x5e7 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x328 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x493 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0xf2 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x557 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x433 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x82 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1a8 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x45 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0xf5 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x14d ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x467 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x6d ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x359 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0xa0 ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x13a ./Core/Src/app_entry.o + .debug_macro 0x00000000 0xac ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x1c ./Core/Src/app_entry.o + .debug_macro 0x00000000 0x415 ./Core/Src/app_entry.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/hw_timerserver.o + .text 0x00000000 0x0 ./Core/Src/hw_timerserver.o + .data 0x00000000 0x0 ./Core/Src/hw_timerserver.o + .bss 0x00000000 0x0 ./Core/Src/hw_timerserver.o + .text.HW_TS_RTC_Wakeup_Handler + 0x00000000 0x190 ./Core/Src/hw_timerserver.o + .text.HW_TS_Delete + 0x00000000 0x34 ./Core/Src/hw_timerserver.o + .text.HW_TS_RTC_ReadLeftTicksToCount + 0x00000000 0x68 ./Core/Src/hw_timerserver.o + .text.HW_TS_RTC_Int_AppNot + 0x00000000 0x1a ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0xad8 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x22 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x8e ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x51 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x103 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x6a ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1df ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x61 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x2a ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x43 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x34 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x190 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x370 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x16 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x4a ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x34 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x10 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x58 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x8e ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x185 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x10 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x3c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x20 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x10 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x16 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x146 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x16 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x16 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x29 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x4c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x89 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x2e ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x2e ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x22 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0xfb ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1011 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x11f ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x12adb ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x6c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x13c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x350b ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x56 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x3f5 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x286 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x30d ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x17e ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x43 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x236 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x24a ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x57b ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x2e ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x100 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1ba ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1cd ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x4a ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x22c ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x55 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0xa5 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x4a ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x381 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x13d ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x141 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x4ff ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x874 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x259 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1bb1 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0xe4 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x5e7 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x328 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x493 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0xf2 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x557 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x433 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x82 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x1a8 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x45 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0xf5 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x14d ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x467 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x6d ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0x359 ./Core/Src/hw_timerserver.o + .debug_macro 0x00000000 0xa0 ./Core/Src/hw_timerserver.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/main.o + .text 0x00000000 0x0 ./Core/Src/main.o + .data 0x00000000 0x0 ./Core/Src/main.o + .bss 0x00000000 0x0 ./Core/Src/main.o + .debug_macro 0x00000000 0xad8 ./Core/Src/main.o + .debug_macro 0x00000000 0x13c ./Core/Src/main.o + .debug_macro 0x00000000 0x2e ./Core/Src/main.o + .debug_macro 0x00000000 0x2e ./Core/Src/main.o + .debug_macro 0x00000000 0x22 ./Core/Src/main.o + .debug_macro 0x00000000 0x8e ./Core/Src/main.o + .debug_macro 0x00000000 0x51 ./Core/Src/main.o + .debug_macro 0x00000000 0x103 ./Core/Src/main.o + .debug_macro 0x00000000 0x6a ./Core/Src/main.o + .debug_macro 0x00000000 0x1df ./Core/Src/main.o + .debug_macro 0x00000000 0x1c ./Core/Src/main.o + .debug_macro 0x00000000 0x22 ./Core/Src/main.o + .debug_macro 0x00000000 0xfb ./Core/Src/main.o + .debug_macro 0x00000000 0x1011 ./Core/Src/main.o + .debug_macro 0x00000000 0x11f ./Core/Src/main.o + .debug_macro 0x00000000 0x12adb ./Core/Src/main.o + .debug_macro 0x00000000 0x6c ./Core/Src/main.o + .debug_macro 0x00000000 0x350b ./Core/Src/main.o + .debug_macro 0x00000000 0x190 ./Core/Src/main.o + .debug_macro 0x00000000 0x3f5 ./Core/Src/main.o + .debug_macro 0x00000000 0x286 ./Core/Src/main.o + .debug_macro 0x00000000 0x30d ./Core/Src/main.o + .debug_macro 0x00000000 0x17e ./Core/Src/main.o + .debug_macro 0x00000000 0x43 ./Core/Src/main.o + .debug_macro 0x00000000 0x236 ./Core/Src/main.o + .debug_macro 0x00000000 0x24a ./Core/Src/main.o + .debug_macro 0x00000000 0x57b ./Core/Src/main.o + .debug_macro 0x00000000 0x2e ./Core/Src/main.o + .debug_macro 0x00000000 0x100 ./Core/Src/main.o + .debug_macro 0x00000000 0x1ba ./Core/Src/main.o + .debug_macro 0x00000000 0x1cd ./Core/Src/main.o + .debug_macro 0x00000000 0x4a ./Core/Src/main.o + .debug_macro 0x00000000 0x22c ./Core/Src/main.o + .debug_macro 0x00000000 0x55 ./Core/Src/main.o + .debug_macro 0x00000000 0xa5 ./Core/Src/main.o + .debug_macro 0x00000000 0x4a ./Core/Src/main.o + .debug_macro 0x00000000 0x381 ./Core/Src/main.o + .debug_macro 0x00000000 0x13d ./Core/Src/main.o + .debug_macro 0x00000000 0x141 ./Core/Src/main.o + .debug_macro 0x00000000 0x4ff ./Core/Src/main.o + .debug_macro 0x00000000 0x874 ./Core/Src/main.o + .debug_macro 0x00000000 0x259 ./Core/Src/main.o + .debug_macro 0x00000000 0x1bb1 ./Core/Src/main.o + .debug_macro 0x00000000 0xe4 ./Core/Src/main.o + .debug_macro 0x00000000 0x5e7 ./Core/Src/main.o + .debug_macro 0x00000000 0x328 ./Core/Src/main.o + .debug_macro 0x00000000 0x493 ./Core/Src/main.o + .debug_macro 0x00000000 0xf2 ./Core/Src/main.o + .debug_macro 0x00000000 0x557 ./Core/Src/main.o + .debug_macro 0x00000000 0x433 ./Core/Src/main.o + .debug_macro 0x00000000 0x89 ./Core/Src/main.o + .debug_macro 0x00000000 0x82 ./Core/Src/main.o + .debug_macro 0x00000000 0x1a8 ./Core/Src/main.o + .debug_macro 0x00000000 0x45 ./Core/Src/main.o + .debug_macro 0x00000000 0xf5 ./Core/Src/main.o + .debug_macro 0x00000000 0x14d ./Core/Src/main.o + .debug_macro 0x00000000 0x467 ./Core/Src/main.o + .debug_macro 0x00000000 0x6d ./Core/Src/main.o + .debug_macro 0x00000000 0x359 ./Core/Src/main.o + .debug_macro 0x00000000 0x61 ./Core/Src/main.o + .debug_macro 0x00000000 0x2a ./Core/Src/main.o + .debug_macro 0x00000000 0x43 ./Core/Src/main.o + .debug_macro 0x00000000 0x34 ./Core/Src/main.o + .debug_macro 0x00000000 0x370 ./Core/Src/main.o + .debug_macro 0x00000000 0x16 ./Core/Src/main.o + .debug_macro 0x00000000 0x4a ./Core/Src/main.o + .debug_macro 0x00000000 0x34 ./Core/Src/main.o + .debug_macro 0x00000000 0x10 ./Core/Src/main.o + .debug_macro 0x00000000 0x58 ./Core/Src/main.o + .debug_macro 0x00000000 0x8e ./Core/Src/main.o + .debug_macro 0x00000000 0x1c ./Core/Src/main.o + .debug_macro 0x00000000 0x185 ./Core/Src/main.o + .debug_macro 0x00000000 0x10 ./Core/Src/main.o + .debug_macro 0x00000000 0x3c ./Core/Src/main.o + .debug_macro 0x00000000 0x20 ./Core/Src/main.o + .debug_macro 0x00000000 0x1c ./Core/Src/main.o + .debug_macro 0x00000000 0x10 ./Core/Src/main.o + .debug_macro 0x00000000 0x1c ./Core/Src/main.o + .debug_macro 0x00000000 0x16 ./Core/Src/main.o + .debug_macro 0x00000000 0x146 ./Core/Src/main.o + .debug_macro 0x00000000 0x16 ./Core/Src/main.o + .debug_macro 0x00000000 0x16 ./Core/Src/main.o + .debug_macro 0x00000000 0x29 ./Core/Src/main.o + .debug_macro 0x00000000 0x4c ./Core/Src/main.o + .debug_macro 0x00000000 0xa0 ./Core/Src/main.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .text 0x00000000 0x0 ./Core/Src/stm32_lpm_if.o + .data 0x00000000 0x0 ./Core/Src/stm32_lpm_if.o + .bss 0x00000000 0x0 ./Core/Src/stm32_lpm_if.o + .text.LL_PWR_SetPowerMode + 0x00000000 0x28 ./Core/Src/stm32_lpm_if.o + .text.LL_PWR_ClearFlag_WU + 0x00000000 0x18 ./Core/Src/stm32_lpm_if.o + .text.LL_PWR_IsActiveFlag_C2SB + 0x00000000 0x28 ./Core/Src/stm32_lpm_if.o + .text.LL_PWR_IsActiveFlag_C2DS + 0x00000000 0x28 ./Core/Src/stm32_lpm_if.o + .text.LL_RCC_HSI_Enable + 0x00000000 0x1e ./Core/Src/stm32_lpm_if.o + .text.LL_RCC_HSI_IsReady + 0x00000000 0x24 ./Core/Src/stm32_lpm_if.o + .text.LL_RCC_SetSysClkSource + 0x00000000 0x28 ./Core/Src/stm32_lpm_if.o + .text.LL_RCC_GetSysClkSource + 0x00000000 0x18 ./Core/Src/stm32_lpm_if.o + .text.LL_RCC_SetSMPSClockSource + 0x00000000 0x28 ./Core/Src/stm32_lpm_if.o + .text.LL_LPM_EnableSleep + 0x00000000 0x20 ./Core/Src/stm32_lpm_if.o + .text.LL_LPM_EnableDeepSleep + 0x00000000 0x20 ./Core/Src/stm32_lpm_if.o + .text.LL_HSEM_1StepLock + 0x00000000 0x30 ./Core/Src/stm32_lpm_if.o + .text.LL_HSEM_ReleaseLock + 0x00000000 0x26 ./Core/Src/stm32_lpm_if.o + .rodata.UTIL_PowerDriver + 0x00000000 0x18 ./Core/Src/stm32_lpm_if.o + .text.PWR_EnterOffMode + 0x00000000 0x20 ./Core/Src/stm32_lpm_if.o + .text.PWR_ExitOffMode + 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .text.PWR_EnterStopMode + 0x00000000 0x1c ./Core/Src/stm32_lpm_if.o + .text.PWR_ExitStopMode + 0x00000000 0x10 ./Core/Src/stm32_lpm_if.o + .text.PWR_EnterSleepMode + 0x00000000 0x12 ./Core/Src/stm32_lpm_if.o + .text.PWR_ExitSleepMode + 0x00000000 0xc ./Core/Src/stm32_lpm_if.o + .text.EnterLowPower + 0x00000000 0x78 ./Core/Src/stm32_lpm_if.o + .text.ExitLowPower + 0x00000000 0x34 ./Core/Src/stm32_lpm_if.o + .text.Switch_On_HSI + 0x00000000 0x30 ./Core/Src/stm32_lpm_if.o + .debug_info 0x00000000 0xc8d ./Core/Src/stm32_lpm_if.o + .debug_abbrev 0x00000000 0x248 ./Core/Src/stm32_lpm_if.o + .debug_aranges + 0x00000000 0xc8 ./Core/Src/stm32_lpm_if.o + .debug_rnglists + 0x00000000 0x91 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x2d3 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0xad8 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x22 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x8e ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x51 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x103 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x6a ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x1df ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x89 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x22 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0xfb ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x1011 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x11f ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x12adb ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x6c ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x13c ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x350b ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x190 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x5c ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x3f5 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x286 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x30d ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x17e ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x43 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x236 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x24a ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x57b ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x100 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x1ba ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x1cd ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x4a ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x22c ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x55 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0xa5 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x4a ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x381 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x13d ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x141 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x4ff ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x874 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x259 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x1bb1 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0xe4 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x5e7 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x328 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x493 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0xf2 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x557 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x433 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x82 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x1a8 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x45 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0xf5 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x14d ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x467 ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x6d ./Core/Src/stm32_lpm_if.o + .debug_macro 0x00000000 0x359 ./Core/Src/stm32_lpm_if.o + .debug_line 0x00000000 0xb7b ./Core/Src/stm32_lpm_if.o + .debug_str 0x00000000 0xd60e5 ./Core/Src/stm32_lpm_if.o + .comment 0x00000000 0x44 ./Core/Src/stm32_lpm_if.o + .debug_frame 0x00000000 0x2d4 ./Core/Src/stm32_lpm_if.o + .ARM.attributes + 0x00000000 0x34 ./Core/Src/stm32_lpm_if.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_hal_msp.o + .text 0x00000000 0x0 ./Core/Src/stm32wbxx_hal_msp.o + .data 0x00000000 0x0 ./Core/Src/stm32wbxx_hal_msp.o + .bss 0x00000000 0x0 ./Core/Src/stm32wbxx_hal_msp.o + .text.LL_RCC_DisableRTC + 0x00000000 0x22 ./Core/Src/stm32wbxx_hal_msp.o + .text.LL_AHB3_GRP1_DisableClock + 0x00000000 0x26 ./Core/Src/stm32wbxx_hal_msp.o + .text.LL_APB1_GRP1_DisableClock + 0x00000000 0x26 ./Core/Src/stm32wbxx_hal_msp.o + .text.HAL_I2C_MspDeInit + 0x00000000 0x3c ./Core/Src/stm32wbxx_hal_msp.o + .text.HAL_IPCC_MspDeInit + 0x00000000 0x34 ./Core/Src/stm32wbxx_hal_msp.o + .text.HAL_RTC_MspDeInit + 0x00000000 0x2c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0xad8 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x13c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x22 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x8e ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x51 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x103 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x6a ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1df ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x22 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0xfb ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1011 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x11f ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x12adb ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x6c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x350b ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x190 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x5c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x3f5 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x286 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x30d ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x17e ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x43 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x236 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x24a ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x57b ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x100 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1ba ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1cd ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x4a ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x22c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x55 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0xa5 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x4a ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x381 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x13d ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x141 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x4ff ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x874 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x259 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1bb1 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0xe4 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x5e7 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x328 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x493 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0xf2 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x557 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x433 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x89 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x82 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1a8 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x45 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0xf5 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x14d ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x467 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x6d ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x359 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x61 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x2a ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x43 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x34 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x370 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x16 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x4a ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x34 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x10 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x58 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x8e ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x185 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x10 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x3c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x20 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x10 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x16 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x146 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x16 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x16 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x29 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0x4c ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x00000000 0xa0 ./Core/Src/stm32wbxx_hal_msp.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/stm32wbxx_it.o + .text 0x00000000 0x0 ./Core/Src/stm32wbxx_it.o + .data 0x00000000 0x0 ./Core/Src/stm32wbxx_it.o + .bss 0x00000000 0x0 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0xad8 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x13c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x22 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x8e ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x51 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x103 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x6a ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1df ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x22 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0xfb ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1011 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x11f ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x12adb ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x6c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x350b ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x190 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x5c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x3f5 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x286 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x30d ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x17e ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x43 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x236 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x24a ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x57b ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x2e ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x100 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1ba ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1cd ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x4a ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x22c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x55 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0xa5 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x4a ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x381 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x13d ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x141 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x4ff ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x874 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x259 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1bb1 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0xe4 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x5e7 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x328 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x493 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0xf2 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x557 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x433 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x89 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x82 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1a8 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x45 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0xf5 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x14d ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x467 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x6d ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x359 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x61 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x2a ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x43 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x34 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x370 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x16 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x4a ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x34 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x10 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x58 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x8e ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x185 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x10 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x3c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x20 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x10 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x1c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x16 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x146 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x16 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x16 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x29 ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0x4c ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00000000 0xa0 ./Core/Src/stm32wbxx_it.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/syscalls.o + .text 0x00000000 0x0 ./Core/Src/syscalls.o + .data 0x00000000 0x0 ./Core/Src/syscalls.o + .bss 0x00000000 0x0 ./Core/Src/syscalls.o + .bss.__env 0x00000000 0x4 ./Core/Src/syscalls.o + .data.environ 0x00000000 0x4 ./Core/Src/syscalls.o + .text.initialise_monitor_handles + 0x00000000 0xe ./Core/Src/syscalls.o + .text._getpid 0x00000000 0x10 ./Core/Src/syscalls.o + .text._kill 0x00000000 0x20 ./Core/Src/syscalls.o + .text._exit 0x00000000 0x16 ./Core/Src/syscalls.o + .text._read 0x00000000 0x3a ./Core/Src/syscalls.o + .text._write 0x00000000 0x38 ./Core/Src/syscalls.o + .text._close 0x00000000 0x18 ./Core/Src/syscalls.o + .text._fstat 0x00000000 0x20 ./Core/Src/syscalls.o + .text._isatty 0x00000000 0x16 ./Core/Src/syscalls.o + .text._lseek 0x00000000 0x1a ./Core/Src/syscalls.o + .text._open 0x00000000 0x1c ./Core/Src/syscalls.o + .text._wait 0x00000000 0x1e ./Core/Src/syscalls.o + .text._unlink 0x00000000 0x1e ./Core/Src/syscalls.o + .text._times 0x00000000 0x18 ./Core/Src/syscalls.o + .text._stat 0x00000000 0x20 ./Core/Src/syscalls.o + .text._link 0x00000000 0x20 ./Core/Src/syscalls.o + .text._fork 0x00000000 0x16 ./Core/Src/syscalls.o + .text._execve 0x00000000 0x22 ./Core/Src/syscalls.o + .debug_info 0x00000000 0x6a3 ./Core/Src/syscalls.o + .debug_abbrev 0x00000000 0x1b6 ./Core/Src/syscalls.o + .debug_aranges + 0x00000000 0xa8 ./Core/Src/syscalls.o + .debug_rnglists + 0x00000000 0x79 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x274 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0xad8 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x22 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x5b ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x2a ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x94 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x43 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x34 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x57 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x190 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x370 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x4a ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x34 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x58 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x8e ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x185 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x3c ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x6a ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x52 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x22 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x52 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0xcf ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x3d ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x35 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x12c ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x29 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x242 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x1c ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x10 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x146 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x103 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x1df ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x18a ./Core/Src/syscalls.o + .debug_macro 0x00000000 0x16 ./Core/Src/syscalls.o + .debug_macro 0x00000000 0xce ./Core/Src/syscalls.o + .debug_line 0x00000000 0x7af ./Core/Src/syscalls.o + .debug_str 0x00000000 0x99e4 ./Core/Src/syscalls.o + .comment 0x00000000 0x44 ./Core/Src/syscalls.o + .debug_frame 0x00000000 0x2ac ./Core/Src/syscalls.o + .ARM.attributes + 0x00000000 0x34 ./Core/Src/syscalls.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/sysmem.o + .text 0x00000000 0x0 ./Core/Src/sysmem.o + .data 0x00000000 0x0 ./Core/Src/sysmem.o + .bss 0x00000000 0x0 ./Core/Src/sysmem.o + .bss.__sbrk_heap_end + 0x00000000 0x4 ./Core/Src/sysmem.o + .text._sbrk 0x00000000 0x6c ./Core/Src/sysmem.o + .debug_info 0x00000000 0x168 ./Core/Src/sysmem.o + .debug_abbrev 0x00000000 0xbc ./Core/Src/sysmem.o + .debug_aranges + 0x00000000 0x20 ./Core/Src/sysmem.o + .debug_rnglists + 0x00000000 0x13 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x112 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0xad8 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x22 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x5b ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x2a ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x94 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x43 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x34 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x190 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x57 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x370 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x16 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x4a ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x34 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x10 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x58 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x8e ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x1c ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x185 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x23c ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x103 ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x6a ./Core/Src/sysmem.o + .debug_macro 0x00000000 0x1df ./Core/Src/sysmem.o + .debug_line 0x00000000 0x48b ./Core/Src/sysmem.o + .debug_str 0x00000000 0x7782 ./Core/Src/sysmem.o + .comment 0x00000000 0x44 ./Core/Src/sysmem.o + .debug_frame 0x00000000 0x34 ./Core/Src/sysmem.o + .ARM.attributes + 0x00000000 0x34 ./Core/Src/sysmem.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .group 0x00000000 0xc ./Core/Src/system_stm32wbxx.o + .text 0x00000000 0x0 ./Core/Src/system_stm32wbxx.o + .data 0x00000000 0x0 ./Core/Src/system_stm32wbxx.o + .bss 0x00000000 0x0 ./Core/Src/system_stm32wbxx.o + .rodata.APBPrescTable + 0x00000000 0x20 ./Core/Src/system_stm32wbxx.o + .rodata.SmpsPrescalerTable + 0x00000000 0x60 ./Core/Src/system_stm32wbxx.o + .text.SystemCoreClockUpdate + 0x00000000 0x144 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0xad8 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x2e ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x2e ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x22 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x8e ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x51 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x103 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x6a ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x1df ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x1c ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x22 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0xfb ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x1011 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x11f ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x12adb ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x6c ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x13c ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x350b ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x190 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x5c ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x3f5 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x286 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x30d ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x17e ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x43 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x236 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x24a ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x57b ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x2e ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x100 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x1ba ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x1cd ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x4a ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x22c ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x55 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0xa5 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x4a ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x381 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x13d ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x141 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x4ff ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x874 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x259 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x1bb1 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0xe4 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x5e7 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x328 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x493 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0xf2 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x557 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00000000 0x433 ./Core/Src/system_stm32wbxx.o + .text 0x00000000 0x20 ./Core/Startup/startup_stm32wb55cgux.o + .data 0x00000000 0x0 ./Core/Startup/startup_stm32wb55cgux.o + .bss 0x00000000 0x0 ./Core/Startup/startup_stm32wb55cgux.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_AHB1_GRP1_ForceReset + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_AHB1_GRP1_ReleaseReset + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_AHB2_GRP1_ForceReset + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_AHB2_GRP1_ReleaseReset + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_AHB3_GRP1_ForceReset + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_AHB3_GRP1_ReleaseReset + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_APB1_GRP1_ForceReset + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_APB1_GRP2_ForceReset + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_APB1_GRP1_ReleaseReset + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_APB1_GRP2_ReleaseReset + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_APB2_GRP1_ForceReset + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_APB2_GRP1_ReleaseReset + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_APB3_GRP1_ForceReset + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_APB3_GRP1_ReleaseReset + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_EnableAnalogBooster + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_DisableAnalogBooster + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_EnableAnalogGpioSwitch + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_DisableAnalogGpioSwitch + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_EnableSRAM2Erase + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_DisableSRAMFetch + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_IsEnabledSRAMFetch + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_UnlockSRAM2WRP + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_EnableSecurityAccess + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_DisableSecurityAccess + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_SYSCFG_IsEnabledSecurityAccess + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_DBGMCU_GetDeviceID + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_DBGMCU_GetRevisionID + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_DBGMCU_EnableDBGSleepMode + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_DBGMCU_DisableDBGSleepMode + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_DBGMCU_EnableDBGStopMode + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_DBGMCU_DisableDBGStopMode + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_DBGMCU_EnableDBGStandbyMode + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_DBGMCU_DisableDBGStandbyMode + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_VREFBUF_Enable + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_VREFBUF_Disable + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_VREFBUF_SetVoltageScaling + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.LL_VREFBUF_SetTrimming + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_DeInit + 0x00000000 0x7e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_MspInit + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_MspDeInit + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SetTickFreq + 0x00000000 0x50 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_Delay + 0x00000000 0x48 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SuspendTick + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_ResumeTick + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_GetHalVersion + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_GetREVID + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_GetDEVID + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_GetUIDw0 + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_GetUIDw1 + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_GetUIDw2 + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_DBGMCU_EnableDBGSleepMode + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_DBGMCU_DisableDBGSleepMode + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_DBGMCU_EnableDBGStopMode + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_DBGMCU_DisableDBGStopMode + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_DBGMCU_EnableDBGStandbyMode + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_DBGMCU_DisableDBGStandbyMode + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_SRAM2Erase + 0x00000000 0x10 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_DisableSRAMFetch + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_IsEnabledSRAMFetch + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_VREFBUF_VoltageScalingConfig + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_VREFBUF_HighImpedanceConfig + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_VREFBUF_TrimmingConfig + 0x00000000 0x16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_EnableVREFBUF + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_DisableVREFBUF + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_EnableIOBooster + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_DisableIOBooster + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_EnableIOVdd + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_DisableIOVdd + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_EnableSecurityAccess + 0x00000000 0x16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_DisableSecurityAccess + 0x00000000 0x16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .text.HAL_SYSCFG_IsEnabledSecurityAccess + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_GetPendingIRQ + 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_GetPriority + 0x00000000 0x50 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.NVIC_DecodePriority + 0x00000000 0x6e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_SystemReset + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_NVIC_SystemReset + 0x00000000 0x8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_NVIC_GetPriorityGrouping + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_NVIC_GetPriority + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_NVIC_GetPendingIRQ + 0x00000000 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_SYSTICK_CLKSourceConfig + 0x00000000 0x38 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_SYSTICK_IRQHandler + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_SYSTICK_Callback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_MPU_Disable + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_MPU_Enable + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_MPU_EnableRegion + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_MPU_DisableRegion + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_MPU_ConfigRegion + 0x00000000 0x80 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_Init + 0x00000000 0x150 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_DeInit + 0x00000000 0x12c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_Start + 0x00000000 0x86 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_Start_IT + 0x00000000 0xf6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_Abort + 0x00000000 0xbe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_Abort_IT + 0x00000000 0xbe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_PollForTransfer + 0x00000000 0x1b2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_IRQHandler + 0x00000000 0x15e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_RegisterCallback + 0x00000000 0x90 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_UnRegisterCallback + 0x00000000 0xb0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_GetState + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.HAL_DMA_GetError + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.DMA_SetConfig + 0x00000000 0x7c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.DMA_CalcDMAMUXChannelBaseAndMask + 0x00000000 0x7c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .text.DMA_CalcDMAMUXRequestGenBaseAndMask + 0x00000000 0x4c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_info 0x00000000 0x839 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_abbrev 0x00000000 0x1e3 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_aranges + 0x00000000 0x90 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_rnglists + 0x00000000 0x71 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x240 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_line 0x00000000 0xe8d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_str 0x00000000 0xd0ddf ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .comment 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .debug_frame 0x00000000 0x24c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .ARM.attributes + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .text.HAL_DMAEx_ConfigMuxSync + 0x00000000 0x80 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .text.HAL_DMAEx_ConfigMuxRequestGenerator + 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .text.HAL_DMAEx_EnableMuxRequestGenerator + 0x00000000 0x3e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .text.HAL_DMAEx_DisableMuxRequestGenerator + 0x00000000 0x3e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .text.HAL_DMAEx_MUX_IRQHandler + 0x00000000 0xa4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_info 0x00000000 0x597 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_abbrev 0x00000000 0x146 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_aranges + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_rnglists + 0x00000000 0x2d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x240 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_line 0x00000000 0x877 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_str 0x00000000 0xd0cb5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .comment 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .debug_frame 0x00000000 0xd4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .ARM.attributes + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_SetConfigLine + 0x00000000 0x1a0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_GetConfigLine + 0x00000000 0x144 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_ClearConfigLine + 0x00000000 0x110 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_RegisterCallback + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_GetHandle + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_IRQHandler + 0x00000000 0x5e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_GetPending + 0x00000000 0x56 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_ClearPending + 0x00000000 0x46 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .text.HAL_EXTI_GenerateSWI + 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_info 0x00000000 0x756 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_abbrev 0x00000000 0x1c8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_aranges + 0x00000000 0x60 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_rnglists + 0x00000000 0x46 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x24c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_line 0x00000000 0xab8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_str 0x00000000 0xd0b16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .comment 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .debug_frame 0x00000000 0x174 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .ARM.attributes + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .bss.pFlash 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_Program + 0x00000000 0x88 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_Program_IT + 0x00000000 0x88 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_IRQHandler + 0x00000000 0x11c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_EndOfOperationCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_OperationErrorCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_Unlock + 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_Lock + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_OB_Unlock + 0x00000000 0x4c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_OB_Lock + 0x00000000 0x38 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_OB_Launch + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.HAL_FLASH_GetError + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.FLASH_WaitForLastOperation + 0x00000000 0xdc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .text.FLASH_Program_DoubleWord + 0x00000000 0x4c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .RamFunc 0x00000000 0x7c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_info 0x00000000 0x690 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_abbrev 0x00000000 0x2f8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_aranges + 0x00000000 0x88 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_rnglists + 0x00000000 0x65 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x246 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_line 0x00000000 0xaa6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_str 0x00000000 0xd0bbd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .comment 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .debug_frame 0x00000000 0x220 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .ARM.attributes + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_Erase + 0x00000000 0xa0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_Erase_IT + 0x00000000 0x84 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_OBProgram + 0x00000000 0x138 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_OBGetConfig + 0x00000000 0xc0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_FlashEmptyCheck + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_ForceFlashEmpty + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_SuspendOperation + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_AllowOperation + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.HAL_FLASHEx_IsOperationSuspended + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_PageErase + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_FlushCaches + 0x00000000 0x90 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_AcknowledgePageErase + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_WRPConfig + 0x00000000 0x50 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_OptrConfig + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_PCROP1AConfig + 0x00000000 0x70 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_PCROP1BConfig + 0x00000000 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_IPCCBufferAddrConfig + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_SecureConfig + 0x00000000 0x104 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_GetWRP + 0x00000000 0x50 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_GetRDP + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_GetUser + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_GetPCROP + 0x00000000 0x84 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_GetIPCCBufferAddr + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_GetSecureMemoryConfig + 0x00000000 0x80 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_GetC2BootResetConfig + 0x00000000 0x60 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .text.FLASH_OB_ProceedWriteOperation + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_info 0x00000000 0x982 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_abbrev 0x00000000 0x2c2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_aranges + 0x00000000 0xe8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_rnglists + 0x00000000 0xb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x240 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_line 0x00000000 0xcbd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_str 0x00000000 0xd0e2a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .comment 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .debug_frame 0x00000000 0x3e0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .ARM.attributes + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .text.HAL_GPIO_DeInit + 0x00000000 0x1bc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .text.HAL_GPIO_ReadPin + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .text.HAL_GPIO_WriteMultipleStatePin + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .text.HAL_GPIO_TogglePin + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .text.HAL_GPIO_LockPin + 0x00000000 0x50 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .text.HAL_GPIO_EXTI_IRQHandler + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .text.HAL_GPIO_EXTI_Callback + 0x00000000 0x16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_Take + 0x00000000 0x48 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_FastTake + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_IsSemTaken + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_Release + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_ReleaseAll + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_SetClearKey + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_GetClearKey + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_ActivateNotification + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .text.HAL_HSEM_DeactivateNotification + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_DeInit + 0x00000000 0x5e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_MspInit + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_MspDeInit + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Transmit + 0x00000000 0x230 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Receive + 0x00000000 0x1ec ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Transmit + 0x00000000 0x29a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Receive + 0x00000000 0x220 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Transmit_IT + 0x00000000 0x130 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Receive_IT + 0x00000000 0xe0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Transmit_IT + 0x00000000 0xdc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Receive_IT + 0x00000000 0xa0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Transmit_DMA + 0x00000000 0x228 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Receive_DMA + 0x00000000 0x1e0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Transmit_DMA + 0x00000000 0x1d8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Receive_DMA + 0x00000000 0x16c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Mem_Write + 0x00000000 0x228 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Mem_Read + 0x00000000 0x234 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Mem_Write_IT + 0x00000000 0x114 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Mem_Read_IT + 0x00000000 0x10c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Mem_Write_DMA + 0x00000000 0x1cc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Mem_Read_DMA + 0x00000000 0x1cc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_IsDeviceReady + 0x00000000 0x20a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Seq_Transmit_IT + 0x00000000 0x17c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Seq_Transmit_DMA + 0x00000000 0x2a0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Seq_Receive_IT + 0x00000000 0x108 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Seq_Receive_DMA + 0x00000000 0x208 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Seq_Transmit_IT + 0x00000000 0x164 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Seq_Transmit_DMA + 0x00000000 0x28c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Seq_Receive_IT + 0x00000000 0x164 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Slave_Seq_Receive_DMA + 0x00000000 0x28c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_EnableListen_IT + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_DisableListen_IT + 0x00000000 0x62 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_Master_Abort_IT + 0x00000000 0xa8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_EV_IRQHandler + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_ER_IRQHandler + 0x00000000 0xc2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_MasterTxCpltCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_MasterRxCpltCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_SlaveTxCpltCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_SlaveRxCpltCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_AddrCallback + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_ListenCpltCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_MemTxCpltCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_MemRxCpltCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_ErrorCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_AbortCpltCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_GetState + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_GetMode + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.HAL_I2C_GetError + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Master_ISR_IT + 0x00000000 0x268 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Mem_ISR_IT + 0x00000000 0x264 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Slave_ISR_IT + 0x00000000 0x208 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Master_ISR_DMA + 0x00000000 0x1e6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Mem_ISR_DMA + 0x00000000 0x260 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Slave_ISR_DMA + 0x00000000 0x1c2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_RequestMemoryWrite + 0x00000000 0xa8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_RequestMemoryRead + 0x00000000 0xa8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_ITAddrCplt + 0x00000000 0x108 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_ITMasterSeqCplt + 0x00000000 0x7a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_ITSlaveSeqCplt + 0x00000000 0xbc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_ITMasterCplt + 0x00000000 0x194 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_ITSlaveCplt + 0x00000000 0x2d4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_ITListenCplt + 0x00000000 0xac ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_ITError + 0x00000000 0x1e0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_TreatErrorCallback + 0x00000000 0x4e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Flush_TXDR + 0x00000000 0x48 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_DMAMasterTransmitCplt + 0x00000000 0x96 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_DMASlaveTransmitCplt + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_DMAMasterReceiveCplt + 0x00000000 0x96 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_DMASlaveReceiveCplt + 0x00000000 0x46 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_DMAError + 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_DMAAbort + 0x00000000 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_WaitOnFlagUntilTimeout + 0x00000000 0xb2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_WaitOnTXISFlagUntilTimeout + 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_WaitOnSTOPFlagUntilTimeout + 0x00000000 0x86 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_WaitOnRXNEFlagUntilTimeout + 0x00000000 0x118 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_IsErrorOccurred + 0x00000000 0x1c0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_TransferConfig + 0x00000000 0x64 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Enable_IRQ + 0x00000000 0x108 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_Disable_IRQ + 0x00000000 0xbc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .text.I2C_ConvertOtherXferOptions + 0x00000000 0x36 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .text.HAL_I2CEx_EnableWakeUp + 0x00000000 0x84 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .text.HAL_I2CEx_DisableWakeUp + 0x00000000 0x84 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .text.HAL_I2CEx_EnableFastModePlus + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .text.HAL_I2CEx_DisableFastModePlus + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_DeInit + 0x00000000 0x54 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_MspInit + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_MspDeInit + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_ActivateNotification + 0x00000000 0x9c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_DeActivateNotification + 0x00000000 0xa0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_GetChannelStatus + 0x00000000 0x68 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_NotifyCPU + 0x00000000 0x8c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_TX_IRQHandler + 0x00000000 0x9c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_RX_IRQHandler + 0x00000000 0x98 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.HAL_IPCC_GetState + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.IPCC_MaskInterrupt + 0x00000000 0x58 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .text.IPCC_UnmaskInterrupt + 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.LL_EXTI_EnableIT_0_31 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.LL_EXTI_DisableIT_0_31 + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.LL_C2_EXTI_DisableIT_0_31 + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.LL_EXTI_EnableRisingTrig_0_31 + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.LL_EXTI_DisableRisingTrig_0_31 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.LL_EXTI_EnableFallingTrig_0_31 + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.LL_EXTI_DisableFallingTrig_0_31 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_DeInit + 0x00000000 0xa0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_DisableBkUpAccess + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_ConfigPVD + 0x00000000 0x84 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_EnablePVD + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_DisablePVD + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_EnableWakeUpPin + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_DisableWakeUpPin + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_EnterSLEEPMode + 0x00000000 0x68 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_EnterSTOPMode + 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_EnterSTANDBYMode + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_EnableSleepOnExit + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_DisableSleepOnExit + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_EnableSEVOnPend + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_DisableSEVOnPend + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .text.HAL_PWR_PVDCallback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_PWR_EnableSRAM2Retention + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_PWR_DisableSRAM2Retention + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_PWR_SetBORConfig + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_PWR_GetBORConfig + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_PWR_EnableBootC2 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_PWR_DisableBootC2 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_EnableIT_0_31 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_EnableIT_32_63 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_DisableIT_0_31 + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_DisableIT_32_63 + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_EnableEvent_0_31 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_EnableEvent_32_63 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_DisableEvent_0_31 + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_DisableEvent_32_63 + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_EnableRisingTrig_0_31 + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_EnableRisingTrig_32_63 + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_DisableRisingTrig_0_31 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_DisableRisingTrig_32_63 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_EnableFallingTrig_0_31 + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_EnableFallingTrig_32_63 + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_DisableFallingTrig_0_31 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_DisableFallingTrig_32_63 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_ReadFlag_0_31 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_ReadFlag_32_63 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_ClearFlag_0_31 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.LL_EXTI_ClearFlag_32_63 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_ControlVoltageScaling + 0x00000000 0xa8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableBatteryCharging + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableBatteryCharging + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableVddUSB + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableVddUSB + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableInternalWakeUpLine + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableInternalWakeUpLine + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableBORH_SMPSBypassIT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableBORH_SMPSBypassIT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableRFPhaseIT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableRFPhaseIT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableBLEActivityIT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableBLEActivityIT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_Enable802ActivityIT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_Disable802ActivityIT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableHOLDC2IT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableHOLDC2IT + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableGPIOPullUp + 0x00000000 0x10c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableGPIOPullUp + 0x00000000 0xbc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableGPIOPullDown + 0x00000000 0x10c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableGPIOPullDown + 0x00000000 0xbc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnablePullUpPullDownConfig + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisablePullUpPullDownConfig + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_SetBORConfig + 0x00000000 0x16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_GetBORConfig + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_HoldCore + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_ReleaseCore + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableSRAMRetention + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableSRAMRetention + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableFlashPowerDown + 0x00000000 0x38 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableFlashPowerDown + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnablePVM1 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisablePVM1 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnablePVM3 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisablePVM3 + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_ConfigPVM + 0x00000000 0x104 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_ConfigSMPS + 0x00000000 0x94 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_SMPS_SetMode + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_SMPS_GetEffectiveMode + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableWakeUpPin + 0x00000000 0x60 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_GetWakeupFlag + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_ClearWakeupFlag + 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnableLowPowerRunMode + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_DisableLowPowerRunMode + 0x00000000 0x70 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnterSTOP0Mode + 0x00000000 0x54 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnterSTOP1Mode + 0x00000000 0x58 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_EnterSHUTDOWNMode + 0x00000000 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_PVD_PVM_IRQHandler + 0x00000000 0x52 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_PVM1Callback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .text.HAL_PWREx_PVM3Callback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSE_EnableCSS + 0x00000000 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_MSI_DisablePLLMode + 0x00000000 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_C2_RCC_GetAHBPrescaler + 0x00000000 0x1a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_GetAPB1Prescaler + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_GetAPB2Prescaler + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_ConfigMCO + 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_PLLSAI1_IsReady + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_DeInit + 0x00000000 0x138 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_MCOConfig + 0x00000000 0xa4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_GetHCLK2Freq + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_GetHCLK4Freq + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_GetPCLK1Freq + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_GetPCLK2Freq + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_GetOscConfig + 0x00000000 0x10e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_GetClockConfig + 0x00000000 0x64 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_EnableCSS + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_NMI_IRQHandler + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_CSSCallback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.HAL_RCC_GetResetSource + 0x00000000 0x36 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_EXTI_EnableIT_0_31 + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_EXTI_EnableRisingTrig_0_31 + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_HSE_IsEnabledDiv2 + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_HSE_IsReady + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_HSI_IsReady + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_HSI48_IsReady + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_LSE_EnableCSS + 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_LSE_DisableCSS + 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_LSI1_IsReady + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_LSI2_IsReady + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_LSI2_SetTrimming + 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_MSI_IsReady + 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_MSI_EnablePLLMode + 0x00000000 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_MSI_DisablePLLMode + 0x00000000 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_MSI_GetRange + 0x00000000 0x2a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_LSCO_Disable + 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetRFWKPClockSource + 0x00000000 0x1a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetAHBPrescaler + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetAPB1Prescaler + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetAPB2Prescaler + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetClkAfterWakeFromStop + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetSMPSClockSelection + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetSMPSClockSource + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetSMPSPrescaler + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetUSARTClockSource + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetLPUARTClockSource + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetI2CClockSource + 0x00000000 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetLPTIMClockSource + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetSAIClockSource + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetRNGClockSource + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetCLK48ClockSource + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetUSBClockSource + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetADCClockSource + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLL_IsReady + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLL_GetN + 0x00000000 0x1a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLL_GetP + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLL_GetQ + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLL_GetDivider + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLLSAI1_GetN + 0x00000000 0x1a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLLSAI1_GetP + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLLSAI1_GetQ + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLLSAI1_GetR + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLL_GetMainSource + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_AHB2_GRP1_EnableClock + 0x00000000 0x32 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_APB1_GRP1_ForceReset + 0x00000000 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_APB1_GRP1_ReleaseReset + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_GetHSI48SmoothTrimming + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_GetReloadCounter + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_GenerateEvent_SWSYNC + 0x00000000 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_GetFreqErrorDirection + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_GetFreqErrorCapture + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_ClearFlag_SYNCOK + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_ClearFlag_SYNCWARN + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_ClearFlag_ERR + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_CRS_ClearFlag_ESYNC + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_GetPeriphCLKConfig + 0x00000000 0x12a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_GetPeriphCLKFreq + 0x00000000 0x7f8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_GetRngCLKSource + 0x00000000 0x32 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_EnablePLLSAI1 + 0x00000000 0xb0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_DisablePLLSAI1 + 0x00000000 0x52 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_WakeUpStopCLKConfig + 0x00000000 0x16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_EnableLSECSS + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_DisableLSECSS + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_EnableLSECSS_IT + 0x00000000 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_LSECSS_IRQHandler + 0x00000000 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_LSECSS_Callback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_LSCOConfig + 0x00000000 0xd4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_EnableLSCO + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_DisableLSCO + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_EnableMSIPLLMode + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_DisableMSIPLLMode + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_TrimOsc + 0x00000000 0x48 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRSConfig + 0x00000000 0x74 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRSSoftwareSynchronizationGenerate + 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRSGetSynchronizationInfo + 0x00000000 0x38 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRSWaitSynchronization + 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRS_IRQHandler + 0x00000000 0xd4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRS_SyncOkCallback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRS_SyncWarnCallback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRS_ExpectedSyncCallback + 0x00000000 0xe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_CRS_ErrorCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.RCC_PLL_GetFreqDomain_P + 0x00000000 0xac ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.RCC_PLL_GetFreqDomain_Q + 0x00000000 0xac ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.RCC_PLLSAI1_GetFreqDomain_R + 0x00000000 0xac ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.RCC_PLLSAI1_GetFreqDomain_P + 0x00000000 0xac ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.RCC_PLLSAI1_GetFreqDomain_Q + 0x00000000 0xac ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_DeInit + 0x00000000 0xd8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_MspInit + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_MspDeInit + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_GetTime + 0x00000000 0xbc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_GetDate + 0x00000000 0x9e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_SetAlarm + 0x00000000 0x266 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_SetAlarm_IT + 0x00000000 0x2a0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_DeactivateAlarm + 0x00000000 0x12c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_GetAlarm + 0x00000000 0x11e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_AlarmIRQHandler + 0x00000000 0x8c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_AlarmAEventCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_PollForAlarmAEvent + 0x00000000 0x72 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_DST_Add1Hour + 0x00000000 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_DST_Sub1Hour + 0x00000000 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_DST_SetStoreOperation + 0x00000000 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_DST_ClearStoreOperation + 0x00000000 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_DST_ReadStoreOperation + 0x00000000 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.HAL_RTC_GetState + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .text.RTC_Bcd2ToByte + 0x00000000 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetTimeStamp + 0x00000000 0xb8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetTimeStamp_IT + 0x00000000 0xe8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_DeactivateTimeStamp + 0x00000000 0x88 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetInternalTimeStamp + 0x00000000 0x84 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_DeactivateInternalTimeStamp + 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_GetTimeStamp + 0x00000000 0x158 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetTamper + 0x00000000 0x1fe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetTamper_IT + 0x00000000 0x1e4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_DeactivateTamper + 0x00000000 0xb2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_TamperTimeStampIRQHandler + 0x00000000 0x104 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_TimeStampEventCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_Tamper1EventCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_Tamper2EventCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_Tamper3EventCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_PollForTimeStampEvent + 0x00000000 0x8c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_PollForTamper1Event + 0x00000000 0x72 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_PollForTamper2Event + 0x00000000 0x72 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_PollForTamper3Event + 0x00000000 0x74 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetWakeUpTimer + 0x00000000 0x14c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetWakeUpTimer_IT + 0x00000000 0x198 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_DeactivateWakeUpTimer + 0x00000000 0xbe ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_GetWakeUpTimer + 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_WakeUpTimerIRQHandler + 0x00000000 0x4c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_WakeUpTimerEventCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_PollForWakeUpTimerEvent + 0x00000000 0x72 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_BKUPWrite + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_BKUPRead + 0x00000000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetSmoothCalib + 0x00000000 0xc4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetSynchroShift + 0x00000000 0x10e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetCalibrationOutPut + 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_DeactivateCalibrationOutPut + 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_SetRefClock + 0x00000000 0x88 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_DeactivateRefClock + 0x00000000 0x88 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_EnableBypassShadow + 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_DisableBypassShadow + 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_AlarmBEventCallback + 0x00000000 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .text.HAL_RTCEx_PollForAlarmBEvent + 0x00000000 0x72 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_info 0x00000000 0x1014 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_abbrev 0x00000000 0x237 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_aranges + 0x00000000 0x140 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_rnglists + 0x00000000 0xfd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x240 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x13c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x8e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x51 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x103 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x6a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x1df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0xfb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x1011 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x11f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x12adb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x6c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x350b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x190 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x5c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x3f5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x286 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x30d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x17e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x43 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x236 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x24a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x57b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x1ba ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x1cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x22c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x55 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0xa5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x4a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x381 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x13d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x141 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x4ff ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x874 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x259 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x1bb1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0xe4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x5e7 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x328 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x493 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0xf2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x557 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_macro 0x00000000 0x433 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_line 0x00000000 0x142d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_str 0x00000000 0xd11e9 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .comment 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .debug_frame 0x00000000 0x59c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .ARM.attributes + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o + .group 0x00000000 0xc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .text 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .data 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .bss 0x00000000 0x0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .debug_info 0x00000000 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .debug_abbrev 0x00000000 0x12 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .debug_aranges + 0x00000000 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .debug_macro 0x00000000 0x11 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .debug_macro 0x00000000 0xad8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .debug_line 0x00000000 0x57 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .debug_str 0x00000000 0x2e9d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .comment 0x00000000 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .ARM.attributes + 0x00000000 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_set_limited_discoverable + 0x00000000 0x1fa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_set_direct_connectable + 0x00000000 0x150 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_set_authorization_requirement + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_pass_key_resp + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_authorization_resp + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_set_non_connectable + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_set_undirected_connectable + 0x00000000 0x122 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_peripheral_security_req + 0x00000000 0xae ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_delete_ad_type + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_get_security_level + 0x00000000 0xfc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_set_event_mask + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_terminate + 0x00000000 0xd4 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_clear_security_db + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_allow_rebond + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_start_limited_discovery_proc + 0x00000000 0x128 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_start_general_discovery_proc + 0x00000000 0x128 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_start_auto_connection_establish_proc + 0x00000000 0x1dc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_start_general_connection_establish_proc + 0x00000000 0x154 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_start_selective_connection_establish_proc + 0x00000000 0x198 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_create_connection + 0x00000000 0x1b6 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_terminate_gap_proc + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_start_connection_update + 0x00000000 0x164 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_send_pairing_req + 0x00000000 0xd4 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_set_broadcast_mode + 0x00000000 0x1aa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_start_observation_proc + 0x00000000 0x150 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_get_bonded_devices + 0x00000000 0xca ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_check_bonded_device + 0x00000000 0x128 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_numeric_comparison_value_confirm_yesno + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_passkey_input + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_get_oob_data + 0x00000000 0x130 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_set_oob_data + 0x00000000 0x154 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_remove_bonded_device + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_add_devices_to_list + 0x00000000 0x134 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_pairing_request_reply + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_additional_beacon_start + 0x00000000 0x152 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_additional_beacon_stop + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_additional_beacon_set_data + 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_adv_set_configuration + 0x00000000 0x202 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_adv_set_enable + 0x00000000 0x10e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_adv_set_adv_data + 0x00000000 0x150 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_adv_set_scan_resp_data + 0x00000000 0x150 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_adv_remove_set + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_adv_clear_sets + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_adv_set_random_address + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_ext_start_scan + 0x00000000 0x194 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .text.aci_gap_ext_create_connection + 0x00000000 0x1b0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x791 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00000000 0x60f ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_include_service + 0x00000000 0x186 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_add_char_desc + 0x00000000 0x290 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_del_char + 0x00000000 0xd0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_del_service + 0x00000000 0xaa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_del_include_service + 0x00000000 0xd0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_set_event_mask + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_exchange_config + 0x00000000 0xb0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_att_find_info_req + 0x00000000 0x102 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_att_find_by_type_value_req + 0x00000000 0x160 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_att_read_by_type_req + 0x00000000 0x164 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_att_read_by_group_type_req + 0x00000000 0x164 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_att_prepare_write_req + 0x00000000 0x158 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_att_execute_write_req + 0x00000000 0xd6 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_disc_all_primary_services + 0x00000000 0xb0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_disc_primary_service_by_uuid + 0x00000000 0x11e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_find_included_services + 0x00000000 0x102 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_disc_all_char_of_service + 0x00000000 0x102 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_disc_char_by_uuid + 0x00000000 0x164 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_disc_all_char_desc + 0x00000000 0x102 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_read_char_value + 0x00000000 0xd6 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_read_using_char_uuid + 0x00000000 0x164 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_read_long_char_value + 0x00000000 0x102 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_read_multiple_char_value + 0x00000000 0x116 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_write_char_value + 0x00000000 0x13e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_write_long_char_value + 0x00000000 0x158 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_write_char_reliable + 0x00000000 0x158 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_write_long_char_desc + 0x00000000 0x158 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_read_long_char_desc + 0x00000000 0x102 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_write_char_desc + 0x00000000 0x13e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_read_char_desc + 0x00000000 0xd6 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_write_without_resp + 0x00000000 0x138 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_signed_write_without_resp + 0x00000000 0x138 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_write_resp + 0x00000000 0x15a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_allow_read + 0x00000000 0xaa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_set_security_permission + 0x00000000 0xfc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_set_desc_value + 0x00000000 0x15a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_read_handle_value + 0x00000000 0x162 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_update_char_value_ext + 0x00000000 0x186 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_deny_read + 0x00000000 0xd0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_set_access_permission + 0x00000000 0xfc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_store_db + 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_send_mult_notification + 0x00000000 0x110 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .text.aci_gatt_read_multiple_var_char_value + 0x00000000 0x116 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x791 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x60f ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00000000 0x46 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_read_config_data + 0x00000000 0x10a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_le_tx_test_packet_number + 0x00000000 0x68 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_tone_start + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_tone_stop + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_get_link_status + 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_get_anchor_period + 0x00000000 0x72 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_set_event_mask + 0x00000000 0xa6 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_set_peripheral_latency + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_read_rssi + 0x00000000 0x66 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_ead_encrypt_decrypt + 0x00000000 0x19c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_read_radio_reg + 0x00000000 0xdc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_write_radio_reg + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_read_raw_rssi + 0x00000000 0x70 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_rx_start + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_hal_rx_stop + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_reset + 0x00000000 0xd0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_get_information + 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_write_config_data + 0x00000000 0x10c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .text.aci_read_config_data + 0x00000000 0x10c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x791 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x60f ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x00000000 0x46 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_disconnect + 0x00000000 0xd4 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_read_remote_version_information + 0x00000000 0xae ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_set_event_mask + 0x00000000 0xaa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_read_transmit_power_level + 0x00000000 0x102 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_set_controller_to_host_flow_control + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_host_buffer_size + 0x00000000 0x126 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_host_number_of_completed_packets + 0x00000000 0xe8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_read_local_version_information + 0x00000000 0x8c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_read_local_supported_commands + 0x00000000 0x74 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_read_local_supported_features + 0x00000000 0x70 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_read_bd_addr + 0x00000000 0x70 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_read_rssi + 0x00000000 0xdc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_event_mask + 0x00000000 0xaa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_buffer_size + 0x00000000 0x72 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_local_supported_features_page_0 + 0x00000000 0x70 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_random_address + 0x00000000 0xaa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_advertising_parameters + 0x00000000 0x17a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_advertising_physical_channel_tx_power + 0x00000000 0x66 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_advertising_data + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_scan_response_data + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_advertising_enable + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_scan_parameters + 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_scan_enable + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_create_connection + 0x00000000 0x1dc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_create_connection_cancel + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_filter_accept_list_size + 0x00000000 0x66 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_clear_filter_accept_list + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_add_device_to_filter_accept_list + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_remove_device_from_filter_accept_list + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_connection_update + 0x00000000 0x164 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_host_channel_classification + 0x00000000 0xaa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_channel_map + 0x00000000 0xdc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_remote_features_page_0 + 0x00000000 0xae ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_encrypt + 0x00000000 0x10a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_rand + 0x00000000 0x70 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_enable_encryption + 0x00000000 0x12e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_long_term_key_request_reply + 0x00000000 0xe6 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_long_term_key_request_negative_reply + 0x00000000 0xbc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_supported_states + 0x00000000 0x70 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_receiver_test + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_transmitter_test + 0x00000000 0xfa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_test_end + 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_data_length + 0x00000000 0x10e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_suggested_default_data_length + 0x00000000 0x76 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_write_suggested_default_data_length + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_local_p256_public_key + 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_generate_dhkey + 0x00000000 0xb0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_add_device_to_resolving_list + 0x00000000 0x12a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_remove_device_from_resolving_list + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_clear_resolving_list + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_resolving_list_size + 0x00000000 0x66 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_peer_resolvable_address + 0x00000000 0x106 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_local_resolvable_address + 0x00000000 0x106 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_address_resolution_enable + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_resolvable_private_address_timeout + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_maximum_data_length + 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_phy + 0x00000000 0x13e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_receiver_test_v2 + 0x00000000 0xfa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_transmitter_test_v2 + 0x00000000 0x122 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_advertising_set_random_address + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_extended_advertising_parameters + 0x00000000 0x230 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_extended_advertising_data + 0x00000000 0x150 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_extended_scan_response_data + 0x00000000 0x150 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_extended_advertising_enable + 0x00000000 0x10e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_maximum_advertising_data_length + 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_number_of_supported_advertising_sets + 0x00000000 0x66 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_remove_advertising_set + 0x00000000 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_clear_advertising_sets + 0x00000000 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_extended_scan_parameters + 0x00000000 0x124 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_extended_scan_enable + 0x00000000 0x122 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_extended_create_connection + 0x00000000 0x15a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_transmit_power + 0x00000000 0x6e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_read_rf_path_compensation + 0x00000000 0x76 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_write_rf_path_compensation + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_privacy_mode + 0x00000000 0xfa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_generate_dhkey_v2 + 0x00000000 0xd8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .text.hci_le_set_resolvable_private_address_timeout_v2 + 0x00000000 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x791 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x60f ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00000000 0x46 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_connection_parameter_update_req + 0x00000000 0x13e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_connection_parameter_update_resp + 0x00000000 0x188 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_coc_connect + 0x00000000 0x14c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_coc_connect_confirm + 0x00000000 0x18a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_coc_reconf + 0x00000000 0x152 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_coc_reconf_confirm + 0x00000000 0xd0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_coc_disconnect + 0x00000000 0xaa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_coc_flow_control + 0x00000000 0xd2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .text.aci_l2cap_coc_tx_data + 0x00000000 0x10e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_info 0x00000000 0xaa9 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_abbrev 0x00000000 0x1c2 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_aranges + 0x00000000 0x60 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_rnglists + 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x791 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x60f ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_macro 0x00000000 0x46 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_line 0x00000000 0x886 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_str 0x00000000 0xc20f ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .comment 0x00000000 0x44 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .debug_frame 0x00000000 0x18c ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .ARM.attributes + 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .text.Osal_MemCmp + 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x5b ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x94 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x57 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .text.P2PS_STM_App_Update_Char + 0x00000000 0x44 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x89 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0xfb ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1a8 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x45 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0xf5 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x14d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x467 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x6d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x359 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0xe2 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x791 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x60f ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x164 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x15b ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x67 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x28 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x5c6 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .text.P2PS_STM_Init + 0x00000000 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .text.SVCCTL_RegisterCltHandler + 0x00000000 0x14 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x89 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0xfb ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1a8 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x45 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0xf5 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x14d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x467 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x6d ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x359 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0xe2 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0xa6 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x791 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x60f ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x164 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x15b ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x67 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x28 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x5c6 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_GetState + 0x00000000 0x3a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_FwUpgrade + 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_FwDelete + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_UpdateAuthKey + 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_LockAuthKey + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_StoreUsrKey + 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_LoadUsrKey + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_StartWs + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_LockUsrKey + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_UnloadUsrKey + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FUS_ActivateAntiRollback + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_THREAD_Init + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_LLDTESTS_Init + 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_BLE_LLD_Init + 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_ZIGBEE_Init + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FLASH_EraseActivity + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_CONCURRENT_SetMode + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_CONCURRENT_GetNextBleEvtTime + 0x00000000 0x36 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_CONCURRENT_EnableNext_802154_EvtNotification + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FLASH_StoreData + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_FLASH_EraseData + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_RADIO_AllowLowPower + 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_MAC_802_15_4_Init + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_Reinit + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_ExtpaConfig + 0x00000000 0x5e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_SetFlashActivityControl + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_802_15_4_DeInit + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .text.SHCI_C2_SetSystemClock + 0x00000000 0x32 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0xac ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0xb2 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x415 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .text.hci_resume_flow + 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .text.hci_cmd_resp_wait + 0x00000000 0x24 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .text.hci_cmd_resp_release + 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x89 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0xfb ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1a8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x45 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0xf5 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x14d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x467 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x6d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x359 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0xe2 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0xa6 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x791 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x60f ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0xe9 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00000000 0xac ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .text.shci_resume_flow + 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .text.shci_cmd_resp_wait + 0x00000000 0x24 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .text.shci_cmd_resp_release + 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0xe9 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x00000000 0xac ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0xe9 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00000000 0xa6 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .text.TL_BLE_SendAclData + 0x00000000 0x38 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0xe9 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0xac ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0xb2 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x89 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1a8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x45 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0xf5 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x14d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x467 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x6d ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x359 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .text.DbgTraceGetFileName + 0x00000000 0x50 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .rodata 0x00000000 0x6 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .text.DbgTraceBuffer + 0x00000000 0x54 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .text.DbgTraceInit + 0x00000000 0xe ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_info 0x00000000 0x1e6 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_abbrev 0x00000000 0x11b ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_aranges + 0x00000000 0x30 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_rnglists + 0x00000000 0x1f ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x41f ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x89 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0xfb ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1a8 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x45 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0xf5 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x14d ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x467 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x6d ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x359 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x12e ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_line 0x00000000 0xaba ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_str 0x00000000 0xd9a0b ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .comment 0x00000000 0x44 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .debug_frame 0x00000000 0x88 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .ARM.attributes + 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x89 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0xfb ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x1a8 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x45 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0xf5 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x14d ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x467 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x6d ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x359 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00000000 0x12e ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .text.LST_remove_tail + 0x00000000 0x3e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .text.LST_insert_node_after + 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .text.LST_insert_node_before + 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .text.LST_get_size + 0x00000000 0x50 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .text.LST_get_next_node + 0x00000000 0x38 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .text.LST_get_prev_node + 0x00000000 0x38 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x89 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0xfb ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1a8 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x45 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0xf5 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x14d ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x467 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x6d ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x359 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x12e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00000000 0x13a ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .data 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .bss 0x00000000 0x0 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text.CircularQueue_Init + 0x00000000 0x64 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text.CircularQueue_Add + 0x00000000 0x44c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text.CircularQueue_Remove_Copy + 0x00000000 0x1a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text.CircularQueue_Remove + 0x00000000 0x1de ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text.CircularQueue_Sense_Copy + 0x00000000 0x1a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text.CircularQueue_Sense + 0x00000000 0x16a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text.CircularQueue_Empty + 0x00000000 0x26 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .text.CircularQueue_NbElement + 0x00000000 0x18 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_info 0x00000000 0x470 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_abbrev 0x00000000 0x196 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_aranges + 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_rnglists + 0x00000000 0x40 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x41c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0xad8 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x51 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x103 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x6a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1df ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x61 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x2a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x190 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x370 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x58 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x8e ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x185 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x3c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x20 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x10 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x146 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x16 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x29 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x4c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x89 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x22 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0xfb ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1011 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x11f ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x12adb ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x6c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x13c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x350b ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x56 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x3f5 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x286 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x30d ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x17e ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x43 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x236 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x24a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x57b ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x2e ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x100 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1ba ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1cd ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x22c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x55 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0xa5 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x4a ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x381 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x13d ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x141 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x4ff ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x874 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x259 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1bb1 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0xe4 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x5e7 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x328 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x493 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0xf2 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x557 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x433 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x82 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1a8 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x45 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0xf5 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x14d ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x467 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x6d ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x359 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x12e ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_macro 0x00000000 0x1c ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_line 0x00000000 0x1141 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_str 0x00000000 0xd9b34 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .comment 0x00000000 0x44 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .debug_frame 0x00000000 0x150 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .ARM.attributes + 0x00000000 0x34 ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .text 0x00000000 0x0 ./STM32_WPAN/App/app_ble.o + .data 0x00000000 0x0 ./STM32_WPAN/App/app_ble.o + .bss 0x00000000 0x0 ./STM32_WPAN/App/app_ble.o + TAG_OTA_END 0x00000000 0x4 ./STM32_WPAN/App/app_ble.o + TAG_OTA_START 0x00000000 0x4 ./STM32_WPAN/App/app_ble.o + .text.APP_BLE_Get_Server_Connection_Status + 0x00000000 0x18 ./STM32_WPAN/App/app_ble.o + .text.SVCCTL_ResumeUserEventFlow + 0x00000000 0xc ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xad8 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x13c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x22 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x8e ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x51 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x103 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x6a ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1df ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x22 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xfb ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1011 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x11f ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x12adb ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x6c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x350b ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x190 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x5c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x3f5 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x286 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x30d ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x17e ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x43 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x236 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x24a ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x57b ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x100 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1ba ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1cd ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x22c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x55 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xa5 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x381 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x13d ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x141 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x4ff ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x874 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x259 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1bb1 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xe4 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x5e7 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x328 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x493 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xf2 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x557 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x433 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x89 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x82 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1a8 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x45 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xf5 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x14d ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x467 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x6d ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x359 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x61 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x2a ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x43 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x370 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x58 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x8e ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x185 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x3c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x20 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x146 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x29 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x4c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xa0 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xe2 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x791 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x60f ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x164 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x22 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x15b ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x67 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x28 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x13a ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x5c6 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xac ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x23 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0xb2 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x415 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00000000 0x134 ./STM32_WPAN/App/app_ble.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/App/p2p_server_app.o + .text 0x00000000 0x0 ./STM32_WPAN/App/p2p_server_app.o + .data 0x00000000 0x0 ./STM32_WPAN/App/p2p_server_app.o + .bss 0x00000000 0x0 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0xad8 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x13c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x22 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x8e ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x51 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x103 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x6a ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1df ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x22 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0xfb ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1011 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x11f ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x12adb ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x6c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x350b ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x190 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x5c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x3f5 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x286 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x30d ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x17e ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x43 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x236 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x24a ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x57b ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x100 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1ba ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1cd ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x22c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x55 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0xa5 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x381 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x13d ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x141 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x4ff ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x874 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x259 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1bb1 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0xe4 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x5e7 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x328 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x493 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0xf2 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x557 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x433 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x89 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x82 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1a8 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x45 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0xf5 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x14d ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x467 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x6d ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x359 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x61 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x2a ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x43 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x370 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x58 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x8e ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x185 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x3c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x20 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x146 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x29 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x4c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0xa0 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0xe2 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x791 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x60f ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x164 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x22 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x15b ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x67 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x28 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x13a ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x5c6 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x00000000 0x23 ./STM32_WPAN/App/p2p_server_app.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./STM32_WPAN/Target/hw_ipcc.o + .text 0x00000000 0x0 ./STM32_WPAN/Target/hw_ipcc.o + .data 0x00000000 0x0 ./STM32_WPAN/Target/hw_ipcc.o + .bss 0x00000000 0x0 ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_BLE_SendAclData + 0x00000000 0x3c ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_BLE_AclDataAckNot + 0x00000000 0xe ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_BLE_RxEvtNot + 0x00000000 0xe ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_SYS_CmdEvtNot + 0x00000000 0xe ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_SYS_EvtNot + 0x00000000 0xe ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_TRACES_EvtNot + 0x00000000 0xe ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0xad8 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x22 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x8e ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x51 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x103 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x6a ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1df ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x61 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x2a ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x43 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x190 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x370 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x34 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x58 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x8e ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x185 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x3c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x20 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x10 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x146 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x16 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x29 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x4c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x89 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x22 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0xfb ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1011 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x11f ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x12adb ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x6c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x13c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x350b ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x56 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x3f5 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x286 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x30d ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x17e ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x43 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x236 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x24a ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x57b ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x2e ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x100 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1ba ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1cd ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x22c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x55 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0xa5 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x4a ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x381 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x13d ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x141 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x4ff ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x874 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x259 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1bb1 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0xe4 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x5e7 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x328 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x493 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0xf2 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x557 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x433 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x82 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1a8 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x45 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0xf5 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x14d ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x467 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x6d ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x359 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0xa0 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x1c ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0x13a ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x00000000 0xac ./STM32_WPAN/Target/hw_ipcc.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .text 0x00000000 0x0 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .data 0x00000000 0x0 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .bss 0x00000000 0x0 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .text.UTIL_LPM_DeInit + 0x00000000 0xe ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .text.UTIL_LPM_SetStopMode + 0x00000000 0x60 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .text.UTIL_LPM_GetMode + 0x00000000 0x58 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .text.UTIL_LPM_EnterLowPower + 0x00000000 0x6c ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0xad8 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x22 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x8e ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x51 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x103 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x6a ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x1df ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0xfb ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x61 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x2a ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x43 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x34 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x190 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x370 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x16 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x4a ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x34 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x10 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x58 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x8e ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x1c ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x185 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x10 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x3c ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x20 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x89 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x2e ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x2e ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x1c ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x22 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x1011 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x11f ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x12adb ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x6c ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x13c ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x350b ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x56 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x3f5 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x286 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x30d ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x17e ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x43 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x236 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x24a ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x57b ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x2e ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x100 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x1ba ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x1cd ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x4a ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x22c ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x55 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0xa5 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x4a ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x381 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x13d ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x141 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x4ff ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x874 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x259 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x1bb1 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0xe4 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x5e7 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x328 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x493 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0xf2 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x557 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x433 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x82 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x1a8 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x45 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0xf5 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x14d ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x467 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x6d ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x00000000 0x359 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .group 0x00000000 0xc ./Utilities/sequencer/stm32_seq.o + .text 0x00000000 0x0 ./Utilities/sequencer/stm32_seq.o + .data 0x00000000 0x0 ./Utilities/sequencer/stm32_seq.o + .bss 0x00000000 0x0 ./Utilities/sequencer/stm32_seq.o + .text.UTIL_SEQ_Init + 0x00000000 0x94 ./Utilities/sequencer/stm32_seq.o + .text.UTIL_SEQ_DeInit + 0x00000000 0xe ./Utilities/sequencer/stm32_seq.o + .text.UTIL_SEQ_IsRegisteredTask + 0x00000000 0x4c ./Utilities/sequencer/stm32_seq.o + .text.UTIL_SEQ_IsSchedulableTask + 0x00000000 0x64 ./Utilities/sequencer/stm32_seq.o + .text.UTIL_SEQ_IsPauseTask + 0x00000000 0x4c ./Utilities/sequencer/stm32_seq.o + .text.UTIL_SEQ_ClrEvt + 0x00000000 0x40 ./Utilities/sequencer/stm32_seq.o + .text.UTIL_SEQ_IsEvtPend + 0x00000000 0x28 ./Utilities/sequencer/stm32_seq.o + .text.UTIL_SEQ_Idle + 0x00000000 0xe ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0xad8 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x22 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x8e ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x51 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x103 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x6a ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x1df ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0xfb ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x61 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x2a ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x43 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x34 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x190 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x370 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x16 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x4a ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x34 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x10 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x58 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x8e ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x1c ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x185 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x10 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x3c ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x20 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x89 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x2e ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x2e ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x1c ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x22 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x1011 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x11f ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x12adb ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x6c ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x13c ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x350b ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x56 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x3f5 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x286 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x30d ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x17e ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x43 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x236 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x24a ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x57b ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x2e ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x100 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x1ba ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x1cd ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x4a ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x22c ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x55 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0xa5 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x4a ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x381 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x13d ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x141 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x4ff ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x874 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x259 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x1bb1 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0xe4 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x5e7 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x328 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x493 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0xf2 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x557 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x433 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x82 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x1a8 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x45 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0xf5 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x14d ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x467 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x6d ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x359 ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x00000000 0x4c ./Utilities/sequencer/stm32_seq.o + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-exit.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-exit.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-exit.o) + .text.exit 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-exit.o) + .debug_frame 0x00000000 0x28 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-exit.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-exit.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.std 0x00000000 0x6c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.stdio_exit_handler + 0x00000000 0x18 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.cleanup_stdio + 0x00000000 0x40 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.__fp_lock + 0x00000000 0x18 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.__fp_unlock + 0x00000000 0x18 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.global_stdio_init.part.0 + 0x00000000 0x3c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.__sfp_lock_acquire + 0x00000000 0xc /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.__sfp_lock_release + 0x00000000 0xc /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.__sfp 0x00000000 0xa4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.__sinit 0x00000000 0x30 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.__fp_lock_all + 0x00000000 0x1c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text.__fp_unlock_all + 0x00000000 0x1c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .data.__sglue 0x00000000 0xc /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .bss.__sf 0x00000000 0x138 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .bss.__stdio_exit_handler + 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .debug_frame 0x00000000 0x144 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-findfp.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fwalk.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fwalk.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fwalk.o) + .text._fwalk_sglue + 0x00000000 0x3c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fwalk.o) + .debug_frame 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fwalk.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fwalk.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) + .text._printf_r + 0x00000000 0x1c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) + .text.printf 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) + .debug_frame 0x00000000 0x6c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-printf.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .text.__sread 0x00000000 0x22 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .text.__seofread + 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .text.__swrite + 0x00000000 0x38 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .text.__sseek 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .text.__sclose + 0x00000000 0x8 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .debug_frame 0x00000000 0x88 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-stdio.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-vprintf.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-vprintf.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-vprintf.o) + .text.vprintf 0x00000000 0x14 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-vprintf.o) + .text._vprintf_r + 0x00000000 0xa /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-vprintf.o) + .debug_frame 0x00000000 0x30 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-vprintf.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-vprintf.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcmp.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcmp.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcmp.o) + .text.memcmp 0x00000000 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcmp.o) + .debug_frame 0x00000000 0x28 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcmp.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcmp.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memset.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memset.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memset.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strrchr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strrchr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strrchr.o) + .text.strrchr 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strrchr.o) + .debug_frame 0x00000000 0x38 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strrchr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strrchr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-closer.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-closer.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-closer.o) + .text._close_r + 0x00000000 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-closer.o) + .debug_frame 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-closer.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-closer.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) + .text._reclaim_reent + 0x00000000 0xbc /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) + .bss.errno 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) + .debug_frame 0x00000000 0x38 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reent.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-impure.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-impure.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-impure.o) + .data._impure_ptr + 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-impure.o) + .data._impure_data + 0x00000000 0x4c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-impure.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-impure.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lseekr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lseekr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lseekr.o) + .text._lseek_r + 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lseekr.o) + .debug_frame 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lseekr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lseekr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-readr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-readr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-readr.o) + .text._read_r 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-readr.o) + .debug_frame 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-readr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-readr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-writer.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-writer.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-writer.o) + .text._write_r + 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-writer.o) + .debug_frame 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-writer.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-writer.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-errno.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-errno.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-errno.o) + .text.__errno 0x00000000 0xc /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-errno.o) + .debug_frame 0x00000000 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-errno.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-errno.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-init.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-init.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-init.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_init + 0x00000000 0x2 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_init_recursive + 0x00000000 0x2 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_close + 0x00000000 0x2 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_close_recursive + 0x00000000 0x2 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_acquire + 0x00000000 0x2 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_acquire_recursive + 0x00000000 0x2 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_try_acquire + 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_try_acquire_recursive + 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_release + 0x00000000 0x2 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text.__retarget_lock_release_recursive + 0x00000000 0x2 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss.__lock___arc4random_mutex + 0x00000000 0x1 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss.__lock___dd_hash_mutex + 0x00000000 0x1 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss.__lock___tz_mutex + 0x00000000 0x1 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss.__lock___env_recursive_mutex + 0x00000000 0x1 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss.__lock___malloc_recursive_mutex + 0x00000000 0x1 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss.__lock___at_quick_exit_mutex + 0x00000000 0x1 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss.__lock___atexit_recursive_mutex + 0x00000000 0x1 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .bss.__lock___sfp_recursive_mutex + 0x00000000 0x1 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .debug_frame 0x00000000 0xb0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-lock.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcpy-stub.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcpy-stub.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcpy-stub.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strlen.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strlen.o) + .ARM.extab 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strlen.o) + .eh_frame 0x00000000 0x28 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strlen.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-freer.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-freer.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-freer.o) + .text._free_r 0x00000000 0x94 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-freer.o) + .debug_frame 0x00000000 0x38 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-freer.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-freer.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .text.sbrk_aligned + 0x00000000 0x44 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .text._malloc_r + 0x00000000 0x100 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .bss.__malloc_sbrk_start + 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .bss.__malloc_free_list + 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .debug_frame 0x00000000 0x50 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mallocr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mlock.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mlock.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mlock.o) + .text.__malloc_lock + 0x00000000 0xc /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mlock.o) + .text.__malloc_unlock + 0x00000000 0xc /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mlock.o) + .debug_frame 0x00000000 0x30 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mlock.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-mlock.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .text.__sfputc_r + 0x00000000 0x2e /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .text.__sfputs_r + 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .text.__sprint_r + 0x00000000 0x1a /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .rodata._vfprintf_r.str1.1 + 0x00000000 0x11 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .text._vfprintf_r + 0x00000000 0x230 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .text.vfprintf + 0x00000000 0x14 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .debug_frame 0x00000000 0xa8 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + .text._printf_common + 0x00000000 0xda /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + .rodata._printf_i.str1.1 + 0x00000000 0x22 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + .text._printf_i + 0x00000000 0x23c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + .debug_frame 0x00000000 0x60 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-nano-vfprintf_i.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + .text.__sflush_r + 0x00000000 0x108 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + .text._fflush_r + 0x00000000 0x50 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + .text.fflush 0x00000000 0x28 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + .debug_frame 0x00000000 0x5c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fflush.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) + .text.__sfvwrite_r + 0x00000000 0x298 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) + .debug_frame 0x00000000 0x3c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fvwrite.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wbuf.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wbuf.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wbuf.o) + .text.__swbuf_r + 0x00000000 0x7c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wbuf.o) + .text.__swbuf 0x00000000 0x10 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wbuf.o) + .debug_frame 0x00000000 0x40 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wbuf.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wbuf.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wsetup.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wsetup.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wsetup.o) + .text.__swsetup_r + 0x00000000 0xac /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wsetup.o) + .debug_frame 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wsetup.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-wsetup.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memmove.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memmove.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memmove.o) + .text.memmove 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memmove.o) + .debug_frame 0x00000000 0x28 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memmove.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memmove.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strchr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strchr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strchr.o) + .text.strchr 0x00000000 0x1a /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strchr.o) + .debug_frame 0x00000000 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strchr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strchr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-sbrkr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-sbrkr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-sbrkr.o) + .text._sbrk_r 0x00000000 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-sbrkr.o) + .debug_frame 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-sbrkr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-sbrkr.o) + .text 0x00000000 0xa0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memchr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memchr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memchr.o) + .ARM.extab 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memchr.o) + .ARM.exidx 0x00000000 0x8 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memchr.o) + .eh_frame 0x00000000 0x50 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memchr.o) + .ARM.attributes + 0x00000000 0x1c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memchr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reallocr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reallocr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reallocr.o) + .text._realloc_r + 0x00000000 0x5c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reallocr.o) + .debug_frame 0x00000000 0x3c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reallocr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-reallocr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) + .text.__swhatbuf_r + 0x00000000 0x4c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) + .text.__smakebuf_r + 0x00000000 0x78 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) + .debug_frame 0x00000000 0x58 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-makebuf.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fstatr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fstatr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fstatr.o) + .text._fstat_r + 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fstatr.o) + .debug_frame 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fstatr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-fstatr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-isattyr.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-isattyr.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-isattyr.o) + .text._isatty_r + 0x00000000 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-isattyr.o) + .debug_frame 0x00000000 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-isattyr.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-isattyr.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-msizer.o) + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-msizer.o) + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-msizer.o) + .text._malloc_usable_size_r + 0x00000000 0x10 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-msizer.o) + .debug_frame 0x00000000 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-msizer.o) + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-msizer.o) + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtend.o + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtend.o + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtend.o + .rodata 0x00000000 0x24 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtend.o + .eh_frame 0x00000000 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtend.o + .ARM.attributes + 0x00000000 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtend.o + .text 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtn.o + .data 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtn.o + .bss 0x00000000 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtn.o + +Memory Configuration + +Name Origin Length Attributes +FLASH 0x08000000 0x00080000 xr +RAM 0x20000008 0x0002fff8 xrw +RAM_SHARED 0x20030000 0x00002800 xrw +*default* 0x00000000 0xffffffff + +Linker script and memory map + +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crti.o +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/crt0.o +LOAD ./Core/Src/app_debug.o +LOAD ./Core/Src/app_entry.o +LOAD ./Core/Src/hw_timerserver.o +LOAD ./Core/Src/main.o +LOAD ./Core/Src/stm32_lpm_if.o +LOAD ./Core/Src/stm32wbxx_hal_msp.o +LOAD ./Core/Src/stm32wbxx_it.o +LOAD ./Core/Src/syscalls.o +LOAD ./Core/Src/sysmem.o +LOAD ./Core/Src/system_stm32wbxx.o +LOAD ./Core/Startup/startup_stm32wb55cgux.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o +LOAD ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o +LOAD ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o +LOAD ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o +LOAD ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o +LOAD ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o +LOAD ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o +LOAD ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o +LOAD ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o +LOAD ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o +LOAD ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o +LOAD ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o +LOAD ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o +LOAD ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o +LOAD ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o +LOAD ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o +LOAD ./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o +LOAD ./Middlewares/ST/STM32_WPAN/utilities/otp.o +LOAD ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o +LOAD ./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o +LOAD ./STM32_WPAN/App/app_ble.o +LOAD ./STM32_WPAN/App/p2p_server_app.o +LOAD ./STM32_WPAN/Target/hw_ipcc.o +LOAD ./Utilities/lpm/tiny_lpm/stm32_lpm.o +LOAD ./Utilities/sequencer/stm32_seq.o +START GROUP +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libm.a +END GROUP +START GROUP +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a +END GROUP +START GROUP +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libnosys.a +END GROUP +START GROUP +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libnosys.a +END GROUP +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtend.o +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtn.o + 0x20030000 _estack = (ORIGIN (RAM) + LENGTH (RAM)) + 0x00000200 _Min_Heap_Size = 0x200 + 0x00000400 _Min_Stack_Size = 0x400 + +.isr_vector 0x08000000 0x13c + 0x08000000 . = ALIGN (0x4) + *(.isr_vector) + .isr_vector 0x08000000 0x13c ./Core/Startup/startup_stm32wb55cgux.o + 0x08000000 g_pfnVectors + 0x0800013c . = ALIGN (0x4) + +.text 0x0800013c 0x7a78 + 0x0800013c . = ALIGN (0x4) + *(.text) + .text 0x0800013c 0x40 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + .text 0x0800017c 0x10 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strlen.o) + 0x0800017c strlen + *(.text*) + .text.APPD_EnableCPU2 + 0x0800018c 0x38 ./Core/Src/app_debug.o + 0x0800018c APPD_EnableCPU2 + .text.LL_C2_PWR_SetPowerMode + 0x080001c4 0x2c ./Core/Src/app_entry.o + .text.LL_EXTI_EnableIT_32_63 + 0x080001f0 0x28 ./Core/Src/app_entry.o + .text.LL_RCC_HSE_SetCapacitorTuning + 0x08000218 0x3c ./Core/Src/app_entry.o + .text.LL_RCC_SetClkAfterWakeFromStop + 0x08000254 0x28 ./Core/Src/app_entry.o + .text.LL_DBGMCU_GetDeviceID + 0x0800027c 0x1c ./Core/Src/app_entry.o + .text.LL_DBGMCU_GetRevisionID + 0x08000298 0x1c ./Core/Src/app_entry.o + .text.LL_LPM_EnableSleep + 0x080002b4 0x20 ./Core/Src/app_entry.o + .text.LL_RTC_EnableWriteProtection + 0x080002d4 0x1a ./Core/Src/app_entry.o + .text.LL_RTC_DisableWriteProtection + 0x080002ee 0x20 ./Core/Src/app_entry.o + .text.LL_RTC_WAKEUP_SetClock + 0x0800030e 0x26 ./Core/Src/app_entry.o + .text.MX_APPE_Config + 0x08000334 0x1c ./Core/Src/app_entry.o + 0x08000334 MX_APPE_Config + .text.MX_APPE_Init + 0x08000350 0x20 ./Core/Src/app_entry.o + 0x08000350 MX_APPE_Init + .text.Init_Smps + 0x08000370 0xe ./Core/Src/app_entry.o + 0x08000370 Init_Smps + .text.Init_Exti + 0x0800037e 0xe ./Core/Src/app_entry.o + 0x0800037e Init_Exti + .text.Reset_Device + 0x0800038c 0xe ./Core/Src/app_entry.o + .text.Config_HSE + 0x0800039a 0x28 ./Core/Src/app_entry.o + .text.System_Init + 0x080003c2 0x14 ./Core/Src/app_entry.o + *fill* 0x080003d6 0x2 + .text.Init_Rtc + 0x080003d8 0x20 ./Core/Src/app_entry.o + .text.SystemPower_Config + 0x080003f8 0x1a ./Core/Src/app_entry.o + *fill* 0x08000412 0x2 + .text.appe_Tl_Init + 0x08000414 0x6c ./Core/Src/app_entry.o + .text.APPE_SysStatusNot + 0x08000480 0x16 ./Core/Src/app_entry.o + *fill* 0x08000496 0x2 + .text.APPE_SysUserEvtRx + 0x08000498 0x68 ./Core/Src/app_entry.o + .text.APPE_SysEvtError + 0x08000500 0x22 ./Core/Src/app_entry.o + .text.APPE_SysEvtReadyProcessing + 0x08000522 0x88 ./Core/Src/app_entry.o + .text.HAL_Delay + 0x080005aa 0x4a ./Core/Src/app_entry.o + 0x080005aa HAL_Delay + .text.MX_APPE_Process + 0x080005f4 0x10 ./Core/Src/app_entry.o + 0x080005f4 MX_APPE_Process + .text.UTIL_SEQ_Idle + 0x08000604 0xe ./Core/Src/app_entry.o + 0x08000604 UTIL_SEQ_Idle + .text.shci_notify_asynch_evt + 0x08000612 0x18 ./Core/Src/app_entry.o + 0x08000612 shci_notify_asynch_evt + .text.shci_cmd_resp_release + 0x0800062a 0x16 ./Core/Src/app_entry.o + 0x0800062a shci_cmd_resp_release + .text.shci_cmd_resp_wait + 0x08000640 0x16 ./Core/Src/app_entry.o + 0x08000640 shci_cmd_resp_wait + *fill* 0x08000656 0x2 + .text.LL_EXTI_EnableIT_0_31 + 0x08000658 0x28 ./Core/Src/hw_timerserver.o + .text.LL_EXTI_EnableRisingTrig_0_31 + 0x08000680 0x24 ./Core/Src/hw_timerserver.o + .text.ReadRtcSsrValue + 0x080006a4 0x40 ./Core/Src/hw_timerserver.o + .text.LinkTimerAfter + 0x080006e4 0x8c ./Core/Src/hw_timerserver.o + .text.LinkTimerBefore + 0x08000770 0xc0 ./Core/Src/hw_timerserver.o + .text.linkTimer + 0x08000830 0x154 ./Core/Src/hw_timerserver.o + .text.UnlinkTimer + 0x08000984 0x108 ./Core/Src/hw_timerserver.o + .text.ReturnTimeElapsed + 0x08000a8c 0x80 ./Core/Src/hw_timerserver.o + .text.RestartWakeupCounter + 0x08000b0c 0xb0 ./Core/Src/hw_timerserver.o + .text.RescheduleTimerList + 0x08000bbc 0x134 ./Core/Src/hw_timerserver.o + .text.HW_TS_Init + 0x08000cf0 0x1b4 ./Core/Src/hw_timerserver.o + 0x08000cf0 HW_TS_Init + .text.HW_TS_Create + 0x08000ea4 0xf4 ./Core/Src/hw_timerserver.o + 0x08000ea4 HW_TS_Create + .text.HW_TS_Stop + 0x08000f98 0x108 ./Core/Src/hw_timerserver.o + 0x08000f98 HW_TS_Stop + .text.HW_TS_Start + 0x080010a0 0x10c ./Core/Src/hw_timerserver.o + 0x080010a0 HW_TS_Start + .text.LL_RCC_LSE_SetDriveCapability + 0x080011ac 0x2c ./Core/Src/main.o + .text.LL_AHB2_GRP1_EnableClock + 0x080011d8 0x32 ./Core/Src/main.o + *fill* 0x0800120a 0x2 + .text.main 0x0800120c 0x4c ./Core/Src/main.o + 0x0800120c main + .text.SystemClock_Config + 0x08001258 0xb8 ./Core/Src/main.o + 0x08001258 SystemClock_Config + .text.PeriphCommonClock_Config + 0x08001310 0x40 ./Core/Src/main.o + 0x08001310 PeriphCommonClock_Config + .text.MX_I2C1_Init + 0x08001350 0x7c ./Core/Src/main.o + .text.MX_IPCC_Init + 0x080013cc 0x28 ./Core/Src/main.o + .text.MX_RF_Init + 0x080013f4 0xe ./Core/Src/main.o + *fill* 0x08001402 0x2 + .text.MX_RTC_Init + 0x08001404 0xc0 ./Core/Src/main.o + .text.MX_GPIO_Init + 0x080014c4 0x58 ./Core/Src/main.o + .text.Error_Handler + 0x0800151c 0xc ./Core/Src/main.o + 0x0800151c Error_Handler + .text.LL_RCC_EnableRTC + 0x08001528 0x22 ./Core/Src/stm32wbxx_hal_msp.o + .text.LL_AHB2_GRP1_EnableClock + 0x0800154a 0x32 ./Core/Src/stm32wbxx_hal_msp.o + .text.LL_AHB3_GRP1_EnableClock + 0x0800157c 0x32 ./Core/Src/stm32wbxx_hal_msp.o + .text.LL_APB1_GRP1_EnableClock + 0x080015ae 0x32 ./Core/Src/stm32wbxx_hal_msp.o + .text.HAL_MspInit + 0x080015e0 0x20 ./Core/Src/stm32wbxx_hal_msp.o + 0x080015e0 HAL_MspInit + .text.HAL_I2C_MspInit + 0x08001600 0x8c ./Core/Src/stm32wbxx_hal_msp.o + 0x08001600 HAL_I2C_MspInit + .text.HAL_IPCC_MspInit + 0x0800168c 0x48 ./Core/Src/stm32wbxx_hal_msp.o + 0x0800168c HAL_IPCC_MspInit + .text.HAL_RTC_MspInit + 0x080016d4 0x58 ./Core/Src/stm32wbxx_hal_msp.o + 0x080016d4 HAL_RTC_MspInit + .text.NMI_Handler + 0x0800172c 0x8 ./Core/Src/stm32wbxx_it.o + 0x0800172c NMI_Handler + .text.HardFault_Handler + 0x08001734 0x8 ./Core/Src/stm32wbxx_it.o + 0x08001734 HardFault_Handler + .text.MemManage_Handler + 0x0800173c 0x8 ./Core/Src/stm32wbxx_it.o + 0x0800173c MemManage_Handler + .text.BusFault_Handler + 0x08001744 0x8 ./Core/Src/stm32wbxx_it.o + 0x08001744 BusFault_Handler + .text.UsageFault_Handler + 0x0800174c 0x8 ./Core/Src/stm32wbxx_it.o + 0x0800174c UsageFault_Handler + .text.SVC_Handler + 0x08001754 0xe ./Core/Src/stm32wbxx_it.o + 0x08001754 SVC_Handler + .text.DebugMon_Handler + 0x08001762 0xe ./Core/Src/stm32wbxx_it.o + 0x08001762 DebugMon_Handler + .text.PendSV_Handler + 0x08001770 0xe ./Core/Src/stm32wbxx_it.o + 0x08001770 PendSV_Handler + .text.SysTick_Handler + 0x0800177e 0xc ./Core/Src/stm32wbxx_it.o + 0x0800177e SysTick_Handler + .text.IPCC_C1_RX_IRQHandler + 0x0800178a 0xc ./Core/Src/stm32wbxx_it.o + 0x0800178a IPCC_C1_RX_IRQHandler + .text.IPCC_C1_TX_IRQHandler + 0x08001796 0xc ./Core/Src/stm32wbxx_it.o + 0x08001796 IPCC_C1_TX_IRQHandler + .text.HSEM_IRQHandler + 0x080017a2 0xc ./Core/Src/stm32wbxx_it.o + 0x080017a2 HSEM_IRQHandler + *fill* 0x080017ae 0x2 + .text.SystemInit + 0x080017b0 0xa4 ./Core/Src/system_stm32wbxx.o + 0x080017b0 SystemInit + .text.data_initializers + 0x08001854 0x18 ./Core/Startup/startup_stm32wb55cgux.o + .text.Reset_Handler + 0x0800186c 0x58 ./Core/Startup/startup_stm32wb55cgux.o + 0x0800186c Reset_Handler + .text.Default_Handler + 0x080018c4 0x2 ./Core/Startup/startup_stm32wb55cgux.o + 0x080018c4 RTC_Alarm_IRQHandler + 0x080018c4 EXTI2_IRQHandler + 0x080018c4 TIM1_CC_IRQHandler + 0x080018c4 TSC_IRQHandler + 0x080018c4 USB_HP_IRQHandler + 0x080018c4 EXTI3_IRQHandler + 0x080018c4 LPTIM2_IRQHandler + 0x080018c4 I2C3_ER_IRQHandler + 0x080018c4 EXTI0_IRQHandler + 0x080018c4 FPU_IRQHandler + 0x080018c4 TIM1_UP_TIM16_IRQHandler + 0x080018c4 AES1_IRQHandler + 0x080018c4 SPI1_IRQHandler + 0x080018c4 PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler + 0x080018c4 DMA2_Channel2_IRQHandler + 0x080018c4 DMA1_Channel4_IRQHandler + 0x080018c4 ADC1_IRQHandler + 0x080018c4 PKA_IRQHandler + 0x080018c4 DMA1_Channel7_IRQHandler + 0x080018c4 LCD_IRQHandler + 0x080018c4 DMA2_Channel1_IRQHandler + 0x080018c4 QUADSPI_IRQHandler + 0x080018c4 I2C1_EV_IRQHandler + 0x080018c4 DMAMUX1_OVR_IRQHandler + 0x080018c4 DMA1_Channel6_IRQHandler + 0x080018c4 DMA2_Channel4_IRQHandler + 0x080018c4 RCC_IRQHandler + 0x080018c4 DMA1_Channel1_IRQHandler + 0x080018c4 Default_Handler + 0x080018c4 DMA2_Channel7_IRQHandler + 0x080018c4 EXTI15_10_IRQHandler + 0x080018c4 C2SEV_PWR_C2H_IRQHandler + 0x080018c4 AES2_IRQHandler + 0x080018c4 I2C3_EV_IRQHandler + 0x080018c4 EXTI9_5_IRQHandler + 0x080018c4 RTC_WKUP_IRQHandler + 0x080018c4 PVD_PVM_IRQHandler + 0x080018c4 SPI2_IRQHandler + 0x080018c4 DMA2_Channel5_IRQHandler + 0x080018c4 CRS_IRQHandler + 0x080018c4 DMA1_Channel5_IRQHandler + 0x080018c4 USB_LP_IRQHandler + 0x080018c4 EXTI4_IRQHandler + 0x080018c4 RNG_IRQHandler + 0x080018c4 TIM1_TRG_COM_TIM17_IRQHandler + 0x080018c4 TAMP_STAMP_LSECSS_IRQHandler + 0x080018c4 DMA1_Channel3_IRQHandler + 0x080018c4 COMP_IRQHandler + 0x080018c4 WWDG_IRQHandler + 0x080018c4 LPUART1_IRQHandler + 0x080018c4 DMA2_Channel6_IRQHandler + 0x080018c4 TIM2_IRQHandler + 0x080018c4 TIM1_BRK_IRQHandler + 0x080018c4 EXTI1_IRQHandler + 0x080018c4 DMA1_Channel2_IRQHandler + 0x080018c4 FLASH_IRQHandler + 0x080018c4 USART1_IRQHandler + 0x080018c4 I2C1_ER_IRQHandler + 0x080018c4 LPTIM1_IRQHandler + 0x080018c4 SAI1_IRQHandler + 0x080018c4 DMA2_Channel3_IRQHandler + *fill* 0x080018c6 0x2 + .text.HAL_Init + 0x080018c8 0x40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x080018c8 HAL_Init + .text.HAL_InitTick + 0x08001908 0x74 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x08001908 HAL_InitTick + .text.HAL_IncTick + 0x0800197c 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x0800197c HAL_IncTick + .text.HAL_GetTick + 0x080019a4 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x080019a4 HAL_GetTick + .text.HAL_GetTickPrio + 0x080019bc 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x080019bc HAL_GetTickPrio + .text.HAL_GetTickFreq + 0x080019d4 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x080019d4 HAL_GetTickFreq + .text.__NVIC_SetPriorityGrouping + 0x080019ec 0x48 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_GetPriorityGrouping + 0x08001a34 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_EnableIRQ + 0x08001a50 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_DisableIRQ + 0x08001a8c 0x48 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_SetPendingIRQ + 0x08001ad4 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_ClearPendingIRQ + 0x08001b10 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.__NVIC_SetPriority + 0x08001b4c 0x54 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.NVIC_EncodePriority + 0x08001ba0 0x66 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + *fill* 0x08001c06 0x2 + .text.SysTick_Config + 0x08001c08 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .text.HAL_NVIC_SetPriorityGrouping + 0x08001c4c 0x16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + 0x08001c4c HAL_NVIC_SetPriorityGrouping + .text.HAL_NVIC_SetPriority + 0x08001c62 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + 0x08001c62 HAL_NVIC_SetPriority + .text.HAL_NVIC_EnableIRQ + 0x08001c96 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + 0x08001c96 HAL_NVIC_EnableIRQ + .text.HAL_NVIC_DisableIRQ + 0x08001cb2 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + 0x08001cb2 HAL_NVIC_DisableIRQ + .text.HAL_SYSTICK_Config + 0x08001cce 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + 0x08001cce HAL_SYSTICK_Config + .text.HAL_NVIC_SetPendingIRQ + 0x08001ce6 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + 0x08001ce6 HAL_NVIC_SetPendingIRQ + .text.HAL_NVIC_ClearPendingIRQ + 0x08001d02 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + 0x08001d02 HAL_NVIC_ClearPendingIRQ + *fill* 0x08001d1e 0x2 + .text.HAL_GPIO_Init + 0x08001d20 0x2e0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + 0x08001d20 HAL_GPIO_Init + .text.HAL_GPIO_WritePin + 0x08002000 0x30 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + 0x08002000 HAL_GPIO_WritePin + .text.HAL_HSEM_IRQHandler + 0x08002030 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + 0x08002030 HAL_HSEM_IRQHandler + .text.HAL_HSEM_FreeCallback + 0x08002064 0x14 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + 0x08002064 HAL_HSEM_FreeCallback + .text.HAL_I2C_Init + 0x08002078 0x136 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + 0x08002078 HAL_I2C_Init + .text.HAL_I2CEx_ConfigAnalogFilter + 0x080021ae 0x96 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + 0x080021ae HAL_I2CEx_ConfigAnalogFilter + .text.HAL_I2CEx_ConfigDigitalFilter + 0x08002244 0x98 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + 0x08002244 HAL_I2CEx_ConfigDigitalFilter + .text.HAL_IPCC_Init + 0x080022dc 0x64 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + 0x080022dc HAL_IPCC_Init + .text.HAL_IPCC_RxCallback + 0x08002340 0x1a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + 0x08002340 HAL_IPCC_RxCallback + .text.HAL_IPCC_TxCallback + 0x0800235a 0x1a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + 0x0800235a HAL_IPCC_TxCallback + .text.IPCC_SetDefaultCallbacks + 0x08002374 0x4c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + 0x08002374 IPCC_SetDefaultCallbacks + .text.IPCC_Reset_Register + 0x080023c0 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + 0x080023c0 IPCC_Reset_Register + .text.HAL_PWR_EnableBkUpAccess + 0x080023e8 0x20 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + 0x080023e8 HAL_PWR_EnableBkUpAccess + .text.HAL_PWREx_GetVoltageRange + 0x08002408 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + 0x08002408 HAL_PWREx_GetVoltageRange + .text.HAL_PWREx_EnterSTOP2Mode + 0x08002424 0x58 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + 0x08002424 HAL_PWREx_EnterSTOP2Mode + .text.LL_RCC_HSE_IsEnabledDiv2 + 0x0800247c 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSE_Enable + 0x080024a0 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSE_Disable + 0x080024be 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSE_IsReady + 0x080024dc 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSI_Enable + 0x08002500 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSI_Disable + 0x0800251e 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSI_IsReady + 0x0800253c 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSI_SetCalibTrimming + 0x08002560 0x2a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSI48_Enable + 0x0800258a 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSI48_Disable + 0x080025ac 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_HSI48_IsReady + 0x080025ce 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSE_Enable + 0x080025f2 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSE_Disable + 0x08002614 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSE_EnableBypass + 0x08002636 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSE_DisableBypass + 0x08002658 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSE_IsReady + 0x0800267a 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSI1_Enable + 0x0800269e 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSI1_Disable + 0x080026c0 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSI1_IsReady + 0x080026e2 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSI2_Enable + 0x08002706 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSI2_Disable + 0x08002728 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSI2_IsReady + 0x0800274a 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSI2_SetTrimming + 0x0800276e 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_MSI_Enable + 0x0800279c 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_MSI_Disable + 0x080027ba 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_MSI_IsReady + 0x080027d8 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_MSI_SetRange + 0x080027fa 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_MSI_GetRange + 0x08002822 0x2a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_MSI_SetCalibTrimming + 0x0800284c 0x2a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_SetSysClkSource + 0x08002876 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_GetSysClkSource + 0x0800289e 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_SetAHBPrescaler + 0x080028b6 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_C2_RCC_SetAHBPrescaler + 0x080028de 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_SetAHB4Prescaler + 0x0800290a 0x2e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_SetAPB1Prescaler + 0x08002938 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_SetAPB2Prescaler + 0x08002960 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_GetAHBPrescaler + 0x08002988 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_GetAHB4Prescaler + 0x080029a0 0x1c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_PLL_Enable + 0x080029bc 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_PLL_Disable + 0x080029da 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_PLL_IsReady + 0x080029f8 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_PLL_GetN + 0x08002a1c 0x1a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_PLL_GetR + 0x08002a36 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_PLL_GetDivider + 0x08002a4e 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_PLL_GetMainSource + 0x08002a66 0x18 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_IsActiveFlag_HPRE + 0x08002a7e 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_IsActiveFlag_C2HPRE + 0x08002aa2 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_IsActiveFlag_SHDHPRE + 0x08002ac8 0x26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_IsActiveFlag_PPRE1 + 0x08002aee 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_IsActiveFlag_PPRE2 + 0x08002b12 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + *fill* 0x08002b36 0x2 + .text.HAL_RCC_OscConfig + 0x08002b38 0x6e8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + 0x08002b38 HAL_RCC_OscConfig + .text.HAL_RCC_ClockConfig + 0x08003220 0x280 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + 0x08003220 HAL_RCC_ClockConfig + .text.HAL_RCC_GetSysClockFreq + 0x080034a0 0xd8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + 0x080034a0 HAL_RCC_GetSysClockFreq + .text.HAL_RCC_GetHCLKFreq + 0x08003578 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + 0x08003578 HAL_RCC_GetHCLKFreq + .text.RCC_SetFlashLatencyFromMSIRange + 0x080035a0 0x70 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.RCC_SetFlashLatency + 0x08003610 0xf8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .text.LL_RCC_LSE_IsEnabled + 0x08003708 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_LSE_IsReady + 0x0800372c 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetRFWKPClockSource + 0x08003750 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetSMPSClockSource + 0x0800377c 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetSMPSPrescaler + 0x080037a4 0x28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetUSARTClockSource + 0x080037cc 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetLPUARTClockSource + 0x080037f8 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetI2CClockSource + 0x08003824 0x3a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetLPTIMClockSource + 0x0800385e 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetSAIClockSource + 0x08003892 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetRNGClockSource + 0x080038be 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetCLK48ClockSource + 0x080038ea 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetUSBClockSource + 0x08003916 0x16 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetADCClockSource + 0x0800392c 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_SetRTCClockSource + 0x08003958 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_GetRTCClockSource + 0x08003984 0x1a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_ForceBackupDomainReset + 0x0800399e 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_ReleaseBackupDomainReset + 0x080039c0 0x22 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLLSAI1_Enable + 0x080039e2 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLLSAI1_Disable + 0x08003a00 0x1e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.LL_RCC_PLLSAI1_IsReady + 0x08003a1e 0x24 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RCCEx_PeriphCLKConfig + 0x08003a42 0x2ec ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + 0x08003a42 HAL_RCCEx_PeriphCLKConfig + .text.RCCEx_PLLSAI1_ConfigNP + 0x08003d2e 0xb6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.RCCEx_PLLSAI1_ConfigNQ + 0x08003de4 0xb6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.RCCEx_PLLSAI1_ConfigNR + 0x08003e9a 0xb6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .text.HAL_RTC_Init + 0x08003f50 0x110 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + 0x08003f50 HAL_RTC_Init + .text.HAL_RTC_SetTime + 0x08004060 0x13e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + 0x08004060 HAL_RTC_SetTime + .text.HAL_RTC_SetDate + 0x0800419e 0x112 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + 0x0800419e HAL_RTC_SetDate + .text.HAL_RTC_WaitForSynchro + 0x080042b0 0x4c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + 0x080042b0 HAL_RTC_WaitForSynchro + .text.RTC_EnterInitMode + 0x080042fc 0x70 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + 0x080042fc RTC_EnterInitMode + .text.RTC_ExitInitMode + 0x0800436c 0x4c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + 0x0800436c RTC_ExitInitMode + .text.RTC_ByteToBcd2 + 0x080043b8 0x3c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + 0x080043b8 RTC_ByteToBcd2 + .text.aci_gap_set_non_discoverable + 0x080043f4 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + 0x080043f4 aci_gap_set_non_discoverable + .text.aci_gap_set_discoverable + 0x0800443c 0x1f4 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + 0x0800443c aci_gap_set_discoverable + .text.aci_gap_set_io_capability + 0x08004630 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + 0x08004630 aci_gap_set_io_capability + .text.aci_gap_set_authentication_requirement + 0x080046d8 0x188 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + 0x080046d8 aci_gap_set_authentication_requirement + .text.aci_gap_init + 0x08004860 0x15a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + 0x08004860 aci_gap_init + .text.aci_gap_update_adv_data + 0x080049ba 0xe4 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + 0x080049ba aci_gap_update_adv_data + .text.aci_gap_configure_filter_accept_list + 0x08004a9e 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + 0x08004a9e aci_gap_configure_filter_accept_list + .text.aci_gatt_init + 0x08004ae6 0x4a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + 0x08004ae6 aci_gatt_init + .text.aci_gatt_add_service + 0x08004b30 0x1ac ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + 0x08004b30 aci_gatt_add_service + .text.aci_gatt_add_char + 0x08004cdc 0x210 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + 0x08004cdc aci_gatt_add_char + .text.aci_gatt_update_char_value + 0x08004eec 0x152 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + 0x08004eec aci_gatt_update_char_value + .text.aci_gatt_confirm_indication + 0x0800503e 0xaa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + 0x0800503e aci_gatt_confirm_indication + .text.aci_hal_write_config_data + 0x080050e8 0x10a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + 0x080050e8 aci_hal_write_config_data + .text.aci_hal_set_tx_power_level + 0x080051f2 0xce ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + 0x080051f2 aci_hal_set_tx_power_level + .text.aci_hal_set_radio_activity_mask + 0x080052c0 0xa8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + 0x080052c0 aci_hal_set_radio_activity_mask + .text.hci_reset + 0x08005368 0x48 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + 0x08005368 hci_reset + .text.hci_le_read_phy + 0x080053b0 0xfc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + 0x080053b0 hci_le_read_phy + .text.hci_le_set_default_phy + 0x080054ac 0xfa ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + 0x080054ac hci_le_set_default_phy + .text.Osal_MemCpy + 0x080055a6 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + 0x080055a6 Osal_MemCpy + .text.Osal_MemSet + 0x080055c6 0x20 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + 0x080055c6 Osal_MemSet + *fill* 0x080055e6 0x2 + .text.PeerToPeer_Event_Handler + 0x080055e8 0xc8 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .text.P2PS_STM_Init + 0x080056b0 0x140 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + 0x080056b0 P2PS_STM_Init + .text.BAS_Init + 0x080057f0 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x080057f0 BAS_Init + .text.BLS_Init + 0x080057fe 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x080057fe BLS_Init + .text.CRS_STM_Init + 0x0800580c 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x0800580c CRS_STM_Init + .text.DIS_Init + 0x0800581a 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x0800581a DIS_Init + .text.EDS_STM_Init + 0x08005828 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005828 EDS_STM_Init + .text.HIDS_Init + 0x08005836 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005836 HIDS_Init + .text.HRS_Init + 0x08005844 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005844 HRS_Init + .text.HTS_Init + 0x08005852 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005852 HTS_Init + .text.IAS_Init + 0x08005860 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005860 IAS_Init + .text.LLS_Init + 0x0800586e 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x0800586e LLS_Init + .text.TPS_Init + 0x0800587c 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x0800587c TPS_Init + .text.MOTENV_STM_Init + 0x0800588a 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x0800588a MOTENV_STM_Init + .text.ZDD_STM_Init + 0x08005898 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005898 ZDD_STM_Init + .text.OTAS_STM_Init + 0x080058a6 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x080058a6 OTAS_STM_Init + .text.MESH_Init + 0x080058b4 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x080058b4 MESH_Init + .text.BVOPUS_STM_Init + 0x080058c2 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x080058c2 BVOPUS_STM_Init + .text.SVCCTL_InitCustomSvc + 0x080058d0 0xe ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x080058d0 SVCCTL_InitCustomSvc + *fill* 0x080058de 0x2 + .text.SVCCTL_Init + 0x080058e0 0x20 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x080058e0 SVCCTL_Init + .text.SVCCTL_SvcInit + 0x08005900 0x50 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005900 SVCCTL_SvcInit + .text.SVCCTL_RegisterSvcHandler + 0x08005950 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005950 SVCCTL_RegisterSvcHandler + .text.SVCCTL_UserEvtRx + 0x08005984 0xa8 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x08005984 SVCCTL_UserEvtRx + .text.SHCI_C2_BLE_Init + 0x08005a2c 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + 0x08005a2c SHCI_C2_BLE_Init + .text.SHCI_C2_DEBUG_Init + 0x08005a5a 0x2e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + 0x08005a5a SHCI_C2_DEBUG_Init + .text.SHCI_C2_Config + 0x08005a88 0x2a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + 0x08005a88 SHCI_C2_Config + *fill* 0x08005ab2 0x2 + .text.SHCI_GetWirelessFwInfo + 0x08005ab4 0x15c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + 0x08005ab4 SHCI_GetWirelessFwInfo + .text.hci_init + 0x08005c10 0x38 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + 0x08005c10 hci_init + .text.hci_user_evt_proc + 0x08005c48 0x9c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + 0x08005c48 hci_user_evt_proc + .text.hci_send_req + 0x08005ce4 0x108 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + 0x08005ce4 hci_send_req + .text.TlInit 0x08005dec 0x60 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .text.SendCmd 0x08005e4c 0x4c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .text.NotifyCmdStatus + 0x08005e98 0x40 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .text.TlEvtReceived + 0x08005ed8 0x48 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .text.hci_register_io_bus + 0x08005f20 0x28 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + 0x08005f20 hci_register_io_bus + .text.shci_init + 0x08005f48 0x38 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + 0x08005f48 shci_init + .text.shci_user_evt_proc + 0x08005f80 0x9c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + 0x08005f80 shci_user_evt_proc + .text.shci_send + 0x0800601c 0x84 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + 0x0800601c shci_send + .text.TlInit 0x080060a0 0x64 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .text.Cmd_SetStatus + 0x08006104 0x50 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .text.TlCmdEvtReceived + 0x08006154 0x16 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + *fill* 0x0800616a 0x2 + .text.TlUserEvtReceived + 0x0800616c 0x24 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .text.shci_register_io_bus + 0x08006190 0x28 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + 0x08006190 shci_register_io_bus + .text.TL_Enable + 0x080061b8 0xc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x080061b8 TL_Enable + .text.TL_Init 0x080061c4 0x74 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x080061c4 TL_Init + .text.TL_BLE_Init + 0x08006238 0x68 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x08006238 TL_BLE_Init + .text.TL_BLE_SendCmd + 0x080062a0 0x38 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x080062a0 TL_BLE_SendCmd + .text.HW_IPCC_BLE_RxEvtNot + 0x080062d8 0x60 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x080062d8 HW_IPCC_BLE_RxEvtNot + .text.HW_IPCC_BLE_AclDataAckNot + 0x08006338 0x1c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x08006338 HW_IPCC_BLE_AclDataAckNot + .text.TL_SYS_Init + 0x08006354 0x54 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x08006354 TL_SYS_Init + .text.TL_SYS_SendCmd + 0x080063a8 0x38 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x080063a8 TL_SYS_SendCmd + .text.HW_IPCC_SYS_CmdEvtNot + 0x080063e0 0x2c ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x080063e0 HW_IPCC_SYS_CmdEvtNot + .text.HW_IPCC_SYS_EvtNot + 0x0800640c 0x44 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x0800640c HW_IPCC_SYS_EvtNot + .text.TL_MM_Init + 0x08006450 0x78 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x08006450 TL_MM_Init + .text.TL_MM_EvtDone + 0x080064c8 0x30 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x080064c8 TL_MM_EvtDone + .text.SendFreeBuf + 0x080064f8 0x40 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .text.TL_TRACES_Init + 0x08006538 0x24 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x08006538 TL_TRACES_Init + .text.HW_IPCC_TRACES_EvtNot + 0x0800655c 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x0800655c HW_IPCC_TRACES_EvtNot + .text.TL_TRACES_EvtReceived + 0x08006590 0x14 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x08006590 TL_TRACES_EvtReceived + .text.OutputDbgTrace + 0x080065a4 0xbc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .text.OTP_Read + 0x08006660 0x50 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + 0x08006660 OTP_Read + .text.LST_init_head + 0x080066b0 0x20 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + 0x080066b0 LST_init_head + .text.LST_is_empty + 0x080066d0 0x44 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + 0x080066d0 LST_is_empty + .text.LST_insert_head + 0x08006714 0x4c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + 0x08006714 LST_insert_head + .text.LST_insert_tail + 0x08006760 0x4c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + 0x08006760 LST_insert_tail + .text.LST_remove_node + 0x080067ac 0x42 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + 0x080067ac LST_remove_node + .text.LST_remove_head + 0x080067ee 0x3e ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + 0x080067ee LST_remove_head + .text.LL_FLASH_GetUDN + 0x0800682c 0x18 ./STM32_WPAN/App/app_ble.o + .text.LL_FLASH_GetDeviceID + 0x08006844 0x18 ./STM32_WPAN/App/app_ble.o + .text.LL_FLASH_GetSTCompanyID + 0x0800685c 0x18 ./STM32_WPAN/App/app_ble.o + .text.APP_BLE_Init + 0x08006874 0xf4 ./STM32_WPAN/App/app_ble.o + 0x08006874 APP_BLE_Init + .text.SVCCTL_App_Notification + 0x08006968 0x16c ./STM32_WPAN/App/app_ble.o + 0x08006968 SVCCTL_App_Notification + .text.Ble_Tl_Init + 0x08006ad4 0x2c ./STM32_WPAN/App/app_ble.o + .text.Ble_Hci_Gap_Gatt_Init + 0x08006b00 0x1a4 ./STM32_WPAN/App/app_ble.o + .text.Adv_Request + 0x08006ca4 0xe0 ./STM32_WPAN/App/app_ble.o + .text.BleGetBdAddress + 0x08006d84 0x88 ./STM32_WPAN/App/app_ble.o + .text.Adv_Cancel + 0x08006e0c 0x34 ./STM32_WPAN/App/app_ble.o + .text.Adv_Cancel_Req + 0x08006e40 0x10 ./STM32_WPAN/App/app_ble.o + .text.Switch_OFF_GPIO + 0x08006e50 0xe ./STM32_WPAN/App/app_ble.o + .text.hci_notify_asynch_evt + 0x08006e5e 0x18 ./STM32_WPAN/App/app_ble.o + 0x08006e5e hci_notify_asynch_evt + .text.hci_cmd_resp_release + 0x08006e76 0x16 ./STM32_WPAN/App/app_ble.o + 0x08006e76 hci_cmd_resp_release + .text.hci_cmd_resp_wait + 0x08006e8c 0x16 ./STM32_WPAN/App/app_ble.o + 0x08006e8c hci_cmd_resp_wait + .text.BLE_UserEvtRx + 0x08006ea2 0x38 ./STM32_WPAN/App/app_ble.o + .text.BLE_StatusNot + 0x08006eda 0x36 ./STM32_WPAN/App/app_ble.o + .text.P2PS_STM_App_Notification + 0x08006f10 0x38 ./STM32_WPAN/App/p2p_server_app.o + 0x08006f10 P2PS_STM_App_Notification + .text.P2PS_APP_Notification + 0x08006f48 0x28 ./STM32_WPAN/App/p2p_server_app.o + 0x08006f48 P2PS_APP_Notification + .text.P2PS_APP_Init + 0x08006f70 0xe ./STM32_WPAN/App/p2p_server_app.o + 0x08006f70 P2PS_APP_Init + *fill* 0x08006f7e 0x2 + .text.LL_PWR_EnableBootC2 + 0x08006f80 0x20 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C2_EXTI_EnableEvent_32_63 + 0x08006fa0 0x28 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_EXTI_EnableRisingTrig_32_63 + 0x08006fc8 0x24 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_AHB3_GRP1_EnableClock + 0x08006fec 0x32 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C2_AHB3_GRP1_EnableClock + 0x0800701e 0x38 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C1_IPCC_EnableIT_TXF + 0x08007056 0x20 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C1_IPCC_EnableIT_RXO + 0x08007076 0x20 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C1_IPCC_EnableTransmitChannel + 0x08007096 0x26 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C1_IPCC_DisableTransmitChannel + 0x080070bc 0x24 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C1_IPCC_EnableReceiveChannel + 0x080070e0 0x24 ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C1_IPCC_ClearFlag_CHx + 0x08007104 0x1c ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C1_IPCC_SetFlag_CHx + 0x08007120 0x1e ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C1_IPCC_IsActiveFlag_CHx + 0x0800713e 0x2a ./STM32_WPAN/Target/hw_ipcc.o + .text.LL_C2_IPCC_IsActiveFlag_CHx + 0x08007168 0x2a ./STM32_WPAN/Target/hw_ipcc.o + *fill* 0x08007192 0x2 + .text.HW_IPCC_Rx_Handler + 0x08007194 0x6c ./STM32_WPAN/Target/hw_ipcc.o + 0x08007194 HW_IPCC_Rx_Handler + .text.HW_IPCC_Tx_Handler + 0x08007200 0x6c ./STM32_WPAN/Target/hw_ipcc.o + 0x08007200 HW_IPCC_Tx_Handler + .text.HW_IPCC_Enable + 0x0800726c 0x28 ./STM32_WPAN/Target/hw_ipcc.o + 0x0800726c HW_IPCC_Enable + .text.HW_IPCC_Init + 0x08007294 0x2c ./STM32_WPAN/Target/hw_ipcc.o + 0x08007294 HW_IPCC_Init + .text.HW_IPCC_BLE_Init + 0x080072c0 0x34 ./STM32_WPAN/Target/hw_ipcc.o + 0x080072c0 HW_IPCC_BLE_Init + .text.HW_IPCC_BLE_SendCmd + 0x080072f4 0x14 ./STM32_WPAN/Target/hw_ipcc.o + 0x080072f4 HW_IPCC_BLE_SendCmd + .text.HW_IPCC_BLE_EvtHandler + 0x08007308 0x18 ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_BLE_AclDataEvtHandler + 0x08007320 0x38 ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_SYS_Init + 0x08007358 0x34 ./STM32_WPAN/Target/hw_ipcc.o + 0x08007358 HW_IPCC_SYS_Init + .text.HW_IPCC_SYS_SendCmd + 0x0800738c 0x3c ./STM32_WPAN/Target/hw_ipcc.o + 0x0800738c HW_IPCC_SYS_SendCmd + .text.HW_IPCC_SYS_CmdEvtHandler + 0x080073c8 0x38 ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_SYS_EvtHandler + 0x08007400 0x18 ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_MM_SendFreeBuf + 0x08007418 0x5c ./STM32_WPAN/Target/hw_ipcc.o + 0x08007418 HW_IPCC_MM_SendFreeBuf + .text.HW_IPCC_MM_FreeBufHandler + 0x08007474 0x48 ./STM32_WPAN/Target/hw_ipcc.o + .text.HW_IPCC_TRACES_Init + 0x080074bc 0x34 ./STM32_WPAN/Target/hw_ipcc.o + 0x080074bc HW_IPCC_TRACES_Init + .text.HW_IPCC_TRACES_EvtHandler + 0x080074f0 0x18 ./STM32_WPAN/Target/hw_ipcc.o + .text.UTIL_LPM_Init + 0x08007508 0x24 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + 0x08007508 UTIL_LPM_Init + .text.UTIL_LPM_SetOffMode + 0x0800752c 0x60 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + 0x0800752c UTIL_LPM_SetOffMode + .text.UTIL_SEQ_Run + 0x0800758c 0x304 ./Utilities/sequencer/stm32_seq.o + 0x0800758c UTIL_SEQ_Run + .text.UTIL_SEQ_RegTask + 0x08007890 0x44 ./Utilities/sequencer/stm32_seq.o + 0x08007890 UTIL_SEQ_RegTask + .text.UTIL_SEQ_SetTask + 0x080078d4 0x58 ./Utilities/sequencer/stm32_seq.o + 0x080078d4 UTIL_SEQ_SetTask + .text.UTIL_SEQ_PauseTask + 0x0800792c 0x40 ./Utilities/sequencer/stm32_seq.o + 0x0800792c UTIL_SEQ_PauseTask + .text.UTIL_SEQ_ResumeTask + 0x0800796c 0x40 ./Utilities/sequencer/stm32_seq.o + 0x0800796c UTIL_SEQ_ResumeTask + .text.UTIL_SEQ_SetEvt + 0x080079ac 0x40 ./Utilities/sequencer/stm32_seq.o + 0x080079ac UTIL_SEQ_SetEvt + .text.UTIL_SEQ_WaitEvt + 0x080079ec 0x94 ./Utilities/sequencer/stm32_seq.o + 0x080079ec UTIL_SEQ_WaitEvt + .text.UTIL_SEQ_EvtIdle + 0x08007a80 0x1c ./Utilities/sequencer/stm32_seq.o + 0x08007a80 UTIL_SEQ_EvtIdle + .text.UTIL_SEQ_PreIdle + 0x08007a9c 0xe ./Utilities/sequencer/stm32_seq.o + 0x08007a9c UTIL_SEQ_PreIdle + .text.UTIL_SEQ_PostIdle + 0x08007aaa 0xe ./Utilities/sequencer/stm32_seq.o + 0x08007aaa UTIL_SEQ_PostIdle + .text.UTIL_SEQ_PreTask + 0x08007ab8 0x14 ./Utilities/sequencer/stm32_seq.o + 0x08007ab8 UTIL_SEQ_PreTask + .text.UTIL_SEQ_PostTask + 0x08007acc 0x14 ./Utilities/sequencer/stm32_seq.o + 0x08007acc UTIL_SEQ_PostTask + .text.UTIL_SEQ_CatchWarning + 0x08007ae0 0x16 ./Utilities/sequencer/stm32_seq.o + 0x08007ae0 UTIL_SEQ_CatchWarning + .text.SEQ_BitPosition + 0x08007af6 0x30 ./Utilities/sequencer/stm32_seq.o + 0x08007af6 SEQ_BitPosition + .text.memset 0x08007b26 0x10 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memset.o) + 0x08007b26 memset + *fill* 0x08007b36 0x2 + .text.__libc_init_array + 0x08007b38 0x48 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-init.o) + 0x08007b38 __libc_init_array + .text.memcpy 0x08007b80 0x1c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcpy-stub.o) + 0x08007b80 memcpy + *(.glue_7) + .glue_7 0x08007b9c 0x0 linker stubs + *(.glue_7t) + .glue_7t 0x08007b9c 0x0 linker stubs + *(.eh_frame) + .eh_frame 0x08007b9c 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + *(.init) + .init 0x08007b9c 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crti.o + 0x08007b9c _init + .init 0x08007ba0 0x8 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtn.o + *(.fini) + .fini 0x08007ba8 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crti.o + 0x08007ba8 _fini + .fini 0x08007bac 0x8 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtn.o + 0x08007bb4 . = ALIGN (0x4) + 0x08007bb4 _etext = . + +.vfp11_veneer 0x08007bb4 0x0 + .vfp11_veneer 0x08007bb4 0x0 linker stubs + +.v4_bx 0x08007bb4 0x0 + .v4_bx 0x08007bb4 0x0 linker stubs + +.iplt 0x08007bb4 0x0 + .iplt 0x08007bb4 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + +.rodata 0x08007bb4 0x26c + 0x08007bb4 . = ALIGN (0x4) + *(.rodata) + .rodata 0x08007bb4 0x1b ./Core/Src/app_debug.o + *fill* 0x08007bcf 0x1 + .rodata 0x08007bd0 0x2c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .rodata 0x08007bfc 0x44 ./STM32_WPAN/App/app_ble.o + *(.rodata*) + .rodata.aGpioConfigList + 0x08007c40 0x130 ./Core/Src/app_debug.o + .rodata.AHBPrescTable + 0x08007d70 0x40 ./Core/Src/system_stm32wbxx.o + 0x08007d70 AHBPrescTable + .rodata.MSIRangeTable + 0x08007db0 0x40 ./Core/Src/system_stm32wbxx.o + 0x08007db0 MSIRangeTable + .rodata.a_MBdAddr + 0x08007df0 0x6 ./STM32_WPAN/App/app_ble.o + *fill* 0x08007df6 0x2 + .rodata.a_BLE_CfgIrValue + 0x08007df8 0x10 ./STM32_WPAN/App/app_ble.o + .rodata.a_BLE_CfgErValue + 0x08007e08 0x10 ./STM32_WPAN/App/app_ble.o + .rodata.a_LocalName + 0x08007e18 0x8 ./STM32_WPAN/App/app_ble.o + 0x08007e20 . = ALIGN (0x4) + +.ARM.extab + *(.ARM.extab* .gnu.linkonce.armextab.*) + +.ARM 0x08007e20 0x8 + 0x08007e20 __exidx_start = . + *(.ARM.exidx*) + .ARM.exidx 0x08007e20 0x8 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strlen.o) + 0x08007e28 __exidx_end = . + +.preinit_array 0x08007e28 0x0 + 0x08007e28 PROVIDE (__preinit_array_start = .) + *(.preinit_array*) + 0x08007e28 PROVIDE (__preinit_array_end = .) + +.init_array 0x08007e28 0x4 + 0x08007e28 PROVIDE (__init_array_start = .) + *(SORT_BY_NAME(.init_array.*)) + *(.init_array*) + .init_array 0x08007e28 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + 0x08007e2c PROVIDE (__init_array_end = .) + +.fini_array 0x08007e2c 0x4 + [!provide] PROVIDE (__fini_array_start = .) + *(SORT_BY_NAME(.fini_array.*)) + *(.fini_array*) + .fini_array 0x08007e2c 0x4 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + [!provide] PROVIDE (__fini_array_end = .) + 0x08007e30 _sidata = LOADADDR (.data) + +.rel.dyn 0x08007e30 0x0 + .rel.iplt 0x08007e30 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + +.data 0x20000008 0x24 load address 0x08007e30 + 0x20000008 . = ALIGN (0x4) + 0x20000008 _sdata = . + *(.data) + *(.data*) + .data.SystemCoreClock + 0x20000008 0x4 ./Core/Src/system_stm32wbxx.o + 0x20000008 SystemCoreClock + .data.uwTickPrio + 0x2000000c 0x4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x2000000c uwTickPrio + .data.uwTickFreq + 0x20000010 0x1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x20000010 uwTickFreq + *fill* 0x20000011 0x3 + .data.a_ManufData + 0x20000014 0xe ./STM32_WPAN/App/app_ble.o + 0x20000014 a_ManufData + *fill* 0x20000022 0x2 + .data.TaskMask + 0x20000024 0x4 ./Utilities/sequencer/stm32_seq.o + .data.SuperMask + 0x20000028 0x4 ./Utilities/sequencer/stm32_seq.o + *(.RamFunc) + *(.RamFunc*) + 0x2000002c . = ALIGN (0x4) + 0x2000002c _edata = . + +.igot.plt 0x2000002c 0x0 load address 0x08007e54 + .igot.plt 0x2000002c 0x0 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + +BLE_DRIVER_CONTEXT + 0x2000002c 0x3d load address 0x08007e54 + BLE_DRIVER_CONTEXT + 0x2000002c 0x6 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + *fill* 0x20000032 0x2 + BLE_DRIVER_CONTEXT + 0x20000034 0x21 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + 0x20000034 SVCCTL_EvtHandler + 0x20000054 SVCCTL_CltHandler + *fill* 0x20000055 0x3 + BLE_DRIVER_CONTEXT + 0x20000058 0x11 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + 0x20000068 UserEventFlow + +SYSTEM_DRIVER_CONTEXT + 0x2000006c 0x11 load address 0x08007e91 + SYSTEM_DRIVER_CONTEXT + 0x2000006c 0x11 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + 0x2000007c SHCI_TL_UserEventFlow + 0x20000080 . = ALIGN (0x4) + +.bss 0x20000080 0x324 load address 0x08007ea2 + 0x20000080 _sbss = . + 0x20000080 __bss_start__ = _sbss + *(.bss) + .bss 0x20000080 0x1c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + *(.bss*) + .bss.aTimerContext + 0x2000009c 0x90 ./Core/Src/hw_timerserver.o + .bss.CurrentRunningTimerID + 0x2000012c 0x1 ./Core/Src/hw_timerserver.o + .bss.PreviousRunningTimerID + 0x2000012d 0x1 ./Core/Src/hw_timerserver.o + *fill* 0x2000012e 0x2 + .bss.SSRValueOnLastSetup + 0x20000130 0x4 ./Core/Src/hw_timerserver.o + .bss.WakeupTimerLimitation + 0x20000134 0x1 ./Core/Src/hw_timerserver.o + .bss.WakeupTimerDivider + 0x20000135 0x1 ./Core/Src/hw_timerserver.o + .bss.AsynchPrescalerUserConfig + 0x20000136 0x1 ./Core/Src/hw_timerserver.o + *fill* 0x20000137 0x1 + .bss.SynchPrescalerUserConfig + 0x20000138 0x2 ./Core/Src/hw_timerserver.o + .bss.MaxWakeupTimerSetup + 0x2000013a 0x2 ./Core/Src/hw_timerserver.o + .bss.hi2c1 0x2000013c 0x54 ./Core/Src/main.o + 0x2000013c hi2c1 + .bss.hipcc 0x20000190 0x3c ./Core/Src/main.o + 0x20000190 hipcc + .bss.hrtc 0x200001cc 0x24 ./Core/Src/main.o + 0x200001cc hrtc + .bss.uwTick 0x200001f0 0x4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + 0x200001f0 uwTick + .bss.hciContext + 0x200001f4 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .bss.HciCmdEventQueue + 0x20000214 0x8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .bss.StatusNotCallBackFunction + 0x2000021c 0x4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .bss.CmdRspStatusFlag + 0x20000220 0x1 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + *fill* 0x20000221 0x3 + .bss.shciContext + 0x20000224 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .bss.StatusNotCallBackFunction + 0x20000244 0x4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .bss.CmdRspStatusFlag + 0x20000248 0x1 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + *fill* 0x20000249 0x3 + .bss.LocalFreeBufQueue + 0x2000024c 0x8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .bss.BLE_IoBusEvtCallBackFunction + 0x20000254 0x4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .bss.BLE_IoBusAclDataTxAck + 0x20000258 0x4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .bss.SYS_CMD_IoBusCallBackFunction + 0x2000025c 0x4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .bss.SYS_EVT_IoBusCallBackFunction + 0x20000260 0x4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .bss.p_mem_manager_table.0 + 0x20000264 0x4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .bss.a_BdAddrUdn + 0x20000268 0x6 ./STM32_WPAN/App/app_ble.o + *fill* 0x2000026e 0x2 + .bss.BleApplicationContext + 0x20000270 0x84 ./STM32_WPAN/App/app_ble.o + .bss.AdvIntervalMin + 0x200002f4 0x2 ./STM32_WPAN/App/app_ble.o + .bss.AdvIntervalMax + 0x200002f6 0x2 ./STM32_WPAN/App/app_ble.o + .bss.HandleNotification + 0x200002f8 0x4 ./STM32_WPAN/App/app_ble.o + 0x200002f8 HandleNotification + .bss.FreeBufCb + 0x200002fc 0x4 ./STM32_WPAN/Target/hw_ipcc.o + .bss.StopModeDisable + 0x20000300 0x4 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .bss.OffModeDisable + 0x20000304 0x4 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .bss.TaskSet 0x20000308 0x4 ./Utilities/sequencer/stm32_seq.o + .bss.EvtSet 0x2000030c 0x4 ./Utilities/sequencer/stm32_seq.o + .bss.EvtWaited + 0x20000310 0x4 ./Utilities/sequencer/stm32_seq.o + .bss.CurrentTaskIdx + 0x20000314 0x4 ./Utilities/sequencer/stm32_seq.o + .bss.TaskCb 0x20000318 0x80 ./Utilities/sequencer/stm32_seq.o + .bss.TaskPrio 0x20000398 0x8 ./Utilities/sequencer/stm32_seq.o + .bss.TaskClearList + 0x200003a0 0x4 ./Utilities/sequencer/stm32_seq.o + *(COMMON) + 0x200003a4 . = ALIGN (0x4) + 0x200003a4 _ebss = . + 0x200003a4 __bss_end__ = _ebss + +._user_heap_stack + 0x200003a4 0x604 load address 0x08007ea2 + 0x200003a8 . = ALIGN (0x8) + *fill* 0x200003a4 0x4 + [!provide] PROVIDE (end = .) + 0x200003a8 PROVIDE (_end = .) + 0x200005a8 . = (. + _Min_Heap_Size) + *fill* 0x200003a8 0x200 + 0x200009a8 . = (. + _Min_Stack_Size) + *fill* 0x200005a8 0x400 + 0x200009a8 . = ALIGN (0x8) + +/DISCARD/ + libc.a(*) + libm.a(*) + libgcc.a(*) + +.ARM.attributes + 0x00000000 0x30 + *(.ARM.attributes) + .ARM.attributes + 0x00000000 0x22 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crti.o + .ARM.attributes + 0x00000022 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtbegin.o + .ARM.attributes + 0x00000056 0x34 ./Core/Src/app_debug.o + .ARM.attributes + 0x0000008a 0x34 ./Core/Src/app_entry.o + .ARM.attributes + 0x000000be 0x34 ./Core/Src/hw_timerserver.o + .ARM.attributes + 0x000000f2 0x34 ./Core/Src/main.o + .ARM.attributes + 0x00000126 0x34 ./Core/Src/stm32wbxx_hal_msp.o + .ARM.attributes + 0x0000015a 0x34 ./Core/Src/stm32wbxx_it.o + .ARM.attributes + 0x0000018e 0x34 ./Core/Src/system_stm32wbxx.o + .ARM.attributes + 0x000001c2 0x21 ./Core/Startup/startup_stm32wb55cgux.o + .ARM.attributes + 0x000001e3 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .ARM.attributes + 0x00000217 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .ARM.attributes + 0x0000024b 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .ARM.attributes + 0x0000027f 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .ARM.attributes + 0x000002b3 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .ARM.attributes + 0x000002e7 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .ARM.attributes + 0x0000031b 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .ARM.attributes + 0x0000034f 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .ARM.attributes + 0x00000383 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .ARM.attributes + 0x000003b7 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .ARM.attributes + 0x000003eb 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .ARM.attributes + 0x0000041f 0x34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .ARM.attributes + 0x00000453 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .ARM.attributes + 0x00000487 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .ARM.attributes + 0x000004bb 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .ARM.attributes + 0x000004ef 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .ARM.attributes + 0x00000523 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .ARM.attributes + 0x00000557 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .ARM.attributes + 0x0000058b 0x34 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .ARM.attributes + 0x000005bf 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .ARM.attributes + 0x000005f3 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .ARM.attributes + 0x00000627 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .ARM.attributes + 0x0000065b 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .ARM.attributes + 0x0000068f 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .ARM.attributes + 0x000006c3 0x34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .ARM.attributes + 0x000006f7 0x34 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .ARM.attributes + 0x0000072b 0x34 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .ARM.attributes + 0x0000075f 0x34 ./STM32_WPAN/App/app_ble.o + .ARM.attributes + 0x00000793 0x34 ./STM32_WPAN/App/p2p_server_app.o + .ARM.attributes + 0x000007c7 0x34 ./STM32_WPAN/Target/hw_ipcc.o + .ARM.attributes + 0x000007fb 0x34 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .ARM.attributes + 0x0000082f 0x34 ./Utilities/sequencer/stm32_seq.o + .ARM.attributes + 0x00000863 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memset.o) + .ARM.attributes + 0x00000897 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-init.o) + .ARM.attributes + 0x000008cb 0x34 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcpy-stub.o) + .ARM.attributes + 0x000008ff 0x17 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-strlen.o) + .ARM.attributes + 0x00000916 0x22 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/crtn.o + +MAPPING_TABLE 0x20030000 0x28 + *(MAPPING_TABLE) + MAPPING_TABLE 0x20030000 0x28 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + +MB_MEM1 0x20030028 0x1bb + *(MB_MEM1) + MB_MEM1 0x20030028 0xb0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + MB_MEM1 0x200300d8 0x10b ./STM32_WPAN/App/app_ble.o + 0x08007ea2 _siMB_MEM2 = LOADADDR (.MB_MEM2) + +.MB_MEM2 0x200301e4 0x883 load address 0x08007ea2 + 0x200301e4 _sMB_MEM2 = . + *(MB_MEM2) + MB_MEM2 0x200301e4 0x12 ./Core/Src/app_debug.o + *fill* 0x200301f6 0x2 + MB_MEM2 0x200301f8 0x85e ./Core/Src/app_entry.o + *fill* 0x20030a56 0x2 + MB_MEM2 0x20030a58 0xf ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + 0x20030a67 _eMB_MEM2 = . +OUTPUT(memory_chip_gone.elf elf32-littlearm) +LOAD linker stubs +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libm.a +LOAD /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/thumb/v7e-m+fp/hard/libgcc.a + +.debug_info 0x00000000 0x262b1 + .debug_info 0x00000000 0xb56 ./Core/Src/app_debug.o + .debug_info 0x00000b56 0x1bbb ./Core/Src/app_entry.o + .debug_info 0x00002711 0x11a8 ./Core/Src/hw_timerserver.o + .debug_info 0x000038b9 0x1960 ./Core/Src/main.o + .debug_info 0x00005219 0x1612 ./Core/Src/stm32wbxx_hal_msp.o + .debug_info 0x0000682b 0x160 ./Core/Src/stm32wbxx_it.o + .debug_info 0x0000698b 0x703 ./Core/Src/system_stm32wbxx.o + .debug_info 0x0000708e 0x30 ./Core/Startup/startup_stm32wb55cgux.o + .debug_info 0x000070be 0x12ae ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_info 0x0000836c 0xccd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_info 0x00009039 0x6aa ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_info 0x000096e3 0x3bc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_info 0x00009a9f 0x21fd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_info 0x0000bc9c 0x8fb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_info 0x0000c597 0x7a3 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_info 0x0000cd3a 0x904 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_info 0x0000d63e 0x105d ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_info 0x0000e69b 0x14d1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_info 0x0000fb6c 0x1c40 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_info 0x000117ac 0xd28 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_info 0x000124d4 0x36f0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_info 0x00015bc4 0x30a5 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_info 0x00018c69 0x10dc ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_info 0x00019d45 0x3ef7 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_info 0x0001dc3c 0x1b8 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_info 0x0001ddf4 0x58b ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_info 0x0001e37f 0x482 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_info 0x0001e801 0x1a09 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_info 0x0002020a 0x972 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_info 0x00020b7c 0x1e0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_info 0x00020d5c 0x7d8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_info 0x00021534 0x1e0 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_info 0x00021714 0xdc4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_info 0x000224d8 0xd1 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_info 0x000225a9 0x6d5 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_info 0x00022c7e 0x1443 ./STM32_WPAN/App/app_ble.o + .debug_info 0x000240c1 0x217 ./STM32_WPAN/App/p2p_server_app.o + .debug_info 0x000242d8 0x10bc ./STM32_WPAN/Target/hw_ipcc.o + .debug_info 0x00025394 0x3da ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_info 0x0002576e 0xb43 ./Utilities/sequencer/stm32_seq.o + +.debug_abbrev 0x00000000 0x53bb + .debug_abbrev 0x00000000 0x255 ./Core/Src/app_debug.o + .debug_abbrev 0x00000255 0x3ac ./Core/Src/app_entry.o + .debug_abbrev 0x00000601 0x33a ./Core/Src/hw_timerserver.o + .debug_abbrev 0x0000093b 0x31c ./Core/Src/main.o + .debug_abbrev 0x00000c57 0x25c ./Core/Src/stm32wbxx_hal_msp.o + .debug_abbrev 0x00000eb3 0x88 ./Core/Src/stm32wbxx_it.o + .debug_abbrev 0x00000f3b 0x13b ./Core/Src/system_stm32wbxx.o + .debug_abbrev 0x00001076 0x24 ./Core/Startup/startup_stm32wb55cgux.o + .debug_abbrev 0x0000109a 0x367 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_abbrev 0x00001401 0x319 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_abbrev 0x0000171a 0x1e5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_abbrev 0x000018ff 0x1e4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_abbrev 0x00001ae3 0x260 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_abbrev 0x00001d43 0x1c8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_abbrev 0x00001f0b 0x252 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_abbrev 0x0000215d 0x205 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_abbrev 0x00002362 0x31c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_abbrev 0x0000267e 0x31b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_abbrev 0x00002999 0x35a ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_abbrev 0x00002cf3 0x1f0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_abbrev 0x00002ee3 0x1c7 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_abbrev 0x000030aa 0x205 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_abbrev 0x000032af 0x1c3 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_abbrev 0x00003472 0x1d1 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_abbrev 0x00003643 0xcc ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_abbrev 0x0000370f 0x248 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_abbrev 0x00003957 0x1c5 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_abbrev 0x00003b1c 0x1d7 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_abbrev 0x00003cf3 0x262 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_abbrev 0x00003f55 0xce ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_abbrev 0x00004023 0x202 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_abbrev 0x00004225 0xce ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_abbrev 0x000042f3 0x27a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_abbrev 0x0000456d 0x81 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_abbrev 0x000045ee 0x189 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_abbrev 0x00004777 0x35d ./STM32_WPAN/App/app_ble.o + .debug_abbrev 0x00004ad4 0xcd ./STM32_WPAN/App/p2p_server_app.o + .debug_abbrev 0x00004ba1 0x385 ./STM32_WPAN/Target/hw_ipcc.o + .debug_abbrev 0x00004f26 0x1f4 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_abbrev 0x0000511a 0x2a1 ./Utilities/sequencer/stm32_seq.o + +.debug_aranges 0x00000000 0x2470 + .debug_aranges + 0x00000000 0x50 ./Core/Src/app_debug.o + .debug_aranges + 0x00000050 0x108 ./Core/Src/app_entry.o + .debug_aranges + 0x00000158 0xa8 ./Core/Src/hw_timerserver.o + .debug_aranges + 0x00000200 0x70 ./Core/Src/main.o + .debug_aranges + 0x00000270 0x88 ./Core/Src/stm32wbxx_hal_msp.o + .debug_aranges + 0x000002f8 0x78 ./Core/Src/stm32wbxx_it.o + .debug_aranges + 0x00000370 0x28 ./Core/Src/system_stm32wbxx.o + .debug_aranges + 0x00000398 0x30 ./Core/Startup/startup_stm32wb55cgux.o + .debug_aranges + 0x000003c8 0x280 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_aranges + 0x00000648 0x118 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_aranges + 0x00000760 0x60 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_aranges + 0x000007c0 0x70 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_aranges + 0x00000830 0x2a0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_aranges + 0x00000ad0 0x48 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_aranges + 0x00000b18 0xa0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_aranges + 0x00000bb8 0xd0 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_aranges + 0x00000c88 0x288 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_aranges + 0x00000f10 0x270 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_aranges + 0x00001180 0x390 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_aranges + 0x00001510 0xe8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_aranges + 0x000015f8 0x1c0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_aranges + 0x000017b8 0x198 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_aranges + 0x00001950 0xc8 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_aranges + 0x00001a18 0x298 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_aranges + 0x00001cb0 0x30 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_aranges + 0x00001ce0 0x30 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_aranges + 0x00001d10 0xd0 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_aranges + 0x00001de0 0x118 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_aranges + 0x00001ef8 0x68 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_aranges + 0x00001f60 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_aranges + 0x00001f80 0x68 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_aranges + 0x00001fe8 0x20 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_aranges + 0x00002008 0xa8 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_aranges + 0x000020b0 0x20 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_aranges + 0x000020d0 0x78 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_aranges + 0x00002148 0xb0 ./STM32_WPAN/App/app_ble.o + .debug_aranges + 0x000021f8 0x30 ./STM32_WPAN/App/p2p_server_app.o + .debug_aranges + 0x00002228 0x138 ./STM32_WPAN/Target/hw_ipcc.o + .debug_aranges + 0x00002360 0x48 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_aranges + 0x000023a8 0xc8 ./Utilities/sequencer/stm32_seq.o + +.debug_rnglists + 0x00000000 0x1bc3 + .debug_rnglists + 0x00000000 0x38 ./Core/Src/app_debug.o + .debug_rnglists + 0x00000038 0xc2 ./Core/Src/app_entry.o + .debug_rnglists + 0x000000fa 0x85 ./Core/Src/hw_timerserver.o + .debug_rnglists + 0x0000017f 0x51 ./Core/Src/main.o + .debug_rnglists + 0x000001d0 0x62 ./Core/Src/stm32wbxx_hal_msp.o + .debug_rnglists + 0x00000232 0x55 ./Core/Src/stm32wbxx_it.o + .debug_rnglists + 0x00000287 0x1b ./Core/Src/system_stm32wbxx.o + .debug_rnglists + 0x000002a2 0x1f ./Core/Startup/startup_stm32wb55cgux.o + .debug_rnglists + 0x000002c1 0x1db ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_rnglists + 0x0000049c 0xce ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_rnglists + 0x0000056a 0x45 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_rnglists + 0x000005af 0x4f ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_rnglists + 0x000005fe 0x228 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_rnglists + 0x00000826 0x35 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_rnglists + 0x0000085b 0x78 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_rnglists + 0x000008d3 0x99 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_rnglists + 0x0000096c 0x1e8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_rnglists + 0x00000b54 0x1d6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_rnglists + 0x00000d2a 0x2b6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_rnglists + 0x00000fe0 0xb4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_rnglists + 0x00001094 0x17b ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_rnglists + 0x0000120f 0x15b ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_rnglists + 0x0000136a 0xa1 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_rnglists + 0x0000140b 0x227 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_rnglists + 0x00001632 0x1f ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_rnglists + 0x00001651 0x21 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_rnglists + 0x00001672 0x98 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_rnglists + 0x0000170a 0xce ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_rnglists + 0x000017d8 0x4b ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_rnglists + 0x00001823 0x13 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_rnglists + 0x00001836 0x4b ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_rnglists + 0x00001881 0x13 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_rnglists + 0x00001894 0x7a ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_rnglists + 0x0000190e 0x13 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_rnglists + 0x00001921 0x55 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_rnglists + 0x00001976 0x84 ./STM32_WPAN/App/app_ble.o + .debug_rnglists + 0x000019fa 0x1f ./STM32_WPAN/App/p2p_server_app.o + .debug_rnglists + 0x00001a19 0xe5 ./STM32_WPAN/Target/hw_ipcc.o + .debug_rnglists + 0x00001afe 0x31 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_rnglists + 0x00001b2f 0x94 ./Utilities/sequencer/stm32_seq.o + +.debug_macro 0x00000000 0x2ad32 + .debug_macro 0x00000000 0x490 ./Core/Src/app_debug.o + .debug_macro 0x00000490 0xad8 ./Core/Src/app_debug.o + .debug_macro 0x00000f68 0x22 ./Core/Src/app_debug.o + .debug_macro 0x00000f8a 0x8e ./Core/Src/app_debug.o + .debug_macro 0x00001018 0x51 ./Core/Src/app_debug.o + .debug_macro 0x00001069 0x103 ./Core/Src/app_debug.o + .debug_macro 0x0000116c 0x6a ./Core/Src/app_debug.o + .debug_macro 0x000011d6 0x1df ./Core/Src/app_debug.o + .debug_macro 0x000013b5 0x61 ./Core/Src/app_debug.o + .debug_macro 0x00001416 0x2a ./Core/Src/app_debug.o + .debug_macro 0x00001440 0x43 ./Core/Src/app_debug.o + .debug_macro 0x00001483 0x34 ./Core/Src/app_debug.o + .debug_macro 0x000014b7 0x190 ./Core/Src/app_debug.o + .debug_macro 0x00001647 0x370 ./Core/Src/app_debug.o + .debug_macro 0x000019b7 0x16 ./Core/Src/app_debug.o + .debug_macro 0x000019cd 0x4a ./Core/Src/app_debug.o + .debug_macro 0x00001a17 0x34 ./Core/Src/app_debug.o + .debug_macro 0x00001a4b 0x10 ./Core/Src/app_debug.o + .debug_macro 0x00001a5b 0x58 ./Core/Src/app_debug.o + .debug_macro 0x00001ab3 0x8e ./Core/Src/app_debug.o + .debug_macro 0x00001b41 0x1c ./Core/Src/app_debug.o + .debug_macro 0x00001b5d 0x185 ./Core/Src/app_debug.o + .debug_macro 0x00001ce2 0x10 ./Core/Src/app_debug.o + .debug_macro 0x00001cf2 0x3c ./Core/Src/app_debug.o + .debug_macro 0x00001d2e 0x20 ./Core/Src/app_debug.o + .debug_macro 0x00001d4e 0x1c ./Core/Src/app_debug.o + .debug_macro 0x00001d6a 0x10 ./Core/Src/app_debug.o + .debug_macro 0x00001d7a 0x1c ./Core/Src/app_debug.o + .debug_macro 0x00001d96 0x16 ./Core/Src/app_debug.o + .debug_macro 0x00001dac 0x146 ./Core/Src/app_debug.o + .debug_macro 0x00001ef2 0x16 ./Core/Src/app_debug.o + .debug_macro 0x00001f08 0x16 ./Core/Src/app_debug.o + .debug_macro 0x00001f1e 0x29 ./Core/Src/app_debug.o + .debug_macro 0x00001f47 0x4c ./Core/Src/app_debug.o + .debug_macro 0x00001f93 0x89 ./Core/Src/app_debug.o + .debug_macro 0x0000201c 0x2e ./Core/Src/app_debug.o + .debug_macro 0x0000204a 0x2e ./Core/Src/app_debug.o + .debug_macro 0x00002078 0x1c ./Core/Src/app_debug.o + .debug_macro 0x00002094 0x22 ./Core/Src/app_debug.o + .debug_macro 0x000020b6 0xfb ./Core/Src/app_debug.o + .debug_macro 0x000021b1 0x1011 ./Core/Src/app_debug.o + .debug_macro 0x000031c2 0x11f ./Core/Src/app_debug.o + .debug_macro 0x000032e1 0x12adb ./Core/Src/app_debug.o + .debug_macro 0x00015dbc 0x6c ./Core/Src/app_debug.o + .debug_macro 0x00015e28 0x13c ./Core/Src/app_debug.o + .debug_macro 0x00015f64 0x350b ./Core/Src/app_debug.o + .debug_macro 0x0001946f 0x56 ./Core/Src/app_debug.o + .debug_macro 0x000194c5 0x3f5 ./Core/Src/app_debug.o + .debug_macro 0x000198ba 0x286 ./Core/Src/app_debug.o + .debug_macro 0x00019b40 0x30d ./Core/Src/app_debug.o + .debug_macro 0x00019e4d 0x17e ./Core/Src/app_debug.o + .debug_macro 0x00019fcb 0x43 ./Core/Src/app_debug.o + .debug_macro 0x0001a00e 0x236 ./Core/Src/app_debug.o + .debug_macro 0x0001a244 0x24a ./Core/Src/app_debug.o + .debug_macro 0x0001a48e 0x57b ./Core/Src/app_debug.o + .debug_macro 0x0001aa09 0x2e ./Core/Src/app_debug.o + .debug_macro 0x0001aa37 0x100 ./Core/Src/app_debug.o + .debug_macro 0x0001ab37 0x1ba ./Core/Src/app_debug.o + .debug_macro 0x0001acf1 0x1cd ./Core/Src/app_debug.o + .debug_macro 0x0001aebe 0x4a ./Core/Src/app_debug.o + .debug_macro 0x0001af08 0x22c ./Core/Src/app_debug.o + .debug_macro 0x0001b134 0x55 ./Core/Src/app_debug.o + .debug_macro 0x0001b189 0xa5 ./Core/Src/app_debug.o + .debug_macro 0x0001b22e 0x4a ./Core/Src/app_debug.o + .debug_macro 0x0001b278 0x381 ./Core/Src/app_debug.o + .debug_macro 0x0001b5f9 0x13d ./Core/Src/app_debug.o + .debug_macro 0x0001b736 0x141 ./Core/Src/app_debug.o + .debug_macro 0x0001b877 0x4ff ./Core/Src/app_debug.o + .debug_macro 0x0001bd76 0x874 ./Core/Src/app_debug.o + .debug_macro 0x0001c5ea 0x259 ./Core/Src/app_debug.o + .debug_macro 0x0001c843 0x1bb1 ./Core/Src/app_debug.o + .debug_macro 0x0001e3f4 0xe4 ./Core/Src/app_debug.o + .debug_macro 0x0001e4d8 0x5e7 ./Core/Src/app_debug.o + .debug_macro 0x0001eabf 0x328 ./Core/Src/app_debug.o + .debug_macro 0x0001ede7 0x493 ./Core/Src/app_debug.o + .debug_macro 0x0001f27a 0xf2 ./Core/Src/app_debug.o + .debug_macro 0x0001f36c 0x557 ./Core/Src/app_debug.o + .debug_macro 0x0001f8c3 0x433 ./Core/Src/app_debug.o + .debug_macro 0x0001fcf6 0x82 ./Core/Src/app_debug.o + .debug_macro 0x0001fd78 0x1a8 ./Core/Src/app_debug.o + .debug_macro 0x0001ff20 0x45 ./Core/Src/app_debug.o + .debug_macro 0x0001ff65 0xf5 ./Core/Src/app_debug.o + .debug_macro 0x0002005a 0x14d ./Core/Src/app_debug.o + .debug_macro 0x000201a7 0x467 ./Core/Src/app_debug.o + .debug_macro 0x0002060e 0x6d ./Core/Src/app_debug.o + .debug_macro 0x0002067b 0x359 ./Core/Src/app_debug.o + .debug_macro 0x000209d4 0xa0 ./Core/Src/app_debug.o + .debug_macro 0x00020a74 0x12e ./Core/Src/app_debug.o + .debug_macro 0x00020ba2 0x1c ./Core/Src/app_debug.o + .debug_macro 0x00020bbe 0x13a ./Core/Src/app_debug.o + .debug_macro 0x00020cf8 0xac ./Core/Src/app_debug.o + .debug_macro 0x00020da4 0x415 ./Core/Src/app_debug.o + .debug_macro 0x000211b9 0xac ./Core/Src/app_debug.o + .debug_macro 0x00021265 0x1c ./Core/Src/app_debug.o + .debug_macro 0x00021281 0x65a ./Core/Src/app_entry.o + .debug_macro 0x000218db 0x34 ./Core/Src/app_entry.o + .debug_macro 0x0002190f 0xe2 ./Core/Src/app_entry.o + .debug_macro 0x000219f1 0x791 ./Core/Src/app_entry.o + .debug_macro 0x00022182 0x60f ./Core/Src/app_entry.o + .debug_macro 0x00022791 0x164 ./Core/Src/app_entry.o + .debug_macro 0x000228f5 0x22 ./Core/Src/app_entry.o + .debug_macro 0x00022917 0x34 ./Core/Src/app_entry.o + .debug_macro 0x0002294b 0x1c ./Core/Src/app_entry.o + .debug_macro 0x00022967 0x15b ./Core/Src/app_entry.o + .debug_macro 0x00022ac2 0x10 ./Core/Src/app_entry.o + .debug_macro 0x00022ad2 0x10 ./Core/Src/app_entry.o + .debug_macro 0x00022ae2 0x67 ./Core/Src/app_entry.o + .debug_macro 0x00022b49 0x28 ./Core/Src/app_entry.o + .debug_macro 0x00022b71 0x10 ./Core/Src/app_entry.o + .debug_macro 0x00022b81 0x5c6 ./Core/Src/app_entry.o + .debug_macro 0x00023147 0x23 ./Core/Src/app_entry.o + .debug_macro 0x0002316a 0xb2 ./Core/Src/app_entry.o + .debug_macro 0x0002321c 0x134 ./Core/Src/app_entry.o + .debug_macro 0x00023350 0x41d ./Core/Src/hw_timerserver.o + .debug_macro 0x0002376d 0x421 ./Core/Src/main.o + .debug_macro 0x00023b8e 0x5c ./Core/Src/main.o + .debug_macro 0x00023bea 0x421 ./Core/Src/stm32wbxx_hal_msp.o + .debug_macro 0x0002400b 0x42b ./Core/Src/stm32wbxx_it.o + .debug_macro 0x00024436 0x240 ./Core/Src/system_stm32wbxx.o + .debug_macro 0x00024676 0x264 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_macro 0x000248da 0x240 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_macro 0x00024b1a 0x247 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_macro 0x00024d61 0x240 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_macro 0x00024fa1 0x30c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_macro 0x000252ad 0x240 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_macro 0x000254ed 0x252 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_macro 0x0002573f 0x2b2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_macro 0x000259f1 0x252 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_macro 0x00025c43 0x2b2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_macro 0x00025ef5 0x295 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_macro 0x0002618a 0x241 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_macro 0x000263cb 0x17e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x00026549 0x34 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x0002657d 0x46 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_macro 0x000265c3 0x17e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_macro 0x00026741 0x17e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_macro 0x000268bf 0x17e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_macro 0x00026a3d 0x10f ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_macro 0x00026b4c 0x600 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x0002714c 0xa6 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x000271f2 0x82 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_macro 0x00027274 0x5e8 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_macro 0x0002785c 0x3bc ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00027c18 0xe9 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_macro 0x00027d01 0x498 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_macro 0x00028199 0x1db ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_macro 0x00028374 0x1eb ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_macro 0x0002855f 0x1e1 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_macro 0x00028740 0x448 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00028b88 0x88 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_macro 0x00028c10 0x417 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_macro 0x00029027 0x429 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_macro 0x00029450 0x668 ./STM32_WPAN/App/app_ble.o + .debug_macro 0x00029ab8 0x5f3 ./STM32_WPAN/App/p2p_server_app.o + .debug_macro 0x0002a0ab 0x443 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x0002a4ee 0x52 ./STM32_WPAN/Target/hw_ipcc.o + .debug_macro 0x0002a540 0x3bc ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x0002a8fc 0x4c ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_macro 0x0002a948 0x3cd ./Utilities/sequencer/stm32_seq.o + .debug_macro 0x0002ad15 0x1d ./Utilities/sequencer/stm32_seq.o + +.debug_line 0x00000000 0x25a3c + .debug_line 0x00000000 0xc52 ./Core/Src/app_debug.o + .debug_line 0x00000c52 0x1219 ./Core/Src/app_entry.o + .debug_line 0x00001e6b 0x10d9 ./Core/Src/hw_timerserver.o + .debug_line 0x00002f44 0xc3a ./Core/Src/main.o + .debug_line 0x00003b7e 0xbe2 ./Core/Src/stm32wbxx_hal_msp.o + .debug_line 0x00004760 0xb11 ./Core/Src/stm32wbxx_it.o + .debug_line 0x00005271 0x7f5 ./Core/Src/system_stm32wbxx.o + .debug_line 0x00005a66 0x83 ./Core/Startup/startup_stm32wb55cgux.o + .debug_line 0x00005ae9 0xfb8 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_line 0x00006aa1 0xca2 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_line 0x00007743 0xb69 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_line 0x000082ac 0x8ac ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_line 0x00008b58 0x3734 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_line 0x0000c28c 0x8a6 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_line 0x0000cb32 0xacc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_line 0x0000d5fe 0x9df ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_line 0x0000dfdd 0x10e1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_line 0x0000f0be 0x1a56 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_line 0x00010b14 0x1f12 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_line 0x00012a26 0x116b ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_line 0x00013b91 0x186d ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_line 0x000153fe 0x17bb ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_line 0x00016bb9 0xba0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_line 0x00017759 0x1e44 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_line 0x0001959d 0x4a2 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_line 0x00019a3f 0xe43 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_line 0x0001a882 0x1014 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_line 0x0001b896 0xec4 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_line 0x0001c75a 0xdbb ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_line 0x0001d515 0x57e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_line 0x0001da93 0x772 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_line 0x0001e205 0x580 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_line 0x0001e785 0xe48 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_line 0x0001f5cd 0xa3d ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_line 0x0002000a 0xded ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_line 0x00020df7 0x1258 ./STM32_WPAN/App/app_ble.o + .debug_line 0x0002204f 0xda4 ./STM32_WPAN/App/p2p_server_app.o + .debug_line 0x00022df3 0x1087 ./STM32_WPAN/Target/hw_ipcc.o + .debug_line 0x00023e7a 0xb62 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_line 0x000249dc 0x1060 ./Utilities/sequencer/stm32_seq.o + +.debug_str 0x00000000 0xf314c + .debug_str 0x00000000 0xf314c ./Core/Src/app_debug.o + 0xdc881 (size before relaxing) + .debug_str 0x000f314c 0xe5cff ./Core/Src/app_entry.o + .debug_str 0x000f314c 0xda5b4 ./Core/Src/hw_timerserver.o + .debug_str 0x000f314c 0xda9a8 ./Core/Src/main.o + .debug_str 0x000f314c 0xdaa64 ./Core/Src/stm32wbxx_hal_msp.o + .debug_str 0x000f314c 0xd98c3 ./Core/Src/stm32wbxx_it.o + .debug_str 0x000f314c 0xd0b17 ./Core/Src/system_stm32wbxx.o + .debug_str 0x000f314c 0x84 ./Core/Startup/startup_stm32wb55cgux.o + .debug_str 0x000f314c 0xd19fd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_str 0x000f314c 0xd11b5 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_str 0x000f314c 0xd0af1 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_str 0x000f314c 0xd09cd ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_str 0x000f314c 0xd1d34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_str 0x000f314c 0xd0f26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_str 0x000f314c 0xd0c26 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_str 0x000f314c 0xd0f87 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_str 0x000f314c 0xd1488 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_str 0x000f314c 0xd1975 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_str 0x000f314c 0xd1d9e ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_str 0x000f314c 0xd0ecb ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_str 0x000f314c 0xd42e ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_str 0x000f314c 0xce3d ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_str 0x000f314c 0xc4ad ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_str 0x000f314c 0xdd5a ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_str 0x000f314c 0x6856 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_str 0x000f314c 0xe2d24 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_str 0x000f314c 0xe2863 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_str 0x000f314c 0xd85a1 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_str 0x000f314c 0xdf110 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_str 0x000f314c 0x8c25 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_str 0x000f314c 0x908e ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_str 0x000f314c 0x8c29 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_str 0x000f314c 0xdae34 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_str 0x000f314c 0xd98a7 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_str 0x000f314c 0xd9a9c ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_str 0x000f314c 0xe5b91 ./STM32_WPAN/App/app_ble.o + .debug_str 0x000f314c 0xe24da ./STM32_WPAN/App/p2p_server_app.o + .debug_str 0x000f314c 0xdad23 ./STM32_WPAN/Target/hw_ipcc.o + .debug_str 0x000f314c 0xd91f9 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_str 0x000f314c 0xd9590 ./Utilities/sequencer/stm32_seq.o + +.comment 0x00000000 0x43 + .comment 0x00000000 0x43 ./Core/Src/app_debug.o + 0x44 (size before relaxing) + .comment 0x00000043 0x44 ./Core/Src/app_entry.o + .comment 0x00000043 0x44 ./Core/Src/hw_timerserver.o + .comment 0x00000043 0x44 ./Core/Src/main.o + .comment 0x00000043 0x44 ./Core/Src/stm32wbxx_hal_msp.o + .comment 0x00000043 0x44 ./Core/Src/stm32wbxx_it.o + .comment 0x00000043 0x44 ./Core/Src/system_stm32wbxx.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .comment 0x00000043 0x44 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .comment 0x00000043 0x44 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .comment 0x00000043 0x44 ./STM32_WPAN/App/app_ble.o + .comment 0x00000043 0x44 ./STM32_WPAN/App/p2p_server_app.o + .comment 0x00000043 0x44 ./STM32_WPAN/Target/hw_ipcc.o + .comment 0x00000043 0x44 ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .comment 0x00000043 0x44 ./Utilities/sequencer/stm32_seq.o + +.debug_frame 0x00000000 0x97bc + .debug_frame 0x00000000 0x110 ./Core/Src/app_debug.o + .debug_frame 0x00000110 0x41c ./Core/Src/app_entry.o + .debug_frame 0x0000052c 0x2b4 ./Core/Src/hw_timerserver.o + .debug_frame 0x000007e0 0x17c ./Core/Src/main.o + .debug_frame 0x0000095c 0x20c ./Core/Src/stm32wbxx_hal_msp.o + .debug_frame 0x00000b68 0x158 ./Core/Src/stm32wbxx_it.o + .debug_frame 0x00000cc0 0x58 ./Core/Src/system_stm32wbxx.o + .debug_frame 0x00000d18 0xa34 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o + .debug_frame 0x0000174c 0x49c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o + .debug_frame 0x00001be8 0x174 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o + .debug_frame 0x00001d5c 0x1bc ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o + .debug_frame 0x00001f18 0xc38 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o + .debug_frame 0x00002b50 0x100 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o + .debug_frame 0x00002c50 0x29c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o + .debug_frame 0x00002eec 0x344 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o + .debug_frame 0x00003230 0xb00 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o + .debug_frame 0x00003d30 0xa0c ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o + .debug_frame 0x0000473c 0xf38 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o + .debug_frame 0x00005674 0x3f4 ./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o + .debug_frame 0x00005a68 0x888 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o + .debug_frame 0x000062f0 0x7c0 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o + .debug_frame 0x00006ab0 0x360 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o + .debug_frame 0x00006e10 0xc58 ./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o + .debug_frame 0x00007a68 0x7c ./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o + .debug_frame 0x00007ae4 0x80 ./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o + .debug_frame 0x00007b64 0x2fc ./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o + .debug_frame 0x00007e60 0x494 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o + .debug_frame 0x000082f4 0x178 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o + .debug_frame 0x0000846c 0x38 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o + .debug_frame 0x000084a4 0x178 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o + .debug_frame 0x0000861c 0x38 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o + .debug_frame 0x00008654 0x278 ./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o + .debug_frame 0x000088cc 0x38 ./Middlewares/ST/STM32_WPAN/utilities/otp.o + .debug_frame 0x00008904 0x1e8 ./Middlewares/ST/STM32_WPAN/utilities/stm_list.o + .debug_frame 0x00008aec 0x2a8 ./STM32_WPAN/App/app_ble.o + .debug_frame 0x00008d94 0x80 ./STM32_WPAN/App/p2p_server_app.o + .debug_frame 0x00008e14 0x4fc ./STM32_WPAN/Target/hw_ipcc.o + .debug_frame 0x00009310 0xec ./Utilities/lpm/tiny_lpm/stm32_lpm.o + .debug_frame 0x000093fc 0x34c ./Utilities/sequencer/stm32_seq.o + .debug_frame 0x00009748 0x20 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memset.o) + .debug_frame 0x00009768 0x2c /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-init.o) + .debug_frame 0x00009794 0x28 /opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.linux64_1.0.0.202410170706/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(libc_a-memcpy-stub.o) + +.debug_line_str + 0x00000000 0x68 + .debug_line_str + 0x00000000 0x68 ./Core/Startup/startup_stm32wb55cgux.o diff --git a/firmware/memory_chip_gone/Debug/objects.list b/firmware/memory_chip_gone/Debug/objects.list new file mode 100644 index 0000000..2445dd5 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/objects.list @@ -0,0 +1,53 @@ +"./Core/Src/app_debug.o" +"./Core/Src/app_entry.o" +"./Core/Src/hw_timerserver.o" +"./Core/Src/main.o" +"./Core/Src/stm32_lpm_if.o" +"./Core/Src/stm32wbxx_hal_msp.o" +"./Core/Src/stm32wbxx_it.o" +"./Core/Src/syscalls.o" +"./Core/Src/sysmem.o" +"./Core/Src/system_stm32wbxx.o" +"./Core/Startup/startup_stm32wb55cgux.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.o" +"./Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.o" +"./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.o" +"./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.o" +"./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.o" +"./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.o" +"./Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.o" +"./Middlewares/ST/STM32_WPAN/ble/core/template/osal.o" +"./Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.o" +"./Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.o" +"./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.o" +"./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.o" +"./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.o" +"./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.o" +"./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.o" +"./Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.o" +"./Middlewares/ST/STM32_WPAN/utilities/dbg_trace.o" +"./Middlewares/ST/STM32_WPAN/utilities/otp.o" +"./Middlewares/ST/STM32_WPAN/utilities/stm_list.o" +"./Middlewares/ST/STM32_WPAN/utilities/stm_queue.o" +"./STM32_WPAN/App/app_ble.o" +"./STM32_WPAN/App/p2p_server_app.o" +"./STM32_WPAN/Target/hw_ipcc.o" +"./Utilities/lpm/tiny_lpm/stm32_lpm.o" +"./Utilities/sequencer/stm32_seq.o" diff --git a/firmware/memory_chip_gone/Debug/objects.mk b/firmware/memory_chip_gone/Debug/objects.mk new file mode 100644 index 0000000..b471e98 --- /dev/null +++ b/firmware/memory_chip_gone/Debug/objects.mk @@ -0,0 +1,9 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +USER_OBJS := + +LIBS := + diff --git a/firmware/memory_chip_gone/Debug/sources.mk b/firmware/memory_chip_gone/Debug/sources.mk new file mode 100644 index 0000000..0622c7a --- /dev/null +++ b/firmware/memory_chip_gone/Debug/sources.mk @@ -0,0 +1,38 @@ +################################################################################ +# Automatically-generated file. Do not edit! +# Toolchain: GNU Tools for STM32 (13.3.rel1) +################################################################################ + +ELF_SRCS := +OBJ_SRCS := +S_SRCS := +C_SRCS := +S_UPPER_SRCS := +O_SRCS := +CYCLO_FILES := +SIZE_OUTPUT := +OBJDUMP_LIST := +SU_FILES := +EXECUTABLES := +OBJS := +MAP_FILES := +S_DEPS := +S_UPPER_DEPS := +C_DEPS := + +# Every subdirectory with source files must be described here +SUBDIRS := \ +Core/Src \ +Core/Startup \ +Drivers/STM32WBxx_HAL_Driver/Src \ +Middlewares/ST/STM32_WPAN/ble/core/auto \ +Middlewares/ST/STM32_WPAN/ble/core/template \ +Middlewares/ST/STM32_WPAN/ble/svc/Src \ +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci \ +Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl \ +Middlewares/ST/STM32_WPAN/utilities \ +STM32_WPAN/App \ +STM32_WPAN/Target \ +Utilities/lpm/tiny_lpm \ +Utilities/sequencer \ + diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h b/firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h new file mode 100644 index 0000000..8969f72 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/Include/stm32wb55xx.h @@ -0,0 +1,13690 @@ +/** + ****************************************************************************** + * @file stm32wb55xx.h + * @author MCD Application Team + * @brief CMSIS Cortex Device Peripheral Access Layer Header File. + * This file contains all the peripheral register's definitions, bits + * definitions and memory mapping for stm32wb55xx devices. + * + * This file contains: + * - Data structures and the address mapping for all peripherals + * - Peripheral's registers declarations and bits definition + * - Macros to access peripheral's registers hardware + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019-2022 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. + * + ****************************************************************************** + */ + +/** @addtogroup CMSIS_Device + * @{ + */ + +/** @addtogroup stm32wb55xx + * @{ + */ + +#ifndef __STM32WB55xx_H +#define __STM32WB55xx_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** @addtogroup Configuration_section_for_CMSIS + * @{ + */ +/** + * @brief Configuration of the Cortex-M4 Processor and Core Peripherals + */ +#define __CM4_REV 1U /*!< Core Revision r0p1 */ +#define __MPU_PRESENT 1U /*!< M4 provides an MPU */ +#define __VTOR_PRESENT 1U /*!< Vector Table Register supported */ +#define __NVIC_PRIO_BITS 4U /*!< STM32WBxx uses 4 Bits for the Priority Levels */ +#define __Vendor_SysTickConfig 0U /*!< Set to 1 if different SysTick Config is used */ +#define __FPU_PRESENT 1U /*!< FPU present */ +/** + * @} + */ + +/** @addtogroup Peripheral_interrupt_number_definition + * @{ + */ + +/** + * @brief stm32wb55xx Interrupt Number Definition, according to the selected device + * in @ref Library_configuration_section + */ +/*!< Interrupt Number Definition for M4 */ +typedef enum +{ + /****** Cortex-M4 Processor Exceptions Numbers ****************************************************************/ + NonMaskableInt_IRQn = -14, /*!< Non Maskable Interrupt */ + HardFault_IRQn = -13, /*!< Cortex-M4 Hard Fault Interrupt */ + MemoryManagement_IRQn = -12, /*!< Cortex-M4 Memory Management Interrupt */ + BusFault_IRQn = -11, /*!< Cortex-M4 Bus Fault Interrupt */ + UsageFault_IRQn = -10, /*!< Cortex-M4 Usage Fault Interrupt */ + SVCall_IRQn = -5, /*!< Cortex-M4 SV Call Interrupt */ + DebugMonitor_IRQn = -4, /*!< Cortex-M4 Debug Monitor Interrupt */ + PendSV_IRQn = -2, /*!< Cortex-M4 Pend SV Interrupt */ + SysTick_IRQn = -1, /*!< Cortex-M4 System Tick Interrupt */ + + /************* STM32WBxx specific Interrupt Numbers on M4 core ************************************************/ + WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */ + PVD_PVM_IRQn = 1, /*!< PVD and PVM detector */ + TAMP_STAMP_LSECSS_IRQn = 2, /*!< RTC Tamper and TimeStamp Interrupts and LSECSS Interrupts */ + RTC_WKUP_IRQn = 3, /*!< RTC Wakeup Interrupt */ + FLASH_IRQn = 4, /*!< FLASH (CFI) global Interrupt */ + RCC_IRQn = 5, /*!< RCC Interrupt */ + EXTI0_IRQn = 6, /*!< EXTI Line 0 Interrupt */ + EXTI1_IRQn = 7, /*!< EXTI Line 1 Interrupt */ + EXTI2_IRQn = 8, /*!< EXTI Line 2 Interrupt */ + EXTI3_IRQn = 9, /*!< EXTI Line 3 Interrupt */ + EXTI4_IRQn = 10, /*!< EXTI Line 4 Interrupt */ + DMA1_Channel1_IRQn = 11, /*!< DMA1 Channel 1 Interrupt */ + DMA1_Channel2_IRQn = 12, /*!< DMA1 Channel 2 Interrupt */ + DMA1_Channel3_IRQn = 13, /*!< DMA1 Channel 3 Interrupt */ + DMA1_Channel4_IRQn = 14, /*!< DMA1 Channel 4 Interrupt */ + DMA1_Channel5_IRQn = 15, /*!< DMA1 Channel 5 Interrupt */ + DMA1_Channel6_IRQn = 16, /*!< DMA1 Channel 6 Interrupt */ + DMA1_Channel7_IRQn = 17, /*!< DMA1 Channel 7 Interrupt */ + ADC1_IRQn = 18, /*!< ADC1 Interrupt */ + USB_HP_IRQn = 19, /*!< USB High Priority Interrupt */ + USB_LP_IRQn = 20, /*!< USB Low Priority Interrupt (including USB wakeup) */ + C2SEV_PWR_C2H_IRQn = 21, /*!< CPU2 SEV Interrupt */ + COMP_IRQn = 22, /*!< COMP1 and COMP2 Interrupts */ + EXTI9_5_IRQn = 23, /*!< EXTI Lines [9:5] Interrupt */ + TIM1_BRK_IRQn = 24, /*!< TIM1 Break Interrupt */ + TIM1_UP_TIM16_IRQn = 25, /*!< TIM1 Update and TIM16 global Interrupts */ + TIM1_TRG_COM_TIM17_IRQn = 26, /*!< TIM1 Trigger and Communication and TIM17 global Interrupts */ + TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */ + TIM2_IRQn = 28, /*!< TIM2 Global Interrupt */ + PKA_IRQn = 29, /*!< PKA Interrupt */ + I2C1_EV_IRQn = 30, /*!< I2C1 Event Interrupt */ + I2C1_ER_IRQn = 31, /*!< I2C1 Error Interrupt */ + I2C3_EV_IRQn = 32, /*!< I2C3 Event Interrupt */ + I2C3_ER_IRQn = 33, /*!< I2C3 Error Interrupt */ + SPI1_IRQn = 34, /*!< SPI1 Interrupt */ + SPI2_IRQn = 35, /*!< SPI2 Interrupt */ + USART1_IRQn = 36, /*!< USART1 Interrupt */ + LPUART1_IRQn = 37, /*!< LPUART1 Interrupt */ + SAI1_IRQn = 38, /*!< SAI1 A and B global interrupt */ + TSC_IRQn = 39, /*!< TSC Interrupt */ + EXTI15_10_IRQn = 40, /*!< EXTI Lines1[15:10 ]Interrupts */ + RTC_Alarm_IRQn = 41, /*!< RTC Alarms (A and B) Interrupt */ + CRS_IRQn = 42, /*!< CRS interrupt */ + PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQn = 43, /*!< PWR switching on the fly interrupt + PWR end of BLE activity interrupt + PWR end of 802.15.4 (Zigbee) activity interrupt + PWR end of critical radio phase interrupt */ + IPCC_C1_RX_IRQn = 44, /*!< IPCC RX Occupied Interrupt */ + IPCC_C1_TX_IRQn = 45, /*!< IPCC TX Free Interrupt */ + HSEM_IRQn = 46, /*!< HSEM Interrupt */ + LPTIM1_IRQn = 47, /*!< LPTIM1 Interrupt */ + LPTIM2_IRQn = 48, /*!< LPTIM2 Interrupt */ + LCD_IRQn = 49, /*!< LCD Interrupt */ + QUADSPI_IRQn = 50, /*!< QUADSPI Interrupt */ + AES1_IRQn = 51, /*!< AES1 Interrupt */ + AES2_IRQn = 52, /*!< AES2 Interrupt */ + RNG_IRQn = 53, /*!< RNG Interrupt */ + FPU_IRQn = 54, /*!< FPU Interrupt */ + DMA2_Channel1_IRQn = 55, /*!< DMA2 Channel 1 Interrupt */ + DMA2_Channel2_IRQn = 56, /*!< DMA2 Channel 2 Interrupt */ + DMA2_Channel3_IRQn = 57, /*!< DMA2 Channel 3 Interrupt */ + DMA2_Channel4_IRQn = 58, /*!< DMA2 Channel 4 Interrupt */ + DMA2_Channel5_IRQn = 59, /*!< DMA2 Channel 5 Interrupt */ + DMA2_Channel6_IRQn = 60, /*!< DMA2 Channel 6 Interrupt */ + DMA2_Channel7_IRQn = 61, /*!< DMA2 Channel 7 Interrupt */ + DMAMUX1_OVR_IRQn = 62 /*!< DMAMUX1 overrun Interrupt */ +} IRQn_Type; +/** + * @} + */ + +#include "core_cm4.h" /* Cortex-M4 processor and core peripherals */ +#include "system_stm32wbxx.h" +#include + +/** @addtogroup Peripheral_registers_structures + * @{ + */ + +/** + * @brief Analog to Digital Converter + */ +typedef struct +{ + __IO uint32_t ISR; /*!< ADC interrupt and status register, Address offset: 0x00 */ + __IO uint32_t IER; /*!< ADC interrupt enable register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< ADC control register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< ADC configuration register 1, Address offset: 0x0C */ + __IO uint32_t CFGR2; /*!< ADC configuration register 2, Address offset: 0x10 */ + __IO uint32_t SMPR1; /*!< ADC sampling time register 1, Address offset: 0x14 */ + __IO uint32_t SMPR2; /*!< ADC sampling time register 2, Address offset: 0x18 */ + uint32_t RESERVED1; /*!< Reserved, 0x1C */ + __IO uint32_t TR1; /*!< ADC analog watchdog 1 threshold register, Address offset: 0x20 */ + __IO uint32_t TR2; /*!< ADC analog watchdog 2 threshold register, Address offset: 0x24 */ + __IO uint32_t TR3; /*!< ADC analog watchdog 3 threshold register, Address offset: 0x28 */ + uint32_t RESERVED2; /*!< Reserved, 0x2C */ + __IO uint32_t SQR1; /*!< ADC group regular sequencer register 1, Address offset: 0x30 */ + __IO uint32_t SQR2; /*!< ADC group regular sequencer register 2, Address offset: 0x34 */ + __IO uint32_t SQR3; /*!< ADC group regular sequencer register 3, Address offset: 0x38 */ + __IO uint32_t SQR4; /*!< ADC group regular sequencer register 4, Address offset: 0x3C */ + __IO uint32_t DR; /*!< ADC group regular data register, Address offset: 0x40 */ + uint32_t RESERVED3; /*!< Reserved, 0x44 */ + uint32_t RESERVED4; /*!< Reserved, 0x48 */ + __IO uint32_t JSQR; /*!< ADC group injected sequencer register, Address offset: 0x4C */ + uint32_t RESERVED5[4]; /*!< Reserved, 0x50 - 0x5C */ + __IO uint32_t OFR1; /*!< ADC offset register 1, Address offset: 0x60 */ + __IO uint32_t OFR2; /*!< ADC offset register 2, Address offset: 0x64 */ + __IO uint32_t OFR3; /*!< ADC offset register 3, Address offset: 0x68 */ + __IO uint32_t OFR4; /*!< ADC offset register 4, Address offset: 0x6C */ + uint32_t RESERVED6[4]; /*!< Reserved, 0x70 - 0x7C */ + __IO uint32_t JDR1; /*!< ADC group injected rank 1 data register, Address offset: 0x80 */ + __IO uint32_t JDR2; /*!< ADC group injected rank 2 data register, Address offset: 0x84 */ + __IO uint32_t JDR3; /*!< ADC group injected rank 3 data register, Address offset: 0x88 */ + __IO uint32_t JDR4; /*!< ADC group injected rank 4 data register, Address offset: 0x8C */ + uint32_t RESERVED7[4]; /*!< Reserved, 0x090 - 0x09C */ + __IO uint32_t AWD2CR; /*!< ADC analog watchdog 1 configuration register, Address offset: 0xA0 */ + __IO uint32_t AWD3CR; /*!< ADC analog watchdog 3 Configuration Register, Address offset: 0xA4 */ + uint32_t RESERVED8; /*!< Reserved, 0x0A8 */ + uint32_t RESERVED9; /*!< Reserved, 0x0AC */ + __IO uint32_t DIFSEL; /*!< ADC differential mode selection register, Address offset: 0xB0 */ + __IO uint32_t CALFACT; /*!< ADC calibration factors, Address offset: 0xB4 */ + +} ADC_TypeDef; + +typedef struct +{ + uint32_t RESERVED1; /*!< Reserved, Address offset: ADC1 base address + 0x300 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: ADC1 base address + 0x304 */ + __IO uint32_t CCR; /*!< ADC common configuration register, Address offset: ADC1 base address + 0x308 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: ADC1 base address + 0x30C */ +} ADC_Common_TypeDef; + +/** + * @brief Comparator + */ +typedef struct +{ + __IO uint32_t CSR; /*!< COMP control and status register, Address offset: 0x00 */ +} COMP_TypeDef; + +typedef struct +{ + __IO uint32_t CSR; /*!< COMP control and status register, used for bits common to several COMP instances, Address offset: 0x00 */ +} COMP_Common_TypeDef; + +/** + * @brief CRC calculation unit + */ +typedef struct +{ + __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */ + __IO uint32_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */ + uint32_t RESERVED2; /*!< Reserved, 0x0C */ + __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */ + __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */ +} CRC_TypeDef; + +/** + * @brief Debug MCU + */ +typedef struct +{ + __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */ + __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */ + uint32_t RESERVED1[13]; /*!< Reserved, 0x08-0x38 */ + __IO uint32_t APB1FZR1; /*!< Debug MCU CPU1 APB1 freeze register, Address offset: 0x3C */ + __IO uint32_t C2APB1FZR1; /*!< Debug MCU CPU2 APB1 freeze register, Address offset: 0x40 */ + __IO uint32_t APB1FZR2; /*!< Debug MCU CPU1 APB1 freeze register, Address offset: 0x44 */ + __IO uint32_t C2APB1FZR2; /*!< Debug MCU CPU2 APB1 freeze register, Address offset: 0x48 */ + __IO uint32_t APB2FZR; /*!< Debug MCU CPU1 APB2 freeze register, Address offset: 0x4C */ + __IO uint32_t C2APB2FZR; /*!< Debug MCU CPU2 APB2 freeze register, Address offset: 0x50 */ +} DBGMCU_TypeDef; + +/** + * @brief DMA Controller + */ +typedef struct +{ + __IO uint32_t CCR; /*!< DMA channel x configuration register 0x00 */ + __IO uint32_t CNDTR; /*!< DMA channel x number of data register 0x04 */ + __IO uint32_t CPAR; /*!< DMA channel x peripheral address register 0x08 */ + __IO uint32_t CMAR; /*!< DMA channel x memory address register 0x0C */ + uint32_t RESERVED; /*!< Reserved, 0x10 */ +} DMA_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */ + __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */ +} DMA_TypeDef; + +/** + * @brief DMA Multiplexer + */ +typedef struct +{ + __IO uint32_t CCR; /*!< DMA Multiplexer Channel x Control Register Address offset: 0x0004 * (channel x) */ +} DMAMUX_Channel_TypeDef; + +typedef struct +{ + __IO uint32_t CSR; /*!< DMA Channel Status Register Address offset: 0x0080 */ + __IO uint32_t CFR; /*!< DMA Channel Clear Flag Register Address offset: 0x0084 */ +} DMAMUX_ChannelStatus_TypeDef; + +typedef struct +{ + __IO uint32_t RGCR; /*!< DMA Request Generator x Control Register Address offset: 0x0100 + 0x0004 * (Req Gen x) */ +} DMAMUX_RequestGen_TypeDef; + +typedef struct +{ + __IO uint32_t RGSR; /*!< DMA Request Generator Status Register Address offset: 0x0140 */ + __IO uint32_t RGCFR; /*!< DMA Request Generator Clear Flag Register Address offset: 0x0144 */ +} DMAMUX_RequestGenStatus_TypeDef; + +/** + * @brief FLASH Registers + */ +typedef struct +{ + __IO uint32_t ACR; /*!< FLASH Access control register, Address offset: 0x00 */ + __IO uint32_t RESERVED; /*!< Reserved, Address offset: 0x04 */ + __IO uint32_t KEYR; /*!< FLASH Key register, Address offset: 0x08 */ + __IO uint32_t OPTKEYR; /*!< FLASH Option Key register, Address offset: 0x0C */ + __IO uint32_t SR; /*!< FLASH Status register, Address offset: 0x10 */ + __IO uint32_t CR; /*!< FLASH Control register, Address offset: 0x14 */ + __IO uint32_t ECCR; /*!< FLASH ECC register, Address offset: 0x18 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t OPTR; /*!< FLASH Option register, Address offset: 0x20 */ + __IO uint32_t PCROP1ASR; /*!< FLASH Bank 1 PCROP area A Start address register, Address offset: 0x24 */ + __IO uint32_t PCROP1AER; /*!< FLASH Bank 1 PCROP area A End address register, Address offset: 0x28 */ + __IO uint32_t WRP1AR; /*!< FLASH Bank 1 WRP area A address register, Address offset: 0x2C */ + __IO uint32_t WRP1BR; /*!< FLASH Bank 1 WRP area B address register, Address offset: 0x30 */ + __IO uint32_t PCROP1BSR; /*!< FLASH Bank 1 PCROP area B Start address register, Address offset: 0x34 */ + __IO uint32_t PCROP1BER; /*!< FLASH Bank 1 PCROP area B End address register, Address offset: 0x38 */ + __IO uint32_t IPCCBR; /*!< FLASH IPCC data buffer address, Address offset: 0x3C */ + uint32_t RESERVED2[7]; /*!< Reserved, Address offset: 0x40-0x58 */ + __IO uint32_t C2ACR; /*!< FLASH Core MO+ Access Control Register , Address offset: 0x5C */ + __IO uint32_t C2SR; /*!< FLASH Core MO+ Status Register, Address offset: 0x60 */ + __IO uint32_t C2CR; /*!< FLASH Core MO+ Control register, Address offset: 0x64 */ + uint32_t RESERVED3[6]; /*!< Reserved, Address offset: 0x68-0x7C */ + __IO uint32_t SFR; /*!< FLASH secure start address, Address offset: 0x80 */ + __IO uint32_t SRRVR; /*!< FlASH secure SRAM2 start addr and CPU2 reset vector Address offset: 0x84 */ +} FLASH_TypeDef; + +/** + * @brief General Purpose I/O + */ +typedef struct +{ + __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */ + __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */ + __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */ + __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */ + __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */ + __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */ + __IO uint32_t BSRR; /*!< GPIO port bit set/reset register, Address offset: 0x18 */ + __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */ + __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */ + __IO uint32_t BRR; /*!< GPIO Bit Reset register, Address offset: 0x28 */ +} GPIO_TypeDef; + +/** + * @brief Inter-integrated Circuit Interface + */ +typedef struct +{ + __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */ + __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */ + __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */ + __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */ + __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */ + __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */ + __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */ + __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */ + __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */ + __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */ +} I2C_TypeDef; + +/** + * @brief Independent WATCHDOG + */ +typedef struct +{ + __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */ + __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */ + __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */ + __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */ + __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */ +} IWDG_TypeDef; + +/** + * @brief LPTIMER + */ +typedef struct +{ + __IO uint32_t ISR; /*!< LPTIM Interrupt and Status register, Address offset: 0x00 */ + __IO uint32_t ICR; /*!< LPTIM Interrupt Clear register, Address offset: 0x04 */ + __IO uint32_t IER; /*!< LPTIM Interrupt Enable register, Address offset: 0x08 */ + __IO uint32_t CFGR; /*!< LPTIM Configuration register, Address offset: 0x0C */ + __IO uint32_t CR; /*!< LPTIM Control register, Address offset: 0x10 */ + __IO uint32_t CMP; /*!< LPTIM Compare register, Address offset: 0x14 */ + __IO uint32_t ARR; /*!< LPTIM Autoreload register, Address offset: 0x18 */ + __IO uint32_t CNT; /*!< LPTIM Counter register, Address offset: 0x1C */ + __IO uint32_t OR; /*!< LPTIM Option register, Address offset: 0x20 */ +} LPTIM_TypeDef; + +/** + * @brief Power Control + */ +typedef struct +{ + __IO uint32_t CR1; /*!< PWR Power Control Register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< PWR Power Control Register 2, Address offset: 0x04 */ + __IO uint32_t CR3; /*!< PWR Power Control Register 3, Address offset: 0x08 */ + __IO uint32_t CR4; /*!< PWR Power Control Register 4, Address offset: 0x0C */ + __IO uint32_t SR1; /*!< PWR Power Status Register 1, Address offset: 0x10 */ + __IO uint32_t SR2; /*!< PWR Power Status Register 2, Address offset: 0x14 */ + __IO uint32_t SCR; /*!< PWR Power Status Reset Register, Address offset: 0x18 */ + __IO uint32_t CR5; /*!< PWR Power Control Register 5, Address offset: 0x1C */ + __IO uint32_t PUCRA; /*!< PWR Pull-Up Control Register of port A, Address offset: 0x20 */ + __IO uint32_t PDCRA; /*!< PWR Pull-Down Control Register of port A, Address offset: 0x24 */ + __IO uint32_t PUCRB; /*!< PWR Pull-Up Control Register of port B, Address offset: 0x28 */ + __IO uint32_t PDCRB; /*!< PWR Pull-Down Control Register of port B, Address offset: 0x2C */ + __IO uint32_t PUCRC; /*!< PWR Pull-Up Control Register of port C, Address offset: 0x30 */ + __IO uint32_t PDCRC; /*!< PWR Pull-Down Control Register of port C, Address offset: 0x34 */ + __IO uint32_t PUCRD; /*!< PWR Pull-Up Control Register of port D, Address offset: 0x38 */ + __IO uint32_t PDCRD; /*!< PWR Pull-Down Control Register of port D, Address offset: 0x3C */ + __IO uint32_t PUCRE; /*!< PWR Pull-Up Control Register of port E, Address offset: 0x40 */ + __IO uint32_t PDCRE; /*!< PWR Pull-Down Control Register of port E, Address offset: 0x44 */ + uint32_t RESERVED0[4]; /*!< Reserved, Address offset: 0x48-0x54 */ + __IO uint32_t PUCRH; /*!< PWR Pull-Up Control Register of port H, Address offset: 0x58 */ + __IO uint32_t PDCRH; /*!< PWR Pull-Down Control Register of port H, Address offset: 0x5C */ + uint32_t RESERVED1[8]; /*!< Reserved, Address offset: 0x60-0x7C */ + __IO uint32_t C2CR1; /*!< PWR Power Control Register 1 for CPU2, Address offset: 0x80 */ + __IO uint32_t C2CR3; /*!< PWR Power Control Register 3 for CPU2, Address offset: 0x84 */ + __IO uint32_t EXTSCR; /*!< PWR Power Status Reset Register for CPU2, Address offset: 0x88 */ +} PWR_TypeDef; + +/** + * @brief QUAD Serial Peripheral Interface + */ +typedef struct +{ + __IO uint32_t CR; /*!< QUADSPI Control register, Address offset: 0x00 */ + __IO uint32_t DCR; /*!< QUADSPI Device Configuration register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< QUADSPI Status register, Address offset: 0x08 */ + __IO uint32_t FCR; /*!< QUADSPI Flag Clear register, Address offset: 0x0C */ + __IO uint32_t DLR; /*!< QUADSPI Data Length register, Address offset: 0x10 */ + __IO uint32_t CCR; /*!< QUADSPI Communication Configuration register, Address offset: 0x14 */ + __IO uint32_t AR; /*!< QUADSPI Address register, Address offset: 0x18 */ + __IO uint32_t ABR; /*!< QUADSPI Alternate Bytes register, Address offset: 0x1C */ + __IO uint32_t DR; /*!< QUADSPI Data register, Address offset: 0x20 */ + __IO uint32_t PSMKR; /*!< QUADSPI Polling Status Mask register, Address offset: 0x24 */ + __IO uint32_t PSMAR; /*!< QUADSPI Polling Status Match register, Address offset: 0x28 */ + __IO uint32_t PIR; /*!< QUADSPI Polling Interval register, Address offset: 0x2C */ + __IO uint32_t LPTR; /*!< QUADSPI Low Power Timeout register, Address offset: 0x30 */ +} QUADSPI_TypeDef; + +/** + * @brief Reset and Clock Control + */ +typedef struct +{ + __IO uint32_t CR; /*!< RCC clock Control Register, Address offset: 0x00 */ + __IO uint32_t ICSCR; /*!< RCC Internal Clock Sources Calibration Register, Address offset: 0x04 */ + __IO uint32_t CFGR; /*!< RCC Clocks Configuration Register, Address offset: 0x08 */ + __IO uint32_t PLLCFGR; /*!< RCC System PLL configuration Register, Address offset: 0x0C */ + __IO uint32_t PLLSAI1CFGR; /*!< RCC PLL SAI1 configuration Register, Address offset: 0x10 */ + uint32_t RESERVED0; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t CIER; /*!< RCC Clock Interrupt Enable Register, Address offset: 0x18 */ + __IO uint32_t CIFR; /*!< RCC Clock Interrupt Flag Register, Address offset: 0x1C */ + __IO uint32_t CICR; /*!< RCC Clock Interrupt Clear Register, Address offset: 0x20 */ + __IO uint32_t SMPSCR; /*!< RCC SMPS step-down converter control register, Address offset: 0x24 */ + __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x28 */ + __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x2C */ + __IO uint32_t AHB3RSTR; /*!< RCC AHB3 & AHB4 peripheral reset register, Address offset: 0x30 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x34 */ + __IO uint32_t APB1RSTR1; /*!< RCC APB1 peripheral reset register 1, Address offset: 0x38 */ + __IO uint32_t APB1RSTR2; /*!< RCC APB1 peripheral reset register 2, Address offset: 0x3C */ + __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x40 */ + __IO uint32_t APB3RSTR; /*!< RCC APB3 peripheral reset register, Address offset: 0x44 */ + __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clocks enable register, Address offset: 0x48 */ + __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clocks enable register, Address offset: 0x4C */ + __IO uint32_t AHB3ENR; /*!< RCC AHB3 & AHB4 peripheral clocks enable register, Address offset: 0x50 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x54 */ + __IO uint32_t APB1ENR1; /*!< RCC APB1 peripheral clocks enable register 1, Address offset: 0x58 */ + __IO uint32_t APB1ENR2; /*!< RCC APB1 peripheral clocks enable register 2, Address offset: 0x5C */ + __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clocks enable register, Address offset: 0x60 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x64 */ + __IO uint32_t AHB1SMENR; /*!< RCC AHB1 peripheral clocks enable in sleep and stop modes register, Address offset: 0x68 */ + __IO uint32_t AHB2SMENR; /*!< RCC AHB2 peripheral clocks enable in sleep and stop modes register, Address offset: 0x6C */ + __IO uint32_t AHB3SMENR; /*!< RCC AHB3 & AHB4 peripheral clocks enable in sleep and stop modes register, Address offset: 0x70 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x74 */ + __IO uint32_t APB1SMENR1; /*!< RCC APB1 peripheral clocks enable in sleep mode and stop modes register 1, Address offset: 0x78 */ + __IO uint32_t APB1SMENR2; /*!< RCC APB1 peripheral clocks enable in sleep mode and stop modes register 2, Address offset: 0x7C */ + __IO uint32_t APB2SMENR; /*!< RCC APB2 peripheral clocks enable in sleep mode and stop modes register, Address offset: 0x80 */ + uint32_t RESERVED5; /*!< Reserved, Address offset: 0x84 */ + __IO uint32_t CCIPR; /*!< RCC Peripherals Clock Configuration Independent Register, Address offset: 0x88 */ + uint32_t RESERVED6; /*!< Reserved, Address offset: 0x8C */ + __IO uint32_t BDCR; /*!< RCC Backup Domain Control Register, Address offset: 0x90 */ + __IO uint32_t CSR; /*!< RCC Control and Status Register, Address offset: 0x94 */ + __IO uint32_t CRRCR; /*!< RCC Clock Recovery RC Register, Address offset: 0x98 */ + __IO uint32_t HSECR; /*!< RCC HSE Clock Register, Address offset: 0x9C */ + uint32_t RESERVED7[26]; /*!< Reserved, Address offset: 0xA0-0x104 */ + __IO uint32_t EXTCFGR; /*!< RCC Extended Clock Recovery Register, Address offset: 0x108 */ + uint32_t RESERVED8[15]; /*!< Reserved, Address offset: 0x10C-0x144 */ + __IO uint32_t C2AHB1ENR; /*!< RRCC AHB1 peripheral CPU2 clocks enable register, Address offset: 0x148 */ + __IO uint32_t C2AHB2ENR; /*!< RCC AHB2 peripheral CPU2 clocks enable register, Address offset: 0x14C */ + __IO uint32_t C2AHB3ENR; /*!< RCC AHB3 & AHB4 peripheral CPU2 clocks enable register,, Address offset: 0x150 */ + uint32_t RESERVED9; /*!< Reserved, Address offset: 0x154 */ + __IO uint32_t C2APB1ENR1; /*!< RCC APB1 peripheral CPU2 clocks enable register 1, Address offset: 0x158 */ + __IO uint32_t C2APB1ENR2; /*!< RCC APB1 peripheral CPU2 clocks enable register 2, Address offset: 0x15C */ + __IO uint32_t C2APB2ENR; /*!< RCC APB2 peripheral CPU2 clocks enable register 1, Address offset: 0x160 */ + __IO uint32_t C2APB3ENR; /*!< RCC APB3 peripheral CPU2 clocks enable register 1, Address offset: 0x164 */ + __IO uint32_t C2AHB1SMENR; /*!< RCC AHB1 peripheral CPU2 clocks enable in sleep and stop modes register, Address offset: 0x168 */ + __IO uint32_t C2AHB2SMENR; /*!< RCC AHB2 peripheral CPU2 clocks enable in sleep and stop modes register, Address offset: 0x16C */ + __IO uint32_t C2AHB3SMENR; /*!< RCC AHB3 & AHB4 peripheral CPU2 clocks enable in sleep and stop modes register, Address offset: 0x170 */ + uint32_t RESERVED10; /*!< Reserved, */ + __IO uint32_t C2APB1SMENR1; /*!< RCC APB1 peripheral CPU2 clocks enable in sleep mode and stop modes register 1, Address offset: 0x178 */ + __IO uint32_t C2APB1SMENR2; /*!< RCC APB1 peripheral CPU2 clocks enable in sleep mode and stop modes register 2, Address offset: 0x17C */ + __IO uint32_t C2APB2SMENR; /*!< RCC APB2 peripheral CPU2 clocks enable in sleep mode and stop modes register, Address offset: 0x180 */ + __IO uint32_t C2APB3SMENR; /*!< RCC APB3 peripheral CPU2 clocks enable in sleep mode and stop modes register, Address offset: 0x184 */ +} RCC_TypeDef; + + + +/** + * @brief Real-Time Clock + */ +typedef struct +{ + __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */ + __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */ + __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */ + __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */ + __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */ + __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x18 */ + __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */ + __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */ + __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */ + __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */ + __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */ + __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */ + __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */ + __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */ + __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */ + __IO uint32_t TAMPCR; /*!< RTC tamper configuration register, Address offset: 0x40 */ + __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */ + __IO uint32_t ALRMBSSR; /*!< RTC alarm B sub second register, Address offset: 0x48 */ + __IO uint32_t OR; /*!< RTC option register, Address offset 0x4C */ + __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */ + __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */ + __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */ + __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */ + __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */ + __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */ + __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */ + __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */ + __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */ + __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */ + __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */ + __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */ + __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */ + __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */ + __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */ + __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */ + __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */ + __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */ + __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */ + __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */ +} RTC_TypeDef; + + + + +/** + * @brief Serial Peripheral Interface + */ +typedef struct +{ + __IO uint32_t CR1; /*!< SPI Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */ + __IO uint32_t SR; /*!< SPI Status register, Address offset: 0x08 */ + __IO uint32_t DR; /*!< SPI data register, Address offset: 0x0C */ + __IO uint32_t CRCPR; /*!< SPI CRC polynomial register, Address offset: 0x10 */ + __IO uint32_t RXCRCR; /*!< SPI Rx CRC register, Address offset: 0x14 */ + __IO uint32_t TXCRCR; /*!< SPI Tx CRC register, Address offset: 0x18 */ +} SPI_TypeDef; + +/** + * @brief System configuration controller + */ +typedef struct +{ + __IO uint32_t MEMRMP; /*!< SYSCFG memory remap register Address offset: 0x00 */ + __IO uint32_t CFGR1; /*!< SYSCFG configuration register 1, Address offset: 0x04 */ + __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */ + __IO uint32_t SCSR; /*!< SYSCFG SRAM2 control and status register, Address offset: 0x18 */ + __IO uint32_t CFGR2; /*!< SYSCFG configuration register 2, Address offset: 0x1C */ + __IO uint32_t SWPR1; /*!< SYSCFG SRAM2 write protection register part 1, Address offset: 0x20 */ + __IO uint32_t SKR; /*!< SYSCFG SRAM2 key register, Address offset: 0x24 */ + __IO uint32_t SWPR2; /*!< SYSCFG write protection register part 2, Address offset: 0x28 */ + uint32_t RESERVED1[53]; /*!< Reserved, Address offset: 0x2C-0xFC */ + __IO uint32_t IMR1; /*!< SYSCFG CPU1 (CORTEX M4) interrupt masks control-status register part 1, Address offset: 0x100 */ + __IO uint32_t IMR2; /*!< SYSCFG CPU1 (CORTEX M4) interrupt masks control-status register part 2, Address offset: 0x104 */ + __IO uint32_t C2IMR1; /*!< SYSCFG CPU2 (CORTEX M0) interrupt masks control-status register part 1, Address offset: 0x108 */ + __IO uint32_t C2IMR2; /*!< SYSCFG CPU2 (CORTEX M0) interrupt masks control-status register part 2, Address offset: 0x10C */ + __IO uint32_t SIPCR; /*!< SYSCFG secure IP control register, Address offset: 0x110 */ + +} SYSCFG_TypeDef; + +/** + * @brief VREFBUF + */ +typedef struct +{ + __IO uint32_t CSR; /*!< VREFBUF control and status register, Address offset: 0x00 */ + __IO uint32_t CCR; /*!< VREFBUF calibration and control register, Address offset: 0x04 */ +} VREFBUF_TypeDef; + +/** + * @brief TIM + */ +typedef struct +{ + __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */ + __IO uint32_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */ + __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */ + __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */ + __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */ + __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */ + __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */ + __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */ + __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */ + __IO uint32_t PSC; /*!< TIM prescaler register, Address offset: 0x28 */ + __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */ + __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */ + __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */ + __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */ + __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */ + __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */ + __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */ + __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */ + __IO uint32_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */ + __IO uint32_t OR; /*!< TIM option register Address offset: 0x50 */ + __IO uint32_t CCMR3; /*!< TIM capture/compare mode register 3, Address offset: 0x54 */ + __IO uint32_t CCR5; /*!< TIM capture/compare register5, Address offset: 0x58 */ + __IO uint32_t CCR6; /*!< TIM capture/compare register6, Address offset: 0x5C */ + __IO uint32_t AF1; /*!< TIM Alternate function option register 1, Address offset: 0x60 */ + __IO uint32_t AF2; /*!< TIM Alternate function option register 2, Address offset: 0x64 */ +} TIM_TypeDef; + +/** + * @brief Universal Synchronous Asynchronous Receiver Transmitter + */ +typedef struct +{ + __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */ + __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */ + __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */ + __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */ + __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */ + __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */ + __IO uint32_t RQR; /*!< USART Request register, Address offset: 0x18 */ + __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */ + __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */ + __IO uint32_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */ + __IO uint32_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */ + __IO uint32_t PRESC; /*!< USART Prescaler register, Address offset: 0x2C */ +} USART_TypeDef; + + +/** + * @brief Window WATCHDOG + */ +typedef struct +{ + __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */ + __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */ +} WWDG_TypeDef; + + +/** + * @brief AES hardware accelerator + */ +typedef struct +{ + __IO uint32_t CR; /*!< AES control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< AES status register, Address offset: 0x04 */ + __IO uint32_t DINR; /*!< AES data input register, Address offset: 0x08 */ + __IO uint32_t DOUTR; /*!< AES data output register, Address offset: 0x0C */ + __IO uint32_t KEYR0; /*!< AES key register 0, Address offset: 0x10 */ + __IO uint32_t KEYR1; /*!< AES key register 1, Address offset: 0x14 */ + __IO uint32_t KEYR2; /*!< AES key register 2, Address offset: 0x18 */ + __IO uint32_t KEYR3; /*!< AES key register 3, Address offset: 0x1C */ + __IO uint32_t IVR0; /*!< AES initialization vector register 0, Address offset: 0x20 */ + __IO uint32_t IVR1; /*!< AES initialization vector register 1, Address offset: 0x24 */ + __IO uint32_t IVR2; /*!< AES initialization vector register 2, Address offset: 0x28 */ + __IO uint32_t IVR3; /*!< AES initialization vector register 3, Address offset: 0x2C */ + __IO uint32_t KEYR4; /*!< AES key register 4, Address offset: 0x30 */ + __IO uint32_t KEYR5; /*!< AES key register 5, Address offset: 0x34 */ + __IO uint32_t KEYR6; /*!< AES key register 6, Address offset: 0x38 */ + __IO uint32_t KEYR7; /*!< AES key register 7, Address offset: 0x3C */ + __IO uint32_t SUSP0R; /*!< AES Suspend register 0, Address offset: 0x40 */ + __IO uint32_t SUSP1R; /*!< AES Suspend register 1, Address offset: 0x44 */ + __IO uint32_t SUSP2R; /*!< AES Suspend register 2, Address offset: 0x48 */ + __IO uint32_t SUSP3R; /*!< AES Suspend register 3, Address offset: 0x4C */ + __IO uint32_t SUSP4R; /*!< AES Suspend register 4, Address offset: 0x50 */ + __IO uint32_t SUSP5R; /*!< AES Suspend register 5, Address offset: 0x54 */ + __IO uint32_t SUSP6R; /*!< AES Suspend register 6, Address offset: 0x58 */ + __IO uint32_t SUSP7R; /*!< AES Suspend register 7, Address offset: 0x6C */ +} AES_TypeDef; + +/** + * @brief RNG + */ +typedef struct +{ + __IO uint32_t CR; /*!< RNG control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< RNG status register, Address offset: 0x04 */ + __IO uint32_t DR; /*!< RNG data register, Address offset: 0x08 */ +} RNG_TypeDef; + +/** + * @brief Touch Sensing Controller (TSC) + */ +typedef struct +{ + __IO uint32_t CR; /*!< TSC control register, Address offset: 0x00 */ + __IO uint32_t IER; /*!< TSC interrupt enable register, Address offset: 0x04 */ + __IO uint32_t ICR; /*!< TSC interrupt clear register, Address offset: 0x08 */ + __IO uint32_t ISR; /*!< TSC interrupt status register, Address offset: 0x0C */ + __IO uint32_t IOHCR; /*!< TSC I/O hysteresis control register, Address offset: 0x10 */ + uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */ + __IO uint32_t IOASCR; /*!< TSC I/O analog switch control register, Address offset: 0x18 */ + uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */ + __IO uint32_t IOSCR; /*!< TSC I/O sampling control register, Address offset: 0x20 */ + uint32_t RESERVED3; /*!< Reserved, Address offset: 0x24 */ + __IO uint32_t IOCCR; /*!< TSC I/O channel control register, Address offset: 0x28 */ + uint32_t RESERVED4; /*!< Reserved, Address offset: 0x2C */ + __IO uint32_t IOGCSR; /*!< TSC I/O group control status register, Address offset: 0x30 */ + __IO uint32_t IOGXCR[7]; /*!< TSC I/O group x counter register, Address offset: 0x34-4C */ +} TSC_TypeDef; + +/** + * @brief LCD + */ +typedef struct +{ + __IO uint32_t CR; /*!< LCD control register, Address offset: 0x00 */ + __IO uint32_t FCR; /*!< LCD frame control register, Address offset: 0x04 */ + __IO uint32_t SR; /*!< LCD status register, Address offset: 0x08 */ + __IO uint32_t CLR; /*!< LCD clear register, Address offset: 0x0C */ + uint32_t RESERVED; /*!< Reserved, Address offset: 0x10 */ + __IO uint32_t RAM[16]; /*!< LCD display memory, Address offset: 0x14-0x50 */ +} LCD_TypeDef; + +/** + * @brief Universal Serial Bus Full Speed Device + */ +typedef struct +{ + __IO uint16_t EP0R; /*!< USB Endpoint 0 register, Address offset: 0x00 */ + __IO uint16_t RESERVED0; /*!< Reserved */ + __IO uint16_t EP1R; /*!< USB Endpoint 1 register, Address offset: 0x04 */ + __IO uint16_t RESERVED1; /*!< Reserved */ + __IO uint16_t EP2R; /*!< USB Endpoint 2 register, Address offset: 0x08 */ + __IO uint16_t RESERVED2; /*!< Reserved */ + __IO uint16_t EP3R; /*!< USB Endpoint 3 register, Address offset: 0x0C */ + __IO uint16_t RESERVED3; /*!< Reserved */ + __IO uint16_t EP4R; /*!< USB Endpoint 4 register, Address offset: 0x10 */ + __IO uint16_t RESERVED4; /*!< Reserved */ + __IO uint16_t EP5R; /*!< USB Endpoint 5 register, Address offset: 0x14 */ + __IO uint16_t RESERVED5; /*!< Reserved */ + __IO uint16_t EP6R; /*!< USB Endpoint 6 register, Address offset: 0x18 */ + __IO uint16_t RESERVED6; /*!< Reserved */ + __IO uint16_t EP7R; /*!< USB Endpoint 7 register, Address offset: 0x1C */ + __IO uint16_t RESERVED7[17]; /*!< Reserved */ + __IO uint16_t CNTR; /*!< Control register, Address offset: 0x40 */ + __IO uint16_t RESERVED8; /*!< Reserved */ + __IO uint16_t ISTR; /*!< Interrupt status register, Address offset: 0x44 */ + __IO uint16_t RESERVED9; /*!< Reserved */ + __IO uint16_t FNR; /*!< Frame number register, Address offset: 0x48 */ + __IO uint16_t RESERVEDA; /*!< Reserved */ + __IO uint16_t DADDR; /*!< Device address register, Address offset: 0x4C */ + __IO uint16_t RESERVEDB; /*!< Reserved */ + __IO uint16_t BTABLE; /*!< Buffer Table address register, Address offset: 0x50 */ + __IO uint16_t RESERVEDC; /*!< Reserved */ + __IO uint16_t LPMCSR; /*!< LPM Control and Status register, Address offset: 0x54 */ + __IO uint16_t RESERVEDD; /*!< Reserved */ + __IO uint16_t BCDR; /*!< Battery Charging detector register, Address offset: 0x58 */ + __IO uint16_t RESERVEDE; /*!< Reserved */ +} USB_TypeDef; + +/** + * @brief Clock Recovery System + */ +typedef struct +{ + __IO uint32_t CR; /*!< CRS control register, Address offset: 0x00 */ + __IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */ + __IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */ + __IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */ +} CRS_TypeDef; + +/** + * @brief Inter-Processor Communication + */ +typedef struct +{ + __IO uint32_t C1CR; /*!< Inter-Processor Communication: C1 control register, Address offset: 0x000 */ + __IO uint32_t C1MR ; /*!< Inter-Processor Communication: C1 mask register, Address offset: 0x004 */ + __IO uint32_t C1SCR; /*!< Inter-Processor Communication: C1 status set clear register, Address offset: 0x008 */ + __IO uint32_t C1TOC2SR; /*!< Inter-Processor Communication: C1 to processor M4 status register, Address offset: 0x00C */ + __IO uint32_t C2CR; /*!< Inter-Processor Communication: C2 control register, Address offset: 0x010 */ + __IO uint32_t C2MR ; /*!< Inter-Processor Communication: C2 mask register, Address offset: 0x014 */ + __IO uint32_t C2SCR; /*!< Inter-Processor Communication: C2 status set clear register, Address offset: 0x018 */ + __IO uint32_t C2TOC1SR; /*!< Inter-Processor Communication: C2 to processor M4 status register, Address offset: 0x01C */ +} IPCC_TypeDef; + +typedef struct +{ + __IO uint32_t CR; /*!< Control register, Address offset: 0x000 */ + __IO uint32_t MR; /*!< Mask register, Address offset: 0x004 */ + __IO uint32_t SCR; /*!< Status set clear register, Address offset: 0x008 */ + __IO uint32_t SR; /*!< Status register, Address offset: 0x00C */ +} IPCC_CommonTypeDef; + +/** + * @brief Async Interrupts and Events Controller + */ +typedef struct +{ + __IO uint32_t RTSR1; /*!< EXTI rising trigger selection register [31:0], Address offset: 0x00 */ + __IO uint32_t FTSR1; /*!< EXTI falling trigger selection register [31:0], Address offset: 0x04 */ + __IO uint32_t SWIER1; /*!< EXTI software interrupt event register [31:0], Address offset: 0x08 */ + __IO uint32_t PR1; /*!< EXTI pending register [31:0], Address offset: 0x0C */ + __IO uint32_t RESERVED1[4]; /*!< Reserved, Address offset: 0x10 - 0x1C */ + __IO uint32_t RTSR2; /*!< EXTI rising trigger selection register [31:0], Address offset: 0x20 */ + __IO uint32_t FTSR2; /*!< EXTI falling trigger selection register [31:0], Address offset: 0x24 */ + __IO uint32_t SWIER2; /*!< EXTI software interrupt event register [31:0], Address offset: 0x28 */ + __IO uint32_t PR2; /*!< EXTI pending register [31:0], Address offset: 0x2C */ + __IO uint32_t RESERVED2[4]; /*!< Reserved, Address offset: 0x30 - 0x3C */ + __IO uint32_t RESERVED3[8]; /*!< Reserved, Address offset: 0x40 - 0x5C */ + __IO uint32_t RESERVED4[8]; /*!< Reserved, Address offset: 0x60 - 0x7C */ + __IO uint32_t IMR1; /*!< EXTI wakeup with interrupt mask register for cpu1 [31:0], Address offset: 0x80 */ + __IO uint32_t EMR1; /*!< EXTI wakeup with event mask register for cpu1 [31:0], Address offset: 0x84 */ + __IO uint32_t RESERVED5[2]; /*!< Reserved, Address offset: 0x88 - 0x8C */ + __IO uint32_t IMR2; /*!< EXTI wakeup with interrupt mask register for cpu1 [31:0], Address offset: 0x90 */ + __IO uint32_t EMR2; /*!< EXTI wakeup with event mask register for cpu1 [31:0], Address offset: 0x94 */ + __IO uint32_t RESERVED8[10]; /*!< Reserved, Address offset: 0x98 - 0xBC */ + __IO uint32_t C2IMR1; /*!< EXTI wakeup with interrupt mask register for cpu2 [31:0], Address offset: 0xC0 */ + __IO uint32_t C2EMR1; /*!< EXTI wakeup with event mask register for cpu2 [31:0], Address offset: 0xC4 */ + __IO uint32_t RESERVED9[2]; /*!< Reserved, Address offset: 0xC8 - 0xCC */ + __IO uint32_t C2IMR2; /*!< EXTI wakeup with interrupt mask register for cpu2 [31:0], Address offset: 0xD0 */ + __IO uint32_t C2EMR2; /*!< EXTI wakeup with event mask register for cpu2 [31:0], Address offset: 0xD4 */ +} EXTI_TypeDef; + +/** + * @brief Serial Audio Interface + */ +typedef struct +{ + __IO uint32_t GCR; /*!< SAI global configuration register, Address offset: 0x00 */ + uint32_t RESERVED[16]; /*!< Reserved, Address offset: 0x04 to 0x40 */ + __IO uint32_t PDMCR; /*!< SAI PDM control register, Address offset: 0x44 */ + __IO uint32_t PDMDLY; /*!< SAI PDM delay register, Address offset: 0x48 */ +} SAI_TypeDef; + +typedef struct +{ + __IO uint32_t CR1; /*!< SAI block x configuration register 1, Address offset: 0x04 */ + __IO uint32_t CR2; /*!< SAI block x configuration register 2, Address offset: 0x08 */ + __IO uint32_t FRCR; /*!< SAI block x frame configuration register, Address offset: 0x0C */ + __IO uint32_t SLOTR; /*!< SAI block x slot register, Address offset: 0x10 */ + __IO uint32_t IMR; /*!< SAI block x interrupt mask register, Address offset: 0x14 */ + __IO uint32_t SR; /*!< SAI block x status register, Address offset: 0x18 */ + __IO uint32_t CLRFR; /*!< SAI block x clear flag register, Address offset: 0x1C */ + __IO uint32_t DR; /*!< SAI block x data register, Address offset: 0x20 */ +} SAI_Block_TypeDef; + +/** + * @brief Public Key Accelerator (PKA) + */ +typedef struct +{ + __IO uint32_t CR; /*!< PKA control register, Address offset: 0x00 */ + __IO uint32_t SR; /*!< PKA status register, Address offset: 0x04 */ + __IO uint32_t CLRFR; /*!< PKA clear flag register, Address offset: 0x08 */ + uint32_t Reserved1[253]; /*!< Reserved Address offset: 0x000C-0x03FC*/ + __IO uint32_t RAM[894]; /*!< PKA RAM, Address offset: 0x0400-0x11F4 */ +} PKA_TypeDef; + +/** + * @brief HW Semaphore HSEM + */ +typedef struct +{ + __IO uint32_t R[32]; /*!< HSEM 2-step write lock and read back registers, Address offset: 00h-7Ch */ + __IO uint32_t RLR[32]; /*!< HSEM 1-step read lock registers, Address offset: 80h-FCh */ + __IO uint32_t C1IER; /*!< HSEM CPU1 interrupt enable register , Address offset: 100h */ + __IO uint32_t C1ICR; /*!< HSEM CPU1 interrupt clear register , Address offset: 104h */ + __IO uint32_t C1ISR; /*!< HSEM CPU1 interrupt status register , Address offset: 108h */ + __IO uint32_t C1MISR; /*!< HSEM CPU1 masked interrupt status register , Address offset: 10Ch */ + __IO uint32_t C2IER; /*!< HSEM CPU2 interrupt enable register , Address offset: 110h */ + __IO uint32_t C2ICR; /*!< HSEM CPU2 interrupt clear register , Address offset: 114h */ + __IO uint32_t C2ISR; /*!< HSEM CPU2 interrupt status register , Address offset: 118h */ + __IO uint32_t C2MISR; /*!< HSEM CPU2 masked interrupt status register , Address offset: 11Ch */ + uint32_t Reserved[8]; /*!< Reserved Address offset: 120h-13Ch*/ + __IO uint32_t CR; /*!< HSEM Semaphore clear register , Address offset: 140h */ + __IO uint32_t KEYR; /*!< HSEM Semaphore clear key register , Address offset: 144h */ +} HSEM_TypeDef; + +typedef struct +{ + __IO uint32_t IER; /*!< HSEM interrupt enable register , Address offset: 0h */ + __IO uint32_t ICR; /*!< HSEM interrupt clear register , Address offset: 4h */ + __IO uint32_t ISR; /*!< HSEM interrupt status register , Address offset: 8h */ + __IO uint32_t MISR; /*!< HSEM masked interrupt status register , Address offset: Ch */ +} HSEM_Common_TypeDef; + +/** + * @} + */ + +/** @addtogroup Peripheral_memory_map + * @{ + */ + +/*!< Boundary memory map */ +#define FLASH_BASE (0x08000000UL)/*!< FLASH(up to 1 MB) base address */ +#define SRAM_BASE (0x20000000UL)/*!< SRAM(up to 256 KB) base address */ +#define PERIPH_BASE (0x40000000UL)/*!< Peripheral base address */ + +/*!< Memory, OTP and Option bytes */ + +/* Base addresses */ +#define SYSTEM_MEMORY_BASE (0x1FFF0000UL) /*!< System Memory : 28Kb (0x1FFF0000 - 0x1FFF6FFF) */ +#define OTP_AREA_BASE (0x1FFF7000UL) /*!< OTP area : 1kB (0x1FFF7000 - 0x1FFF73FF) */ +#define OPTION_BYTE_BASE (0x1FFF8000UL) /*!< Option Bytes : 4kB (0x1FFF8000 - 0x1FFF8FFF) */ +#define ENGI_BYTE_BASE (0x1FFF7400UL) /*!< Engi Bytes : 3kB (0x1FFF7400 - 0x1FFF7FFF) */ + +#define SRAM1_BASE SRAM_BASE /*!< SRAM1(up to 192 KB) base address */ +#define SRAM2A_BASE (SRAM_BASE + 0x00030000UL)/*!< SRAM2A(32 KB) base address */ +#define SRAM2B_BASE (SRAM_BASE + 0x00038000UL)/*!< SRAM2B(32 KB) base address */ + +/* Memory Size */ +#define FLASH_SIZE (((uint32_t)(*((uint16_t *)FLASHSIZE_BASE)) & (0x07FFUL)) << 10U) +#define SRAM1_SIZE 0x00030000UL /*!< SRAM1 default size : 192 kB */ +#define SRAM2A_SIZE 0x00008000UL /*!< SRAM2a default size : 32 kB */ +#define SRAM2B_SIZE 0x00008000UL /*!< SRAM2b default size : 32 kB */ + +/* End addresses */ +#define SRAM1_END_ADDR (0x2002FFFFUL) /*!< SRAM1 : 192KB (0x20000000 - 0x2002FFFF) */ +#define SRAM2A_END_ADDR (0x20037FFFUL) /*!< SRAM2a (backup) : 32KB (0x20030000 - 0x20037FFF) */ +#define SRAM2B_END_ADDR (0x2003FFFFUL) /*!< SRAM2b (non-backup) : 32KB (0x20038000 - 0x2003FFFF) */ + +#define SYSTEM_MEMORY_END_ADDR (0x1FFF6FFFUL) /*!< System Memory : 28KB (0x1FFF0000 - 0x1FFF6FFF) */ +#define OTP_AREA_END_ADDR (0x1FFF73FFUL) /*!< OTP area : 1KB (0x1FFF7000 - 0x1FFF73FF) */ +#define OPTION_BYTE_END_ADDR (0x1FFF8FFFUL) /*!< Option Bytes : 4KB (0x1FFF8000 - 0x1FFF8FFF) */ +#define ENGI_BYTE_END_ADDR (0x1FFF7FFFUL) /*!< Engi Bytes : 3kB (0x1FFF7400 - 0x1FFF7FFF) */ + +/*!< Peripheral memory map */ +#define APB1PERIPH_BASE PERIPH_BASE +#define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000UL) +#define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000UL) +#define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000UL) +#define AHB4PERIPH_BASE (PERIPH_BASE + 0x18000000UL) +#define APB3PERIPH_BASE (PERIPH_BASE + 0x20000000UL) +#define AHB3PERIPH_BASE (PERIPH_BASE + 0x50000000UL) + +/*!< APB1 peripherals */ +#define TIM2_BASE (APB1PERIPH_BASE + 0x00000000UL) +#define LCD_BASE (APB1PERIPH_BASE + 0x00002400UL) +#define RTC_BASE (APB1PERIPH_BASE + 0x00002800UL) +#define WWDG_BASE (APB1PERIPH_BASE + 0x00002C00UL) +#define IWDG_BASE (APB1PERIPH_BASE + 0x00003000UL) +#define SPI2_BASE (APB1PERIPH_BASE + 0x00003800UL) +#define I2C1_BASE (APB1PERIPH_BASE + 0x00005400UL) +#define I2C3_BASE (APB1PERIPH_BASE + 0x00005C00UL) +#define CRS_BASE (APB1PERIPH_BASE + 0x00006000UL) +#define USB1_BASE (APB1PERIPH_BASE + 0x00006800UL) +#define USB1_PMAADDR (APB1PERIPH_BASE + 0x00006C00UL) +#define LPTIM1_BASE (APB1PERIPH_BASE + 0x00007C00UL) +#define LPUART1_BASE (APB1PERIPH_BASE + 0x00008000UL) +#define LPTIM2_BASE (APB1PERIPH_BASE + 0x00009400UL) + +/*!< APB2 peripherals */ +#define SYSCFG_BASE (APB2PERIPH_BASE + 0x00000000UL) +#define VREFBUF_BASE (APB2PERIPH_BASE + 0x00000030UL) +#define COMP1_BASE (APB2PERIPH_BASE + 0x00000200UL) +#define COMP2_BASE (APB2PERIPH_BASE + 0x00000204UL) +#define TIM1_BASE (APB2PERIPH_BASE + 0x00002C00UL) +#define SPI1_BASE (APB2PERIPH_BASE + 0x00003000UL) +#define USART1_BASE (APB2PERIPH_BASE + 0x00003800UL) +#define TIM16_BASE (APB2PERIPH_BASE + 0x00004400UL) +#define TIM17_BASE (APB2PERIPH_BASE + 0x00004800UL) +#define SAI1_BASE (APB2PERIPH_BASE + 0x00005400UL) +#define SAI1_Block_A_BASE (SAI1_BASE + 0x0000004UL) +#define SAI1_Block_B_BASE (SAI1_BASE + 0x0000024UL) + +/*!< AHB1 peripherals */ +#define DMA1_BASE (AHB1PERIPH_BASE + 0x00000000UL) +#define DMA2_BASE (AHB1PERIPH_BASE + 0x00000400UL) +#define DMAMUX1_BASE (AHB1PERIPH_BASE + 0x00000800UL) +#define CRC_BASE (AHB1PERIPH_BASE + 0x00003000UL) +#define TSC_BASE (AHB1PERIPH_BASE + 0x00004000UL) + +#define DMA1_Channel1_BASE (DMA1_BASE + 0x00000008UL) +#define DMA1_Channel2_BASE (DMA1_BASE + 0x0000001CUL) +#define DMA1_Channel3_BASE (DMA1_BASE + 0x00000030UL) +#define DMA1_Channel4_BASE (DMA1_BASE + 0x00000044UL) +#define DMA1_Channel5_BASE (DMA1_BASE + 0x00000058UL) +#define DMA1_Channel6_BASE (DMA1_BASE + 0x0000006CUL) +#define DMA1_Channel7_BASE (DMA1_BASE + 0x00000080UL) + +#define DMA2_Channel1_BASE (DMA2_BASE + 0x00000008UL) +#define DMA2_Channel2_BASE (DMA2_BASE + 0x0000001CUL) +#define DMA2_Channel3_BASE (DMA2_BASE + 0x00000030UL) +#define DMA2_Channel4_BASE (DMA2_BASE + 0x00000044UL) +#define DMA2_Channel5_BASE (DMA2_BASE + 0x00000058UL) +#define DMA2_Channel6_BASE (DMA2_BASE + 0x0000006CUL) +#define DMA2_Channel7_BASE (DMA2_BASE + 0x00000080UL) + +#define DMAMUX1_Channel0_BASE (DMAMUX1_BASE) +#define DMAMUX1_Channel1_BASE (DMAMUX1_BASE + 0x00000004UL) +#define DMAMUX1_Channel2_BASE (DMAMUX1_BASE + 0x00000008UL) +#define DMAMUX1_Channel3_BASE (DMAMUX1_BASE + 0x0000000CUL) +#define DMAMUX1_Channel4_BASE (DMAMUX1_BASE + 0x00000010UL) +#define DMAMUX1_Channel5_BASE (DMAMUX1_BASE + 0x00000014UL) +#define DMAMUX1_Channel6_BASE (DMAMUX1_BASE + 0x00000018UL) +#define DMAMUX1_Channel7_BASE (DMAMUX1_BASE + 0x0000001CUL) +#define DMAMUX1_Channel8_BASE (DMAMUX1_BASE + 0x00000020UL) +#define DMAMUX1_Channel9_BASE (DMAMUX1_BASE + 0x00000024UL) +#define DMAMUX1_Channel10_BASE (DMAMUX1_BASE + 0x00000028UL) +#define DMAMUX1_Channel11_BASE (DMAMUX1_BASE + 0x0000002CUL) +#define DMAMUX1_Channel12_BASE (DMAMUX1_BASE + 0x00000030UL) +#define DMAMUX1_Channel13_BASE (DMAMUX1_BASE + 0x00000034UL) + +#define DMAMUX1_RequestGenerator0_BASE (DMAMUX1_BASE + 0x00000100UL) +#define DMAMUX1_RequestGenerator1_BASE (DMAMUX1_BASE + 0x00000104UL) +#define DMAMUX1_RequestGenerator2_BASE (DMAMUX1_BASE + 0x00000108UL) +#define DMAMUX1_RequestGenerator3_BASE (DMAMUX1_BASE + 0x0000010CUL) + +#define DMAMUX1_ChannelStatus_BASE (DMAMUX1_BASE + 0x00000080UL) +#define DMAMUX1_RequestGenStatus_BASE (DMAMUX1_BASE + 0x00000140UL) + +/*!< AHB2 peripherals */ +#define IOPORT_BASE (AHB2PERIPH_BASE + 0x00000000UL) +#define GPIOA_BASE (IOPORT_BASE + 0x00000000UL) +#define GPIOB_BASE (IOPORT_BASE + 0x00000400UL) +#define GPIOC_BASE (IOPORT_BASE + 0x00000800UL) +#define GPIOD_BASE (IOPORT_BASE + 0x00000C00UL) +#define GPIOE_BASE (IOPORT_BASE + 0x00001000UL) +#define GPIOH_BASE (IOPORT_BASE + 0x00001C00UL) + +#define ADC1_BASE (AHB2PERIPH_BASE + 0x08040000UL) +#define ADC1_COMMON_BASE (AHB2PERIPH_BASE + 0x08040300UL) + +#define AES1_BASE (AHB2PERIPH_BASE + 0x08060000UL) + +/*!< AHB Shared peripherals */ +#define RCC_BASE (AHB4PERIPH_BASE + 0x00000000UL) +#define PWR_BASE (AHB4PERIPH_BASE + 0x00000400UL) +#define EXTI_BASE (AHB4PERIPH_BASE + 0x00000800UL) +#define IPCC_BASE (AHB4PERIPH_BASE + 0x00000C00UL) +#define RNG_BASE (AHB4PERIPH_BASE + 0x00001000UL) +#define HSEM_BASE (AHB4PERIPH_BASE + 0x00001400UL) +#define AES2_BASE (AHB4PERIPH_BASE + 0x00001800UL) +#define PKA_BASE (AHB4PERIPH_BASE + 0x00002000UL) +#define FLASH_REG_BASE (AHB4PERIPH_BASE + 0x00004000UL) + +/* Debug MCU registers base address */ +#define DBGMCU_BASE (0xE0042000UL) + + +/*!< AHB3 peripherals */ +#define QUADSPI_BASE (AHB3PERIPH_BASE + 0x00000000UL) /*!< QUADSPI memories accessible over AHB base address */ +#define QUADSPI_R_BASE (AHB3PERIPH_BASE + 0x10001000UL) /*!< QUADSPI control registers base address */ + +/*!< Device Electronic Signature */ +#define PACKAGE_BASE ((uint32_t)0x1FFF7500UL) /*!< Package data register base address */ +#define UID64_BASE ((uint32_t)0x1FFF7580UL) /*!< 64-bit Unique device Identification */ +#define UID_BASE ((uint32_t)0x1FFF7590UL) /*!< Unique device ID register base address */ +#define FLASHSIZE_BASE ((uint32_t)0x1FFF75E0UL) /*!< Flash size data register base address */ + +/** + * @} + */ + +/** @addtogroup Peripheral_declaration + * @{ + */ + +/* Peripherals available on APB1 bus */ +#define TIM2 ((TIM_TypeDef *) TIM2_BASE) +#define LCD ((LCD_TypeDef *) LCD_BASE) +#define RTC ((RTC_TypeDef *) RTC_BASE) +#define WWDG ((WWDG_TypeDef *) WWDG_BASE) +#define IWDG ((IWDG_TypeDef *) IWDG_BASE) +#define SPI2 ((SPI_TypeDef *) SPI2_BASE) +#define I2C1 ((I2C_TypeDef *) I2C1_BASE) +#define I2C3 ((I2C_TypeDef *) I2C3_BASE) +#define USB ((USB_TypeDef *) USB1_BASE) +#define CRS ((CRS_TypeDef *) CRS_BASE) +#define LPTIM1 ((LPTIM_TypeDef *) LPTIM1_BASE) +#define LPUART1 ((USART_TypeDef *) LPUART1_BASE) +#define LPTIM2 ((LPTIM_TypeDef *) LPTIM2_BASE) + +/* Peripherals available on APB2 bus */ +#define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE) +#define VREFBUF ((VREFBUF_TypeDef *) VREFBUF_BASE) +#define COMP1 ((COMP_TypeDef *) COMP1_BASE) +#define COMP2 ((COMP_TypeDef *) COMP2_BASE) +#define COMP12_COMMON ((COMP_Common_TypeDef *) COMP2_BASE) +#define TIM1 ((TIM_TypeDef *) TIM1_BASE) +#define SPI1 ((SPI_TypeDef *) SPI1_BASE) +#define USART1 ((USART_TypeDef *) USART1_BASE) +#define TIM16 ((TIM_TypeDef *) TIM16_BASE) +#define TIM17 ((TIM_TypeDef *) TIM17_BASE) +#define SAI1 ((SAI_TypeDef *) SAI1_BASE) +#define SAI1_Block_A ((SAI_Block_TypeDef *)SAI1_Block_A_BASE) +#define SAI1_Block_B ((SAI_Block_TypeDef *)SAI1_Block_B_BASE) + +/* Peripherals available on AHB1 bus */ +#define DMA1 ((DMA_TypeDef *) DMA1_BASE) +#define DMA1_Channel1 ((DMA_Channel_TypeDef *) DMA1_Channel1_BASE) +#define DMA1_Channel2 ((DMA_Channel_TypeDef *) DMA1_Channel2_BASE) +#define DMA1_Channel3 ((DMA_Channel_TypeDef *) DMA1_Channel3_BASE) +#define DMA1_Channel4 ((DMA_Channel_TypeDef *) DMA1_Channel4_BASE) +#define DMA1_Channel5 ((DMA_Channel_TypeDef *) DMA1_Channel5_BASE) +#define DMA1_Channel6 ((DMA_Channel_TypeDef *) DMA1_Channel6_BASE) +#define DMA1_Channel7 ((DMA_Channel_TypeDef *) DMA1_Channel7_BASE) + +#define DMA2 ((DMA_TypeDef *) DMA2_BASE) +#define DMA2_Channel1 ((DMA_Channel_TypeDef *) DMA2_Channel1_BASE) +#define DMA2_Channel2 ((DMA_Channel_TypeDef *) DMA2_Channel2_BASE) +#define DMA2_Channel3 ((DMA_Channel_TypeDef *) DMA2_Channel3_BASE) +#define DMA2_Channel4 ((DMA_Channel_TypeDef *) DMA2_Channel4_BASE) +#define DMA2_Channel5 ((DMA_Channel_TypeDef *) DMA2_Channel5_BASE) +#define DMA2_Channel6 ((DMA_Channel_TypeDef *) DMA2_Channel6_BASE) +#define DMA2_Channel7 ((DMA_Channel_TypeDef *) DMA2_Channel7_BASE) + +#define DMAMUX1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_BASE) +#define DMAMUX1_Channel0 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel0_BASE) +#define DMAMUX1_Channel1 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel1_BASE) +#define DMAMUX1_Channel2 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel2_BASE) +#define DMAMUX1_Channel3 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel3_BASE) +#define DMAMUX1_Channel4 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel4_BASE) +#define DMAMUX1_Channel5 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel5_BASE) +#define DMAMUX1_Channel6 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel6_BASE) +#define DMAMUX1_Channel7 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel7_BASE) +#define DMAMUX1_Channel8 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel8_BASE) +#define DMAMUX1_Channel9 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel9_BASE) +#define DMAMUX1_Channel10 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel10_BASE) +#define DMAMUX1_Channel11 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel11_BASE) +#define DMAMUX1_Channel12 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel12_BASE) +#define DMAMUX1_Channel13 ((DMAMUX_Channel_TypeDef *) DMAMUX1_Channel13_BASE) + +#define DMAMUX1_RequestGenerator0 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator0_BASE) +#define DMAMUX1_RequestGenerator1 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator1_BASE) +#define DMAMUX1_RequestGenerator2 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator2_BASE) +#define DMAMUX1_RequestGenerator3 ((DMAMUX_RequestGen_TypeDef *) DMAMUX1_RequestGenerator3_BASE) + +#define DMAMUX1_ChannelStatus ((DMAMUX_ChannelStatus_TypeDef *) DMAMUX1_ChannelStatus_BASE) +#define DMAMUX1_RequestGenStatus ((DMAMUX_RequestGenStatus_TypeDef *) DMAMUX1_RequestGenStatus_BASE) + +#define CRC ((CRC_TypeDef *) CRC_BASE) +#define TSC ((TSC_TypeDef *) TSC_BASE) + +/* Peripherals available on AHB2 bus */ +#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE) +#define GPIOB ((GPIO_TypeDef *) GPIOB_BASE) +#define GPIOC ((GPIO_TypeDef *) GPIOC_BASE) +#define GPIOD ((GPIO_TypeDef *) GPIOD_BASE) +#define GPIOE ((GPIO_TypeDef *) GPIOE_BASE) +#define GPIOH ((GPIO_TypeDef *) GPIOH_BASE) + +#define ADC1 ((ADC_TypeDef *) ADC1_BASE) +#define ADC1_COMMON ((ADC_Common_TypeDef *) ADC1_COMMON_BASE) + +#define AES1 ((AES_TypeDef *) AES1_BASE) + +/* Peripherals available on AHB shared bus */ +#define RCC ((RCC_TypeDef *) RCC_BASE) +#define PWR ((PWR_TypeDef *) PWR_BASE) +#define EXTI ((EXTI_TypeDef *) EXTI_BASE) +#define IPCC ((IPCC_TypeDef *) IPCC_BASE) +#define IPCC_C1 ((IPCC_CommonTypeDef *) IPCC_BASE) +#define IPCC_C2 ((IPCC_CommonTypeDef *) (IPCC_BASE + 0x10U)) +#define RNG ((RNG_TypeDef *) RNG_BASE) +#define HSEM ((HSEM_TypeDef *) HSEM_BASE) +#define HSEM_COMMON ((HSEM_Common_TypeDef *) (HSEM_BASE + 0x100U)) +#define AES2 ((AES_TypeDef *) AES2_BASE) +#define PKA ((PKA_TypeDef *) PKA_BASE) +#define FLASH ((FLASH_TypeDef *) FLASH_REG_BASE) + +/* Peripherals available on AHB3 bus */ +#define QUADSPI ((QUADSPI_TypeDef *) QUADSPI_R_BASE) + +#define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE) +/** + * @} + */ + +/** @addtogroup Exported_constants + * @{ + */ + +/** @addtogroup Hardware_Constant_Definition + * @{ + */ +#define LSI_STARTUP_TIME 130U /*!< LSI Maximum startup time in us */ + +/** + * @} + */ + + +/** @addtogroup Peripheral_Registers_Bits_Definition + * @{ + */ + +/******************************************************************************/ +/* Peripheral Registers Bits Definition */ +/******************************************************************************/ + +/******************************************************************************/ +/* */ +/* Analog to Digital Converter (ADC) */ +/* */ +/******************************************************************************/ + +#define ADC_SUPPORT_5_MSPS /* ADC sampling rate 5 Msamples/sec */ + +/******************** Bit definition for ADC_ISR register *******************/ +#define ADC_ISR_ADRDY_Pos (0U) +#define ADC_ISR_ADRDY_Msk (0x1UL << ADC_ISR_ADRDY_Pos) /*!< 0x00000001 */ +#define ADC_ISR_ADRDY ADC_ISR_ADRDY_Msk /*!< ADC ready flag */ +#define ADC_ISR_EOSMP_Pos (1U) +#define ADC_ISR_EOSMP_Msk (0x1UL << ADC_ISR_EOSMP_Pos) /*!< 0x00000002 */ +#define ADC_ISR_EOSMP ADC_ISR_EOSMP_Msk /*!< ADC group regular end of sampling flag */ +#define ADC_ISR_EOC_Pos (2U) +#define ADC_ISR_EOC_Msk (0x1UL << ADC_ISR_EOC_Pos) /*!< 0x00000004 */ +#define ADC_ISR_EOC ADC_ISR_EOC_Msk /*!< ADC group regular end of unitary conversion flag */ +#define ADC_ISR_EOS_Pos (3U) +#define ADC_ISR_EOS_Msk (0x1UL << ADC_ISR_EOS_Pos) /*!< 0x00000008 */ +#define ADC_ISR_EOS ADC_ISR_EOS_Msk /*!< ADC group regular end of sequence conversions flag */ +#define ADC_ISR_OVR_Pos (4U) +#define ADC_ISR_OVR_Msk (0x1UL << ADC_ISR_OVR_Pos) /*!< 0x00000010 */ +#define ADC_ISR_OVR ADC_ISR_OVR_Msk /*!< ADC group regular overrun flag */ +#define ADC_ISR_JEOC_Pos (5U) +#define ADC_ISR_JEOC_Msk (0x1UL << ADC_ISR_JEOC_Pos) /*!< 0x00000020 */ +#define ADC_ISR_JEOC ADC_ISR_JEOC_Msk /*!< ADC group injected end of unitary conversion flag */ +#define ADC_ISR_JEOS_Pos (6U) +#define ADC_ISR_JEOS_Msk (0x1UL << ADC_ISR_JEOS_Pos) /*!< 0x00000040 */ +#define ADC_ISR_JEOS ADC_ISR_JEOS_Msk /*!< ADC group injected end of sequence conversions flag */ +#define ADC_ISR_AWD1_Pos (7U) +#define ADC_ISR_AWD1_Msk (0x1UL << ADC_ISR_AWD1_Pos) /*!< 0x00000080 */ +#define ADC_ISR_AWD1 ADC_ISR_AWD1_Msk /*!< ADC analog watchdog 1 flag */ +#define ADC_ISR_AWD2_Pos (8U) +#define ADC_ISR_AWD2_Msk (0x1UL << ADC_ISR_AWD2_Pos) /*!< 0x00000100 */ +#define ADC_ISR_AWD2 ADC_ISR_AWD2_Msk /*!< ADC analog watchdog 2 flag */ +#define ADC_ISR_AWD3_Pos (9U) +#define ADC_ISR_AWD3_Msk (0x1UL << ADC_ISR_AWD3_Pos) /*!< 0x00000200 */ +#define ADC_ISR_AWD3 ADC_ISR_AWD3_Msk /*!< ADC analog watchdog 3 flag */ +#define ADC_ISR_JQOVF_Pos (10U) +#define ADC_ISR_JQOVF_Msk (0x1UL << ADC_ISR_JQOVF_Pos) /*!< 0x00000400 */ +#define ADC_ISR_JQOVF ADC_ISR_JQOVF_Msk /*!< ADC group injected contexts queue overflow flag */ + +/******************** Bit definition for ADC_IER register *******************/ +#define ADC_IER_ADRDYIE_Pos (0U) +#define ADC_IER_ADRDYIE_Msk (0x1UL << ADC_IER_ADRDYIE_Pos) /*!< 0x00000001 */ +#define ADC_IER_ADRDYIE ADC_IER_ADRDYIE_Msk /*!< ADC ready interrupt */ +#define ADC_IER_EOSMPIE_Pos (1U) +#define ADC_IER_EOSMPIE_Msk (0x1UL << ADC_IER_EOSMPIE_Pos) /*!< 0x00000002 */ +#define ADC_IER_EOSMPIE ADC_IER_EOSMPIE_Msk /*!< ADC group regular end of sampling interrupt */ +#define ADC_IER_EOCIE_Pos (2U) +#define ADC_IER_EOCIE_Msk (0x1UL << ADC_IER_EOCIE_Pos) /*!< 0x00000004 */ +#define ADC_IER_EOCIE ADC_IER_EOCIE_Msk /*!< ADC group regular end of unitary conversion interrupt */ +#define ADC_IER_EOSIE_Pos (3U) +#define ADC_IER_EOSIE_Msk (0x1UL << ADC_IER_EOSIE_Pos) /*!< 0x00000008 */ +#define ADC_IER_EOSIE ADC_IER_EOSIE_Msk /*!< ADC group regular end of sequence conversions interrupt */ +#define ADC_IER_OVRIE_Pos (4U) +#define ADC_IER_OVRIE_Msk (0x1UL << ADC_IER_OVRIE_Pos) /*!< 0x00000010 */ +#define ADC_IER_OVRIE ADC_IER_OVRIE_Msk /*!< ADC group regular overrun interrupt */ +#define ADC_IER_JEOCIE_Pos (5U) +#define ADC_IER_JEOCIE_Msk (0x1UL << ADC_IER_JEOCIE_Pos) /*!< 0x00000020 */ +#define ADC_IER_JEOCIE ADC_IER_JEOCIE_Msk /*!< ADC group injected end of unitary conversion interrupt */ +#define ADC_IER_JEOSIE_Pos (6U) +#define ADC_IER_JEOSIE_Msk (0x1UL << ADC_IER_JEOSIE_Pos) /*!< 0x00000040 */ +#define ADC_IER_JEOSIE ADC_IER_JEOSIE_Msk /*!< ADC group injected end of sequence conversions interrupt */ +#define ADC_IER_AWD1IE_Pos (7U) +#define ADC_IER_AWD1IE_Msk (0x1UL << ADC_IER_AWD1IE_Pos) /*!< 0x00000080 */ +#define ADC_IER_AWD1IE ADC_IER_AWD1IE_Msk /*!< ADC analog watchdog 1 interrupt */ +#define ADC_IER_AWD2IE_Pos (8U) +#define ADC_IER_AWD2IE_Msk (0x1UL << ADC_IER_AWD2IE_Pos) /*!< 0x00000100 */ +#define ADC_IER_AWD2IE ADC_IER_AWD2IE_Msk /*!< ADC analog watchdog 2 interrupt */ +#define ADC_IER_AWD3IE_Pos (9U) +#define ADC_IER_AWD3IE_Msk (0x1UL << ADC_IER_AWD3IE_Pos) /*!< 0x00000200 */ +#define ADC_IER_AWD3IE ADC_IER_AWD3IE_Msk /*!< ADC analog watchdog 3 interrupt */ +#define ADC_IER_JQOVFIE_Pos (10U) +#define ADC_IER_JQOVFIE_Msk (0x1UL << ADC_IER_JQOVFIE_Pos) /*!< 0x00000400 */ +#define ADC_IER_JQOVFIE ADC_IER_JQOVFIE_Msk /*!< ADC group injected contexts queue overflow interrupt */ + +/******************** Bit definition for ADC_CR register ********************/ +#define ADC_CR_ADEN_Pos (0U) +#define ADC_CR_ADEN_Msk (0x1UL << ADC_CR_ADEN_Pos) /*!< 0x00000001 */ +#define ADC_CR_ADEN ADC_CR_ADEN_Msk /*!< ADC enable */ +#define ADC_CR_ADDIS_Pos (1U) +#define ADC_CR_ADDIS_Msk (0x1UL << ADC_CR_ADDIS_Pos) /*!< 0x00000002 */ +#define ADC_CR_ADDIS ADC_CR_ADDIS_Msk /*!< ADC disable */ +#define ADC_CR_ADSTART_Pos (2U) +#define ADC_CR_ADSTART_Msk (0x1UL << ADC_CR_ADSTART_Pos) /*!< 0x00000004 */ +#define ADC_CR_ADSTART ADC_CR_ADSTART_Msk /*!< ADC group regular conversion start */ +#define ADC_CR_JADSTART_Pos (3U) +#define ADC_CR_JADSTART_Msk (0x1UL << ADC_CR_JADSTART_Pos) /*!< 0x00000008 */ +#define ADC_CR_JADSTART ADC_CR_JADSTART_Msk /*!< ADC group injected conversion start */ +#define ADC_CR_ADSTP_Pos (4U) +#define ADC_CR_ADSTP_Msk (0x1UL << ADC_CR_ADSTP_Pos) /*!< 0x00000010 */ +#define ADC_CR_ADSTP ADC_CR_ADSTP_Msk /*!< ADC group regular conversion stop */ +#define ADC_CR_JADSTP_Pos (5U) +#define ADC_CR_JADSTP_Msk (0x1UL << ADC_CR_JADSTP_Pos) /*!< 0x00000020 */ +#define ADC_CR_JADSTP ADC_CR_JADSTP_Msk /*!< ADC group injected conversion stop */ +#define ADC_CR_ADVREGEN_Pos (28U) +#define ADC_CR_ADVREGEN_Msk (0x1UL << ADC_CR_ADVREGEN_Pos) /*!< 0x10000000 */ +#define ADC_CR_ADVREGEN ADC_CR_ADVREGEN_Msk /*!< ADC voltage regulator enable */ +#define ADC_CR_DEEPPWD_Pos (29U) +#define ADC_CR_DEEPPWD_Msk (0x1UL << ADC_CR_DEEPPWD_Pos) /*!< 0x20000000 */ +#define ADC_CR_DEEPPWD ADC_CR_DEEPPWD_Msk /*!< ADC deep power down enable */ +#define ADC_CR_ADCALDIF_Pos (30U) +#define ADC_CR_ADCALDIF_Msk (0x1UL << ADC_CR_ADCALDIF_Pos) /*!< 0x40000000 */ +#define ADC_CR_ADCALDIF ADC_CR_ADCALDIF_Msk /*!< ADC differential mode for calibration */ +#define ADC_CR_ADCAL_Pos (31U) +#define ADC_CR_ADCAL_Msk (0x1UL << ADC_CR_ADCAL_Pos) /*!< 0x80000000 */ +#define ADC_CR_ADCAL ADC_CR_ADCAL_Msk /*!< ADC calibration */ + +/******************** Bit definition for ADC_CFGR1 register *****************/ +#define ADC_CFGR_DMAEN_Pos (0U) +#define ADC_CFGR_DMAEN_Msk (0x1UL << ADC_CFGR_DMAEN_Pos) /*!< 0x00000001 */ +#define ADC_CFGR_DMAEN ADC_CFGR_DMAEN_Msk /*!< ADC DMA enable */ +#define ADC_CFGR_DMACFG_Pos (1U) +#define ADC_CFGR_DMACFG_Msk (0x1UL << ADC_CFGR_DMACFG_Pos) /*!< 0x00000002 */ +#define ADC_CFGR_DMACFG ADC_CFGR_DMACFG_Msk /*!< ADC DMA configuration */ + +#define ADC_CFGR_RES_Pos (3U) +#define ADC_CFGR_RES_Msk (0x3UL << ADC_CFGR_RES_Pos) /*!< 0x00000018 */ +#define ADC_CFGR_RES ADC_CFGR_RES_Msk /*!< ADC data resolution */ +#define ADC_CFGR_RES_0 (0x1UL << ADC_CFGR_RES_Pos) /*!< 0x00000008 */ +#define ADC_CFGR_RES_1 (0x2UL << ADC_CFGR_RES_Pos) /*!< 0x00000010 */ + +#define ADC_CFGR_ALIGN_Pos (5U) +#define ADC_CFGR_ALIGN_Msk (0x1UL << ADC_CFGR_ALIGN_Pos) /*!< 0x00000020 */ +#define ADC_CFGR_ALIGN ADC_CFGR_ALIGN_Msk /*!< ADC data alignment */ + +#define ADC_CFGR_EXTSEL_Pos (6U) +#define ADC_CFGR_EXTSEL_Msk (0xFUL << ADC_CFGR_EXTSEL_Pos) /*!< 0x000003C0 */ +#define ADC_CFGR_EXTSEL ADC_CFGR_EXTSEL_Msk /*!< ADC group regular external trigger source */ +#define ADC_CFGR_EXTSEL_0 (0x1UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000040 */ +#define ADC_CFGR_EXTSEL_1 (0x2UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000080 */ +#define ADC_CFGR_EXTSEL_2 (0x4UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000100 */ +#define ADC_CFGR_EXTSEL_3 (0x8UL << ADC_CFGR_EXTSEL_Pos) /*!< 0x00000200 */ + +#define ADC_CFGR_EXTEN_Pos (10U) +#define ADC_CFGR_EXTEN_Msk (0x3UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000C00 */ +#define ADC_CFGR_EXTEN ADC_CFGR_EXTEN_Msk /*!< ADC group regular external trigger polarity */ +#define ADC_CFGR_EXTEN_0 (0x1UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000400 */ +#define ADC_CFGR_EXTEN_1 (0x2UL << ADC_CFGR_EXTEN_Pos) /*!< 0x00000800 */ + +#define ADC_CFGR_OVRMOD_Pos (12U) +#define ADC_CFGR_OVRMOD_Msk (0x1UL << ADC_CFGR_OVRMOD_Pos) /*!< 0x00001000 */ +#define ADC_CFGR_OVRMOD ADC_CFGR_OVRMOD_Msk /*!< ADC group regular overrun configuration */ +#define ADC_CFGR_CONT_Pos (13U) +#define ADC_CFGR_CONT_Msk (0x1UL << ADC_CFGR_CONT_Pos) /*!< 0x00002000 */ +#define ADC_CFGR_CONT ADC_CFGR_CONT_Msk /*!< ADC group regular continuous conversion mode */ +#define ADC_CFGR_AUTDLY_Pos (14U) +#define ADC_CFGR_AUTDLY_Msk (0x1UL << ADC_CFGR_AUTDLY_Pos) /*!< 0x00004000 */ +#define ADC_CFGR_AUTDLY ADC_CFGR_AUTDLY_Msk /*!< ADC low power auto wait */ + +#define ADC_CFGR_DISCEN_Pos (16U) +#define ADC_CFGR_DISCEN_Msk (0x1UL << ADC_CFGR_DISCEN_Pos) /*!< 0x00010000 */ +#define ADC_CFGR_DISCEN ADC_CFGR_DISCEN_Msk /*!< ADC group regular sequencer discontinuous mode */ + +#define ADC_CFGR_DISCNUM_Pos (17U) +#define ADC_CFGR_DISCNUM_Msk (0x7UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x000E0000 */ +#define ADC_CFGR_DISCNUM ADC_CFGR_DISCNUM_Msk /*!< ADC Discontinuous mode channel count */ +#define ADC_CFGR_DISCNUM_0 (0x1UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00020000 */ +#define ADC_CFGR_DISCNUM_1 (0x2UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00040000 */ +#define ADC_CFGR_DISCNUM_2 (0x4UL << ADC_CFGR_DISCNUM_Pos) /*!< 0x00080000 */ + +#define ADC_CFGR_JDISCEN_Pos (20U) +#define ADC_CFGR_JDISCEN_Msk (0x1UL << ADC_CFGR_JDISCEN_Pos) /*!< 0x00100000 */ +#define ADC_CFGR_JDISCEN ADC_CFGR_JDISCEN_Msk /*!< ADC Discontinuous mode on injected channels */ +#define ADC_CFGR_JQM_Pos (21U) +#define ADC_CFGR_JQM_Msk (0x1UL << ADC_CFGR_JQM_Pos) /*!< 0x00200000 */ +#define ADC_CFGR_JQM ADC_CFGR_JQM_Msk /*!< ADC group injected contexts queue mode */ +#define ADC_CFGR_AWD1SGL_Pos (22U) +#define ADC_CFGR_AWD1SGL_Msk (0x1UL << ADC_CFGR_AWD1SGL_Pos) /*!< 0x00400000 */ +#define ADC_CFGR_AWD1SGL ADC_CFGR_AWD1SGL_Msk /*!< ADC analog watchdog 1 monitoring a single channel or all channels */ +#define ADC_CFGR_AWD1EN_Pos (23U) +#define ADC_CFGR_AWD1EN_Msk (0x1UL << ADC_CFGR_AWD1EN_Pos) /*!< 0x00800000 */ +#define ADC_CFGR_AWD1EN ADC_CFGR_AWD1EN_Msk /*!< ADC analog watchdog 1 enable on scope ADC group regular */ +#define ADC_CFGR_JAWD1EN_Pos (24U) +#define ADC_CFGR_JAWD1EN_Msk (0x1UL << ADC_CFGR_JAWD1EN_Pos) /*!< 0x01000000 */ +#define ADC_CFGR_JAWD1EN ADC_CFGR_JAWD1EN_Msk /*!< ADC analog watchdog 1 enable on scope ADC group injected */ +#define ADC_CFGR_JAUTO_Pos (25U) +#define ADC_CFGR_JAUTO_Msk (0x1UL << ADC_CFGR_JAUTO_Pos) /*!< 0x02000000 */ +#define ADC_CFGR_JAUTO ADC_CFGR_JAUTO_Msk /*!< ADC group injected automatic trigger mode */ + +#define ADC_CFGR_AWD1CH_Pos (26U) +#define ADC_CFGR_AWD1CH_Msk (0x1FUL << ADC_CFGR_AWD1CH_Pos) /*!< 0x7C000000 */ +#define ADC_CFGR_AWD1CH ADC_CFGR_AWD1CH_Msk /*!< ADC analog watchdog 1 monitored channel selection */ +#define ADC_CFGR_AWD1CH_0 (0x01UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x04000000 */ +#define ADC_CFGR_AWD1CH_1 (0x02UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x08000000 */ +#define ADC_CFGR_AWD1CH_2 (0x04UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x10000000 */ +#define ADC_CFGR_AWD1CH_3 (0x08UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x20000000 */ +#define ADC_CFGR_AWD1CH_4 (0x10UL << ADC_CFGR_AWD1CH_Pos) /*!< 0x40000000 */ + +#define ADC_CFGR_JQDIS_Pos (31U) +#define ADC_CFGR_JQDIS_Msk (0x1UL << ADC_CFGR_JQDIS_Pos) /*!< 0x00800000 */ +#define ADC_CFGR_JQDIS ADC_CFGR_JQDIS_Msk /*!< ADC group injected contexts queue disable */ + +/******************** Bit definition for ADC_CFGR2 register *****************/ +#define ADC_CFGR2_ROVSE_Pos (0U) +#define ADC_CFGR2_ROVSE_Msk (0x1UL << ADC_CFGR2_ROVSE_Pos) /*!< 0x00000001 */ +#define ADC_CFGR2_ROVSE ADC_CFGR2_ROVSE_Msk /*!< ADC oversampler enable on scope ADC group regular */ + +#define ADC_CFGR2_JOVSE_Pos (1U) +#define ADC_CFGR2_JOVSE_Msk (0x1UL << ADC_CFGR2_JOVSE_Pos) /*!< 0x00000002 */ +#define ADC_CFGR2_JOVSE ADC_CFGR2_JOVSE_Msk /*!< ADC oversampler enable on scope ADC group injected */ + +#define ADC_CFGR2_OVSR_Pos (2U) +#define ADC_CFGR2_OVSR_Msk (0x7UL << ADC_CFGR2_OVSR_Pos) /*!< 0x0000001C */ +#define ADC_CFGR2_OVSR ADC_CFGR2_OVSR_Msk /*!< ADC oversampling ratio */ +#define ADC_CFGR2_OVSR_0 (0x1UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00000004 */ +#define ADC_CFGR2_OVSR_1 (0x2UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00000008 */ +#define ADC_CFGR2_OVSR_2 (0x4UL << ADC_CFGR2_OVSR_Pos) /*!< 0x00000010 */ + +#define ADC_CFGR2_OVSS_Pos (5U) +#define ADC_CFGR2_OVSS_Msk (0xFUL << ADC_CFGR2_OVSS_Pos) /*!< 0x000001E0 */ +#define ADC_CFGR2_OVSS ADC_CFGR2_OVSS_Msk /*!< ADC oversampling shift */ +#define ADC_CFGR2_OVSS_0 (0x1UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000020 */ +#define ADC_CFGR2_OVSS_1 (0x2UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000040 */ +#define ADC_CFGR2_OVSS_2 (0x4UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000080 */ +#define ADC_CFGR2_OVSS_3 (0x8UL << ADC_CFGR2_OVSS_Pos) /*!< 0x00000100 */ + +#define ADC_CFGR2_TROVS_Pos (9U) +#define ADC_CFGR2_TROVS_Msk (0x1UL << ADC_CFGR2_TROVS_Pos) /*!< 0x00000200 */ +#define ADC_CFGR2_TROVS ADC_CFGR2_TROVS_Msk /*!< ADC oversampling discontinuous mode (triggered mode) for ADC group regular */ + +#define ADC_CFGR2_ROVSM_Pos (10U) +#define ADC_CFGR2_ROVSM_Msk (0x1UL << ADC_CFGR2_ROVSM_Pos) /*!< 0x00000400 */ +#define ADC_CFGR2_ROVSM ADC_CFGR2_ROVSM_Msk /*!< ADC oversampling mode managing interlaced conversions of ADC group regular and group injected */ + +/******************** Bit definition for ADC_SMPR1 register *****************/ +#define ADC_SMPR1_SMP0_Pos (0U) +#define ADC_SMPR1_SMP0_Msk (0x7UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000007 */ +#define ADC_SMPR1_SMP0 ADC_SMPR1_SMP0_Msk /*!< ADC channel 0 sampling time selection */ +#define ADC_SMPR1_SMP0_0 (0x1UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000001 */ +#define ADC_SMPR1_SMP0_1 (0x2UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000002 */ +#define ADC_SMPR1_SMP0_2 (0x4UL << ADC_SMPR1_SMP0_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR1_SMP1_Pos (3U) +#define ADC_SMPR1_SMP1_Msk (0x7UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000038 */ +#define ADC_SMPR1_SMP1 ADC_SMPR1_SMP1_Msk /*!< ADC channel 1 sampling time selection */ +#define ADC_SMPR1_SMP1_0 (0x1UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000008 */ +#define ADC_SMPR1_SMP1_1 (0x2UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000010 */ +#define ADC_SMPR1_SMP1_2 (0x4UL << ADC_SMPR1_SMP1_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR1_SMP2_Pos (6U) +#define ADC_SMPR1_SMP2_Msk (0x7UL << ADC_SMPR1_SMP2_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR1_SMP2 ADC_SMPR1_SMP2_Msk /*!< ADC channel 2 sampling time selection */ +#define ADC_SMPR1_SMP2_0 (0x1UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000040 */ +#define ADC_SMPR1_SMP2_1 (0x2UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000080 */ +#define ADC_SMPR1_SMP2_2 (0x4UL << ADC_SMPR1_SMP2_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR1_SMP3_Pos (9U) +#define ADC_SMPR1_SMP3_Msk (0x7UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR1_SMP3 ADC_SMPR1_SMP3_Msk /*!< ADC channel 3 sampling time selection */ +#define ADC_SMPR1_SMP3_0 (0x1UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000200 */ +#define ADC_SMPR1_SMP3_1 (0x2UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000400 */ +#define ADC_SMPR1_SMP3_2 (0x4UL << ADC_SMPR1_SMP3_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR1_SMP4_Pos (12U) +#define ADC_SMPR1_SMP4_Msk (0x7UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00007000 */ +#define ADC_SMPR1_SMP4 ADC_SMPR1_SMP4_Msk /*!< ADC channel 4 sampling time selection */ +#define ADC_SMPR1_SMP4_0 (0x1UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00001000 */ +#define ADC_SMPR1_SMP4_1 (0x2UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00002000 */ +#define ADC_SMPR1_SMP4_2 (0x4UL << ADC_SMPR1_SMP4_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR1_SMP5_Pos (15U) +#define ADC_SMPR1_SMP5_Msk (0x7UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00038000 */ +#define ADC_SMPR1_SMP5 ADC_SMPR1_SMP5_Msk /*!< ADC channel 5 sampling time selection */ +#define ADC_SMPR1_SMP5_0 (0x1UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00008000 */ +#define ADC_SMPR1_SMP5_1 (0x2UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00010000 */ +#define ADC_SMPR1_SMP5_2 (0x4UL << ADC_SMPR1_SMP5_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR1_SMP6_Pos (18U) +#define ADC_SMPR1_SMP6_Msk (0x7UL << ADC_SMPR1_SMP6_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR1_SMP6 ADC_SMPR1_SMP6_Msk /*!< ADC channel 6 sampling time selection */ +#define ADC_SMPR1_SMP6_0 (0x1UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00040000 */ +#define ADC_SMPR1_SMP6_1 (0x2UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00080000 */ +#define ADC_SMPR1_SMP6_2 (0x4UL << ADC_SMPR1_SMP6_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR1_SMP7_Pos (21U) +#define ADC_SMPR1_SMP7_Msk (0x7UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR1_SMP7 ADC_SMPR1_SMP7_Msk /*!< ADC channel 7 sampling time selection */ +#define ADC_SMPR1_SMP7_0 (0x1UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00200000 */ +#define ADC_SMPR1_SMP7_1 (0x2UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00400000 */ +#define ADC_SMPR1_SMP7_2 (0x4UL << ADC_SMPR1_SMP7_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR1_SMP8_Pos (24U) +#define ADC_SMPR1_SMP8_Msk (0x7UL << ADC_SMPR1_SMP8_Pos) /*!< 0x07000000 */ +#define ADC_SMPR1_SMP8 ADC_SMPR1_SMP8_Msk /*!< ADC channel 8 sampling time selection */ +#define ADC_SMPR1_SMP8_0 (0x1UL << ADC_SMPR1_SMP8_Pos) /*!< 0x01000000 */ +#define ADC_SMPR1_SMP8_1 (0x2UL << ADC_SMPR1_SMP8_Pos) /*!< 0x02000000 */ +#define ADC_SMPR1_SMP8_2 (0x4UL << ADC_SMPR1_SMP8_Pos) /*!< 0x04000000 */ + +#define ADC_SMPR1_SMP9_Pos (27U) +#define ADC_SMPR1_SMP9_Msk (0x7UL << ADC_SMPR1_SMP9_Pos) /*!< 0x38000000 */ +#define ADC_SMPR1_SMP9 ADC_SMPR1_SMP9_Msk /*!< ADC channel 9 sampling time selection */ +#define ADC_SMPR1_SMP9_0 (0x1UL << ADC_SMPR1_SMP9_Pos) /*!< 0x08000000 */ +#define ADC_SMPR1_SMP9_1 (0x2UL << ADC_SMPR1_SMP9_Pos) /*!< 0x10000000 */ +#define ADC_SMPR1_SMP9_2 (0x4UL << ADC_SMPR1_SMP9_Pos) /*!< 0x20000000 */ + +/******************** Bit definition for ADC_SMPR2 register *****************/ +#define ADC_SMPR2_SMP10_Pos (0U) +#define ADC_SMPR2_SMP10_Msk (0x7UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000007 */ +#define ADC_SMPR2_SMP10 ADC_SMPR2_SMP10_Msk /*!< ADC channel 10 sampling time selection */ +#define ADC_SMPR2_SMP10_0 (0x1UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000001 */ +#define ADC_SMPR2_SMP10_1 (0x2UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000002 */ +#define ADC_SMPR2_SMP10_2 (0x4UL << ADC_SMPR2_SMP10_Pos) /*!< 0x00000004 */ + +#define ADC_SMPR2_SMP11_Pos (3U) +#define ADC_SMPR2_SMP11_Msk (0x7UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000038 */ +#define ADC_SMPR2_SMP11 ADC_SMPR2_SMP11_Msk /*!< ADC channel 11 sampling time selection */ +#define ADC_SMPR2_SMP11_0 (0x1UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000008 */ +#define ADC_SMPR2_SMP11_1 (0x2UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000010 */ +#define ADC_SMPR2_SMP11_2 (0x4UL << ADC_SMPR2_SMP11_Pos) /*!< 0x00000020 */ + +#define ADC_SMPR2_SMP12_Pos (6U) +#define ADC_SMPR2_SMP12_Msk (0x7UL << ADC_SMPR2_SMP12_Pos) /*!< 0x000001C0 */ +#define ADC_SMPR2_SMP12 ADC_SMPR2_SMP12_Msk /*!< ADC channel 12 sampling time selection */ +#define ADC_SMPR2_SMP12_0 (0x1UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000040 */ +#define ADC_SMPR2_SMP12_1 (0x2UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000080 */ +#define ADC_SMPR2_SMP12_2 (0x4UL << ADC_SMPR2_SMP12_Pos) /*!< 0x00000100 */ + +#define ADC_SMPR2_SMP13_Pos (9U) +#define ADC_SMPR2_SMP13_Msk (0x7UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000E00 */ +#define ADC_SMPR2_SMP13 ADC_SMPR2_SMP13_Msk /*!< ADC channel 13 sampling time selection */ +#define ADC_SMPR2_SMP13_0 (0x1UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000200 */ +#define ADC_SMPR2_SMP13_1 (0x2UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000400 */ +#define ADC_SMPR2_SMP13_2 (0x4UL << ADC_SMPR2_SMP13_Pos) /*!< 0x00000800 */ + +#define ADC_SMPR2_SMP14_Pos (12U) +#define ADC_SMPR2_SMP14_Msk (0x7UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00007000 */ +#define ADC_SMPR2_SMP14 ADC_SMPR2_SMP14_Msk /*!< ADC channel 14 sampling time selection */ +#define ADC_SMPR2_SMP14_0 (0x1UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00001000 */ +#define ADC_SMPR2_SMP14_1 (0x2UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00002000 */ +#define ADC_SMPR2_SMP14_2 (0x4UL << ADC_SMPR2_SMP14_Pos) /*!< 0x00004000 */ + +#define ADC_SMPR2_SMP15_Pos (15U) +#define ADC_SMPR2_SMP15_Msk (0x7UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00038000 */ +#define ADC_SMPR2_SMP15 ADC_SMPR2_SMP15_Msk /*!< ADC channel 15 sampling time selection */ +#define ADC_SMPR2_SMP15_0 (0x1UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00008000 */ +#define ADC_SMPR2_SMP15_1 (0x2UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00010000 */ +#define ADC_SMPR2_SMP15_2 (0x4UL << ADC_SMPR2_SMP15_Pos) /*!< 0x00020000 */ + +#define ADC_SMPR2_SMP16_Pos (18U) +#define ADC_SMPR2_SMP16_Msk (0x7UL << ADC_SMPR2_SMP16_Pos) /*!< 0x001C0000 */ +#define ADC_SMPR2_SMP16 ADC_SMPR2_SMP16_Msk /*!< ADC channel 16 sampling time selection */ +#define ADC_SMPR2_SMP16_0 (0x1UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00040000 */ +#define ADC_SMPR2_SMP16_1 (0x2UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00080000 */ +#define ADC_SMPR2_SMP16_2 (0x4UL << ADC_SMPR2_SMP16_Pos) /*!< 0x00100000 */ + +#define ADC_SMPR2_SMP17_Pos (21U) +#define ADC_SMPR2_SMP17_Msk (0x7UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00E00000 */ +#define ADC_SMPR2_SMP17 ADC_SMPR2_SMP17_Msk /*!< ADC channel 17 sampling time selection */ +#define ADC_SMPR2_SMP17_0 (0x1UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00200000 */ +#define ADC_SMPR2_SMP17_1 (0x2UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00400000 */ +#define ADC_SMPR2_SMP17_2 (0x4UL << ADC_SMPR2_SMP17_Pos) /*!< 0x00800000 */ + +#define ADC_SMPR2_SMP18_Pos (24U) +#define ADC_SMPR2_SMP18_Msk (0x7UL << ADC_SMPR2_SMP18_Pos) /*!< 0x07000000 */ +#define ADC_SMPR2_SMP18 ADC_SMPR2_SMP18_Msk /*!< ADC channel 18 sampling time selection */ +#define ADC_SMPR2_SMP18_0 (0x1UL << ADC_SMPR2_SMP18_Pos) /*!< 0x01000000 */ +#define ADC_SMPR2_SMP18_1 (0x2UL << ADC_SMPR2_SMP18_Pos) /*!< 0x02000000 */ +#define ADC_SMPR2_SMP18_2 (0x4UL << ADC_SMPR2_SMP18_Pos) /*!< 0x04000000 */ + +/******************** Bit definition for ADC_TR1 register *******************/ +#define ADC_TR1_LT1_Pos (0U) +#define ADC_TR1_LT1_Msk (0xFFFUL << ADC_TR1_LT1_Pos) /*!< 0x00000FFF */ +#define ADC_TR1_LT1 ADC_TR1_LT1_Msk /*!< ADC analog watchdog 1 threshold low */ +#define ADC_TR1_LT1_0 (0x001UL << ADC_TR1_LT1_Pos) /*!< 0x00000001 */ +#define ADC_TR1_LT1_1 (0x002UL << ADC_TR1_LT1_Pos) /*!< 0x00000002 */ +#define ADC_TR1_LT1_2 (0x004UL << ADC_TR1_LT1_Pos) /*!< 0x00000004 */ +#define ADC_TR1_LT1_3 (0x008UL << ADC_TR1_LT1_Pos) /*!< 0x00000008 */ +#define ADC_TR1_LT1_4 (0x010UL << ADC_TR1_LT1_Pos) /*!< 0x00000010 */ +#define ADC_TR1_LT1_5 (0x020UL << ADC_TR1_LT1_Pos) /*!< 0x00000020 */ +#define ADC_TR1_LT1_6 (0x040UL << ADC_TR1_LT1_Pos) /*!< 0x00000040 */ +#define ADC_TR1_LT1_7 (0x080UL << ADC_TR1_LT1_Pos) /*!< 0x00000080 */ +#define ADC_TR1_LT1_8 (0x100UL << ADC_TR1_LT1_Pos) /*!< 0x00000100 */ +#define ADC_TR1_LT1_9 (0x200UL << ADC_TR1_LT1_Pos) /*!< 0x00000200 */ +#define ADC_TR1_LT1_10 (0x400UL << ADC_TR1_LT1_Pos) /*!< 0x00000400 */ +#define ADC_TR1_LT1_11 (0x800UL << ADC_TR1_LT1_Pos) /*!< 0x00000800 */ + +#define ADC_TR1_HT1_Pos (16U) +#define ADC_TR1_HT1_Msk (0xFFFUL << ADC_TR1_HT1_Pos) /*!< 0x0FFF0000 */ +#define ADC_TR1_HT1 ADC_TR1_HT1_Msk /*!< ADC Analog watchdog 1 threshold high */ +#define ADC_TR1_HT1_0 (0x001UL << ADC_TR1_HT1_Pos) /*!< 0x00010000 */ +#define ADC_TR1_HT1_1 (0x002UL << ADC_TR1_HT1_Pos) /*!< 0x00020000 */ +#define ADC_TR1_HT1_2 (0x004UL << ADC_TR1_HT1_Pos) /*!< 0x00040000 */ +#define ADC_TR1_HT1_3 (0x008UL << ADC_TR1_HT1_Pos) /*!< 0x00080000 */ +#define ADC_TR1_HT1_4 (0x010UL << ADC_TR1_HT1_Pos) /*!< 0x00100000 */ +#define ADC_TR1_HT1_5 (0x020UL << ADC_TR1_HT1_Pos) /*!< 0x00200000 */ +#define ADC_TR1_HT1_6 (0x040UL << ADC_TR1_HT1_Pos) /*!< 0x00400000 */ +#define ADC_TR1_HT1_7 (0x080UL << ADC_TR1_HT1_Pos) /*!< 0x00800000 */ +#define ADC_TR1_HT1_8 (0x100UL << ADC_TR1_HT1_Pos) /*!< 0x01000000 */ +#define ADC_TR1_HT1_9 (0x200UL << ADC_TR1_HT1_Pos) /*!< 0x02000000 */ +#define ADC_TR1_HT1_10 (0x400UL << ADC_TR1_HT1_Pos) /*!< 0x04000000 */ +#define ADC_TR1_HT1_11 (0x800UL << ADC_TR1_HT1_Pos) /*!< 0x08000000 */ + +/******************** Bit definition for ADC_TR2 register *******************/ +#define ADC_TR2_LT2_Pos (0U) +#define ADC_TR2_LT2_Msk (0xFFUL << ADC_TR2_LT2_Pos) /*!< 0x000000FF */ +#define ADC_TR2_LT2 ADC_TR2_LT2_Msk /*!< ADC analog watchdog 2 threshold low */ +#define ADC_TR2_LT2_0 (0x01UL << ADC_TR2_LT2_Pos) /*!< 0x00000001 */ +#define ADC_TR2_LT2_1 (0x02UL << ADC_TR2_LT2_Pos) /*!< 0x00000002 */ +#define ADC_TR2_LT2_2 (0x04UL << ADC_TR2_LT2_Pos) /*!< 0x00000004 */ +#define ADC_TR2_LT2_3 (0x08UL << ADC_TR2_LT2_Pos) /*!< 0x00000008 */ +#define ADC_TR2_LT2_4 (0x10UL << ADC_TR2_LT2_Pos) /*!< 0x00000010 */ +#define ADC_TR2_LT2_5 (0x20UL << ADC_TR2_LT2_Pos) /*!< 0x00000020 */ +#define ADC_TR2_LT2_6 (0x40UL << ADC_TR2_LT2_Pos) /*!< 0x00000040 */ +#define ADC_TR2_LT2_7 (0x80UL << ADC_TR2_LT2_Pos) /*!< 0x00000080 */ + +#define ADC_TR2_HT2_Pos (16U) +#define ADC_TR2_HT2_Msk (0xFFUL << ADC_TR2_HT2_Pos) /*!< 0x00FF0000 */ +#define ADC_TR2_HT2 ADC_TR2_HT2_Msk /*!< ADC analog watchdog 2 threshold high */ +#define ADC_TR2_HT2_0 (0x01UL << ADC_TR2_HT2_Pos) /*!< 0x00010000 */ +#define ADC_TR2_HT2_1 (0x02UL << ADC_TR2_HT2_Pos) /*!< 0x00020000 */ +#define ADC_TR2_HT2_2 (0x04UL << ADC_TR2_HT2_Pos) /*!< 0x00040000 */ +#define ADC_TR2_HT2_3 (0x08UL << ADC_TR2_HT2_Pos) /*!< 0x00080000 */ +#define ADC_TR2_HT2_4 (0x10UL << ADC_TR2_HT2_Pos) /*!< 0x00100000 */ +#define ADC_TR2_HT2_5 (0x20UL << ADC_TR2_HT2_Pos) /*!< 0x00200000 */ +#define ADC_TR2_HT2_6 (0x40UL << ADC_TR2_HT2_Pos) /*!< 0x00400000 */ +#define ADC_TR2_HT2_7 (0x80UL << ADC_TR2_HT2_Pos) /*!< 0x00800000 */ + +/******************** Bit definition for ADC_TR3 register *******************/ +#define ADC_TR3_LT3_Pos (0U) +#define ADC_TR3_LT3_Msk (0xFFUL << ADC_TR3_LT3_Pos) /*!< 0x000000FF */ +#define ADC_TR3_LT3 ADC_TR3_LT3_Msk /*!< ADC analog watchdog 3 threshold low */ +#define ADC_TR3_LT3_0 (0x01UL << ADC_TR3_LT3_Pos) /*!< 0x00000001 */ +#define ADC_TR3_LT3_1 (0x02UL << ADC_TR3_LT3_Pos) /*!< 0x00000002 */ +#define ADC_TR3_LT3_2 (0x04UL << ADC_TR3_LT3_Pos) /*!< 0x00000004 */ +#define ADC_TR3_LT3_3 (0x08UL << ADC_TR3_LT3_Pos) /*!< 0x00000008 */ +#define ADC_TR3_LT3_4 (0x10UL << ADC_TR3_LT3_Pos) /*!< 0x00000010 */ +#define ADC_TR3_LT3_5 (0x20UL << ADC_TR3_LT3_Pos) /*!< 0x00000020 */ +#define ADC_TR3_LT3_6 (0x40UL << ADC_TR3_LT3_Pos) /*!< 0x00000040 */ +#define ADC_TR3_LT3_7 (0x80UL << ADC_TR3_LT3_Pos) /*!< 0x00000080 */ + +#define ADC_TR3_HT3_Pos (16U) +#define ADC_TR3_HT3_Msk (0xFFUL << ADC_TR3_HT3_Pos) /*!< 0x00FF0000 */ +#define ADC_TR3_HT3 ADC_TR3_HT3_Msk /*!< ADC analog watchdog 3 threshold high */ +#define ADC_TR3_HT3_0 (0x01UL << ADC_TR3_HT3_Pos) /*!< 0x00010000 */ +#define ADC_TR3_HT3_1 (0x02UL << ADC_TR3_HT3_Pos) /*!< 0x00020000 */ +#define ADC_TR3_HT3_2 (0x04UL << ADC_TR3_HT3_Pos) /*!< 0x00040000 */ +#define ADC_TR3_HT3_3 (0x08UL << ADC_TR3_HT3_Pos) /*!< 0x00080000 */ +#define ADC_TR3_HT3_4 (0x10UL << ADC_TR3_HT3_Pos) /*!< 0x00100000 */ +#define ADC_TR3_HT3_5 (0x20UL << ADC_TR3_HT3_Pos) /*!< 0x00200000 */ +#define ADC_TR3_HT3_6 (0x40UL << ADC_TR3_HT3_Pos) /*!< 0x00400000 */ +#define ADC_TR3_HT3_7 (0x80UL << ADC_TR3_HT3_Pos) /*!< 0x00800000 */ + +/******************** Bit definition for ADC_SQR1 register ******************/ +#define ADC_SQR1_L_Pos (0U) +#define ADC_SQR1_L_Msk (0xFUL << ADC_SQR1_L_Pos) /*!< 0x0000000F */ +#define ADC_SQR1_L ADC_SQR1_L_Msk /*!< ADC group regular sequencer scan length */ +#define ADC_SQR1_L_0 (0x1UL << ADC_SQR1_L_Pos) /*!< 0x00000001 */ +#define ADC_SQR1_L_1 (0x2UL << ADC_SQR1_L_Pos) /*!< 0x00000002 */ +#define ADC_SQR1_L_2 (0x4UL << ADC_SQR1_L_Pos) /*!< 0x00000004 */ +#define ADC_SQR1_L_3 (0x8UL << ADC_SQR1_L_Pos) /*!< 0x00000008 */ + +#define ADC_SQR1_SQ1_Pos (6U) +#define ADC_SQR1_SQ1_Msk (0x1FUL << ADC_SQR1_SQ1_Pos) /*!< 0x000007C0 */ +#define ADC_SQR1_SQ1 ADC_SQR1_SQ1_Msk /*!< ADC group regular sequencer rank 1 */ +#define ADC_SQR1_SQ1_0 (0x01UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000040 */ +#define ADC_SQR1_SQ1_1 (0x02UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000080 */ +#define ADC_SQR1_SQ1_2 (0x04UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000100 */ +#define ADC_SQR1_SQ1_3 (0x08UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000200 */ +#define ADC_SQR1_SQ1_4 (0x10UL << ADC_SQR1_SQ1_Pos) /*!< 0x00000400 */ + +#define ADC_SQR1_SQ2_Pos (12U) +#define ADC_SQR1_SQ2_Msk (0x1FUL << ADC_SQR1_SQ2_Pos) /*!< 0x0001F000 */ +#define ADC_SQR1_SQ2 ADC_SQR1_SQ2_Msk /*!< ADC group regular sequencer rank 2 */ +#define ADC_SQR1_SQ2_0 (0x01UL << ADC_SQR1_SQ2_Pos) /*!< 0x00001000 */ +#define ADC_SQR1_SQ2_1 (0x02UL << ADC_SQR1_SQ2_Pos) /*!< 0x00002000 */ +#define ADC_SQR1_SQ2_2 (0x04UL << ADC_SQR1_SQ2_Pos) /*!< 0x00004000 */ +#define ADC_SQR1_SQ2_3 (0x08UL << ADC_SQR1_SQ2_Pos) /*!< 0x00008000 */ +#define ADC_SQR1_SQ2_4 (0x10UL << ADC_SQR1_SQ2_Pos) /*!< 0x00010000 */ + +#define ADC_SQR1_SQ3_Pos (18U) +#define ADC_SQR1_SQ3_Msk (0x1FUL << ADC_SQR1_SQ3_Pos) /*!< 0x007C0000 */ +#define ADC_SQR1_SQ3 ADC_SQR1_SQ3_Msk /*!< ADC group regular sequencer rank 3 */ +#define ADC_SQR1_SQ3_0 (0x01UL << ADC_SQR1_SQ3_Pos) /*!< 0x00040000 */ +#define ADC_SQR1_SQ3_1 (0x02UL << ADC_SQR1_SQ3_Pos) /*!< 0x00080000 */ +#define ADC_SQR1_SQ3_2 (0x04UL << ADC_SQR1_SQ3_Pos) /*!< 0x00100000 */ +#define ADC_SQR1_SQ3_3 (0x08UL << ADC_SQR1_SQ3_Pos) /*!< 0x00200000 */ +#define ADC_SQR1_SQ3_4 (0x10UL << ADC_SQR1_SQ3_Pos) /*!< 0x00400000 */ + +#define ADC_SQR1_SQ4_Pos (24U) +#define ADC_SQR1_SQ4_Msk (0x1FUL << ADC_SQR1_SQ4_Pos) /*!< 0x1F000000 */ +#define ADC_SQR1_SQ4 ADC_SQR1_SQ4_Msk /*!< ADC group regular sequencer rank 4 */ +#define ADC_SQR1_SQ4_0 (0x01UL << ADC_SQR1_SQ4_Pos) /*!< 0x01000000 */ +#define ADC_SQR1_SQ4_1 (0x02UL << ADC_SQR1_SQ4_Pos) /*!< 0x02000000 */ +#define ADC_SQR1_SQ4_2 (0x04UL << ADC_SQR1_SQ4_Pos) /*!< 0x04000000 */ +#define ADC_SQR1_SQ4_3 (0x08UL << ADC_SQR1_SQ4_Pos) /*!< 0x08000000 */ +#define ADC_SQR1_SQ4_4 (0x10UL << ADC_SQR1_SQ4_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR2 register ******************/ +#define ADC_SQR2_SQ5_Pos (0U) +#define ADC_SQR2_SQ5_Msk (0x1FUL << ADC_SQR2_SQ5_Pos) /*!< 0x0000001F */ +#define ADC_SQR2_SQ5 ADC_SQR2_SQ5_Msk /*!< ADC group regular sequencer rank 5 */ +#define ADC_SQR2_SQ5_0 (0x01UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000001 */ +#define ADC_SQR2_SQ5_1 (0x02UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000002 */ +#define ADC_SQR2_SQ5_2 (0x04UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000004 */ +#define ADC_SQR2_SQ5_3 (0x08UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000008 */ +#define ADC_SQR2_SQ5_4 (0x10UL << ADC_SQR2_SQ5_Pos) /*!< 0x00000010 */ + +#define ADC_SQR2_SQ6_Pos (6U) +#define ADC_SQR2_SQ6_Msk (0x1FUL << ADC_SQR2_SQ6_Pos) /*!< 0x000007C0 */ +#define ADC_SQR2_SQ6 ADC_SQR2_SQ6_Msk /*!< ADC group regular sequencer rank 6 */ +#define ADC_SQR2_SQ6_0 (0x01UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000040 */ +#define ADC_SQR2_SQ6_1 (0x02UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000080 */ +#define ADC_SQR2_SQ6_2 (0x04UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000100 */ +#define ADC_SQR2_SQ6_3 (0x08UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000200 */ +#define ADC_SQR2_SQ6_4 (0x10UL << ADC_SQR2_SQ6_Pos) /*!< 0x00000400 */ + +#define ADC_SQR2_SQ7_Pos (12U) +#define ADC_SQR2_SQ7_Msk (0x1FUL << ADC_SQR2_SQ7_Pos) /*!< 0x0001F000 */ +#define ADC_SQR2_SQ7 ADC_SQR2_SQ7_Msk /*!< ADC group regular sequencer rank 7 */ +#define ADC_SQR2_SQ7_0 (0x01UL << ADC_SQR2_SQ7_Pos) /*!< 0x00001000 */ +#define ADC_SQR2_SQ7_1 (0x02UL << ADC_SQR2_SQ7_Pos) /*!< 0x00002000 */ +#define ADC_SQR2_SQ7_2 (0x04UL << ADC_SQR2_SQ7_Pos) /*!< 0x00004000 */ +#define ADC_SQR2_SQ7_3 (0x08UL << ADC_SQR2_SQ7_Pos) /*!< 0x00008000 */ +#define ADC_SQR2_SQ7_4 (0x10UL << ADC_SQR2_SQ7_Pos) /*!< 0x00010000 */ + +#define ADC_SQR2_SQ8_Pos (18U) +#define ADC_SQR2_SQ8_Msk (0x1FUL << ADC_SQR2_SQ8_Pos) /*!< 0x007C0000 */ +#define ADC_SQR2_SQ8 ADC_SQR2_SQ8_Msk /*!< ADC group regular sequencer rank 8 */ +#define ADC_SQR2_SQ8_0 (0x01UL << ADC_SQR2_SQ8_Pos) /*!< 0x00040000 */ +#define ADC_SQR2_SQ8_1 (0x02UL << ADC_SQR2_SQ8_Pos) /*!< 0x00080000 */ +#define ADC_SQR2_SQ8_2 (0x04UL << ADC_SQR2_SQ8_Pos) /*!< 0x00100000 */ +#define ADC_SQR2_SQ8_3 (0x08UL << ADC_SQR2_SQ8_Pos) /*!< 0x00200000 */ +#define ADC_SQR2_SQ8_4 (0x10UL << ADC_SQR2_SQ8_Pos) /*!< 0x00400000 */ + +#define ADC_SQR2_SQ9_Pos (24U) +#define ADC_SQR2_SQ9_Msk (0x1FUL << ADC_SQR2_SQ9_Pos) /*!< 0x1F000000 */ +#define ADC_SQR2_SQ9 ADC_SQR2_SQ9_Msk /*!< ADC group regular sequencer rank 9 */ +#define ADC_SQR2_SQ9_0 (0x01UL << ADC_SQR2_SQ9_Pos) /*!< 0x01000000 */ +#define ADC_SQR2_SQ9_1 (0x02UL << ADC_SQR2_SQ9_Pos) /*!< 0x02000000 */ +#define ADC_SQR2_SQ9_2 (0x04UL << ADC_SQR2_SQ9_Pos) /*!< 0x04000000 */ +#define ADC_SQR2_SQ9_3 (0x08UL << ADC_SQR2_SQ9_Pos) /*!< 0x08000000 */ +#define ADC_SQR2_SQ9_4 (0x10UL << ADC_SQR2_SQ9_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR3 register ******************/ +#define ADC_SQR3_SQ10_Pos (0U) +#define ADC_SQR3_SQ10_Msk (0x1FUL << ADC_SQR3_SQ10_Pos) /*!< 0x0000001F */ +#define ADC_SQR3_SQ10 ADC_SQR3_SQ10_Msk /*!< ADC group regular sequencer rank 10 */ +#define ADC_SQR3_SQ10_0 (0x01UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000001 */ +#define ADC_SQR3_SQ10_1 (0x02UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000002 */ +#define ADC_SQR3_SQ10_2 (0x04UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000004 */ +#define ADC_SQR3_SQ10_3 (0x08UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000008 */ +#define ADC_SQR3_SQ10_4 (0x10UL << ADC_SQR3_SQ10_Pos) /*!< 0x00000010 */ + +#define ADC_SQR3_SQ11_Pos (6U) +#define ADC_SQR3_SQ11_Msk (0x1FUL << ADC_SQR3_SQ11_Pos) /*!< 0x000007C0 */ +#define ADC_SQR3_SQ11 ADC_SQR3_SQ11_Msk /*!< ADC group regular sequencer rank 11 */ +#define ADC_SQR3_SQ11_0 (0x01UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000040 */ +#define ADC_SQR3_SQ11_1 (0x02UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000080 */ +#define ADC_SQR3_SQ11_2 (0x04UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000100 */ +#define ADC_SQR3_SQ11_3 (0x08UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000200 */ +#define ADC_SQR3_SQ11_4 (0x10UL << ADC_SQR3_SQ11_Pos) /*!< 0x00000400 */ + +#define ADC_SQR3_SQ12_Pos (12U) +#define ADC_SQR3_SQ12_Msk (0x1FUL << ADC_SQR3_SQ12_Pos) /*!< 0x0001F000 */ +#define ADC_SQR3_SQ12 ADC_SQR3_SQ12_Msk /*!< ADC group regular sequencer rank 12 */ +#define ADC_SQR3_SQ12_0 (0x01UL << ADC_SQR3_SQ12_Pos) /*!< 0x00001000 */ +#define ADC_SQR3_SQ12_1 (0x02UL << ADC_SQR3_SQ12_Pos) /*!< 0x00002000 */ +#define ADC_SQR3_SQ12_2 (0x04UL << ADC_SQR3_SQ12_Pos) /*!< 0x00004000 */ +#define ADC_SQR3_SQ12_3 (0x08UL << ADC_SQR3_SQ12_Pos) /*!< 0x00008000 */ +#define ADC_SQR3_SQ12_4 (0x10UL << ADC_SQR3_SQ12_Pos) /*!< 0x00010000 */ + +#define ADC_SQR3_SQ13_Pos (18U) +#define ADC_SQR3_SQ13_Msk (0x1FUL << ADC_SQR3_SQ13_Pos) /*!< 0x007C0000 */ +#define ADC_SQR3_SQ13 ADC_SQR3_SQ13_Msk /*!< ADC group regular sequencer rank 13 */ +#define ADC_SQR3_SQ13_0 (0x01UL << ADC_SQR3_SQ13_Pos) /*!< 0x00040000 */ +#define ADC_SQR3_SQ13_1 (0x02UL << ADC_SQR3_SQ13_Pos) /*!< 0x00080000 */ +#define ADC_SQR3_SQ13_2 (0x04UL << ADC_SQR3_SQ13_Pos) /*!< 0x00100000 */ +#define ADC_SQR3_SQ13_3 (0x08UL << ADC_SQR3_SQ13_Pos) /*!< 0x00200000 */ +#define ADC_SQR3_SQ13_4 (0x10UL << ADC_SQR3_SQ13_Pos) /*!< 0x00400000 */ + +#define ADC_SQR3_SQ14_Pos (24U) +#define ADC_SQR3_SQ14_Msk (0x1FUL << ADC_SQR3_SQ14_Pos) /*!< 0x1F000000 */ +#define ADC_SQR3_SQ14 ADC_SQR3_SQ14_Msk /*!< ADC group regular sequencer rank 14 */ +#define ADC_SQR3_SQ14_0 (0x01UL << ADC_SQR3_SQ14_Pos) /*!< 0x01000000 */ +#define ADC_SQR3_SQ14_1 (0x02UL << ADC_SQR3_SQ14_Pos) /*!< 0x02000000 */ +#define ADC_SQR3_SQ14_2 (0x04UL << ADC_SQR3_SQ14_Pos) /*!< 0x04000000 */ +#define ADC_SQR3_SQ14_3 (0x08UL << ADC_SQR3_SQ14_Pos) /*!< 0x08000000 */ +#define ADC_SQR3_SQ14_4 (0x10UL << ADC_SQR3_SQ14_Pos) /*!< 0x10000000 */ + +/******************** Bit definition for ADC_SQR4 register ******************/ +#define ADC_SQR4_SQ15_Pos (0U) +#define ADC_SQR4_SQ15_Msk (0x1FUL << ADC_SQR4_SQ15_Pos) /*!< 0x0000001F */ +#define ADC_SQR4_SQ15 ADC_SQR4_SQ15_Msk /*!< ADC group regular sequencer rank 15 */ +#define ADC_SQR4_SQ15_0 (0x01UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000001 */ +#define ADC_SQR4_SQ15_1 (0x02UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000002 */ +#define ADC_SQR4_SQ15_2 (0x04UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000004 */ +#define ADC_SQR4_SQ15_3 (0x08UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000008 */ +#define ADC_SQR4_SQ15_4 (0x10UL << ADC_SQR4_SQ15_Pos) /*!< 0x00000010 */ + +#define ADC_SQR4_SQ16_Pos (6U) +#define ADC_SQR4_SQ16_Msk (0x1FUL << ADC_SQR4_SQ16_Pos) /*!< 0x000007C0 */ +#define ADC_SQR4_SQ16 ADC_SQR4_SQ16_Msk /*!< ADC group regular sequencer rank 16 */ +#define ADC_SQR4_SQ16_0 (0x01UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000040 */ +#define ADC_SQR4_SQ16_1 (0x02UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000080 */ +#define ADC_SQR4_SQ16_2 (0x04UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000100 */ +#define ADC_SQR4_SQ16_3 (0x08UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000200 */ +#define ADC_SQR4_SQ16_4 (0x10UL << ADC_SQR4_SQ16_Pos) /*!< 0x00000400 */ + +/******************** Bit definition for ADC_DR register ********************/ +#define ADC_DR_RDATA_Pos (0U) +#define ADC_DR_RDATA_Msk (0xFFFFUL << ADC_DR_RDATA_Pos) /*!< 0x0000FFFF */ +#define ADC_DR_RDATA ADC_DR_RDATA_Msk /*!< ADC group regular conversion data */ +#define ADC_DR_RDATA_0 (0x0001UL << ADC_DR_RDATA_Pos) /*!< 0x00000001 */ +#define ADC_DR_RDATA_1 (0x0002UL << ADC_DR_RDATA_Pos) /*!< 0x00000002 */ +#define ADC_DR_RDATA_2 (0x0004UL << ADC_DR_RDATA_Pos) /*!< 0x00000004 */ +#define ADC_DR_RDATA_3 (0x0008UL << ADC_DR_RDATA_Pos) /*!< 0x00000008 */ +#define ADC_DR_RDATA_4 (0x0010UL << ADC_DR_RDATA_Pos) /*!< 0x00000010 */ +#define ADC_DR_RDATA_5 (0x0020UL << ADC_DR_RDATA_Pos) /*!< 0x00000020 */ +#define ADC_DR_RDATA_6 (0x0040UL << ADC_DR_RDATA_Pos) /*!< 0x00000040 */ +#define ADC_DR_RDATA_7 (0x0080UL << ADC_DR_RDATA_Pos) /*!< 0x00000080 */ +#define ADC_DR_RDATA_8 (0x0100UL << ADC_DR_RDATA_Pos) /*!< 0x00000100 */ +#define ADC_DR_RDATA_9 (0x0200UL << ADC_DR_RDATA_Pos) /*!< 0x00000200 */ +#define ADC_DR_RDATA_10 (0x0400UL << ADC_DR_RDATA_Pos) /*!< 0x00000400 */ +#define ADC_DR_RDATA_11 (0x0800UL << ADC_DR_RDATA_Pos) /*!< 0x00000800 */ +#define ADC_DR_RDATA_12 (0x1000UL << ADC_DR_RDATA_Pos) /*!< 0x00001000 */ +#define ADC_DR_RDATA_13 (0x2000UL << ADC_DR_RDATA_Pos) /*!< 0x00002000 */ +#define ADC_DR_RDATA_14 (0x4000UL << ADC_DR_RDATA_Pos) /*!< 0x00004000 */ +#define ADC_DR_RDATA_15 (0x8000UL << ADC_DR_RDATA_Pos) /*!< 0x00008000 */ + +/******************** Bit definition for ADC_JSQR register ******************/ +#define ADC_JSQR_JL_Pos (0U) +#define ADC_JSQR_JL_Msk (0x3UL << ADC_JSQR_JL_Pos) /*!< 0x00000003 */ +#define ADC_JSQR_JL ADC_JSQR_JL_Msk /*!< ADC group injected sequencer scan length */ +#define ADC_JSQR_JL_0 (0x1UL << ADC_JSQR_JL_Pos) /*!< 0x00000001 */ +#define ADC_JSQR_JL_1 (0x2UL << ADC_JSQR_JL_Pos) /*!< 0x00000002 */ + +#define ADC_JSQR_JEXTSEL_Pos (2U) +#define ADC_JSQR_JEXTSEL_Msk (0xFUL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x0000003C */ +#define ADC_JSQR_JEXTSEL ADC_JSQR_JEXTSEL_Msk /*!< ADC group injected external trigger source */ +#define ADC_JSQR_JEXTSEL_0 (0x1UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000004 */ +#define ADC_JSQR_JEXTSEL_1 (0x2UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000008 */ +#define ADC_JSQR_JEXTSEL_2 (0x4UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000010 */ +#define ADC_JSQR_JEXTSEL_3 (0x8UL << ADC_JSQR_JEXTSEL_Pos) /*!< 0x00000020 */ + +#define ADC_JSQR_JEXTEN_Pos (6U) +#define ADC_JSQR_JEXTEN_Msk (0x3UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x000000C0 */ +#define ADC_JSQR_JEXTEN ADC_JSQR_JEXTEN_Msk /*!< ADC group injected external trigger polarity */ +#define ADC_JSQR_JEXTEN_0 (0x1UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000040 */ +#define ADC_JSQR_JEXTEN_1 (0x2UL << ADC_JSQR_JEXTEN_Pos) /*!< 0x00000080 */ + +#define ADC_JSQR_JSQ1_Pos (8U) +#define ADC_JSQR_JSQ1_Msk (0x1FUL << ADC_JSQR_JSQ1_Pos) /*!< 0x00001F00 */ +#define ADC_JSQR_JSQ1 ADC_JSQR_JSQ1_Msk /*!< ADC group injected sequencer rank 1 */ +#define ADC_JSQR_JSQ1_0 (0x01UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000100 */ +#define ADC_JSQR_JSQ1_1 (0x02UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000200 */ +#define ADC_JSQR_JSQ1_2 (0x04UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000400 */ +#define ADC_JSQR_JSQ1_3 (0x08UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00000800 */ +#define ADC_JSQR_JSQ1_4 (0x10UL << ADC_JSQR_JSQ1_Pos) /*!< 0x00001000 */ + +#define ADC_JSQR_JSQ2_Pos (14U) +#define ADC_JSQR_JSQ2_Msk (0x1FUL << ADC_JSQR_JSQ2_Pos) /*!< 0x0007C000 */ +#define ADC_JSQR_JSQ2 ADC_JSQR_JSQ2_Msk /*!< ADC group injected sequencer rank 2 */ +#define ADC_JSQR_JSQ2_0 (0x01UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00004000 */ +#define ADC_JSQR_JSQ2_1 (0x02UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00008000 */ +#define ADC_JSQR_JSQ2_2 (0x04UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00010000 */ +#define ADC_JSQR_JSQ2_3 (0x08UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00020000 */ +#define ADC_JSQR_JSQ2_4 (0x10UL << ADC_JSQR_JSQ2_Pos) /*!< 0x00040000 */ + +#define ADC_JSQR_JSQ3_Pos (20U) +#define ADC_JSQR_JSQ3_Msk (0x1FUL << ADC_JSQR_JSQ3_Pos) /*!< 0x01F00000 */ +#define ADC_JSQR_JSQ3 ADC_JSQR_JSQ3_Msk /*!< ADC group injected sequencer rank 3 */ +#define ADC_JSQR_JSQ3_0 (0x01UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00100000 */ +#define ADC_JSQR_JSQ3_1 (0x02UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00200000 */ +#define ADC_JSQR_JSQ3_2 (0x04UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00400000 */ +#define ADC_JSQR_JSQ3_3 (0x08UL << ADC_JSQR_JSQ3_Pos) /*!< 0x00800000 */ +#define ADC_JSQR_JSQ3_4 (0x10UL << ADC_JSQR_JSQ3_Pos) /*!< 0x01000000 */ + +#define ADC_JSQR_JSQ4_Pos (26U) +#define ADC_JSQR_JSQ4_Msk (0x1FUL << ADC_JSQR_JSQ4_Pos) /*!< 0x7C000000 */ +#define ADC_JSQR_JSQ4 ADC_JSQR_JSQ4_Msk /*!< ADC group injected sequencer rank 4 */ +#define ADC_JSQR_JSQ4_0 (0x01UL << ADC_JSQR_JSQ4_Pos) /*!< 0x04000000 */ +#define ADC_JSQR_JSQ4_1 (0x02UL << ADC_JSQR_JSQ4_Pos) /*!< 0x08000000 */ +#define ADC_JSQR_JSQ4_2 (0x04UL << ADC_JSQR_JSQ4_Pos) /*!< 0x10000000 */ +#define ADC_JSQR_JSQ4_3 (0x08UL << ADC_JSQR_JSQ4_Pos) /*!< 0x20000000 */ +#define ADC_JSQR_JSQ4_4 (0x10UL << ADC_JSQR_JSQ4_Pos) /*!< 0x40000000 */ + +/******************** Bit definition for ADC_OFR1 register ******************/ +#define ADC_OFR1_OFFSET1_Pos (0U) +#define ADC_OFR1_OFFSET1_Msk (0xFFFUL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000FFF */ +#define ADC_OFR1_OFFSET1 ADC_OFR1_OFFSET1_Msk /*!< ADC offset number 1 offset level */ +#define ADC_OFR1_OFFSET1_0 (0x001UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000001 */ +#define ADC_OFR1_OFFSET1_1 (0x002UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000002 */ +#define ADC_OFR1_OFFSET1_2 (0x004UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000004 */ +#define ADC_OFR1_OFFSET1_3 (0x008UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000008 */ +#define ADC_OFR1_OFFSET1_4 (0x010UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000010 */ +#define ADC_OFR1_OFFSET1_5 (0x020UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000020 */ +#define ADC_OFR1_OFFSET1_6 (0x040UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000040 */ +#define ADC_OFR1_OFFSET1_7 (0x080UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000080 */ +#define ADC_OFR1_OFFSET1_8 (0x100UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000100 */ +#define ADC_OFR1_OFFSET1_9 (0x200UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000200 */ +#define ADC_OFR1_OFFSET1_10 (0x400UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000400 */ +#define ADC_OFR1_OFFSET1_11 (0x800UL << ADC_OFR1_OFFSET1_Pos) /*!< 0x00000800 */ + +#define ADC_OFR1_OFFSET1_CH_Pos (26U) +#define ADC_OFR1_OFFSET1_CH_Msk (0x1FUL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR1_OFFSET1_CH ADC_OFR1_OFFSET1_CH_Msk /*!< ADC offset number 1 channel selection */ +#define ADC_OFR1_OFFSET1_CH_0 (0x01UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR1_OFFSET1_CH_1 (0x02UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR1_OFFSET1_CH_2 (0x04UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR1_OFFSET1_CH_3 (0x08UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR1_OFFSET1_CH_4 (0x10UL << ADC_OFR1_OFFSET1_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR1_OFFSET1_EN_Pos (31U) +#define ADC_OFR1_OFFSET1_EN_Msk (0x1UL << ADC_OFR1_OFFSET1_EN_Pos) /*!< 0x80000000 */ +#define ADC_OFR1_OFFSET1_EN ADC_OFR1_OFFSET1_EN_Msk /*!< ADC offset number 1 enable */ + +/******************** Bit definition for ADC_OFR2 register ******************/ +#define ADC_OFR2_OFFSET2_Pos (0U) +#define ADC_OFR2_OFFSET2_Msk (0xFFFUL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000FFF */ +#define ADC_OFR2_OFFSET2 ADC_OFR2_OFFSET2_Msk /*!< ADC offset number 2 offset level */ +#define ADC_OFR2_OFFSET2_0 (0x001UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000001 */ +#define ADC_OFR2_OFFSET2_1 (0x002UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000002 */ +#define ADC_OFR2_OFFSET2_2 (0x004UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000004 */ +#define ADC_OFR2_OFFSET2_3 (0x008UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000008 */ +#define ADC_OFR2_OFFSET2_4 (0x010UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000010 */ +#define ADC_OFR2_OFFSET2_5 (0x020UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000020 */ +#define ADC_OFR2_OFFSET2_6 (0x040UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000040 */ +#define ADC_OFR2_OFFSET2_7 (0x080UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000080 */ +#define ADC_OFR2_OFFSET2_8 (0x100UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000100 */ +#define ADC_OFR2_OFFSET2_9 (0x200UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000200 */ +#define ADC_OFR2_OFFSET2_10 (0x400UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000400 */ +#define ADC_OFR2_OFFSET2_11 (0x800UL << ADC_OFR2_OFFSET2_Pos) /*!< 0x00000800 */ + +#define ADC_OFR2_OFFSET2_CH_Pos (26U) +#define ADC_OFR2_OFFSET2_CH_Msk (0x1FUL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR2_OFFSET2_CH ADC_OFR2_OFFSET2_CH_Msk /*!< ADC offset number 2 channel selection */ +#define ADC_OFR2_OFFSET2_CH_0 (0x01UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR2_OFFSET2_CH_1 (0x02UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR2_OFFSET2_CH_2 (0x04UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR2_OFFSET2_CH_3 (0x08UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR2_OFFSET2_CH_4 (0x10UL << ADC_OFR2_OFFSET2_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR2_OFFSET2_EN_Pos (31U) +#define ADC_OFR2_OFFSET2_EN_Msk (0x1UL << ADC_OFR2_OFFSET2_EN_Pos) /*!< 0x80000000 */ +#define ADC_OFR2_OFFSET2_EN ADC_OFR2_OFFSET2_EN_Msk /*!< ADC offset number 2 enable */ + +/******************** Bit definition for ADC_OFR3 register ******************/ +#define ADC_OFR3_OFFSET3_Pos (0U) +#define ADC_OFR3_OFFSET3_Msk (0xFFFUL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000FFF */ +#define ADC_OFR3_OFFSET3 ADC_OFR3_OFFSET3_Msk /*!< ADC offset number 3 offset level */ +#define ADC_OFR3_OFFSET3_0 (0x001UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000001 */ +#define ADC_OFR3_OFFSET3_1 (0x002UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000002 */ +#define ADC_OFR3_OFFSET3_2 (0x004UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000004 */ +#define ADC_OFR3_OFFSET3_3 (0x008UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000008 */ +#define ADC_OFR3_OFFSET3_4 (0x010UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000010 */ +#define ADC_OFR3_OFFSET3_5 (0x020UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000020 */ +#define ADC_OFR3_OFFSET3_6 (0x040UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000040 */ +#define ADC_OFR3_OFFSET3_7 (0x080UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000080 */ +#define ADC_OFR3_OFFSET3_8 (0x100UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000100 */ +#define ADC_OFR3_OFFSET3_9 (0x200UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000200 */ +#define ADC_OFR3_OFFSET3_10 (0x400UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000400 */ +#define ADC_OFR3_OFFSET3_11 (0x800UL << ADC_OFR3_OFFSET3_Pos) /*!< 0x00000800 */ + +#define ADC_OFR3_OFFSET3_CH_Pos (26U) +#define ADC_OFR3_OFFSET3_CH_Msk (0x1FUL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR3_OFFSET3_CH ADC_OFR3_OFFSET3_CH_Msk /*!< ADC offset number 3 channel selection */ +#define ADC_OFR3_OFFSET3_CH_0 (0x01UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR3_OFFSET3_CH_1 (0x02UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR3_OFFSET3_CH_2 (0x04UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR3_OFFSET3_CH_3 (0x08UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR3_OFFSET3_CH_4 (0x10UL << ADC_OFR3_OFFSET3_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR3_OFFSET3_EN_Pos (31U) +#define ADC_OFR3_OFFSET3_EN_Msk (0x1UL << ADC_OFR3_OFFSET3_EN_Pos) /*!< 0x80000000 */ +#define ADC_OFR3_OFFSET3_EN ADC_OFR3_OFFSET3_EN_Msk /*!< ADC offset number 3 enable */ + +/******************** Bit definition for ADC_OFR4 register ******************/ +#define ADC_OFR4_OFFSET4_Pos (0U) +#define ADC_OFR4_OFFSET4_Msk (0xFFFUL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000FFF */ +#define ADC_OFR4_OFFSET4 ADC_OFR4_OFFSET4_Msk /*!< ADC offset number 4 offset level */ +#define ADC_OFR4_OFFSET4_0 (0x001UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000001 */ +#define ADC_OFR4_OFFSET4_1 (0x002UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000002 */ +#define ADC_OFR4_OFFSET4_2 (0x004UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000004 */ +#define ADC_OFR4_OFFSET4_3 (0x008UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000008 */ +#define ADC_OFR4_OFFSET4_4 (0x010UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000010 */ +#define ADC_OFR4_OFFSET4_5 (0x020UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000020 */ +#define ADC_OFR4_OFFSET4_6 (0x040UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000040 */ +#define ADC_OFR4_OFFSET4_7 (0x080UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000080 */ +#define ADC_OFR4_OFFSET4_8 (0x100UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000100 */ +#define ADC_OFR4_OFFSET4_9 (0x200UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000200 */ +#define ADC_OFR4_OFFSET4_10 (0x400UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000400 */ +#define ADC_OFR4_OFFSET4_11 (0x800UL << ADC_OFR4_OFFSET4_Pos) /*!< 0x00000800 */ + +#define ADC_OFR4_OFFSET4_CH_Pos (26U) +#define ADC_OFR4_OFFSET4_CH_Msk (0x1FUL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x7C000000 */ +#define ADC_OFR4_OFFSET4_CH ADC_OFR4_OFFSET4_CH_Msk /*!< ADC offset number 4 channel selection */ +#define ADC_OFR4_OFFSET4_CH_0 (0x01UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x04000000 */ +#define ADC_OFR4_OFFSET4_CH_1 (0x02UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x08000000 */ +#define ADC_OFR4_OFFSET4_CH_2 (0x04UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x10000000 */ +#define ADC_OFR4_OFFSET4_CH_3 (0x08UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x20000000 */ +#define ADC_OFR4_OFFSET4_CH_4 (0x10UL << ADC_OFR4_OFFSET4_CH_Pos) /*!< 0x40000000 */ + +#define ADC_OFR4_OFFSET4_EN_Pos (31U) +#define ADC_OFR4_OFFSET4_EN_Msk (0x1UL << ADC_OFR4_OFFSET4_EN_Pos) /*!< 0x80000000 */ +#define ADC_OFR4_OFFSET4_EN ADC_OFR4_OFFSET4_EN_Msk /*!< ADC offset number 4 enable */ + +/******************** Bit definition for ADC_JDR1 register ******************/ +#define ADC_JDR1_JDATA_Pos (0U) +#define ADC_JDR1_JDATA_Msk (0xFFFFUL << ADC_JDR1_JDATA_Pos) /*!< 0x0000FFFF */ +#define ADC_JDR1_JDATA ADC_JDR1_JDATA_Msk /*!< ADC group injected sequencer rank 1 conversion data */ +#define ADC_JDR1_JDATA_0 (0x0001UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR1_JDATA_1 (0x0002UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR1_JDATA_2 (0x0004UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR1_JDATA_3 (0x0008UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR1_JDATA_4 (0x0010UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR1_JDATA_5 (0x0020UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR1_JDATA_6 (0x0040UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR1_JDATA_7 (0x0080UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR1_JDATA_8 (0x0100UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR1_JDATA_9 (0x0200UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR1_JDATA_10 (0x0400UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR1_JDATA_11 (0x0800UL << ADC_JDR1_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR1_JDATA_12 (0x1000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR1_JDATA_13 (0x2000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR1_JDATA_14 (0x4000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR1_JDATA_15 (0x8000UL << ADC_JDR1_JDATA_Pos) /*!< 0x00008000 */ + +/******************** Bit definition for ADC_JDR2 register ******************/ +#define ADC_JDR2_JDATA_Pos (0U) +#define ADC_JDR2_JDATA_Msk (0xFFFFUL << ADC_JDR2_JDATA_Pos) /*!< 0x0000FFFF */ +#define ADC_JDR2_JDATA ADC_JDR2_JDATA_Msk /*!< ADC group injected sequencer rank 2 conversion data */ +#define ADC_JDR2_JDATA_0 (0x0001UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR2_JDATA_1 (0x0002UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR2_JDATA_2 (0x0004UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR2_JDATA_3 (0x0008UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR2_JDATA_4 (0x0010UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR2_JDATA_5 (0x0020UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR2_JDATA_6 (0x0040UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR2_JDATA_7 (0x0080UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR2_JDATA_8 (0x0100UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR2_JDATA_9 (0x0200UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR2_JDATA_10 (0x0400UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR2_JDATA_11 (0x0800UL << ADC_JDR2_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR2_JDATA_12 (0x1000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR2_JDATA_13 (0x2000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR2_JDATA_14 (0x4000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR2_JDATA_15 (0x8000UL << ADC_JDR2_JDATA_Pos) /*!< 0x00008000 */ + +/******************** Bit definition for ADC_JDR3 register ******************/ +#define ADC_JDR3_JDATA_Pos (0U) +#define ADC_JDR3_JDATA_Msk (0xFFFFUL << ADC_JDR3_JDATA_Pos) /*!< 0x0000FFFF */ +#define ADC_JDR3_JDATA ADC_JDR3_JDATA_Msk /*!< ADC group injected sequencer rank 3 conversion data */ +#define ADC_JDR3_JDATA_0 (0x0001UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR3_JDATA_1 (0x0002UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR3_JDATA_2 (0x0004UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR3_JDATA_3 (0x0008UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR3_JDATA_4 (0x0010UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR3_JDATA_5 (0x0020UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR3_JDATA_6 (0x0040UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR3_JDATA_7 (0x0080UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR3_JDATA_8 (0x0100UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR3_JDATA_9 (0x0200UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR3_JDATA_10 (0x0400UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR3_JDATA_11 (0x0800UL << ADC_JDR3_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR3_JDATA_12 (0x1000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR3_JDATA_13 (0x2000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR3_JDATA_14 (0x4000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR3_JDATA_15 (0x8000UL << ADC_JDR3_JDATA_Pos) /*!< 0x00008000 */ + +/******************** Bit definition for ADC_JDR4 register ******************/ +#define ADC_JDR4_JDATA_Pos (0U) +#define ADC_JDR4_JDATA_Msk (0xFFFFUL << ADC_JDR4_JDATA_Pos) /*!< 0x0000FFFF */ +#define ADC_JDR4_JDATA ADC_JDR4_JDATA_Msk /*!< ADC group injected sequencer rank 4 conversion data */ +#define ADC_JDR4_JDATA_0 (0x0001UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000001 */ +#define ADC_JDR4_JDATA_1 (0x0002UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000002 */ +#define ADC_JDR4_JDATA_2 (0x0004UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000004 */ +#define ADC_JDR4_JDATA_3 (0x0008UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000008 */ +#define ADC_JDR4_JDATA_4 (0x0010UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000010 */ +#define ADC_JDR4_JDATA_5 (0x0020UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000020 */ +#define ADC_JDR4_JDATA_6 (0x0040UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000040 */ +#define ADC_JDR4_JDATA_7 (0x0080UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000080 */ +#define ADC_JDR4_JDATA_8 (0x0100UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000100 */ +#define ADC_JDR4_JDATA_9 (0x0200UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000200 */ +#define ADC_JDR4_JDATA_10 (0x0400UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000400 */ +#define ADC_JDR4_JDATA_11 (0x0800UL << ADC_JDR4_JDATA_Pos) /*!< 0x00000800 */ +#define ADC_JDR4_JDATA_12 (0x1000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00001000 */ +#define ADC_JDR4_JDATA_13 (0x2000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00002000 */ +#define ADC_JDR4_JDATA_14 (0x4000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00004000 */ +#define ADC_JDR4_JDATA_15 (0x8000UL << ADC_JDR4_JDATA_Pos) /*!< 0x00008000 */ + +/******************** Bit definition for ADC_AWD2CR register ****************/ +#define ADC_AWD2CR_AWD2CH_Pos (0U) +#define ADC_AWD2CR_AWD2CH_Msk (0x7FFFFUL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x0007FFFF */ +#define ADC_AWD2CR_AWD2CH ADC_AWD2CR_AWD2CH_Msk /*!< ADC analog watchdog 2 monitored channel selection */ +#define ADC_AWD2CR_AWD2CH_0 (0x00001UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD2CR_AWD2CH_1 (0x00002UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD2CR_AWD2CH_2 (0x00004UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD2CR_AWD2CH_3 (0x00008UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD2CR_AWD2CH_4 (0x00010UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD2CR_AWD2CH_5 (0x00020UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD2CR_AWD2CH_6 (0x00040UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD2CR_AWD2CH_7 (0x00080UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD2CR_AWD2CH_8 (0x00100UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD2CR_AWD2CH_9 (0x00200UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD2CR_AWD2CH_10 (0x00400UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD2CR_AWD2CH_11 (0x00800UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD2CR_AWD2CH_12 (0x01000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD2CR_AWD2CH_13 (0x02000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD2CR_AWD2CH_14 (0x04000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD2CR_AWD2CH_15 (0x08000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD2CR_AWD2CH_16 (0x10000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD2CR_AWD2CH_17 (0x20000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD2CR_AWD2CH_18 (0x40000UL << ADC_AWD2CR_AWD2CH_Pos) /*!< 0x00040000 */ + +/******************** Bit definition for ADC_AWD3CR register ****************/ +#define ADC_AWD3CR_AWD3CH_Pos (0U) +#define ADC_AWD3CR_AWD3CH_Msk (0x7FFFFUL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x0007FFFF */ +#define ADC_AWD3CR_AWD3CH ADC_AWD3CR_AWD3CH_Msk /*!< ADC analog watchdog 3 monitored channel selection */ +#define ADC_AWD3CR_AWD3CH_0 (0x00001UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000001 */ +#define ADC_AWD3CR_AWD3CH_1 (0x00002UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000002 */ +#define ADC_AWD3CR_AWD3CH_2 (0x00004UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000004 */ +#define ADC_AWD3CR_AWD3CH_3 (0x00008UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000008 */ +#define ADC_AWD3CR_AWD3CH_4 (0x00010UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000010 */ +#define ADC_AWD3CR_AWD3CH_5 (0x00020UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000020 */ +#define ADC_AWD3CR_AWD3CH_6 (0x00040UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000040 */ +#define ADC_AWD3CR_AWD3CH_7 (0x00080UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000080 */ +#define ADC_AWD3CR_AWD3CH_8 (0x00100UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000100 */ +#define ADC_AWD3CR_AWD3CH_9 (0x00200UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000200 */ +#define ADC_AWD3CR_AWD3CH_10 (0x00400UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000400 */ +#define ADC_AWD3CR_AWD3CH_11 (0x00800UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00000800 */ +#define ADC_AWD3CR_AWD3CH_12 (0x01000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00001000 */ +#define ADC_AWD3CR_AWD3CH_13 (0x02000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00002000 */ +#define ADC_AWD3CR_AWD3CH_14 (0x04000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00004000 */ +#define ADC_AWD3CR_AWD3CH_15 (0x08000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00008000 */ +#define ADC_AWD3CR_AWD3CH_16 (0x10000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00010000 */ +#define ADC_AWD3CR_AWD3CH_17 (0x20000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00020000 */ +#define ADC_AWD3CR_AWD3CH_18 (0x40000UL << ADC_AWD3CR_AWD3CH_Pos) /*!< 0x00040000 */ + +/******************** Bit definition for ADC_DIFSEL register ****************/ +#define ADC_DIFSEL_DIFSEL_Pos (0U) +#define ADC_DIFSEL_DIFSEL_Msk (0x7FFFFUL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x0007FFFF */ +#define ADC_DIFSEL_DIFSEL ADC_DIFSEL_DIFSEL_Msk /*!< ADC channel differential or single-ended mode */ +#define ADC_DIFSEL_DIFSEL_0 (0x00001UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000001 */ +#define ADC_DIFSEL_DIFSEL_1 (0x00002UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000002 */ +#define ADC_DIFSEL_DIFSEL_2 (0x00004UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000004 */ +#define ADC_DIFSEL_DIFSEL_3 (0x00008UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000008 */ +#define ADC_DIFSEL_DIFSEL_4 (0x00010UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000010 */ +#define ADC_DIFSEL_DIFSEL_5 (0x00020UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000020 */ +#define ADC_DIFSEL_DIFSEL_6 (0x00040UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000040 */ +#define ADC_DIFSEL_DIFSEL_7 (0x00080UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000080 */ +#define ADC_DIFSEL_DIFSEL_8 (0x00100UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000100 */ +#define ADC_DIFSEL_DIFSEL_9 (0x00200UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000200 */ +#define ADC_DIFSEL_DIFSEL_10 (0x00400UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000400 */ +#define ADC_DIFSEL_DIFSEL_11 (0x00800UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00000800 */ +#define ADC_DIFSEL_DIFSEL_12 (0x01000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00001000 */ +#define ADC_DIFSEL_DIFSEL_13 (0x02000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00002000 */ +#define ADC_DIFSEL_DIFSEL_14 (0x04000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00004000 */ +#define ADC_DIFSEL_DIFSEL_15 (0x08000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00008000 */ +#define ADC_DIFSEL_DIFSEL_16 (0x10000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00010000 */ +#define ADC_DIFSEL_DIFSEL_17 (0x20000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00020000 */ +#define ADC_DIFSEL_DIFSEL_18 (0x40000UL << ADC_DIFSEL_DIFSEL_Pos) /*!< 0x00040000 */ + +/******************** Bit definition for ADC_CALFACT register ***************/ +#define ADC_CALFACT_CALFACT_S_Pos (0U) +#define ADC_CALFACT_CALFACT_S_Msk (0x7FUL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x0000007F */ +#define ADC_CALFACT_CALFACT_S ADC_CALFACT_CALFACT_S_Msk /*!< ADC calibration factor in single-ended mode */ +#define ADC_CALFACT_CALFACT_S_0 (0x01UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000001 */ +#define ADC_CALFACT_CALFACT_S_1 (0x02UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000002 */ +#define ADC_CALFACT_CALFACT_S_2 (0x04UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000004 */ +#define ADC_CALFACT_CALFACT_S_3 (0x08UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000008 */ +#define ADC_CALFACT_CALFACT_S_4 (0x10UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000010 */ +#define ADC_CALFACT_CALFACT_S_5 (0x20UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000020 */ +#define ADC_CALFACT_CALFACT_S_6 (0x40UL << ADC_CALFACT_CALFACT_S_Pos) /*!< 0x00000040 */ + +#define ADC_CALFACT_CALFACT_D_Pos (16U) +#define ADC_CALFACT_CALFACT_D_Msk (0x7FUL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x007F0000 */ +#define ADC_CALFACT_CALFACT_D ADC_CALFACT_CALFACT_D_Msk /*!< ADC calibration factor in differential mode */ +#define ADC_CALFACT_CALFACT_D_0 (0x01UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00010000 */ +#define ADC_CALFACT_CALFACT_D_1 (0x02UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00020000 */ +#define ADC_CALFACT_CALFACT_D_2 (0x04UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00040000 */ +#define ADC_CALFACT_CALFACT_D_3 (0x08UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00080000 */ +#define ADC_CALFACT_CALFACT_D_4 (0x10UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00100000 */ +#define ADC_CALFACT_CALFACT_D_5 (0x20UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00200000 */ +#define ADC_CALFACT_CALFACT_D_6 (0x40UL << ADC_CALFACT_CALFACT_D_Pos) /*!< 0x00400000 */ + +/************************* ADC Common registers *****************************/ +/******************** Bit definition for ADC_CCR register *******************/ +#define ADC_CCR_DUAL_Pos (0U) +#define ADC_CCR_DUAL_Msk (0x1FUL << ADC_CCR_DUAL_Pos) /*!< 0x0000001F */ +#define ADC_CCR_DUAL ADC_CCR_DUAL_Msk /*!< ADC multimode mode selection */ +#define ADC_CCR_DUAL_0 (0x01UL << ADC_CCR_DUAL_Pos) /*!< 0x00000001 */ +#define ADC_CCR_DUAL_1 (0x02UL << ADC_CCR_DUAL_Pos) /*!< 0x00000002 */ +#define ADC_CCR_DUAL_2 (0x04UL << ADC_CCR_DUAL_Pos) /*!< 0x00000004 */ +#define ADC_CCR_DUAL_3 (0x08UL << ADC_CCR_DUAL_Pos) /*!< 0x00000008 */ +#define ADC_CCR_DUAL_4 (0x10UL << ADC_CCR_DUAL_Pos) /*!< 0x00000010 */ + +#define ADC_CCR_DELAY_Pos (8U) +#define ADC_CCR_DELAY_Msk (0xFUL << ADC_CCR_DELAY_Pos) /*!< 0x00000F00 */ +#define ADC_CCR_DELAY ADC_CCR_DELAY_Msk /*!< ADC multimode delay between 2 sampling phases */ +#define ADC_CCR_DELAY_0 (0x1UL << ADC_CCR_DELAY_Pos) /*!< 0x00000100 */ +#define ADC_CCR_DELAY_1 (0x2UL << ADC_CCR_DELAY_Pos) /*!< 0x00000200 */ +#define ADC_CCR_DELAY_2 (0x4UL << ADC_CCR_DELAY_Pos) /*!< 0x00000400 */ +#define ADC_CCR_DELAY_3 (0x8UL << ADC_CCR_DELAY_Pos) /*!< 0x00000800 */ + +#define ADC_CCR_DMACFG_Pos (13U) +#define ADC_CCR_DMACFG_Msk (0x1UL << ADC_CCR_DMACFG_Pos) /*!< 0x00002000 */ +#define ADC_CCR_DMACFG ADC_CCR_DMACFG_Msk /*!< ADC multimode DMA transfer configuration */ + +#define ADC_CCR_MDMA_Pos (14U) +#define ADC_CCR_MDMA_Msk (0x3UL << ADC_CCR_MDMA_Pos) /*!< 0x0000C000 */ +#define ADC_CCR_MDMA ADC_CCR_MDMA_Msk /*!< ADC multimode DMA transfer enable */ +#define ADC_CCR_MDMA_0 (0x1UL << ADC_CCR_MDMA_Pos) /*!< 0x00004000 */ +#define ADC_CCR_MDMA_1 (0x2UL << ADC_CCR_MDMA_Pos) /*!< 0x00008000 */ + +#define ADC_CCR_CKMODE_Pos (16U) +#define ADC_CCR_CKMODE_Msk (0x3UL << ADC_CCR_CKMODE_Pos) /*!< 0x00030000 */ +#define ADC_CCR_CKMODE ADC_CCR_CKMODE_Msk /*!< ADC common clock source and prescaler (prescaler only for clock source synchronous) */ +#define ADC_CCR_CKMODE_0 (0x1UL << ADC_CCR_CKMODE_Pos) /*!< 0x00010000 */ +#define ADC_CCR_CKMODE_1 (0x2UL << ADC_CCR_CKMODE_Pos) /*!< 0x00020000 */ + +#define ADC_CCR_PRESC_Pos (18U) +#define ADC_CCR_PRESC_Msk (0xFUL << ADC_CCR_PRESC_Pos) /*!< 0x003A0000 */ +#define ADC_CCR_PRESC ADC_CCR_PRESC_Msk /*!< ADC common clock prescaler, only for clock source asynchronous */ +#define ADC_CCR_PRESC_0 (0x1UL << ADC_CCR_PRESC_Pos) /*!< 0x00000100 */ +#define ADC_CCR_PRESC_1 (0x2UL << ADC_CCR_PRESC_Pos) /*!< 0x00000200 */ +#define ADC_CCR_PRESC_2 (0x4UL << ADC_CCR_PRESC_Pos) /*!< 0x00000400 */ +#define ADC_CCR_PRESC_3 (0x8UL << ADC_CCR_PRESC_Pos) /*!< 0x00000800 */ + +#define ADC_CCR_VREFEN_Pos (22U) +#define ADC_CCR_VREFEN_Msk (0x1UL << ADC_CCR_VREFEN_Pos) /*!< 0x00400000 */ +#define ADC_CCR_VREFEN ADC_CCR_VREFEN_Msk /*!< ADC internal path to VrefInt enable */ +#define ADC_CCR_TSEN_Pos (23U) +#define ADC_CCR_TSEN_Msk (0x1UL << ADC_CCR_TSEN_Pos) /*!< 0x00800000 */ +#define ADC_CCR_TSEN ADC_CCR_TSEN_Msk /*!< ADC internal path to temperature sensor enable */ +#define ADC_CCR_VBATEN_Pos (24U) +#define ADC_CCR_VBATEN_Msk (0x1UL << ADC_CCR_VBATEN_Pos) /*!< 0x01000000 */ +#define ADC_CCR_VBATEN ADC_CCR_VBATEN_Msk /*!< ADC internal path to battery voltage enable */ + +/* Legacy defines */ +#define ADC_CCR_MULTI (ADC_CCR_DUAL) +#define ADC_CCR_MULTI_0 (ADC_CCR_DUAL_0) +#define ADC_CCR_MULTI_1 (ADC_CCR_DUAL_1) +#define ADC_CCR_MULTI_2 (ADC_CCR_DUAL_2) +#define ADC_CCR_MULTI_3 (ADC_CCR_DUAL_3) +#define ADC_CCR_MULTI_4 (ADC_CCR_DUAL_4) + +/******************************************************************************/ +/* */ +/* Analog Comparators (COMP) */ +/* */ +/******************************************************************************/ +/********************** Bit definition for COMP_CSR register ***************/ +#define COMP_CSR_EN_Pos (0U) +#define COMP_CSR_EN_Msk (0x1UL << COMP_CSR_EN_Pos) /*!< 0x00000001 */ +#define COMP_CSR_EN COMP_CSR_EN_Msk /*!< Comparator enable */ +#define COMP_CSR_PWRMODE_Pos (2U) +#define COMP_CSR_PWRMODE_Msk (0x3UL << COMP_CSR_PWRMODE_Pos) /*!< 0x0000000C */ +#define COMP_CSR_PWRMODE COMP_CSR_PWRMODE_Msk /*!< Comparator power mode */ +#define COMP_CSR_PWRMODE_0 (0x1UL << COMP_CSR_PWRMODE_Pos) /*!< 0x00000004 */ +#define COMP_CSR_PWRMODE_1 (0x2UL << COMP_CSR_PWRMODE_Pos) /*!< 0x00000008 */ +#define COMP_CSR_INMSEL_Pos (4U) +#define COMP_CSR_INMSEL_Msk (0x7UL << COMP_CSR_INMSEL_Pos) /*!< 0x00000070 */ +#define COMP_CSR_INMSEL COMP_CSR_INMSEL_Msk /*!< Comparator input minus selection */ +#define COMP_CSR_INMSEL_0 (0x1UL << COMP_CSR_INMSEL_Pos) /*!< 0x00000010 */ +#define COMP_CSR_INMSEL_1 (0x2UL << COMP_CSR_INMSEL_Pos) /*!< 0x00000020 */ +#define COMP_CSR_INMSEL_2 (0x4UL << COMP_CSR_INMSEL_Pos) /*!< 0x00000040 */ +#define COMP_CSR_INPSEL_Pos (7U) +#define COMP_CSR_INPSEL_Msk (0x3UL << COMP_CSR_INPSEL_Pos) /*!< 0x00000180 */ +#define COMP_CSR_INPSEL COMP_CSR_INPSEL_Msk /*!< Comparator input plus selection */ +#define COMP_CSR_INPSEL_0 (0x1UL << COMP_CSR_INPSEL_Pos) /*!< 0x00000080 */ +#define COMP_CSR_INPSEL_1 (0x2UL << COMP_CSR_INPSEL_Pos) /*!< 0x00000100 */ +#define COMP_CSR_WINMODE_Pos (9U) +#define COMP_CSR_WINMODE_Msk (0x1UL << COMP_CSR_WINMODE_Pos) /*!< 0x00000200 */ +#define COMP_CSR_WINMODE COMP_CSR_WINMODE_Msk /*!< Pair of comparators window mode. Bit intended to be used with COMP common instance (COMP_Common_TypeDef) */ +#define COMP_CSR_POLARITY_Pos (15U) +#define COMP_CSR_POLARITY_Msk (0x1UL << COMP_CSR_POLARITY_Pos) /*!< 0x00008000 */ +#define COMP_CSR_POLARITY COMP_CSR_POLARITY_Msk /*!< Comparator output polarity */ +#define COMP_CSR_HYST_Pos (16U) +#define COMP_CSR_HYST_Msk (0x3UL << COMP_CSR_HYST_Pos) /*!< 0x00030000 */ +#define COMP_CSR_HYST COMP_CSR_HYST_Msk /*!< Comparator hysteresis */ +#define COMP_CSR_HYST_0 (0x1UL << COMP_CSR_HYST_Pos) /*!< 0x00010000 */ +#define COMP_CSR_HYST_1 (0x2UL << COMP_CSR_HYST_Pos) /*!< 0x00020000 */ +#define COMP_CSR_BLANKING_Pos (18U) +#define COMP_CSR_BLANKING_Msk (0x7UL << COMP_CSR_BLANKING_Pos) /*!< 0x001C0000 */ +#define COMP_CSR_BLANKING COMP_CSR_BLANKING_Msk /*!< Comparator blanking source */ +#define COMP_CSR_BLANKING_0 (0x1UL << COMP_CSR_BLANKING_Pos) /*!< 0x00040000 */ +#define COMP_CSR_BLANKING_1 (0x2UL << COMP_CSR_BLANKING_Pos) /*!< 0x00080000 */ +#define COMP_CSR_BLANKING_2 (0x4UL << COMP_CSR_BLANKING_Pos) /*!< 0x00100000 */ +#define COMP_CSR_BRGEN_Pos (22U) +#define COMP_CSR_BRGEN_Msk (0x1UL << COMP_CSR_BRGEN_Pos) /*!< 0x00400000 */ +#define COMP_CSR_BRGEN COMP_CSR_BRGEN_Msk /*!< Comparator voltage scaler enable */ +#define COMP_CSR_SCALEN_Pos (23U) +#define COMP_CSR_SCALEN_Msk (0x1UL << COMP_CSR_SCALEN_Pos) /*!< 0x00800000 */ +#define COMP_CSR_SCALEN COMP_CSR_SCALEN_Msk /*!< Comparator scaler bridge enable */ +#define COMP_CSR_INMESEL_Pos (25U) +#define COMP_CSR_INMESEL_Msk (0x3UL << COMP_CSR_INMESEL_Pos) /*!< 0x06000000 */ +#define COMP_CSR_INMESEL COMP_CSR_INMESEL_Msk /*!< Comparator input minus extended selection */ +#define COMP_CSR_INMESEL_0 (0x1UL << COMP_CSR_INMESEL_Pos) /*!< 0x02000000 */ +#define COMP_CSR_INMESEL_1 (0x2UL << COMP_CSR_INMESEL_Pos) /*!< 0x04000000 */ +#define COMP_CSR_VALUE_Pos (30U) +#define COMP_CSR_VALUE_Msk (0x1UL << COMP_CSR_VALUE_Pos) /*!< 0x40000000 */ +#define COMP_CSR_VALUE COMP_CSR_VALUE_Msk /*!< Comparator output level */ +#define COMP_CSR_LOCK_Pos (31U) +#define COMP_CSR_LOCK_Msk (0x1UL << COMP_CSR_LOCK_Pos) /*!< 0x80000000 */ +#define COMP_CSR_LOCK COMP_CSR_LOCK_Msk /*!< Comparator lock */ + +/******************************************************************************/ +/* */ +/* CRC calculation unit */ +/* */ +/******************************************************************************/ +/******************* Bit definition for CRC_DR register *********************/ +#define CRC_DR_DR_Pos (0U) +#define CRC_DR_DR_Msk (0xFFFFFFFFUL << CRC_DR_DR_Pos) /*!< 0xFFFFFFFF */ +#define CRC_DR_DR CRC_DR_DR_Msk /*!< Data register bits */ + +/******************* Bit definition for CRC_IDR register ********************/ +#define CRC_IDR_IDR_Pos (0U) +#define CRC_IDR_IDR_Msk (0xFFFFFFFFUL << CRC_IDR_IDR_Pos) /*!< 0x000000FF */ +#define CRC_IDR_IDR CRC_IDR_IDR_Msk /*!< General-purpose 8-bits data register bits */ + +/******************** Bit definition for CRC_CR register ********************/ +#define CRC_CR_RESET_Pos (0U) +#define CRC_CR_RESET_Msk (0x1UL << CRC_CR_RESET_Pos) /*!< 0x00000001 */ +#define CRC_CR_RESET CRC_CR_RESET_Msk /*!< RESET the CRC computation unit bit */ +#define CRC_CR_POLYSIZE_Pos (3U) +#define CRC_CR_POLYSIZE_Msk (0x3UL << CRC_CR_POLYSIZE_Pos) /*!< 0x00000018 */ +#define CRC_CR_POLYSIZE CRC_CR_POLYSIZE_Msk /*!< Polynomial size bits */ +#define CRC_CR_POLYSIZE_0 (0x1U << CRC_CR_POLYSIZE_Pos) /*!< 0x00000008 */ +#define CRC_CR_POLYSIZE_1 (0x2U << CRC_CR_POLYSIZE_Pos) /*!< 0x00000010 */ +#define CRC_CR_REV_IN_Pos (5U) +#define CRC_CR_REV_IN_Msk (0x3UL << CRC_CR_REV_IN_Pos) /*!< 0x00000060 */ +#define CRC_CR_REV_IN CRC_CR_REV_IN_Msk /*!< REV_IN Reverse Input Data bits */ +#define CRC_CR_REV_IN_0 (0x1U << CRC_CR_REV_IN_Pos) /*!< 0x00000020 */ +#define CRC_CR_REV_IN_1 (0x2U << CRC_CR_REV_IN_Pos) /*!< 0x00000040 */ +#define CRC_CR_REV_OUT_Pos (7U) +#define CRC_CR_REV_OUT_Msk (0x1UL << CRC_CR_REV_OUT_Pos) /*!< 0x00000080 */ +#define CRC_CR_REV_OUT CRC_CR_REV_OUT_Msk /*!< REV_OUT Reverse Output Data bits */ + +/******************* Bit definition for CRC_INIT register *******************/ +#define CRC_INIT_INIT_Pos (0U) +#define CRC_INIT_INIT_Msk (0xFFFFFFFFUL << CRC_INIT_INIT_Pos) /*!< 0xFFFFFFFF */ +#define CRC_INIT_INIT CRC_INIT_INIT_Msk /*!< Initial CRC value bits */ + +/******************* Bit definition for CRC_POL register ********************/ +#define CRC_POL_POL_Pos (0U) +#define CRC_POL_POL_Msk (0xFFFFFFFFUL << CRC_POL_POL_Pos) /*!< 0xFFFFFFFF */ +#define CRC_POL_POL CRC_POL_POL_Msk /*!< Coefficients of the polynomial */ + +/******************************************************************************/ +/* */ +/* Advanced Encryption Standard (AES) */ +/* */ +/******************************************************************************/ +/******************* Bit definition for AES_CR register *********************/ +#define AES_CR_EN_Pos (0U) +#define AES_CR_EN_Msk (0x1UL << AES_CR_EN_Pos) /*!< 0x00000001 */ +#define AES_CR_EN AES_CR_EN_Msk /*!< AES Enable */ +#define AES_CR_DATATYPE_Pos (1U) +#define AES_CR_DATATYPE_Msk (0x3UL << AES_CR_DATATYPE_Pos) /*!< 0x00000006 */ +#define AES_CR_DATATYPE AES_CR_DATATYPE_Msk /*!< Data type selection */ +#define AES_CR_DATATYPE_0 (0x1U << AES_CR_DATATYPE_Pos) /*!< 0x00000002 */ +#define AES_CR_DATATYPE_1 (0x2U << AES_CR_DATATYPE_Pos) /*!< 0x00000004 */ + +#define AES_CR_MODE_Pos (3U) +#define AES_CR_MODE_Msk (0x3UL << AES_CR_MODE_Pos) /*!< 0x00000018 */ +#define AES_CR_MODE AES_CR_MODE_Msk /*!< AES Mode Of Operation */ +#define AES_CR_MODE_0 (0x1U << AES_CR_MODE_Pos) /*!< 0x00000008 */ +#define AES_CR_MODE_1 (0x2U << AES_CR_MODE_Pos) /*!< 0x00000010 */ + +#define AES_CR_CHMOD_Pos (5U) +#define AES_CR_CHMOD_Msk (0x803UL << AES_CR_CHMOD_Pos) /*!< 0x00010060 */ +#define AES_CR_CHMOD AES_CR_CHMOD_Msk /*!< AES Chaining Mode */ +#define AES_CR_CHMOD_0 (0x001U << AES_CR_CHMOD_Pos) /*!< 0x00000020 */ +#define AES_CR_CHMOD_1 (0x002U << AES_CR_CHMOD_Pos) /*!< 0x00000040 */ +#define AES_CR_CHMOD_2 (0x800U << AES_CR_CHMOD_Pos) /*!< 0x00010000 */ + +#define AES_CR_CCFC_Pos (7U) +#define AES_CR_CCFC_Msk (0x1UL << AES_CR_CCFC_Pos) /*!< 0x00000080 */ +#define AES_CR_CCFC AES_CR_CCFC_Msk /*!< Computation Complete Flag Clear */ +#define AES_CR_ERRC_Pos (8U) +#define AES_CR_ERRC_Msk (0x1UL << AES_CR_ERRC_Pos) /*!< 0x00000100 */ +#define AES_CR_ERRC AES_CR_ERRC_Msk /*!< Error Clear */ +#define AES_CR_CCFIE_Pos (9U) +#define AES_CR_CCFIE_Msk (0x1UL << AES_CR_CCFIE_Pos) /*!< 0x00000200 */ +#define AES_CR_CCFIE AES_CR_CCFIE_Msk /*!< Computation Complete Flag Interrupt Enable */ +#define AES_CR_ERRIE_Pos (10U) +#define AES_CR_ERRIE_Msk (0x1UL << AES_CR_ERRIE_Pos) /*!< 0x00000400 */ +#define AES_CR_ERRIE AES_CR_ERRIE_Msk /*!< Error Interrupt Enable */ +#define AES_CR_DMAINEN_Pos (11U) +#define AES_CR_DMAINEN_Msk (0x1UL << AES_CR_DMAINEN_Pos) /*!< 0x00000800 */ +#define AES_CR_DMAINEN AES_CR_DMAINEN_Msk /*!< Enable data input phase DMA management */ +#define AES_CR_DMAOUTEN_Pos (12U) +#define AES_CR_DMAOUTEN_Msk (0x1UL << AES_CR_DMAOUTEN_Pos) /*!< 0x00001000 */ +#define AES_CR_DMAOUTEN AES_CR_DMAOUTEN_Msk /*!< Enable data output phase DMA management */ + +#define AES_CR_GCMPH_Pos (13U) +#define AES_CR_GCMPH_Msk (0x3UL << AES_CR_GCMPH_Pos) /*!< 0x00006000 */ +#define AES_CR_GCMPH AES_CR_GCMPH_Msk /*!< GCM Phase */ +#define AES_CR_GCMPH_0 (0x1U << AES_CR_GCMPH_Pos) /*!< 0x00002000 */ +#define AES_CR_GCMPH_1 (0x2U << AES_CR_GCMPH_Pos) /*!< 0x00004000 */ + +#define AES_CR_KEYSIZE_Pos (18U) +#define AES_CR_KEYSIZE_Msk (0x1UL << AES_CR_KEYSIZE_Pos) /*!< 0x00040000 */ +#define AES_CR_KEYSIZE AES_CR_KEYSIZE_Msk /*!< Key size selection */ + +#define AES_CR_NPBLB_Pos (20U) +#define AES_CR_NPBLB_Msk (0xFUL << AES_CR_NPBLB_Pos) /*!< 0x00F00000 */ +#define AES_CR_NPBLB AES_CR_NPBLB_Msk /*!< Number of padding bytes in last payload block */ +#define AES_CR_NPBLB_0 (0x1U << AES_CR_NPBLB_Pos) /*!< 0x00100000 */ +#define AES_CR_NPBLB_1 (0x2U << AES_CR_NPBLB_Pos) /*!< 0x00200000 */ +#define AES_CR_NPBLB_2 (0x4U << AES_CR_NPBLB_Pos) /*!< 0x00400000 */ +#define AES_CR_NPBLB_3 (0x8U << AES_CR_NPBLB_Pos) /*!< 0x00800000 */ + +/******************* Bit definition for AES_SR register *********************/ +#define AES_SR_CCF_Pos (0U) +#define AES_SR_CCF_Msk (0x1UL << AES_SR_CCF_Pos) /*!< 0x00000001 */ +#define AES_SR_CCF AES_SR_CCF_Msk /*!< Computation Complete Flag */ +#define AES_SR_RDERR_Pos (1U) +#define AES_SR_RDERR_Msk (0x1UL << AES_SR_RDERR_Pos) /*!< 0x00000002 */ +#define AES_SR_RDERR AES_SR_RDERR_Msk /*!< Read Error Flag */ +#define AES_SR_WRERR_Pos (2U) +#define AES_SR_WRERR_Msk (0x1UL << AES_SR_WRERR_Pos) /*!< 0x00000004 */ +#define AES_SR_WRERR AES_SR_WRERR_Msk /*!< Write Error Flag */ +#define AES_SR_BUSY_Pos (3U) +#define AES_SR_BUSY_Msk (0x1UL << AES_SR_BUSY_Pos) /*!< 0x00000008 */ +#define AES_SR_BUSY AES_SR_BUSY_Msk /*!< Busy Flag */ + +/******************* Bit definition for AES_DINR register *******************/ +#define AES_DINR_Pos (0U) +#define AES_DINR_Msk (0xFFFFFFFFUL << AES_DINR_Pos) /*!< 0xFFFFFFFF */ +#define AES_DINR AES_DINR_Msk /*!< AES Data Input Register */ + +/******************* Bit definition for AES_DOUTR register ******************/ +#define AES_DOUTR_Pos (0U) +#define AES_DOUTR_Msk (0xFFFFFFFFUL << AES_DOUTR_Pos) /*!< 0xFFFFFFFF */ +#define AES_DOUTR AES_DOUTR_Msk /*!< AES Data Output Register */ + +/******************* Bit definition for AES_KEYR0 register ******************/ +#define AES_KEYR0_Pos (0U) +#define AES_KEYR0_Msk (0xFFFFFFFFUL << AES_KEYR0_Pos) /*!< 0xFFFFFFFF */ +#define AES_KEYR0 AES_KEYR0_Msk /*!< AES Key Register 0 */ + +/******************* Bit definition for AES_KEYR1 register ******************/ +#define AES_KEYR1_Pos (0U) +#define AES_KEYR1_Msk (0xFFFFFFFFUL << AES_KEYR1_Pos) /*!< 0xFFFFFFFF */ +#define AES_KEYR1 AES_KEYR1_Msk /*!< AES Key Register 1 */ + +/******************* Bit definition for AES_KEYR2 register ******************/ +#define AES_KEYR2_Pos (0U) +#define AES_KEYR2_Msk (0xFFFFFFFFUL << AES_KEYR2_Pos) /*!< 0xFFFFFFFF */ +#define AES_KEYR2 AES_KEYR2_Msk /*!< AES Key Register 2 */ + +/******************* Bit definition for AES_KEYR3 register ******************/ +#define AES_KEYR3_Pos (0U) +#define AES_KEYR3_Msk (0xFFFFFFFFUL << AES_KEYR3_Pos) /*!< 0xFFFFFFFF */ +#define AES_KEYR3 AES_KEYR3_Msk /*!< AES Key Register 3 */ + +/******************* Bit definition for AES_KEYR4 register ******************/ +#define AES_KEYR4_Pos (0U) +#define AES_KEYR4_Msk (0xFFFFFFFFUL << AES_KEYR4_Pos) /*!< 0xFFFFFFFF */ +#define AES_KEYR4 AES_KEYR4_Msk /*!< AES Key Register 4 */ + +/******************* Bit definition for AES_KEYR5 register ******************/ +#define AES_KEYR5_Pos (0U) +#define AES_KEYR5_Msk (0xFFFFFFFFUL << AES_KEYR5_Pos) /*!< 0xFFFFFFFF */ +#define AES_KEYR5 AES_KEYR5_Msk /*!< AES Key Register 5 */ + +/******************* Bit definition for AES_KEYR6 register ******************/ +#define AES_KEYR6_Pos (0U) +#define AES_KEYR6_Msk (0xFFFFFFFFUL << AES_KEYR6_Pos) /*!< 0xFFFFFFFF */ +#define AES_KEYR6 AES_KEYR6_Msk /*!< AES Key Register 6 */ + +/******************* Bit definition for AES_KEYR7 register ******************/ +#define AES_KEYR7_Pos (0U) +#define AES_KEYR7_Msk (0xFFFFFFFFUL << AES_KEYR7_Pos) /*!< 0xFFFFFFFF */ +#define AES_KEYR7 AES_KEYR7_Msk /*!< AES Key Register 7 */ + +/******************* Bit definition for AES_IVR0 register ******************/ +#define AES_IVR0_Pos (0U) +#define AES_IVR0_Msk (0xFFFFFFFFUL << AES_IVR0_Pos) /*!< 0xFFFFFFFF */ +#define AES_IVR0 AES_IVR0_Msk /*!< AES Initialization Vector Register 0 */ + +/******************* Bit definition for AES_IVR1 register ******************/ +#define AES_IVR1_Pos (0U) +#define AES_IVR1_Msk (0xFFFFFFFFUL << AES_IVR1_Pos) /*!< 0xFFFFFFFF */ +#define AES_IVR1 AES_IVR1_Msk /*!< AES Initialization Vector Register 1 */ + +/******************* Bit definition for AES_IVR2 register ******************/ +#define AES_IVR2_Pos (0U) +#define AES_IVR2_Msk (0xFFFFFFFFUL << AES_IVR2_Pos) /*!< 0xFFFFFFFF */ +#define AES_IVR2 AES_IVR2_Msk /*!< AES Initialization Vector Register 2 */ + +/******************* Bit definition for AES_IVR3 register ******************/ +#define AES_IVR3_Pos (0U) +#define AES_IVR3_Msk (0xFFFFFFFFUL << AES_IVR3_Pos) /*!< 0xFFFFFFFF */ +#define AES_IVR3 AES_IVR3_Msk /*!< AES Initialization Vector Register 3 */ + +/******************* Bit definition for AES_SUSP0R register ******************/ +#define AES_SUSP0R_Pos (0U) +#define AES_SUSP0R_Msk (0xFFFFFFFFUL << AES_SUSP0R_Pos) /*!< 0xFFFFFFFF */ +#define AES_SUSP0R AES_SUSP0R_Msk /*!< AES Suspend registers 0 */ + +/******************* Bit definition for AES_SUSP1R register ******************/ +#define AES_SUSP1R_Pos (0U) +#define AES_SUSP1R_Msk (0xFFFFFFFFUL << AES_SUSP1R_Pos) /*!< 0xFFFFFFFF */ +#define AES_SUSP1R AES_SUSP1R_Msk /*!< AES Suspend registers 1 */ + +/******************* Bit definition for AES_SUSP2R register ******************/ +#define AES_SUSP2R_Pos (0U) +#define AES_SUSP2R_Msk (0xFFFFFFFFUL << AES_SUSP2R_Pos) /*!< 0xFFFFFFFF */ +#define AES_SUSP2R AES_SUSP2R_Msk /*!< AES Suspend registers 2 */ + +/******************* Bit definition for AES_SUSP3R register ******************/ +#define AES_SUSP3R_Pos (0U) +#define AES_SUSP3R_Msk (0xFFFFFFFFUL << AES_SUSP3R_Pos) /*!< 0xFFFFFFFF */ +#define AES_SUSP3R AES_SUSP3R_Msk /*!< AES Suspend registers 3 */ + +/******************* Bit definition for AES_SUSP4R register ******************/ +#define AES_SUSP4R_Pos (0U) +#define AES_SUSP4R_Msk (0xFFFFFFFFUL << AES_SUSP4R_Pos) /*!< 0xFFFFFFFF */ +#define AES_SUSP4R AES_SUSP4R_Msk /*!< AES Suspend registers 4 */ + +/******************* Bit definition for AES_SUSP5R register ******************/ +#define AES_SUSP5R_Pos (0U) +#define AES_SUSP5R_Msk (0xFFFFFFFFUL << AES_SUSP5R_Pos) /*!< 0xFFFFFFFF */ +#define AES_SUSP5R AES_SUSP5R_Msk /*!< AES Suspend registers 5 */ + +/******************* Bit definition for AES_SUSP6R register ******************/ +#define AES_SUSP6R_Pos (0U) +#define AES_SUSP6R_Msk (0xFFFFFFFFUL << AES_SUSP6R_Pos) /*!< 0xFFFFFFFF */ +#define AES_SUSP6R AES_SUSP6R_Msk /*!< AES Suspend registers 6 */ + +/******************* Bit definition for AES_SUSP7R register ******************/ +#define AES_SUSP7R_Pos (0U) +#define AES_SUSP7R_Msk (0xFFFFFFFFUL << AES_SUSP7R_Pos) /*!< 0xFFFFFFFF */ +#define AES_SUSP7R AES_SUSP7R_Msk /*!< AES Suspend registers 7 */ + +/******************************************************************************/ +/* */ +/* DMA Controller (DMA) */ +/* */ +/******************************************************************************/ + +/******************* Bit definition for DMA_ISR register ********************/ +#define DMA_ISR_GIF1_Pos (0U) +#define DMA_ISR_GIF1_Msk (0x1UL << DMA_ISR_GIF1_Pos) /*!< 0x00000001 */ +#define DMA_ISR_GIF1 DMA_ISR_GIF1_Msk /*!< Channel 1 Global interrupt flag */ +#define DMA_ISR_TCIF1_Pos (1U) +#define DMA_ISR_TCIF1_Msk (0x1UL << DMA_ISR_TCIF1_Pos) /*!< 0x00000002 */ +#define DMA_ISR_TCIF1 DMA_ISR_TCIF1_Msk /*!< Channel 1 Transfer Complete flag */ +#define DMA_ISR_HTIF1_Pos (2U) +#define DMA_ISR_HTIF1_Msk (0x1UL << DMA_ISR_HTIF1_Pos) /*!< 0x00000004 */ +#define DMA_ISR_HTIF1 DMA_ISR_HTIF1_Msk /*!< Channel 1 Half Transfer flag */ +#define DMA_ISR_TEIF1_Pos (3U) +#define DMA_ISR_TEIF1_Msk (0x1UL << DMA_ISR_TEIF1_Pos) /*!< 0x00000008 */ +#define DMA_ISR_TEIF1 DMA_ISR_TEIF1_Msk /*!< Channel 1 Transfer Error flag */ +#define DMA_ISR_GIF2_Pos (4U) +#define DMA_ISR_GIF2_Msk (0x1UL << DMA_ISR_GIF2_Pos) /*!< 0x00000010 */ +#define DMA_ISR_GIF2 DMA_ISR_GIF2_Msk /*!< Channel 2 Global interrupt flag */ +#define DMA_ISR_TCIF2_Pos (5U) +#define DMA_ISR_TCIF2_Msk (0x1UL << DMA_ISR_TCIF2_Pos) /*!< 0x00000020 */ +#define DMA_ISR_TCIF2 DMA_ISR_TCIF2_Msk /*!< Channel 2 Transfer Complete flag */ +#define DMA_ISR_HTIF2_Pos (6U) +#define DMA_ISR_HTIF2_Msk (0x1UL << DMA_ISR_HTIF2_Pos) /*!< 0x00000040 */ +#define DMA_ISR_HTIF2 DMA_ISR_HTIF2_Msk /*!< Channel 2 Half Transfer flag */ +#define DMA_ISR_TEIF2_Pos (7U) +#define DMA_ISR_TEIF2_Msk (0x1UL << DMA_ISR_TEIF2_Pos) /*!< 0x00000080 */ +#define DMA_ISR_TEIF2 DMA_ISR_TEIF2_Msk /*!< Channel 2 Transfer Error flag */ +#define DMA_ISR_GIF3_Pos (8U) +#define DMA_ISR_GIF3_Msk (0x1UL << DMA_ISR_GIF3_Pos) /*!< 0x00000100 */ +#define DMA_ISR_GIF3 DMA_ISR_GIF3_Msk /*!< Channel 3 Global interrupt flag */ +#define DMA_ISR_TCIF3_Pos (9U) +#define DMA_ISR_TCIF3_Msk (0x1UL << DMA_ISR_TCIF3_Pos) /*!< 0x00000200 */ +#define DMA_ISR_TCIF3 DMA_ISR_TCIF3_Msk /*!< Channel 3 Transfer Complete flag */ +#define DMA_ISR_HTIF3_Pos (10U) +#define DMA_ISR_HTIF3_Msk (0x1UL << DMA_ISR_HTIF3_Pos) /*!< 0x00000400 */ +#define DMA_ISR_HTIF3 DMA_ISR_HTIF3_Msk /*!< Channel 3 Half Transfer flag */ +#define DMA_ISR_TEIF3_Pos (11U) +#define DMA_ISR_TEIF3_Msk (0x1UL << DMA_ISR_TEIF3_Pos) /*!< 0x00000800 */ +#define DMA_ISR_TEIF3 DMA_ISR_TEIF3_Msk /*!< Channel 3 Transfer Error flag */ +#define DMA_ISR_GIF4_Pos (12U) +#define DMA_ISR_GIF4_Msk (0x1UL << DMA_ISR_GIF4_Pos) /*!< 0x00001000 */ +#define DMA_ISR_GIF4 DMA_ISR_GIF4_Msk /*!< Channel 4 Global interrupt flag */ +#define DMA_ISR_TCIF4_Pos (13U) +#define DMA_ISR_TCIF4_Msk (0x1UL << DMA_ISR_TCIF4_Pos) /*!< 0x00002000 */ +#define DMA_ISR_TCIF4 DMA_ISR_TCIF4_Msk /*!< Channel 4 Transfer Complete flag */ +#define DMA_ISR_HTIF4_Pos (14U) +#define DMA_ISR_HTIF4_Msk (0x1UL << DMA_ISR_HTIF4_Pos) /*!< 0x00004000 */ +#define DMA_ISR_HTIF4 DMA_ISR_HTIF4_Msk /*!< Channel 4 Half Transfer flag */ +#define DMA_ISR_TEIF4_Pos (15U) +#define DMA_ISR_TEIF4_Msk (0x1UL << DMA_ISR_TEIF4_Pos) /*!< 0x00008000 */ +#define DMA_ISR_TEIF4 DMA_ISR_TEIF4_Msk /*!< Channel 4 Transfer Error flag */ +#define DMA_ISR_GIF5_Pos (16U) +#define DMA_ISR_GIF5_Msk (0x1UL << DMA_ISR_GIF5_Pos) /*!< 0x00010000 */ +#define DMA_ISR_GIF5 DMA_ISR_GIF5_Msk /*!< Channel 5 Global interrupt flag */ +#define DMA_ISR_TCIF5_Pos (17U) +#define DMA_ISR_TCIF5_Msk (0x1UL << DMA_ISR_TCIF5_Pos) /*!< 0x00020000 */ +#define DMA_ISR_TCIF5 DMA_ISR_TCIF5_Msk /*!< Channel 5 Transfer Complete flag */ +#define DMA_ISR_HTIF5_Pos (18U) +#define DMA_ISR_HTIF5_Msk (0x1UL << DMA_ISR_HTIF5_Pos) /*!< 0x00040000 */ +#define DMA_ISR_HTIF5 DMA_ISR_HTIF5_Msk /*!< Channel 5 Half Transfer flag */ +#define DMA_ISR_TEIF5_Pos (19U) +#define DMA_ISR_TEIF5_Msk (0x1UL << DMA_ISR_TEIF5_Pos) /*!< 0x00080000 */ +#define DMA_ISR_TEIF5 DMA_ISR_TEIF5_Msk /*!< Channel 5 Transfer Error flag */ +#define DMA_ISR_GIF6_Pos (20U) +#define DMA_ISR_GIF6_Msk (0x1UL << DMA_ISR_GIF6_Pos) /*!< 0x00100000 */ +#define DMA_ISR_GIF6 DMA_ISR_GIF6_Msk /*!< Channel 6 Global interrupt flag */ +#define DMA_ISR_TCIF6_Pos (21U) +#define DMA_ISR_TCIF6_Msk (0x1UL << DMA_ISR_TCIF6_Pos) /*!< 0x00200000 */ +#define DMA_ISR_TCIF6 DMA_ISR_TCIF6_Msk /*!< Channel 6 Transfer Complete flag */ +#define DMA_ISR_HTIF6_Pos (22U) +#define DMA_ISR_HTIF6_Msk (0x1UL << DMA_ISR_HTIF6_Pos) /*!< 0x00400000 */ +#define DMA_ISR_HTIF6 DMA_ISR_HTIF6_Msk /*!< Channel 6 Half Transfer flag */ +#define DMA_ISR_TEIF6_Pos (23U) +#define DMA_ISR_TEIF6_Msk (0x1UL << DMA_ISR_TEIF6_Pos) /*!< 0x00800000 */ +#define DMA_ISR_TEIF6 DMA_ISR_TEIF6_Msk /*!< Channel 6 Transfer Error flag */ +#define DMA_ISR_GIF7_Pos (24U) +#define DMA_ISR_GIF7_Msk (0x1UL << DMA_ISR_GIF7_Pos) /*!< 0x01000000 */ +#define DMA_ISR_GIF7 DMA_ISR_GIF7_Msk /*!< Channel 7 Global interrupt flag */ +#define DMA_ISR_TCIF7_Pos (25U) +#define DMA_ISR_TCIF7_Msk (0x1UL << DMA_ISR_TCIF7_Pos) /*!< 0x02000000 */ +#define DMA_ISR_TCIF7 DMA_ISR_TCIF7_Msk /*!< Channel 7 Transfer Complete flag */ +#define DMA_ISR_HTIF7_Pos (26U) +#define DMA_ISR_HTIF7_Msk (0x1UL << DMA_ISR_HTIF7_Pos) /*!< 0x04000000 */ +#define DMA_ISR_HTIF7 DMA_ISR_HTIF7_Msk /*!< Channel 7 Half Transfer flag */ +#define DMA_ISR_TEIF7_Pos (27U) +#define DMA_ISR_TEIF7_Msk (0x1UL << DMA_ISR_TEIF7_Pos) /*!< 0x08000000 */ +#define DMA_ISR_TEIF7 DMA_ISR_TEIF7_Msk /*!< Channel 7 Transfer Error flag */ + +/******************* Bit definition for DMA_IFCR register *******************/ +#define DMA_IFCR_CGIF1_Pos (0U) +#define DMA_IFCR_CGIF1_Msk (0x1UL << DMA_IFCR_CGIF1_Pos) /*!< 0x00000001 */ +#define DMA_IFCR_CGIF1 DMA_IFCR_CGIF1_Msk /*!< Channel 1 Global interrupt clear */ +#define DMA_IFCR_CTCIF1_Pos (1U) +#define DMA_IFCR_CTCIF1_Msk (0x1UL << DMA_IFCR_CTCIF1_Pos) /*!< 0x00000002 */ +#define DMA_IFCR_CTCIF1 DMA_IFCR_CTCIF1_Msk /*!< Channel 1 Transfer Complete clear */ +#define DMA_IFCR_CHTIF1_Pos (2U) +#define DMA_IFCR_CHTIF1_Msk (0x1UL << DMA_IFCR_CHTIF1_Pos) /*!< 0x00000004 */ +#define DMA_IFCR_CHTIF1 DMA_IFCR_CHTIF1_Msk /*!< Channel 1 Half Transfer clear */ +#define DMA_IFCR_CTEIF1_Pos (3U) +#define DMA_IFCR_CTEIF1_Msk (0x1UL << DMA_IFCR_CTEIF1_Pos) /*!< 0x00000008 */ +#define DMA_IFCR_CTEIF1 DMA_IFCR_CTEIF1_Msk /*!< Channel 1 Transfer Error clear */ +#define DMA_IFCR_CGIF2_Pos (4U) +#define DMA_IFCR_CGIF2_Msk (0x1UL << DMA_IFCR_CGIF2_Pos) /*!< 0x00000010 */ +#define DMA_IFCR_CGIF2 DMA_IFCR_CGIF2_Msk /*!< Channel 2 Global interrupt clear */ +#define DMA_IFCR_CTCIF2_Pos (5U) +#define DMA_IFCR_CTCIF2_Msk (0x1UL << DMA_IFCR_CTCIF2_Pos) /*!< 0x00000020 */ +#define DMA_IFCR_CTCIF2 DMA_IFCR_CTCIF2_Msk /*!< Channel 2 Transfer Complete clear */ +#define DMA_IFCR_CHTIF2_Pos (6U) +#define DMA_IFCR_CHTIF2_Msk (0x1UL << DMA_IFCR_CHTIF2_Pos) /*!< 0x00000040 */ +#define DMA_IFCR_CHTIF2 DMA_IFCR_CHTIF2_Msk /*!< Channel 2 Half Transfer clear */ +#define DMA_IFCR_CTEIF2_Pos (7U) +#define DMA_IFCR_CTEIF2_Msk (0x1UL << DMA_IFCR_CTEIF2_Pos) /*!< 0x00000080 */ +#define DMA_IFCR_CTEIF2 DMA_IFCR_CTEIF2_Msk /*!< Channel 2 Transfer Error clear */ +#define DMA_IFCR_CGIF3_Pos (8U) +#define DMA_IFCR_CGIF3_Msk (0x1UL << DMA_IFCR_CGIF3_Pos) /*!< 0x00000100 */ +#define DMA_IFCR_CGIF3 DMA_IFCR_CGIF3_Msk /*!< Channel 3 Global interrupt clear */ +#define DMA_IFCR_CTCIF3_Pos (9U) +#define DMA_IFCR_CTCIF3_Msk (0x1UL << DMA_IFCR_CTCIF3_Pos) /*!< 0x00000200 */ +#define DMA_IFCR_CTCIF3 DMA_IFCR_CTCIF3_Msk /*!< Channel 3 Transfer Complete clear */ +#define DMA_IFCR_CHTIF3_Pos (10U) +#define DMA_IFCR_CHTIF3_Msk (0x1UL << DMA_IFCR_CHTIF3_Pos) /*!< 0x00000400 */ +#define DMA_IFCR_CHTIF3 DMA_IFCR_CHTIF3_Msk /*!< Channel 3 Half Transfer clear */ +#define DMA_IFCR_CTEIF3_Pos (11U) +#define DMA_IFCR_CTEIF3_Msk (0x1UL << DMA_IFCR_CTEIF3_Pos) /*!< 0x00000800 */ +#define DMA_IFCR_CTEIF3 DMA_IFCR_CTEIF3_Msk /*!< Channel 3 Transfer Error clear */ +#define DMA_IFCR_CGIF4_Pos (12U) +#define DMA_IFCR_CGIF4_Msk (0x1UL << DMA_IFCR_CGIF4_Pos) /*!< 0x00001000 */ +#define DMA_IFCR_CGIF4 DMA_IFCR_CGIF4_Msk /*!< Channel 4 Global interrupt clear */ +#define DMA_IFCR_CTCIF4_Pos (13U) +#define DMA_IFCR_CTCIF4_Msk (0x1UL << DMA_IFCR_CTCIF4_Pos) /*!< 0x00002000 */ +#define DMA_IFCR_CTCIF4 DMA_IFCR_CTCIF4_Msk /*!< Channel 4 Transfer Complete clear */ +#define DMA_IFCR_CHTIF4_Pos (14U) +#define DMA_IFCR_CHTIF4_Msk (0x1UL << DMA_IFCR_CHTIF4_Pos) /*!< 0x00004000 */ +#define DMA_IFCR_CHTIF4 DMA_IFCR_CHTIF4_Msk /*!< Channel 4 Half Transfer clear */ +#define DMA_IFCR_CTEIF4_Pos (15U) +#define DMA_IFCR_CTEIF4_Msk (0x1UL << DMA_IFCR_CTEIF4_Pos) /*!< 0x00008000 */ +#define DMA_IFCR_CTEIF4 DMA_IFCR_CTEIF4_Msk /*!< Channel 4 Transfer Error clear */ +#define DMA_IFCR_CGIF5_Pos (16U) +#define DMA_IFCR_CGIF5_Msk (0x1UL << DMA_IFCR_CGIF5_Pos) /*!< 0x00010000 */ +#define DMA_IFCR_CGIF5 DMA_IFCR_CGIF5_Msk /*!< Channel 5 Global interrupt clear */ +#define DMA_IFCR_CTCIF5_Pos (17U) +#define DMA_IFCR_CTCIF5_Msk (0x1UL << DMA_IFCR_CTCIF5_Pos) /*!< 0x00020000 */ +#define DMA_IFCR_CTCIF5 DMA_IFCR_CTCIF5_Msk /*!< Channel 5 Transfer Complete clear */ +#define DMA_IFCR_CHTIF5_Pos (18U) +#define DMA_IFCR_CHTIF5_Msk (0x1UL << DMA_IFCR_CHTIF5_Pos) /*!< 0x00040000 */ +#define DMA_IFCR_CHTIF5 DMA_IFCR_CHTIF5_Msk /*!< Channel 5 Half Transfer clear */ +#define DMA_IFCR_CTEIF5_Pos (19U) +#define DMA_IFCR_CTEIF5_Msk (0x1UL << DMA_IFCR_CTEIF5_Pos) /*!< 0x00080000 */ +#define DMA_IFCR_CTEIF5 DMA_IFCR_CTEIF5_Msk /*!< Channel 5 Transfer Error clear */ +#define DMA_IFCR_CGIF6_Pos (20U) +#define DMA_IFCR_CGIF6_Msk (0x1UL << DMA_IFCR_CGIF6_Pos) /*!< 0x00100000 */ +#define DMA_IFCR_CGIF6 DMA_IFCR_CGIF6_Msk /*!< Channel 6 Global interrupt clear */ +#define DMA_IFCR_CTCIF6_Pos (21U) +#define DMA_IFCR_CTCIF6_Msk (0x1UL << DMA_IFCR_CTCIF6_Pos) /*!< 0x00200000 */ +#define DMA_IFCR_CTCIF6 DMA_IFCR_CTCIF6_Msk /*!< Channel 6 Transfer Complete clear */ +#define DMA_IFCR_CHTIF6_Pos (22U) +#define DMA_IFCR_CHTIF6_Msk (0x1UL << DMA_IFCR_CHTIF6_Pos) /*!< 0x00400000 */ +#define DMA_IFCR_CHTIF6 DMA_IFCR_CHTIF6_Msk /*!< Channel 6 Half Transfer clear */ +#define DMA_IFCR_CTEIF6_Pos (23U) +#define DMA_IFCR_CTEIF6_Msk (0x1UL << DMA_IFCR_CTEIF6_Pos) /*!< 0x00800000 */ +#define DMA_IFCR_CTEIF6 DMA_IFCR_CTEIF6_Msk /*!< Channel 6 Transfer Error clear */ +#define DMA_IFCR_CGIF7_Pos (24U) +#define DMA_IFCR_CGIF7_Msk (0x1UL << DMA_IFCR_CGIF7_Pos) /*!< 0x01000000 */ +#define DMA_IFCR_CGIF7 DMA_IFCR_CGIF7_Msk /*!< Channel 7 Global interrupt clear */ +#define DMA_IFCR_CTCIF7_Pos (25U) +#define DMA_IFCR_CTCIF7_Msk (0x1UL << DMA_IFCR_CTCIF7_Pos) /*!< 0x02000000 */ +#define DMA_IFCR_CTCIF7 DMA_IFCR_CTCIF7_Msk /*!< Channel 7 Transfer Complete clear */ +#define DMA_IFCR_CHTIF7_Pos (26U) +#define DMA_IFCR_CHTIF7_Msk (0x1UL << DMA_IFCR_CHTIF7_Pos) /*!< 0x04000000 */ +#define DMA_IFCR_CHTIF7 DMA_IFCR_CHTIF7_Msk /*!< Channel 7 Half Transfer clear */ +#define DMA_IFCR_CTEIF7_Pos (27U) +#define DMA_IFCR_CTEIF7_Msk (0x1UL << DMA_IFCR_CTEIF7_Pos) /*!< 0x08000000 */ +#define DMA_IFCR_CTEIF7 DMA_IFCR_CTEIF7_Msk /*!< Channel 7 Transfer Error clear */ + +/******************* Bit definition for DMA_CCR register ********************/ +#define DMA_CCR_EN_Pos (0U) +#define DMA_CCR_EN_Msk (0x1UL << DMA_CCR_EN_Pos) /*!< 0x00000001 */ +#define DMA_CCR_EN DMA_CCR_EN_Msk /*!< Channel enable */ +#define DMA_CCR_TCIE_Pos (1U) +#define DMA_CCR_TCIE_Msk (0x1UL << DMA_CCR_TCIE_Pos) /*!< 0x00000002 */ +#define DMA_CCR_TCIE DMA_CCR_TCIE_Msk /*!< Transfer complete interrupt enable */ +#define DMA_CCR_HTIE_Pos (2U) +#define DMA_CCR_HTIE_Msk (0x1UL << DMA_CCR_HTIE_Pos) /*!< 0x00000004 */ +#define DMA_CCR_HTIE DMA_CCR_HTIE_Msk /*!< Half Transfer interrupt enable */ +#define DMA_CCR_TEIE_Pos (3U) +#define DMA_CCR_TEIE_Msk (0x1UL << DMA_CCR_TEIE_Pos) /*!< 0x00000008 */ +#define DMA_CCR_TEIE DMA_CCR_TEIE_Msk /*!< Transfer error interrupt enable */ +#define DMA_CCR_DIR_Pos (4U) +#define DMA_CCR_DIR_Msk (0x1UL << DMA_CCR_DIR_Pos) /*!< 0x00000010 */ +#define DMA_CCR_DIR DMA_CCR_DIR_Msk /*!< Data transfer direction */ +#define DMA_CCR_CIRC_Pos (5U) +#define DMA_CCR_CIRC_Msk (0x1UL << DMA_CCR_CIRC_Pos) /*!< 0x00000020 */ +#define DMA_CCR_CIRC DMA_CCR_CIRC_Msk /*!< Circular mode */ +#define DMA_CCR_PINC_Pos (6U) +#define DMA_CCR_PINC_Msk (0x1UL << DMA_CCR_PINC_Pos) /*!< 0x00000040 */ +#define DMA_CCR_PINC DMA_CCR_PINC_Msk /*!< Peripheral increment mode */ +#define DMA_CCR_MINC_Pos (7U) +#define DMA_CCR_MINC_Msk (0x1UL << DMA_CCR_MINC_Pos) /*!< 0x00000080 */ +#define DMA_CCR_MINC DMA_CCR_MINC_Msk /*!< Memory increment mode */ + +#define DMA_CCR_PSIZE_Pos (8U) +#define DMA_CCR_PSIZE_Msk (0x3UL << DMA_CCR_PSIZE_Pos) /*!< 0x00000300 */ +#define DMA_CCR_PSIZE DMA_CCR_PSIZE_Msk /*!< PSIZE[1:0] bits (Peripheral size) */ +#define DMA_CCR_PSIZE_0 (0x1U << DMA_CCR_PSIZE_Pos) /*!< 0x00000100 */ +#define DMA_CCR_PSIZE_1 (0x2U << DMA_CCR_PSIZE_Pos) /*!< 0x00000200 */ + +#define DMA_CCR_MSIZE_Pos (10U) +#define DMA_CCR_MSIZE_Msk (0x3UL << DMA_CCR_MSIZE_Pos) /*!< 0x00000C00 */ +#define DMA_CCR_MSIZE DMA_CCR_MSIZE_Msk /*!< MSIZE[1:0] bits (Memory size) */ +#define DMA_CCR_MSIZE_0 (0x1U << DMA_CCR_MSIZE_Pos) /*!< 0x00000400 */ +#define DMA_CCR_MSIZE_1 (0x2U << DMA_CCR_MSIZE_Pos) /*!< 0x00000800 */ + +#define DMA_CCR_PL_Pos (12U) +#define DMA_CCR_PL_Msk (0x3UL << DMA_CCR_PL_Pos) /*!< 0x00003000 */ +#define DMA_CCR_PL DMA_CCR_PL_Msk /*!< PL[1:0] bits(Channel Priority level)*/ +#define DMA_CCR_PL_0 (0x1U << DMA_CCR_PL_Pos) /*!< 0x00001000 */ +#define DMA_CCR_PL_1 (0x2U << DMA_CCR_PL_Pos) /*!< 0x00002000 */ + +#define DMA_CCR_MEM2MEM_Pos (14U) +#define DMA_CCR_MEM2MEM_Msk (0x1UL << DMA_CCR_MEM2MEM_Pos) /*!< 0x00004000 */ +#define DMA_CCR_MEM2MEM DMA_CCR_MEM2MEM_Msk /*!< Memory to memory mode */ + +/****************** Bit definition for DMA_CNDTR register *******************/ +#define DMA_CNDTR_NDT_Pos (0U) +#define DMA_CNDTR_NDT_Msk (0xFFFFUL << DMA_CNDTR_NDT_Pos) /*!< 0x0000FFFF */ +#define DMA_CNDTR_NDT DMA_CNDTR_NDT_Msk /*!< Number of data to Transfer */ + +/****************** Bit definition for DMA_CPAR register ********************/ +#define DMA_CPAR_PA_Pos (0U) +#define DMA_CPAR_PA_Msk (0xFFFFFFFFUL << DMA_CPAR_PA_Pos) /*!< 0xFFFFFFFF */ +#define DMA_CPAR_PA DMA_CPAR_PA_Msk /*!< Peripheral Address */ + +/****************** Bit definition for DMA_CMAR register ********************/ +#define DMA_CMAR_MA_Pos (0U) +#define DMA_CMAR_MA_Msk (0xFFFFFFFFUL << DMA_CMAR_MA_Pos) /*!< 0xFFFFFFFF */ +#define DMA_CMAR_MA DMA_CMAR_MA_Msk /*!< Memory Address */ + +/******************************************************************************/ +/* */ +/* DMAMUX Controller */ +/* */ +/******************************************************************************/ +/******************** Bits definition for DMAMUX_CxCR register **************/ +#define DMAMUX_CxCR_DMAREQ_ID_Pos (0U) +#define DMAMUX_CxCR_DMAREQ_ID_Msk (0x3FUL << DMAMUX_CxCR_DMAREQ_ID_Pos) /*!< 0x0000003F */ +#define DMAMUX_CxCR_DMAREQ_ID DMAMUX_CxCR_DMAREQ_ID_Msk /*!< DMA Request ID */ +#define DMAMUX_CxCR_DMAREQ_ID_0 (0x01U << DMAMUX_CxCR_DMAREQ_ID_Pos) /*!< 0x00000001 */ +#define DMAMUX_CxCR_DMAREQ_ID_1 (0x02U << DMAMUX_CxCR_DMAREQ_ID_Pos) /*!< 0x00000002 */ +#define DMAMUX_CxCR_DMAREQ_ID_2 (0x04U << DMAMUX_CxCR_DMAREQ_ID_Pos) /*!< 0x00000004 */ +#define DMAMUX_CxCR_DMAREQ_ID_3 (0x08U << DMAMUX_CxCR_DMAREQ_ID_Pos) /*!< 0x00000008 */ +#define DMAMUX_CxCR_DMAREQ_ID_4 (0x10U << DMAMUX_CxCR_DMAREQ_ID_Pos) /*!< 0x00000010 */ +#define DMAMUX_CxCR_DMAREQ_ID_5 (0x20U << DMAMUX_CxCR_DMAREQ_ID_Pos) /*!< 0x00000020 */ +#define DMAMUX_CxCR_SOIE_Pos (8U) +#define DMAMUX_CxCR_SOIE_Msk (0x1UL << DMAMUX_CxCR_SOIE_Pos) /*!< 0x00000100 */ +#define DMAMUX_CxCR_SOIE DMAMUX_CxCR_SOIE_Msk /*!< Synchro overrun interrupt enable */ +#define DMAMUX_CxCR_EGE_Pos (9U) +#define DMAMUX_CxCR_EGE_Msk (0x1UL << DMAMUX_CxCR_EGE_Pos) /*!< 0x00000200 */ +#define DMAMUX_CxCR_EGE DMAMUX_CxCR_EGE_Msk /*!< Event generation interrupt enable */ +#define DMAMUX_CxCR_SE_Pos (16U) +#define DMAMUX_CxCR_SE_Msk (0x1UL << DMAMUX_CxCR_SE_Pos) /*!< 0x00010000 */ +#define DMAMUX_CxCR_SE DMAMUX_CxCR_SE_Msk /*!< Synchronization enable */ +#define DMAMUX_CxCR_SPOL_Pos (17U) +#define DMAMUX_CxCR_SPOL_Msk (0x3UL << DMAMUX_CxCR_SPOL_Pos) /*!< 0x00060000 */ +#define DMAMUX_CxCR_SPOL DMAMUX_CxCR_SPOL_Msk /*!< Synchronization polarity */ +#define DMAMUX_CxCR_SPOL_0 (0x1U << DMAMUX_CxCR_SPOL_Pos) /*!< 0x00020000 */ +#define DMAMUX_CxCR_SPOL_1 (0x2U << DMAMUX_CxCR_SPOL_Pos) /*!< 0x00040000 */ +#define DMAMUX_CxCR_NBREQ_Pos (19U) +#define DMAMUX_CxCR_NBREQ_Msk (0x1FUL << DMAMUX_CxCR_NBREQ_Pos) /*!< 0x00F80000 */ +#define DMAMUX_CxCR_NBREQ DMAMUX_CxCR_NBREQ_Msk /*!< Number of request */ +#define DMAMUX_CxCR_NBREQ_0 (0x01U << DMAMUX_CxCR_NBREQ_Pos) /*!< 0x00080000 */ +#define DMAMUX_CxCR_NBREQ_1 (0x02U << DMAMUX_CxCR_NBREQ_Pos) /*!< 0x00100000 */ +#define DMAMUX_CxCR_NBREQ_2 (0x04U << DMAMUX_CxCR_NBREQ_Pos) /*!< 0x00200000 */ +#define DMAMUX_CxCR_NBREQ_3 (0x08U << DMAMUX_CxCR_NBREQ_Pos) /*!< 0x00400000 */ +#define DMAMUX_CxCR_NBREQ_4 (0x10U << DMAMUX_CxCR_NBREQ_Pos) /*!< 0x00800000 */ +#define DMAMUX_CxCR_SYNC_ID_Pos (24U) +#define DMAMUX_CxCR_SYNC_ID_Msk (0x1FUL << DMAMUX_CxCR_SYNC_ID_Pos) /*!< 0x1F000000 */ +#define DMAMUX_CxCR_SYNC_ID DMAMUX_CxCR_SYNC_ID_Msk /*!< Synchronization ID */ +#define DMAMUX_CxCR_SYNC_ID_0 (0x01U << DMAMUX_CxCR_SYNC_ID_Pos) /*!< 0x01000000 */ +#define DMAMUX_CxCR_SYNC_ID_1 (0x02U << DMAMUX_CxCR_SYNC_ID_Pos) /*!< 0x02000000 */ +#define DMAMUX_CxCR_SYNC_ID_2 (0x04U << DMAMUX_CxCR_SYNC_ID_Pos) /*!< 0x04000000 */ +#define DMAMUX_CxCR_SYNC_ID_3 (0x08U << DMAMUX_CxCR_SYNC_ID_Pos) /*!< 0x08000000 */ +#define DMAMUX_CxCR_SYNC_ID_4 (0x10U << DMAMUX_CxCR_SYNC_ID_Pos) /*!< 0x10000000 */ + +/******************* Bits definition for DMAMUX_CSR register **************/ +#define DMAMUX_CSR_SOF0_Pos (0U) +#define DMAMUX_CSR_SOF0_Msk (0x1UL << DMAMUX_CSR_SOF0_Pos) /*!< 0x00000001 */ +#define DMAMUX_CSR_SOF0 DMAMUX_CSR_SOF0_Msk /*!< Synchronization Overrun Flag 0 */ +#define DMAMUX_CSR_SOF1_Pos (1U) +#define DMAMUX_CSR_SOF1_Msk (0x1UL << DMAMUX_CSR_SOF1_Pos) /*!< 0x00000002 */ +#define DMAMUX_CSR_SOF1 DMAMUX_CSR_SOF1_Msk /*!< Synchronization Overrun Flag 1 */ +#define DMAMUX_CSR_SOF2_Pos (2U) +#define DMAMUX_CSR_SOF2_Msk (0x1UL << DMAMUX_CSR_SOF2_Pos) /*!< 0x00000004 */ +#define DMAMUX_CSR_SOF2 DMAMUX_CSR_SOF2_Msk /*!< Synchronization Overrun Flag 2 */ +#define DMAMUX_CSR_SOF3_Pos (3U) +#define DMAMUX_CSR_SOF3_Msk (0x1UL << DMAMUX_CSR_SOF3_Pos) /*!< 0x00000008 */ +#define DMAMUX_CSR_SOF3 DMAMUX_CSR_SOF3_Msk /*!< Synchronization Overrun Flag 3 */ +#define DMAMUX_CSR_SOF4_Pos (4U) +#define DMAMUX_CSR_SOF4_Msk (0x1UL << DMAMUX_CSR_SOF4_Pos) /*!< 0x00000010 */ +#define DMAMUX_CSR_SOF4 DMAMUX_CSR_SOF4_Msk /*!< Synchronization Overrun Flag 4 */ +#define DMAMUX_CSR_SOF5_Pos (5U) +#define DMAMUX_CSR_SOF5_Msk (0x1UL << DMAMUX_CSR_SOF5_Pos) /*!< 0x00000020 */ +#define DMAMUX_CSR_SOF5 DMAMUX_CSR_SOF5_Msk /*!< Synchronization Overrun Flag 5 */ +#define DMAMUX_CSR_SOF6_Pos (6U) +#define DMAMUX_CSR_SOF6_Msk (0x1UL << DMAMUX_CSR_SOF6_Pos) /*!< 0x00000040 */ +#define DMAMUX_CSR_SOF6 DMAMUX_CSR_SOF6_Msk /*!< Synchronization Overrun Flag 6 */ +#define DMAMUX_CSR_SOF7_Pos (7U) +#define DMAMUX_CSR_SOF7_Msk (0x1UL << DMAMUX_CSR_SOF7_Pos) /*!< 0x00000080 */ +#define DMAMUX_CSR_SOF7 DMAMUX_CSR_SOF7_Msk /*!< Synchronization Overrun Flag 7 */ +#define DMAMUX_CSR_SOF8_Pos (8U) +#define DMAMUX_CSR_SOF8_Msk (0x1UL << DMAMUX_CSR_SOF8_Pos) /*!< 0x00000100 */ +#define DMAMUX_CSR_SOF8 DMAMUX_CSR_SOF8_Msk /*!< Synchronization Overrun Flag 8 */ +#define DMAMUX_CSR_SOF9_Pos (9U) +#define DMAMUX_CSR_SOF9_Msk (0x1UL << DMAMUX_CSR_SOF9_Pos) /*!< 0x00000200 */ +#define DMAMUX_CSR_SOF9 DMAMUX_CSR_SOF9_Msk /*!< Synchronization Overrun Flag 9 */ +#define DMAMUX_CSR_SOF10_Pos (10U) +#define DMAMUX_CSR_SOF10_Msk (0x1UL << DMAMUX_CSR_SOF10_Pos) /*!< 0x00000400 */ +#define DMAMUX_CSR_SOF10 DMAMUX_CSR_SOF10_Msk /*!< Synchronization Overrun Flag 10 */ +#define DMAMUX_CSR_SOF11_Pos (11U) +#define DMAMUX_CSR_SOF11_Msk (0x1UL << DMAMUX_CSR_SOF11_Pos) /*!< 0x00000800 */ +#define DMAMUX_CSR_SOF11 DMAMUX_CSR_SOF11_Msk /*!< Synchronization Overrun Flag 11 */ +#define DMAMUX_CSR_SOF12_Pos (12U) +#define DMAMUX_CSR_SOF12_Msk (0x1UL << DMAMUX_CSR_SOF12_Pos) /*!< 0x00001000 */ +#define DMAMUX_CSR_SOF12 DMAMUX_CSR_SOF12_Msk /*!< Synchronization Overrun Flag 12 */ +#define DMAMUX_CSR_SOF13_Pos (13U) +#define DMAMUX_CSR_SOF13_Msk (0x1UL << DMAMUX_CSR_SOF13_Pos) /*!< 0x00002000 */ +#define DMAMUX_CSR_SOF13 DMAMUX_CSR_SOF13_Msk /*!< Synchronization Overrun Flag 13 */ + +/******************** Bits definition for DMAMUX_CFR register **************/ +#define DMAMUX_CFR_CSOF0_Pos (0U) +#define DMAMUX_CFR_CSOF0_Msk (0x1UL << DMAMUX_CFR_CSOF0_Pos) /*!< 0x00000001 */ +#define DMAMUX_CFR_CSOF0 DMAMUX_CFR_CSOF0_Msk /*!< Clear Overrun Flag 0 */ +#define DMAMUX_CFR_CSOF1_Pos (1U) +#define DMAMUX_CFR_CSOF1_Msk (0x1UL << DMAMUX_CFR_CSOF1_Pos) /*!< 0x00000002 */ +#define DMAMUX_CFR_CSOF1 DMAMUX_CFR_CSOF1_Msk /*!< Clear Overrun Flag 1 */ +#define DMAMUX_CFR_CSOF2_Pos (2U) +#define DMAMUX_CFR_CSOF2_Msk (0x1UL << DMAMUX_CFR_CSOF2_Pos) /*!< 0x00000004 */ +#define DMAMUX_CFR_CSOF2 DMAMUX_CFR_CSOF2_Msk /*!< Clear Overrun Flag 2 */ +#define DMAMUX_CFR_CSOF3_Pos (3U) +#define DMAMUX_CFR_CSOF3_Msk (0x1UL << DMAMUX_CFR_CSOF3_Pos) /*!< 0x00000008 */ +#define DMAMUX_CFR_CSOF3 DMAMUX_CFR_CSOF3_Msk /*!< Clear Overrun Flag 3 */ +#define DMAMUX_CFR_CSOF4_Pos (4U) +#define DMAMUX_CFR_CSOF4_Msk (0x1UL << DMAMUX_CFR_CSOF4_Pos) /*!< 0x00000010 */ +#define DMAMUX_CFR_CSOF4 DMAMUX_CFR_CSOF4_Msk /*!< Clear Overrun Flag 4 */ +#define DMAMUX_CFR_CSOF5_Pos (5U) +#define DMAMUX_CFR_CSOF5_Msk (0x1UL << DMAMUX_CFR_CSOF5_Pos) /*!< 0x00000020 */ +#define DMAMUX_CFR_CSOF5 DMAMUX_CFR_CSOF5_Msk /*!< Clear Overrun Flag 5 */ +#define DMAMUX_CFR_CSOF6_Pos (6U) +#define DMAMUX_CFR_CSOF6_Msk (0x1UL << DMAMUX_CFR_CSOF6_Pos) /*!< 0x00000040 */ +#define DMAMUX_CFR_CSOF6 DMAMUX_CFR_CSOF6_Msk /*!< Clear Overrun Flag 6 */ +#define DMAMUX_CFR_CSOF7_Pos (7U) +#define DMAMUX_CFR_CSOF7_Msk (0x1UL << DMAMUX_CFR_CSOF7_Pos) /*!< 0x00000080 */ +#define DMAMUX_CFR_CSOF7 DMAMUX_CFR_CSOF7_Msk /*!< Clear Overrun Flag 7 */ +#define DMAMUX_CFR_CSOF8_Pos (8U) +#define DMAMUX_CFR_CSOF8_Msk (0x1UL << DMAMUX_CFR_CSOF8_Pos) /*!< 0x00000100 */ +#define DMAMUX_CFR_CSOF8 DMAMUX_CFR_CSOF8_Msk /*!< Clear Overrun Flag 8 */ +#define DMAMUX_CFR_CSOF9_Pos (9U) +#define DMAMUX_CFR_CSOF9_Msk (0x1UL << DMAMUX_CFR_CSOF9_Pos) /*!< 0x00000200 */ +#define DMAMUX_CFR_CSOF9 DMAMUX_CFR_CSOF9_Msk /*!< Clear Overrun Flag 9 */ +#define DMAMUX_CFR_CSOF10_Pos (10U) +#define DMAMUX_CFR_CSOF10_Msk (0x1UL << DMAMUX_CFR_CSOF10_Pos) /*!< 0x00000400 */ +#define DMAMUX_CFR_CSOF10 DMAMUX_CFR_CSOF10_Msk /*!< Clear Overrun Flag 10 */ +#define DMAMUX_CFR_CSOF11_Pos (11U) +#define DMAMUX_CFR_CSOF11_Msk (0x1UL << DMAMUX_CFR_CSOF11_Pos) /*!< 0x00000800 */ +#define DMAMUX_CFR_CSOF11 DMAMUX_CFR_CSOF11_Msk /*!< Clear Overrun Flag 11 */ +#define DMAMUX_CFR_CSOF12_Pos (12U) +#define DMAMUX_CFR_CSOF12_Msk (0x1UL << DMAMUX_CFR_CSOF12_Pos) /*!< 0x00001000 */ +#define DMAMUX_CFR_CSOF12 DMAMUX_CFR_CSOF12_Msk /*!< Clear Overrun Flag 12 */ +#define DMAMUX_CFR_CSOF13_Pos (13U) +#define DMAMUX_CFR_CSOF13_Msk (0x1UL << DMAMUX_CFR_CSOF13_Pos) /*!< 0x00002000 */ +#define DMAMUX_CFR_CSOF13 DMAMUX_CFR_CSOF13_Msk /*!< Clear Overrun Flag 13 */ + +/******************** Bits definition for DMAMUX_RGxCR register ************/ +#define DMAMUX_RGxCR_SIG_ID_Pos (0U) +#define DMAMUX_RGxCR_SIG_ID_Msk (0x1FUL << DMAMUX_RGxCR_SIG_ID_Pos) /*!< 0x0000001F */ +#define DMAMUX_RGxCR_SIG_ID DMAMUX_RGxCR_SIG_ID_Msk /*!< Signal ID */ +#define DMAMUX_RGxCR_SIG_ID_0 (0x01U << DMAMUX_RGxCR_SIG_ID_Pos) /*!< 0x00000001 */ +#define DMAMUX_RGxCR_SIG_ID_1 (0x02U << DMAMUX_RGxCR_SIG_ID_Pos) /*!< 0x00000002 */ +#define DMAMUX_RGxCR_SIG_ID_2 (0x04U << DMAMUX_RGxCR_SIG_ID_Pos) /*!< 0x00000004 */ +#define DMAMUX_RGxCR_SIG_ID_3 (0x08U << DMAMUX_RGxCR_SIG_ID_Pos) /*!< 0x00000008 */ +#define DMAMUX_RGxCR_SIG_ID_4 (0x10U << DMAMUX_RGxCR_SIG_ID_Pos) /*!< 0x00000010 */ +#define DMAMUX_RGxCR_OIE_Pos (8U) +#define DMAMUX_RGxCR_OIE_Msk (0x1UL << DMAMUX_RGxCR_OIE_Pos) /*!< 0x00000100 */ +#define DMAMUX_RGxCR_OIE DMAMUX_RGxCR_OIE_Msk /*!< Overrun interrupt enable */ +#define DMAMUX_RGxCR_GE_Pos (16U) +#define DMAMUX_RGxCR_GE_Msk (0x1UL << DMAMUX_RGxCR_GE_Pos) /*!< 0x00010000 */ +#define DMAMUX_RGxCR_GE DMAMUX_RGxCR_GE_Msk /*!< Generation enable */ +#define DMAMUX_RGxCR_GPOL_Pos (17U) +#define DMAMUX_RGxCR_GPOL_Msk (0x3UL << DMAMUX_RGxCR_GPOL_Pos) /*!< 0x00060000 */ +#define DMAMUX_RGxCR_GPOL DMAMUX_RGxCR_GPOL_Msk /*!< Generation polarity */ +#define DMAMUX_RGxCR_GPOL_0 (0x1U << DMAMUX_RGxCR_GPOL_Pos) /*!< 0x00020000 */ +#define DMAMUX_RGxCR_GPOL_1 (0x2U << DMAMUX_RGxCR_GPOL_Pos) /*!< 0x00040000 */ +#define DMAMUX_RGxCR_GNBREQ_Pos (19U) +#define DMAMUX_RGxCR_GNBREQ_Msk (0x1FUL << DMAMUX_RGxCR_GNBREQ_Pos) /*!< 0x00F80000 */ +#define DMAMUX_RGxCR_GNBREQ DMAMUX_RGxCR_GNBREQ_Msk /*!< Number of request */ +#define DMAMUX_RGxCR_GNBREQ_0 (0x01U << DMAMUX_RGxCR_GNBREQ_Pos) /*!< 0x00080000 */ +#define DMAMUX_RGxCR_GNBREQ_1 (0x02U << DMAMUX_RGxCR_GNBREQ_Pos) /*!< 0x00100000 */ +#define DMAMUX_RGxCR_GNBREQ_2 (0x04U << DMAMUX_RGxCR_GNBREQ_Pos) /*!< 0x00200000 */ +#define DMAMUX_RGxCR_GNBREQ_3 (0x08U << DMAMUX_RGxCR_GNBREQ_Pos) /*!< 0x00400000 */ +#define DMAMUX_RGxCR_GNBREQ_4 (0x10U << DMAMUX_RGxCR_GNBREQ_Pos) /*!< 0x00800000 */ + +/******************** Bits definition for DMAMUX_RGSR register **************/ +#define DMAMUX_RGSR_OF0_Pos (0U) +#define DMAMUX_RGSR_OF0_Msk (0x1UL << DMAMUX_RGSR_OF0_Pos) /*!< 0x00000001 */ +#define DMAMUX_RGSR_OF0 DMAMUX_RGSR_OF0_Msk /*!< Overrun flag 0 */ +#define DMAMUX_RGSR_OF1_Pos (1U) +#define DMAMUX_RGSR_OF1_Msk (0x1UL << DMAMUX_RGSR_OF1_Pos) /*!< 0x00000002 */ +#define DMAMUX_RGSR_OF1 DMAMUX_RGSR_OF1_Msk /*!< Overrun flag 1 */ +#define DMAMUX_RGSR_OF2_Pos (2U) +#define DMAMUX_RGSR_OF2_Msk (0x1UL << DMAMUX_RGSR_OF2_Pos) /*!< 0x00000004 */ +#define DMAMUX_RGSR_OF2 DMAMUX_RGSR_OF2_Msk /*!< Overrun flag 2 */ +#define DMAMUX_RGSR_OF3_Pos (3U) +#define DMAMUX_RGSR_OF3_Msk (0x1UL << DMAMUX_RGSR_OF3_Pos) /*!< 0x00000008 */ +#define DMAMUX_RGSR_OF3 DMAMUX_RGSR_OF3_Msk /*!< Overrun flag 3 */ + +/******************** Bits definition for DMAMUX_RGCFR register **************/ +#define DMAMUX_RGCFR_COF0_Pos (0U) +#define DMAMUX_RGCFR_COF0_Msk (0x1UL << DMAMUX_RGCFR_COF0_Pos) /*!< 0x00000001 */ +#define DMAMUX_RGCFR_COF0 DMAMUX_RGCFR_COF0_Msk /*!< Clear Overrun flag 0 */ +#define DMAMUX_RGCFR_COF1_Pos (1U) +#define DMAMUX_RGCFR_COF1_Msk (0x1UL << DMAMUX_RGCFR_COF1_Pos) /*!< 0x00000002 */ +#define DMAMUX_RGCFR_COF1 DMAMUX_RGCFR_COF1_Msk /*!< Clear Overrun flag 1 */ +#define DMAMUX_RGCFR_COF2_Pos (2U) +#define DMAMUX_RGCFR_COF2_Msk (0x1UL << DMAMUX_RGCFR_COF2_Pos) /*!< 0x00000004 */ +#define DMAMUX_RGCFR_COF2 DMAMUX_RGCFR_COF2_Msk /*!< Clear Overrun flag 2 */ +#define DMAMUX_RGCFR_COF3_Pos (3U) +#define DMAMUX_RGCFR_COF3_Msk (0x1UL << DMAMUX_RGCFR_COF3_Pos) /*!< 0x00000008 */ +#define DMAMUX_RGCFR_COF3 DMAMUX_RGCFR_COF3_Msk /*!< Clear Overrun flag 3 */ + +/******************************************************************************/ +/* */ +/* External Interrupt/Event Controller */ +/* */ +/******************************************************************************/ + +/****************** Bit definition for EXTI_RTSR1 register ******************/ +#define EXTI_RTSR1_RT_Pos (0U) +#define EXTI_RTSR1_RT_Msk (0x803FFFFFUL << EXTI_RTSR1_RT_Pos) /*!< 0x803FFFFF */ +#define EXTI_RTSR1_RT EXTI_RTSR1_RT_Msk /*!< Rising trigger event configuration bit */ +#define EXTI_RTSR1_RT0_Pos (0U) +#define EXTI_RTSR1_RT0_Msk (0x1UL << EXTI_RTSR1_RT0_Pos) /*!< 0x00000001 */ +#define EXTI_RTSR1_RT0 EXTI_RTSR1_RT0_Msk /*!< Rising trigger event configuration bit of line 0 */ +#define EXTI_RTSR1_RT1_Pos (1U) +#define EXTI_RTSR1_RT1_Msk (0x1UL << EXTI_RTSR1_RT1_Pos) /*!< 0x00000002 */ +#define EXTI_RTSR1_RT1 EXTI_RTSR1_RT1_Msk /*!< Rising trigger event configuration bit of line 1 */ +#define EXTI_RTSR1_RT2_Pos (2U) +#define EXTI_RTSR1_RT2_Msk (0x1UL << EXTI_RTSR1_RT2_Pos) /*!< 0x00000004 */ +#define EXTI_RTSR1_RT2 EXTI_RTSR1_RT2_Msk /*!< Rising trigger event configuration bit of line 2 */ +#define EXTI_RTSR1_RT3_Pos (3U) +#define EXTI_RTSR1_RT3_Msk (0x1UL << EXTI_RTSR1_RT3_Pos) /*!< 0x00000008 */ +#define EXTI_RTSR1_RT3 EXTI_RTSR1_RT3_Msk /*!< Rising trigger event configuration bit of line 3 */ +#define EXTI_RTSR1_RT4_Pos (4U) +#define EXTI_RTSR1_RT4_Msk (0x1UL << EXTI_RTSR1_RT4_Pos) /*!< 0x00000010 */ +#define EXTI_RTSR1_RT4 EXTI_RTSR1_RT4_Msk /*!< Rising trigger event configuration bit of line 4 */ +#define EXTI_RTSR1_RT5_Pos (5U) +#define EXTI_RTSR1_RT5_Msk (0x1UL << EXTI_RTSR1_RT5_Pos) /*!< 0x00000020 */ +#define EXTI_RTSR1_RT5 EXTI_RTSR1_RT5_Msk /*!< Rising trigger event configuration bit of line 5 */ +#define EXTI_RTSR1_RT6_Pos (6U) +#define EXTI_RTSR1_RT6_Msk (0x1UL << EXTI_RTSR1_RT6_Pos) /*!< 0x00000040 */ +#define EXTI_RTSR1_RT6 EXTI_RTSR1_RT6_Msk /*!< Rising trigger event configuration bit of line 6 */ +#define EXTI_RTSR1_RT7_Pos (7U) +#define EXTI_RTSR1_RT7_Msk (0x1UL << EXTI_RTSR1_RT7_Pos) /*!< 0x00000080 */ +#define EXTI_RTSR1_RT7 EXTI_RTSR1_RT7_Msk /*!< Rising trigger event configuration bit of line 7 */ +#define EXTI_RTSR1_RT8_Pos (8U) +#define EXTI_RTSR1_RT8_Msk (0x1UL << EXTI_RTSR1_RT8_Pos) /*!< 0x00000100 */ +#define EXTI_RTSR1_RT8 EXTI_RTSR1_RT8_Msk /*!< Rising trigger event configuration bit of line 8 */ +#define EXTI_RTSR1_RT9_Pos (9U) +#define EXTI_RTSR1_RT9_Msk (0x1UL << EXTI_RTSR1_RT9_Pos) /*!< 0x00000200 */ +#define EXTI_RTSR1_RT9 EXTI_RTSR1_RT9_Msk /*!< Rising trigger event configuration bit of line 9 */ +#define EXTI_RTSR1_RT10_Pos (10U) +#define EXTI_RTSR1_RT10_Msk (0x1UL << EXTI_RTSR1_RT10_Pos) /*!< 0x00000400 */ +#define EXTI_RTSR1_RT10 EXTI_RTSR1_RT10_Msk /*!< Rising trigger event configuration bit of line 10 */ +#define EXTI_RTSR1_RT11_Pos (11U) +#define EXTI_RTSR1_RT11_Msk (0x1UL << EXTI_RTSR1_RT11_Pos) /*!< 0x00000800 */ +#define EXTI_RTSR1_RT11 EXTI_RTSR1_RT11_Msk /*!< Rising trigger event configuration bit of line 11 */ +#define EXTI_RTSR1_RT12_Pos (12U) +#define EXTI_RTSR1_RT12_Msk (0x1UL << EXTI_RTSR1_RT12_Pos) /*!< 0x00001000 */ +#define EXTI_RTSR1_RT12 EXTI_RTSR1_RT12_Msk /*!< Rising trigger event configuration bit of line 12 */ +#define EXTI_RTSR1_RT13_Pos (13U) +#define EXTI_RTSR1_RT13_Msk (0x1UL << EXTI_RTSR1_RT13_Pos) /*!< 0x00002000 */ +#define EXTI_RTSR1_RT13 EXTI_RTSR1_RT13_Msk /*!< Rising trigger event configuration bit of line 13 */ +#define EXTI_RTSR1_RT14_Pos (14U) +#define EXTI_RTSR1_RT14_Msk (0x1UL << EXTI_RTSR1_RT14_Pos) /*!< 0x00004000 */ +#define EXTI_RTSR1_RT14 EXTI_RTSR1_RT14_Msk /*!< Rising trigger event configuration bit of line 14 */ +#define EXTI_RTSR1_RT15_Pos (15U) +#define EXTI_RTSR1_RT15_Msk (0x1UL << EXTI_RTSR1_RT15_Pos) /*!< 0x00008000 */ +#define EXTI_RTSR1_RT15 EXTI_RTSR1_RT15_Msk /*!< Rising trigger event configuration bit of line 15 */ +#define EXTI_RTSR1_RT16_Pos (16U) +#define EXTI_RTSR1_RT16_Msk (0x1UL << EXTI_RTSR1_RT16_Pos) /*!< 0x00010000 */ +#define EXTI_RTSR1_RT16 EXTI_RTSR1_RT16_Msk /*!< Rising trigger event configuration bit of line 16 */ +#define EXTI_RTSR1_RT17_Pos (17U) +#define EXTI_RTSR1_RT17_Msk (0x1UL << EXTI_RTSR1_RT17_Pos) /*!< 0x00020000 */ +#define EXTI_RTSR1_RT17 EXTI_RTSR1_RT17_Msk /*!< Rising trigger event configuration bit of line 17 */ +#define EXTI_RTSR1_RT18_Pos (18U) +#define EXTI_RTSR1_RT18_Msk (0x1UL << EXTI_RTSR1_RT18_Pos) /*!< 0x00040000 */ +#define EXTI_RTSR1_RT18 EXTI_RTSR1_RT18_Msk /*!< Rising trigger event configuration bit of line 18 */ +#define EXTI_RTSR1_RT19_Pos (19U) +#define EXTI_RTSR1_RT19_Msk (0x1UL << EXTI_RTSR1_RT19_Pos) /*!< 0x00080000 */ +#define EXTI_RTSR1_RT19 EXTI_RTSR1_RT19_Msk /*!< Rising trigger event configuration bit of line 19 */ +#define EXTI_RTSR1_RT20_Pos (20U) +#define EXTI_RTSR1_RT20_Msk (0x1UL << EXTI_RTSR1_RT20_Pos) /*!< 0x00100000 */ +#define EXTI_RTSR1_RT20 EXTI_RTSR1_RT20_Msk /*!< Rising trigger event configuration bit of line 20 */ +#define EXTI_RTSR1_RT21_Pos (21U) +#define EXTI_RTSR1_RT21_Msk (0x1UL << EXTI_RTSR1_RT21_Pos) /*!< 0x00200000 */ +#define EXTI_RTSR1_RT21 EXTI_RTSR1_RT21_Msk /*!< Rising trigger event configuration bit of line 21 */ +#define EXTI_RTSR1_RT31_Pos (31U) +#define EXTI_RTSR1_RT31_Msk (0x1UL << EXTI_RTSR1_RT31_Pos) /*!< 0x80000000 */ +#define EXTI_RTSR1_RT31 EXTI_RTSR1_RT31_Msk /*!< Rising trigger event configuration bit of line 31 */ + +/****************** Bit definition for EXTI_FTSR1 register ******************/ +#define EXTI_FTSR1_FT_Pos (0U) +#define EXTI_FTSR1_FT_Msk (0x803FFFFFUL << EXTI_FTSR1_FT_Pos) /*!< 0x803FFFFF */ +#define EXTI_FTSR1_FT EXTI_FTSR1_FT_Msk /*!< Falling trigger event configuration bit */ +#define EXTI_FTSR1_FT0_Pos (0U) +#define EXTI_FTSR1_FT0_Msk (0x1UL << EXTI_FTSR1_FT0_Pos) /*!< 0x00000001 */ +#define EXTI_FTSR1_FT0 EXTI_FTSR1_FT0_Msk /*!< Falling trigger event configuration bit of line 0 */ +#define EXTI_FTSR1_FT1_Pos (1U) +#define EXTI_FTSR1_FT1_Msk (0x1UL << EXTI_FTSR1_FT1_Pos) /*!< 0x00000002 */ +#define EXTI_FTSR1_FT1 EXTI_FTSR1_FT1_Msk /*!< Falling trigger event configuration bit of line 1 */ +#define EXTI_FTSR1_FT2_Pos (2U) +#define EXTI_FTSR1_FT2_Msk (0x1UL << EXTI_FTSR1_FT2_Pos) /*!< 0x00000004 */ +#define EXTI_FTSR1_FT2 EXTI_FTSR1_FT2_Msk /*!< Falling trigger event configuration bit of line 2 */ +#define EXTI_FTSR1_FT3_Pos (3U) +#define EXTI_FTSR1_FT3_Msk (0x1UL << EXTI_FTSR1_FT3_Pos) /*!< 0x00000008 */ +#define EXTI_FTSR1_FT3 EXTI_FTSR1_FT3_Msk /*!< Falling trigger event configuration bit of line 3 */ +#define EXTI_FTSR1_FT4_Pos (4U) +#define EXTI_FTSR1_FT4_Msk (0x1UL << EXTI_FTSR1_FT4_Pos) /*!< 0x00000010 */ +#define EXTI_FTSR1_FT4 EXTI_FTSR1_FT4_Msk /*!< Falling trigger event configuration bit of line 4 */ +#define EXTI_FTSR1_FT5_Pos (5U) +#define EXTI_FTSR1_FT5_Msk (0x1UL << EXTI_FTSR1_FT5_Pos) /*!< 0x00000020 */ +#define EXTI_FTSR1_FT5 EXTI_FTSR1_FT5_Msk /*!< Falling trigger event configuration bit of line 5 */ +#define EXTI_FTSR1_FT6_Pos (6U) +#define EXTI_FTSR1_FT6_Msk (0x1UL << EXTI_FTSR1_FT6_Pos) /*!< 0x00000040 */ +#define EXTI_FTSR1_FT6 EXTI_FTSR1_FT6_Msk /*!< Falling trigger event configuration bit of line 6 */ +#define EXTI_FTSR1_FT7_Pos (7U) +#define EXTI_FTSR1_FT7_Msk (0x1UL << EXTI_FTSR1_FT7_Pos) /*!< 0x00000080 */ +#define EXTI_FTSR1_FT7 EXTI_FTSR1_FT7_Msk /*!< Falling trigger event configuration bit of line 7 */ +#define EXTI_FTSR1_FT8_Pos (8U) +#define EXTI_FTSR1_FT8_Msk (0x1UL << EXTI_FTSR1_FT8_Pos) /*!< 0x00000100 */ +#define EXTI_FTSR1_FT8 EXTI_FTSR1_FT8_Msk /*!< Falling trigger event configuration bit of line 8 */ +#define EXTI_FTSR1_FT9_Pos (9U) +#define EXTI_FTSR1_FT9_Msk (0x1UL << EXTI_FTSR1_FT9_Pos) /*!< 0x00000200 */ +#define EXTI_FTSR1_FT9 EXTI_FTSR1_FT9_Msk /*!< Falling trigger event configuration bit of line 9 */ +#define EXTI_FTSR1_FT10_Pos (10U) +#define EXTI_FTSR1_FT10_Msk (0x1UL << EXTI_FTSR1_FT10_Pos) /*!< 0x00000400 */ +#define EXTI_FTSR1_FT10 EXTI_FTSR1_FT10_Msk /*!< Falling trigger event configuration bit of line 10 */ +#define EXTI_FTSR1_FT11_Pos (11U) +#define EXTI_FTSR1_FT11_Msk (0x1UL << EXTI_FTSR1_FT11_Pos) /*!< 0x00000800 */ +#define EXTI_FTSR1_FT11 EXTI_FTSR1_FT11_Msk /*!< Falling trigger event configuration bit of line 11 */ +#define EXTI_FTSR1_FT12_Pos (12U) +#define EXTI_FTSR1_FT12_Msk (0x1UL << EXTI_FTSR1_FT12_Pos) /*!< 0x00001000 */ +#define EXTI_FTSR1_FT12 EXTI_FTSR1_FT12_Msk /*!< Falling trigger event configuration bit of line 12 */ +#define EXTI_FTSR1_FT13_Pos (13U) +#define EXTI_FTSR1_FT13_Msk (0x1UL << EXTI_FTSR1_FT13_Pos) /*!< 0x00002000 */ +#define EXTI_FTSR1_FT13 EXTI_FTSR1_FT13_Msk /*!< Falling trigger event configuration bit of line 13 */ +#define EXTI_FTSR1_FT14_Pos (14U) +#define EXTI_FTSR1_FT14_Msk (0x1UL << EXTI_FTSR1_FT14_Pos) /*!< 0x00004000 */ +#define EXTI_FTSR1_FT14 EXTI_FTSR1_FT14_Msk /*!< Falling trigger event configuration bit of line 14 */ +#define EXTI_FTSR1_FT15_Pos (15U) +#define EXTI_FTSR1_FT15_Msk (0x1UL << EXTI_FTSR1_FT15_Pos) /*!< 0x00008000 */ +#define EXTI_FTSR1_FT15 EXTI_FTSR1_FT15_Msk /*!< Falling trigger event configuration bit of line 15 */ +#define EXTI_FTSR1_FT16_Pos (16U) +#define EXTI_FTSR1_FT16_Msk (0x1UL << EXTI_FTSR1_FT16_Pos) /*!< 0x00010000 */ +#define EXTI_FTSR1_FT16 EXTI_FTSR1_FT16_Msk /*!< Falling trigger event configuration bit of line 16 */ +#define EXTI_FTSR1_FT17_Pos (17U) +#define EXTI_FTSR1_FT17_Msk (0x1UL << EXTI_FTSR1_FT17_Pos) /*!< 0x00020000 */ +#define EXTI_FTSR1_FT17 EXTI_FTSR1_FT17_Msk /*!< Falling trigger event configuration bit of line 17 */ +#define EXTI_FTSR1_FT18_Pos (18U) +#define EXTI_FTSR1_FT18_Msk (0x1UL << EXTI_FTSR1_FT18_Pos) /*!< 0x00040000 */ +#define EXTI_FTSR1_FT18 EXTI_FTSR1_FT18_Msk /*!< Falling trigger event configuration bit of line 18 */ +#define EXTI_FTSR1_FT19_Pos (19U) +#define EXTI_FTSR1_FT19_Msk (0x1UL << EXTI_FTSR1_FT19_Pos) /*!< 0x00080000 */ +#define EXTI_FTSR1_FT19 EXTI_FTSR1_FT19_Msk /*!< Falling trigger event configuration bit of line 19 */ +#define EXTI_FTSR1_FT20_Pos (20U) +#define EXTI_FTSR1_FT20_Msk (0x1UL << EXTI_FTSR1_FT20_Pos) /*!< 0x00100000 */ +#define EXTI_FTSR1_FT20 EXTI_FTSR1_FT20_Msk /*!< Falling trigger event configuration bit of line 20 */ +#define EXTI_FTSR1_FT21_Pos (21U) +#define EXTI_FTSR1_FT21_Msk (0x1UL << EXTI_FTSR1_FT21_Pos) /*!< 0x00200000 */ +#define EXTI_FTSR1_FT21 EXTI_FTSR1_FT21_Msk /*!< Falling trigger event configuration bit of line 21 */ +#define EXTI_FTSR1_FT31_Pos (31U) +#define EXTI_FTSR1_FT31_Msk (0x1UL << EXTI_FTSR1_FT31_Pos) /*!< 0x80000000 */ +#define EXTI_FTSR1_FT31 EXTI_FTSR1_FT31_Msk /*!< Falling trigger event configuration bit of line 31 */ + +/****************** Bit definition for EXTI_SWIER1 register *****************/ +#define EXTI_SWIER1_SWI_Pos (0U) +#define EXTI_SWIER1_SWI_Msk (0x803FFFFFUL << EXTI_SWIER1_SWI_Pos) /*!< 0x803FFFFF */ +#define EXTI_SWIER1_SWI EXTI_SWIER1_SWI_Msk /*!< Software interrupt */ +#define EXTI_SWIER1_SWI0_Pos (0U) +#define EXTI_SWIER1_SWI0_Msk (0x1UL << EXTI_SWIER1_SWI0_Pos) /*!< 0x00000001 */ +#define EXTI_SWIER1_SWI0 EXTI_SWIER1_SWI0_Msk /*!< Software Interrupt on line 0 */ +#define EXTI_SWIER1_SWI1_Pos (1U) +#define EXTI_SWIER1_SWI1_Msk (0x1UL << EXTI_SWIER1_SWI1_Pos) /*!< 0x00000002 */ +#define EXTI_SWIER1_SWI1 EXTI_SWIER1_SWI1_Msk /*!< Software Interrupt on line 1 */ +#define EXTI_SWIER1_SWI2_Pos (2U) +#define EXTI_SWIER1_SWI2_Msk (0x1UL << EXTI_SWIER1_SWI2_Pos) /*!< 0x00000004 */ +#define EXTI_SWIER1_SWI2 EXTI_SWIER1_SWI2_Msk /*!< Software Interrupt on line 2 */ +#define EXTI_SWIER1_SWI3_Pos (3U) +#define EXTI_SWIER1_SWI3_Msk (0x1UL << EXTI_SWIER1_SWI3_Pos) /*!< 0x00000008 */ +#define EXTI_SWIER1_SWI3 EXTI_SWIER1_SWI3_Msk /*!< Software Interrupt on line 3 */ +#define EXTI_SWIER1_SWI4_Pos (4U) +#define EXTI_SWIER1_SWI4_Msk (0x1UL << EXTI_SWIER1_SWI4_Pos) /*!< 0x00000010 */ +#define EXTI_SWIER1_SWI4 EXTI_SWIER1_SWI4_Msk /*!< Software Interrupt on line 4 */ +#define EXTI_SWIER1_SWI5_Pos (5U) +#define EXTI_SWIER1_SWI5_Msk (0x1UL << EXTI_SWIER1_SWI5_Pos) /*!< 0x00000020 */ +#define EXTI_SWIER1_SWI5 EXTI_SWIER1_SWI5_Msk /*!< Software Interrupt on line 5 */ +#define EXTI_SWIER1_SWI6_Pos (6U) +#define EXTI_SWIER1_SWI6_Msk (0x1UL << EXTI_SWIER1_SWI6_Pos) /*!< 0x00000040 */ +#define EXTI_SWIER1_SWI6 EXTI_SWIER1_SWI6_Msk /*!< Software Interrupt on line 6 */ +#define EXTI_SWIER1_SWI7_Pos (7U) +#define EXTI_SWIER1_SWI7_Msk (0x1UL << EXTI_SWIER1_SWI7_Pos) /*!< 0x00000080 */ +#define EXTI_SWIER1_SWI7 EXTI_SWIER1_SWI7_Msk /*!< Software Interrupt on line 7 */ +#define EXTI_SWIER1_SWI8_Pos (8U) +#define EXTI_SWIER1_SWI8_Msk (0x1UL << EXTI_SWIER1_SWI8_Pos) /*!< 0x00000100 */ +#define EXTI_SWIER1_SWI8 EXTI_SWIER1_SWI8_Msk /*!< Software Interrupt on line 8 */ +#define EXTI_SWIER1_SWI9_Pos (9U) +#define EXTI_SWIER1_SWI9_Msk (0x1UL << EXTI_SWIER1_SWI9_Pos) /*!< 0x00000200 */ +#define EXTI_SWIER1_SWI9 EXTI_SWIER1_SWI9_Msk /*!< Software Interrupt on line 9 */ +#define EXTI_SWIER1_SWI10_Pos (10U) +#define EXTI_SWIER1_SWI10_Msk (0x1UL << EXTI_SWIER1_SWI10_Pos) /*!< 0x00000400 */ +#define EXTI_SWIER1_SWI10 EXTI_SWIER1_SWI10_Msk /*!< Software Interrupt on line 10 */ +#define EXTI_SWIER1_SWI11_Pos (11U) +#define EXTI_SWIER1_SWI11_Msk (0x1UL << EXTI_SWIER1_SWI11_Pos) /*!< 0x00000800 */ +#define EXTI_SWIER1_SWI11 EXTI_SWIER1_SWI11_Msk /*!< Software Interrupt on line 11 */ +#define EXTI_SWIER1_SWI12_Pos (12U) +#define EXTI_SWIER1_SWI12_Msk (0x1UL << EXTI_SWIER1_SWI12_Pos) /*!< 0x00001000 */ +#define EXTI_SWIER1_SWI12 EXTI_SWIER1_SWI12_Msk /*!< Software Interrupt on line 12 */ +#define EXTI_SWIER1_SWI13_Pos (13U) +#define EXTI_SWIER1_SWI13_Msk (0x1UL << EXTI_SWIER1_SWI13_Pos) /*!< 0x00002000 */ +#define EXTI_SWIER1_SWI13 EXTI_SWIER1_SWI13_Msk /*!< Software Interrupt on line 13 */ +#define EXTI_SWIER1_SWI14_Pos (14U) +#define EXTI_SWIER1_SWI14_Msk (0x1UL << EXTI_SWIER1_SWI14_Pos) /*!< 0x00004000 */ +#define EXTI_SWIER1_SWI14 EXTI_SWIER1_SWI14_Msk /*!< Software Interrupt on line 14 */ +#define EXTI_SWIER1_SWI15_Pos (15U) +#define EXTI_SWIER1_SWI15_Msk (0x1UL << EXTI_SWIER1_SWI15_Pos) /*!< 0x00008000 */ +#define EXTI_SWIER1_SWI15 EXTI_SWIER1_SWI15_Msk /*!< Software Interrupt on line 15 */ +#define EXTI_SWIER1_SWI16_Pos (16U) +#define EXTI_SWIER1_SWI16_Msk (0x1UL << EXTI_SWIER1_SWI16_Pos) /*!< 0x00010000 */ +#define EXTI_SWIER1_SWI16 EXTI_SWIER1_SWI16_Msk /*!< Software Interrupt on line 16 */ +#define EXTI_SWIER1_SWI17_Pos (17U) +#define EXTI_SWIER1_SWI17_Msk (0x1UL << EXTI_SWIER1_SWI17_Pos) /*!< 0x00020000 */ +#define EXTI_SWIER1_SWI17 EXTI_SWIER1_SWI17_Msk /*!< Software Interrupt on line 17 */ +#define EXTI_SWIER1_SWI18_Pos (18U) +#define EXTI_SWIER1_SWI18_Msk (0x1UL << EXTI_SWIER1_SWI18_Pos) /*!< 0x00040000 */ +#define EXTI_SWIER1_SWI18 EXTI_SWIER1_SWI18_Msk /*!< Software Interrupt on line 18 */ +#define EXTI_SWIER1_SWI19_Pos (19U) +#define EXTI_SWIER1_SWI19_Msk (0x1UL << EXTI_SWIER1_SWI19_Pos) /*!< 0x00080000 */ +#define EXTI_SWIER1_SWI19 EXTI_SWIER1_SWI19_Msk /*!< Software Interrupt on line 19 */ +#define EXTI_SWIER1_SWI20_Pos (20U) +#define EXTI_SWIER1_SWI20_Msk (0x1UL << EXTI_SWIER1_SWI20_Pos) /*!< 0x00100000 */ +#define EXTI_SWIER1_SWI20 EXTI_SWIER1_SWI20_Msk /*!< Software Interrupt on line 20 */ +#define EXTI_SWIER1_SWI21_Pos (21U) +#define EXTI_SWIER1_SWI21_Msk (0x1UL << EXTI_SWIER1_SWI21_Pos) /*!< 0x00200000 */ +#define EXTI_SWIER1_SWI21 EXTI_SWIER1_SWI21_Msk /*!< Software Interrupt on line 21 */ +#define EXTI_SWIER1_SWI31_Pos (31U) +#define EXTI_SWIER1_SWI31_Msk (0x1UL << EXTI_SWIER1_SWI31_Pos) /*!< 0x80000000 */ +#define EXTI_SWIER1_SWI31 EXTI_SWIER1_SWI31_Msk /*!< Software Interrupt on line 31 */ + +/******************* Bit definition for EXTI_PR1 register *******************/ +#define EXTI_PR1_PIF_Pos (0U) +#define EXTI_PR1_PIF_Msk (0x803FFFFFUL << EXTI_PR1_PIF_Pos) /*!< 0x803FFFFF */ +#define EXTI_PR1_PIF EXTI_PR1_PIF_Msk /*!< Pending bit */ +#define EXTI_PR1_PIF0_Pos (0U) +#define EXTI_PR1_PIF0_Msk (0x1UL << EXTI_PR1_PIF0_Pos) /*!< 0x00000001 */ +#define EXTI_PR1_PIF0 EXTI_PR1_PIF0_Msk /*!< Pending bit for line 0 */ +#define EXTI_PR1_PIF1_Pos (1U) +#define EXTI_PR1_PIF1_Msk (0x1UL << EXTI_PR1_PIF1_Pos) /*!< 0x00000002 */ +#define EXTI_PR1_PIF1 EXTI_PR1_PIF1_Msk /*!< Pending bit for line 1 */ +#define EXTI_PR1_PIF2_Pos (2U) +#define EXTI_PR1_PIF2_Msk (0x1UL << EXTI_PR1_PIF2_Pos) /*!< 0x00000004 */ +#define EXTI_PR1_PIF2 EXTI_PR1_PIF2_Msk /*!< Pending bit for line 2 */ +#define EXTI_PR1_PIF3_Pos (3U) +#define EXTI_PR1_PIF3_Msk (0x1UL << EXTI_PR1_PIF3_Pos) /*!< 0x00000008 */ +#define EXTI_PR1_PIF3 EXTI_PR1_PIF3_Msk /*!< Pending bit for line 3 */ +#define EXTI_PR1_PIF4_Pos (4U) +#define EXTI_PR1_PIF4_Msk (0x1UL << EXTI_PR1_PIF4_Pos) /*!< 0x00000010 */ +#define EXTI_PR1_PIF4 EXTI_PR1_PIF4_Msk /*!< Pending bit for line 4 */ +#define EXTI_PR1_PIF5_Pos (5U) +#define EXTI_PR1_PIF5_Msk (0x1UL << EXTI_PR1_PIF5_Pos) /*!< 0x00000020 */ +#define EXTI_PR1_PIF5 EXTI_PR1_PIF5_Msk /*!< Pending bit for line 5 */ +#define EXTI_PR1_PIF6_Pos (6U) +#define EXTI_PR1_PIF6_Msk (0x1UL << EXTI_PR1_PIF6_Pos) /*!< 0x00000040 */ +#define EXTI_PR1_PIF6 EXTI_PR1_PIF6_Msk /*!< Pending bit for line 6 */ +#define EXTI_PR1_PIF7_Pos (7U) +#define EXTI_PR1_PIF7_Msk (0x1UL << EXTI_PR1_PIF7_Pos) /*!< 0x00000080 */ +#define EXTI_PR1_PIF7 EXTI_PR1_PIF7_Msk /*!< Pending bit for line 7 */ +#define EXTI_PR1_PIF8_Pos (8U) +#define EXTI_PR1_PIF8_Msk (0x1UL << EXTI_PR1_PIF8_Pos) /*!< 0x00000100 */ +#define EXTI_PR1_PIF8 EXTI_PR1_PIF8_Msk /*!< Pending bit for line 8 */ +#define EXTI_PR1_PIF9_Pos (9U) +#define EXTI_PR1_PIF9_Msk (0x1UL << EXTI_PR1_PIF9_Pos) /*!< 0x00000200 */ +#define EXTI_PR1_PIF9 EXTI_PR1_PIF9_Msk /*!< Pending bit for line 9 */ +#define EXTI_PR1_PIF10_Pos (10U) +#define EXTI_PR1_PIF10_Msk (0x1UL << EXTI_PR1_PIF10_Pos) /*!< 0x00000400 */ +#define EXTI_PR1_PIF10 EXTI_PR1_PIF10_Msk /*!< Pending bit for line 10 */ +#define EXTI_PR1_PIF11_Pos (11U) +#define EXTI_PR1_PIF11_Msk (0x1UL << EXTI_PR1_PIF11_Pos) /*!< 0x00000800 */ +#define EXTI_PR1_PIF11 EXTI_PR1_PIF11_Msk /*!< Pending bit for line 11 */ +#define EXTI_PR1_PIF12_Pos (12U) +#define EXTI_PR1_PIF12_Msk (0x1UL << EXTI_PR1_PIF12_Pos) /*!< 0x00001000 */ +#define EXTI_PR1_PIF12 EXTI_PR1_PIF12_Msk /*!< Pending bit for line 12 */ +#define EXTI_PR1_PIF13_Pos (13U) +#define EXTI_PR1_PIF13_Msk (0x1UL << EXTI_PR1_PIF13_Pos) /*!< 0x00002000 */ +#define EXTI_PR1_PIF13 EXTI_PR1_PIF13_Msk /*!< Pending bit for line 13 */ +#define EXTI_PR1_PIF14_Pos (14U) +#define EXTI_PR1_PIF14_Msk (0x1UL << EXTI_PR1_PIF14_Pos) /*!< 0x00004000 */ +#define EXTI_PR1_PIF14 EXTI_PR1_PIF14_Msk /*!< Pending bit for line 14 */ +#define EXTI_PR1_PIF15_Pos (15U) +#define EXTI_PR1_PIF15_Msk (0x1UL << EXTI_PR1_PIF15_Pos) /*!< 0x00008000 */ +#define EXTI_PR1_PIF15 EXTI_PR1_PIF15_Msk /*!< Pending bit for line 15 */ +#define EXTI_PR1_PIF16_Pos (16U) +#define EXTI_PR1_PIF16_Msk (0x1UL << EXTI_PR1_PIF16_Pos) /*!< 0x00010000 */ +#define EXTI_PR1_PIF16 EXTI_PR1_PIF16_Msk /*!< Pending bit for line 16 */ +#define EXTI_PR1_PIF17_Pos (17U) +#define EXTI_PR1_PIF17_Msk (0x1UL << EXTI_PR1_PIF17_Pos) /*!< 0x00020000 */ +#define EXTI_PR1_PIF17 EXTI_PR1_PIF17_Msk /*!< Pending bit for line 17 */ +#define EXTI_PR1_PIF18_Pos (18U) +#define EXTI_PR1_PIF18_Msk (0x1UL << EXTI_PR1_PIF18_Pos) /*!< 0x00040000 */ +#define EXTI_PR1_PIF18 EXTI_PR1_PIF18_Msk /*!< Pending bit for line 18 */ +#define EXTI_PR1_PIF19_Pos (19U) +#define EXTI_PR1_PIF19_Msk (0x1UL << EXTI_PR1_PIF19_Pos) /*!< 0x00080000 */ +#define EXTI_PR1_PIF19 EXTI_PR1_PIF19_Msk /*!< Pending bit for line 19 */ +#define EXTI_PR1_PIF20_Pos (20U) +#define EXTI_PR1_PIF20_Msk (0x1UL << EXTI_PR1_PIF20_Pos) /*!< 0x00100000 */ +#define EXTI_PR1_PIF20 EXTI_PR1_PIF20_Msk /*!< Pending bit for line 20 */ +#define EXTI_PR1_PIF21_Pos (21U) +#define EXTI_PR1_PIF21_Msk (0x1UL << EXTI_PR1_PIF21_Pos) /*!< 0x00200000 */ +#define EXTI_PR1_PIF21 EXTI_PR1_PIF21_Msk /*!< Pending bit for line 21 */ +#define EXTI_PR1_PIF31_Pos (31U) +#define EXTI_PR1_PIF31_Msk (0x1UL << EXTI_PR1_PIF31_Pos) /*!< 0x80000000 */ +#define EXTI_PR1_PIF31 EXTI_PR1_PIF31_Msk /*!< Pending bit for line 31 */ + +/****************** Bit definition for EXTI_RTSR2 register ******************/ +#define EXTI_RTSR2_RT_Pos (0U) +#define EXTI_RTSR2_RT_Msk (0x302UL << EXTI_RTSR2_RT_Pos) /*!< 0x00000302 */ +#define EXTI_RTSR2_RT EXTI_RTSR2_RT_Msk /*!< Rising trigger event configuration bit */ +#define EXTI_RTSR2_RT33_Pos (1U) +#define EXTI_RTSR2_RT33_Msk (0x1UL << EXTI_RTSR2_RT33_Pos) /*!< 0x00000002 */ +#define EXTI_RTSR2_RT33 EXTI_RTSR2_RT33_Msk /*!< Rising trigger event configuration bit of line 33 */ +#define EXTI_RTSR2_RT40_Pos (8U) +#define EXTI_RTSR2_RT40_Msk (0x1UL << EXTI_RTSR2_RT40_Pos) /*!< 0x00000100 */ +#define EXTI_RTSR2_RT40 EXTI_RTSR2_RT40_Msk /*!< Rising trigger event configuration bit of line 40 */ +#define EXTI_RTSR2_RT41_Pos (9U) +#define EXTI_RTSR2_RT41_Msk (0x1UL << EXTI_RTSR2_RT41_Pos) /*!< 0x00000200 */ +#define EXTI_RTSR2_RT41 EXTI_RTSR2_RT41_Msk /*!< Rising trigger event configuration bit of line 41 */ + +/****************** Bit definition for EXTI_FTSR2 register ******************/ +#define EXTI_FTSR2_FT_Pos (0U) +#define EXTI_FTSR2_FT_Msk (0x302UL << EXTI_FTSR2_FT_Pos) /*!< 0x00000302 */ +#define EXTI_FTSR2_FT EXTI_FTSR2_FT_Msk /*!< Falling trigger event configuration bit */ +#define EXTI_FTSR2_FT33_Pos (1U) +#define EXTI_FTSR2_FT33_Msk (0x1UL << EXTI_FTSR2_FT33_Pos) /*!< 0x00000002 */ +#define EXTI_FTSR2_FT33 EXTI_FTSR2_FT33_Msk /*!< Falling trigger event configuration bit of line 33 */ +#define EXTI_FTSR2_FT40_Pos (8U) +#define EXTI_FTSR2_FT40_Msk (0x1UL << EXTI_FTSR2_FT40_Pos) /*!< 0x00000100 */ +#define EXTI_FTSR2_FT40 EXTI_FTSR2_FT40_Msk /*!< Falling trigger event configuration bit of line 40 */ +#define EXTI_FTSR2_FT41_Pos (9U) +#define EXTI_FTSR2_FT41_Msk (0x1UL << EXTI_FTSR2_FT41_Pos) /*!< 0x00000200 */ +#define EXTI_FTSR2_FT41 EXTI_FTSR2_FT41_Msk /*!< Falling trigger event configuration bit of line 41 */ + +/****************** Bit definition for EXTI_SWIER2 register *****************/ +#define EXTI_SWIER2_SWI_Pos (0U) +#define EXTI_SWIER2_SWI_Msk (0x302UL << EXTI_SWIER2_SWI_Pos) /*!< 0x00000302 */ +#define EXTI_SWIER2_SWI EXTI_SWIER2_SWI_Msk /*!< Falling trigger event configuration bit */ +#define EXTI_SWIER2_SWI33_Pos (1U) +#define EXTI_SWIER2_SWI33_Msk (0x1UL << EXTI_SWIER2_SWI33_Pos) /*!< 0x00000002 */ +#define EXTI_SWIER2_SWI33 EXTI_SWIER2_SWI33_Msk /*!< Software Interrupt on line 33 */ +#define EXTI_SWIER2_SWI40_Pos (8U) +#define EXTI_SWIER2_SWI40_Msk (0x1UL << EXTI_SWIER2_SWI40_Pos) /*!< 0x00000100 */ +#define EXTI_SWIER2_SWI40 EXTI_SWIER2_SWI40_Msk /*!< Software Interrupt on line 40 */ +#define EXTI_SWIER2_SWI41_Pos (9U) +#define EXTI_SWIER2_SWI41_Msk (0x1UL << EXTI_SWIER2_SWI41_Pos) /*!< 0x00000200 */ +#define EXTI_SWIER2_SWI41 EXTI_SWIER2_SWI41_Msk /*!< Software Interrupt on line 41 */ + +/******************* Bit definition for EXTI_PR2 register *******************/ +#define EXTI_PR2_PIF_Pos (0U) +#define EXTI_PR2_PIF_Msk (0x302UL << EXTI_PR2_PIF_Pos) /*!< 0x00000302 */ +#define EXTI_PR2_PIF EXTI_PR2_PIF_Msk /*!< Pending bit */ +#define EXTI_PR2_PIF33_Pos (1U) +#define EXTI_PR2_PIF33_Msk (0x1UL << EXTI_PR2_PIF33_Pos) /*!< 0x00000002 */ +#define EXTI_PR2_PIF33 EXTI_PR2_PIF33_Msk /*!< Pending bit for line 33 */ +#define EXTI_PR2_PIF40_Pos (8U) +#define EXTI_PR2_PIF40_Msk (0x1UL << EXTI_PR2_PIF40_Pos) /*!< 0x00000100 */ +#define EXTI_PR2_PIF40 EXTI_PR2_PIF40_Msk /*!< Pending bit for line 40 */ +#define EXTI_PR2_PIF41_Pos (9U) +#define EXTI_PR2_PIF41_Msk (0x1UL << EXTI_PR2_PIF41_Pos) /*!< 0x00000200 */ +#define EXTI_PR2_PIF41 EXTI_PR2_PIF41_Msk /*!< Pending bit for line 41 */ + +/******************** Bits definition for EXTI_IMR1 register ****************/ +#define EXTI_IMR1_Pos (0U) +#define EXTI_IMR1_Msk (0xFFFFFFFFUL << EXTI_IMR1_Pos) /*!< 0xFFFFFFFF */ +#define EXTI_IMR1_IM EXTI_IMR1_Msk /*!< CPU1 wakeup with interrupt Mask on Event */ +#define EXTI_IMR1_IM0_Pos (0U) +#define EXTI_IMR1_IM0_Msk (0x1UL << EXTI_IMR1_IM0_Pos) /*!< 0x00000001 */ +#define EXTI_IMR1_IM0 EXTI_IMR1_IM0_Msk /*!< CPU1 Interrupt Mask on line 0 */ +#define EXTI_IMR1_IM1_Pos (1U) +#define EXTI_IMR1_IM1_Msk (0x1UL << EXTI_IMR1_IM1_Pos) /*!< 0x00000002 */ +#define EXTI_IMR1_IM1 EXTI_IMR1_IM1_Msk /*!< CPU1 Interrupt Mask on line 1 */ +#define EXTI_IMR1_IM2_Pos (2U) +#define EXTI_IMR1_IM2_Msk (0x1UL << EXTI_IMR1_IM2_Pos) /*!< 0x00000004 */ +#define EXTI_IMR1_IM2 EXTI_IMR1_IM2_Msk /*!< CPU1 Interrupt Mask on line 2 */ +#define EXTI_IMR1_IM3_Pos (3U) +#define EXTI_IMR1_IM3_Msk (0x1UL << EXTI_IMR1_IM3_Pos) /*!< 0x00000008 */ +#define EXTI_IMR1_IM3 EXTI_IMR1_IM3_Msk /*!< CPU1 Interrupt Mask on line 3 */ +#define EXTI_IMR1_IM4_Pos (4U) +#define EXTI_IMR1_IM4_Msk (0x1UL << EXTI_IMR1_IM4_Pos) /*!< 0x00000010 */ +#define EXTI_IMR1_IM4 EXTI_IMR1_IM4_Msk /*!< CPU1 Interrupt Mask on line 4 */ +#define EXTI_IMR1_IM5_Pos (5U) +#define EXTI_IMR1_IM5_Msk (0x1UL << EXTI_IMR1_IM5_Pos) /*!< 0x00000020 */ +#define EXTI_IMR1_IM5 EXTI_IMR1_IM5_Msk /*!< CPU1 Interrupt Mask on line 5 */ +#define EXTI_IMR1_IM6_Pos (6U) +#define EXTI_IMR1_IM6_Msk (0x1UL << EXTI_IMR1_IM6_Pos) /*!< 0x00000040 */ +#define EXTI_IMR1_IM6 EXTI_IMR1_IM6_Msk /*!< CPU1 Interrupt Mask on line 6 */ +#define EXTI_IMR1_IM7_Pos (7U) +#define EXTI_IMR1_IM7_Msk (0x1UL << EXTI_IMR1_IM7_Pos) /*!< 0x00000080 */ +#define EXTI_IMR1_IM7 EXTI_IMR1_IM7_Msk /*!< CPU1 Interrupt Mask on line 7 */ +#define EXTI_IMR1_IM8_Pos (8U) +#define EXTI_IMR1_IM8_Msk (0x1UL << EXTI_IMR1_IM8_Pos) /*!< 0x00000100 */ +#define EXTI_IMR1_IM8 EXTI_IMR1_IM8_Msk /*!< CPU1 Interrupt Mask on line 8 */ +#define EXTI_IMR1_IM9_Pos (9U) +#define EXTI_IMR1_IM9_Msk (0x1UL << EXTI_IMR1_IM9_Pos) /*!< 0x00000200 */ +#define EXTI_IMR1_IM9 EXTI_IMR1_IM9_Msk /*!< CPU1 Interrupt Mask on line 9 */ +#define EXTI_IMR1_IM10_Pos (10U) +#define EXTI_IMR1_IM10_Msk (0x1UL << EXTI_IMR1_IM10_Pos) /*!< 0x00000400 */ +#define EXTI_IMR1_IM10 EXTI_IMR1_IM10_Msk /*!< CPU1 Interrupt Mask on line 10 */ +#define EXTI_IMR1_IM11_Pos (11U) +#define EXTI_IMR1_IM11_Msk (0x1UL << EXTI_IMR1_IM11_Pos) /*!< 0x00000800 */ +#define EXTI_IMR1_IM11 EXTI_IMR1_IM11_Msk /*!< CPU1 Interrupt Mask on line 11 */ +#define EXTI_IMR1_IM12_Pos (12U) +#define EXTI_IMR1_IM12_Msk (0x1UL << EXTI_IMR1_IM12_Pos) /*!< 0x00001000 */ +#define EXTI_IMR1_IM12 EXTI_IMR1_IM12_Msk /*!< CPU1 Interrupt Mask on line 12 */ +#define EXTI_IMR1_IM13_Pos (13U) +#define EXTI_IMR1_IM13_Msk (0x1UL << EXTI_IMR1_IM13_Pos) /*!< 0x00002000 */ +#define EXTI_IMR1_IM13 EXTI_IMR1_IM13_Msk /*!< CPU1 Interrupt Mask on line 13 */ +#define EXTI_IMR1_IM14_Pos (14U) +#define EXTI_IMR1_IM14_Msk (0x1UL << EXTI_IMR1_IM14_Pos) /*!< 0x00004000 */ +#define EXTI_IMR1_IM14 EXTI_IMR1_IM14_Msk /*!< CPU1 Interrupt Mask on line 14 */ +#define EXTI_IMR1_IM15_Pos (15U) +#define EXTI_IMR1_IM15_Msk (0x1UL << EXTI_IMR1_IM15_Pos) /*!< 0x00008000 */ +#define EXTI_IMR1_IM15 EXTI_IMR1_IM15_Msk /*!< CPU1 Interrupt Mask on line 15 */ +#define EXTI_IMR1_IM16_Pos (16U) +#define EXTI_IMR1_IM16_Msk (0x1UL << EXTI_IMR1_IM16_Pos) /*!< 0x00010000 */ +#define EXTI_IMR1_IM16 EXTI_IMR1_IM16_Msk /*!< CPU1 Interrupt Mask on line 16 */ +#define EXTI_IMR1_IM17_Pos (17U) +#define EXTI_IMR1_IM17_Msk (0x1UL << EXTI_IMR1_IM17_Pos) /*!< 0x00020000 */ +#define EXTI_IMR1_IM17 EXTI_IMR1_IM17_Msk /*!< CPU1 Interrupt Mask on line 17 */ +#define EXTI_IMR1_IM18_Pos (18U) +#define EXTI_IMR1_IM18_Msk (0x1UL << EXTI_IMR1_IM18_Pos) /*!< 0x00040000 */ +#define EXTI_IMR1_IM18 EXTI_IMR1_IM18_Msk /*!< CPU1 Interrupt Mask on line 18 */ +#define EXTI_IMR1_IM19_Pos (19U) +#define EXTI_IMR1_IM19_Msk (0x1UL << EXTI_IMR1_IM19_Pos) /*!< 0x00080000 */ +#define EXTI_IMR1_IM19 EXTI_IMR1_IM19_Msk /*!< CPU1 Interrupt Mask on line 19 */ +#define EXTI_IMR1_IM20_Pos (20U) +#define EXTI_IMR1_IM20_Msk (0x1UL << EXTI_IMR1_IM20_Pos) /*!< 0x00100000 */ +#define EXTI_IMR1_IM20 EXTI_IMR1_IM20_Msk /*!< CPU1 Interrupt Mask on line 20 */ +#define EXTI_IMR1_IM21_Pos (21U) +#define EXTI_IMR1_IM21_Msk (0x1UL << EXTI_IMR1_IM21_Pos) /*!< 0x00200000 */ +#define EXTI_IMR1_IM21 EXTI_IMR1_IM21_Msk /*!< CPU1 Interrupt Mask on line 21 */ +#define EXTI_IMR1_IM22_Pos (22U) +#define EXTI_IMR1_IM22_Msk (0x1UL << EXTI_IMR1_IM22_Pos) /*!< 0x00400000 */ +#define EXTI_IMR1_IM22 EXTI_IMR1_IM22_Msk /*!< CPU1 Interrupt Mask on line 22 */ +#define EXTI_IMR1_IM23_Pos (23U) +#define EXTI_IMR1_IM23_Msk (0x1UL << EXTI_IMR1_IM23_Pos) /*!< 0x00800000 */ +#define EXTI_IMR1_IM23 EXTI_IMR1_IM23_Msk /*!< CPU1 Interrupt Mask on line 23 */ +#define EXTI_IMR1_IM24_Pos (24U) +#define EXTI_IMR1_IM24_Msk (0x1UL << EXTI_IMR1_IM24_Pos) /*!< 0x01000000 */ +#define EXTI_IMR1_IM24 EXTI_IMR1_IM24_Msk /*!< CPU1 Interrupt Mask on line 24 */ +#define EXTI_IMR1_IM25_Pos (25U) +#define EXTI_IMR1_IM25_Msk (0x1UL << EXTI_IMR1_IM25_Pos) /*!< 0x02000000 */ +#define EXTI_IMR1_IM25 EXTI_IMR1_IM25_Msk /*!< CPU1 Interrupt Mask on line 25 */ +#define EXTI_IMR1_IM28_Pos (28U) +#define EXTI_IMR1_IM28_Msk (0x1UL << EXTI_IMR1_IM28_Pos) /*!< 0x10000000 */ +#define EXTI_IMR1_IM28 EXTI_IMR1_IM28_Msk /*!< CPU1 Interrupt Mask on line 28 */ +#define EXTI_IMR1_IM29_Pos (29U) +#define EXTI_IMR1_IM29_Msk (0x1UL << EXTI_IMR1_IM29_Pos) /*!< 0x20000000 */ +#define EXTI_IMR1_IM29 EXTI_IMR1_IM29_Msk /*!< CPU1 Interrupt Mask on line 29 */ +#define EXTI_IMR1_IM30_Pos (30U) +#define EXTI_IMR1_IM30_Msk (0x1UL << EXTI_IMR1_IM30_Pos) /*!< 0x40000000 */ +#define EXTI_IMR1_IM30 EXTI_IMR1_IM30_Msk /*!< CPU1 Interrupt Mask on line 30 */ +#define EXTI_IMR1_IM31_Pos (31U) +#define EXTI_IMR1_IM31_Msk (0x1UL << EXTI_IMR1_IM31_Pos) /*!< 0x80000000 */ +#define EXTI_IMR1_IM31 EXTI_IMR1_IM31_Msk /*!< CPU1 Interrupt Mask on line 31 */ + +/******************** Bits definition for EXTI_EMR1 register ****************/ +#define EXTI_EMR1_Pos (0U) +#define EXTI_EMR1_Msk (0x003EFFFFUL << EXTI_EMR1_Pos) /*!< 0xFFFFFFFF */ +#define EXTI_EMR1_EM EXTI_EMR1_Msk /*!< CPU1 Event Mask */ +#define EXTI_EMR1_EM0_Pos (0U) +#define EXTI_EMR1_EM0_Msk (0x1UL << EXTI_EMR1_EM0_Pos) /*!< 0x00000001 */ +#define EXTI_EMR1_EM0 EXTI_EMR1_EM0_Msk /*!< CPU1 Event Mask on line 0 */ +#define EXTI_EMR1_EM1_Pos (1U) +#define EXTI_EMR1_EM1_Msk (0x1UL << EXTI_EMR1_EM1_Pos) /*!< 0x00000002 */ +#define EXTI_EMR1_EM1 EXTI_EMR1_EM1_Msk /*!< CPU1 Event Mask on line 1 */ +#define EXTI_EMR1_EM2_Pos (2U) +#define EXTI_EMR1_EM2_Msk (0x1UL << EXTI_EMR1_EM2_Pos) /*!< 0x00000004 */ +#define EXTI_EMR1_EM2 EXTI_EMR1_EM2_Msk /*!< CPU1 Event Mask on line 2 */ +#define EXTI_EMR1_EM3_Pos (3U) +#define EXTI_EMR1_EM3_Msk (0x1UL << EXTI_EMR1_EM3_Pos) /*!< 0x00000008 */ +#define EXTI_EMR1_EM3 EXTI_EMR1_EM3_Msk /*!< CPU1 Event Mask on line 3 */ +#define EXTI_EMR1_EM4_Pos (4U) +#define EXTI_EMR1_EM4_Msk (0x1UL << EXTI_EMR1_EM4_Pos) /*!< 0x00000010 */ +#define EXTI_EMR1_EM4 EXTI_EMR1_EM4_Msk /*!< CPU1 Event Mask on line 4 */ +#define EXTI_EMR1_EM5_Pos (5U) +#define EXTI_EMR1_EM5_Msk (0x1UL << EXTI_EMR1_EM5_Pos) /*!< 0x00000020 */ +#define EXTI_EMR1_EM5 EXTI_EMR1_EM5_Msk /*!< CPU1 Event Mask on line 5 */ +#define EXTI_EMR1_EM6_Pos (6U) +#define EXTI_EMR1_EM6_Msk (0x1UL << EXTI_EMR1_EM6_Pos) /*!< 0x00000040 */ +#define EXTI_EMR1_EM6 EXTI_EMR1_EM6_Msk /*!< CPU1 Event Mask on line 6 */ +#define EXTI_EMR1_EM7_Pos (7U) +#define EXTI_EMR1_EM7_Msk (0x1UL << EXTI_EMR1_EM7_Pos) /*!< 0x00000080 */ +#define EXTI_EMR1_EM7 EXTI_EMR1_EM7_Msk /*!< CPU1 Event Mask on line 7 */ +#define EXTI_EMR1_EM8_Pos (8U) +#define EXTI_EMR1_EM8_Msk (0x1UL << EXTI_EMR1_EM8_Pos) /*!< 0x00000100 */ +#define EXTI_EMR1_EM8 EXTI_EMR1_EM8_Msk /*!< CPU1 Event Mask on line 8 */ +#define EXTI_EMR1_EM9_Pos (9U) +#define EXTI_EMR1_EM9_Msk (0x1UL << EXTI_EMR1_EM9_Pos) /*!< 0x00000200 */ +#define EXTI_EMR1_EM9 EXTI_EMR1_EM9_Msk /*!< CPU1 Event Mask on line 9 */ +#define EXTI_EMR1_EM10_Pos (10U) +#define EXTI_EMR1_EM10_Msk (0x1UL << EXTI_EMR1_EM10_Pos) /*!< 0x00000400 */ +#define EXTI_EMR1_EM10 EXTI_EMR1_EM10_Msk /*!< CPU1 Event Mask on line 10 */ +#define EXTI_EMR1_EM11_Pos (11U) +#define EXTI_EMR1_EM11_Msk (0x1UL << EXTI_EMR1_EM11_Pos) /*!< 0x00000800 */ +#define EXTI_EMR1_EM11 EXTI_EMR1_EM11_Msk /*!< CPU1 Event Mask on line 11 */ +#define EXTI_EMR1_EM12_Pos (12U) +#define EXTI_EMR1_EM12_Msk (0x1UL << EXTI_EMR1_EM12_Pos) /*!< 0x00001000 */ +#define EXTI_EMR1_EM12 EXTI_EMR1_EM12_Msk /*!< CPU1 Event Mask on line 12 */ +#define EXTI_EMR1_EM13_Pos (13U) +#define EXTI_EMR1_EM13_Msk (0x1UL << EXTI_EMR1_EM13_Pos) /*!< 0x00002000 */ +#define EXTI_EMR1_EM13 EXTI_EMR1_EM13_Msk /*!< CPU1 Event Mask on line 13 */ +#define EXTI_EMR1_EM14_Pos (14U) +#define EXTI_EMR1_EM14_Msk (0x1UL << EXTI_EMR1_EM14_Pos) /*!< 0x00004000 */ +#define EXTI_EMR1_EM14 EXTI_EMR1_EM14_Msk /*!< CPU1 Event Mask on line 14 */ +#define EXTI_EMR1_EM15_Pos (15U) +#define EXTI_EMR1_EM15_Msk (0x1UL << EXTI_EMR1_EM15_Pos) /*!< 0x00008000 */ +#define EXTI_EMR1_EM15 EXTI_EMR1_EM15_Msk /*!< CPU1 Event Mask on line 15 */ +#define EXTI_EMR1_EM17_Pos (17U) +#define EXTI_EMR1_EM17_Msk (0x1UL << EXTI_EMR1_EM17_Pos) /*!< 0x00020000 */ +#define EXTI_EMR1_EM17 EXTI_EMR1_EM17_Msk /*!< CPU1 Event Mask on line 17 */ +#define EXTI_EMR1_EM18_Pos (18U) +#define EXTI_EMR1_EM18_Msk (0x1UL << EXTI_EMR1_EM18_Pos) /*!< 0x00040000 */ +#define EXTI_EMR1_EM18 EXTI_EMR1_EM18_Msk /*!< CPU1 Event Mask on line 18 */ +#define EXTI_EMR1_EM19_Pos (19U) +#define EXTI_EMR1_EM19_Msk (0x1UL << EXTI_EMR1_EM19_Pos) /*!< 0x00080000 */ +#define EXTI_EMR1_EM19 EXTI_EMR1_EM19_Msk /*!< CPU1 Event Mask on line 19 */ +#define EXTI_EMR1_EM20_Pos (20U) +#define EXTI_EMR1_EM20_Msk (0x1UL << EXTI_EMR1_EM20_Pos) /*!< 0x00100000 */ +#define EXTI_EMR1_EM20 EXTI_EMR1_EM20_Msk /*!< CPU1 Event Mask on line 20 */ +#define EXTI_EMR1_EM21_Pos (21U) +#define EXTI_EMR1_EM21_Msk (0x1UL << EXTI_EMR1_EM21_Pos) /*!< 0x00200000 */ +#define EXTI_EMR1_EM21 EXTI_EMR1_EM21_Msk /*!< CPU1 Event Mask on line 21 */ + +/******************** Bits definition for EXTI_IMR2 register ****************/ +#define EXTI_IMR2_Pos (0U) +#define EXTI_IMR2_Msk (0x0001FFFFUL << EXTI_IMR2_Pos) /*!< 0x0001FFFF */ +#define EXTI_IMR2_IM EXTI_IMR2_Msk /*!< CPU1 Interrupt Mask */ +#define EXTI_IMR2_IM33_Pos (1U) +#define EXTI_IMR2_IM33_Msk (0x1UL << EXTI_IMR2_IM33_Pos) /*!< 0x00000002 */ +#define EXTI_IMR2_IM33 EXTI_IMR2_IM33_Msk /*!< CPU1 Interrupt Mask on line 33 */ +#define EXTI_IMR2_IM36_Pos (4U) +#define EXTI_IMR2_IM36_Msk (0x1UL << EXTI_IMR2_IM36_Pos) /*!< 0x00000010 */ +#define EXTI_IMR2_IM36 EXTI_IMR2_IM36_Msk /*!< CPU1 Interrupt Mask on line 36 */ +#define EXTI_IMR2_IM37_Pos (5U) +#define EXTI_IMR2_IM37_Msk (0x1UL << EXTI_IMR2_IM37_Pos) /*!< 0x00000020 */ +#define EXTI_IMR2_IM37 EXTI_IMR2_IM37_Msk /*!< CPU1 Interrupt Mask on line 37 */ +#define EXTI_IMR2_IM38_Pos (6U) +#define EXTI_IMR2_IM38_Msk (0x1UL << EXTI_IMR2_IM38_Pos) /*!< 0x00000040 */ +#define EXTI_IMR2_IM38 EXTI_IMR2_IM38_Msk /*!< CPU1 Interrupt Mask on line 38 */ +#define EXTI_IMR2_IM39_Pos (7U) +#define EXTI_IMR2_IM39_Msk (0x1UL << EXTI_IMR2_IM39_Pos) /*!< 0x00000080 */ +#define EXTI_IMR2_IM39 EXTI_IMR2_IM39_Msk /*!< CPU1 Interrupt Mask on line 39 */ +#define EXTI_IMR2_IM40_Pos (8U) +#define EXTI_IMR2_IM40_Msk (0x1UL << EXTI_IMR2_IM40_Pos) /*!< 0x00000100 */ +#define EXTI_IMR2_IM40 EXTI_IMR2_IM40_Msk /*!< CPU1 Interrupt Mask on line 40 */ +#define EXTI_IMR2_IM41_Pos (9U) +#define EXTI_IMR2_IM41_Msk (0x1UL << EXTI_IMR2_IM41_Pos) /*!< 0x00000200 */ +#define EXTI_IMR2_IM41 EXTI_IMR2_IM41_Msk /*!< CPU1 Interrupt Mask on line 41 */ +#define EXTI_IMR2_IM42_Pos (10U) +#define EXTI_IMR2_IM42_Msk (0x1UL << EXTI_IMR2_IM42_Pos) /*!< 0x00000400 */ +#define EXTI_IMR2_IM42 EXTI_IMR2_IM42_Msk /*!< CPU1 Interrupt Mask on line 42 */ +#define EXTI_IMR2_IM43_Pos (11U) +#define EXTI_IMR2_IM43_Msk (0x1UL << EXTI_IMR2_IM43_Pos) /*!< 0x00000800 */ +#define EXTI_IMR2_IM43 EXTI_IMR2_IM43_Msk /*!< CPU1 Interrupt Mask on line 43 */ +#define EXTI_IMR2_IM44_Pos (12U) +#define EXTI_IMR2_IM44_Msk (0x1UL << EXTI_IMR2_IM44_Pos) /*!< 0x00001000 */ +#define EXTI_IMR2_IM44 EXTI_IMR2_IM44_Msk /*!< CPU1 Interrupt Mask on line 44 */ +#define EXTI_IMR2_IM45_Pos (13U) +#define EXTI_IMR2_IM45_Msk (0x1UL << EXTI_IMR2_IM45_Pos) /*!< 0x00002000 */ +#define EXTI_IMR2_IM45 EXTI_IMR2_IM45_Msk /*!< CPU1 Interrupt Mask on line 45 */ +#define EXTI_IMR2_IM46_Pos (14U) +#define EXTI_IMR2_IM46_Msk (0x1UL << EXTI_IMR2_IM46_Pos) /*!< 0x00004000 */ +#define EXTI_IMR2_IM46 EXTI_IMR2_IM46_Msk /*!< CPU1 Interrupt Mask on line 46 */ +#define EXTI_IMR2_IM48_Pos (16U) +#define EXTI_IMR2_IM48_Msk (0x1UL << EXTI_IMR2_IM48_Pos) /*!< 0x00010000 */ +#define EXTI_IMR2_IM48 EXTI_IMR2_IM48_Msk /*!< CPU1 Interrupt Mask on line 48 */ + +/******************** Bits definition for EXTI_EMR2 register ****************/ +#define EXTI_EMR2_Pos (0U) +#define EXTI_EMR2_Msk (0x00000300UL << EXTI_EMR2_Pos) /*!< 0x000003000 */ +#define EXTI_EMR2_EM EXTI_EMR2_Msk /*!< CPU1 Interrupt Mask */ +#define EXTI_EMR2_EM40_Pos (8U) +#define EXTI_EMR2_EM40_Msk (0x1UL << EXTI_EMR2_EM40_Pos) /*!< 0x00000100 */ +#define EXTI_EMR2_EM40 EXTI_EMR2_EM40_Msk /*!< CPU1 Event Mask on line 40 */ +#define EXTI_EMR2_EM41_Pos (9U) +#define EXTI_EMR2_EM41_Msk (0x1UL << EXTI_EMR2_EM41_Pos) /*!< 0x00000200 */ +#define EXTI_EMR2_EM41 EXTI_EMR2_EM41_Msk /*!< CPU1 Event Mask on line 41 */ + +/******************** Bits definition for EXTI_C2IMR1 register **************/ +#define EXTI_C2IMR1_Pos (0U) +#define EXTI_C2IMR1_Msk (0xFFFFFFFFUL << EXTI_C2IMR1_Pos) /*!< 0xFFFFFFFF */ +#define EXTI_C2IMR1_IM EXTI_C2IMR1_Msk /*!< CPU2 wakeup with interrupt Mask on Event */ +#define EXTI_C2IMR1_IM0_Pos (0U) +#define EXTI_C2IMR1_IM0_Msk (0x1UL << EXTI_C2IMR1_IM0_Pos) /*!< 0x00000001 */ +#define EXTI_C2IMR1_IM0 EXTI_C2IMR1_IM0_Msk /*!< CPU2 Interrupt Mask on line 0 */ +#define EXTI_C2IMR1_IM1_Pos (1U) +#define EXTI_C2IMR1_IM1_Msk (0x1UL << EXTI_C2IMR1_IM1_Pos) /*!< 0x00000002 */ +#define EXTI_C2IMR1_IM1 EXTI_C2IMR1_IM1_Msk /*!< CPU2 Interrupt Mask on line 1 */ +#define EXTI_C2IMR1_IM2_Pos (2U) +#define EXTI_C2IMR1_IM2_Msk (0x1UL << EXTI_C2IMR1_IM2_Pos) /*!< 0x00000004 */ +#define EXTI_C2IMR1_IM2 EXTI_C2IMR1_IM2_Msk /*!< CPU2 Interrupt Mask on line 2 */ +#define EXTI_C2IMR1_IM3_Pos (3U) +#define EXTI_C2IMR1_IM3_Msk (0x1UL << EXTI_C2IMR1_IM3_Pos) /*!< 0x00000008 */ +#define EXTI_C2IMR1_IM3 EXTI_C2IMR1_IM3_Msk /*!< CPU2 Interrupt Mask on line 3 */ +#define EXTI_C2IMR1_IM4_Pos (4U) +#define EXTI_C2IMR1_IM4_Msk (0x1UL << EXTI_C2IMR1_IM4_Pos) /*!< 0x00000010 */ +#define EXTI_C2IMR1_IM4 EXTI_C2IMR1_IM4_Msk /*!< CPU2 Interrupt Mask on line 4 */ +#define EXTI_C2IMR1_IM5_Pos (5U) +#define EXTI_C2IMR1_IM5_Msk (0x1UL << EXTI_C2IMR1_IM5_Pos) /*!< 0x00000020 */ +#define EXTI_C2IMR1_IM5 EXTI_C2IMR1_IM5_Msk /*!< CPU2 Interrupt Mask on line 5 */ +#define EXTI_C2IMR1_IM6_Pos (6U) +#define EXTI_C2IMR1_IM6_Msk (0x1UL << EXTI_C2IMR1_IM6_Pos) /*!< 0x00000040 */ +#define EXTI_C2IMR1_IM6 EXTI_C2IMR1_IM6_Msk /*!< CPU2 Interrupt Mask on line 6 */ +#define EXTI_C2IMR1_IM7_Pos (7U) +#define EXTI_C2IMR1_IM7_Msk (0x1UL << EXTI_C2IMR1_IM7_Pos) /*!< 0x00000080 */ +#define EXTI_C2IMR1_IM7 EXTI_C2IMR1_IM7_Msk /*!< CPU2 Interrupt Mask on line 7 */ +#define EXTI_C2IMR1_IM8_Pos (8U) +#define EXTI_C2IMR1_IM8_Msk (0x1UL << EXTI_C2IMR1_IM8_Pos) /*!< 0x00000100 */ +#define EXTI_C2IMR1_IM8 EXTI_C2IMR1_IM8_Msk /*!< CPU2 Interrupt Mask on line 8 */ +#define EXTI_C2IMR1_IM9_Pos (9U) +#define EXTI_C2IMR1_IM9_Msk (0x1UL << EXTI_C2IMR1_IM9_Pos) /*!< 0x00000200 */ +#define EXTI_C2IMR1_IM9 EXTI_C2IMR1_IM9_Msk /*!< CPU2 Interrupt Mask on line 9 */ +#define EXTI_C2IMR1_IM10_Pos (10U) +#define EXTI_C2IMR1_IM10_Msk (0x1UL << EXTI_C2IMR1_IM10_Pos) /*!< 0x00000400 */ +#define EXTI_C2IMR1_IM10 EXTI_C2IMR1_IM10_Msk /*!< CPU2 Interrupt Mask on line 10 */ +#define EXTI_C2IMR1_IM11_Pos (11U) +#define EXTI_C2IMR1_IM11_Msk (0x1UL << EXTI_C2IMR1_IM11_Pos) /*!< 0x00000800 */ +#define EXTI_C2IMR1_IM11 EXTI_C2IMR1_IM11_Msk /*!< CPU2 Interrupt Mask on line 11 */ +#define EXTI_C2IMR1_IM12_Pos (12U) +#define EXTI_C2IMR1_IM12_Msk (0x1UL << EXTI_C2IMR1_IM12_Pos) /*!< 0x00001000 */ +#define EXTI_C2IMR1_IM12 EXTI_C2IMR1_IM12_Msk /*!< CPU2 Interrupt Mask on line 12 */ +#define EXTI_C2IMR1_IM13_Pos (13U) +#define EXTI_C2IMR1_IM13_Msk (0x1UL << EXTI_C2IMR1_IM13_Pos) /*!< 0x00002000 */ +#define EXTI_C2IMR1_IM13 EXTI_C2IMR1_IM13_Msk /*!< CPU2 Interrupt Mask on line 13 */ +#define EXTI_C2IMR1_IM14_Pos (14U) +#define EXTI_C2IMR1_IM14_Msk (0x1UL << EXTI_C2IMR1_IM14_Pos) /*!< 0x00004000 */ +#define EXTI_C2IMR1_IM14 EXTI_C2IMR1_IM14_Msk /*!< CPU2 Interrupt Mask on line 14 */ +#define EXTI_C2IMR1_IM15_Pos (15U) +#define EXTI_C2IMR1_IM15_Msk (0x1UL << EXTI_C2IMR1_IM15_Pos) /*!< 0x00008000 */ +#define EXTI_C2IMR1_IM15 EXTI_C2IMR1_IM15_Msk /*!< CPU2 Interrupt Mask on line 15 */ +#define EXTI_C2IMR1_IM16_Pos (16U) +#define EXTI_C2IMR1_IM16_Msk (0x1UL << EXTI_C2IMR1_IM16_Pos) /*!< 0x00010000 */ +#define EXTI_C2IMR1_IM16 EXTI_C2IMR1_IM16_Msk /*!< CPU2 Interrupt Mask on line 16 */ +#define EXTI_C2IMR1_IM17_Pos (17U) +#define EXTI_C2IMR1_IM17_Msk (0x1UL << EXTI_C2IMR1_IM17_Pos) /*!< 0x00020000 */ +#define EXTI_C2IMR1_IM17 EXTI_C2IMR1_IM17_Msk /*!< CPU2 Interrupt Mask on line 17 */ +#define EXTI_C2IMR1_IM18_Pos (18U) +#define EXTI_C2IMR1_IM18_Msk (0x1UL << EXTI_C2IMR1_IM18_Pos) /*!< 0x00040000 */ +#define EXTI_C2IMR1_IM18 EXTI_C2IMR1_IM18_Msk /*!< CPU2 Interrupt Mask on line 18 */ +#define EXTI_C2IMR1_IM19_Pos (19U) +#define EXTI_C2IMR1_IM19_Msk (0x1UL << EXTI_C2IMR1_IM19_Pos) /*!< 0x00080000 */ +#define EXTI_C2IMR1_IM19 EXTI_C2IMR1_IM19_Msk /*!< CPU2 Interrupt Mask on line 19 */ +#define EXTI_C2IMR1_IM20_Pos (20U) +#define EXTI_C2IMR1_IM20_Msk (0x1UL << EXTI_C2IMR1_IM20_Pos) /*!< 0x00100000 */ +#define EXTI_C2IMR1_IM20 EXTI_C2IMR1_IM20_Msk /*!< CPU2 Interrupt Mask on line 20 */ +#define EXTI_C2IMR1_IM21_Pos (21U) +#define EXTI_C2IMR1_IM21_Msk (0x1UL << EXTI_C2IMR1_IM21_Pos) /*!< 0x00200000 */ +#define EXTI_C2IMR1_IM21 EXTI_C2IMR1_IM21_Msk /*!< CPU2 Interrupt Mask on line 21 */ +#define EXTI_C2IMR1_IM22_Pos (22U) +#define EXTI_C2IMR1_IM22_Msk (0x1UL << EXTI_C2IMR1_IM22_Pos) /*!< 0x00400000 */ +#define EXTI_C2IMR1_IM22 EXTI_C2IMR1_IM22_Msk /*!< CPU2 Interrupt Mask on line 22 */ +#define EXTI_C2IMR1_IM23_Pos (23U) +#define EXTI_C2IMR1_IM23_Msk (0x1UL << EXTI_C2IMR1_IM23_Pos) /*!< 0x00800000 */ +#define EXTI_C2IMR1_IM23 EXTI_C2IMR1_IM23_Msk /*!< CPU2 Interrupt Mask on line 23 */ +#define EXTI_C2IMR1_IM24_Pos (24U) +#define EXTI_C2IMR1_IM24_Msk (0x1UL << EXTI_C2IMR1_IM24_Pos) /*!< 0x01000000 */ +#define EXTI_C2IMR1_IM24 EXTI_C2IMR1_IM24_Msk /*!< CPU2 Interrupt Mask on line 24 */ +#define EXTI_C2IMR1_IM25_Pos (25U) +#define EXTI_C2IMR1_IM25_Msk (0x1UL << EXTI_C2IMR1_IM25_Pos) /*!< 0x02000000 */ +#define EXTI_C2IMR1_IM25 EXTI_C2IMR1_IM25_Msk /*!< CPU2 Interrupt Mask on line 25 */ +#define EXTI_C2IMR1_IM28_Pos (28U) +#define EXTI_C2IMR1_IM28_Msk (0x1UL << EXTI_C2IMR1_IM28_Pos) /*!< 0x10000000 */ +#define EXTI_C2IMR1_IM28 EXTI_C2IMR1_IM28_Msk /*!< CPU2 Interrupt Mask on line 28 */ +#define EXTI_C2IMR1_IM29_Pos (29U) +#define EXTI_C2IMR1_IM29_Msk (0x1UL << EXTI_C2IMR1_IM29_Pos) /*!< 0x20000000 */ +#define EXTI_C2IMR1_IM29 EXTI_C2IMR1_IM29_Msk /*!< CPU2 Interrupt Mask on line 29 */ +#define EXTI_C2IMR1_IM30_Pos (30U) +#define EXTI_C2IMR1_IM30_Msk (0x1UL << EXTI_C2IMR1_IM30_Pos) /*!< 0x40000000 */ +#define EXTI_C2IMR1_IM30 EXTI_C2IMR1_IM30_Msk /*!< CPU2 Interrupt Mask on line 30 */ +#define EXTI_C2IMR1_IM31_Pos (31U) +#define EXTI_C2IMR1_IM31_Msk (0x1UL << EXTI_C2IMR1_IM31_Pos) /*!< 0x80000000 */ +#define EXTI_C2IMR1_IM31 EXTI_C2IMR1_IM31_Msk /*!< CPU2 Interrupt Mask on line 31 */ + +/******************** Bits definition for EXTI_C2EMR1 register **************/ +#define EXTI_C2EMR1_Pos (0U) +#define EXTI_C2EMR1_Msk (0x003EFFFFUL << EXTI_C2EMR1_Pos) /*!< 0xFFFFFFFF */ +#define EXTI_C2EMR1_EM EXTI_C2EMR1_Msk /*!< CPU2 Event Mask */ +#define EXTI_C2EMR1_EM0_Pos (0U) +#define EXTI_C2EMR1_EM0_Msk (0x1UL << EXTI_C2EMR1_EM0_Pos) /*!< 0x00000001 */ +#define EXTI_C2EMR1_EM0 EXTI_C2EMR1_EM0_Msk /*!< CPU2 Event Mask on line 0 */ +#define EXTI_C2EMR1_EM1_Pos (1U) +#define EXTI_C2EMR1_EM1_Msk (0x1UL << EXTI_C2EMR1_EM1_Pos) /*!< 0x00000002 */ +#define EXTI_C2EMR1_EM1 EXTI_C2EMR1_EM1_Msk /*!< CPU2 Event Mask on line 1 */ +#define EXTI_C2EMR1_EM2_Pos (2U) +#define EXTI_C2EMR1_EM2_Msk (0x1UL << EXTI_C2EMR1_EM2_Pos) /*!< 0x00000004 */ +#define EXTI_C2EMR1_EM2 EXTI_C2EMR1_EM2_Msk /*!< CPU2 Event Mask on line 2 */ +#define EXTI_C2EMR1_EM3_Pos (3U) +#define EXTI_C2EMR1_EM3_Msk (0x1UL << EXTI_C2EMR1_EM3_Pos) /*!< 0x00000008 */ +#define EXTI_C2EMR1_EM3 EXTI_C2EMR1_EM3_Msk /*!< CPU2 Event Mask on line 3 */ +#define EXTI_C2EMR1_EM4_Pos (4U) +#define EXTI_C2EMR1_EM4_Msk (0x1UL << EXTI_C2EMR1_EM4_Pos) /*!< 0x00000010 */ +#define EXTI_C2EMR1_EM4 EXTI_C2EMR1_EM4_Msk /*!< CPU2 Event Mask on line 4 */ +#define EXTI_C2EMR1_EM5_Pos (5U) +#define EXTI_C2EMR1_EM5_Msk (0x1UL << EXTI_C2EMR1_EM5_Pos) /*!< 0x00000020 */ +#define EXTI_C2EMR1_EM5 EXTI_C2EMR1_EM5_Msk /*!< CPU2 Event Mask on line 5 */ +#define EXTI_C2EMR1_EM6_Pos (6U) +#define EXTI_C2EMR1_EM6_Msk (0x1UL << EXTI_C2EMR1_EM6_Pos) /*!< 0x00000040 */ +#define EXTI_C2EMR1_EM6 EXTI_C2EMR1_EM6_Msk /*!< CPU2 Event Mask on line 6 */ +#define EXTI_C2EMR1_EM7_Pos (7U) +#define EXTI_C2EMR1_EM7_Msk (0x1UL << EXTI_C2EMR1_EM7_Pos) /*!< 0x00000080 */ +#define EXTI_C2EMR1_EM7 EXTI_C2EMR1_EM7_Msk /*!< CPU2 Event Mask on line 7 */ +#define EXTI_C2EMR1_EM8_Pos (8U) +#define EXTI_C2EMR1_EM8_Msk (0x1UL << EXTI_C2EMR1_EM8_Pos) /*!< 0x00000100 */ +#define EXTI_C2EMR1_EM8 EXTI_C2EMR1_EM8_Msk /*!< CPU2 Event Mask on line 8 */ +#define EXTI_C2EMR1_EM9_Pos (9U) +#define EXTI_C2EMR1_EM9_Msk (0x1UL << EXTI_C2EMR1_EM9_Pos) /*!< 0x00000200 */ +#define EXTI_C2EMR1_EM9 EXTI_C2EMR1_EM9_Msk /*!< CPU2 Event Mask on line 9 */ +#define EXTI_C2EMR1_EM10_Pos (10U) +#define EXTI_C2EMR1_EM10_Msk (0x1UL << EXTI_C2EMR1_EM10_Pos) /*!< 0x00000400 */ +#define EXTI_C2EMR1_EM10 EXTI_C2EMR1_EM10_Msk /*!< CPU2 Event Mask on line 10 */ +#define EXTI_C2EMR1_EM11_Pos (11U) +#define EXTI_C2EMR1_EM11_Msk (0x1UL << EXTI_C2EMR1_EM11_Pos) /*!< 0x00000800 */ +#define EXTI_C2EMR1_EM11 EXTI_C2EMR1_EM11_Msk /*!< CPU2 Event Mask on line 11 */ +#define EXTI_C2EMR1_EM12_Pos (12U) +#define EXTI_C2EMR1_EM12_Msk (0x1UL << EXTI_C2EMR1_EM12_Pos) /*!< 0x00001000 */ +#define EXTI_C2EMR1_EM12 EXTI_C2EMR1_EM12_Msk /*!< CPU2 Event Mask on line 12 */ +#define EXTI_C2EMR1_EM13_Pos (13U) +#define EXTI_C2EMR1_EM13_Msk (0x1UL << EXTI_C2EMR1_EM13_Pos) /*!< 0x00002000 */ +#define EXTI_C2EMR1_EM13 EXTI_C2EMR1_EM13_Msk /*!< CPU2 Event Mask on line 13 */ +#define EXTI_C2EMR1_EM14_Pos (14U) +#define EXTI_C2EMR1_EM14_Msk (0x1UL << EXTI_C2EMR1_EM14_Pos) /*!< 0x00004000 */ +#define EXTI_C2EMR1_EM14 EXTI_C2EMR1_EM14_Msk /*!< CPU2 Event Mask on line 14 */ +#define EXTI_C2EMR1_EM15_Pos (15U) +#define EXTI_C2EMR1_EM15_Msk (0x1UL << EXTI_C2EMR1_EM15_Pos) /*!< 0x00008000 */ +#define EXTI_C2EMR1_EM15 EXTI_C2EMR1_EM15_Msk /*!< CPU2 Event Mask on line 15 */ +#define EXTI_C2EMR1_EM17_Pos (17U) +#define EXTI_C2EMR1_EM17_Msk (0x1UL << EXTI_C2EMR1_EM17_Pos) /*!< 0x00020000 */ +#define EXTI_C2EMR1_EM17 EXTI_C2EMR1_EM17_Msk /*!< CPU2 Event Mask on line 17 */ +#define EXTI_C2EMR1_EM18_Pos (18U) +#define EXTI_C2EMR1_EM18_Msk (0x1UL << EXTI_C2EMR1_EM18_Pos) /*!< 0x00040000 */ +#define EXTI_C2EMR1_EM18 EXTI_C2EMR1_EM18_Msk /*!< CPU2 Event Mask on line 18 */ +#define EXTI_C2EMR1_EM19_Pos (19U) +#define EXTI_C2EMR1_EM19_Msk (0x1UL << EXTI_C2EMR1_EM19_Pos) /*!< 0x00080000 */ +#define EXTI_C2EMR1_EM19 EXTI_C2EMR1_EM19_Msk /*!< CPU2 Event Mask on line 19 */ +#define EXTI_C2EMR1_EM20_Pos (20U) +#define EXTI_C2EMR1_EM20_Msk (0x1UL << EXTI_C2EMR1_EM20_Pos) /*!< 0x00100000 */ +#define EXTI_C2EMR1_EM20 EXTI_C2EMR1_EM20_Msk /*!< CPU2 Event Mask on line 20 */ +#define EXTI_C2EMR1_EM21_Pos (21U) +#define EXTI_C2EMR1_EM21_Msk (0x1UL << EXTI_C2EMR1_EM21_Pos) /*!< 0x00200000 */ +#define EXTI_C2EMR1_EM21 EXTI_C2EMR1_EM21_Msk /*!< CPU2 Event Mask on line 21 */ + +/******************** Bits definition for EXTI_C2IMR2 register **************/ +#define EXTI_C2IMR2_Pos (0U) +#define EXTI_C2IMR2_Msk (0x0001FFFFUL << EXTI_C2IMR2_Pos) /*!< 0x0001FFFF */ +#define EXTI_C2IMR2_IM EXTI_C2IMR2_Msk /*!< CPU2 Interrupt Mask */ +#define EXTI_C2IMR2_IM33_Pos (1U) +#define EXTI_C2IMR2_IM33_Msk (0x1UL << EXTI_C2IMR2_IM33_Pos) /*!< 0x00000002 */ +#define EXTI_C2IMR2_IM33 EXTI_C2IMR2_IM33_Msk /*!< CPU2 Interrupt Mask on line 33 */ +#define EXTI_C2IMR2_IM36_Pos (4U) +#define EXTI_C2IMR2_IM36_Msk (0x1UL << EXTI_C2IMR2_IM36_Pos) /*!< 0x00000010 */ +#define EXTI_C2IMR2_IM36 EXTI_C2IMR2_IM36_Msk /*!< CPU2 Interrupt Mask on line 36 */ +#define EXTI_C2IMR2_IM37_Pos (5U) +#define EXTI_C2IMR2_IM37_Msk (0x1UL << EXTI_C2IMR2_IM37_Pos) /*!< 0x00000020 */ +#define EXTI_C2IMR2_IM37 EXTI_C2IMR2_IM37_Msk /*!< CPU2 Interrupt Mask on line 37 */ +#define EXTI_C2IMR2_IM38_Pos (6U) +#define EXTI_C2IMR2_IM38_Msk (0x1UL << EXTI_C2IMR2_IM38_Pos) /*!< 0x00000040 */ +#define EXTI_C2IMR2_IM38 EXTI_C2IMR2_IM38_Msk /*!< CPU2 Interrupt Mask on line 38 */ +#define EXTI_C2IMR2_IM39_Pos (7U) +#define EXTI_C2IMR2_IM39_Msk (0x1UL << EXTI_C2IMR2_IM39_Pos) /*!< 0x00000080 */ +#define EXTI_C2IMR2_IM39 EXTI_C2IMR2_IM39_Msk /*!< CPU2 Interrupt Mask on line 39 */ +#define EXTI_C2IMR2_IM40_Pos (8U) +#define EXTI_C2IMR2_IM40_Msk (0x1UL << EXTI_C2IMR2_IM40_Pos) /*!< 0x00000100 */ +#define EXTI_C2IMR2_IM40 EXTI_C2IMR2_IM40_Msk /*!< CPU2 Interrupt Mask on line 40 */ +#define EXTI_C2IMR2_IM41_Pos (9U) +#define EXTI_C2IMR2_IM41_Msk (0x1UL << EXTI_C2IMR2_IM41_Pos) /*!< 0x00000200 */ +#define EXTI_C2IMR2_IM41 EXTI_C2IMR2_IM41_Msk /*!< CPU2 Interrupt Mask on line 41 */ +#define EXTI_C2IMR2_IM42_Pos (10U) +#define EXTI_C2IMR2_IM42_Msk (0x1UL << EXTI_C2IMR2_IM42_Pos) /*!< 0x00000400 */ +#define EXTI_C2IMR2_IM42 EXTI_C2IMR2_IM42_Msk /*!< CPU2 Interrupt Mask on line 42 */ +#define EXTI_C2IMR2_IM43_Pos (11U) +#define EXTI_C2IMR2_IM43_Msk (0x1UL << EXTI_C2IMR2_IM43_Pos) /*!< 0x00000800 */ +#define EXTI_C2IMR2_IM43 EXTI_C2IMR2_IM43_Msk /*!< CPU2 Interrupt Mask on line 43 */ +#define EXTI_C2IMR2_IM44_Pos (12U) +#define EXTI_C2IMR2_IM44_Msk (0x1UL << EXTI_C2IMR2_IM44_Pos) /*!< 0x00001000 */ +#define EXTI_C2IMR2_IM44 EXTI_C2IMR2_IM44_Msk /*!< CPU2 Interrupt Mask on line 44 */ +#define EXTI_C2IMR2_IM45_Pos (13U) +#define EXTI_C2IMR2_IM45_Msk (0x1UL << EXTI_C2IMR2_IM45_Pos) /*!< 0x00002000 */ +#define EXTI_C2IMR2_IM45 EXTI_C2IMR2_IM45_Msk /*!< CPU2 Interrupt Mask on line 45 */ +#define EXTI_C2IMR2_IM46_Pos (14U) +#define EXTI_C2IMR2_IM46_Msk (0x1UL << EXTI_C2IMR2_IM46_Pos) /*!< 0x00004000 */ +#define EXTI_C2IMR2_IM46 EXTI_C2IMR2_IM46_Msk /*!< CPU2 Interrupt Mask on line 46 */ +#define EXTI_C2IMR2_IM48_Pos (16U) +#define EXTI_C2IMR2_IM48_Msk (0x1UL << EXTI_C2IMR2_IM48_Pos) /*!< 0x00010000 */ +#define EXTI_C2IMR2_IM48 EXTI_C2IMR2_IM48_Msk /*!< CPU2 Interrupt Mask on line 48 */ + +/******************** Bits definition for EXTI_C2EMR2 register **************/ +#define EXTI_C2EMR2_Pos (8U) +#define EXTI_C2EMR2_Msk (0x00000300UL << EXTI_C2EMR2_Pos) /*!< 0x000003000 */ +#define EXTI_C2EMR2_EM EXTI_C2EMR2_Msk /*!< CPU2 Interrupt Mask */ +#define EXTI_C2EMR2_EM40_Pos (8U) +#define EXTI_C2EMR2_EM40_Msk (0x1UL << EXTI_C2EMR2_EM40_Pos) /*!< 0x00000100 */ +#define EXTI_C2EMR2_EM40 EXTI_C2EMR2_EM40_Msk /*!< CPU2 Event Mask on line 40 */ +#define EXTI_C2EMR2_EM41_Pos (9U) +#define EXTI_C2EMR2_EM41_Msk (0x1UL << EXTI_C2EMR2_EM41_Pos) /*!< 0x00000200 */ +#define EXTI_C2EMR2_EM41 EXTI_C2EMR2_EM41_Msk /*!< CPU2 Event Mask on line 41 */ + +/******************************************************************************/ +/* */ +/* Public Key Accelerator (PKA) */ +/* */ +/******************************************************************************/ + +/******************* Bits definition for PKA_CR register **************/ +#define PKA_CR_EN_Pos (0U) +#define PKA_CR_EN_Msk (0x1UL << PKA_CR_EN_Pos) /*!< 0x00000001 */ +#define PKA_CR_EN PKA_CR_EN_Msk /*!< PKA enable */ +#define PKA_CR_START_Pos (1U) +#define PKA_CR_START_Msk (0x1UL << PKA_CR_START_Pos) /*!< 0x00000002 */ +#define PKA_CR_START PKA_CR_START_Msk /*!< Start operation */ +#define PKA_CR_MODE_Pos (8U) +#define PKA_CR_MODE_Msk (0x3FUL << PKA_CR_MODE_Pos) /*!< 0x00003F00 */ +#define PKA_CR_MODE PKA_CR_MODE_Msk /*!< MODE[5:0] PKA operation code */ +#define PKA_CR_MODE_0 (0x01U << PKA_CR_MODE_Pos) /*!< 0x00000100 */ +#define PKA_CR_MODE_1 (0x02U << PKA_CR_MODE_Pos) /*!< 0x00000200 */ +#define PKA_CR_MODE_2 (0x04U << PKA_CR_MODE_Pos) /*!< 0x00000400 */ +#define PKA_CR_MODE_3 (0x08U << PKA_CR_MODE_Pos) /*!< 0x00000800 */ +#define PKA_CR_MODE_4 (0x10U << PKA_CR_MODE_Pos) /*!< 0x00001000 */ +#define PKA_CR_MODE_5 (0x20U << PKA_CR_MODE_Pos) /*!< 0x00002000 */ +#define PKA_CR_PROCENDIE_Pos (17U) +#define PKA_CR_PROCENDIE_Msk (0x1UL << PKA_CR_PROCENDIE_Pos) /*!< 0x00020000 */ +#define PKA_CR_PROCENDIE PKA_CR_PROCENDIE_Msk /*!< End of operation interrupt enable */ +#define PKA_CR_RAMERRIE_Pos (19U) +#define PKA_CR_RAMERRIE_Msk (0x1UL << PKA_CR_RAMERRIE_Pos) /*!< 0x00080000 */ +#define PKA_CR_RAMERRIE PKA_CR_RAMERRIE_Msk /*!< RAM error interrupt enable */ +#define PKA_CR_ADDRERRIE_Pos (20U) +#define PKA_CR_ADDRERRIE_Msk (0x1UL << PKA_CR_ADDRERRIE_Pos) /*!< 0x00100000 */ +#define PKA_CR_ADDRERRIE PKA_CR_ADDRERRIE_Msk /*!< RAM error interrupt enable */ + +/******************* Bits definition for PKA_SR register **************/ +#define PKA_SR_BUSY_Pos (16U) +#define PKA_SR_BUSY_Msk (0x1UL << PKA_SR_BUSY_Pos) /*!< 0x00010000 */ +#define PKA_SR_BUSY PKA_SR_BUSY_Msk /*!< PKA operation is in progress */ +#define PKA_SR_PROCENDF_Pos (17U) +#define PKA_SR_PROCENDF_Msk (0x1UL << PKA_SR_PROCENDF_Pos) /*!< 0x00020000 */ +#define PKA_SR_PROCENDF PKA_SR_PROCENDF_Msk /*!< PKA end of operation flag */ +#define PKA_SR_RAMERRF_Pos (19U) +#define PKA_SR_RAMERRF_Msk (0x1UL << PKA_SR_RAMERRF_Pos) /*!< 0x00080000 */ +#define PKA_SR_RAMERRF PKA_SR_RAMERRF_Msk /*!< PKA RAM error flag */ +#define PKA_SR_ADDRERRF_Pos (20U) +#define PKA_SR_ADDRERRF_Msk (0x1UL << PKA_SR_ADDRERRF_Pos) /*!< 0x00100000 */ +#define PKA_SR_ADDRERRF PKA_SR_ADDRERRF_Msk /*!< Address error flag */ + +/******************* Bits definition for PKA_CLRFR register **************/ +#define PKA_CLRFR_PROCENDFC_Pos (17U) +#define PKA_CLRFR_PROCENDFC_Msk (0x1UL << PKA_CLRFR_PROCENDFC_Pos) /*!< 0x00020000 */ +#define PKA_CLRFR_PROCENDFC PKA_CLRFR_PROCENDFC_Msk /*!< Clear PKA end of operation flag */ +#define PKA_CLRFR_RAMERRFC_Pos (19U) +#define PKA_CLRFR_RAMERRFC_Msk (0x1UL << PKA_CLRFR_RAMERRFC_Pos) /*!< 0x00080000 */ +#define PKA_CLRFR_RAMERRFC PKA_CLRFR_RAMERRFC_Msk /*!< Clear PKA RAM error flag */ +#define PKA_CLRFR_ADDRERRFC_Pos (20U) +#define PKA_CLRFR_ADDRERRFC_Msk (0x1UL << PKA_CLRFR_ADDRERRFC_Pos) /*!< 0x00100000 */ +#define PKA_CLRFR_ADDRERRFC PKA_CLRFR_ADDRERRFC_Msk /*!< Clear address error flag */ + +/******************* Bits definition for PKA RAM *************************/ +#define PKA_RAM_OFFSET 0x400U /*!< PKA RAM address offset */ + +/* Compute Montgomery parameter input data */ +#define PKA_MONTGOMERY_PARAM_IN_MOD_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input modulus number of bits */ +#define PKA_MONTGOMERY_PARAM_IN_MODULUS ((0xD5CU - PKA_RAM_OFFSET)>>2) /*!< Input modulus */ + +/* Compute Montgomery parameter output data */ +#define PKA_MONTGOMERY_PARAM_OUT_PARAMETER ((0x594U - PKA_RAM_OFFSET)>>2) /*!< Output Montgomery parameter */ + +/* Compute modular exponentiation input data */ +#define PKA_MODULAR_EXP_IN_EXP_NB_BITS ((0x400U - PKA_RAM_OFFSET)>>2) /*!< Input exponent number of bits */ +#define PKA_MODULAR_EXP_IN_OP_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_MODULAR_EXP_IN_MONTGOMERY_PARAM ((0x594U - PKA_RAM_OFFSET)>>2) /*!< Input storage area for Montgomery parameter */ +#define PKA_MODULAR_EXP_IN_EXPONENT_BASE ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input base of the exponentiation */ +#define PKA_MODULAR_EXP_IN_EXPONENT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Input exponent to process */ +#define PKA_MODULAR_EXP_IN_MODULUS ((0xD5CU - PKA_RAM_OFFSET)>>2) /*!< Input modulus */ + +/* Compute modular exponentiation output data */ +#define PKA_MODULAR_EXP_OUT_MONTGOMERY_PARAM ((0x594U - PKA_RAM_OFFSET)>>2) /*!< Output storage area for Montgomery parameter */ +#define PKA_MODULAR_EXP_OUT_SM_ALGO_ACC1 ((0x724U - PKA_RAM_OFFSET)>>2) /*!< Output SM algorithm accumulator 1 */ +#define PKA_MODULAR_EXP_OUT_SM_ALGO_ACC2 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Output SM algorithm accumulator 2 */ +#define PKA_MODULAR_EXP_OUT_EXPONENT_BASE ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Output base of the exponentiation */ +#define PKA_MODULAR_EXP_OUT_SM_ALGO_ACC3 ((0xE3CU - PKA_RAM_OFFSET)>>2) /*!< Output SM algorithm accumulator 3 */ + +/* Compute ECC scalar multiplication input data */ +#define PKA_ECC_SCALAR_MUL_IN_EXP_NB_BITS ((0x400U - PKA_RAM_OFFSET)>>2) /*!< Input exponent number of bits */ +#define PKA_ECC_SCALAR_MUL_IN_OP_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_ECC_SCALAR_MUL_IN_A_COEFF_SIGN ((0x408U - PKA_RAM_OFFSET)>>2) /*!< Input sign of the 'a' coefficient */ +#define PKA_ECC_SCALAR_MUL_IN_A_COEFF ((0x40CU - PKA_RAM_OFFSET)>>2) /*!< Input ECC curve 'a' coefficient */ +#define PKA_ECC_SCALAR_MUL_IN_MOD_GF ((0x460U - PKA_RAM_OFFSET)>>2) /*!< Input modulus GF(p) */ +#define PKA_ECC_SCALAR_MUL_IN_MONTGOMERY_PARAM ((0x4B4U - PKA_RAM_OFFSET)>>2) /*!< Input storage area for Montgomery parameter */ +#define PKA_ECC_SCALAR_MUL_IN_K ((0x508U - PKA_RAM_OFFSET)>>2) /*!< Input 'k' of KP */ +#define PKA_ECC_SCALAR_MUL_IN_INITIAL_POINT_X ((0x55CU - PKA_RAM_OFFSET)>>2) /*!< Input initial point P X coordinate */ +#define PKA_ECC_SCALAR_MUL_IN_INITIAL_POINT_Y ((0x5B0U - PKA_RAM_OFFSET)>>2) /*!< Input initial point P Y coordinate */ + +/* Compute ECC scalar multiplication output data */ +#define PKA_ECC_SCALAR_MUL_OUT_RESULT_X ((0x55CU - PKA_RAM_OFFSET)>>2) /*!< Output result X coordinate */ +#define PKA_ECC_SCALAR_MUL_OUT_RESULT_Y ((0x5B0U - PKA_RAM_OFFSET)>>2) /*!< Output result Y coordinate */ +#define PKA_ECC_SCALAR_MUL_OUT_LAST_DOUBLE_X1 ((0xDE8U - PKA_RAM_OFFSET)>>2) /*!< Output last double X1 coordinate */ +#define PKA_ECC_SCALAR_MUL_OUT_LAST_DOUBLE_Y1 ((0xE3CU - PKA_RAM_OFFSET)>>2) /*!< Output last double Y1 coordinate */ +#define PKA_ECC_SCALAR_MUL_OUT_LAST_DOUBLE_Z1 ((0xE90U - PKA_RAM_OFFSET)>>2) /*!< Output last double Z1 coordinate */ +#define PKA_ECC_SCALAR_MUL_OUT_CHECK_POINT_X2 ((0xEE4U - PKA_RAM_OFFSET)>>2) /*!< Output check point X2 coordinate */ +#define PKA_ECC_SCALAR_MUL_OUT_CHECK_POINT_Y2 ((0xF38U - PKA_RAM_OFFSET)>>2) /*!< Output check point Y2 coordinate */ +#define PKA_ECC_SCALAR_MUL_OUT_CHECK_POINT_Z2 ((0xF8CU - PKA_RAM_OFFSET)>>2) /*!< Output check point Z2 coordinate */ + +/* Point check input data */ +#define PKA_POINT_CHECK_IN_MOD_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input modulus number of bits */ +#define PKA_POINT_CHECK_IN_A_COEFF_SIGN ((0x408U - PKA_RAM_OFFSET)>>2) /*!< Input sign of the 'a' coefficient */ +#define PKA_POINT_CHECK_IN_A_COEFF ((0x40CU - PKA_RAM_OFFSET)>>2) /*!< Input ECC curve 'a' coefficient */ +#define PKA_POINT_CHECK_IN_B_COEFF ((0x7FCU - PKA_RAM_OFFSET)>>2) /*!< Input ECC curve 'b' coefficient */ +#define PKA_POINT_CHECK_IN_MOD_GF ((0x460U - PKA_RAM_OFFSET)>>2) /*!< Input modulus GF(p) */ +#define PKA_POINT_CHECK_IN_INITIAL_POINT_X ((0x55CU - PKA_RAM_OFFSET)>>2) /*!< Input initial point P X coordinate */ +#define PKA_POINT_CHECK_IN_INITIAL_POINT_Y ((0x5B0U - PKA_RAM_OFFSET)>>2) /*!< Input initial point P Y coordinate */ + +/* Point check output data */ +#define PKA_POINT_CHECK_OUT_ERROR ((0x400U - PKA_RAM_OFFSET)>>2) /*!< Output error */ + +/* ECDSA signature input data */ +#define PKA_ECDSA_SIGN_IN_ORDER_NB_BITS ((0x400U - PKA_RAM_OFFSET)>>2) /*!< Input order number of bits */ +#define PKA_ECDSA_SIGN_IN_MOD_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input modulus number of bits */ +#define PKA_ECDSA_SIGN_IN_A_COEFF_SIGN ((0x408U - PKA_RAM_OFFSET)>>2) /*!< Input sign of the 'a' coefficient */ +#define PKA_ECDSA_SIGN_IN_A_COEFF ((0x40CU - PKA_RAM_OFFSET)>>2) /*!< Input ECC curve 'a' coefficient */ +#define PKA_ECDSA_SIGN_IN_MOD_GF ((0x460U - PKA_RAM_OFFSET)>>2) /*!< Input modulus GF(p) */ +#define PKA_ECDSA_SIGN_IN_K ((0x508U - PKA_RAM_OFFSET)>>2) /*!< Input k value of the ECDSA */ +#define PKA_ECDSA_SIGN_IN_INITIAL_POINT_X ((0x55CU - PKA_RAM_OFFSET)>>2) /*!< Input initial point P X coordinate */ +#define PKA_ECDSA_SIGN_IN_INITIAL_POINT_Y ((0x5B0U - PKA_RAM_OFFSET)>>2) /*!< Input initial point P Y coordinate */ +#define PKA_ECDSA_SIGN_IN_HASH_E ((0xDE8U - PKA_RAM_OFFSET)>>2) /*!< Input e, hash of the message */ +#define PKA_ECDSA_SIGN_IN_PRIVATE_KEY_D ((0xE3CU - PKA_RAM_OFFSET)>>2) /*!< Input d, private key */ +#define PKA_ECDSA_SIGN_IN_ORDER_N ((0xE94U - PKA_RAM_OFFSET)>>2) /*!< Input n, order of the curve */ + +/* ECDSA signature output data */ +#define PKA_ECDSA_SIGN_OUT_ERROR ((0xEE8U - PKA_RAM_OFFSET)>>2) /*!< Output error */ +#define PKA_ECDSA_SIGN_OUT_SIGNATURE_R ((0x700U - PKA_RAM_OFFSET)>>2) /*!< Output signature r */ +#define PKA_ECDSA_SIGN_OUT_SIGNATURE_S ((0x754U - PKA_RAM_OFFSET)>>2) /*!< Output signature s */ +#define PKA_ECDSA_SIGN_OUT_FINAL_POINT_X ((0x103CU - PKA_RAM_OFFSET)>>2) /*!< Output final point kP X coordinate */ +#define PKA_ECDSA_SIGN_OUT_FINAL_POINT_Y ((0x1090U - PKA_RAM_OFFSET)>>2) /*!< Output final point kP Y coordinate */ + +/* ECDSA verification input data */ +#define PKA_ECDSA_VERIF_IN_ORDER_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input order number of bits */ +#define PKA_ECDSA_VERIF_IN_MOD_NB_BITS ((0x4B4U - PKA_RAM_OFFSET)>>2) /*!< Input modulus number of bits */ +#define PKA_ECDSA_VERIF_IN_A_COEFF_SIGN ((0x45CU - PKA_RAM_OFFSET)>>2) /*!< Input sign of the 'a' coefficient */ +#define PKA_ECDSA_VERIF_IN_A_COEFF ((0x460U - PKA_RAM_OFFSET)>>2) /*!< Input ECC curve 'a' coefficient */ +#define PKA_ECDSA_VERIF_IN_MOD_GF ((0x4B8U - PKA_RAM_OFFSET)>>2) /*!< Input modulus GF(p) */ +#define PKA_ECDSA_VERIF_IN_INITIAL_POINT_X ((0x5E8U - PKA_RAM_OFFSET)>>2) /*!< Input initial point P X coordinate */ +#define PKA_ECDSA_VERIF_IN_INITIAL_POINT_Y ((0x63CU - PKA_RAM_OFFSET)>>2) /*!< Input initial point P Y coordinate */ +#define PKA_ECDSA_VERIF_IN_PUBLIC_KEY_POINT_X ((0xF40U - PKA_RAM_OFFSET)>>2) /*!< Input public key point X coordinate */ +#define PKA_ECDSA_VERIF_IN_PUBLIC_KEY_POINT_Y ((0xF94U - PKA_RAM_OFFSET)>>2) /*!< Input public key point Y coordinate */ +#define PKA_ECDSA_VERIF_IN_SIGNATURE_R ((0x1098U - PKA_RAM_OFFSET)>>2) /*!< Input r, part of the signature */ +#define PKA_ECDSA_VERIF_IN_SIGNATURE_S ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input s, part of the signature */ +#define PKA_ECDSA_VERIF_IN_HASH_E ((0xFE8U - PKA_RAM_OFFSET)>>2) /*!< Input e, hash of the message */ +#define PKA_ECDSA_VERIF_IN_ORDER_N ((0xD5CU - PKA_RAM_OFFSET)>>2) /*!< Input n, order of the curve */ + +/* ECDSA verification output data */ +#define PKA_ECDSA_VERIF_OUT_RESULT ((0x5B0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* RSA CRT exponentiation input data */ +#define PKA_RSA_CRT_EXP_IN_MOD_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operands number of bits */ +#define PKA_RSA_CRT_EXP_IN_DP_CRT ((0x65CU - PKA_RAM_OFFSET)>>2) /*!< Input Dp CRT parameter */ +#define PKA_RSA_CRT_EXP_IN_DQ_CRT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Input Dq CRT parameter */ +#define PKA_RSA_CRT_EXP_IN_QINV_CRT ((0x7ECU - PKA_RAM_OFFSET)>>2) /*!< Input qInv CRT parameter */ +#define PKA_RSA_CRT_EXP_IN_PRIME_P ((0x97CU - PKA_RAM_OFFSET)>>2) /*!< Input Prime p */ +#define PKA_RSA_CRT_EXP_IN_PRIME_Q ((0xD5CU - PKA_RAM_OFFSET)>>2) /*!< Input Prime q */ +#define PKA_RSA_CRT_EXP_IN_EXPONENT_BASE ((0xEECU - PKA_RAM_OFFSET)>>2) /*!< Input base of the exponentiation */ + +/* RSA CRT exponentiation output data */ +#define PKA_RSA_CRT_EXP_OUT_RESULT ((0x724U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Modular reduction input data */ +#define PKA_MODULAR_REDUC_IN_OP_LENGTH ((0x400U - PKA_RAM_OFFSET)>>2) /*!< Input operand length */ +#define PKA_MODULAR_REDUC_IN_OPERAND ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand */ +#define PKA_MODULAR_REDUC_IN_MOD_LENGTH ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input modulus length */ +#define PKA_MODULAR_REDUC_IN_MODULUS ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input modulus */ + +/* Modular reduction output data */ +#define PKA_MODULAR_REDUC_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Arithmetic addition input data */ +#define PKA_ARITHMETIC_ADD_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_ARITHMETIC_ADD_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_ARITHMETIC_ADD_IN_OP2 ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ + +/* Arithmetic addition output data */ +#define PKA_ARITHMETIC_ADD_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Arithmetic subtraction input data */ +#define PKA_ARITHMETIC_SUB_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_ARITHMETIC_SUB_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_ARITHMETIC_SUB_IN_OP2 ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ + +/* Arithmetic subtraction output data */ +#define PKA_ARITHMETIC_SUB_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Arithmetic multiplication input data */ +#define PKA_ARITHMETIC_MUL_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_ARITHMETIC_MUL_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_ARITHMETIC_MUL_IN_OP2 ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ + +/* Arithmetic multiplication output data */ +#define PKA_ARITHMETIC_MUL_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Comparison input data */ +#define PKA_COMPARISON_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_COMPARISON_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_COMPARISON_IN_OP2 ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ + +/* Comparison output data */ +#define PKA_COMPARISON_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Modular addition input data */ +#define PKA_MODULAR_ADD_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_MODULAR_ADD_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_MODULAR_ADD_IN_OP2 ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ +#define PKA_MODULAR_ADD_IN_OP3_MOD ((0xD5CU - PKA_RAM_OFFSET)>>2) /*!< Input operand op3 (modulus) */ + +/* Modular addition output data */ +#define PKA_MODULAR_ADD_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Modular inversion input data */ +#define PKA_MODULAR_INV_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_MODULAR_INV_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_MODULAR_INV_IN_OP2_MOD ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 (modulus) */ + +/* Modular inversion output data */ +#define PKA_MODULAR_INV_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Modular subtraction input data */ +#define PKA_MODULAR_SUB_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_MODULAR_SUB_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_MODULAR_SUB_IN_OP2 ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ +#define PKA_MODULAR_SUB_IN_OP3_MOD ((0xD5CU - PKA_RAM_OFFSET)>>2) /*!< Input operand op3 */ + +/* Modular subtraction output data */ +#define PKA_MODULAR_SUB_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Montgomery multiplication input data */ +#define PKA_MONTGOMERY_MUL_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_MONTGOMERY_MUL_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_MONTGOMERY_MUL_IN_OP2 ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ +#define PKA_MONTGOMERY_MUL_IN_OP3_MOD ((0xD5CU - PKA_RAM_OFFSET)>>2) /*!< Input modulus */ + +/* Montgomery multiplication output data */ +#define PKA_MONTGOMERY_MUL_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/* Generic Arithmetic input data */ +#define PKA_ARITHMETIC_ALL_OPS_NB_BITS ((0x404U - PKA_RAM_OFFSET)>>2) /*!< Input operand number of bits */ +#define PKA_ARITHMETIC_ALL_OPS_IN_OP1 ((0x8B4U - PKA_RAM_OFFSET)>>2) /*!< Input operand op1 */ +#define PKA_ARITHMETIC_ALL_OPS_IN_OP2 ((0xA44U - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ +#define PKA_ARITHMETIC_ALL_OPS_IN_OP3 ((0xD5CU - PKA_RAM_OFFSET)>>2) /*!< Input operand op2 */ + +/* Generic Arithmetic output data */ +#define PKA_ARITHMETIC_ALL_OPS_OUT_RESULT ((0xBD0U - PKA_RAM_OFFSET)>>2) /*!< Output result */ + +/******************************************************************************/ +/* */ +/* FLASH */ +/* */ +/******************************************************************************/ +/******************* Bits definition for FLASH_ACR register *****************/ +#define FLASH_ACR_LATENCY_Pos (0U) +#define FLASH_ACR_LATENCY_Msk (0x7UL << FLASH_ACR_LATENCY_Pos) /*!< 0x00000007 */ +#define FLASH_ACR_LATENCY FLASH_ACR_LATENCY_Msk /*!< Latency */ +#define FLASH_ACR_LATENCY_0 (0x1UL << FLASH_ACR_LATENCY_Pos) /*!< 0x00000001 */ +#define FLASH_ACR_LATENCY_1 (0x2UL << FLASH_ACR_LATENCY_Pos) /*!< 0x00000002 */ +#define FLASH_ACR_LATENCY_2 (0x4UL << FLASH_ACR_LATENCY_Pos) /*!< 0x00000004 */ +#define FLASH_ACR_PRFTEN_Pos (8U) +#define FLASH_ACR_PRFTEN_Msk (0x1UL << FLASH_ACR_PRFTEN_Pos) /*!< 0x00000100 */ +#define FLASH_ACR_PRFTEN FLASH_ACR_PRFTEN_Msk /*!< Prefetch enable */ +#define FLASH_ACR_ICEN_Pos (9U) +#define FLASH_ACR_ICEN_Msk (0x1UL << FLASH_ACR_ICEN_Pos) /*!< 0x00000200 */ +#define FLASH_ACR_ICEN FLASH_ACR_ICEN_Msk /*!< Instruction cache enable */ +#define FLASH_ACR_DCEN_Pos (10U) +#define FLASH_ACR_DCEN_Msk (0x1UL << FLASH_ACR_DCEN_Pos) /*!< 0x00000400 */ +#define FLASH_ACR_DCEN FLASH_ACR_DCEN_Msk /*!< Data cache enable */ +#define FLASH_ACR_ICRST_Pos (11U) +#define FLASH_ACR_ICRST_Msk (0x1UL << FLASH_ACR_ICRST_Pos) /*!< 0x00000800 */ +#define FLASH_ACR_ICRST FLASH_ACR_ICRST_Msk /*!< Instruction cache reset */ +#define FLASH_ACR_DCRST_Pos (12U) +#define FLASH_ACR_DCRST_Msk (0x1UL << FLASH_ACR_DCRST_Pos) /*!< 0x00001000 */ +#define FLASH_ACR_DCRST FLASH_ACR_DCRST_Msk /*!< Data cache reset */ +#define FLASH_ACR_PES_Pos (15U) +#define FLASH_ACR_PES_Msk (0x1UL << FLASH_ACR_PES_Pos) /*!< 0x00008000 */ +#define FLASH_ACR_PES FLASH_ACR_PES_Msk /*!< Program/erase suspend request */ +#define FLASH_ACR_EMPTY_Pos (16U) +#define FLASH_ACR_EMPTY_Msk (0x1UL << FLASH_ACR_EMPTY_Pos) /*!< 0x00010000 */ +#define FLASH_ACR_EMPTY FLASH_ACR_EMPTY_Msk /*!< Flash use area empty */ + +#define FLASH_ACR_LATENCY_0WS (0x0UL << FLASH_ACR_LATENCY_Pos) /*!< FLASH Zero wait state */ +#define FLASH_ACR_LATENCY_1WS FLASH_ACR_LATENCY_0 /*!< FLASH One wait state */ +#define FLASH_ACR_LATENCY_2WS FLASH_ACR_LATENCY_1 /*!< FLASH Two wait states */ +#define FLASH_ACR_LATENCY_3WS (FLASH_ACR_LATENCY_1 | FLASH_ACR_LATENCY_0) /*!< FLASH Three wait states */ + +/******************* Bits definition for FLASH_SR register ******************/ +#define FLASH_SR_EOP_Pos (0U) +#define FLASH_SR_EOP_Msk (0x1UL << FLASH_SR_EOP_Pos) /*!< 0x00000001 */ +#define FLASH_SR_EOP FLASH_SR_EOP_Msk /*!< End of Operation */ +#define FLASH_SR_OPERR_Pos (1U) +#define FLASH_SR_OPERR_Msk (0x1UL << FLASH_SR_OPERR_Pos) /*!< 0x00000002 */ +#define FLASH_SR_OPERR FLASH_SR_OPERR_Msk /*!< Operation error */ +#define FLASH_SR_PROGERR_Pos (3U) +#define FLASH_SR_PROGERR_Msk (0x1UL << FLASH_SR_PROGERR_Pos) /*!< 0x00000008 */ +#define FLASH_SR_PROGERR FLASH_SR_PROGERR_Msk /*!< Programming error */ +#define FLASH_SR_WRPERR_Pos (4U) +#define FLASH_SR_WRPERR_Msk (0x1UL << FLASH_SR_WRPERR_Pos) /*!< 0x00000010 */ +#define FLASH_SR_WRPERR FLASH_SR_WRPERR_Msk /*!< Write protection error */ +#define FLASH_SR_PGAERR_Pos (5U) +#define FLASH_SR_PGAERR_Msk (0x1UL << FLASH_SR_PGAERR_Pos) /*!< 0x00000020 */ +#define FLASH_SR_PGAERR FLASH_SR_PGAERR_Msk /*!< Programming alignment error */ +#define FLASH_SR_SIZERR_Pos (6U) +#define FLASH_SR_SIZERR_Msk (0x1UL << FLASH_SR_SIZERR_Pos) /*!< 0x00000040 */ +#define FLASH_SR_SIZERR FLASH_SR_SIZERR_Msk /*!< Size error */ +#define FLASH_SR_PGSERR_Pos (7U) +#define FLASH_SR_PGSERR_Msk (0x1UL << FLASH_SR_PGSERR_Pos) /*!< 0x00000080 */ +#define FLASH_SR_PGSERR FLASH_SR_PGSERR_Msk /*!< Programming sequence error */ +#define FLASH_SR_MISERR_Pos (8U) +#define FLASH_SR_MISERR_Msk (0x1UL << FLASH_SR_MISERR_Pos) /*!< 0x00000100 */ +#define FLASH_SR_MISERR FLASH_SR_MISERR_Msk /*!< Fast programming data miss error */ +#define FLASH_SR_FASTERR_Pos (9U) +#define FLASH_SR_FASTERR_Msk (0x1UL << FLASH_SR_FASTERR_Pos) /*!< 0x00000200 */ +#define FLASH_SR_FASTERR FLASH_SR_FASTERR_Msk /*!< Fast programming error */ +#define FLASH_SR_OPTNV_Pos (13U) +#define FLASH_SR_OPTNV_Msk (0x1UL << FLASH_SR_OPTNV_Pos) /*!< 0x00002000 */ +#define FLASH_SR_OPTNV FLASH_SR_OPTNV_Msk /*!< User option OPTVAL indication */ +#define FLASH_SR_RDERR_Pos (14U) +#define FLASH_SR_RDERR_Msk (0x1UL << FLASH_SR_RDERR_Pos) /*!< 0x00004000 */ +#define FLASH_SR_RDERR FLASH_SR_RDERR_Msk /*!< PCROP read error */ +#define FLASH_SR_OPTVERR_Pos (15U) +#define FLASH_SR_OPTVERR_Msk (0x1UL << FLASH_SR_OPTVERR_Pos) /*!< 0x00008000 */ +#define FLASH_SR_OPTVERR FLASH_SR_OPTVERR_Msk /*!< Option validity error */ +#define FLASH_SR_BSY_Pos (16U) +#define FLASH_SR_BSY_Msk (0x1UL << FLASH_SR_BSY_Pos) /*!< 0x00010000 */ +#define FLASH_SR_BSY FLASH_SR_BSY_Msk /*!< Flash Busy */ +#define FLASH_SR_CFGBSY_Pos (18U) +#define FLASH_SR_CFGBSY_Msk (0x1UL << FLASH_SR_CFGBSY_Pos) /*!< 0x00040000 */ +#define FLASH_SR_CFGBSY FLASH_SR_CFGBSY_Msk /*!< Programming or erase configuration busy */ +#define FLASH_SR_PESD_Pos (19U) +#define FLASH_SR_PESD_Msk (0x1UL << FLASH_SR_PESD_Pos) /*!< 0x00080000 */ +#define FLASH_SR_PESD FLASH_SR_PESD_Msk /*!< Programming/erase operation suspended */ + +/******************* Bits definition for FLASH_CR register ******************/ +#define FLASH_CR_PG_Pos (0U) +#define FLASH_CR_PG_Msk (0x1UL << FLASH_CR_PG_Pos) /*!< 0x00000001 */ +#define FLASH_CR_PG FLASH_CR_PG_Msk /*!< Flash programming */ +#define FLASH_CR_PER_Pos (1U) +#define FLASH_CR_PER_Msk (0x1UL << FLASH_CR_PER_Pos) /*!< 0x00000002 */ +#define FLASH_CR_PER FLASH_CR_PER_Msk /*!< Page erase */ +#define FLASH_CR_MER_Pos (2U) +#define FLASH_CR_MER_Msk (0x1UL << FLASH_CR_MER_Pos) /*!< 0x00000004 */ +#define FLASH_CR_MER FLASH_CR_MER_Msk /*!< Mass erase */ +#define FLASH_CR_PNB_Pos (3U) +#define FLASH_CR_PNB_Msk (0xFFUL << FLASH_CR_PNB_Pos) /*!< 0x000007F8 */ +#define FLASH_CR_PNB FLASH_CR_PNB_Msk /*!< Page number selection mask */ +#define FLASH_CR_STRT_Pos (16U) +#define FLASH_CR_STRT_Msk (0x1UL << FLASH_CR_STRT_Pos) /*!< 0x00010000 */ +#define FLASH_CR_STRT FLASH_CR_STRT_Msk /*!< Start an erase operation */ +#define FLASH_CR_OPTSTRT_Pos (17U) +#define FLASH_CR_OPTSTRT_Msk (0x1UL << FLASH_CR_OPTSTRT_Pos) /*!< 0x00020000 */ +#define FLASH_CR_OPTSTRT FLASH_CR_OPTSTRT_Msk /*!< Options modification start */ +#define FLASH_CR_FSTPG_Pos (18U) +#define FLASH_CR_FSTPG_Msk (0x1UL << FLASH_CR_FSTPG_Pos) /*!< 0x00040000 */ +#define FLASH_CR_FSTPG FLASH_CR_FSTPG_Msk /*!< Fast programming */ +#define FLASH_CR_EOPIE_Pos (24U) +#define FLASH_CR_EOPIE_Msk (0x1UL << FLASH_CR_EOPIE_Pos) /*!< 0x01000000 */ +#define FLASH_CR_EOPIE FLASH_CR_EOPIE_Msk /*!< End of operation interrupt enable */ +#define FLASH_CR_ERRIE_Pos (25U) +#define FLASH_CR_ERRIE_Msk (0x1UL << FLASH_CR_ERRIE_Pos) /*!< 0x02000000 */ +#define FLASH_CR_ERRIE FLASH_CR_ERRIE_Msk /*!< Error interrupt enable */ +#define FLASH_CR_RDERRIE_Pos (26U) +#define FLASH_CR_RDERRIE_Msk (0x1UL << FLASH_CR_RDERRIE_Pos) /*!< 0x04000000 */ +#define FLASH_CR_RDERRIE FLASH_CR_RDERRIE_Msk /*!< PCROP read error interrupt enable */ +#define FLASH_CR_OBL_LAUNCH_Pos (27U) +#define FLASH_CR_OBL_LAUNCH_Msk (0x1UL << FLASH_CR_OBL_LAUNCH_Pos) /*!< 0x08000000 */ +#define FLASH_CR_OBL_LAUNCH FLASH_CR_OBL_LAUNCH_Msk /*!< Force the option byte loading */ +#define FLASH_CR_OPTLOCK_Pos (30U) +#define FLASH_CR_OPTLOCK_Msk (0x1UL << FLASH_CR_OPTLOCK_Pos) /*!< 0x40000000 */ +#define FLASH_CR_OPTLOCK FLASH_CR_OPTLOCK_Msk /*!< Options lock */ +#define FLASH_CR_LOCK_Pos (31U) +#define FLASH_CR_LOCK_Msk (0x1UL << FLASH_CR_LOCK_Pos) /*!< 0x80000000 */ +#define FLASH_CR_LOCK FLASH_CR_LOCK_Msk /*!< Flash control register lock */ + +/******************* Bits definition for FLASH_ECCR register ****************/ +#define FLASH_ECCR_ADDR_ECC_Pos (0U) +#define FLASH_ECCR_ADDR_ECC_Msk (0x1FFFFUL << FLASH_ECCR_ADDR_ECC_Pos) /*!< 0x0001FFFF */ +#define FLASH_ECCR_ADDR_ECC FLASH_ECCR_ADDR_ECC_Msk /*!< double-word address ECC fail */ +#define FLASH_ECCR_SYSF_ECC_Pos (20U) +#define FLASH_ECCR_SYSF_ECC_Msk (0x1UL << FLASH_ECCR_SYSF_ECC_Pos) /*!< 0x00100000 */ +#define FLASH_ECCR_SYSF_ECC FLASH_ECCR_SYSF_ECC_Msk /*!< System flash ECC fail */ +#define FLASH_ECCR_ECCCIE_Pos (24U) +#define FLASH_ECCR_ECCCIE_Msk (0x1UL << FLASH_ECCR_ECCCIE_Pos) /*!< 0x01000000 */ +#define FLASH_ECCR_ECCCIE FLASH_ECCR_ECCCIE_Msk /*!< ECC correction interrupt enable */ +#define FLASH_ECCR_CPUID_Pos (26U) +#define FLASH_ECCR_CPUID_Msk (0x7UL << FLASH_ECCR_CPUID_Pos) /*!< 0x1C000000 */ +#define FLASH_ECCR_CPUID FLASH_ECCR_CPUID_Msk /*!< CPU identification */ +#define FLASH_ECCR_CPUID_0 (0x1U << FLASH_ECCR_CPUID_Pos) /*!< 0x04000000 */ +#define FLASH_ECCR_CPUID_1 (0x2U << FLASH_ECCR_CPUID_Pos) /*!< 0x08000000 */ +#define FLASH_ECCR_CPUID_2 (0x4U << FLASH_ECCR_CPUID_Pos) /*!< 0x10000000 */ +#define FLASH_ECCR_ECCC_Pos (30U) +#define FLASH_ECCR_ECCC_Msk (0x1UL << FLASH_ECCR_ECCC_Pos) /*!< 0x40000000 */ +#define FLASH_ECCR_ECCC FLASH_ECCR_ECCC_Msk /*!< ECC correction */ +#define FLASH_ECCR_ECCD_Pos (31U) +#define FLASH_ECCR_ECCD_Msk (0x1UL << FLASH_ECCR_ECCD_Pos) /*!< 0x80000000 */ +#define FLASH_ECCR_ECCD FLASH_ECCR_ECCD_Msk /*!< ECC detection */ + +/******************* Bits definition for FLASH_OPTR register ****************/ +#define FLASH_OPTR_RDP_Pos (0U) +#define FLASH_OPTR_RDP_Msk (0xFFUL << FLASH_OPTR_RDP_Pos) /*!< 0x000000FF */ +#define FLASH_OPTR_RDP FLASH_OPTR_RDP_Msk /*!< Read protection level */ +#define FLASH_OPTR_ESE_Pos (8U) +#define FLASH_OPTR_ESE_Msk (0x1UL << FLASH_OPTR_ESE_Pos) /*!< 0x00000100 */ +#define FLASH_OPTR_ESE FLASH_OPTR_ESE_Msk /*!< Security enable */ +#define FLASH_OPTR_BOR_LEV_Pos (9U) +#define FLASH_OPTR_BOR_LEV_Msk (0x7UL << FLASH_OPTR_BOR_LEV_Pos) /*!< 0x00000E00 */ +#define FLASH_OPTR_BOR_LEV FLASH_OPTR_BOR_LEV_Msk /*!< BOR reset level mask */ +#define FLASH_OPTR_BOR_LEV_0 (0x1U << FLASH_OPTR_BOR_LEV_Pos) /*!< 0x00000200 */ +#define FLASH_OPTR_BOR_LEV_1 (0x2U << FLASH_OPTR_BOR_LEV_Pos) /*!< 0x00000400 */ +#define FLASH_OPTR_BOR_LEV_2 (0x4U << FLASH_OPTR_BOR_LEV_Pos) /*!< 0x00000800 */ +#define FLASH_OPTR_nRST_STOP_Pos (12U) +#define FLASH_OPTR_nRST_STOP_Msk (0x1UL << FLASH_OPTR_nRST_STOP_Pos) /*!< 0x00001000 */ +#define FLASH_OPTR_nRST_STOP FLASH_OPTR_nRST_STOP_Msk /*!< Reset option in Stop mode */ +#define FLASH_OPTR_nRST_STDBY_Pos (13U) +#define FLASH_OPTR_nRST_STDBY_Msk (0x1UL << FLASH_OPTR_nRST_STDBY_Pos) /*!< 0x00002000 */ +#define FLASH_OPTR_nRST_STDBY FLASH_OPTR_nRST_STDBY_Msk /*!< Reset option in Standby mode */ +#define FLASH_OPTR_nRST_SHDW_Pos (14U) +#define FLASH_OPTR_nRST_SHDW_Msk (0x1UL << FLASH_OPTR_nRST_SHDW_Pos) /*!< 0x00004000 */ +#define FLASH_OPTR_nRST_SHDW FLASH_OPTR_nRST_SHDW_Msk /*!< Reset option in Shutdown mode */ +#define FLASH_OPTR_IWDG_SW_Pos (16U) +#define FLASH_OPTR_IWDG_SW_Msk (0x1UL << FLASH_OPTR_IWDG_SW_Pos) /*!< 0x00010000 */ +#define FLASH_OPTR_IWDG_SW FLASH_OPTR_IWDG_SW_Msk /*!< Independent watchdog selection */ +#define FLASH_OPTR_IWDG_STOP_Pos (17U) +#define FLASH_OPTR_IWDG_STOP_Msk (0x1UL << FLASH_OPTR_IWDG_STOP_Pos) /*!< 0x00020000 */ +#define FLASH_OPTR_IWDG_STOP FLASH_OPTR_IWDG_STOP_Msk /*!< Independent watchdog counter option in Stop mode */ +#define FLASH_OPTR_IWDG_STDBY_Pos (18U) +#define FLASH_OPTR_IWDG_STDBY_Msk (0x1UL << FLASH_OPTR_IWDG_STDBY_Pos) /*!< 0x00040000 */ +#define FLASH_OPTR_IWDG_STDBY FLASH_OPTR_IWDG_STDBY_Msk /*!< Independent watchdog counter option in Standby mode */ +#define FLASH_OPTR_WWDG_SW_Pos (19U) +#define FLASH_OPTR_WWDG_SW_Msk (0x1UL << FLASH_OPTR_WWDG_SW_Pos) /*!< 0x00080000 */ +#define FLASH_OPTR_WWDG_SW FLASH_OPTR_WWDG_SW_Msk /*!< Window watchdog selection */ +#define FLASH_OPTR_nBOOT1_Pos (23U) +#define FLASH_OPTR_nBOOT1_Msk (0x1UL << FLASH_OPTR_nBOOT1_Pos) /*!< 0x00800000 */ +#define FLASH_OPTR_nBOOT1 FLASH_OPTR_nBOOT1_Msk /*!< Boot Configuration */ +#define FLASH_OPTR_SRAM2PE_Pos (24U) +#define FLASH_OPTR_SRAM2PE_Msk (0x1UL << FLASH_OPTR_SRAM2PE_Pos) /*!< 0x01000000 */ +#define FLASH_OPTR_SRAM2PE FLASH_OPTR_SRAM2PE_Msk /*!< SRAM2 parity check enable */ +#define FLASH_OPTR_SRAM2RST_Pos (25U) +#define FLASH_OPTR_SRAM2RST_Msk (0x1UL << FLASH_OPTR_SRAM2RST_Pos) /*!< 0x02000000 */ +#define FLASH_OPTR_SRAM2RST FLASH_OPTR_SRAM2RST_Msk /*!< SRAM2 erase option when system reset */ +#define FLASH_OPTR_nSWBOOT0_Pos (26U) +#define FLASH_OPTR_nSWBOOT0_Msk (0x1UL << FLASH_OPTR_nSWBOOT0_Pos) /*!< 0x04000000 */ +#define FLASH_OPTR_nSWBOOT0 FLASH_OPTR_nSWBOOT0_Msk /*!< Software BOOT0 */ +#define FLASH_OPTR_nBOOT0_Pos (27U) +#define FLASH_OPTR_nBOOT0_Msk (0x1UL << FLASH_OPTR_nBOOT0_Pos) /*!< 0x08000000 */ +#define FLASH_OPTR_nBOOT0 FLASH_OPTR_nBOOT0_Msk /*!< BOOT0 option bit */ +#define FLASH_OPTR_AGC_TRIM_Pos (29U) +#define FLASH_OPTR_AGC_TRIM_Msk (0x7UL << FLASH_OPTR_AGC_TRIM_Pos) /*!< 0xE0000000 */ +#define FLASH_OPTR_AGC_TRIM FLASH_OPTR_AGC_TRIM_Msk /*!< Automatic Gain Control trimming mask */ +#define FLASH_OPTR_AGC_TRIM_0 (0x1U << FLASH_OPTR_AGC_TRIM_Pos) /*!< 0x20000000 */ +#define FLASH_OPTR_AGC_TRIM_1 (0x2U << FLASH_OPTR_AGC_TRIM_Pos) /*!< 0x40000000 */ +#define FLASH_OPTR_AGC_TRIM_2 (0x4U << FLASH_OPTR_AGC_TRIM_Pos) /*!< 0x80000000 */ + +/****************** Bits definition for FLASH_PCROP1ASR register ************/ +#define FLASH_PCROP1ASR_PCROP1A_STRT_Pos (0U) +#define FLASH_PCROP1ASR_PCROP1A_STRT_Msk (0x1FFUL << FLASH_PCROP1ASR_PCROP1A_STRT_Pos) /*!< 0x000001FF */ +#define FLASH_PCROP1ASR_PCROP1A_STRT FLASH_PCROP1ASR_PCROP1A_STRT_Msk /*!< PCROP area A start offset */ + +/****************** Bits definition for FLASH_PCROP1AER register ************/ +#define FLASH_PCROP1AER_PCROP1A_END_Pos (0U) +#define FLASH_PCROP1AER_PCROP1A_END_Msk (0x1FFUL << FLASH_PCROP1AER_PCROP1A_END_Pos) /*!< 0x000001FF */ +#define FLASH_PCROP1AER_PCROP1A_END FLASH_PCROP1AER_PCROP1A_END_Msk /*!< PCROP area A end offset */ +#define FLASH_PCROP1AER_PCROP_RDP_Pos (31U) +#define FLASH_PCROP1AER_PCROP_RDP_Msk (0x1UL << FLASH_PCROP1AER_PCROP_RDP_Pos) /*!< 0x80000000 */ +#define FLASH_PCROP1AER_PCROP_RDP FLASH_PCROP1AER_PCROP_RDP_Msk /*!< PCROP area preserved when RDP level decreased */ + +/****************** Bits definition for FLASH_WRP1AR register ***************/ +#define FLASH_WRP1AR_WRP1A_STRT_Pos (0U) +#define FLASH_WRP1AR_WRP1A_STRT_Msk (0xFFUL << FLASH_WRP1AR_WRP1A_STRT_Pos) /*!< 0x000000FF */ +#define FLASH_WRP1AR_WRP1A_STRT FLASH_WRP1AR_WRP1A_STRT_Msk /*!< WRP area A start offset */ +#define FLASH_WRP1AR_WRP1A_END_Pos (16U) +#define FLASH_WRP1AR_WRP1A_END_Msk (0xFFUL << FLASH_WRP1AR_WRP1A_END_Pos) /*!< 0x00FF0000 */ +#define FLASH_WRP1AR_WRP1A_END FLASH_WRP1AR_WRP1A_END_Msk /*!< WRP area A end offset */ + +/****************** Bits definition for FLASH_WRP1BR register ***************/ +#define FLASH_WRP1BR_WRP1B_STRT_Pos (0U) +#define FLASH_WRP1BR_WRP1B_STRT_Msk (0xFFUL << FLASH_WRP1BR_WRP1B_STRT_Pos) /*!< 0x000000FF */ +#define FLASH_WRP1BR_WRP1B_STRT FLASH_WRP1BR_WRP1B_STRT_Msk /*!< WRP area B start offset */ +#define FLASH_WRP1BR_WRP1B_END_Pos (16U) +#define FLASH_WRP1BR_WRP1B_END_Msk (0xFFUL << FLASH_WRP1BR_WRP1B_END_Pos) /*!< 0x00FF0000 */ +#define FLASH_WRP1BR_WRP1B_END FLASH_WRP1BR_WRP1B_END_Msk /*!< WRP area B end offset */ + +/****************** Bits definition for FLASH_PCROP1BSR register ************/ +#define FLASH_PCROP1BSR_PCROP1B_STRT_Pos (0U) +#define FLASH_PCROP1BSR_PCROP1B_STRT_Msk (0x1FFUL << FLASH_PCROP1BSR_PCROP1B_STRT_Pos) /*!< 0x000001FF */ +#define FLASH_PCROP1BSR_PCROP1B_STRT FLASH_PCROP1BSR_PCROP1B_STRT_Msk /*!< PCROP area B start offset */ + +/****************** Bits definition for FLASH_PCROP1BER register ************/ +#define FLASH_PCROP1BER_PCROP1B_END_Pos (0U) +#define FLASH_PCROP1BER_PCROP1B_END_Msk (0x1FFUL << FLASH_PCROP1BER_PCROP1B_END_Pos) /*!< 0x000001FF */ +#define FLASH_PCROP1BER_PCROP1B_END FLASH_PCROP1BER_PCROP1B_END_Msk /*!< PCROP area B end offset */ + +/****************** Bits definition for FLASH_IPCCBR register ************/ +#define FLASH_IPCCBR_IPCCDBA_Pos (0U) +#define FLASH_IPCCBR_IPCCDBA_Msk (0x3FFFUL << FLASH_IPCCBR_IPCCDBA_Pos) /*!< 0x00003FFF */ +#define FLASH_IPCCBR_IPCCDBA FLASH_IPCCBR_IPCCDBA_Msk /*!< IPCC data buffer base address */ + +/****************** Bits definition for FLASH_SFR register ************/ +#define FLASH_SFR_SFSA_Pos (0U) +#define FLASH_SFR_SFSA_Msk (0xFFUL << FLASH_SFR_SFSA_Pos) /*!< 0x000000FF */ +#define FLASH_SFR_SFSA FLASH_SFR_SFSA_Msk /* Secure flash start address */ +#define FLASH_SFR_FSD_Pos (8U) +#define FLASH_SFR_FSD_Msk (0x1UL << FLASH_SFR_FSD_Pos) /*!< 0x00000100 */ +#define FLASH_SFR_FSD FLASH_SFR_FSD_Msk /* Flash mode secure */ +#define FLASH_SFR_DDS_Pos (12U) +#define FLASH_SFR_DDS_Msk (0x1UL << FLASH_SFR_DDS_Pos) /*!< 0x00001000 */ +#define FLASH_SFR_DDS FLASH_SFR_DDS_Msk /* Enabling and disabling CPU2 Debug access */ + +/****************** Bits definition for FLASH_SRRVR register ************/ +#define FLASH_SRRVR_SBRV_Pos (0U) +#define FLASH_SRRVR_SBRV_Msk (0x3FFFFUL << FLASH_SRRVR_SBRV_Pos) /*!< 0x0003FFFF */ +#define FLASH_SRRVR_SBRV FLASH_SRRVR_SBRV_Msk /* CPU2 boot reset vector memory offset */ + +#define FLASH_SRRVR_SBRSA_Pos (18U) +#define FLASH_SRRVR_SBRSA_Msk (0x1FUL << FLASH_SRRVR_SBRSA_Pos) /*!< 0x007C0000 */ +#define FLASH_SRRVR_SBRSA FLASH_SRRVR_SBRSA_Msk /* Secure backup SRAM2a start address */ +#define FLASH_SRRVR_BRSD_Pos (23U) +#define FLASH_SRRVR_BRSD_Msk (0x1UL << FLASH_SRRVR_BRSD_Pos) /*!< 0x00800000 */ +#define FLASH_SRRVR_BRSD FLASH_SRRVR_BRSD_Msk /* Backup SRAM2A secure mode */ + +#define FLASH_SRRVR_SNBRSA_Pos (25U) +#define FLASH_SRRVR_SNBRSA_Msk (0x1FUL << FLASH_SRRVR_SNBRSA_Pos) /*!< 0x3E000000 */ +#define FLASH_SRRVR_SNBRSA FLASH_SRRVR_SNBRSA_Msk /* Secure non-backup SRAM2b start address */ +#define FLASH_SRRVR_NBRSD_Pos (30U) +#define FLASH_SRRVR_NBRSD_Msk (0x1UL << FLASH_SRRVR_NBRSD_Pos) /*!< 0x40000000 */ +#define FLASH_SRRVR_NBRSD FLASH_SRRVR_NBRSD_Msk /* Non-backup SRAM2B secure mode */ +#define FLASH_SRRVR_C2OPT_Pos (31U) +#define FLASH_SRRVR_C2OPT_Msk (0x1UL << FLASH_SRRVR_C2OPT_Pos) /*!< 0x80000000 */ +#define FLASH_SRRVR_C2OPT FLASH_SRRVR_C2OPT_Msk /* CPU2 boot reset vector memory selection */ + +/****************** Bits definition for FLASH_C2ACR register ************/ +#define FLASH_C2ACR_PRFTEN_Pos (8U) +#define FLASH_C2ACR_PRFTEN_Msk (0x1UL << FLASH_C2ACR_PRFTEN_Pos) /*!< 0x00000100 */ +#define FLASH_C2ACR_PRFTEN FLASH_C2ACR_PRFTEN_Msk /*!< CPU2 Prefetch enable */ +#define FLASH_C2ACR_ICEN_Pos (9U) +#define FLASH_C2ACR_ICEN_Msk (0x1UL << FLASH_C2ACR_ICEN_Pos) /*!< 0x00000200 */ +#define FLASH_C2ACR_ICEN FLASH_C2ACR_ICEN_Msk /*!< CPU2 Instruction cache enable */ +#define FLASH_C2ACR_ICRST_Pos (11U) +#define FLASH_C2ACR_ICRST_Msk (0x1UL << FLASH_C2ACR_ICRST_Pos) /*!< 0x00000800 */ +#define FLASH_C2ACR_ICRST FLASH_C2ACR_ICRST_Msk /*!< CPU2 Instruction cache reset */ +#define FLASH_C2ACR_PES_Pos (15U) +#define FLASH_C2ACR_PES_Msk (0x1UL << FLASH_C2ACR_PES_Pos) /*!< 0x00008000 */ +#define FLASH_C2ACR_PES FLASH_C2ACR_PES_Msk /*!< CPU2 Program/erase suspend request */ + +/****************** Bits definition for FLASH_C2SR register ************/ +#define FLASH_C2SR_EOP_Pos (0U) +#define FLASH_C2SR_EOP_Msk (0x1UL << FLASH_C2SR_EOP_Pos) /*!< 0x00000001 */ +#define FLASH_C2SR_EOP FLASH_C2SR_EOP_Msk /*!< CPU2 End of operation */ +#define FLASH_C2SR_OPERR_Pos (1U) +#define FLASH_C2SR_OPERR_Msk (0x1UL << FLASH_C2SR_OPERR_Pos) /*!< 0x00000002 */ +#define FLASH_C2SR_OPERR FLASH_C2SR_OPERR_Msk /*!< CPU2 Operation error */ +#define FLASH_C2SR_PROGERR_Pos (3U) +#define FLASH_C2SR_PROGERR_Msk (0x1UL << FLASH_C2SR_PROGERR_Pos) /*!< 0x00000008 */ +#define FLASH_C2SR_PROGERR FLASH_C2SR_PROGERR_Msk /*!< CPU2 Programming error */ +#define FLASH_C2SR_WRPERR_Pos (4U) +#define FLASH_C2SR_WRPERR_Msk (0x1UL << FLASH_C2SR_WRPERR_Pos) /*!< 0x00000010 */ +#define FLASH_C2SR_WRPERR FLASH_C2SR_WRPERR_Msk /*!< CPU2 Write protection error */ +#define FLASH_C2SR_PGAERR_Pos (5U) +#define FLASH_C2SR_PGAERR_Msk (0x1UL << FLASH_C2SR_PGAERR_Pos) /*!< 0x00000020 */ +#define FLASH_C2SR_PGAERR FLASH_C2SR_PGAERR_Msk /*!< CPU2 Programming alignment error */ +#define FLASH_C2SR_SIZERR_Pos (6U) +#define FLASH_C2SR_SIZERR_Msk (0x1UL << FLASH_C2SR_SIZERR_Pos) /*!< 0x00000040 */ +#define FLASH_C2SR_SIZERR FLASH_C2SR_SIZERR_Msk /*!< CPU2 Size error */ +#define FLASH_C2SR_PGSERR_Pos (7U) +#define FLASH_C2SR_PGSERR_Msk (0x1UL << FLASH_C2SR_PGSERR_Pos) /*!< 0x00000080 */ +#define FLASH_C2SR_PGSERR FLASH_C2SR_PGSERR_Msk /*!< CPU2 Programming sequence error */ +#define FLASH_C2SR_MISERR_Pos (8U) +#define FLASH_C2SR_MISERR_Msk (0x1UL << FLASH_C2SR_MISERR_Pos) /*!< 0x00000100 */ +#define FLASH_C2SR_MISERR FLASH_C2SR_MISERR_Msk /*!< CPU2 Fast programming data miss error */ +#define FLASH_C2SR_FASTERR_Pos (9U) +#define FLASH_C2SR_FASTERR_Msk (0x1UL << FLASH_C2SR_FASTERR_Pos) /*!< 0x00000200 */ +#define FLASH_C2SR_FASTERR FLASH_C2SR_FASTERR_Msk /*!< CPU2 Fast programming error */ +#define FLASH_C2SR_RDERR_Pos (14U) +#define FLASH_C2SR_RDERR_Msk (0x1UL << FLASH_C2SR_RDERR_Pos) /*!< 0x00004000 */ +#define FLASH_C2SR_RDERR FLASH_C2SR_RDERR_Msk /*!< CPU2 PCROP read error */ +#define FLASH_C2SR_BSY_Pos (16U) +#define FLASH_C2SR_BSY_Msk (0x1UL << FLASH_C2SR_BSY_Pos) /*!< 0x00010000 */ +#define FLASH_C2SR_BSY FLASH_C2SR_BSY_Msk /*!< CPU2 Flash busy */ +#define FLASH_C2SR_CFGBSY_Pos (18U) +#define FLASH_C2SR_CFGBSY_Msk (0x1UL << FLASH_C2SR_CFGBSY_Pos) /*!< 0x00040000 */ +#define FLASH_C2SR_CFGBSY FLASH_C2SR_CFGBSY_Msk /*!< CPU2 Programming or erase configuration busy */ +#define FLASH_C2SR_PESD_Pos (19U) +#define FLASH_C2SR_PESD_Msk (0x1UL << FLASH_C2SR_PESD_Pos) /*!< 0x00080000 */ +#define FLASH_C2SR_PESD FLASH_C2SR_PESD_Msk /*!< CPU2 Programming/erase operation suspended */ + +/****************** Bits definition for FLASH_C2CR register ************/ +#define FLASH_C2CR_PG_Pos (0U) +#define FLASH_C2CR_PG_Msk (0x1UL << FLASH_C2CR_PG_Pos) /*!< 0x00000001 */ +#define FLASH_C2CR_PG FLASH_C2CR_PG_Msk /*!< CPU2 Flash programming */ +#define FLASH_C2CR_PER_Pos (1U) +#define FLASH_C2CR_PER_Msk (0x1UL << FLASH_C2CR_PER_Pos) /*!< 0x00000002 */ +#define FLASH_C2CR_PER FLASH_C2CR_PER_Msk /*!< CPU2 Page erase */ +#define FLASH_C2CR_MER_Pos (2U) +#define FLASH_C2CR_MER_Msk (0x1UL << FLASH_C2CR_MER_Pos) /*!< 0x00000004 */ +#define FLASH_C2CR_MER FLASH_C2CR_MER_Msk /*!< CPU2 Mass erase */ +#define FLASH_C2CR_PNB_Pos (3U) +#define FLASH_C2CR_PNB_Msk (0xFFUL << FLASH_C2CR_PNB_Pos) /*!< 0x000007F8 */ +#define FLASH_C2CR_PNB FLASH_C2CR_PNB_Msk /*!< CPU2 Page number selection mask */ +#define FLASH_C2CR_STRT_Pos (16U) +#define FLASH_C2CR_STRT_Msk (0x1UL << FLASH_C2CR_STRT_Pos) /*!< 0x00010000 */ +#define FLASH_C2CR_STRT FLASH_C2CR_STRT_Msk /*!< CPU2 Start an erase operation */ +#define FLASH_C2CR_FSTPG_Pos (18U) +#define FLASH_C2CR_FSTPG_Msk (0x1UL << FLASH_C2CR_FSTPG_Pos) /*!< 0x00040000 */ +#define FLASH_C2CR_FSTPG FLASH_C2CR_FSTPG_Msk /*!< CPU2 Fast programming */ +#define FLASH_C2CR_EOPIE_Pos (24U) +#define FLASH_C2CR_EOPIE_Msk (0x1UL << FLASH_C2CR_EOPIE_Pos) /*!< 0x01000000 */ +#define FLASH_C2CR_EOPIE FLASH_C2CR_EOPIE_Msk /*!< CPU2 End of operation interrupt enable */ +#define FLASH_C2CR_ERRIE_Pos (25U) +#define FLASH_C2CR_ERRIE_Msk (0x1UL << FLASH_C2CR_ERRIE_Pos) /*!< 0x02000000 */ +#define FLASH_C2CR_ERRIE FLASH_C2CR_ERRIE_Msk /*!< CPU2 Error interrupt enable */ +#define FLASH_C2CR_RDERRIE_Pos (26U) +#define FLASH_C2CR_RDERRIE_Msk (0x1UL << FLASH_C2CR_RDERRIE_Pos) /*!< 0x04000000 */ +#define FLASH_C2CR_RDERRIE FLASH_C2CR_RDERRIE_Msk /*!< CPU2 PCROP read error interrupt enable */ + +/******************************************************************************/ +/* */ +/* General Purpose I/O */ +/* */ +/******************************************************************************/ +/****************** Bits definition for GPIO_MODER register *****************/ +#define GPIO_MODER_MODE0_Pos (0U) +#define GPIO_MODER_MODE0_Msk (0x3UL << GPIO_MODER_MODE0_Pos) /*!< 0x00000003 */ +#define GPIO_MODER_MODE0 GPIO_MODER_MODE0_Msk +#define GPIO_MODER_MODE0_0 (0x1U << GPIO_MODER_MODE0_Pos) /*!< 0x00000001 */ +#define GPIO_MODER_MODE0_1 (0x2U << GPIO_MODER_MODE0_Pos) /*!< 0x00000002 */ +#define GPIO_MODER_MODE1_Pos (2U) +#define GPIO_MODER_MODE1_Msk (0x3UL << GPIO_MODER_MODE1_Pos) /*!< 0x0000000C */ +#define GPIO_MODER_MODE1 GPIO_MODER_MODE1_Msk +#define GPIO_MODER_MODE1_0 (0x1U << GPIO_MODER_MODE1_Pos) /*!< 0x00000004 */ +#define GPIO_MODER_MODE1_1 (0x2U << GPIO_MODER_MODE1_Pos) /*!< 0x00000008 */ +#define GPIO_MODER_MODE2_Pos (4U) +#define GPIO_MODER_MODE2_Msk (0x3UL << GPIO_MODER_MODE2_Pos) /*!< 0x00000030 */ +#define GPIO_MODER_MODE2 GPIO_MODER_MODE2_Msk +#define GPIO_MODER_MODE2_0 (0x1U << GPIO_MODER_MODE2_Pos) /*!< 0x00000010 */ +#define GPIO_MODER_MODE2_1 (0x2U << GPIO_MODER_MODE2_Pos) /*!< 0x00000020 */ +#define GPIO_MODER_MODE3_Pos (6U) +#define GPIO_MODER_MODE3_Msk (0x3UL << GPIO_MODER_MODE3_Pos) /*!< 0x000000C0 */ +#define GPIO_MODER_MODE3 GPIO_MODER_MODE3_Msk +#define GPIO_MODER_MODE3_0 (0x1U << GPIO_MODER_MODE3_Pos) /*!< 0x00000040 */ +#define GPIO_MODER_MODE3_1 (0x2U << GPIO_MODER_MODE3_Pos) /*!< 0x00000080 */ +#define GPIO_MODER_MODE4_Pos (8U) +#define GPIO_MODER_MODE4_Msk (0x3UL << GPIO_MODER_MODE4_Pos) /*!< 0x00000300 */ +#define GPIO_MODER_MODE4 GPIO_MODER_MODE4_Msk +#define GPIO_MODER_MODE4_0 (0x1U << GPIO_MODER_MODE4_Pos) /*!< 0x00000100 */ +#define GPIO_MODER_MODE4_1 (0x2U << GPIO_MODER_MODE4_Pos) /*!< 0x00000200 */ +#define GPIO_MODER_MODE5_Pos (10U) +#define GPIO_MODER_MODE5_Msk (0x3UL << GPIO_MODER_MODE5_Pos) /*!< 0x00000C00 */ +#define GPIO_MODER_MODE5 GPIO_MODER_MODE5_Msk +#define GPIO_MODER_MODE5_0 (0x1U << GPIO_MODER_MODE5_Pos) /*!< 0x00000400 */ +#define GPIO_MODER_MODE5_1 (0x2U << GPIO_MODER_MODE5_Pos) /*!< 0x00000800 */ +#define GPIO_MODER_MODE6_Pos (12U) +#define GPIO_MODER_MODE6_Msk (0x3UL << GPIO_MODER_MODE6_Pos) /*!< 0x00003000 */ +#define GPIO_MODER_MODE6 GPIO_MODER_MODE6_Msk +#define GPIO_MODER_MODE6_0 (0x1U << GPIO_MODER_MODE6_Pos) /*!< 0x00001000 */ +#define GPIO_MODER_MODE6_1 (0x2U << GPIO_MODER_MODE6_Pos) /*!< 0x00002000 */ +#define GPIO_MODER_MODE7_Pos (14U) +#define GPIO_MODER_MODE7_Msk (0x3UL << GPIO_MODER_MODE7_Pos) /*!< 0x0000C000 */ +#define GPIO_MODER_MODE7 GPIO_MODER_MODE7_Msk +#define GPIO_MODER_MODE7_0 (0x1U << GPIO_MODER_MODE7_Pos) /*!< 0x00004000 */ +#define GPIO_MODER_MODE7_1 (0x2U << GPIO_MODER_MODE7_Pos) /*!< 0x00008000 */ +#define GPIO_MODER_MODE8_Pos (16U) +#define GPIO_MODER_MODE8_Msk (0x3UL << GPIO_MODER_MODE8_Pos) /*!< 0x00030000 */ +#define GPIO_MODER_MODE8 GPIO_MODER_MODE8_Msk +#define GPIO_MODER_MODE8_0 (0x1U << GPIO_MODER_MODE8_Pos) /*!< 0x00010000 */ +#define GPIO_MODER_MODE8_1 (0x2U << GPIO_MODER_MODE8_Pos) /*!< 0x00020000 */ +#define GPIO_MODER_MODE9_Pos (18U) +#define GPIO_MODER_MODE9_Msk (0x3UL << GPIO_MODER_MODE9_Pos) /*!< 0x000C0000 */ +#define GPIO_MODER_MODE9 GPIO_MODER_MODE9_Msk +#define GPIO_MODER_MODE9_0 (0x1U << GPIO_MODER_MODE9_Pos) /*!< 0x00040000 */ +#define GPIO_MODER_MODE9_1 (0x2U << GPIO_MODER_MODE9_Pos) /*!< 0x00080000 */ +#define GPIO_MODER_MODE10_Pos (20U) +#define GPIO_MODER_MODE10_Msk (0x3UL << GPIO_MODER_MODE10_Pos) /*!< 0x00300000 */ +#define GPIO_MODER_MODE10 GPIO_MODER_MODE10_Msk +#define GPIO_MODER_MODE10_0 (0x1U << GPIO_MODER_MODE10_Pos) /*!< 0x00100000 */ +#define GPIO_MODER_MODE10_1 (0x2U << GPIO_MODER_MODE10_Pos) /*!< 0x00200000 */ +#define GPIO_MODER_MODE11_Pos (22U) +#define GPIO_MODER_MODE11_Msk (0x3UL << GPIO_MODER_MODE11_Pos) /*!< 0x00C00000 */ +#define GPIO_MODER_MODE11 GPIO_MODER_MODE11_Msk +#define GPIO_MODER_MODE11_0 (0x1U << GPIO_MODER_MODE11_Pos) /*!< 0x00400000 */ +#define GPIO_MODER_MODE11_1 (0x2U << GPIO_MODER_MODE11_Pos) /*!< 0x00800000 */ +#define GPIO_MODER_MODE12_Pos (24U) +#define GPIO_MODER_MODE12_Msk (0x3UL << GPIO_MODER_MODE12_Pos) /*!< 0x03000000 */ +#define GPIO_MODER_MODE12 GPIO_MODER_MODE12_Msk +#define GPIO_MODER_MODE12_0 (0x1U << GPIO_MODER_MODE12_Pos) /*!< 0x01000000 */ +#define GPIO_MODER_MODE12_1 (0x2U << GPIO_MODER_MODE12_Pos) /*!< 0x02000000 */ +#define GPIO_MODER_MODE13_Pos (26U) +#define GPIO_MODER_MODE13_Msk (0x3UL << GPIO_MODER_MODE13_Pos) /*!< 0x0C000000 */ +#define GPIO_MODER_MODE13 GPIO_MODER_MODE13_Msk +#define GPIO_MODER_MODE13_0 (0x1U << GPIO_MODER_MODE13_Pos) /*!< 0x04000000 */ +#define GPIO_MODER_MODE13_1 (0x2U << GPIO_MODER_MODE13_Pos) /*!< 0x08000000 */ +#define GPIO_MODER_MODE14_Pos (28U) +#define GPIO_MODER_MODE14_Msk (0x3UL << GPIO_MODER_MODE14_Pos) /*!< 0x30000000 */ +#define GPIO_MODER_MODE14 GPIO_MODER_MODE14_Msk +#define GPIO_MODER_MODE14_0 (0x1U << GPIO_MODER_MODE14_Pos) /*!< 0x10000000 */ +#define GPIO_MODER_MODE14_1 (0x2U << GPIO_MODER_MODE14_Pos) /*!< 0x20000000 */ +#define GPIO_MODER_MODE15_Pos (30U) +#define GPIO_MODER_MODE15_Msk (0x3UL << GPIO_MODER_MODE15_Pos) /*!< 0xC0000000 */ +#define GPIO_MODER_MODE15 GPIO_MODER_MODE15_Msk +#define GPIO_MODER_MODE15_0 (0x1U << GPIO_MODER_MODE15_Pos) /*!< 0x40000000 */ +#define GPIO_MODER_MODE15_1 (0x2U << GPIO_MODER_MODE15_Pos) /*!< 0x80000000 */ + +/****************** Bits definition for GPIO_OTYPER register ****************/ +#define GPIO_OTYPER_OT0_Pos (0U) +#define GPIO_OTYPER_OT0_Msk (0x1UL << GPIO_OTYPER_OT0_Pos) /*!< 0x00000001 */ +#define GPIO_OTYPER_OT0 GPIO_OTYPER_OT0_Msk +#define GPIO_OTYPER_OT1_Pos (1U) +#define GPIO_OTYPER_OT1_Msk (0x1UL << GPIO_OTYPER_OT1_Pos) /*!< 0x00000002 */ +#define GPIO_OTYPER_OT1 GPIO_OTYPER_OT1_Msk +#define GPIO_OTYPER_OT2_Pos (2U) +#define GPIO_OTYPER_OT2_Msk (0x1UL << GPIO_OTYPER_OT2_Pos) /*!< 0x00000004 */ +#define GPIO_OTYPER_OT2 GPIO_OTYPER_OT2_Msk +#define GPIO_OTYPER_OT3_Pos (3U) +#define GPIO_OTYPER_OT3_Msk (0x1UL << GPIO_OTYPER_OT3_Pos) /*!< 0x00000008 */ +#define GPIO_OTYPER_OT3 GPIO_OTYPER_OT3_Msk +#define GPIO_OTYPER_OT4_Pos (4U) +#define GPIO_OTYPER_OT4_Msk (0x1UL << GPIO_OTYPER_OT4_Pos) /*!< 0x00000010 */ +#define GPIO_OTYPER_OT4 GPIO_OTYPER_OT4_Msk +#define GPIO_OTYPER_OT5_Pos (5U) +#define GPIO_OTYPER_OT5_Msk (0x1UL << GPIO_OTYPER_OT5_Pos) /*!< 0x00000020 */ +#define GPIO_OTYPER_OT5 GPIO_OTYPER_OT5_Msk +#define GPIO_OTYPER_OT6_Pos (6U) +#define GPIO_OTYPER_OT6_Msk (0x1UL << GPIO_OTYPER_OT6_Pos) /*!< 0x00000040 */ +#define GPIO_OTYPER_OT6 GPIO_OTYPER_OT6_Msk +#define GPIO_OTYPER_OT7_Pos (7U) +#define GPIO_OTYPER_OT7_Msk (0x1UL << GPIO_OTYPER_OT7_Pos) /*!< 0x00000080 */ +#define GPIO_OTYPER_OT7 GPIO_OTYPER_OT7_Msk +#define GPIO_OTYPER_OT8_Pos (8U) +#define GPIO_OTYPER_OT8_Msk (0x1UL << GPIO_OTYPER_OT8_Pos) /*!< 0x00000100 */ +#define GPIO_OTYPER_OT8 GPIO_OTYPER_OT8_Msk +#define GPIO_OTYPER_OT9_Pos (9U) +#define GPIO_OTYPER_OT9_Msk (0x1UL << GPIO_OTYPER_OT9_Pos) /*!< 0x00000200 */ +#define GPIO_OTYPER_OT9 GPIO_OTYPER_OT9_Msk +#define GPIO_OTYPER_OT10_Pos (10U) +#define GPIO_OTYPER_OT10_Msk (0x1UL << GPIO_OTYPER_OT10_Pos) /*!< 0x00000400 */ +#define GPIO_OTYPER_OT10 GPIO_OTYPER_OT10_Msk +#define GPIO_OTYPER_OT11_Pos (11U) +#define GPIO_OTYPER_OT11_Msk (0x1UL << GPIO_OTYPER_OT11_Pos) /*!< 0x00000800 */ +#define GPIO_OTYPER_OT11 GPIO_OTYPER_OT11_Msk +#define GPIO_OTYPER_OT12_Pos (12U) +#define GPIO_OTYPER_OT12_Msk (0x1UL << GPIO_OTYPER_OT12_Pos) /*!< 0x00001000 */ +#define GPIO_OTYPER_OT12 GPIO_OTYPER_OT12_Msk +#define GPIO_OTYPER_OT13_Pos (13U) +#define GPIO_OTYPER_OT13_Msk (0x1UL << GPIO_OTYPER_OT13_Pos) /*!< 0x00002000 */ +#define GPIO_OTYPER_OT13 GPIO_OTYPER_OT13_Msk +#define GPIO_OTYPER_OT14_Pos (14U) +#define GPIO_OTYPER_OT14_Msk (0x1UL << GPIO_OTYPER_OT14_Pos) /*!< 0x00004000 */ +#define GPIO_OTYPER_OT14 GPIO_OTYPER_OT14_Msk +#define GPIO_OTYPER_OT15_Pos (15U) +#define GPIO_OTYPER_OT15_Msk (0x1UL << GPIO_OTYPER_OT15_Pos) /*!< 0x00008000 */ +#define GPIO_OTYPER_OT15 GPIO_OTYPER_OT15_Msk + +/****************** Bits definition for GPIO_OSPEEDR register ***************/ +#define GPIO_OSPEEDR_OSPEED0_Pos (0U) +#define GPIO_OSPEEDR_OSPEED0_Msk (0x3UL << GPIO_OSPEEDR_OSPEED0_Pos) /*!< 0x00000003 */ +#define GPIO_OSPEEDR_OSPEED0 GPIO_OSPEEDR_OSPEED0_Msk +#define GPIO_OSPEEDR_OSPEED0_0 (0x1U << GPIO_OSPEEDR_OSPEED0_Pos) /*!< 0x00000001 */ +#define GPIO_OSPEEDR_OSPEED0_1 (0x2U << GPIO_OSPEEDR_OSPEED0_Pos) /*!< 0x00000002 */ +#define GPIO_OSPEEDR_OSPEED1_Pos (2U) +#define GPIO_OSPEEDR_OSPEED1_Msk (0x3UL << GPIO_OSPEEDR_OSPEED1_Pos) /*!< 0x0000000C */ +#define GPIO_OSPEEDR_OSPEED1 GPIO_OSPEEDR_OSPEED1_Msk +#define GPIO_OSPEEDR_OSPEED1_0 (0x1U << GPIO_OSPEEDR_OSPEED1_Pos) /*!< 0x00000004 */ +#define GPIO_OSPEEDR_OSPEED1_1 (0x2U << GPIO_OSPEEDR_OSPEED1_Pos) /*!< 0x00000008 */ +#define GPIO_OSPEEDR_OSPEED2_Pos (4U) +#define GPIO_OSPEEDR_OSPEED2_Msk (0x3UL << GPIO_OSPEEDR_OSPEED2_Pos) /*!< 0x00000030 */ +#define GPIO_OSPEEDR_OSPEED2 GPIO_OSPEEDR_OSPEED2_Msk +#define GPIO_OSPEEDR_OSPEED2_0 (0x1U << GPIO_OSPEEDR_OSPEED2_Pos) /*!< 0x00000010 */ +#define GPIO_OSPEEDR_OSPEED2_1 (0x2U << GPIO_OSPEEDR_OSPEED2_Pos) /*!< 0x00000020 */ +#define GPIO_OSPEEDR_OSPEED3_Pos (6U) +#define GPIO_OSPEEDR_OSPEED3_Msk (0x3UL << GPIO_OSPEEDR_OSPEED3_Pos) /*!< 0x000000C0 */ +#define GPIO_OSPEEDR_OSPEED3 GPIO_OSPEEDR_OSPEED3_Msk +#define GPIO_OSPEEDR_OSPEED3_0 (0x1U << GPIO_OSPEEDR_OSPEED3_Pos) /*!< 0x00000040 */ +#define GPIO_OSPEEDR_OSPEED3_1 (0x2U << GPIO_OSPEEDR_OSPEED3_Pos) /*!< 0x00000080 */ +#define GPIO_OSPEEDR_OSPEED4_Pos (8U) +#define GPIO_OSPEEDR_OSPEED4_Msk (0x3UL << GPIO_OSPEEDR_OSPEED4_Pos) /*!< 0x00000300 */ +#define GPIO_OSPEEDR_OSPEED4 GPIO_OSPEEDR_OSPEED4_Msk +#define GPIO_OSPEEDR_OSPEED4_0 (0x1U << GPIO_OSPEEDR_OSPEED4_Pos) /*!< 0x00000100 */ +#define GPIO_OSPEEDR_OSPEED4_1 (0x2U << GPIO_OSPEEDR_OSPEED4_Pos) /*!< 0x00000200 */ +#define GPIO_OSPEEDR_OSPEED5_Pos (10U) +#define GPIO_OSPEEDR_OSPEED5_Msk (0x3UL << GPIO_OSPEEDR_OSPEED5_Pos) /*!< 0x00000C00 */ +#define GPIO_OSPEEDR_OSPEED5 GPIO_OSPEEDR_OSPEED5_Msk +#define GPIO_OSPEEDR_OSPEED5_0 (0x1U << GPIO_OSPEEDR_OSPEED5_Pos) /*!< 0x00000400 */ +#define GPIO_OSPEEDR_OSPEED5_1 (0x2U << GPIO_OSPEEDR_OSPEED5_Pos) /*!< 0x00000800 */ +#define GPIO_OSPEEDR_OSPEED6_Pos (12U) +#define GPIO_OSPEEDR_OSPEED6_Msk (0x3UL << GPIO_OSPEEDR_OSPEED6_Pos) /*!< 0x00003000 */ +#define GPIO_OSPEEDR_OSPEED6 GPIO_OSPEEDR_OSPEED6_Msk +#define GPIO_OSPEEDR_OSPEED6_0 (0x1U << GPIO_OSPEEDR_OSPEED6_Pos) /*!< 0x00001000 */ +#define GPIO_OSPEEDR_OSPEED6_1 (0x2U << GPIO_OSPEEDR_OSPEED6_Pos) /*!< 0x00002000 */ +#define GPIO_OSPEEDR_OSPEED7_Pos (14U) +#define GPIO_OSPEEDR_OSPEED7_Msk (0x3UL << GPIO_OSPEEDR_OSPEED7_Pos) /*!< 0x0000C000 */ +#define GPIO_OSPEEDR_OSPEED7 GPIO_OSPEEDR_OSPEED7_Msk +#define GPIO_OSPEEDR_OSPEED7_0 (0x1U << GPIO_OSPEEDR_OSPEED7_Pos) /*!< 0x00004000 */ +#define GPIO_OSPEEDR_OSPEED7_1 (0x2U << GPIO_OSPEEDR_OSPEED7_Pos) /*!< 0x00008000 */ +#define GPIO_OSPEEDR_OSPEED8_Pos (16U) +#define GPIO_OSPEEDR_OSPEED8_Msk (0x3UL << GPIO_OSPEEDR_OSPEED8_Pos) /*!< 0x00030000 */ +#define GPIO_OSPEEDR_OSPEED8 GPIO_OSPEEDR_OSPEED8_Msk +#define GPIO_OSPEEDR_OSPEED8_0 (0x1U << GPIO_OSPEEDR_OSPEED8_Pos) /*!< 0x00010000 */ +#define GPIO_OSPEEDR_OSPEED8_1 (0x2U << GPIO_OSPEEDR_OSPEED8_Pos) /*!< 0x00020000 */ +#define GPIO_OSPEEDR_OSPEED9_Pos (18U) +#define GPIO_OSPEEDR_OSPEED9_Msk (0x3UL << GPIO_OSPEEDR_OSPEED9_Pos) /*!< 0x000C0000 */ +#define GPIO_OSPEEDR_OSPEED9 GPIO_OSPEEDR_OSPEED9_Msk +#define GPIO_OSPEEDR_OSPEED9_0 (0x1U << GPIO_OSPEEDR_OSPEED9_Pos) /*!< 0x00040000 */ +#define GPIO_OSPEEDR_OSPEED9_1 (0x2U << GPIO_OSPEEDR_OSPEED9_Pos) /*!< 0x00080000 */ +#define GPIO_OSPEEDR_OSPEED10_Pos (20U) +#define GPIO_OSPEEDR_OSPEED10_Msk (0x3UL << GPIO_OSPEEDR_OSPEED10_Pos) /*!< 0x00300000 */ +#define GPIO_OSPEEDR_OSPEED10 GPIO_OSPEEDR_OSPEED10_Msk +#define GPIO_OSPEEDR_OSPEED10_0 (0x1U << GPIO_OSPEEDR_OSPEED10_Pos) /*!< 0x00100000 */ +#define GPIO_OSPEEDR_OSPEED10_1 (0x2U << GPIO_OSPEEDR_OSPEED10_Pos) /*!< 0x00200000 */ +#define GPIO_OSPEEDR_OSPEED11_Pos (22U) +#define GPIO_OSPEEDR_OSPEED11_Msk (0x3UL << GPIO_OSPEEDR_OSPEED11_Pos) /*!< 0x00C00000 */ +#define GPIO_OSPEEDR_OSPEED11 GPIO_OSPEEDR_OSPEED11_Msk +#define GPIO_OSPEEDR_OSPEED11_0 (0x1U << GPIO_OSPEEDR_OSPEED11_Pos) /*!< 0x00400000 */ +#define GPIO_OSPEEDR_OSPEED11_1 (0x2U << GPIO_OSPEEDR_OSPEED11_Pos) /*!< 0x00800000 */ +#define GPIO_OSPEEDR_OSPEED12_Pos (24U) +#define GPIO_OSPEEDR_OSPEED12_Msk (0x3UL << GPIO_OSPEEDR_OSPEED12_Pos) /*!< 0x03000000 */ +#define GPIO_OSPEEDR_OSPEED12 GPIO_OSPEEDR_OSPEED12_Msk +#define GPIO_OSPEEDR_OSPEED12_0 (0x1U << GPIO_OSPEEDR_OSPEED12_Pos) /*!< 0x01000000 */ +#define GPIO_OSPEEDR_OSPEED12_1 (0x2U << GPIO_OSPEEDR_OSPEED12_Pos) /*!< 0x02000000 */ +#define GPIO_OSPEEDR_OSPEED13_Pos (26U) +#define GPIO_OSPEEDR_OSPEED13_Msk (0x3UL << GPIO_OSPEEDR_OSPEED13_Pos) /*!< 0x0C000000 */ +#define GPIO_OSPEEDR_OSPEED13 GPIO_OSPEEDR_OSPEED13_Msk +#define GPIO_OSPEEDR_OSPEED13_0 (0x1U << GPIO_OSPEEDR_OSPEED13_Pos) /*!< 0x04000000 */ +#define GPIO_OSPEEDR_OSPEED13_1 (0x2U << GPIO_OSPEEDR_OSPEED13_Pos) /*!< 0x08000000 */ +#define GPIO_OSPEEDR_OSPEED14_Pos (28U) +#define GPIO_OSPEEDR_OSPEED14_Msk (0x3UL << GPIO_OSPEEDR_OSPEED14_Pos) /*!< 0x30000000 */ +#define GPIO_OSPEEDR_OSPEED14 GPIO_OSPEEDR_OSPEED14_Msk +#define GPIO_OSPEEDR_OSPEED14_0 (0x1U << GPIO_OSPEEDR_OSPEED14_Pos) /*!< 0x10000000 */ +#define GPIO_OSPEEDR_OSPEED14_1 (0x2U << GPIO_OSPEEDR_OSPEED14_Pos) /*!< 0x20000000 */ +#define GPIO_OSPEEDR_OSPEED15_Pos (30U) +#define GPIO_OSPEEDR_OSPEED15_Msk (0x3UL << GPIO_OSPEEDR_OSPEED15_Pos) /*!< 0xC0000000 */ +#define GPIO_OSPEEDR_OSPEED15 GPIO_OSPEEDR_OSPEED15_Msk +#define GPIO_OSPEEDR_OSPEED15_0 (0x1U << GPIO_OSPEEDR_OSPEED15_Pos) /*!< 0x40000000 */ +#define GPIO_OSPEEDR_OSPEED15_1 (0x2U << GPIO_OSPEEDR_OSPEED15_Pos) /*!< 0x80000000 */ + +/****************** Bits definition for GPIO_PUPDR register *****************/ +#define GPIO_PUPDR_PUPD0_Pos (0U) +#define GPIO_PUPDR_PUPD0_Msk (0x3UL << GPIO_PUPDR_PUPD0_Pos) /*!< 0x00000003 */ +#define GPIO_PUPDR_PUPD0 GPIO_PUPDR_PUPD0_Msk +#define GPIO_PUPDR_PUPD0_0 (0x1U << GPIO_PUPDR_PUPD0_Pos) /*!< 0x00000001 */ +#define GPIO_PUPDR_PUPD0_1 (0x2U << GPIO_PUPDR_PUPD0_Pos) /*!< 0x00000002 */ +#define GPIO_PUPDR_PUPD1_Pos (2U) +#define GPIO_PUPDR_PUPD1_Msk (0x3UL << GPIO_PUPDR_PUPD1_Pos) /*!< 0x0000000C */ +#define GPIO_PUPDR_PUPD1 GPIO_PUPDR_PUPD1_Msk +#define GPIO_PUPDR_PUPD1_0 (0x1U << GPIO_PUPDR_PUPD1_Pos) /*!< 0x00000004 */ +#define GPIO_PUPDR_PUPD1_1 (0x2U << GPIO_PUPDR_PUPD1_Pos) /*!< 0x00000008 */ +#define GPIO_PUPDR_PUPD2_Pos (4U) +#define GPIO_PUPDR_PUPD2_Msk (0x3UL << GPIO_PUPDR_PUPD2_Pos) /*!< 0x00000030 */ +#define GPIO_PUPDR_PUPD2 GPIO_PUPDR_PUPD2_Msk +#define GPIO_PUPDR_PUPD2_0 (0x1U << GPIO_PUPDR_PUPD2_Pos) /*!< 0x00000010 */ +#define GPIO_PUPDR_PUPD2_1 (0x2U << GPIO_PUPDR_PUPD2_Pos) /*!< 0x00000020 */ +#define GPIO_PUPDR_PUPD3_Pos (6U) +#define GPIO_PUPDR_PUPD3_Msk (0x3UL << GPIO_PUPDR_PUPD3_Pos) /*!< 0x000000C0 */ +#define GPIO_PUPDR_PUPD3 GPIO_PUPDR_PUPD3_Msk +#define GPIO_PUPDR_PUPD3_0 (0x1U << GPIO_PUPDR_PUPD3_Pos) /*!< 0x00000040 */ +#define GPIO_PUPDR_PUPD3_1 (0x2U << GPIO_PUPDR_PUPD3_Pos) /*!< 0x00000080 */ +#define GPIO_PUPDR_PUPD4_Pos (8U) +#define GPIO_PUPDR_PUPD4_Msk (0x3UL << GPIO_PUPDR_PUPD4_Pos) /*!< 0x00000300 */ +#define GPIO_PUPDR_PUPD4 GPIO_PUPDR_PUPD4_Msk +#define GPIO_PUPDR_PUPD4_0 (0x1U << GPIO_PUPDR_PUPD4_Pos) /*!< 0x00000100 */ +#define GPIO_PUPDR_PUPD4_1 (0x2U << GPIO_PUPDR_PUPD4_Pos) /*!< 0x00000200 */ +#define GPIO_PUPDR_PUPD5_Pos (10U) +#define GPIO_PUPDR_PUPD5_Msk (0x3UL << GPIO_PUPDR_PUPD5_Pos) /*!< 0x00000C00 */ +#define GPIO_PUPDR_PUPD5 GPIO_PUPDR_PUPD5_Msk +#define GPIO_PUPDR_PUPD5_0 (0x1U << GPIO_PUPDR_PUPD5_Pos) /*!< 0x00000400 */ +#define GPIO_PUPDR_PUPD5_1 (0x2U << GPIO_PUPDR_PUPD5_Pos) /*!< 0x00000800 */ +#define GPIO_PUPDR_PUPD6_Pos (12U) +#define GPIO_PUPDR_PUPD6_Msk (0x3UL << GPIO_PUPDR_PUPD6_Pos) /*!< 0x00003000 */ +#define GPIO_PUPDR_PUPD6 GPIO_PUPDR_PUPD6_Msk +#define GPIO_PUPDR_PUPD6_0 (0x1U << GPIO_PUPDR_PUPD6_Pos) /*!< 0x00001000 */ +#define GPIO_PUPDR_PUPD6_1 (0x2U << GPIO_PUPDR_PUPD6_Pos) /*!< 0x00002000 */ +#define GPIO_PUPDR_PUPD7_Pos (14U) +#define GPIO_PUPDR_PUPD7_Msk (0x3UL << GPIO_PUPDR_PUPD7_Pos) /*!< 0x0000C000 */ +#define GPIO_PUPDR_PUPD7 GPIO_PUPDR_PUPD7_Msk +#define GPIO_PUPDR_PUPD7_0 (0x1U << GPIO_PUPDR_PUPD7_Pos) /*!< 0x00004000 */ +#define GPIO_PUPDR_PUPD7_1 (0x2U << GPIO_PUPDR_PUPD7_Pos) /*!< 0x00008000 */ +#define GPIO_PUPDR_PUPD8_Pos (16U) +#define GPIO_PUPDR_PUPD8_Msk (0x3UL << GPIO_PUPDR_PUPD8_Pos) /*!< 0x00030000 */ +#define GPIO_PUPDR_PUPD8 GPIO_PUPDR_PUPD8_Msk +#define GPIO_PUPDR_PUPD8_0 (0x1U << GPIO_PUPDR_PUPD8_Pos) /*!< 0x00010000 */ +#define GPIO_PUPDR_PUPD8_1 (0x2U << GPIO_PUPDR_PUPD8_Pos) /*!< 0x00020000 */ +#define GPIO_PUPDR_PUPD9_Pos (18U) +#define GPIO_PUPDR_PUPD9_Msk (0x3UL << GPIO_PUPDR_PUPD9_Pos) /*!< 0x000C0000 */ +#define GPIO_PUPDR_PUPD9 GPIO_PUPDR_PUPD9_Msk +#define GPIO_PUPDR_PUPD9_0 (0x1U << GPIO_PUPDR_PUPD9_Pos) /*!< 0x00040000 */ +#define GPIO_PUPDR_PUPD9_1 (0x2U << GPIO_PUPDR_PUPD9_Pos) /*!< 0x00080000 */ +#define GPIO_PUPDR_PUPD10_Pos (20U) +#define GPIO_PUPDR_PUPD10_Msk (0x3UL << GPIO_PUPDR_PUPD10_Pos) /*!< 0x00300000 */ +#define GPIO_PUPDR_PUPD10 GPIO_PUPDR_PUPD10_Msk +#define GPIO_PUPDR_PUPD10_0 (0x1U << GPIO_PUPDR_PUPD10_Pos) /*!< 0x00100000 */ +#define GPIO_PUPDR_PUPD10_1 (0x2U << GPIO_PUPDR_PUPD10_Pos) /*!< 0x00200000 */ +#define GPIO_PUPDR_PUPD11_Pos (22U) +#define GPIO_PUPDR_PUPD11_Msk (0x3UL << GPIO_PUPDR_PUPD11_Pos) /*!< 0x00C00000 */ +#define GPIO_PUPDR_PUPD11 GPIO_PUPDR_PUPD11_Msk +#define GPIO_PUPDR_PUPD11_0 (0x1U << GPIO_PUPDR_PUPD11_Pos) /*!< 0x00400000 */ +#define GPIO_PUPDR_PUPD11_1 (0x2U << GPIO_PUPDR_PUPD11_Pos) /*!< 0x00800000 */ +#define GPIO_PUPDR_PUPD12_Pos (24U) +#define GPIO_PUPDR_PUPD12_Msk (0x3UL << GPIO_PUPDR_PUPD12_Pos) /*!< 0x03000000 */ +#define GPIO_PUPDR_PUPD12 GPIO_PUPDR_PUPD12_Msk +#define GPIO_PUPDR_PUPD12_0 (0x1U << GPIO_PUPDR_PUPD12_Pos) /*!< 0x01000000 */ +#define GPIO_PUPDR_PUPD12_1 (0x2U << GPIO_PUPDR_PUPD12_Pos) /*!< 0x02000000 */ +#define GPIO_PUPDR_PUPD13_Pos (26U) +#define GPIO_PUPDR_PUPD13_Msk (0x3UL << GPIO_PUPDR_PUPD13_Pos) /*!< 0x0C000000 */ +#define GPIO_PUPDR_PUPD13 GPIO_PUPDR_PUPD13_Msk +#define GPIO_PUPDR_PUPD13_0 (0x1U << GPIO_PUPDR_PUPD13_Pos) /*!< 0x04000000 */ +#define GPIO_PUPDR_PUPD13_1 (0x2U << GPIO_PUPDR_PUPD13_Pos) /*!< 0x08000000 */ +#define GPIO_PUPDR_PUPD14_Pos (28U) +#define GPIO_PUPDR_PUPD14_Msk (0x3UL << GPIO_PUPDR_PUPD14_Pos) /*!< 0x30000000 */ +#define GPIO_PUPDR_PUPD14 GPIO_PUPDR_PUPD14_Msk +#define GPIO_PUPDR_PUPD14_0 (0x1U << GPIO_PUPDR_PUPD14_Pos) /*!< 0x10000000 */ +#define GPIO_PUPDR_PUPD14_1 (0x2U << GPIO_PUPDR_PUPD14_Pos) /*!< 0x20000000 */ +#define GPIO_PUPDR_PUPD15_Pos (30U) +#define GPIO_PUPDR_PUPD15_Msk (0x3UL << GPIO_PUPDR_PUPD15_Pos) /*!< 0xC0000000 */ +#define GPIO_PUPDR_PUPD15 GPIO_PUPDR_PUPD15_Msk +#define GPIO_PUPDR_PUPD15_0 (0x1U << GPIO_PUPDR_PUPD15_Pos) /*!< 0x40000000 */ +#define GPIO_PUPDR_PUPD15_1 (0x2U << GPIO_PUPDR_PUPD15_Pos) /*!< 0x80000000 */ + +/****************** Bits definition for GPIO_IDR register *******************/ +#define GPIO_IDR_ID0_Pos (0U) +#define GPIO_IDR_ID0_Msk (0x1UL << GPIO_IDR_ID0_Pos) /*!< 0x00000001 */ +#define GPIO_IDR_ID0 GPIO_IDR_ID0_Msk +#define GPIO_IDR_ID1_Pos (1U) +#define GPIO_IDR_ID1_Msk (0x1UL << GPIO_IDR_ID1_Pos) /*!< 0x00000002 */ +#define GPIO_IDR_ID1 GPIO_IDR_ID1_Msk +#define GPIO_IDR_ID2_Pos (2U) +#define GPIO_IDR_ID2_Msk (0x1UL << GPIO_IDR_ID2_Pos) /*!< 0x00000004 */ +#define GPIO_IDR_ID2 GPIO_IDR_ID2_Msk +#define GPIO_IDR_ID3_Pos (3U) +#define GPIO_IDR_ID3_Msk (0x1UL << GPIO_IDR_ID3_Pos) /*!< 0x00000008 */ +#define GPIO_IDR_ID3 GPIO_IDR_ID3_Msk +#define GPIO_IDR_ID4_Pos (4U) +#define GPIO_IDR_ID4_Msk (0x1UL << GPIO_IDR_ID4_Pos) /*!< 0x00000010 */ +#define GPIO_IDR_ID4 GPIO_IDR_ID4_Msk +#define GPIO_IDR_ID5_Pos (5U) +#define GPIO_IDR_ID5_Msk (0x1UL << GPIO_IDR_ID5_Pos) /*!< 0x00000020 */ +#define GPIO_IDR_ID5 GPIO_IDR_ID5_Msk +#define GPIO_IDR_ID6_Pos (6U) +#define GPIO_IDR_ID6_Msk (0x1UL << GPIO_IDR_ID6_Pos) /*!< 0x00000040 */ +#define GPIO_IDR_ID6 GPIO_IDR_ID6_Msk +#define GPIO_IDR_ID7_Pos (7U) +#define GPIO_IDR_ID7_Msk (0x1UL << GPIO_IDR_ID7_Pos) /*!< 0x00000080 */ +#define GPIO_IDR_ID7 GPIO_IDR_ID7_Msk +#define GPIO_IDR_ID8_Pos (8U) +#define GPIO_IDR_ID8_Msk (0x1UL << GPIO_IDR_ID8_Pos) /*!< 0x00000100 */ +#define GPIO_IDR_ID8 GPIO_IDR_ID8_Msk +#define GPIO_IDR_ID9_Pos (9U) +#define GPIO_IDR_ID9_Msk (0x1UL << GPIO_IDR_ID9_Pos) /*!< 0x00000200 */ +#define GPIO_IDR_ID9 GPIO_IDR_ID9_Msk +#define GPIO_IDR_ID10_Pos (10U) +#define GPIO_IDR_ID10_Msk (0x1UL << GPIO_IDR_ID10_Pos) /*!< 0x00000400 */ +#define GPIO_IDR_ID10 GPIO_IDR_ID10_Msk +#define GPIO_IDR_ID11_Pos (11U) +#define GPIO_IDR_ID11_Msk (0x1UL << GPIO_IDR_ID11_Pos) /*!< 0x00000800 */ +#define GPIO_IDR_ID11 GPIO_IDR_ID11_Msk +#define GPIO_IDR_ID12_Pos (12U) +#define GPIO_IDR_ID12_Msk (0x1UL << GPIO_IDR_ID12_Pos) /*!< 0x00001000 */ +#define GPIO_IDR_ID12 GPIO_IDR_ID12_Msk +#define GPIO_IDR_ID13_Pos (13U) +#define GPIO_IDR_ID13_Msk (0x1UL << GPIO_IDR_ID13_Pos) /*!< 0x00002000 */ +#define GPIO_IDR_ID13 GPIO_IDR_ID13_Msk +#define GPIO_IDR_ID14_Pos (14U) +#define GPIO_IDR_ID14_Msk (0x1UL << GPIO_IDR_ID14_Pos) /*!< 0x00004000 */ +#define GPIO_IDR_ID14 GPIO_IDR_ID14_Msk +#define GPIO_IDR_ID15_Pos (15U) +#define GPIO_IDR_ID15_Msk (0x1UL << GPIO_IDR_ID15_Pos) /*!< 0x00008000 */ +#define GPIO_IDR_ID15 GPIO_IDR_ID15_Msk + +/****************** Bits definition for GPIO_ODR register *******************/ +#define GPIO_ODR_OD0_Pos (0U) +#define GPIO_ODR_OD0_Msk (0x1UL << GPIO_ODR_OD0_Pos) /*!< 0x00000001 */ +#define GPIO_ODR_OD0 GPIO_ODR_OD0_Msk +#define GPIO_ODR_OD1_Pos (1U) +#define GPIO_ODR_OD1_Msk (0x1UL << GPIO_ODR_OD1_Pos) /*!< 0x00000002 */ +#define GPIO_ODR_OD1 GPIO_ODR_OD1_Msk +#define GPIO_ODR_OD2_Pos (2U) +#define GPIO_ODR_OD2_Msk (0x1UL << GPIO_ODR_OD2_Pos) /*!< 0x00000004 */ +#define GPIO_ODR_OD2 GPIO_ODR_OD2_Msk +#define GPIO_ODR_OD3_Pos (3U) +#define GPIO_ODR_OD3_Msk (0x1UL << GPIO_ODR_OD3_Pos) /*!< 0x00000008 */ +#define GPIO_ODR_OD3 GPIO_ODR_OD3_Msk +#define GPIO_ODR_OD4_Pos (4U) +#define GPIO_ODR_OD4_Msk (0x1UL << GPIO_ODR_OD4_Pos) /*!< 0x00000010 */ +#define GPIO_ODR_OD4 GPIO_ODR_OD4_Msk +#define GPIO_ODR_OD5_Pos (5U) +#define GPIO_ODR_OD5_Msk (0x1UL << GPIO_ODR_OD5_Pos) /*!< 0x00000020 */ +#define GPIO_ODR_OD5 GPIO_ODR_OD5_Msk +#define GPIO_ODR_OD6_Pos (6U) +#define GPIO_ODR_OD6_Msk (0x1UL << GPIO_ODR_OD6_Pos) /*!< 0x00000040 */ +#define GPIO_ODR_OD6 GPIO_ODR_OD6_Msk +#define GPIO_ODR_OD7_Pos (7U) +#define GPIO_ODR_OD7_Msk (0x1UL << GPIO_ODR_OD7_Pos) /*!< 0x00000080 */ +#define GPIO_ODR_OD7 GPIO_ODR_OD7_Msk +#define GPIO_ODR_OD8_Pos (8U) +#define GPIO_ODR_OD8_Msk (0x1UL << GPIO_ODR_OD8_Pos) /*!< 0x00000100 */ +#define GPIO_ODR_OD8 GPIO_ODR_OD8_Msk +#define GPIO_ODR_OD9_Pos (9U) +#define GPIO_ODR_OD9_Msk (0x1UL << GPIO_ODR_OD9_Pos) /*!< 0x00000200 */ +#define GPIO_ODR_OD9 GPIO_ODR_OD9_Msk +#define GPIO_ODR_OD10_Pos (10U) +#define GPIO_ODR_OD10_Msk (0x1UL << GPIO_ODR_OD10_Pos) /*!< 0x00000400 */ +#define GPIO_ODR_OD10 GPIO_ODR_OD10_Msk +#define GPIO_ODR_OD11_Pos (11U) +#define GPIO_ODR_OD11_Msk (0x1UL << GPIO_ODR_OD11_Pos) /*!< 0x00000800 */ +#define GPIO_ODR_OD11 GPIO_ODR_OD11_Msk +#define GPIO_ODR_OD12_Pos (12U) +#define GPIO_ODR_OD12_Msk (0x1UL << GPIO_ODR_OD12_Pos) /*!< 0x00001000 */ +#define GPIO_ODR_OD12 GPIO_ODR_OD12_Msk +#define GPIO_ODR_OD13_Pos (13U) +#define GPIO_ODR_OD13_Msk (0x1UL << GPIO_ODR_OD13_Pos) /*!< 0x00002000 */ +#define GPIO_ODR_OD13 GPIO_ODR_OD13_Msk +#define GPIO_ODR_OD14_Pos (14U) +#define GPIO_ODR_OD14_Msk (0x1UL << GPIO_ODR_OD14_Pos) /*!< 0x00004000 */ +#define GPIO_ODR_OD14 GPIO_ODR_OD14_Msk +#define GPIO_ODR_OD15_Pos (15U) +#define GPIO_ODR_OD15_Msk (0x1UL << GPIO_ODR_OD15_Pos) /*!< 0x00008000 */ +#define GPIO_ODR_OD15 GPIO_ODR_OD15_Msk + +/****************** Bits definition for GPIO_BSRR register ******************/ +#define GPIO_BSRR_BS0_Pos (0U) +#define GPIO_BSRR_BS0_Msk (0x1UL << GPIO_BSRR_BS0_Pos) /*!< 0x00000001 */ +#define GPIO_BSRR_BS0 GPIO_BSRR_BS0_Msk +#define GPIO_BSRR_BS1_Pos (1U) +#define GPIO_BSRR_BS1_Msk (0x1UL << GPIO_BSRR_BS1_Pos) /*!< 0x00000002 */ +#define GPIO_BSRR_BS1 GPIO_BSRR_BS1_Msk +#define GPIO_BSRR_BS2_Pos (2U) +#define GPIO_BSRR_BS2_Msk (0x1UL << GPIO_BSRR_BS2_Pos) /*!< 0x00000004 */ +#define GPIO_BSRR_BS2 GPIO_BSRR_BS2_Msk +#define GPIO_BSRR_BS3_Pos (3U) +#define GPIO_BSRR_BS3_Msk (0x1UL << GPIO_BSRR_BS3_Pos) /*!< 0x00000008 */ +#define GPIO_BSRR_BS3 GPIO_BSRR_BS3_Msk +#define GPIO_BSRR_BS4_Pos (4U) +#define GPIO_BSRR_BS4_Msk (0x1UL << GPIO_BSRR_BS4_Pos) /*!< 0x00000010 */ +#define GPIO_BSRR_BS4 GPIO_BSRR_BS4_Msk +#define GPIO_BSRR_BS5_Pos (5U) +#define GPIO_BSRR_BS5_Msk (0x1UL << GPIO_BSRR_BS5_Pos) /*!< 0x00000020 */ +#define GPIO_BSRR_BS5 GPIO_BSRR_BS5_Msk +#define GPIO_BSRR_BS6_Pos (6U) +#define GPIO_BSRR_BS6_Msk (0x1UL << GPIO_BSRR_BS6_Pos) /*!< 0x00000040 */ +#define GPIO_BSRR_BS6 GPIO_BSRR_BS6_Msk +#define GPIO_BSRR_BS7_Pos (7U) +#define GPIO_BSRR_BS7_Msk (0x1UL << GPIO_BSRR_BS7_Pos) /*!< 0x00000080 */ +#define GPIO_BSRR_BS7 GPIO_BSRR_BS7_Msk +#define GPIO_BSRR_BS8_Pos (8U) +#define GPIO_BSRR_BS8_Msk (0x1UL << GPIO_BSRR_BS8_Pos) /*!< 0x00000100 */ +#define GPIO_BSRR_BS8 GPIO_BSRR_BS8_Msk +#define GPIO_BSRR_BS9_Pos (9U) +#define GPIO_BSRR_BS9_Msk (0x1UL << GPIO_BSRR_BS9_Pos) /*!< 0x00000200 */ +#define GPIO_BSRR_BS9 GPIO_BSRR_BS9_Msk +#define GPIO_BSRR_BS10_Pos (10U) +#define GPIO_BSRR_BS10_Msk (0x1UL << GPIO_BSRR_BS10_Pos) /*!< 0x00000400 */ +#define GPIO_BSRR_BS10 GPIO_BSRR_BS10_Msk +#define GPIO_BSRR_BS11_Pos (11U) +#define GPIO_BSRR_BS11_Msk (0x1UL << GPIO_BSRR_BS11_Pos) /*!< 0x00000800 */ +#define GPIO_BSRR_BS11 GPIO_BSRR_BS11_Msk +#define GPIO_BSRR_BS12_Pos (12U) +#define GPIO_BSRR_BS12_Msk (0x1UL << GPIO_BSRR_BS12_Pos) /*!< 0x00001000 */ +#define GPIO_BSRR_BS12 GPIO_BSRR_BS12_Msk +#define GPIO_BSRR_BS13_Pos (13U) +#define GPIO_BSRR_BS13_Msk (0x1UL << GPIO_BSRR_BS13_Pos) /*!< 0x00002000 */ +#define GPIO_BSRR_BS13 GPIO_BSRR_BS13_Msk +#define GPIO_BSRR_BS14_Pos (14U) +#define GPIO_BSRR_BS14_Msk (0x1UL << GPIO_BSRR_BS14_Pos) /*!< 0x00004000 */ +#define GPIO_BSRR_BS14 GPIO_BSRR_BS14_Msk +#define GPIO_BSRR_BS15_Pos (15U) +#define GPIO_BSRR_BS15_Msk (0x1UL << GPIO_BSRR_BS15_Pos) /*!< 0x00008000 */ +#define GPIO_BSRR_BS15 GPIO_BSRR_BS15_Msk +#define GPIO_BSRR_BR0_Pos (16U) +#define GPIO_BSRR_BR0_Msk (0x1UL << GPIO_BSRR_BR0_Pos) /*!< 0x00010000 */ +#define GPIO_BSRR_BR0 GPIO_BSRR_BR0_Msk +#define GPIO_BSRR_BR1_Pos (17U) +#define GPIO_BSRR_BR1_Msk (0x1UL << GPIO_BSRR_BR1_Pos) /*!< 0x00020000 */ +#define GPIO_BSRR_BR1 GPIO_BSRR_BR1_Msk +#define GPIO_BSRR_BR2_Pos (18U) +#define GPIO_BSRR_BR2_Msk (0x1UL << GPIO_BSRR_BR2_Pos) /*!< 0x00040000 */ +#define GPIO_BSRR_BR2 GPIO_BSRR_BR2_Msk +#define GPIO_BSRR_BR3_Pos (19U) +#define GPIO_BSRR_BR3_Msk (0x1UL << GPIO_BSRR_BR3_Pos) /*!< 0x00080000 */ +#define GPIO_BSRR_BR3 GPIO_BSRR_BR3_Msk +#define GPIO_BSRR_BR4_Pos (20U) +#define GPIO_BSRR_BR4_Msk (0x1UL << GPIO_BSRR_BR4_Pos) /*!< 0x00100000 */ +#define GPIO_BSRR_BR4 GPIO_BSRR_BR4_Msk +#define GPIO_BSRR_BR5_Pos (21U) +#define GPIO_BSRR_BR5_Msk (0x1UL << GPIO_BSRR_BR5_Pos) /*!< 0x00200000 */ +#define GPIO_BSRR_BR5 GPIO_BSRR_BR5_Msk +#define GPIO_BSRR_BR6_Pos (22U) +#define GPIO_BSRR_BR6_Msk (0x1UL << GPIO_BSRR_BR6_Pos) /*!< 0x00400000 */ +#define GPIO_BSRR_BR6 GPIO_BSRR_BR6_Msk +#define GPIO_BSRR_BR7_Pos (23U) +#define GPIO_BSRR_BR7_Msk (0x1UL << GPIO_BSRR_BR7_Pos) /*!< 0x00800000 */ +#define GPIO_BSRR_BR7 GPIO_BSRR_BR7_Msk +#define GPIO_BSRR_BR8_Pos (24U) +#define GPIO_BSRR_BR8_Msk (0x1UL << GPIO_BSRR_BR8_Pos) /*!< 0x01000000 */ +#define GPIO_BSRR_BR8 GPIO_BSRR_BR8_Msk +#define GPIO_BSRR_BR9_Pos (25U) +#define GPIO_BSRR_BR9_Msk (0x1UL << GPIO_BSRR_BR9_Pos) /*!< 0x02000000 */ +#define GPIO_BSRR_BR9 GPIO_BSRR_BR9_Msk +#define GPIO_BSRR_BR10_Pos (26U) +#define GPIO_BSRR_BR10_Msk (0x1UL << GPIO_BSRR_BR10_Pos) /*!< 0x04000000 */ +#define GPIO_BSRR_BR10 GPIO_BSRR_BR10_Msk +#define GPIO_BSRR_BR11_Pos (27U) +#define GPIO_BSRR_BR11_Msk (0x1UL << GPIO_BSRR_BR11_Pos) /*!< 0x08000000 */ +#define GPIO_BSRR_BR11 GPIO_BSRR_BR11_Msk +#define GPIO_BSRR_BR12_Pos (28U) +#define GPIO_BSRR_BR12_Msk (0x1UL << GPIO_BSRR_BR12_Pos) /*!< 0x10000000 */ +#define GPIO_BSRR_BR12 GPIO_BSRR_BR12_Msk +#define GPIO_BSRR_BR13_Pos (29U) +#define GPIO_BSRR_BR13_Msk (0x1UL << GPIO_BSRR_BR13_Pos) /*!< 0x20000000 */ +#define GPIO_BSRR_BR13 GPIO_BSRR_BR13_Msk +#define GPIO_BSRR_BR14_Pos (30U) +#define GPIO_BSRR_BR14_Msk (0x1UL << GPIO_BSRR_BR14_Pos) /*!< 0x40000000 */ +#define GPIO_BSRR_BR14 GPIO_BSRR_BR14_Msk +#define GPIO_BSRR_BR15_Pos (31U) +#define GPIO_BSRR_BR15_Msk (0x1UL << GPIO_BSRR_BR15_Pos) /*!< 0x80000000 */ +#define GPIO_BSRR_BR15 GPIO_BSRR_BR15_Msk + +/****************** Bit definition for GPIO_LCKR register *********************/ +#define GPIO_LCKR_LCK0_Pos (0U) +#define GPIO_LCKR_LCK0_Msk (0x1UL << GPIO_LCKR_LCK0_Pos) /*!< 0x00000001 */ +#define GPIO_LCKR_LCK0 GPIO_LCKR_LCK0_Msk +#define GPIO_LCKR_LCK1_Pos (1U) +#define GPIO_LCKR_LCK1_Msk (0x1UL << GPIO_LCKR_LCK1_Pos) /*!< 0x00000002 */ +#define GPIO_LCKR_LCK1 GPIO_LCKR_LCK1_Msk +#define GPIO_LCKR_LCK2_Pos (2U) +#define GPIO_LCKR_LCK2_Msk (0x1UL << GPIO_LCKR_LCK2_Pos) /*!< 0x00000004 */ +#define GPIO_LCKR_LCK2 GPIO_LCKR_LCK2_Msk +#define GPIO_LCKR_LCK3_Pos (3U) +#define GPIO_LCKR_LCK3_Msk (0x1UL << GPIO_LCKR_LCK3_Pos) /*!< 0x00000008 */ +#define GPIO_LCKR_LCK3 GPIO_LCKR_LCK3_Msk +#define GPIO_LCKR_LCK4_Pos (4U) +#define GPIO_LCKR_LCK4_Msk (0x1UL << GPIO_LCKR_LCK4_Pos) /*!< 0x00000010 */ +#define GPIO_LCKR_LCK4 GPIO_LCKR_LCK4_Msk +#define GPIO_LCKR_LCK5_Pos (5U) +#define GPIO_LCKR_LCK5_Msk (0x1UL << GPIO_LCKR_LCK5_Pos) /*!< 0x00000020 */ +#define GPIO_LCKR_LCK5 GPIO_LCKR_LCK5_Msk +#define GPIO_LCKR_LCK6_Pos (6U) +#define GPIO_LCKR_LCK6_Msk (0x1UL << GPIO_LCKR_LCK6_Pos) /*!< 0x00000040 */ +#define GPIO_LCKR_LCK6 GPIO_LCKR_LCK6_Msk +#define GPIO_LCKR_LCK7_Pos (7U) +#define GPIO_LCKR_LCK7_Msk (0x1UL << GPIO_LCKR_LCK7_Pos) /*!< 0x00000080 */ +#define GPIO_LCKR_LCK7 GPIO_LCKR_LCK7_Msk +#define GPIO_LCKR_LCK8_Pos (8U) +#define GPIO_LCKR_LCK8_Msk (0x1UL << GPIO_LCKR_LCK8_Pos) /*!< 0x00000100 */ +#define GPIO_LCKR_LCK8 GPIO_LCKR_LCK8_Msk +#define GPIO_LCKR_LCK9_Pos (9U) +#define GPIO_LCKR_LCK9_Msk (0x1UL << GPIO_LCKR_LCK9_Pos) /*!< 0x00000200 */ +#define GPIO_LCKR_LCK9 GPIO_LCKR_LCK9_Msk +#define GPIO_LCKR_LCK10_Pos (10U) +#define GPIO_LCKR_LCK10_Msk (0x1UL << GPIO_LCKR_LCK10_Pos) /*!< 0x00000400 */ +#define GPIO_LCKR_LCK10 GPIO_LCKR_LCK10_Msk +#define GPIO_LCKR_LCK11_Pos (11U) +#define GPIO_LCKR_LCK11_Msk (0x1UL << GPIO_LCKR_LCK11_Pos) /*!< 0x00000800 */ +#define GPIO_LCKR_LCK11 GPIO_LCKR_LCK11_Msk +#define GPIO_LCKR_LCK12_Pos (12U) +#define GPIO_LCKR_LCK12_Msk (0x1UL << GPIO_LCKR_LCK12_Pos) /*!< 0x00001000 */ +#define GPIO_LCKR_LCK12 GPIO_LCKR_LCK12_Msk +#define GPIO_LCKR_LCK13_Pos (13U) +#define GPIO_LCKR_LCK13_Msk (0x1UL << GPIO_LCKR_LCK13_Pos) /*!< 0x00002000 */ +#define GPIO_LCKR_LCK13 GPIO_LCKR_LCK13_Msk +#define GPIO_LCKR_LCK14_Pos (14U) +#define GPIO_LCKR_LCK14_Msk (0x1UL << GPIO_LCKR_LCK14_Pos) /*!< 0x00004000 */ +#define GPIO_LCKR_LCK14 GPIO_LCKR_LCK14_Msk +#define GPIO_LCKR_LCK15_Pos (15U) +#define GPIO_LCKR_LCK15_Msk (0x1UL << GPIO_LCKR_LCK15_Pos) /*!< 0x00008000 */ +#define GPIO_LCKR_LCK15 GPIO_LCKR_LCK15_Msk +#define GPIO_LCKR_LCKK_Pos (16U) +#define GPIO_LCKR_LCKK_Msk (0x1UL << GPIO_LCKR_LCKK_Pos) /*!< 0x00010000 */ +#define GPIO_LCKR_LCKK GPIO_LCKR_LCKK_Msk + +/****************** Bit definition for GPIO_AFRL register *********************/ +#define GPIO_AFRL_AFSEL0_Pos (0U) +#define GPIO_AFRL_AFSEL0_Msk (0xFUL << GPIO_AFRL_AFSEL0_Pos) /*!< 0x0000000F */ +#define GPIO_AFRL_AFSEL0 GPIO_AFRL_AFSEL0_Msk +#define GPIO_AFRL_AFSEL0_0 (0x1U << GPIO_AFRL_AFSEL0_Pos) /*!< 0x00000001 */ +#define GPIO_AFRL_AFSEL0_1 (0x2U << GPIO_AFRL_AFSEL0_Pos) /*!< 0x00000002 */ +#define GPIO_AFRL_AFSEL0_2 (0x4U << GPIO_AFRL_AFSEL0_Pos) /*!< 0x00000004 */ +#define GPIO_AFRL_AFSEL0_3 (0x8U << GPIO_AFRL_AFSEL0_Pos) /*!< 0x00000008 */ +#define GPIO_AFRL_AFSEL1_Pos (4U) +#define GPIO_AFRL_AFSEL1_Msk (0xFUL << GPIO_AFRL_AFSEL1_Pos) /*!< 0x000000F0 */ +#define GPIO_AFRL_AFSEL1 GPIO_AFRL_AFSEL1_Msk +#define GPIO_AFRL_AFSEL1_0 (0x1U << GPIO_AFRL_AFSEL1_Pos) /*!< 0x00000010 */ +#define GPIO_AFRL_AFSEL1_1 (0x2U << GPIO_AFRL_AFSEL1_Pos) /*!< 0x00000020 */ +#define GPIO_AFRL_AFSEL1_2 (0x4U << GPIO_AFRL_AFSEL1_Pos) /*!< 0x00000040 */ +#define GPIO_AFRL_AFSEL1_3 (0x8U << GPIO_AFRL_AFSEL1_Pos) /*!< 0x00000080 */ +#define GPIO_AFRL_AFSEL2_Pos (8U) +#define GPIO_AFRL_AFSEL2_Msk (0xFUL << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000F00 */ +#define GPIO_AFRL_AFSEL2 GPIO_AFRL_AFSEL2_Msk +#define GPIO_AFRL_AFSEL2_0 (0x1U << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000100 */ +#define GPIO_AFRL_AFSEL2_1 (0x2U << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000200 */ +#define GPIO_AFRL_AFSEL2_2 (0x4U << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000400 */ +#define GPIO_AFRL_AFSEL2_3 (0x8U << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000800 */ +#define GPIO_AFRL_AFSEL3_Pos (12U) +#define GPIO_AFRL_AFSEL3_Msk (0xFUL << GPIO_AFRL_AFSEL3_Pos) /*!< 0x0000F000 */ +#define GPIO_AFRL_AFSEL3 GPIO_AFRL_AFSEL3_Msk +#define GPIO_AFRL_AFSEL3_0 (0x1U << GPIO_AFRL_AFSEL3_Pos) /*!< 0x00001000 */ +#define GPIO_AFRL_AFSEL3_1 (0x2U << GPIO_AFRL_AFSEL3_Pos) /*!< 0x00002000 */ +#define GPIO_AFRL_AFSEL3_2 (0x4U << GPIO_AFRL_AFSEL3_Pos) /*!< 0x00004000 */ +#define GPIO_AFRL_AFSEL3_3 (0x8U << GPIO_AFRL_AFSEL3_Pos) /*!< 0x00008000 */ +#define GPIO_AFRL_AFSEL4_Pos (16U) +#define GPIO_AFRL_AFSEL4_Msk (0xFUL << GPIO_AFRL_AFSEL4_Pos) /*!< 0x000F0000 */ +#define GPIO_AFRL_AFSEL4 GPIO_AFRL_AFSEL4_Msk +#define GPIO_AFRL_AFSEL4_0 (0x1U << GPIO_AFRL_AFSEL4_Pos) /*!< 0x00010000 */ +#define GPIO_AFRL_AFSEL4_1 (0x2U << GPIO_AFRL_AFSEL4_Pos) /*!< 0x00020000 */ +#define GPIO_AFRL_AFSEL4_2 (0x4U << GPIO_AFRL_AFSEL4_Pos) /*!< 0x00040000 */ +#define GPIO_AFRL_AFSEL4_3 (0x8U << GPIO_AFRL_AFSEL4_Pos) /*!< 0x00080000 */ +#define GPIO_AFRL_AFSEL5_Pos (20U) +#define GPIO_AFRL_AFSEL5_Msk (0xFUL << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00F00000 */ +#define GPIO_AFRL_AFSEL5 GPIO_AFRL_AFSEL5_Msk +#define GPIO_AFRL_AFSEL5_0 (0x1U << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00100000 */ +#define GPIO_AFRL_AFSEL5_1 (0x2U << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00200000 */ +#define GPIO_AFRL_AFSEL5_2 (0x4U << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00400000 */ +#define GPIO_AFRL_AFSEL5_3 (0x8U << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00800000 */ +#define GPIO_AFRL_AFSEL6_Pos (24U) +#define GPIO_AFRL_AFSEL6_Msk (0xFUL << GPIO_AFRL_AFSEL6_Pos) /*!< 0x0F000000 */ +#define GPIO_AFRL_AFSEL6 GPIO_AFRL_AFSEL6_Msk +#define GPIO_AFRL_AFSEL6_0 (0x1U << GPIO_AFRL_AFSEL6_Pos) /*!< 0x01000000 */ +#define GPIO_AFRL_AFSEL6_1 (0x2U << GPIO_AFRL_AFSEL6_Pos) /*!< 0x02000000 */ +#define GPIO_AFRL_AFSEL6_2 (0x4U << GPIO_AFRL_AFSEL6_Pos) /*!< 0x04000000 */ +#define GPIO_AFRL_AFSEL6_3 (0x8U << GPIO_AFRL_AFSEL6_Pos) /*!< 0x08000000 */ +#define GPIO_AFRL_AFSEL7_Pos (28U) +#define GPIO_AFRL_AFSEL7_Msk (0xFUL << GPIO_AFRL_AFSEL7_Pos) /*!< 0xF0000000 */ +#define GPIO_AFRL_AFSEL7 GPIO_AFRL_AFSEL7_Msk +#define GPIO_AFRL_AFSEL7_0 (0x1U << GPIO_AFRL_AFSEL7_Pos) /*!< 0x10000000 */ +#define GPIO_AFRL_AFSEL7_1 (0x2U << GPIO_AFRL_AFSEL7_Pos) /*!< 0x20000000 */ +#define GPIO_AFRL_AFSEL7_2 (0x4U << GPIO_AFRL_AFSEL7_Pos) /*!< 0x40000000 */ +#define GPIO_AFRL_AFSEL7_3 (0x8U << GPIO_AFRL_AFSEL7_Pos) /*!< 0x80000000 */ + +/****************** Bit definition for GPIO_AFRH register *********************/ +#define GPIO_AFRH_AFSEL8_Pos (0U) +#define GPIO_AFRH_AFSEL8_Msk (0xFUL << GPIO_AFRH_AFSEL8_Pos) /*!< 0x0000000F */ +#define GPIO_AFRH_AFSEL8 GPIO_AFRH_AFSEL8_Msk +#define GPIO_AFRH_AFSEL8_0 (0x1U << GPIO_AFRH_AFSEL8_Pos) /*!< 0x00000001 */ +#define GPIO_AFRH_AFSEL8_1 (0x2U << GPIO_AFRH_AFSEL8_Pos) /*!< 0x00000002 */ +#define GPIO_AFRH_AFSEL8_2 (0x4U << GPIO_AFRH_AFSEL8_Pos) /*!< 0x00000004 */ +#define GPIO_AFRH_AFSEL8_3 (0x8U << GPIO_AFRH_AFSEL8_Pos) /*!< 0x00000008 */ +#define GPIO_AFRH_AFSEL9_Pos (4U) +#define GPIO_AFRH_AFSEL9_Msk (0xFUL << GPIO_AFRH_AFSEL9_Pos) /*!< 0x000000F0 */ +#define GPIO_AFRH_AFSEL9 GPIO_AFRH_AFSEL9_Msk +#define GPIO_AFRH_AFSEL9_0 (0x1U << GPIO_AFRH_AFSEL9_Pos) /*!< 0x00000010 */ +#define GPIO_AFRH_AFSEL9_1 (0x2U << GPIO_AFRH_AFSEL9_Pos) /*!< 0x00000020 */ +#define GPIO_AFRH_AFSEL9_2 (0x4U << GPIO_AFRH_AFSEL9_Pos) /*!< 0x00000040 */ +#define GPIO_AFRH_AFSEL9_3 (0x8U << GPIO_AFRH_AFSEL9_Pos) /*!< 0x00000080 */ +#define GPIO_AFRH_AFSEL10_Pos (8U) +#define GPIO_AFRH_AFSEL10_Msk (0xFUL << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000F00 */ +#define GPIO_AFRH_AFSEL10 GPIO_AFRH_AFSEL10_Msk +#define GPIO_AFRH_AFSEL10_0 (0x1U << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000100 */ +#define GPIO_AFRH_AFSEL10_1 (0x2U << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000200 */ +#define GPIO_AFRH_AFSEL10_2 (0x4U << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000400 */ +#define GPIO_AFRH_AFSEL10_3 (0x8U << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000800 */ +#define GPIO_AFRH_AFSEL11_Pos (12U) +#define GPIO_AFRH_AFSEL11_Msk (0xFUL << GPIO_AFRH_AFSEL11_Pos) /*!< 0x0000F000 */ +#define GPIO_AFRH_AFSEL11 GPIO_AFRH_AFSEL11_Msk +#define GPIO_AFRH_AFSEL11_0 (0x1U << GPIO_AFRH_AFSEL11_Pos) /*!< 0x00001000 */ +#define GPIO_AFRH_AFSEL11_1 (0x2U << GPIO_AFRH_AFSEL11_Pos) /*!< 0x00002000 */ +#define GPIO_AFRH_AFSEL11_2 (0x4U << GPIO_AFRH_AFSEL11_Pos) /*!< 0x00004000 */ +#define GPIO_AFRH_AFSEL11_3 (0x8U << GPIO_AFRH_AFSEL11_Pos) /*!< 0x00008000 */ +#define GPIO_AFRH_AFSEL12_Pos (16U) +#define GPIO_AFRH_AFSEL12_Msk (0xFUL << GPIO_AFRH_AFSEL12_Pos) /*!< 0x000F0000 */ +#define GPIO_AFRH_AFSEL12 GPIO_AFRH_AFSEL12_Msk +#define GPIO_AFRH_AFSEL12_0 (0x1U << GPIO_AFRH_AFSEL12_Pos) /*!< 0x00010000 */ +#define GPIO_AFRH_AFSEL12_1 (0x2U << GPIO_AFRH_AFSEL12_Pos) /*!< 0x00020000 */ +#define GPIO_AFRH_AFSEL12_2 (0x4U << GPIO_AFRH_AFSEL12_Pos) /*!< 0x00040000 */ +#define GPIO_AFRH_AFSEL12_3 (0x8U << GPIO_AFRH_AFSEL12_Pos) /*!< 0x00080000 */ +#define GPIO_AFRH_AFSEL13_Pos (20U) +#define GPIO_AFRH_AFSEL13_Msk (0xFUL << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00F00000 */ +#define GPIO_AFRH_AFSEL13 GPIO_AFRH_AFSEL13_Msk +#define GPIO_AFRH_AFSEL13_0 (0x1U << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00100000 */ +#define GPIO_AFRH_AFSEL13_1 (0x2U << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00200000 */ +#define GPIO_AFRH_AFSEL13_2 (0x4U << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00400000 */ +#define GPIO_AFRH_AFSEL13_3 (0x8U << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00800000 */ +#define GPIO_AFRH_AFSEL14_Pos (24U) +#define GPIO_AFRH_AFSEL14_Msk (0xFUL << GPIO_AFRH_AFSEL14_Pos) /*!< 0x0F000000 */ +#define GPIO_AFRH_AFSEL14 GPIO_AFRH_AFSEL14_Msk +#define GPIO_AFRH_AFSEL14_0 (0x1U << GPIO_AFRH_AFSEL14_Pos) /*!< 0x01000000 */ +#define GPIO_AFRH_AFSEL14_1 (0x2U << GPIO_AFRH_AFSEL14_Pos) /*!< 0x02000000 */ +#define GPIO_AFRH_AFSEL14_2 (0x4U << GPIO_AFRH_AFSEL14_Pos) /*!< 0x04000000 */ +#define GPIO_AFRH_AFSEL14_3 (0x8U << GPIO_AFRH_AFSEL14_Pos) /*!< 0x08000000 */ +#define GPIO_AFRH_AFSEL15_Pos (28U) +#define GPIO_AFRH_AFSEL15_Msk (0xFUL << GPIO_AFRH_AFSEL15_Pos) /*!< 0xF0000000 */ +#define GPIO_AFRH_AFSEL15 GPIO_AFRH_AFSEL15_Msk +#define GPIO_AFRH_AFSEL15_0 (0x1U << GPIO_AFRH_AFSEL15_Pos) /*!< 0x10000000 */ +#define GPIO_AFRH_AFSEL15_1 (0x2U << GPIO_AFRH_AFSEL15_Pos) /*!< 0x20000000 */ +#define GPIO_AFRH_AFSEL15_2 (0x4U << GPIO_AFRH_AFSEL15_Pos) /*!< 0x40000000 */ +#define GPIO_AFRH_AFSEL15_3 (0x8U << GPIO_AFRH_AFSEL15_Pos) /*!< 0x80000000 */ + +/****************** Bits definition for GPIO_BRR register ******************/ +#define GPIO_BRR_BR0_Pos (0U) +#define GPIO_BRR_BR0_Msk (0x1UL << GPIO_BRR_BR0_Pos) /*!< 0x00000001 */ +#define GPIO_BRR_BR0 GPIO_BRR_BR0_Msk +#define GPIO_BRR_BR1_Pos (1U) +#define GPIO_BRR_BR1_Msk (0x1UL << GPIO_BRR_BR1_Pos) /*!< 0x00000002 */ +#define GPIO_BRR_BR1 GPIO_BRR_BR1_Msk +#define GPIO_BRR_BR2_Pos (2U) +#define GPIO_BRR_BR2_Msk (0x1UL << GPIO_BRR_BR2_Pos) /*!< 0x00000004 */ +#define GPIO_BRR_BR2 GPIO_BRR_BR2_Msk +#define GPIO_BRR_BR3_Pos (3U) +#define GPIO_BRR_BR3_Msk (0x1UL << GPIO_BRR_BR3_Pos) /*!< 0x00000008 */ +#define GPIO_BRR_BR3 GPIO_BRR_BR3_Msk +#define GPIO_BRR_BR4_Pos (4U) +#define GPIO_BRR_BR4_Msk (0x1UL << GPIO_BRR_BR4_Pos) /*!< 0x00000010 */ +#define GPIO_BRR_BR4 GPIO_BRR_BR4_Msk +#define GPIO_BRR_BR5_Pos (5U) +#define GPIO_BRR_BR5_Msk (0x1UL << GPIO_BRR_BR5_Pos) /*!< 0x00000020 */ +#define GPIO_BRR_BR5 GPIO_BRR_BR5_Msk +#define GPIO_BRR_BR6_Pos (6U) +#define GPIO_BRR_BR6_Msk (0x1UL << GPIO_BRR_BR6_Pos) /*!< 0x00000040 */ +#define GPIO_BRR_BR6 GPIO_BRR_BR6_Msk +#define GPIO_BRR_BR7_Pos (7U) +#define GPIO_BRR_BR7_Msk (0x1UL << GPIO_BRR_BR7_Pos) /*!< 0x00000080 */ +#define GPIO_BRR_BR7 GPIO_BRR_BR7_Msk +#define GPIO_BRR_BR8_Pos (8U) +#define GPIO_BRR_BR8_Msk (0x1UL << GPIO_BRR_BR8_Pos) /*!< 0x00000100 */ +#define GPIO_BRR_BR8 GPIO_BRR_BR8_Msk +#define GPIO_BRR_BR9_Pos (9U) +#define GPIO_BRR_BR9_Msk (0x1UL << GPIO_BRR_BR9_Pos) /*!< 0x00000200 */ +#define GPIO_BRR_BR9 GPIO_BRR_BR9_Msk +#define GPIO_BRR_BR10_Pos (10U) +#define GPIO_BRR_BR10_Msk (0x1UL << GPIO_BRR_BR10_Pos) /*!< 0x00000400 */ +#define GPIO_BRR_BR10 GPIO_BRR_BR10_Msk +#define GPIO_BRR_BR11_Pos (11U) +#define GPIO_BRR_BR11_Msk (0x1UL << GPIO_BRR_BR11_Pos) /*!< 0x00000800 */ +#define GPIO_BRR_BR11 GPIO_BRR_BR11_Msk +#define GPIO_BRR_BR12_Pos (12U) +#define GPIO_BRR_BR12_Msk (0x1UL << GPIO_BRR_BR12_Pos) /*!< 0x00001000 */ +#define GPIO_BRR_BR12 GPIO_BRR_BR12_Msk +#define GPIO_BRR_BR13_Pos (13U) +#define GPIO_BRR_BR13_Msk (0x1UL << GPIO_BRR_BR13_Pos) /*!< 0x00002000 */ +#define GPIO_BRR_BR13 GPIO_BRR_BR13_Msk +#define GPIO_BRR_BR14_Pos (14U) +#define GPIO_BRR_BR14_Msk (0x1UL << GPIO_BRR_BR14_Pos) /*!< 0x00004000 */ +#define GPIO_BRR_BR14 GPIO_BRR_BR14_Msk +#define GPIO_BRR_BR15_Pos (15U) +#define GPIO_BRR_BR15_Msk (0x1UL << GPIO_BRR_BR15_Pos) /*!< 0x00008000 */ +#define GPIO_BRR_BR15 GPIO_BRR_BR15_Msk + +/******************************************************************************/ +/* */ +/* HSEM HW Semaphore */ +/* */ +/******************************************************************************/ +/******************** Bit definition for HSEM_R register ********************/ +#define HSEM_R_PROCID_Pos (0U) +#define HSEM_R_PROCID_Msk (0xFFUL << HSEM_R_PROCID_Pos) /*!< 0x000000FF */ +#define HSEM_R_PROCID HSEM_R_PROCID_Msk /*! + +/** @addtogroup STM32WBxx_System_Includes + * @{ + */ + +/** + * @} + */ + + +/** @addtogroup STM32WBxx_System_Exported_types + * @{ + */ +/* The SystemCoreClock variable is updated in three ways: + 1) by calling CMSIS function SystemCoreClockUpdate() + 2) by calling HAL API function HAL_RCC_GetSysClockFreq() + 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency + Note: If you use this function to configure the system clock; then there + is no need to call the 2 first functions listed above, since SystemCoreClock + variable is updated automatically. +*/ + +extern uint32_t SystemCoreClock; /*!< System Clock Frequency */ + +extern const uint32_t AHBPrescTable[16]; /*!< AHB prescalers table values */ +extern const uint32_t APBPrescTable[8]; /*!< APB prescalers table values */ +extern const uint32_t MSIRangeTable[16]; /*!< MSI ranges table values */ + +#if defined(STM32WB55xx) || defined(STM32WB5Mxx) || defined(STM32WB35xx) || defined (STM32WB15xx) || defined (STM32WB1Mxx) +extern const uint32_t SmpsPrescalerTable[4][6]; /*!< SMPS factor ranges table values */ +#endif +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Exported_Constants + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Exported_Macros + * @{ + */ + +/** + * @} + */ + +/** @addtogroup STM32WBxx_System_Exported_Functions + * @{ + */ + +extern void SystemInit(void); +extern void SystemCoreClockUpdate(void); +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /*__SYSTEM_STM32WBXX_H */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/LICENSE.txt b/firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/LICENSE.txt new file mode 100644 index 0000000..872e82b --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Device/ST/STM32WBxx/LICENSE.txt @@ -0,0 +1,6 @@ +This software component is provided to you as part of a software package and +applicable license terms are in the Package_license file. If you received this +software component outside of a package or without applicable license terms, +the terms of the Apache-2.0 license shall apply. +You may obtain a copy of the Apache-2.0 at: +https://opensource.org/licenses/Apache-2.0 diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armcc.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armcc.h new file mode 100644 index 0000000..59f173a --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armcc.h @@ -0,0 +1,894 @@ +/**************************************************************************//** + * @file cmsis_armcc.h + * @brief CMSIS compiler ARMCC (Arm Compiler 5) header file + * @version V5.1.0 + * @date 08. May 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_ARMCC_H +#define __CMSIS_ARMCC_H + + +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 400677) + #error "Please use Arm Compiler Toolchain V4.0.677 or later!" +#endif + +/* CMSIS compiler control architecture macros */ +#if ((defined (__TARGET_ARCH_6_M ) && (__TARGET_ARCH_6_M == 1)) || \ + (defined (__TARGET_ARCH_6S_M ) && (__TARGET_ARCH_6S_M == 1)) ) + #define __ARM_ARCH_6M__ 1 +#endif + +#if (defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M == 1)) + #define __ARM_ARCH_7M__ 1 +#endif + +#if (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1)) + #define __ARM_ARCH_7EM__ 1 +#endif + + /* __ARM_ARCH_8M_BASE__ not applicable */ + /* __ARM_ARCH_8M_MAIN__ not applicable */ + +/* CMSIS compiler control DSP macros */ +#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + #define __ARM_FEATURE_DSP 1 +#endif + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE __inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static __inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE static __forceinline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __declspec(noreturn) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed)) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT __packed struct +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION __packed union +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #define __UNALIGNED_UINT32(x) (*((__packed uint32_t *)(x))) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #define __UNALIGNED_UINT16_WRITE(addr, val) ((*((__packed uint16_t *)(addr))) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #define __UNALIGNED_UINT16_READ(addr) (*((const __packed uint16_t *)(addr))) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #define __UNALIGNED_UINT32_WRITE(addr, val) ((*((__packed uint32_t *)(addr))) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #define __UNALIGNED_UINT32_READ(addr) (*((const __packed uint32_t *)(addr))) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __memory_changed() +#endif + +/* ######################### Startup and Lowlevel Init ######################## */ + +#ifndef __PROGRAM_START +#define __PROGRAM_START __main +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __Vectors +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE __attribute((used, section("RESET"))) +#endif + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __enable_irq(); */ + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __disable_irq(); */ + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_INLINE uint32_t __get_CONTROL(void) +{ + register uint32_t __regControl __ASM("control"); + return(__regControl); +} + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_INLINE void __set_CONTROL(uint32_t control) +{ + register uint32_t __regControl __ASM("control"); + __regControl = control; +} + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_INLINE uint32_t __get_IPSR(void) +{ + register uint32_t __regIPSR __ASM("ipsr"); + return(__regIPSR); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_INLINE uint32_t __get_APSR(void) +{ + register uint32_t __regAPSR __ASM("apsr"); + return(__regAPSR); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_INLINE uint32_t __get_xPSR(void) +{ + register uint32_t __regXPSR __ASM("xpsr"); + return(__regXPSR); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_INLINE uint32_t __get_PSP(void) +{ + register uint32_t __regProcessStackPointer __ASM("psp"); + return(__regProcessStackPointer); +} + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack) +{ + register uint32_t __regProcessStackPointer __ASM("psp"); + __regProcessStackPointer = topOfProcStack; +} + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_INLINE uint32_t __get_MSP(void) +{ + register uint32_t __regMainStackPointer __ASM("msp"); + return(__regMainStackPointer); +} + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack) +{ + register uint32_t __regMainStackPointer __ASM("msp"); + __regMainStackPointer = topOfMainStack; +} + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_INLINE uint32_t __get_PRIMASK(void) +{ + register uint32_t __regPriMask __ASM("primask"); + return(__regPriMask); +} + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_INLINE void __set_PRIMASK(uint32_t priMask) +{ + register uint32_t __regPriMask __ASM("primask"); + __regPriMask = (priMask); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __enable_fault_irq __enable_fiq + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __disable_fault_irq __disable_fiq + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_INLINE uint32_t __get_BASEPRI(void) +{ + register uint32_t __regBasePri __ASM("basepri"); + return(__regBasePri); +} + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_INLINE void __set_BASEPRI(uint32_t basePri) +{ + register uint32_t __regBasePri __ASM("basepri"); + __regBasePri = (basePri & 0xFFU); +} + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + register uint32_t __regBasePriMax __ASM("basepri_max"); + __regBasePriMax = (basePri & 0xFFU); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_INLINE uint32_t __get_FAULTMASK(void) +{ + register uint32_t __regFaultMask __ASM("faultmask"); + return(__regFaultMask); +} + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask) +{ + register uint32_t __regFaultMask __ASM("faultmask"); + __regFaultMask = (faultMask & (uint32_t)1U); +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +__STATIC_INLINE uint32_t __get_FPSCR(void) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + register uint32_t __regfpscr __ASM("fpscr"); + return(__regfpscr); +#else + return(0U); +#endif +} + + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +__STATIC_INLINE void __set_FPSCR(uint32_t fpscr) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + register uint32_t __regfpscr __ASM("fpscr"); + __regfpscr = (fpscr); +#else + (void)fpscr; +#endif +} + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP __nop + + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI __wfi + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE __wfe + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV __sev + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +#define __ISB() do {\ + __schedule_barrier();\ + __isb(0xF);\ + __schedule_barrier();\ + } while (0U) + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +#define __DSB() do {\ + __schedule_barrier();\ + __dsb(0xF);\ + __schedule_barrier();\ + } while (0U) + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +#define __DMB() do {\ + __schedule_barrier();\ + __dmb(0xF);\ + __schedule_barrier();\ + } while (0U) + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV __rev + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value) +{ + rev16 r0, r0 + bx lr +} +#endif + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int16_t __REVSH(int16_t value) +{ + revsh r0, r0 + bx lr +} +#endif + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +#define __ROR __ror + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __breakpoint(value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + #define __RBIT __rbit +#else +__attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value) +{ + uint32_t result; + uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */ + + result = value; /* r will be reversed bits of v; first get LSB of v */ + for (value >>= 1U; value != 0U; value >>= 1U) + { + result <<= 1U; + result |= value & 1U; + s--; + } + result <<= s; /* shift when v's highest bits are zero */ + return result; +} +#endif + + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +#define __CLZ __clz + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr)) +#else + #define __LDREXB(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint8_t ) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXH(ptr) ((uint16_t) __ldrex(ptr)) +#else + #define __LDREXH(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint16_t) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr)) +#else + #define __LDREXW(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint32_t ) __ldrex(ptr)) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXB(value, ptr) __strex(value, ptr) +#else + #define __STREXB(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXH(value, ptr) __strex(value, ptr) +#else + #define __STREXH(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020) + #define __STREXW(value, ptr) __strex(value, ptr) +#else + #define __STREXW(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop") +#endif + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +#define __CLREX __clrex + + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT __ssat + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT __usat + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +#ifndef __NO_EMBEDDED_ASM +__attribute__((section(".rrx_text"))) __STATIC_INLINE __ASM uint32_t __RRX(uint32_t value) +{ + rrx r0, r0 + bx lr +} +#endif + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDRBT(ptr) ((uint8_t ) __ldrt(ptr)) + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDRHT(ptr) ((uint16_t) __ldrt(ptr)) + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDRT(ptr) ((uint32_t ) __ldrt(ptr)) + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRBT(value, ptr) __strt(value, ptr) + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRHT(value, ptr) __strt(value, ptr) + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +#define __STRT(value, ptr) __strt(value, ptr) + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__attribute__((always_inline)) __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) + +#define __SADD8 __sadd8 +#define __QADD8 __qadd8 +#define __SHADD8 __shadd8 +#define __UADD8 __uadd8 +#define __UQADD8 __uqadd8 +#define __UHADD8 __uhadd8 +#define __SSUB8 __ssub8 +#define __QSUB8 __qsub8 +#define __SHSUB8 __shsub8 +#define __USUB8 __usub8 +#define __UQSUB8 __uqsub8 +#define __UHSUB8 __uhsub8 +#define __SADD16 __sadd16 +#define __QADD16 __qadd16 +#define __SHADD16 __shadd16 +#define __UADD16 __uadd16 +#define __UQADD16 __uqadd16 +#define __UHADD16 __uhadd16 +#define __SSUB16 __ssub16 +#define __QSUB16 __qsub16 +#define __SHSUB16 __shsub16 +#define __USUB16 __usub16 +#define __UQSUB16 __uqsub16 +#define __UHSUB16 __uhsub16 +#define __SASX __sasx +#define __QASX __qasx +#define __SHASX __shasx +#define __UASX __uasx +#define __UQASX __uqasx +#define __UHASX __uhasx +#define __SSAX __ssax +#define __QSAX __qsax +#define __SHSAX __shsax +#define __USAX __usax +#define __UQSAX __uqsax +#define __UHSAX __uhsax +#define __USAD8 __usad8 +#define __USADA8 __usada8 +#define __SSAT16 __ssat16 +#define __USAT16 __usat16 +#define __UXTB16 __uxtb16 +#define __UXTAB16 __uxtab16 +#define __SXTB16 __sxtb16 +#define __SXTAB16 __sxtab16 +#define __SMUAD __smuad +#define __SMUADX __smuadx +#define __SMLAD __smlad +#define __SMLADX __smladx +#define __SMLALD __smlald +#define __SMLALDX __smlaldx +#define __SMUSD __smusd +#define __SMUSDX __smusdx +#define __SMLSD __smlsd +#define __SMLSDX __smlsdx +#define __SMLSLD __smlsld +#define __SMLSLDX __smlsldx +#define __SEL __sel +#define __QADD __qadd +#define __QSUB __qsub + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +#define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \ + ((int64_t)(ARG3) << 32U) ) >> 32U)) + +#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#endif /* __CMSIS_ARMCC_H */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armclang.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armclang.h new file mode 100644 index 0000000..e917f35 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armclang.h @@ -0,0 +1,1444 @@ +/**************************************************************************//** + * @file cmsis_armclang.h + * @brief CMSIS compiler armclang (Arm Compiler 6) header file + * @version V5.2.0 + * @date 08. May 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*lint -esym(9058, IRQn)*/ /* disable MISRA 2012 Rule 2.4 for IRQn */ + +#ifndef __CMSIS_ARMCLANG_H +#define __CMSIS_ARMCLANG_H + +#pragma clang system_header /* treat file as system include file */ + +#ifndef __ARM_COMPAT_H +#include /* Compatibility header for Arm Compiler 5 intrinsics */ +#endif + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE __inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static __inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __attribute__((__noreturn__)) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed, aligned(1))) +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32 */ + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_WRITE */ + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_READ */ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_WRITE */ + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_READ */ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __ASM volatile("":::"memory") +#endif + +/* ######################### Startup and Lowlevel Init ######################## */ + +#ifndef __PROGRAM_START +#define __PROGRAM_START __main +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __Vectors +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE __attribute((used, section("RESET"))) +#endif + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __enable_irq(); see arm_compat.h */ + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __disable_irq(); see arm_compat.h */ + + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Control Register (non-secure) + \details Returns the content of the non-secure Control Register when in secure mode. + \return non-secure Control Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Control Register (non-secure) + \details Writes the given value to the non-secure Control Register when in secure state. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); +} +#endif + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_IPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_APSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, apsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_xPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer (non-secure) + \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); +} +#endif + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer (non-secure) + \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); +} +#endif + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Stack Pointer (non-secure) + \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. + \return SP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); + return(result); +} + + +/** + \brief Set Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. + \param [in] topOfStack Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) +{ + __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); +} +#endif + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Priority Mask (non-secure) + \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) +{ + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Priority Mask (non-secure) + \details Assigns the given value to the non-secure Priority Mask Register when in secure state. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) +{ + __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); +} +#endif + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __enable_fault_irq __enable_fiq /* see arm_compat.h */ + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __disable_fault_irq __disable_fiq /* see arm_compat.h */ + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Base Priority (non-secure) + \details Returns the current value of the non-secure Base Priority register when in secure state. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) +{ + __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Base Priority (non-secure) + \details Assigns the given value to the non-secure Base Priority register when in secure state. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); +} +#endif + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Fault Mask (non-secure) + \details Returns the current value of the non-secure Fault Mask register when in secure state. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Fault Mask (non-secure) + \details Assigns the given value to the non-secure Fault Mask register when in secure state. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); +} +#endif + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + +/** + \brief Get Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim" : "=r" (result) ); + return result; +#endif +} + +#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); +#endif +} +#endif + + +/** + \brief Get Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim" : "=r" (result) ); + return result; +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). + \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. + \param [in] MainStackPtrLimit Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); +#endif +} +#endif + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __get_FPSCR (uint32_t)__builtin_arm_get_fpscr +#else +#define __get_FPSCR() ((uint32_t)0U) +#endif + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __set_FPSCR __builtin_arm_set_fpscr +#else +#define __set_FPSCR(x) ((void)(x)) +#endif + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/* Define macros for porting to both thumb1 and thumb2. + * For thumb1, use low register (r0-r7), specified by constraint "l" + * Otherwise, use general registers, specified by constraint "r" */ +#if defined (__thumb__) && !defined (__thumb2__) +#define __CMSIS_GCC_OUT_REG(r) "=l" (r) +#define __CMSIS_GCC_RW_REG(r) "+l" (r) +#define __CMSIS_GCC_USE_REG(r) "l" (r) +#else +#define __CMSIS_GCC_OUT_REG(r) "=r" (r) +#define __CMSIS_GCC_RW_REG(r) "+r" (r) +#define __CMSIS_GCC_USE_REG(r) "r" (r) +#endif + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP __builtin_arm_nop + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI __builtin_arm_wfi + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE __builtin_arm_wfe + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV __builtin_arm_sev + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +#define __ISB() __builtin_arm_isb(0xF) + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +#define __DSB() __builtin_arm_dsb(0xF) + + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +#define __DMB() __builtin_arm_dmb(0xF) + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV(value) __builtin_bswap32(value) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV16(value) __ROR(__REV(value), 16) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REVSH(value) (int16_t)__builtin_bswap16(value) + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) +{ + op2 %= 32U; + if (op2 == 0U) + { + return op1; + } + return (op1 >> op2) | (op1 << (32U - op2)); +} + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __ASM volatile ("bkpt "#value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +#define __RBIT __builtin_arm_rbit + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +__STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value) +{ + /* Even though __builtin_clz produces a CLZ instruction on ARM, formally + __builtin_clz(0) is undefined behaviour, so handle this case specially. + This guarantees ARM-compatible results if happening to compile on a non-ARM + target, and ensures the compiler doesn't decide to activate any + optimisations using the logic "value was passed to __builtin_clz, so it + is non-zero". + ARM Compiler 6.10 and possibly earlier will optimise this test away, leaving a + single CLZ instruction. + */ + if (value == 0U) + { + return 32U; + } + return __builtin_clz(value); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDREXB (uint8_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDREXH (uint16_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDREXW (uint32_t)__builtin_arm_ldrex + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXB (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXH (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXW (uint32_t)__builtin_arm_strex + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +#define __CLREX __builtin_arm_clrex + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT __builtin_arm_ssat + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT __builtin_arm_usat + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return(result); +} + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); +} + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief Load-Acquire (8 bit) + \details Executes a LDAB instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire (16 bit) + \details Executes a LDAH instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire (32 bit) + \details Executes a LDA instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief Store-Release (8 bit) + \details Executes a STLB instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (16 bit) + \details Executes a STLH instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (32 bit) + \details Executes a STL instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Load-Acquire Exclusive (8 bit) + \details Executes a LDAB exclusive instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDAEXB (uint8_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (16 bit) + \details Executes a LDAH exclusive instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDAEXH (uint16_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (32 bit) + \details Executes a LDA exclusive instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDAEX (uint32_t)__builtin_arm_ldaex + + +/** + \brief Store-Release Exclusive (8 bit) + \details Executes a STLB exclusive instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXB (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (16 bit) + \details Executes a STLH exclusive instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXH (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (32 bit) + \details Executes a STL exclusive instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEX (uint32_t)__builtin_arm_stlex + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) + +#define __SADD8 __builtin_arm_sadd8 +#define __QADD8 __builtin_arm_qadd8 +#define __SHADD8 __builtin_arm_shadd8 +#define __UADD8 __builtin_arm_uadd8 +#define __UQADD8 __builtin_arm_uqadd8 +#define __UHADD8 __builtin_arm_uhadd8 +#define __SSUB8 __builtin_arm_ssub8 +#define __QSUB8 __builtin_arm_qsub8 +#define __SHSUB8 __builtin_arm_shsub8 +#define __USUB8 __builtin_arm_usub8 +#define __UQSUB8 __builtin_arm_uqsub8 +#define __UHSUB8 __builtin_arm_uhsub8 +#define __SADD16 __builtin_arm_sadd16 +#define __QADD16 __builtin_arm_qadd16 +#define __SHADD16 __builtin_arm_shadd16 +#define __UADD16 __builtin_arm_uadd16 +#define __UQADD16 __builtin_arm_uqadd16 +#define __UHADD16 __builtin_arm_uhadd16 +#define __SSUB16 __builtin_arm_ssub16 +#define __QSUB16 __builtin_arm_qsub16 +#define __SHSUB16 __builtin_arm_shsub16 +#define __USUB16 __builtin_arm_usub16 +#define __UQSUB16 __builtin_arm_uqsub16 +#define __UHSUB16 __builtin_arm_uhsub16 +#define __SASX __builtin_arm_sasx +#define __QASX __builtin_arm_qasx +#define __SHASX __builtin_arm_shasx +#define __UASX __builtin_arm_uasx +#define __UQASX __builtin_arm_uqasx +#define __UHASX __builtin_arm_uhasx +#define __SSAX __builtin_arm_ssax +#define __QSAX __builtin_arm_qsax +#define __SHSAX __builtin_arm_shsax +#define __USAX __builtin_arm_usax +#define __UQSAX __builtin_arm_uqsax +#define __UHSAX __builtin_arm_uhsax +#define __USAD8 __builtin_arm_usad8 +#define __USADA8 __builtin_arm_usada8 +#define __SSAT16 __builtin_arm_ssat16 +#define __USAT16 __builtin_arm_usat16 +#define __UXTB16 __builtin_arm_uxtb16 +#define __UXTAB16 __builtin_arm_uxtab16 +#define __SXTB16 __builtin_arm_sxtb16 +#define __SXTAB16 __builtin_arm_sxtab16 +#define __SMUAD __builtin_arm_smuad +#define __SMUADX __builtin_arm_smuadx +#define __SMLAD __builtin_arm_smlad +#define __SMLADX __builtin_arm_smladx +#define __SMLALD __builtin_arm_smlald +#define __SMLALDX __builtin_arm_smlaldx +#define __SMUSD __builtin_arm_smusd +#define __SMUSDX __builtin_arm_smusdx +#define __SMLSD __builtin_arm_smlsd +#define __SMLSDX __builtin_arm_smlsdx +#define __SMLSLD __builtin_arm_smlsld +#define __SMLSLDX __builtin_arm_smlsldx +#define __SEL __builtin_arm_sel +#define __QADD __builtin_arm_qadd +#define __QSUB __builtin_arm_qsub + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) +{ + int32_t result; + + __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#endif /* (__ARM_FEATURE_DSP == 1) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#endif /* __CMSIS_ARMCLANG_H */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armclang_ltm.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armclang_ltm.h new file mode 100644 index 0000000..feec324 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_armclang_ltm.h @@ -0,0 +1,1891 @@ +/**************************************************************************//** + * @file cmsis_armclang_ltm.h + * @brief CMSIS compiler armclang (Arm Compiler 6) header file + * @version V1.2.0 + * @date 08. May 2019 + ******************************************************************************/ +/* + * Copyright (c) 2018-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*lint -esym(9058, IRQn)*/ /* disable MISRA 2012 Rule 2.4 for IRQn */ + +#ifndef __CMSIS_ARMCLANG_H +#define __CMSIS_ARMCLANG_H + +#pragma clang system_header /* treat file as system include file */ + +#ifndef __ARM_COMPAT_H +#include /* Compatibility header for Arm Compiler 5 intrinsics */ +#endif + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE __inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static __inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __attribute__((__noreturn__)) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed, aligned(1))) +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32 */ + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_WRITE */ + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT16_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_READ */ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_WRITE */ + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpacked" +/*lint -esym(9058, T_UINT32_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_READ */ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #pragma clang diagnostic pop + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __ASM volatile("":::"memory") +#endif + +/* ######################### Startup and Lowlevel Init ######################## */ + +#ifndef __PROGRAM_START +#define __PROGRAM_START __main +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __Vectors +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE __attribute((used, section("RESET"))) +#endif + + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __enable_irq(); see arm_compat.h */ + + +/** + \brief Disable IRQ Interrupts + \details Disables IRQ interrupts by setting the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +/* intrinsic void __disable_irq(); see arm_compat.h */ + + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Control Register (non-secure) + \details Returns the content of the non-secure Control Register when in secure mode. + \return non-secure Control Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Control Register (non-secure) + \details Writes the given value to the non-secure Control Register when in secure state. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); +} +#endif + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_IPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_APSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, apsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_xPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer (non-secure) + \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); +} +#endif + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer (non-secure) + \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); +} +#endif + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Stack Pointer (non-secure) + \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. + \return SP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); + return(result); +} + + +/** + \brief Set Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. + \param [in] topOfStack Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) +{ + __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); +} +#endif + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Priority Mask (non-secure) + \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) +{ + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Priority Mask (non-secure) + \details Assigns the given value to the non-secure Priority Mask Register when in secure state. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) +{ + __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); +} +#endif + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __enable_fault_irq __enable_fiq /* see arm_compat.h */ + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +#define __disable_fault_irq __disable_fiq /* see arm_compat.h */ + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Base Priority (non-secure) + \details Returns the current value of the non-secure Base Priority register when in secure state. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) +{ + __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Base Priority (non-secure) + \details Assigns the given value to the non-secure Base Priority register when in secure state. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); +} +#endif + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Fault Mask (non-secure) + \details Returns the current value of the non-secure Fault Mask register when in secure state. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Fault Mask (non-secure) + \details Assigns the given value to the non-secure Fault Mask register when in secure state. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); +} +#endif + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + +/** + \brief Get Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim" : "=r" (result) ); + return result; +#endif +} + +#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); +#endif +} +#endif + + +/** + \brief Get Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim" : "=r" (result) ); + return result; +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). + \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. + \param [in] MainStackPtrLimit Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); +#endif +} +#endif + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __get_FPSCR (uint32_t)__builtin_arm_get_fpscr +#else +#define __get_FPSCR() ((uint32_t)0U) +#endif + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#define __set_FPSCR __builtin_arm_set_fpscr +#else +#define __set_FPSCR(x) ((void)(x)) +#endif + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/* Define macros for porting to both thumb1 and thumb2. + * For thumb1, use low register (r0-r7), specified by constraint "l" + * Otherwise, use general registers, specified by constraint "r" */ +#if defined (__thumb__) && !defined (__thumb2__) +#define __CMSIS_GCC_OUT_REG(r) "=l" (r) +#define __CMSIS_GCC_USE_REG(r) "l" (r) +#else +#define __CMSIS_GCC_OUT_REG(r) "=r" (r) +#define __CMSIS_GCC_USE_REG(r) "r" (r) +#endif + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP __builtin_arm_nop + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI __builtin_arm_wfi + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE __builtin_arm_wfe + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV __builtin_arm_sev + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +#define __ISB() __builtin_arm_isb(0xF) + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +#define __DSB() __builtin_arm_dsb(0xF) + + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +#define __DMB() __builtin_arm_dmb(0xF) + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV(value) __builtin_bswap32(value) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REV16(value) __ROR(__REV(value), 16) + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +#define __REVSH(value) (int16_t)__builtin_bswap16(value) + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) +{ + op2 %= 32U; + if (op2 == 0U) + { + return op1; + } + return (op1 >> op2) | (op1 << (32U - op2)); +} + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __ASM volatile ("bkpt "#value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +#define __RBIT __builtin_arm_rbit + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +__STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value) +{ + /* Even though __builtin_clz produces a CLZ instruction on ARM, formally + __builtin_clz(0) is undefined behaviour, so handle this case specially. + This guarantees ARM-compatible results if happening to compile on a non-ARM + target, and ensures the compiler doesn't decide to activate any + optimisations using the logic "value was passed to __builtin_clz, so it + is non-zero". + ARM Compiler 6.10 and possibly earlier will optimise this test away, leaving a + single CLZ instruction. + */ + if (value == 0U) + { + return 32U; + } + return __builtin_clz(value); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDREXB (uint8_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDREXH (uint16_t)__builtin_arm_ldrex + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDREXW (uint32_t)__builtin_arm_ldrex + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXB (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXH (uint32_t)__builtin_arm_strex + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STREXW (uint32_t)__builtin_arm_strex + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +#define __CLREX __builtin_arm_clrex + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT __builtin_arm_ssat + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT __builtin_arm_usat + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return(result); +} + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); +} + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief Load-Acquire (8 bit) + \details Executes a LDAB instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire (16 bit) + \details Executes a LDAH instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire (32 bit) + \details Executes a LDA instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief Store-Release (8 bit) + \details Executes a STLB instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (16 bit) + \details Executes a STLH instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (32 bit) + \details Executes a STL instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Load-Acquire Exclusive (8 bit) + \details Executes a LDAB exclusive instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +#define __LDAEXB (uint8_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (16 bit) + \details Executes a LDAH exclusive instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +#define __LDAEXH (uint16_t)__builtin_arm_ldaex + + +/** + \brief Load-Acquire Exclusive (32 bit) + \details Executes a LDA exclusive instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +#define __LDAEX (uint32_t)__builtin_arm_ldaex + + +/** + \brief Store-Release Exclusive (8 bit) + \details Executes a STLB exclusive instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXB (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (16 bit) + \details Executes a STLH exclusive instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEXH (uint32_t)__builtin_arm_stlex + + +/** + \brief Store-Release Exclusive (32 bit) + \details Executes a STL exclusive instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +#define __STLEX (uint32_t)__builtin_arm_stlex + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) + +__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#define __SSAT16(ARG1,ARG2) \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +#define __USAT16(ARG1,ARG2) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +__STATIC_FORCEINLINE uint32_t __UXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SEL (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) +{ + int32_t result; + + __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#endif /* (__ARM_FEATURE_DSP == 1) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#endif /* __CMSIS_ARMCLANG_H */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_compiler.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_compiler.h new file mode 100644 index 0000000..adbf296 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_compiler.h @@ -0,0 +1,283 @@ +/**************************************************************************//** + * @file cmsis_compiler.h + * @brief CMSIS compiler generic header file + * @version V5.1.0 + * @date 09. October 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_COMPILER_H +#define __CMSIS_COMPILER_H + +#include + +/* + * Arm Compiler 4/5 + */ +#if defined ( __CC_ARM ) + #include "cmsis_armcc.h" + + +/* + * Arm Compiler 6.6 LTM (armclang) + */ +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) && (__ARMCC_VERSION < 6100100) + #include "cmsis_armclang_ltm.h" + + /* + * Arm Compiler above 6.10.1 (armclang) + */ +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100) + #include "cmsis_armclang.h" + + +/* + * GNU Compiler + */ +#elif defined ( __GNUC__ ) + #include "cmsis_gcc.h" + + +/* + * IAR Compiler + */ +#elif defined ( __ICCARM__ ) + #include + + +/* + * TI Arm Compiler + */ +#elif defined ( __TI_ARM__ ) + #include + + #ifndef __ASM + #define __ASM __asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + #define __NO_RETURN __attribute__((noreturn)) + #endif + #ifndef __USED + #define __USED __attribute__((used)) + #endif + #ifndef __WEAK + #define __WEAK __attribute__((weak)) + #endif + #ifndef __PACKED + #define __PACKED __attribute__((packed)) + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed)) + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed)) + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) + #endif + #ifndef __RESTRICT + #define __RESTRICT __restrict + #endif + #ifndef __COMPILER_BARRIER + #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored. + #define __COMPILER_BARRIER() (void)0 + #endif + + +/* + * TASKING Compiler + */ +#elif defined ( __TASKING__ ) + /* + * The CMSIS functions have been implemented as intrinsics in the compiler. + * Please use "carm -?i" to get an up to date list of all intrinsics, + * Including the CMSIS ones. + */ + + #ifndef __ASM + #define __ASM __asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + #define __NO_RETURN __attribute__((noreturn)) + #endif + #ifndef __USED + #define __USED __attribute__((used)) + #endif + #ifndef __WEAK + #define __WEAK __attribute__((weak)) + #endif + #ifndef __PACKED + #define __PACKED __packed__ + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __packed__ + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION union __packed__ + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + struct __packed__ T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #define __ALIGNED(x) __align(x) + #endif + #ifndef __RESTRICT + #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. + #define __RESTRICT + #endif + #ifndef __COMPILER_BARRIER + #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored. + #define __COMPILER_BARRIER() (void)0 + #endif + + +/* + * COSMIC Compiler + */ +#elif defined ( __CSMC__ ) + #include + + #ifndef __ASM + #define __ASM _asm + #endif + #ifndef __INLINE + #define __INLINE inline + #endif + #ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline + #endif + #ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __STATIC_INLINE + #endif + #ifndef __NO_RETURN + // NO RETURN is automatically detected hence no warning here + #define __NO_RETURN + #endif + #ifndef __USED + #warning No compiler specific solution for __USED. __USED is ignored. + #define __USED + #endif + #ifndef __WEAK + #define __WEAK __weak + #endif + #ifndef __PACKED + #define __PACKED @packed + #endif + #ifndef __PACKED_STRUCT + #define __PACKED_STRUCT @packed struct + #endif + #ifndef __PACKED_UNION + #define __PACKED_UNION @packed union + #endif + #ifndef __UNALIGNED_UINT32 /* deprecated */ + @packed struct T_UINT32 { uint32_t v; }; + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) + #endif + #ifndef __UNALIGNED_UINT16_WRITE + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT16_READ + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) + #endif + #ifndef __UNALIGNED_UINT32_WRITE + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) + #endif + #ifndef __UNALIGNED_UINT32_READ + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) + #endif + #ifndef __ALIGNED + #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored. + #define __ALIGNED(x) + #endif + #ifndef __RESTRICT + #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored. + #define __RESTRICT + #endif + #ifndef __COMPILER_BARRIER + #warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored. + #define __COMPILER_BARRIER() (void)0 + #endif + + +#else + #error Unknown compiler. +#endif + + +#endif /* __CMSIS_COMPILER_H */ + diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_gcc.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_gcc.h new file mode 100644 index 0000000..3ddcc58 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_gcc.h @@ -0,0 +1,2168 @@ +/**************************************************************************//** + * @file cmsis_gcc.h + * @brief CMSIS compiler GCC header file + * @version V5.2.0 + * @date 08. May 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CMSIS_GCC_H +#define __CMSIS_GCC_H + +/* ignore some GCC warnings */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsign-conversion" +#pragma GCC diagnostic ignored "-Wconversion" +#pragma GCC diagnostic ignored "-Wunused-parameter" + +/* Fallback for __has_builtin */ +#ifndef __has_builtin + #define __has_builtin(x) (0) +#endif + +/* CMSIS compiler specific defines */ +#ifndef __ASM + #define __ASM __asm +#endif +#ifndef __INLINE + #define __INLINE inline +#endif +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline +#endif +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline +#endif +#ifndef __NO_RETURN + #define __NO_RETURN __attribute__((__noreturn__)) +#endif +#ifndef __USED + #define __USED __attribute__((used)) +#endif +#ifndef __WEAK + #define __WEAK __attribute__((weak)) +#endif +#ifndef __PACKED + #define __PACKED __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_STRUCT + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) +#endif +#ifndef __PACKED_UNION + #define __PACKED_UNION union __attribute__((packed, aligned(1))) +#endif +#ifndef __UNALIGNED_UINT32 /* deprecated */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + struct __attribute__((packed)) T_UINT32 { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) +#endif +#ifndef __UNALIGNED_UINT16_WRITE + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT16_READ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v) +#endif +#ifndef __UNALIGNED_UINT32_WRITE + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val)) +#endif +#ifndef __UNALIGNED_UINT32_READ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpacked" + #pragma GCC diagnostic ignored "-Wattributes" + __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; + #pragma GCC diagnostic pop + #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v) +#endif +#ifndef __ALIGNED + #define __ALIGNED(x) __attribute__((aligned(x))) +#endif +#ifndef __RESTRICT + #define __RESTRICT __restrict +#endif +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __ASM volatile("":::"memory") +#endif + +/* ######################### Startup and Lowlevel Init ######################## */ + +#ifndef __PROGRAM_START + +/** + \brief Initializes data and bss sections + \details This default implementations initialized all data and additional bss + sections relying on .copy.table and .zero.table specified properly + in the used linker script. + + */ +__STATIC_FORCEINLINE __NO_RETURN void __cmsis_start(void) +{ + extern void _start(void) __NO_RETURN; + + typedef struct { + uint32_t const* src; + uint32_t* dest; + uint32_t wlen; + } __copy_table_t; + + typedef struct { + uint32_t* dest; + uint32_t wlen; + } __zero_table_t; + + extern const __copy_table_t __copy_table_start__; + extern const __copy_table_t __copy_table_end__; + extern const __zero_table_t __zero_table_start__; + extern const __zero_table_t __zero_table_end__; + + for (__copy_table_t const* pTable = &__copy_table_start__; pTable < &__copy_table_end__; ++pTable) { + for(uint32_t i=0u; iwlen; ++i) { + pTable->dest[i] = pTable->src[i]; + } + } + + for (__zero_table_t const* pTable = &__zero_table_start__; pTable < &__zero_table_end__; ++pTable) { + for(uint32_t i=0u; iwlen; ++i) { + pTable->dest[i] = 0u; + } + } + + _start(); +} + +#define __PROGRAM_START __cmsis_start +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP __StackTop +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT __StackLimit +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __Vectors +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE __attribute((used, section(".vectors"))) +#endif + +/* ########################### Core Function Access ########################### */ +/** \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions + @{ + */ + +/** + \brief Enable IRQ Interrupts + \details Enables IRQ interrupts by clearing the I-bit in the CPSR. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __enable_irq(void) +{ + __ASM volatile ("cpsie i" : : : "memory"); +} + + +/** + \brief Disable IRQ Interrupts + \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"); +} + + +/** + \brief Get Control Register + \details Returns the content of the Control Register. + \return Control Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CONTROL(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Control Register (non-secure) + \details Returns the content of the non-secure Control Register when in secure mode. + \return non-secure Control Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, control_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Control Register + \details Writes the given value to the Control Register. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control) +{ + __ASM volatile ("MSR control, %0" : : "r" (control) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Control Register (non-secure) + \details Writes the given value to the non-secure Control Register when in secure state. + \param [in] control Control Register value to set + */ +__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control) +{ + __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory"); +} +#endif + + +/** + \brief Get IPSR Register + \details Returns the content of the IPSR Register. + \return IPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_IPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get APSR Register + \details Returns the content of the APSR Register. + \return APSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_APSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, apsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get xPSR Register + \details Returns the content of the xPSR Register. + \return xPSR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_xPSR(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, xpsr" : "=r" (result) ); + return(result); +} + + +/** + \brief Get Process Stack Pointer + \details Returns the current value of the Process Stack Pointer (PSP). + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer (non-secure) + \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state. + \return PSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, psp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Process Stack Pointer + \details Assigns the given value to the Process Stack Pointer (PSP). + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_PSP(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state. + \param [in] topOfProcStack Process Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack) +{ + __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : ); +} +#endif + + +/** + \brief Get Main Stack Pointer + \details Returns the current value of the Main Stack Pointer (MSP). + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSP(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer (non-secure) + \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state. + \return MSP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, msp_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Main Stack Pointer + \details Assigns the given value to the Main Stack Pointer (MSP). + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __set_MSP(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : ); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state. + \param [in] topOfMainStack Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack) +{ + __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : ); +} +#endif + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Stack Pointer (non-secure) + \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state. + \return SP Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, sp_ns" : "=r" (result) ); + return(result); +} + + +/** + \brief Set Stack Pointer (non-secure) + \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state. + \param [in] topOfStack Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_SP_NS(uint32_t topOfStack) +{ + __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : ); +} +#endif + + +/** + \brief Get Priority Mask + \details Returns the current state of the priority mask bit from the Priority Mask Register. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __get_PRIMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Priority Mask (non-secure) + \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state. + \return Priority Mask value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, primask_ns" : "=r" (result) :: "memory"); + return(result); +} +#endif + + +/** + \brief Set Priority Mask + \details Assigns the given value to the Priority Mask Register. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __set_PRIMASK(uint32_t priMask) +{ + __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Priority Mask (non-secure) + \details Assigns the given value to the non-secure Priority Mask Register when in secure state. + \param [in] priMask Priority Mask + */ +__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS(uint32_t priMask) +{ + __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory"); +} +#endif + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Enable FIQ + \details Enables FIQ interrupts by clearing the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __enable_fault_irq(void) +{ + __ASM volatile ("cpsie f" : : : "memory"); +} + + +/** + \brief Disable FIQ + \details Disables FIQ interrupts by setting the F-bit in the CPSR. + Can only be executed in Privileged modes. + */ +__STATIC_FORCEINLINE void __disable_fault_irq(void) +{ + __ASM volatile ("cpsid f" : : : "memory"); +} + + +/** + \brief Get Base Priority + \details Returns the current value of the Base Priority register. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __get_BASEPRI(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Base Priority (non-secure) + \details Returns the current value of the non-secure Base Priority register when in secure state. + \return Base Priority register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Base Priority + \details Assigns the given value to the Base Priority register. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri) +{ + __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Base Priority (non-secure) + \details Assigns the given value to the non-secure Base Priority register when in secure state. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory"); +} +#endif + + +/** + \brief Set Base Priority with condition + \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, + or the new value increases the BASEPRI priority level. + \param [in] basePri Base Priority value to set + */ +__STATIC_FORCEINLINE void __set_BASEPRI_MAX(uint32_t basePri) +{ + __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory"); +} + + +/** + \brief Get Fault Mask + \details Returns the current value of the Fault Mask register. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __get_FAULTMASK(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask" : "=r" (result) ); + return(result); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Fault Mask (non-secure) + \details Returns the current value of the non-secure Fault Mask register when in secure state. + \return Fault Mask register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS(void) +{ + uint32_t result; + + __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) ); + return(result); +} +#endif + + +/** + \brief Set Fault Mask + \details Assigns the given value to the Fault Mask register. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __set_FAULTMASK(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory"); +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Fault Mask (non-secure) + \details Assigns the given value to the non-secure Fault Mask register when in secure state. + \param [in] faultMask Fault Mask value to set + */ +__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask) +{ + __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory"); +} +#endif + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + +/** + \brief Get Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Process Stack Pointer Limit (PSPLIM). + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_PSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim" : "=r" (result) ); + return result; +#endif +} + +#if (defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Process Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \return PSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Process Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM). + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Process Stack Pointer (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state. + \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)ProcStackPtrLimit; +#else + __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit)); +#endif +} +#endif + + +/** + \brief Get Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always in non-secure + mode. + + \details Returns the current value of the Main Stack Pointer Limit (MSPLIM). + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __get_MSPLIM(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim" : "=r" (result) ); + return result; +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Get Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence zero is returned always. + + \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state. + \return MSPLIM Register value + */ +__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + return 0U; +#else + uint32_t result; + __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) ); + return result; +#endif +} +#endif + + +/** + \brief Set Main Stack Pointer Limit + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored in non-secure + mode. + + \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM). + \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set + */ +__STATIC_FORCEINLINE void __set_MSPLIM(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit)); +#endif +} + + +#if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) +/** + \brief Set Main Stack Pointer Limit (non-secure) + Devices without ARMv8-M Main Extensions (i.e. Cortex-M23) lack the non-secure + Stack Pointer Limit register hence the write is silently ignored. + + \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state. + \param [in] MainStackPtrLimit Main Stack Pointer value to set + */ +__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit) +{ +#if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)MainStackPtrLimit; +#else + __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit)); +#endif +} +#endif + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +/** + \brief Get FPSCR + \details Returns the current value of the Floating Point Status/Control register. + \return Floating Point Status/Control register value + */ +__STATIC_FORCEINLINE uint32_t __get_FPSCR(void) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#if __has_builtin(__builtin_arm_get_fpscr) +// Re-enable using built-in when GCC has been fixed +// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2) + /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */ + return __builtin_arm_get_fpscr(); +#else + uint32_t result; + + __ASM volatile ("VMRS %0, fpscr" : "=r" (result) ); + return(result); +#endif +#else + return(0U); +#endif +} + + +/** + \brief Set FPSCR + \details Assigns the given value to the Floating Point Status/Control register. + \param [in] fpscr Floating Point Status/Control value to set + */ +__STATIC_FORCEINLINE void __set_FPSCR(uint32_t fpscr) +{ +#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) +#if __has_builtin(__builtin_arm_set_fpscr) +// Re-enable using built-in when GCC has been fixed +// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2) + /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */ + __builtin_arm_set_fpscr(fpscr); +#else + __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc", "memory"); +#endif +#else + (void)fpscr; +#endif +} + + +/*@} end of CMSIS_Core_RegAccFunctions */ + + +/* ########################## Core Instruction Access ######################### */ +/** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface + Access to dedicated instructions + @{ +*/ + +/* Define macros for porting to both thumb1 and thumb2. + * For thumb1, use low register (r0-r7), specified by constraint "l" + * Otherwise, use general registers, specified by constraint "r" */ +#if defined (__thumb__) && !defined (__thumb2__) +#define __CMSIS_GCC_OUT_REG(r) "=l" (r) +#define __CMSIS_GCC_RW_REG(r) "+l" (r) +#define __CMSIS_GCC_USE_REG(r) "l" (r) +#else +#define __CMSIS_GCC_OUT_REG(r) "=r" (r) +#define __CMSIS_GCC_RW_REG(r) "+r" (r) +#define __CMSIS_GCC_USE_REG(r) "r" (r) +#endif + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP() __ASM volatile ("nop") + +/** + \brief Wait For Interrupt + \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs. + */ +#define __WFI() __ASM volatile ("wfi") + + +/** + \brief Wait For Event + \details Wait For Event is a hint instruction that permits the processor to enter + a low-power state until one of a number of events occurs. + */ +#define __WFE() __ASM volatile ("wfe") + + +/** + \brief Send Event + \details Send Event is a hint instruction. It causes an event to be signaled to the CPU. + */ +#define __SEV() __ASM volatile ("sev") + + +/** + \brief Instruction Synchronization Barrier + \details Instruction Synchronization Barrier flushes the pipeline in the processor, + so that all instructions following the ISB are fetched from cache or memory, + after the instruction has been completed. + */ +__STATIC_FORCEINLINE void __ISB(void) +{ + __ASM volatile ("isb 0xF":::"memory"); +} + + +/** + \brief Data Synchronization Barrier + \details Acts as a special kind of Data Memory Barrier. + It completes when all explicit memory accesses before this instruction complete. + */ +__STATIC_FORCEINLINE void __DSB(void) +{ + __ASM volatile ("dsb 0xF":::"memory"); +} + + +/** + \brief Data Memory Barrier + \details Ensures the apparent order of the explicit memory operations before + and after the instruction, without ensuring their completion. + */ +__STATIC_FORCEINLINE void __DMB(void) +{ + __ASM volatile ("dmb 0xF":::"memory"); +} + + +/** + \brief Reverse byte order (32 bit) + \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __REV(uint32_t value) +{ +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) + return __builtin_bswap32(value); +#else + uint32_t result; + + __ASM volatile ("rev %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +#endif +} + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __REV16(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rev16 %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +} + + +/** + \brief Reverse byte order (16 bit) + \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE int16_t __REVSH(int16_t value) +{ +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + return (int16_t)__builtin_bswap16(value); +#else + int16_t result; + + __ASM volatile ("revsh %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return result; +#endif +} + + +/** + \brief Rotate Right in unsigned value (32 bit) + \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits. + \param [in] op1 Value to rotate + \param [in] op2 Number of Bits to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2) +{ + op2 %= 32U; + if (op2 == 0U) + { + return op1; + } + return (op1 >> op2) | (op1 << (32U - op2)); +} + + +/** + \brief Breakpoint + \details Causes the processor to enter Debug state. + Debug tools can use this to investigate system state when the instruction at a particular address is reached. + \param [in] value is ignored by the processor. + If required, a debugger can use it to store additional information about the breakpoint. + */ +#define __BKPT(value) __ASM volatile ("bkpt "#value) + + +/** + \brief Reverse bit order of value + \details Reverses the bit order of the given value. + \param [in] value Value to reverse + \return Reversed value + */ +__STATIC_FORCEINLINE uint32_t __RBIT(uint32_t value) +{ + uint32_t result; + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) + __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) ); +#else + uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */ + + result = value; /* r will be reversed bits of v; first get LSB of v */ + for (value >>= 1U; value != 0U; value >>= 1U) + { + result <<= 1U; + result |= value & 1U; + s--; + } + result <<= s; /* shift when v's highest bits are zero */ +#endif + return result; +} + + +/** + \brief Count leading zeros + \details Counts the number of leading zeros of a data value. + \param [in] value Value to count the leading zeros + \return number of leading zeros in value + */ +__STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value) +{ + /* Even though __builtin_clz produces a CLZ instruction on ARM, formally + __builtin_clz(0) is undefined behaviour, so handle this case specially. + This guarantees ARM-compatible results if happening to compile on a non-ARM + target, and ensures the compiler doesn't decide to activate any + optimisations using the logic "value was passed to __builtin_clz, so it + is non-zero". + ARM GCC 7.3 and possibly earlier will optimise this test away, leaving a + single CLZ instruction. + */ + if (value == 0U) + { + return 32U; + } + return __builtin_clz(value); +} + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief LDR Exclusive (8 bit) + \details Executes a exclusive LDR instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDREXB(volatile uint8_t *addr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrexb %0, %1" : "=r" (result) : "Q" (*addr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) : "memory" ); +#endif + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDR Exclusive (16 bit) + \details Executes a exclusive LDR instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDREXH(volatile uint16_t *addr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrexh %0, %1" : "=r" (result) : "Q" (*addr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) : "memory" ); +#endif + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDR Exclusive (32 bit) + \details Executes a exclusive LDR instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDREXW(volatile uint32_t *addr) +{ + uint32_t result; + + __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); + return(result); +} + + +/** + \brief STR Exclusive (8 bit) + \details Executes a exclusive STR instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXB(uint8_t value, volatile uint8_t *addr) +{ + uint32_t result; + + __ASM volatile ("strexb %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief STR Exclusive (16 bit) + \details Executes a exclusive STR instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXH(uint16_t value, volatile uint16_t *addr) +{ + uint32_t result; + + __ASM volatile ("strexh %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief STR Exclusive (32 bit) + \details Executes a exclusive STR instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr) +{ + uint32_t result; + + __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); + return(result); +} + + +/** + \brief Remove the exclusive lock + \details Removes the exclusive lock which is created by LDREX. + */ +__STATIC_FORCEINLINE void __CLREX(void) +{ + __ASM volatile ("clrex" ::: "memory"); +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] ARG1 Value to be saturated + \param [in] ARG2 Bit position to saturate to (1..32) + \return Saturated value + */ +#define __SSAT(ARG1,ARG2) \ +__extension__ \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM ("ssat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] ARG1 Value to be saturated + \param [in] ARG2 Bit position to saturate to (0..31) + \return Saturated value + */ +#define __USAT(ARG1,ARG2) \ + __extension__ \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM ("usat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + + +/** + \brief Rotate Right with Extend (32 bit) + \details Moves each bit of a bitstring right by one bit. + The carry input is shifted in at the left end of the bitstring. + \param [in] value Value to rotate + \return Rotated value + */ +__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value) +{ + uint32_t result; + + __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) ); + return(result); +} + + +/** + \brief LDRT Unprivileged (8 bit) + \details Executes a Unprivileged LDRT instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrbt %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" ); +#endif + return ((uint8_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (16 bit) + \details Executes a Unprivileged LDRT instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr) +{ + uint32_t result; + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) + __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) ); +#else + /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not + accepted by assembler. So has to use following less efficient pattern. + */ + __ASM volatile ("ldrht %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" ); +#endif + return ((uint16_t) result); /* Add explicit type cast here */ +} + + +/** + \brief LDRT Unprivileged (32 bit) + \details Executes a Unprivileged LDRT instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief STRT Unprivileged (8 bit) + \details Executes a Unprivileged STRT instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (16 bit) + \details Executes a Unprivileged STRT instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief STRT Unprivileged (32 bit) + \details Executes a Unprivileged STRT instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) ); +} + +#else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + +/** + \brief Signed Saturate + \details Saturates a signed value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (1..32) + \return Saturated value + */ +__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat) +{ + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; +} + +/** + \brief Unsigned Saturate + \details Saturates an unsigned value. + \param [in] value Value to be saturated + \param [in] sat Bit position to saturate to (0..31) + \return Saturated value + */ +__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat) +{ + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; +} + +#endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \ + (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \ + (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */ + + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) +/** + \brief Load-Acquire (8 bit) + \details Executes a LDAB instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire (16 bit) + \details Executes a LDAH instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire (32 bit) + \details Executes a LDA instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief Store-Release (8 bit) + \details Executes a STLB instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr) +{ + __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (16 bit) + \details Executes a STLH instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr) +{ + __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Store-Release (32 bit) + \details Executes a STL instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + */ +__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr) +{ + __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) ); +} + + +/** + \brief Load-Acquire Exclusive (8 bit) + \details Executes a LDAB exclusive instruction for 8 bit value. + \param [in] ptr Pointer to data + \return value of type uint8_t at (*ptr) + */ +__STATIC_FORCEINLINE uint8_t __LDAEXB(volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaexb %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint8_t) result); +} + + +/** + \brief Load-Acquire Exclusive (16 bit) + \details Executes a LDAH exclusive instruction for 16 bit values. + \param [in] ptr Pointer to data + \return value of type uint16_t at (*ptr) + */ +__STATIC_FORCEINLINE uint16_t __LDAEXH(volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaexh %0, %1" : "=r" (result) : "Q" (*ptr) ); + return ((uint16_t) result); +} + + +/** + \brief Load-Acquire Exclusive (32 bit) + \details Executes a LDA exclusive instruction for 32 bit values. + \param [in] ptr Pointer to data + \return value of type uint32_t at (*ptr) + */ +__STATIC_FORCEINLINE uint32_t __LDAEX(volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("ldaex %0, %1" : "=r" (result) : "Q" (*ptr) ); + return(result); +} + + +/** + \brief Store-Release Exclusive (8 bit) + \details Executes a STLB exclusive instruction for 8 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlexb %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief Store-Release Exclusive (16 bit) + \details Executes a STLH exclusive instruction for 16 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlexh %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); + return(result); +} + + +/** + \brief Store-Release Exclusive (32 bit) + \details Executes a STL exclusive instruction for 32 bit values. + \param [in] value Value to store + \param [in] ptr Pointer to location + \return 0 Function succeeded + \return 1 Function failed + */ +__STATIC_FORCEINLINE uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr) +{ + uint32_t result; + + __ASM volatile ("stlex %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) ); + return(result); +} + +#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */ + +/*@}*/ /* end of group CMSIS_Core_InstructionInterface */ + + +/* ################### Compiler specific Intrinsics ########################### */ +/** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics + Access to dedicated SIMD instructions + @{ +*/ + +#if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1)) + +__STATIC_FORCEINLINE uint32_t __SADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + + +__STATIC_FORCEINLINE uint32_t __SADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHASX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USAD8(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#define __SSAT16(ARG1,ARG2) \ +({ \ + int32_t __RES, __ARG1 = (ARG1); \ + __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +#define __USAT16(ARG1,ARG2) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1); \ + __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ + __RES; \ + }) + +__STATIC_FORCEINLINE uint32_t __UXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t op1) +{ + uint32_t result; + + __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1)); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3) +{ + uint32_t result; + + __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc) +{ + union llreg_u{ + uint32_t w32[2]; + uint64_t w64; + } llr; + llr.w64 = acc; + +#ifndef __ARMEB__ /* Little endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) ); +#else /* Big endian */ + __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) ); +#endif + + return(llr.w64); +} + +__STATIC_FORCEINLINE uint32_t __SEL (uint32_t op1, uint32_t op2) +{ + uint32_t result; + + __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +__STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2) +{ + int32_t result; + + __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + +#if 0 +#define __PKHBT(ARG1,ARG2,ARG3) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ + __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ + __RES; \ + }) + +#define __PKHTB(ARG1,ARG2,ARG3) \ +({ \ + uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \ + if (ARG3 == 0) \ + __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \ + else \ + __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \ + __RES; \ + }) +#endif + +#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \ + ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) ) + +#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \ + ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) ) + +__STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3) +{ + int32_t result; + + __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) ); + return(result); +} + +#endif /* (__ARM_FEATURE_DSP == 1) */ +/*@} end of group CMSIS_SIMD_intrinsics */ + + +#pragma GCC diagnostic pop + +#endif /* __CMSIS_GCC_H */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_iccarm.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_iccarm.h new file mode 100644 index 0000000..12d68fd --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_iccarm.h @@ -0,0 +1,964 @@ +/**************************************************************************//** + * @file cmsis_iccarm.h + * @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file + * @version V5.1.0 + * @date 08. May 2019 + ******************************************************************************/ + +//------------------------------------------------------------------------------ +// +// Copyright (c) 2017-2019 IAR Systems +// Copyright (c) 2017-2019 Arm Limited. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License") +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//------------------------------------------------------------------------------ + + +#ifndef __CMSIS_ICCARM_H__ +#define __CMSIS_ICCARM_H__ + +#ifndef __ICCARM__ + #error This file should only be compiled by ICCARM +#endif + +#pragma system_include + +#define __IAR_FT _Pragma("inline=forced") __intrinsic + +#if (__VER__ >= 8000000) + #define __ICCARM_V8 1 +#else + #define __ICCARM_V8 0 +#endif + +#ifndef __ALIGNED + #if __ICCARM_V8 + #define __ALIGNED(x) __attribute__((aligned(x))) + #elif (__VER__ >= 7080000) + /* Needs IAR language extensions */ + #define __ALIGNED(x) __attribute__((aligned(x))) + #else + #warning No compiler specific solution for __ALIGNED.__ALIGNED is ignored. + #define __ALIGNED(x) + #endif +#endif + + +/* Define compiler macros for CPU architecture, used in CMSIS 5. + */ +#if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__ || __ARM_ARCH_8M_BASE__ || __ARM_ARCH_8M_MAIN__ +/* Macros already defined */ +#else + #if defined(__ARM8M_MAINLINE__) || defined(__ARM8EM_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #elif defined(__ARM8M_BASELINE__) + #define __ARM_ARCH_8M_BASE__ 1 + #elif defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'M' + #if __ARM_ARCH == 6 + #define __ARM_ARCH_6M__ 1 + #elif __ARM_ARCH == 7 + #if __ARM_FEATURE_DSP + #define __ARM_ARCH_7EM__ 1 + #else + #define __ARM_ARCH_7M__ 1 + #endif + #endif /* __ARM_ARCH */ + #endif /* __ARM_ARCH_PROFILE == 'M' */ +#endif + +/* Alternativ core deduction for older ICCARM's */ +#if !defined(__ARM_ARCH_6M__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__) && \ + !defined(__ARM_ARCH_8M_BASE__) && !defined(__ARM_ARCH_8M_MAIN__) + #if defined(__ARM6M__) && (__CORE__ == __ARM6M__) + #define __ARM_ARCH_6M__ 1 + #elif defined(__ARM7M__) && (__CORE__ == __ARM7M__) + #define __ARM_ARCH_7M__ 1 + #elif defined(__ARM7EM__) && (__CORE__ == __ARM7EM__) + #define __ARM_ARCH_7EM__ 1 + #elif defined(__ARM8M_BASELINE__) && (__CORE == __ARM8M_BASELINE__) + #define __ARM_ARCH_8M_BASE__ 1 + #elif defined(__ARM8M_MAINLINE__) && (__CORE == __ARM8M_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #elif defined(__ARM8EM_MAINLINE__) && (__CORE == __ARM8EM_MAINLINE__) + #define __ARM_ARCH_8M_MAIN__ 1 + #else + #error "Unknown target." + #endif +#endif + + + +#if defined(__ARM_ARCH_6M__) && __ARM_ARCH_6M__==1 + #define __IAR_M0_FAMILY 1 +#elif defined(__ARM_ARCH_8M_BASE__) && __ARM_ARCH_8M_BASE__==1 + #define __IAR_M0_FAMILY 1 +#else + #define __IAR_M0_FAMILY 0 +#endif + + +#ifndef __ASM + #define __ASM __asm +#endif + +#ifndef __COMPILER_BARRIER + #define __COMPILER_BARRIER() __ASM volatile("":::"memory") +#endif + +#ifndef __INLINE + #define __INLINE inline +#endif + +#ifndef __NO_RETURN + #if __ICCARM_V8 + #define __NO_RETURN __attribute__((__noreturn__)) + #else + #define __NO_RETURN _Pragma("object_attribute=__noreturn") + #endif +#endif + +#ifndef __PACKED + #if __ICCARM_V8 + #define __PACKED __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED __packed + #endif +#endif + +#ifndef __PACKED_STRUCT + #if __ICCARM_V8 + #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED_STRUCT __packed struct + #endif +#endif + +#ifndef __PACKED_UNION + #if __ICCARM_V8 + #define __PACKED_UNION union __attribute__((packed, aligned(1))) + #else + /* Needs IAR language extensions */ + #define __PACKED_UNION __packed union + #endif +#endif + +#ifndef __RESTRICT + #if __ICCARM_V8 + #define __RESTRICT __restrict + #else + /* Needs IAR language extensions */ + #define __RESTRICT restrict + #endif +#endif + +#ifndef __STATIC_INLINE + #define __STATIC_INLINE static inline +#endif + +#ifndef __FORCEINLINE + #define __FORCEINLINE _Pragma("inline=forced") +#endif + +#ifndef __STATIC_FORCEINLINE + #define __STATIC_FORCEINLINE __FORCEINLINE __STATIC_INLINE +#endif + +#ifndef __UNALIGNED_UINT16_READ +#pragma language=save +#pragma language=extended +__IAR_FT uint16_t __iar_uint16_read(void const *ptr) +{ + return *(__packed uint16_t*)(ptr); +} +#pragma language=restore +#define __UNALIGNED_UINT16_READ(PTR) __iar_uint16_read(PTR) +#endif + + +#ifndef __UNALIGNED_UINT16_WRITE +#pragma language=save +#pragma language=extended +__IAR_FT void __iar_uint16_write(void const *ptr, uint16_t val) +{ + *(__packed uint16_t*)(ptr) = val;; +} +#pragma language=restore +#define __UNALIGNED_UINT16_WRITE(PTR,VAL) __iar_uint16_write(PTR,VAL) +#endif + +#ifndef __UNALIGNED_UINT32_READ +#pragma language=save +#pragma language=extended +__IAR_FT uint32_t __iar_uint32_read(void const *ptr) +{ + return *(__packed uint32_t*)(ptr); +} +#pragma language=restore +#define __UNALIGNED_UINT32_READ(PTR) __iar_uint32_read(PTR) +#endif + +#ifndef __UNALIGNED_UINT32_WRITE +#pragma language=save +#pragma language=extended +__IAR_FT void __iar_uint32_write(void const *ptr, uint32_t val) +{ + *(__packed uint32_t*)(ptr) = val;; +} +#pragma language=restore +#define __UNALIGNED_UINT32_WRITE(PTR,VAL) __iar_uint32_write(PTR,VAL) +#endif + +#ifndef __UNALIGNED_UINT32 /* deprecated */ +#pragma language=save +#pragma language=extended +__packed struct __iar_u32 { uint32_t v; }; +#pragma language=restore +#define __UNALIGNED_UINT32(PTR) (((struct __iar_u32 *)(PTR))->v) +#endif + +#ifndef __USED + #if __ICCARM_V8 + #define __USED __attribute__((used)) + #else + #define __USED _Pragma("__root") + #endif +#endif + +#ifndef __WEAK + #if __ICCARM_V8 + #define __WEAK __attribute__((weak)) + #else + #define __WEAK _Pragma("__weak") + #endif +#endif + +#ifndef __PROGRAM_START +#define __PROGRAM_START __iar_program_start +#endif + +#ifndef __INITIAL_SP +#define __INITIAL_SP CSTACK$$Limit +#endif + +#ifndef __STACK_LIMIT +#define __STACK_LIMIT CSTACK$$Base +#endif + +#ifndef __VECTOR_TABLE +#define __VECTOR_TABLE __vector_table +#endif + +#ifndef __VECTOR_TABLE_ATTRIBUTE +#define __VECTOR_TABLE_ATTRIBUTE @".intvec" +#endif + +#ifndef __ICCARM_INTRINSICS_VERSION__ + #define __ICCARM_INTRINSICS_VERSION__ 0 +#endif + +#if __ICCARM_INTRINSICS_VERSION__ == 2 + + #if defined(__CLZ) + #undef __CLZ + #endif + #if defined(__REVSH) + #undef __REVSH + #endif + #if defined(__RBIT) + #undef __RBIT + #endif + #if defined(__SSAT) + #undef __SSAT + #endif + #if defined(__USAT) + #undef __USAT + #endif + + #include "iccarm_builtin.h" + + #define __disable_fault_irq __iar_builtin_disable_fiq + #define __disable_irq __iar_builtin_disable_interrupt + #define __enable_fault_irq __iar_builtin_enable_fiq + #define __enable_irq __iar_builtin_enable_interrupt + #define __arm_rsr __iar_builtin_rsr + #define __arm_wsr __iar_builtin_wsr + + + #define __get_APSR() (__arm_rsr("APSR")) + #define __get_BASEPRI() (__arm_rsr("BASEPRI")) + #define __get_CONTROL() (__arm_rsr("CONTROL")) + #define __get_FAULTMASK() (__arm_rsr("FAULTMASK")) + + #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) ) + #define __get_FPSCR() (__arm_rsr("FPSCR")) + #define __set_FPSCR(VALUE) (__arm_wsr("FPSCR", (VALUE))) + #else + #define __get_FPSCR() ( 0 ) + #define __set_FPSCR(VALUE) ((void)VALUE) + #endif + + #define __get_IPSR() (__arm_rsr("IPSR")) + #define __get_MSP() (__arm_rsr("MSP")) + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + #define __get_MSPLIM() (0U) + #else + #define __get_MSPLIM() (__arm_rsr("MSPLIM")) + #endif + #define __get_PRIMASK() (__arm_rsr("PRIMASK")) + #define __get_PSP() (__arm_rsr("PSP")) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __get_PSPLIM() (0U) + #else + #define __get_PSPLIM() (__arm_rsr("PSPLIM")) + #endif + + #define __get_xPSR() (__arm_rsr("xPSR")) + + #define __set_BASEPRI(VALUE) (__arm_wsr("BASEPRI", (VALUE))) + #define __set_BASEPRI_MAX(VALUE) (__arm_wsr("BASEPRI_MAX", (VALUE))) + #define __set_CONTROL(VALUE) (__arm_wsr("CONTROL", (VALUE))) + #define __set_FAULTMASK(VALUE) (__arm_wsr("FAULTMASK", (VALUE))) + #define __set_MSP(VALUE) (__arm_wsr("MSP", (VALUE))) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + #define __set_MSPLIM(VALUE) ((void)(VALUE)) + #else + #define __set_MSPLIM(VALUE) (__arm_wsr("MSPLIM", (VALUE))) + #endif + #define __set_PRIMASK(VALUE) (__arm_wsr("PRIMASK", (VALUE))) + #define __set_PSP(VALUE) (__arm_wsr("PSP", (VALUE))) + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __set_PSPLIM(VALUE) ((void)(VALUE)) + #else + #define __set_PSPLIM(VALUE) (__arm_wsr("PSPLIM", (VALUE))) + #endif + + #define __TZ_get_CONTROL_NS() (__arm_rsr("CONTROL_NS")) + #define __TZ_set_CONTROL_NS(VALUE) (__arm_wsr("CONTROL_NS", (VALUE))) + #define __TZ_get_PSP_NS() (__arm_rsr("PSP_NS")) + #define __TZ_set_PSP_NS(VALUE) (__arm_wsr("PSP_NS", (VALUE))) + #define __TZ_get_MSP_NS() (__arm_rsr("MSP_NS")) + #define __TZ_set_MSP_NS(VALUE) (__arm_wsr("MSP_NS", (VALUE))) + #define __TZ_get_SP_NS() (__arm_rsr("SP_NS")) + #define __TZ_set_SP_NS(VALUE) (__arm_wsr("SP_NS", (VALUE))) + #define __TZ_get_PRIMASK_NS() (__arm_rsr("PRIMASK_NS")) + #define __TZ_set_PRIMASK_NS(VALUE) (__arm_wsr("PRIMASK_NS", (VALUE))) + #define __TZ_get_BASEPRI_NS() (__arm_rsr("BASEPRI_NS")) + #define __TZ_set_BASEPRI_NS(VALUE) (__arm_wsr("BASEPRI_NS", (VALUE))) + #define __TZ_get_FAULTMASK_NS() (__arm_rsr("FAULTMASK_NS")) + #define __TZ_set_FAULTMASK_NS(VALUE)(__arm_wsr("FAULTMASK_NS", (VALUE))) + + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + #define __TZ_get_PSPLIM_NS() (0U) + #define __TZ_set_PSPLIM_NS(VALUE) ((void)(VALUE)) + #else + #define __TZ_get_PSPLIM_NS() (__arm_rsr("PSPLIM_NS")) + #define __TZ_set_PSPLIM_NS(VALUE) (__arm_wsr("PSPLIM_NS", (VALUE))) + #endif + + #define __TZ_get_MSPLIM_NS() (__arm_rsr("MSPLIM_NS")) + #define __TZ_set_MSPLIM_NS(VALUE) (__arm_wsr("MSPLIM_NS", (VALUE))) + + #define __NOP __iar_builtin_no_operation + + #define __CLZ __iar_builtin_CLZ + #define __CLREX __iar_builtin_CLREX + + #define __DMB __iar_builtin_DMB + #define __DSB __iar_builtin_DSB + #define __ISB __iar_builtin_ISB + + #define __LDREXB __iar_builtin_LDREXB + #define __LDREXH __iar_builtin_LDREXH + #define __LDREXW __iar_builtin_LDREX + + #define __RBIT __iar_builtin_RBIT + #define __REV __iar_builtin_REV + #define __REV16 __iar_builtin_REV16 + + __IAR_FT int16_t __REVSH(int16_t val) + { + return (int16_t) __iar_builtin_REVSH(val); + } + + #define __ROR __iar_builtin_ROR + #define __RRX __iar_builtin_RRX + + #define __SEV __iar_builtin_SEV + + #if !__IAR_M0_FAMILY + #define __SSAT __iar_builtin_SSAT + #endif + + #define __STREXB __iar_builtin_STREXB + #define __STREXH __iar_builtin_STREXH + #define __STREXW __iar_builtin_STREX + + #if !__IAR_M0_FAMILY + #define __USAT __iar_builtin_USAT + #endif + + #define __WFE __iar_builtin_WFE + #define __WFI __iar_builtin_WFI + + #if __ARM_MEDIA__ + #define __SADD8 __iar_builtin_SADD8 + #define __QADD8 __iar_builtin_QADD8 + #define __SHADD8 __iar_builtin_SHADD8 + #define __UADD8 __iar_builtin_UADD8 + #define __UQADD8 __iar_builtin_UQADD8 + #define __UHADD8 __iar_builtin_UHADD8 + #define __SSUB8 __iar_builtin_SSUB8 + #define __QSUB8 __iar_builtin_QSUB8 + #define __SHSUB8 __iar_builtin_SHSUB8 + #define __USUB8 __iar_builtin_USUB8 + #define __UQSUB8 __iar_builtin_UQSUB8 + #define __UHSUB8 __iar_builtin_UHSUB8 + #define __SADD16 __iar_builtin_SADD16 + #define __QADD16 __iar_builtin_QADD16 + #define __SHADD16 __iar_builtin_SHADD16 + #define __UADD16 __iar_builtin_UADD16 + #define __UQADD16 __iar_builtin_UQADD16 + #define __UHADD16 __iar_builtin_UHADD16 + #define __SSUB16 __iar_builtin_SSUB16 + #define __QSUB16 __iar_builtin_QSUB16 + #define __SHSUB16 __iar_builtin_SHSUB16 + #define __USUB16 __iar_builtin_USUB16 + #define __UQSUB16 __iar_builtin_UQSUB16 + #define __UHSUB16 __iar_builtin_UHSUB16 + #define __SASX __iar_builtin_SASX + #define __QASX __iar_builtin_QASX + #define __SHASX __iar_builtin_SHASX + #define __UASX __iar_builtin_UASX + #define __UQASX __iar_builtin_UQASX + #define __UHASX __iar_builtin_UHASX + #define __SSAX __iar_builtin_SSAX + #define __QSAX __iar_builtin_QSAX + #define __SHSAX __iar_builtin_SHSAX + #define __USAX __iar_builtin_USAX + #define __UQSAX __iar_builtin_UQSAX + #define __UHSAX __iar_builtin_UHSAX + #define __USAD8 __iar_builtin_USAD8 + #define __USADA8 __iar_builtin_USADA8 + #define __SSAT16 __iar_builtin_SSAT16 + #define __USAT16 __iar_builtin_USAT16 + #define __UXTB16 __iar_builtin_UXTB16 + #define __UXTAB16 __iar_builtin_UXTAB16 + #define __SXTB16 __iar_builtin_SXTB16 + #define __SXTAB16 __iar_builtin_SXTAB16 + #define __SMUAD __iar_builtin_SMUAD + #define __SMUADX __iar_builtin_SMUADX + #define __SMMLA __iar_builtin_SMMLA + #define __SMLAD __iar_builtin_SMLAD + #define __SMLADX __iar_builtin_SMLADX + #define __SMLALD __iar_builtin_SMLALD + #define __SMLALDX __iar_builtin_SMLALDX + #define __SMUSD __iar_builtin_SMUSD + #define __SMUSDX __iar_builtin_SMUSDX + #define __SMLSD __iar_builtin_SMLSD + #define __SMLSDX __iar_builtin_SMLSDX + #define __SMLSLD __iar_builtin_SMLSLD + #define __SMLSLDX __iar_builtin_SMLSLDX + #define __SEL __iar_builtin_SEL + #define __QADD __iar_builtin_QADD + #define __QSUB __iar_builtin_QSUB + #define __PKHBT __iar_builtin_PKHBT + #define __PKHTB __iar_builtin_PKHTB + #endif + +#else /* __ICCARM_INTRINSICS_VERSION__ == 2 */ + + #if __IAR_M0_FAMILY + /* Avoid clash between intrinsics.h and arm_math.h when compiling for Cortex-M0. */ + #define __CLZ __cmsis_iar_clz_not_active + #define __SSAT __cmsis_iar_ssat_not_active + #define __USAT __cmsis_iar_usat_not_active + #define __RBIT __cmsis_iar_rbit_not_active + #define __get_APSR __cmsis_iar_get_APSR_not_active + #endif + + + #if (!((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) )) + #define __get_FPSCR __cmsis_iar_get_FPSR_not_active + #define __set_FPSCR __cmsis_iar_set_FPSR_not_active + #endif + + #ifdef __INTRINSICS_INCLUDED + #error intrinsics.h is already included previously! + #endif + + #include + + #if __IAR_M0_FAMILY + /* Avoid clash between intrinsics.h and arm_math.h when compiling for Cortex-M0. */ + #undef __CLZ + #undef __SSAT + #undef __USAT + #undef __RBIT + #undef __get_APSR + + __STATIC_INLINE uint8_t __CLZ(uint32_t data) + { + if (data == 0U) { return 32U; } + + uint32_t count = 0U; + uint32_t mask = 0x80000000U; + + while ((data & mask) == 0U) + { + count += 1U; + mask = mask >> 1U; + } + return count; + } + + __STATIC_INLINE uint32_t __RBIT(uint32_t v) + { + uint8_t sc = 31U; + uint32_t r = v; + for (v >>= 1U; v; v >>= 1U) + { + r <<= 1U; + r |= v & 1U; + sc--; + } + return (r << sc); + } + + __STATIC_INLINE uint32_t __get_APSR(void) + { + uint32_t res; + __asm("MRS %0,APSR" : "=r" (res)); + return res; + } + + #endif + + #if (!((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \ + (defined (__FPU_USED ) && (__FPU_USED == 1U)) )) + #undef __get_FPSCR + #undef __set_FPSCR + #define __get_FPSCR() (0) + #define __set_FPSCR(VALUE) ((void)VALUE) + #endif + + #pragma diag_suppress=Pe940 + #pragma diag_suppress=Pe177 + + #define __enable_irq __enable_interrupt + #define __disable_irq __disable_interrupt + #define __NOP __no_operation + + #define __get_xPSR __get_PSR + + #if (!defined(__ARM_ARCH_6M__) || __ARM_ARCH_6M__==0) + + __IAR_FT uint32_t __LDREXW(uint32_t volatile *ptr) + { + return __LDREX((unsigned long *)ptr); + } + + __IAR_FT uint32_t __STREXW(uint32_t value, uint32_t volatile *ptr) + { + return __STREX(value, (unsigned long *)ptr); + } + #endif + + + /* __CORTEX_M is defined in core_cm0.h, core_cm3.h and core_cm4.h. */ + #if (__CORTEX_M >= 0x03) + + __IAR_FT uint32_t __RRX(uint32_t value) + { + uint32_t result; + __ASM("RRX %0, %1" : "=r"(result) : "r" (value) : "cc"); + return(result); + } + + __IAR_FT void __set_BASEPRI_MAX(uint32_t value) + { + __asm volatile("MSR BASEPRI_MAX,%0"::"r" (value)); + } + + + #define __enable_fault_irq __enable_fiq + #define __disable_fault_irq __disable_fiq + + + #endif /* (__CORTEX_M >= 0x03) */ + + __IAR_FT uint32_t __ROR(uint32_t op1, uint32_t op2) + { + return (op1 >> op2) | (op1 << ((sizeof(op1)*8)-op2)); + } + + #if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + + __IAR_FT uint32_t __get_MSPLIM(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,MSPLIM" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __set_MSPLIM(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure MSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR MSPLIM,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __get_PSPLIM(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,PSPLIM" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __set_PSPLIM(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR PSPLIM,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __TZ_get_CONTROL_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,CONTROL_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_CONTROL_NS(uint32_t value) + { + __asm volatile("MSR CONTROL_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_PSP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,PSP_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_PSP_NS(uint32_t value) + { + __asm volatile("MSR PSP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_MSP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,MSP_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_MSP_NS(uint32_t value) + { + __asm volatile("MSR MSP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_SP_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,SP_NS" : "=r" (res)); + return res; + } + __IAR_FT void __TZ_set_SP_NS(uint32_t value) + { + __asm volatile("MSR SP_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_PRIMASK_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,PRIMASK_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_PRIMASK_NS(uint32_t value) + { + __asm volatile("MSR PRIMASK_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_BASEPRI_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,BASEPRI_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_BASEPRI_NS(uint32_t value) + { + __asm volatile("MSR BASEPRI_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_FAULTMASK_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,FAULTMASK_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_FAULTMASK_NS(uint32_t value) + { + __asm volatile("MSR FAULTMASK_NS,%0" :: "r" (value)); + } + + __IAR_FT uint32_t __TZ_get_PSPLIM_NS(void) + { + uint32_t res; + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + res = 0U; + #else + __asm volatile("MRS %0,PSPLIM_NS" : "=r" (res)); + #endif + return res; + } + + __IAR_FT void __TZ_set_PSPLIM_NS(uint32_t value) + { + #if (!(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) && \ + (!defined (__ARM_FEATURE_CMSE ) || (__ARM_FEATURE_CMSE < 3))) + // without main extensions, the non-secure PSPLIM is RAZ/WI + (void)value; + #else + __asm volatile("MSR PSPLIM_NS,%0" :: "r" (value)); + #endif + } + + __IAR_FT uint32_t __TZ_get_MSPLIM_NS(void) + { + uint32_t res; + __asm volatile("MRS %0,MSPLIM_NS" : "=r" (res)); + return res; + } + + __IAR_FT void __TZ_set_MSPLIM_NS(uint32_t value) + { + __asm volatile("MSR MSPLIM_NS,%0" :: "r" (value)); + } + + #endif /* __ARM_ARCH_8M_MAIN__ or __ARM_ARCH_8M_BASE__ */ + +#endif /* __ICCARM_INTRINSICS_VERSION__ == 2 */ + +#define __BKPT(value) __asm volatile ("BKPT %0" : : "i"(value)) + +#if __IAR_M0_FAMILY + __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat) + { + if ((sat >= 1U) && (sat <= 32U)) + { + const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); + const int32_t min = -1 - max ; + if (val > max) + { + return max; + } + else if (val < min) + { + return min; + } + } + return val; + } + + __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat) + { + if (sat <= 31U) + { + const uint32_t max = ((1U << sat) - 1U); + if (val > (int32_t)max) + { + return max; + } + else if (val < 0) + { + return 0U; + } + } + return (uint32_t)val; + } +#endif + +#if (__CORTEX_M >= 0x03) /* __CORTEX_M is defined in core_cm0.h, core_cm3.h and core_cm4.h. */ + + __IAR_FT uint8_t __LDRBT(volatile uint8_t *addr) + { + uint32_t res; + __ASM("LDRBT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDRHT(volatile uint16_t *addr) + { + uint32_t res; + __ASM("LDRHT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDRT(volatile uint32_t *addr) + { + uint32_t res; + __ASM("LDRT %0, [%1]" : "=r" (res) : "r" (addr) : "memory"); + return res; + } + + __IAR_FT void __STRBT(uint8_t value, volatile uint8_t *addr) + { + __ASM("STRBT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory"); + } + + __IAR_FT void __STRHT(uint16_t value, volatile uint16_t *addr) + { + __ASM("STRHT %1, [%0]" : : "r" (addr), "r" ((uint32_t)value) : "memory"); + } + + __IAR_FT void __STRT(uint32_t value, volatile uint32_t *addr) + { + __ASM("STRT %1, [%0]" : : "r" (addr), "r" (value) : "memory"); + } + +#endif /* (__CORTEX_M >= 0x03) */ + +#if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \ + (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) + + + __IAR_FT uint8_t __LDAB(volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAB %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDAH(volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAH %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDA(volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("LDA %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return res; + } + + __IAR_FT void __STLB(uint8_t value, volatile uint8_t *ptr) + { + __ASM volatile ("STLB %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT void __STLH(uint16_t value, volatile uint16_t *ptr) + { + __ASM volatile ("STLH %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT void __STL(uint32_t value, volatile uint32_t *ptr) + { + __ASM volatile ("STL %1, [%0]" :: "r" (ptr), "r" (value) : "memory"); + } + + __IAR_FT uint8_t __LDAEXB(volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEXB %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint8_t)res); + } + + __IAR_FT uint16_t __LDAEXH(volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEXH %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return ((uint16_t)res); + } + + __IAR_FT uint32_t __LDAEX(volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("LDAEX %0, [%1]" : "=r" (res) : "r" (ptr) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEXB %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEXH %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + + __IAR_FT uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr) + { + uint32_t res; + __ASM volatile ("STLEX %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory"); + return res; + } + +#endif /* __ARM_ARCH_8M_MAIN__ or __ARM_ARCH_8M_BASE__ */ + +#undef __IAR_FT +#undef __IAR_M0_FAMILY +#undef __ICCARM_V8 + +#pragma diag_default=Pe940 +#pragma diag_default=Pe177 + +#endif /* __CMSIS_ICCARM_H__ */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_version.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_version.h new file mode 100644 index 0000000..f2e2746 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/cmsis_version.h @@ -0,0 +1,39 @@ +/**************************************************************************//** + * @file cmsis_version.h + * @brief CMSIS Core(M) Version definitions + * @version V5.0.3 + * @date 24. June 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 ARM Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CMSIS_VERSION_H +#define __CMSIS_VERSION_H + +/* CMSIS Version definitions */ +#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ +#define __CM_CMSIS_VERSION_SUB ( 3U) /*!< [15:0] CMSIS Core(M) sub version */ +#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ + __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ +#endif diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv81mml.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv81mml.h new file mode 100644 index 0000000..8441e57 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv81mml.h @@ -0,0 +1,2968 @@ +/**************************************************************************//** + * @file core_armv81mml.h + * @brief CMSIS Armv8.1-M Mainline Core Peripheral Access Layer Header File + * @version V1.0.0 + * @date 15. March 2019 + ******************************************************************************/ +/* + * Copyright (c) 2018-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_ARMV81MML_H_GENERIC +#define __CORE_ARMV81MML_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_ARMV81MML + @{ + */ + +#include "cmsis_version.h" + +#define __ARM_ARCH_8M_MAIN__ 1 // patching for now +/* CMSIS ARMV81MML definitions */ +#define __ARMv81MML_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __ARMv81MML_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __ARMv81MML_CMSIS_VERSION ((__ARMv81MML_CMSIS_VERSION_MAIN << 16U) | \ + __ARMv81MML_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (81U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV81MML_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_ARMV81MML_H_DEPENDANT +#define __CORE_ARMV81MML_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __ARMv81MML_REV + #define __ARMv81MML_REV 0x0000U + #warning "__ARMv81MML_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DSP_PRESENT + #define __DSP_PRESENT 0U + #warning "__DSP_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group ARMv81MML */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:7; /*!< bit: 9..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t IT:2; /*!< bit: 25..26 saved IT state (read 0) */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_IT_Pos 25U /*!< xPSR: IT Position */ +#define xPSR_IT_Msk (3UL << xPSR_IT_Pos) /*!< xPSR: IT Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t FPCA:1; /*!< bit: 2 Floating-point context active */ + uint32_t SFPA:1; /*!< bit: 3 Secure floating-point active */ + uint32_t _reserved1:28; /*!< bit: 4..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SFPA_Pos 3U /*!< CONTROL: SFPA Position */ +#define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos) /*!< CONTROL: SFPA Mask */ + +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint8_t IPR[496U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED6[580U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ + __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ + __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ + __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + __IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */ + uint32_t RESERVED3[92U]; + __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ + uint32_t RESERVED4[15U]; + __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ + uint32_t RESERVED5[1U]; + __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ + uint32_t RESERVED6[1U]; + __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ + __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ + __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ + __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ + __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ + __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ + __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ + __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ + uint32_t RESERVED7[6U]; + __IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */ + __IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */ + __IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */ + __IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */ + __IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */ + uint32_t RESERVED8[1U]; + __IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U /*!< SCB SHCSR: SECUREFAULTPENDED Position */ +#define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos) /*!< SCB SHCSR: SECUREFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTENA_Pos 19U /*!< SCB SHCSR: SECUREFAULTENA Position */ +#define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos) /*!< SCB SHCSR: SECUREFAULTENA Mask */ + +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_SECUREFAULTACT_Pos 4U /*!< SCB SHCSR: SECUREFAULTACT Position */ +#define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos) /*!< SCB SHCSR: SECUREFAULTACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U) /*!< SCB CFSR (UFSR): STKOF Position */ +#define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos) /*!< SCB CFSR (UFSR): STKOF Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/* SCB Non-Secure Access Control Register Definitions */ +#define SCB_NSACR_CP11_Pos 11U /*!< SCB NSACR: CP11 Position */ +#define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos) /*!< SCB NSACR: CP11 Mask */ + +#define SCB_NSACR_CP10_Pos 10U /*!< SCB NSACR: CP10 Position */ +#define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos) /*!< SCB NSACR: CP10 Mask */ + +#define SCB_NSACR_CPn_Pos 0U /*!< SCB NSACR: CPn Position */ +#define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/) /*!< SCB NSACR: CPn Mask */ + +/* SCB Cache Level ID Register Definitions */ +#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ +#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ + +#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ +#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ + +/* SCB Cache Type Register Definitions */ +#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ +#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ + +#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ +#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ + +#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ +#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ + +#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ +#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ + +#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ +#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ + +/* SCB Cache Size ID Register Definitions */ +#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ +#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ + +#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ +#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ + +#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ +#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ + +#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ +#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ + +#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ +#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ + +#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ +#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ + +#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ +#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ + +/* SCB Cache Size Selection Register Definitions */ +#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ +#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ + +#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ +#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ + +/* SCB Software Triggered Interrupt Register Definitions */ +#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ +#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ + +/* SCB D-Cache Invalidate by Set-way Register Definitions */ +#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ +#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ + +#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ +#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ + +/* SCB D-Cache Clean by Set-way Register Definitions */ +#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ +#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ + +#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ +#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ + +/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ +#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ +#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ + +#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ +#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ + +/* Instruction Tightly-Coupled Memory Control Register Definitions */ +#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */ +#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */ + +#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */ +#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */ + +#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */ +#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */ + +#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */ +#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */ + +/* Data Tightly-Coupled Memory Control Register Definitions */ +#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */ +#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */ + +#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */ +#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */ + +#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */ +#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */ + +#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */ +#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */ + +/* AHBP Control Register Definitions */ +#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */ +#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */ + +#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */ +#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */ + +/* L1 Cache Control Register Definitions */ +#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */ +#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */ + +#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */ +#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */ + +#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */ +#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */ + +/* AHBS Control Register Definitions */ +#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */ +#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */ + +#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */ +#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */ + +#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/ +#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */ + +/* Auxiliary Bus Fault Status Register Definitions */ +#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/ +#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */ + +#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/ +#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */ + +#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/ +#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */ + +#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/ +#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */ + +#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/ +#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */ + +#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/ +#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ + __IOM uint32_t CPPWR; /*!< Offset: 0x00C (R/W) Coprocessor Power Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[29U]; + __OM uint32_t IWR; /*!< Offset: 0xEF8 ( /W) ITM Integration Write Register */ + __IM uint32_t IRR; /*!< Offset: 0xEFC (R/ ) ITM Integration Read Register */ + __IOM uint32_t IMCR; /*!< Offset: 0xF00 (R/W) ITM Integration Mode Control Register */ + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) ITM Device Architecture Register */ + uint32_t RESERVED6[4U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Stimulus Port Register Definitions */ +#define ITM_STIM_DISABLED_Pos 1U /*!< ITM STIM: DISABLED Position */ +#define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos) /*!< ITM STIM: DISABLED Mask */ + +#define ITM_STIM_FIFOREADY_Pos 0U /*!< ITM STIM: FIFOREADY Position */ +#define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/) /*!< ITM STIM: FIFOREADY Mask */ + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPRESCALE_Pos 8U /*!< ITM TCR: TSPRESCALE Position */ +#define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos) /*!< ITM TCR: TSPRESCALE Mask */ + +#define ITM_TCR_STALLENA_Pos 5U /*!< ITM TCR: STALLENA Position */ +#define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos) /*!< ITM TCR: STALLENA Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Integration Write Register Definitions */ +#define ITM_IWR_ATVALIDM_Pos 0U /*!< ITM IWR: ATVALIDM Position */ +#define ITM_IWR_ATVALIDM_Msk (1UL /*<< ITM_IWR_ATVALIDM_Pos*/) /*!< ITM IWR: ATVALIDM Mask */ + +/* ITM Integration Read Register Definitions */ +#define ITM_IRR_ATREADYM_Pos 0U /*!< ITM IRR: ATREADYM Position */ +#define ITM_IRR_ATREADYM_Msk (1UL /*<< ITM_IRR_ATREADYM_Pos*/) /*!< ITM IRR: ATREADYM Mask */ + +/* ITM Integration Mode Control Register Definitions */ +#define ITM_IMCR_INTEGRATION_Pos 0U /*!< ITM IMCR: INTEGRATION Position */ +#define ITM_IMCR_INTEGRATION_Msk (1UL /*<< ITM_IMCR_INTEGRATION_Pos*/) /*!< ITM IMCR: INTEGRATION Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ + uint32_t RESERVED32[934U]; + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ + uint32_t RESERVED33[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) Device Architecture Register */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCDISS_Pos 23U /*!< DWT CTRL: CYCDISS Position */ +#define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos) /*!< DWT CTRL: CYCDISS Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Sizes Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Sizes Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x3UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x3UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY_Pos 0U /*!< TPI ITATBCTR2: ATREADY Position */ +#define TPI_ITATBCTR2_ATREADY_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY_Pos*/) /*!< TPI ITATBCTR2: ATREADY Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x3UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x3UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY_Pos 0U /*!< TPI ITATBCTR0: ATREADY Position */ +#define TPI_ITATBCTR0_ATREADY_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY_Pos*/) /*!< TPI ITATBCTR0: ATREADY Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x1UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_MajorType_Pos 4U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +#define TPI_DEVTYPE_SubType_Pos 0U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Region Base Address Register Alias 1 */ + __IOM uint32_t RLAR_A1; /*!< Offset: 0x018 (R/W) MPU Region Limit Address Register Alias 1 */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Region Base Address Register Alias 2 */ + __IOM uint32_t RLAR_A2; /*!< Offset: 0x020 (R/W) MPU Region Limit Address Register Alias 2 */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Region Base Address Register Alias 3 */ + __IOM uint32_t RLAR_A3; /*!< Offset: 0x028 (R/W) MPU Region Limit Address Register Alias 3 */ + uint32_t RESERVED0[1]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_PXN_Pos 4U /*!< MPU RLAR: PXN Position */ +#define MPU_RLAR_PXN_Msk (0x1UL << MPU_RLAR_PXN_Pos) /*!< MPU RLAR: PXN Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: Region enable bit Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: Region enable bit Disable Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#else + uint32_t RESERVED0[3]; +#endif + __IOM uint32_t SFSR; /*!< Offset: 0x014 (R/W) Secure Fault Status Register */ + __IOM uint32_t SFAR; /*!< Offset: 0x018 (R/W) Secure Fault Address Register */ +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/* Secure Fault Status Register Definitions */ +#define SAU_SFSR_LSERR_Pos 7U /*!< SAU SFSR: LSERR Position */ +#define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos) /*!< SAU SFSR: LSERR Mask */ + +#define SAU_SFSR_SFARVALID_Pos 6U /*!< SAU SFSR: SFARVALID Position */ +#define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos) /*!< SAU SFSR: SFARVALID Mask */ + +#define SAU_SFSR_LSPERR_Pos 5U /*!< SAU SFSR: LSPERR Position */ +#define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos) /*!< SAU SFSR: LSPERR Mask */ + +#define SAU_SFSR_INVTRAN_Pos 4U /*!< SAU SFSR: INVTRAN Position */ +#define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos) /*!< SAU SFSR: INVTRAN Mask */ + +#define SAU_SFSR_AUVIOL_Pos 3U /*!< SAU SFSR: AUVIOL Position */ +#define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos) /*!< SAU SFSR: AUVIOL Mask */ + +#define SAU_SFSR_INVER_Pos 2U /*!< SAU SFSR: INVER Position */ +#define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos) /*!< SAU SFSR: INVER Mask */ + +#define SAU_SFSR_INVIS_Pos 1U /*!< SAU SFSR: INVIS Position */ +#define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos) /*!< SAU SFSR: INVIS Mask */ + +#define SAU_SFSR_INVEP_Pos 0U /*!< SAU SFSR: INVEP Position */ +#define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/) /*!< SAU SFSR: INVEP Mask */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_LSPENS_Pos 29U /*!< FPCCR: LSPENS Position */ +#define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos) /*!< FPCCR: LSPENS bit Mask */ + +#define FPU_FPCCR_CLRONRET_Pos 28U /*!< FPCCR: CLRONRET Position */ +#define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos) /*!< FPCCR: CLRONRET bit Mask */ + +#define FPU_FPCCR_CLRONRETS_Pos 27U /*!< FPCCR: CLRONRETS Position */ +#define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos) /*!< FPCCR: CLRONRETS bit Mask */ + +#define FPU_FPCCR_TS_Pos 26U /*!< FPCCR: TS Position */ +#define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos) /*!< FPCCR: TS bit Mask */ + +#define FPU_FPCCR_UFRDY_Pos 10U /*!< FPCCR: UFRDY Position */ +#define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos) /*!< FPCCR: UFRDY bit Mask */ + +#define FPU_FPCCR_SPLIMVIOL_Pos 9U /*!< FPCCR: SPLIMVIOL Position */ +#define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos) /*!< FPCCR: SPLIMVIOL bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_SFRDY_Pos 7U /*!< FPCCR: SFRDY Position */ +#define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos) /*!< FPCCR: SFRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_S_Pos 2U /*!< FPCCR: Security status of the FP context bit Position */ +#define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos) /*!< FPCCR: Security status of the FP context bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + #define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + + #define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ + #define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS ) /*!< System control Register not in SCB(non-secure address space) */ + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + + #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL) /*!< Floating Point Unit (non-secure address space) */ + #define FPU_NS ((FPU_Type *) FPU_BASE_NS ) /*!< Floating Point Unit (non-secure address space) */ + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; + __DSB(); +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Set Priority Grouping (non-secure) + \details Sets the non-secure priority grouping field when in secure state using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB_NS->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */ + SCB_NS->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping (non-secure) + \details Reads the priority grouping field from the non-secure NVIC when in secure state. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void) +{ + return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = FPU->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) + { + return 2U; /* Double + Single precision FPU */ + } + else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \param [in] ch Character to transmit. + \returns Character to transmit. + */ +__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) +{ + if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV81MML_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv8mbl.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv8mbl.h new file mode 100644 index 0000000..344dca5 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv8mbl.h @@ -0,0 +1,1921 @@ +/**************************************************************************//** + * @file core_armv8mbl.h + * @brief CMSIS Armv8-M Baseline Core Peripheral Access Layer Header File + * @version V5.0.8 + * @date 12. November 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_ARMV8MBL_H_GENERIC +#define __CORE_ARMV8MBL_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_ARMv8MBL + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS definitions */ +#define __ARMv8MBL_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __ARMv8MBL_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __ARMv8MBL_CMSIS_VERSION ((__ARMv8MBL_CMSIS_VERSION_MAIN << 16U) | \ + __ARMv8MBL_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M ( 2U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV8MBL_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_ARMV8MBL_H_DEPENDANT +#define __CORE_ARMV8MBL_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __ARMv8MBL_REV + #define __ARMv8MBL_REV 0x0000U + #warning "__ARMv8MBL_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __VTOR_PRESENT + #define __VTOR_PRESENT 0U + #warning "__VTOR_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif + + #ifndef __ETM_PRESENT + #define __ETM_PRESENT 0U + #warning "__ETM_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MTB_PRESENT + #define __MTB_PRESENT 0U + #warning "__MTB_PRESENT not defined in device header file; using default!" + #endif + +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group ARMv8MBL */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint32_t IPR[124U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ +#else + uint32_t RESERVED0; +#endif + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHPR[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + uint32_t RESERVED0[6U]; + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x3UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Sizes Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Sizes Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[809U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) Software Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) Software Lock Status Register */ + uint32_t RESERVED4[4U]; + __IM uint32_t TYPE; /*!< Offset: 0xFC8 (R/ ) Device Identifier Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_SWOSCALER_Pos 0U /*!< TPI ACPR: SWOSCALER Position */ +#define TPI_ACPR_SWOSCALER_Msk (0xFFFFUL /*<< TPI_ACPR_SWOSCALER_Pos*/) /*!< TPI ACPR: SWOSCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI Periodic Synchronization Control Register Definitions */ +#define TPI_PSCR_PSCount_Pos 0U /*!< TPI PSCR: PSCount Position */ +#define TPI_PSCR_PSCount_Msk (0x1FUL /*<< TPI_PSCR_PSCount_Pos*/) /*!< TPI PSCR: TPSCount Mask */ + +/* TPI Software Lock Status Register Definitions */ +#define TPI_LSR_nTT_Pos 1U /*!< TPI LSR: Not thirty-two bit. Position */ +#define TPI_LSR_nTT_Msk (0x1UL << TPI_LSR_nTT_Pos) /*!< TPI LSR: Not thirty-two bit. Mask */ + +#define TPI_LSR_SLK_Pos 1U /*!< TPI LSR: Software Lock status Position */ +#define TPI_LSR_SLK_Msk (0x1UL << TPI_LSR_SLK_Pos) /*!< TPI LSR: Software Lock status Mask */ + +#define TPI_LSR_SLI_Pos 0U /*!< TPI LSR: Software Lock implemented Position */ +#define TPI_LSR_SLI_Msk (0x1UL /*<< TPI_LSR_SLI_Pos*/) /*!< TPI LSR: Software Lock implemented Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFO depth Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFO depth Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + uint32_t RESERVED0[7U]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 1U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: EN Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: EN Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#endif +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register */ +#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */ +#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + If VTOR is not present address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; + __DSB(); +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC_NS->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB_NS->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB_NS->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB_NS->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV8MBL_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv8mml.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv8mml.h new file mode 100644 index 0000000..5ddb8ae --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_armv8mml.h @@ -0,0 +1,2835 @@ +/**************************************************************************//** + * @file core_armv8mml.h + * @brief CMSIS Armv8-M Mainline Core Peripheral Access Layer Header File + * @version V5.1.0 + * @date 12. September 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_ARMV8MML_H_GENERIC +#define __CORE_ARMV8MML_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_ARMv8MML + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS Armv8MML definitions */ +#define __ARMv8MML_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __ARMv8MML_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __ARMv8MML_CMSIS_VERSION ((__ARMv8MML_CMSIS_VERSION_MAIN << 16U) | \ + __ARMv8MML_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (81U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined(__ARM_FEATURE_DSP) + #if defined(__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV8MML_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_ARMV8MML_H_DEPENDANT +#define __CORE_ARMV8MML_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __ARMv8MML_REV + #define __ARMv8MML_REV 0x0000U + #warning "__ARMv8MML_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DSP_PRESENT + #define __DSP_PRESENT 0U + #warning "__DSP_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group ARMv8MML */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:7; /*!< bit: 9..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t IT:2; /*!< bit: 25..26 saved IT state (read 0) */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_IT_Pos 25U /*!< xPSR: IT Position */ +#define xPSR_IT_Msk (3UL << xPSR_IT_Pos) /*!< xPSR: IT Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t FPCA:1; /*!< bit: 2 Floating-point context active */ + uint32_t SFPA:1; /*!< bit: 3 Secure floating-point active */ + uint32_t _reserved1:28; /*!< bit: 4..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SFPA_Pos 3U /*!< CONTROL: SFPA Position */ +#define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos) /*!< CONTROL: SFPA Mask */ + +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint8_t IPR[496U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED6[580U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ + __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ + __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ + __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + __IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */ + uint32_t RESERVED3[92U]; + __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ + uint32_t RESERVED4[15U]; + __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ + uint32_t RESERVED5[1U]; + __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ + uint32_t RESERVED6[1U]; + __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ + __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ + __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ + __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ + __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ + __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ + __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ + __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U /*!< SCB SHCSR: SECUREFAULTPENDED Position */ +#define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos) /*!< SCB SHCSR: SECUREFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTENA_Pos 19U /*!< SCB SHCSR: SECUREFAULTENA Position */ +#define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos) /*!< SCB SHCSR: SECUREFAULTENA Mask */ + +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_SECUREFAULTACT_Pos 4U /*!< SCB SHCSR: SECUREFAULTACT Position */ +#define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos) /*!< SCB SHCSR: SECUREFAULTACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U) /*!< SCB CFSR (UFSR): STKOF Position */ +#define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos) /*!< SCB CFSR (UFSR): STKOF Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/* SCB Non-Secure Access Control Register Definitions */ +#define SCB_NSACR_CP11_Pos 11U /*!< SCB NSACR: CP11 Position */ +#define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos) /*!< SCB NSACR: CP11 Mask */ + +#define SCB_NSACR_CP10_Pos 10U /*!< SCB NSACR: CP10 Position */ +#define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos) /*!< SCB NSACR: CP10 Mask */ + +#define SCB_NSACR_CPn_Pos 0U /*!< SCB NSACR: CPn Position */ +#define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/) /*!< SCB NSACR: CPn Mask */ + +/* SCB Cache Level ID Register Definitions */ +#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ +#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ + +#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ +#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ + +/* SCB Cache Type Register Definitions */ +#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ +#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ + +#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ +#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ + +#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ +#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ + +#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ +#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ + +#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ +#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ + +/* SCB Cache Size ID Register Definitions */ +#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ +#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ + +#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ +#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ + +#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ +#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ + +#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ +#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ + +#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ +#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ + +#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ +#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ + +#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ +#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ + +/* SCB Cache Size Selection Register Definitions */ +#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ +#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ + +#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ +#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ + +/* SCB Software Triggered Interrupt Register Definitions */ +#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ +#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ + +/* SCB D-Cache Invalidate by Set-way Register Definitions */ +#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ +#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ + +#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ +#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ + +/* SCB D-Cache Clean by Set-way Register Definitions */ +#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ +#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ + +#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ +#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ + +/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ +#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ +#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ + +#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ +#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ + __IOM uint32_t CPPWR; /*!< Offset: 0x00C (R/W) Coprocessor Power Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[32U]; + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) ITM Device Architecture Register */ + uint32_t RESERVED6[4U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Stimulus Port Register Definitions */ +#define ITM_STIM_DISABLED_Pos 1U /*!< ITM STIM: DISABLED Position */ +#define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos) /*!< ITM STIM: DISABLED Mask */ + +#define ITM_STIM_FIFOREADY_Pos 0U /*!< ITM STIM: FIFOREADY Position */ +#define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/) /*!< ITM STIM: FIFOREADY Mask */ + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPRESCALE_Pos 8U /*!< ITM TCR: TSPRESCALE Position */ +#define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos) /*!< ITM TCR: TSPRESCALE Mask */ + +#define ITM_TCR_STALLENA_Pos 5U /*!< ITM TCR: STALLENA Position */ +#define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos) /*!< ITM TCR: STALLENA Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ + uint32_t RESERVED32[934U]; + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ + uint32_t RESERVED33[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) Device Architecture Register */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCDISS_Pos 23U /*!< DWT CTRL: CYCDISS Position */ +#define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos) /*!< DWT CTRL: CYCDISS Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Sizes Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Sizes Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[809U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) Software Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) Software Lock Status Register */ + uint32_t RESERVED4[4U]; + __IM uint32_t TYPE; /*!< Offset: 0xFC8 (R/ ) Device Identifier Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_SWOSCALER_Pos 0U /*!< TPI ACPR: SWOSCALER Position */ +#define TPI_ACPR_SWOSCALER_Msk (0xFFFFUL /*<< TPI_ACPR_SWOSCALER_Pos*/) /*!< TPI ACPR: SWOSCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI Periodic Synchronization Control Register Definitions */ +#define TPI_PSCR_PSCount_Pos 0U /*!< TPI PSCR: PSCount Position */ +#define TPI_PSCR_PSCount_Msk (0x1FUL /*<< TPI_PSCR_PSCount_Pos*/) /*!< TPI PSCR: TPSCount Mask */ + +/* TPI Software Lock Status Register Definitions */ +#define TPI_LSR_nTT_Pos 1U /*!< TPI LSR: Not thirty-two bit. Position */ +#define TPI_LSR_nTT_Msk (0x1UL << TPI_LSR_nTT_Pos) /*!< TPI LSR: Not thirty-two bit. Mask */ + +#define TPI_LSR_SLK_Pos 1U /*!< TPI LSR: Software Lock status Position */ +#define TPI_LSR_SLK_Msk (0x1UL << TPI_LSR_SLK_Pos) /*!< TPI LSR: Software Lock status Mask */ + +#define TPI_LSR_SLI_Pos 0U /*!< TPI LSR: Software Lock implemented Position */ +#define TPI_LSR_SLI_Msk (0x1UL /*<< TPI_LSR_SLI_Pos*/) /*!< TPI LSR: Software Lock implemented Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFO depth Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFO depth Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Region Base Address Register Alias 1 */ + __IOM uint32_t RLAR_A1; /*!< Offset: 0x018 (R/W) MPU Region Limit Address Register Alias 1 */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Region Base Address Register Alias 2 */ + __IOM uint32_t RLAR_A2; /*!< Offset: 0x020 (R/W) MPU Region Limit Address Register Alias 2 */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Region Base Address Register Alias 3 */ + __IOM uint32_t RLAR_A3; /*!< Offset: 0x028 (R/W) MPU Region Limit Address Register Alias 3 */ + uint32_t RESERVED0[1]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: Region enable bit Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: Region enable bit Disable Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#else + uint32_t RESERVED0[3]; +#endif + __IOM uint32_t SFSR; /*!< Offset: 0x014 (R/W) Secure Fault Status Register */ + __IOM uint32_t SFAR; /*!< Offset: 0x018 (R/W) Secure Fault Address Register */ +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/* Secure Fault Status Register Definitions */ +#define SAU_SFSR_LSERR_Pos 7U /*!< SAU SFSR: LSERR Position */ +#define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos) /*!< SAU SFSR: LSERR Mask */ + +#define SAU_SFSR_SFARVALID_Pos 6U /*!< SAU SFSR: SFARVALID Position */ +#define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos) /*!< SAU SFSR: SFARVALID Mask */ + +#define SAU_SFSR_LSPERR_Pos 5U /*!< SAU SFSR: LSPERR Position */ +#define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos) /*!< SAU SFSR: LSPERR Mask */ + +#define SAU_SFSR_INVTRAN_Pos 4U /*!< SAU SFSR: INVTRAN Position */ +#define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos) /*!< SAU SFSR: INVTRAN Mask */ + +#define SAU_SFSR_AUVIOL_Pos 3U /*!< SAU SFSR: AUVIOL Position */ +#define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos) /*!< SAU SFSR: AUVIOL Mask */ + +#define SAU_SFSR_INVER_Pos 2U /*!< SAU SFSR: INVER Position */ +#define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos) /*!< SAU SFSR: INVER Mask */ + +#define SAU_SFSR_INVIS_Pos 1U /*!< SAU SFSR: INVIS Position */ +#define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos) /*!< SAU SFSR: INVIS Mask */ + +#define SAU_SFSR_INVEP_Pos 0U /*!< SAU SFSR: INVEP Position */ +#define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/) /*!< SAU SFSR: INVEP Mask */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_LSPENS_Pos 29U /*!< FPCCR: LSPENS Position */ +#define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos) /*!< FPCCR: LSPENS bit Mask */ + +#define FPU_FPCCR_CLRONRET_Pos 28U /*!< FPCCR: CLRONRET Position */ +#define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos) /*!< FPCCR: CLRONRET bit Mask */ + +#define FPU_FPCCR_CLRONRETS_Pos 27U /*!< FPCCR: CLRONRETS Position */ +#define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos) /*!< FPCCR: CLRONRETS bit Mask */ + +#define FPU_FPCCR_TS_Pos 26U /*!< FPCCR: TS Position */ +#define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos) /*!< FPCCR: TS bit Mask */ + +#define FPU_FPCCR_UFRDY_Pos 10U /*!< FPCCR: UFRDY Position */ +#define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos) /*!< FPCCR: UFRDY bit Mask */ + +#define FPU_FPCCR_SPLIMVIOL_Pos 9U /*!< FPCCR: SPLIMVIOL Position */ +#define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos) /*!< FPCCR: SPLIMVIOL bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_SFRDY_Pos 7U /*!< FPCCR: SFRDY Position */ +#define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos) /*!< FPCCR: SFRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_S_Pos 2U /*!< FPCCR: Security status of the FP context bit Position */ +#define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos) /*!< FPCCR: Security status of the FP context bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + #define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + + #define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ + #define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS ) /*!< System control Register not in SCB(non-secure address space) */ + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + + #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL) /*!< Floating Point Unit (non-secure address space) */ + #define FPU_NS ((FPU_Type *) FPU_BASE_NS ) /*!< Floating Point Unit (non-secure address space) */ + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; + __DSB(); +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Set Priority Grouping (non-secure) + \details Sets the non-secure priority grouping field when in secure state using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB_NS->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB_NS->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping (non-secure) + \details Reads the priority grouping field from the non-secure NVIC when in secure state. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void) +{ + return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = FPU->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) + { + return 2U; /* Double + Single precision FPU */ + } + else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \param [in] ch Character to transmit. + \returns Character to transmit. + */ +__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) +{ + if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_ARMV8MML_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm0.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm0.h new file mode 100644 index 0000000..cafae5a --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm0.h @@ -0,0 +1,952 @@ +/**************************************************************************//** + * @file core_cm0.h + * @brief CMSIS Cortex-M0 Core Peripheral Access Layer Header File + * @version V5.0.6 + * @date 13. March 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM0_H_GENERIC +#define __CORE_CM0_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M0 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM0 definitions */ +#define __CM0_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM0_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM0_CMSIS_VERSION ((__CM0_CMSIS_VERSION_MAIN << 16U) | \ + __CM0_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (0U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM0_H_DEPENDANT +#define __CORE_CM0_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM0_REV + #define __CM0_REV 0x0000U + #warning "__CM0_REV not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M0 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t _reserved0:1; /*!< bit: 0 Reserved */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RESERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + uint32_t RESERVED0; + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Cortex-M0 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the Cortex-M0 header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M0 */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + Address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t vectors = 0x0U; + (* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector; + /* ARM Application Note 321 states that the M0 does not require the architectural barrier */ +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t vectors = 0x0U; + return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)); +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm0plus.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm0plus.h new file mode 100644 index 0000000..d104965 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm0plus.h @@ -0,0 +1,1085 @@ +/**************************************************************************//** + * @file core_cm0plus.h + * @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File + * @version V5.0.7 + * @date 13. March 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM0PLUS_H_GENERIC +#define __CORE_CM0PLUS_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex-M0+ + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM0+ definitions */ +#define __CM0PLUS_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM0PLUS_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM0PLUS_CMSIS_VERSION ((__CM0PLUS_CMSIS_VERSION_MAIN << 16U) | \ + __CM0PLUS_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (0U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0PLUS_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM0PLUS_H_DEPENDANT +#define __CORE_CM0PLUS_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM0PLUS_REV + #define __CM0PLUS_REV 0x0000U + #warning "__CM0PLUS_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __VTOR_PRESENT + #define __VTOR_PRESENT 0U + #warning "__VTOR_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex-M0+ */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RESERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ +#else + uint32_t RESERVED0; +#endif + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) +/* SCB Interrupt Control State Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 8U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0xFFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 1U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 8U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0xFFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Cortex-M0+ Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the Cortex-M0+ header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M0+ */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + If VTOR is not present address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t vectors = SCB->VTOR; +#else + uint32_t vectors = 0x0U; +#endif + (* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector; + /* ARM Application Note 321 states that the M0+ does not require the architectural barrier */ +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t vectors = SCB->VTOR; +#else + uint32_t vectors = 0x0U; +#endif + return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)); +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM0PLUS_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm1.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm1.h new file mode 100644 index 0000000..76b4569 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm1.h @@ -0,0 +1,979 @@ +/**************************************************************************//** + * @file core_cm1.h + * @brief CMSIS Cortex-M1 Core Peripheral Access Layer Header File + * @version V1.0.1 + * @date 12. November 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM1_H_GENERIC +#define __CORE_CM1_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M1 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM1 definitions */ +#define __CM1_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM1_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM1_CMSIS_VERSION ((__CM1_CMSIS_VERSION_MAIN << 16U) | \ + __CM1_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (1U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM1_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM1_H_DEPENDANT +#define __CORE_CM1_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM1_REV + #define __CM1_REV 0x0100U + #warning "__CM1_REV not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M1 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t _reserved0:1; /*!< bit: 0 Reserved */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + uint32_t RESERVED0; + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_ITCMUAEN_Pos 4U /*!< ACTLR: Instruction TCM Upper Alias Enable Position */ +#define SCnSCB_ACTLR_ITCMUAEN_Msk (1UL << SCnSCB_ACTLR_ITCMUAEN_Pos) /*!< ACTLR: Instruction TCM Upper Alias Enable Mask */ + +#define SCnSCB_ACTLR_ITCMLAEN_Pos 3U /*!< ACTLR: Instruction TCM Lower Alias Enable Position */ +#define SCnSCB_ACTLR_ITCMLAEN_Msk (1UL << SCnSCB_ACTLR_ITCMLAEN_Pos) /*!< ACTLR: Instruction TCM Lower Alias Enable Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Cortex-M1 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the Cortex-M1 header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for Cortex-M1 */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + Address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)0x0U; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; + /* ARM Application Note 321 states that the M1 does not require the architectural barrier */ +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)0x0U; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM1_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm23.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm23.h new file mode 100644 index 0000000..b79c6af --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm23.h @@ -0,0 +1,1996 @@ +/**************************************************************************//** + * @file core_cm23.h + * @brief CMSIS Cortex-M23 Core Peripheral Access Layer Header File + * @version V5.0.8 + * @date 12. November 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM23_H_GENERIC +#define __CORE_CM23_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M23 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS definitions */ +#define __CM23_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM23_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM23_CMSIS_VERSION ((__CM23_CMSIS_VERSION_MAIN << 16U) | \ + __CM23_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (23U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM23_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM23_H_DEPENDANT +#define __CORE_CM23_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM23_REV + #define __CM23_REV 0x0000U + #warning "__CM23_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __VTOR_PRESENT + #define __VTOR_PRESENT 0U + #warning "__VTOR_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif + + #ifndef __ETM_PRESENT + #define __ETM_PRESENT 0U + #warning "__ETM_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MTB_PRESENT + #define __MTB_PRESENT 0U + #warning "__MTB_PRESENT not defined in device header file; using default!" + #endif + +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M23 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint32_t IPR[124U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ +#else + uint32_t RESERVED0; +#endif + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED1; + __IOM uint32_t SHPR[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + uint32_t RESERVED0[6U]; + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x3UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t ITFTTD0; /*!< Offset: 0xEEC (R/ ) Integration Test FIFO Test Data 0 Register */ + __IOM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/W) Integration Test ATB Control Register 2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) Integration Test ATB Control Register 0 */ + __IM uint32_t ITFTTD1; /*!< Offset: 0xEFC (R/ ) Integration Test FIFO Test Data 1 Register */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) Device Configuration Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Identifier Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration Test FIFO Test Data 0 Register Definitions */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD0: ATB Interface 2 ATVALIDPosition */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD0: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD0: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U /*!< TPI ITFTTD0: ATB Interface 1 data2 Position */ +#define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data2 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U /*!< TPI ITFTTD0: ATB Interface 1 data1 Position */ +#define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data1 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U /*!< TPI ITFTTD0: ATB Interface 1 data0 Position */ +#define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL /*<< TPI_ITFTTD0_ATB_IF1_data0_Pos*/) /*!< TPI ITFTTD0: ATB Interface 1 data0 Mask */ + +/* TPI Integration Test ATB Control Register 2 Register Definitions */ +#define TPI_ITATBCTR2_AFVALID2S_Pos 1U /*!< TPI ITATBCTR2: AFVALID2S Position */ +#define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos) /*!< TPI ITATBCTR2: AFVALID2SS Mask */ + +#define TPI_ITATBCTR2_AFVALID1S_Pos 1U /*!< TPI ITATBCTR2: AFVALID1S Position */ +#define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos) /*!< TPI ITATBCTR2: AFVALID1SS Mask */ + +#define TPI_ITATBCTR2_ATREADY2S_Pos 0U /*!< TPI ITATBCTR2: ATREADY2S Position */ +#define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2S_Pos*/) /*!< TPI ITATBCTR2: ATREADY2S Mask */ + +#define TPI_ITATBCTR2_ATREADY1S_Pos 0U /*!< TPI ITATBCTR2: ATREADY1S Position */ +#define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1S_Pos*/) /*!< TPI ITATBCTR2: ATREADY1S Mask */ + +/* TPI Integration Test FIFO Test Data 1 Register Definitions */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD1: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD1: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U /*!< TPI ITFTTD1: ATB Interface 2 data2 Position */ +#define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data2 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U /*!< TPI ITFTTD1: ATB Interface 2 data1 Position */ +#define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data1 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U /*!< TPI ITFTTD1: ATB Interface 2 data0 Position */ +#define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL /*<< TPI_ITFTTD1_ATB_IF2_data0_Pos*/) /*!< TPI ITFTTD1: ATB Interface 2 data0 Mask */ + +/* TPI Integration Test ATB Control Register 0 Definitions */ +#define TPI_ITATBCTR0_AFVALID2S_Pos 1U /*!< TPI ITATBCTR0: AFVALID2S Position */ +#define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos) /*!< TPI ITATBCTR0: AFVALID2SS Mask */ + +#define TPI_ITATBCTR0_AFVALID1S_Pos 1U /*!< TPI ITATBCTR0: AFVALID1S Position */ +#define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos) /*!< TPI ITATBCTR0: AFVALID1SS Mask */ + +#define TPI_ITATBCTR0_ATREADY2S_Pos 0U /*!< TPI ITATBCTR0: ATREADY2S Position */ +#define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2S_Pos*/) /*!< TPI ITATBCTR0: ATREADY2S Mask */ + +#define TPI_ITATBCTR0_ATREADY1S_Pos 0U /*!< TPI ITATBCTR0: ATREADY1S Position */ +#define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1S_Pos*/) /*!< TPI ITATBCTR0: ATREADY1S Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFOSZ Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFOSZ Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x3FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + uint32_t RESERVED0[7U]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 1U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: EN Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: EN Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#endif +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register */ +#define CoreDebug_DEMCR_DWTENA_Pos 24U /*!< CoreDebug DEMCR: DWTENA Position */ +#define CoreDebug_DEMCR_DWTENA_Msk (1UL << CoreDebug_DEMCR_DWTENA_Pos) /*!< CoreDebug DEMCR: DWTENA Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else +/*#define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping not available for Cortex-M23 */ +/*#define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping not available for Cortex-M23 */ + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + +#define __NVIC_SetPriorityGrouping(X) (void)(X) +#define __NVIC_GetPriorityGrouping() (0U) + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + If VTOR is not present address 0 must be mapped to SRAM. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; + __DSB(); +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ +#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U) + uint32_t *vectors = (uint32_t *)SCB->VTOR; +#else + uint32_t *vectors = (uint32_t *)0x0U; +#endif + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[_IP_IDX(IRQn)] = ((uint32_t)(NVIC_NS->IPR[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB_NS->SHPR[_SHP_IDX(IRQn)] = ((uint32_t)(SCB_NS->SHPR[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IPR[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB_NS->SHPR[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM23_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm3.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm3.h new file mode 100644 index 0000000..8157ca7 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm3.h @@ -0,0 +1,1937 @@ +/**************************************************************************//** + * @file core_cm3.h + * @brief CMSIS Cortex-M3 Core Peripheral Access Layer Header File + * @version V5.1.0 + * @date 13. March 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM3_H_GENERIC +#define __CORE_CM3_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M3 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM3 definitions */ +#define __CM3_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM3_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM3_CMSIS_VERSION ((__CM3_CMSIS_VERSION_MAIN << 16U) | \ + __CM3_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (3U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM3_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM3_H_DEPENDANT +#define __CORE_CM3_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM3_REV + #define __CM3_REV 0x0200U + #warning "__CM3_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M3 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:27; /*!< bit: 0..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:1; /*!< bit: 9 Reserved */ + uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ + uint32_t _reserved1:8; /*!< bit: 16..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit */ + uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ +#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ +#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[24U]; + __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RESERVED1[24U]; + __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[24U]; + __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[24U]; + __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[56U]; + __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED5[644U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + uint32_t RESERVED0[5U]; + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#if defined (__CM3_REV) && (__CM3_REV < 0x0201U) /* core r2p1 */ +#define SCB_VTOR_TBLBASE_Pos 29U /*!< SCB VTOR: TBLBASE Position */ +#define SCB_VTOR_TBLBASE_Msk (1UL << SCB_VTOR_TBLBASE_Pos) /*!< SCB VTOR: TBLBASE Mask */ + +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x3FFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#else +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ +#endif + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ +#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ +#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ +#if defined (__CM3_REV) && (__CM3_REV >= 0x200U) + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +#else + uint32_t RESERVED1[1U]; +#endif +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/* Auxiliary Control Register Definitions */ +#if defined (__CM3_REV) && (__CM3_REV >= 0x200U) +#define SCnSCB_ACTLR_DISOOFP_Pos 9U /*!< ACTLR: DISOOFP Position */ +#define SCnSCB_ACTLR_DISOOFP_Msk (1UL << SCnSCB_ACTLR_DISOOFP_Pos) /*!< ACTLR: DISOOFP Mask */ + +#define SCnSCB_ACTLR_DISFPCA_Pos 8U /*!< ACTLR: DISFPCA Position */ +#define SCnSCB_ACTLR_DISFPCA_Msk (1UL << SCnSCB_ACTLR_DISFPCA_Pos) /*!< ACTLR: DISFPCA Mask */ + +#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ +#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ + +#define SCnSCB_ACTLR_DISDEFWBUF_Pos 1U /*!< ACTLR: DISDEFWBUF Position */ +#define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos) /*!< ACTLR: DISDEFWBUF Mask */ + +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ +#endif + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[32U]; + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[6U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ +#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED0[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Mask Register Definitions */ +#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ +#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ +#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ + +#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ +#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ +#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ + +#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ +#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ + +#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ +#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ + +#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ +#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ + +#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ +#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x1UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x1UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ +#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ + +#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ +#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x1UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x1UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ +#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ + +#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ +#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ + __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ + __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ + __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ +#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ +#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ +#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ +#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ +#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ +#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ +#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t vectors = (uint32_t )SCB->VTOR; + (* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector; + /* ARM Application Note 321 states that the M3 does not require the architectural barrier */ +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t vectors = (uint32_t )SCB->VTOR; + return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)); +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \param [in] ch Character to transmit. + \returns Character to transmit. + */ +__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) +{ + if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM3_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm33.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm33.h new file mode 100644 index 0000000..7fed59a --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm33.h @@ -0,0 +1,2910 @@ +/**************************************************************************//** + * @file core_cm33.h + * @brief CMSIS Cortex-M33 Core Peripheral Access Layer Header File + * @version V5.1.0 + * @date 12. November 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM33_H_GENERIC +#define __CORE_CM33_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M33 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM33 definitions */ +#define __CM33_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM33_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM33_CMSIS_VERSION ((__CM33_CMSIS_VERSION_MAIN << 16U) | \ + __CM33_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (33U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined (__TARGET_FPU_VFP) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined (__ARM_FP) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined (__ARMVFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined (__TI_VFP_SUPPORT__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined (__FPU_VFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM33_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM33_H_DEPENDANT +#define __CORE_CM33_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM33_REV + #define __CM33_REV 0x0000U + #warning "__CM33_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DSP_PRESENT + #define __DSP_PRESENT 0U + #warning "__DSP_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M33 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:7; /*!< bit: 9..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t IT:2; /*!< bit: 25..26 saved IT state (read 0) */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_IT_Pos 25U /*!< xPSR: IT Position */ +#define xPSR_IT_Msk (3UL << xPSR_IT_Pos) /*!< xPSR: IT Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t FPCA:1; /*!< bit: 2 Floating-point context active */ + uint32_t SFPA:1; /*!< bit: 3 Secure floating-point active */ + uint32_t _reserved1:28; /*!< bit: 4..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SFPA_Pos 3U /*!< CONTROL: SFPA Position */ +#define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos) /*!< CONTROL: SFPA Mask */ + +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint8_t IPR[496U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED6[580U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ + __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ + __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ + __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + __IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */ + uint32_t RESERVED3[92U]; + __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ + uint32_t RESERVED4[15U]; + __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ + uint32_t RESERVED5[1U]; + __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ + uint32_t RESERVED6[1U]; + __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ + __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ + __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ + __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ + __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ + __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ + __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ + __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U /*!< SCB SHCSR: SECUREFAULTPENDED Position */ +#define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos) /*!< SCB SHCSR: SECUREFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTENA_Pos 19U /*!< SCB SHCSR: SECUREFAULTENA Position */ +#define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos) /*!< SCB SHCSR: SECUREFAULTENA Mask */ + +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_SECUREFAULTACT_Pos 4U /*!< SCB SHCSR: SECUREFAULTACT Position */ +#define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos) /*!< SCB SHCSR: SECUREFAULTACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U) /*!< SCB CFSR (UFSR): STKOF Position */ +#define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos) /*!< SCB CFSR (UFSR): STKOF Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/* SCB Non-Secure Access Control Register Definitions */ +#define SCB_NSACR_CP11_Pos 11U /*!< SCB NSACR: CP11 Position */ +#define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos) /*!< SCB NSACR: CP11 Mask */ + +#define SCB_NSACR_CP10_Pos 10U /*!< SCB NSACR: CP10 Position */ +#define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos) /*!< SCB NSACR: CP10 Mask */ + +#define SCB_NSACR_CPn_Pos 0U /*!< SCB NSACR: CPn Position */ +#define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/) /*!< SCB NSACR: CPn Mask */ + +/* SCB Cache Level ID Register Definitions */ +#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ +#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ + +#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ +#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ + +/* SCB Cache Type Register Definitions */ +#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ +#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ + +#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ +#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ + +#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ +#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ + +#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ +#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ + +#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ +#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ + +/* SCB Cache Size ID Register Definitions */ +#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ +#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ + +#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ +#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ + +#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ +#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ + +#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ +#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ + +#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ +#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ + +#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ +#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ + +#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ +#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ + +/* SCB Cache Size Selection Register Definitions */ +#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ +#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ + +#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ +#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ + +/* SCB Software Triggered Interrupt Register Definitions */ +#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ +#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ + +/* SCB D-Cache Invalidate by Set-way Register Definitions */ +#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ +#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ + +#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ +#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ + +/* SCB D-Cache Clean by Set-way Register Definitions */ +#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ +#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ + +#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ +#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ + +/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ +#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ +#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ + +#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ +#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ + __IOM uint32_t CPPWR; /*!< Offset: 0x00C (R/W) Coprocessor Power Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[32U]; + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) ITM Device Architecture Register */ + uint32_t RESERVED6[4U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Stimulus Port Register Definitions */ +#define ITM_STIM_DISABLED_Pos 1U /*!< ITM STIM: DISABLED Position */ +#define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos) /*!< ITM STIM: DISABLED Mask */ + +#define ITM_STIM_FIFOREADY_Pos 0U /*!< ITM STIM: FIFOREADY Position */ +#define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/) /*!< ITM STIM: FIFOREADY Mask */ + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPRESCALE_Pos 8U /*!< ITM TCR: TSPRESCALE Position */ +#define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos) /*!< ITM TCR: TSPRESCALE Mask */ + +#define ITM_TCR_STALLENA_Pos 5U /*!< ITM TCR: STALLENA Position */ +#define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos) /*!< ITM TCR: STALLENA Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ + uint32_t RESERVED32[934U]; + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ + uint32_t RESERVED33[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) Device Architecture Register */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCDISS_Pos 23U /*!< DWT CTRL: CYCDISS Position */ +#define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos) /*!< DWT CTRL: CYCDISS Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t ITFTTD0; /*!< Offset: 0xEEC (R/ ) Integration Test FIFO Test Data 0 Register */ + __IOM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/W) Integration Test ATB Control Register 2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) Integration Test ATB Control Register 0 */ + __IM uint32_t ITFTTD1; /*!< Offset: 0xEFC (R/ ) Integration Test FIFO Test Data 1 Register */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) Device Configuration Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Identifier Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration Test FIFO Test Data 0 Register Definitions */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD0: ATB Interface 2 ATVALIDPosition */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD0: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD0: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U /*!< TPI ITFTTD0: ATB Interface 1 data2 Position */ +#define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data2 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U /*!< TPI ITFTTD0: ATB Interface 1 data1 Position */ +#define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data1 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U /*!< TPI ITFTTD0: ATB Interface 1 data0 Position */ +#define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL /*<< TPI_ITFTTD0_ATB_IF1_data0_Pos*/) /*!< TPI ITFTTD0: ATB Interface 1 data0 Mask */ + +/* TPI Integration Test ATB Control Register 2 Register Definitions */ +#define TPI_ITATBCTR2_AFVALID2S_Pos 1U /*!< TPI ITATBCTR2: AFVALID2S Position */ +#define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos) /*!< TPI ITATBCTR2: AFVALID2SS Mask */ + +#define TPI_ITATBCTR2_AFVALID1S_Pos 1U /*!< TPI ITATBCTR2: AFVALID1S Position */ +#define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos) /*!< TPI ITATBCTR2: AFVALID1SS Mask */ + +#define TPI_ITATBCTR2_ATREADY2S_Pos 0U /*!< TPI ITATBCTR2: ATREADY2S Position */ +#define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2S_Pos*/) /*!< TPI ITATBCTR2: ATREADY2S Mask */ + +#define TPI_ITATBCTR2_ATREADY1S_Pos 0U /*!< TPI ITATBCTR2: ATREADY1S Position */ +#define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1S_Pos*/) /*!< TPI ITATBCTR2: ATREADY1S Mask */ + +/* TPI Integration Test FIFO Test Data 1 Register Definitions */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD1: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD1: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U /*!< TPI ITFTTD1: ATB Interface 2 data2 Position */ +#define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data2 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U /*!< TPI ITFTTD1: ATB Interface 2 data1 Position */ +#define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data1 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U /*!< TPI ITFTTD1: ATB Interface 2 data0 Position */ +#define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL /*<< TPI_ITFTTD1_ATB_IF2_data0_Pos*/) /*!< TPI ITFTTD1: ATB Interface 2 data0 Mask */ + +/* TPI Integration Test ATB Control Register 0 Definitions */ +#define TPI_ITATBCTR0_AFVALID2S_Pos 1U /*!< TPI ITATBCTR0: AFVALID2S Position */ +#define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos) /*!< TPI ITATBCTR0: AFVALID2SS Mask */ + +#define TPI_ITATBCTR0_AFVALID1S_Pos 1U /*!< TPI ITATBCTR0: AFVALID1S Position */ +#define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos) /*!< TPI ITATBCTR0: AFVALID1SS Mask */ + +#define TPI_ITATBCTR0_ATREADY2S_Pos 0U /*!< TPI ITATBCTR0: ATREADY2S Position */ +#define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2S_Pos*/) /*!< TPI ITATBCTR0: ATREADY2S Mask */ + +#define TPI_ITATBCTR0_ATREADY1S_Pos 0U /*!< TPI ITATBCTR0: ATREADY1S Position */ +#define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1S_Pos*/) /*!< TPI ITATBCTR0: ATREADY1S Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFOSZ Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFOSZ Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x3FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Region Base Address Register Alias 1 */ + __IOM uint32_t RLAR_A1; /*!< Offset: 0x018 (R/W) MPU Region Limit Address Register Alias 1 */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Region Base Address Register Alias 2 */ + __IOM uint32_t RLAR_A2; /*!< Offset: 0x020 (R/W) MPU Region Limit Address Register Alias 2 */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Region Base Address Register Alias 3 */ + __IOM uint32_t RLAR_A3; /*!< Offset: 0x028 (R/W) MPU Region Limit Address Register Alias 3 */ + uint32_t RESERVED0[1]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: Region enable bit Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: Region enable bit Disable Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#else + uint32_t RESERVED0[3]; +#endif + __IOM uint32_t SFSR; /*!< Offset: 0x014 (R/W) Secure Fault Status Register */ + __IOM uint32_t SFAR; /*!< Offset: 0x018 (R/W) Secure Fault Address Register */ +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/* Secure Fault Status Register Definitions */ +#define SAU_SFSR_LSERR_Pos 7U /*!< SAU SFSR: LSERR Position */ +#define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos) /*!< SAU SFSR: LSERR Mask */ + +#define SAU_SFSR_SFARVALID_Pos 6U /*!< SAU SFSR: SFARVALID Position */ +#define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos) /*!< SAU SFSR: SFARVALID Mask */ + +#define SAU_SFSR_LSPERR_Pos 5U /*!< SAU SFSR: LSPERR Position */ +#define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos) /*!< SAU SFSR: LSPERR Mask */ + +#define SAU_SFSR_INVTRAN_Pos 4U /*!< SAU SFSR: INVTRAN Position */ +#define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos) /*!< SAU SFSR: INVTRAN Mask */ + +#define SAU_SFSR_AUVIOL_Pos 3U /*!< SAU SFSR: AUVIOL Position */ +#define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos) /*!< SAU SFSR: AUVIOL Mask */ + +#define SAU_SFSR_INVER_Pos 2U /*!< SAU SFSR: INVER Position */ +#define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos) /*!< SAU SFSR: INVER Mask */ + +#define SAU_SFSR_INVIS_Pos 1U /*!< SAU SFSR: INVIS Position */ +#define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos) /*!< SAU SFSR: INVIS Mask */ + +#define SAU_SFSR_INVEP_Pos 0U /*!< SAU SFSR: INVEP Position */ +#define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/) /*!< SAU SFSR: INVEP Mask */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_LSPENS_Pos 29U /*!< FPCCR: LSPENS Position */ +#define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos) /*!< FPCCR: LSPENS bit Mask */ + +#define FPU_FPCCR_CLRONRET_Pos 28U /*!< FPCCR: CLRONRET Position */ +#define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos) /*!< FPCCR: CLRONRET bit Mask */ + +#define FPU_FPCCR_CLRONRETS_Pos 27U /*!< FPCCR: CLRONRETS Position */ +#define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos) /*!< FPCCR: CLRONRETS bit Mask */ + +#define FPU_FPCCR_TS_Pos 26U /*!< FPCCR: TS Position */ +#define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos) /*!< FPCCR: TS bit Mask */ + +#define FPU_FPCCR_UFRDY_Pos 10U /*!< FPCCR: UFRDY Position */ +#define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos) /*!< FPCCR: UFRDY bit Mask */ + +#define FPU_FPCCR_SPLIMVIOL_Pos 9U /*!< FPCCR: SPLIMVIOL Position */ +#define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos) /*!< FPCCR: SPLIMVIOL bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_SFRDY_Pos 7U /*!< FPCCR: SFRDY Position */ +#define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos) /*!< FPCCR: SFRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_S_Pos 2U /*!< FPCCR: Security status of the FP context bit Position */ +#define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos) /*!< FPCCR: Security status of the FP context bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + #define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + + #define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ + #define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS ) /*!< System control Register not in SCB(non-secure address space) */ + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + + #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL) /*!< Floating Point Unit (non-secure address space) */ + #define FPU_NS ((FPU_Type *) FPU_BASE_NS ) /*!< Floating Point Unit (non-secure address space) */ + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; + __DSB(); +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Set Priority Grouping (non-secure) + \details Sets the non-secure priority grouping field when in secure state using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB_NS->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB_NS->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping (non-secure) + \details Reads the priority grouping field from the non-secure NVIC when in secure state. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void) +{ + return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = FPU->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) + { + return 2U; /* Double + Single precision FPU */ + } + else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \param [in] ch Character to transmit. + \returns Character to transmit. + */ +__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) +{ + if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM33_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm35p.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm35p.h new file mode 100644 index 0000000..5579c82 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm35p.h @@ -0,0 +1,2910 @@ +/**************************************************************************//** + * @file core_cm35p.h + * @brief CMSIS Cortex-M35P Core Peripheral Access Layer Header File + * @version V1.0.0 + * @date 12. November 2018 + ******************************************************************************/ +/* + * Copyright (c) 2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM35P_H_GENERIC +#define __CORE_CM35P_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M35P + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM35P definitions */ +#define __CM35P_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM35P_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM35P_CMSIS_VERSION ((__CM35P_CMSIS_VERSION_MAIN << 16U) | \ + __CM35P_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (35U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined (__TARGET_FPU_VFP) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined (__ARM_FP) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined (__ARMVFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + + #if defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1U) + #if defined (__DSP_PRESENT) && (__DSP_PRESENT == 1U) + #define __DSP_USED 1U + #else + #error "Compiler generates DSP (SIMD) instructions for a devices without DSP extensions (check __DSP_PRESENT)" + #define __DSP_USED 0U + #endif + #else + #define __DSP_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined (__TI_VFP_SUPPORT__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined (__FPU_VFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM35P_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM35P_H_DEPENDANT +#define __CORE_CM35P_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM35P_REV + #define __CM35P_REV 0x0000U + #warning "__CM35P_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __SAUREGION_PRESENT + #define __SAUREGION_PRESENT 0U + #warning "__SAUREGION_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DSP_PRESENT + #define __DSP_PRESENT 0U + #warning "__DSP_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M35P */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core SAU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:7; /*!< bit: 9..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t IT:2; /*!< bit: 25..26 saved IT state (read 0) */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_IT_Pos 25U /*!< xPSR: IT Position */ +#define xPSR_IT_Msk (3UL << xPSR_IT_Pos) /*!< xPSR: IT Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack-pointer select */ + uint32_t FPCA:1; /*!< bit: 2 Floating-point context active */ + uint32_t SFPA:1; /*!< bit: 3 Secure floating-point active */ + uint32_t _reserved1:28; /*!< bit: 4..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SFPA_Pos 3U /*!< CONTROL: SFPA Position */ +#define CONTROL_SFPA_Msk (1UL << CONTROL_SFPA_Pos) /*!< CONTROL: SFPA Mask */ + +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[16U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[16U]; + __IOM uint32_t ICER[16U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[16U]; + __IOM uint32_t ISPR[16U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[16U]; + __IOM uint32_t ICPR[16U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[16U]; + __IOM uint32_t IABR[16U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[16U]; + __IOM uint32_t ITNS[16U]; /*!< Offset: 0x280 (R/W) Interrupt Non-Secure State Register */ + uint32_t RESERVED5[16U]; + __IOM uint8_t IPR[496U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED6[580U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ID_ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t ID_MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ID_ISAR[6U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ + __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ + __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ + __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + __IOM uint32_t NSACR; /*!< Offset: 0x08C (R/W) Non-Secure Access Control Register */ + uint32_t RESERVED3[92U]; + __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ + uint32_t RESERVED4[15U]; + __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ + uint32_t RESERVED5[1U]; + __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ + uint32_t RESERVED6[1U]; + __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ + __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ + __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ + __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ + __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ + __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ + __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ + __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_PENDNMISET_Pos 31U /*!< SCB ICSR: PENDNMISET Position */ +#define SCB_ICSR_PENDNMISET_Msk (1UL << SCB_ICSR_PENDNMISET_Pos) /*!< SCB ICSR: PENDNMISET Mask */ + +#define SCB_ICSR_NMIPENDSET_Pos SCB_ICSR_PENDNMISET_Pos /*!< SCB ICSR: NMIPENDSET Position, backward compatibility */ +#define SCB_ICSR_NMIPENDSET_Msk SCB_ICSR_PENDNMISET_Msk /*!< SCB ICSR: NMIPENDSET Mask, backward compatibility */ + +#define SCB_ICSR_PENDNMICLR_Pos 30U /*!< SCB ICSR: PENDNMICLR Position */ +#define SCB_ICSR_PENDNMICLR_Msk (1UL << SCB_ICSR_PENDNMICLR_Pos) /*!< SCB ICSR: PENDNMICLR Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_STTNS_Pos 24U /*!< SCB ICSR: STTNS Position (Security Extension) */ +#define SCB_ICSR_STTNS_Msk (1UL << SCB_ICSR_STTNS_Pos) /*!< SCB ICSR: STTNS Mask (Security Extension) */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIS_Pos 14U /*!< SCB AIRCR: PRIS Position */ +#define SCB_AIRCR_PRIS_Msk (1UL << SCB_AIRCR_PRIS_Pos) /*!< SCB AIRCR: PRIS Mask */ + +#define SCB_AIRCR_BFHFNMINS_Pos 13U /*!< SCB AIRCR: BFHFNMINS Position */ +#define SCB_AIRCR_BFHFNMINS_Msk (1UL << SCB_AIRCR_BFHFNMINS_Pos) /*!< SCB AIRCR: BFHFNMINS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQS_Pos 3U /*!< SCB AIRCR: SYSRESETREQS Position */ +#define SCB_AIRCR_SYSRESETREQS_Msk (1UL << SCB_AIRCR_SYSRESETREQS_Pos) /*!< SCB AIRCR: SYSRESETREQS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEPS_Pos 3U /*!< SCB SCR: SLEEPDEEPS Position */ +#define SCB_SCR_SLEEPDEEPS_Msk (1UL << SCB_SCR_SLEEPDEEPS_Pos) /*!< SCB SCR: SLEEPDEEPS Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: BP Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: BP Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: IC Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: IC Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: DC Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: DC Mask */ + +#define SCB_CCR_STKOFHFNMIGN_Pos 10U /*!< SCB CCR: STKOFHFNMIGN Position */ +#define SCB_CCR_STKOFHFNMIGN_Msk (1UL << SCB_CCR_STKOFHFNMIGN_Pos) /*!< SCB CCR: STKOFHFNMIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_HARDFAULTPENDED_Pos 21U /*!< SCB SHCSR: HARDFAULTPENDED Position */ +#define SCB_SHCSR_HARDFAULTPENDED_Msk (1UL << SCB_SHCSR_HARDFAULTPENDED_Pos) /*!< SCB SHCSR: HARDFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTPENDED_Pos 20U /*!< SCB SHCSR: SECUREFAULTPENDED Position */ +#define SCB_SHCSR_SECUREFAULTPENDED_Msk (1UL << SCB_SHCSR_SECUREFAULTPENDED_Pos) /*!< SCB SHCSR: SECUREFAULTPENDED Mask */ + +#define SCB_SHCSR_SECUREFAULTENA_Pos 19U /*!< SCB SHCSR: SECUREFAULTENA Position */ +#define SCB_SHCSR_SECUREFAULTENA_Msk (1UL << SCB_SHCSR_SECUREFAULTENA_Pos) /*!< SCB SHCSR: SECUREFAULTENA Mask */ + +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_NMIACT_Pos 5U /*!< SCB SHCSR: NMIACT Position */ +#define SCB_SHCSR_NMIACT_Msk (1UL << SCB_SHCSR_NMIACT_Pos) /*!< SCB SHCSR: NMIACT Mask */ + +#define SCB_SHCSR_SECUREFAULTACT_Pos 4U /*!< SCB SHCSR: SECUREFAULTACT Position */ +#define SCB_SHCSR_SECUREFAULTACT_Msk (1UL << SCB_SHCSR_SECUREFAULTACT_Pos) /*!< SCB SHCSR: SECUREFAULTACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_HARDFAULTACT_Pos 2U /*!< SCB SHCSR: HARDFAULTACT Position */ +#define SCB_SHCSR_HARDFAULTACT_Msk (1UL << SCB_SHCSR_HARDFAULTACT_Pos) /*!< SCB SHCSR: HARDFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_STKOF_Pos (SCB_CFSR_USGFAULTSR_Pos + 4U) /*!< SCB CFSR (UFSR): STKOF Position */ +#define SCB_CFSR_STKOF_Msk (1UL << SCB_CFSR_STKOF_Pos) /*!< SCB CFSR (UFSR): STKOF Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/* SCB Non-Secure Access Control Register Definitions */ +#define SCB_NSACR_CP11_Pos 11U /*!< SCB NSACR: CP11 Position */ +#define SCB_NSACR_CP11_Msk (1UL << SCB_NSACR_CP11_Pos) /*!< SCB NSACR: CP11 Mask */ + +#define SCB_NSACR_CP10_Pos 10U /*!< SCB NSACR: CP10 Position */ +#define SCB_NSACR_CP10_Msk (1UL << SCB_NSACR_CP10_Pos) /*!< SCB NSACR: CP10 Mask */ + +#define SCB_NSACR_CPn_Pos 0U /*!< SCB NSACR: CPn Position */ +#define SCB_NSACR_CPn_Msk (1UL /*<< SCB_NSACR_CPn_Pos*/) /*!< SCB NSACR: CPn Mask */ + +/* SCB Cache Level ID Register Definitions */ +#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ +#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ + +#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ +#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ + +/* SCB Cache Type Register Definitions */ +#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ +#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ + +#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ +#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ + +#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ +#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ + +#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ +#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ + +#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ +#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ + +/* SCB Cache Size ID Register Definitions */ +#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ +#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ + +#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ +#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ + +#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ +#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ + +#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ +#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ + +#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ +#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ + +#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ +#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ + +#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ +#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ + +/* SCB Cache Size Selection Register Definitions */ +#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ +#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ + +#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ +#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ + +/* SCB Software Triggered Interrupt Register Definitions */ +#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ +#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ + +/* SCB D-Cache Invalidate by Set-way Register Definitions */ +#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ +#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ + +#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ +#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ + +/* SCB D-Cache Clean by Set-way Register Definitions */ +#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ +#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ + +#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ +#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ + +/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ +#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ +#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ + +#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ +#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ + __IOM uint32_t CPPWR; /*!< Offset: 0x00C (R/W) Coprocessor Power Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[32U]; + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) ITM Device Architecture Register */ + uint32_t RESERVED6[4U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Stimulus Port Register Definitions */ +#define ITM_STIM_DISABLED_Pos 1U /*!< ITM STIM: DISABLED Position */ +#define ITM_STIM_DISABLED_Msk (0x1UL << ITM_STIM_DISABLED_Pos) /*!< ITM STIM: DISABLED Mask */ + +#define ITM_STIM_FIFOREADY_Pos 0U /*!< ITM STIM: FIFOREADY Position */ +#define ITM_STIM_FIFOREADY_Msk (0x1UL /*<< ITM_STIM_FIFOREADY_Pos*/) /*!< ITM STIM: FIFOREADY Mask */ + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TRACEBUSID_Msk (0x7FUL << ITM_TCR_TRACEBUSID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPRESCALE_Pos 8U /*!< ITM TCR: TSPRESCALE Position */ +#define ITM_TCR_TSPRESCALE_Msk (3UL << ITM_TCR_TSPRESCALE_Pos) /*!< ITM TCR: TSPRESCALE Mask */ + +#define ITM_TCR_STALLENA_Pos 5U /*!< ITM TCR: STALLENA Position */ +#define ITM_TCR_STALLENA_Msk (1UL << ITM_TCR_STALLENA_Pos) /*!< ITM TCR: STALLENA Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + uint32_t RESERVED3[1U]; + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED4[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + uint32_t RESERVED5[1U]; + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED6[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + uint32_t RESERVED7[1U]; + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED8[1U]; + __IOM uint32_t COMP4; /*!< Offset: 0x060 (R/W) Comparator Register 4 */ + uint32_t RESERVED9[1U]; + __IOM uint32_t FUNCTION4; /*!< Offset: 0x068 (R/W) Function Register 4 */ + uint32_t RESERVED10[1U]; + __IOM uint32_t COMP5; /*!< Offset: 0x070 (R/W) Comparator Register 5 */ + uint32_t RESERVED11[1U]; + __IOM uint32_t FUNCTION5; /*!< Offset: 0x078 (R/W) Function Register 5 */ + uint32_t RESERVED12[1U]; + __IOM uint32_t COMP6; /*!< Offset: 0x080 (R/W) Comparator Register 6 */ + uint32_t RESERVED13[1U]; + __IOM uint32_t FUNCTION6; /*!< Offset: 0x088 (R/W) Function Register 6 */ + uint32_t RESERVED14[1U]; + __IOM uint32_t COMP7; /*!< Offset: 0x090 (R/W) Comparator Register 7 */ + uint32_t RESERVED15[1U]; + __IOM uint32_t FUNCTION7; /*!< Offset: 0x098 (R/W) Function Register 7 */ + uint32_t RESERVED16[1U]; + __IOM uint32_t COMP8; /*!< Offset: 0x0A0 (R/W) Comparator Register 8 */ + uint32_t RESERVED17[1U]; + __IOM uint32_t FUNCTION8; /*!< Offset: 0x0A8 (R/W) Function Register 8 */ + uint32_t RESERVED18[1U]; + __IOM uint32_t COMP9; /*!< Offset: 0x0B0 (R/W) Comparator Register 9 */ + uint32_t RESERVED19[1U]; + __IOM uint32_t FUNCTION9; /*!< Offset: 0x0B8 (R/W) Function Register 9 */ + uint32_t RESERVED20[1U]; + __IOM uint32_t COMP10; /*!< Offset: 0x0C0 (R/W) Comparator Register 10 */ + uint32_t RESERVED21[1U]; + __IOM uint32_t FUNCTION10; /*!< Offset: 0x0C8 (R/W) Function Register 10 */ + uint32_t RESERVED22[1U]; + __IOM uint32_t COMP11; /*!< Offset: 0x0D0 (R/W) Comparator Register 11 */ + uint32_t RESERVED23[1U]; + __IOM uint32_t FUNCTION11; /*!< Offset: 0x0D8 (R/W) Function Register 11 */ + uint32_t RESERVED24[1U]; + __IOM uint32_t COMP12; /*!< Offset: 0x0E0 (R/W) Comparator Register 12 */ + uint32_t RESERVED25[1U]; + __IOM uint32_t FUNCTION12; /*!< Offset: 0x0E8 (R/W) Function Register 12 */ + uint32_t RESERVED26[1U]; + __IOM uint32_t COMP13; /*!< Offset: 0x0F0 (R/W) Comparator Register 13 */ + uint32_t RESERVED27[1U]; + __IOM uint32_t FUNCTION13; /*!< Offset: 0x0F8 (R/W) Function Register 13 */ + uint32_t RESERVED28[1U]; + __IOM uint32_t COMP14; /*!< Offset: 0x100 (R/W) Comparator Register 14 */ + uint32_t RESERVED29[1U]; + __IOM uint32_t FUNCTION14; /*!< Offset: 0x108 (R/W) Function Register 14 */ + uint32_t RESERVED30[1U]; + __IOM uint32_t COMP15; /*!< Offset: 0x110 (R/W) Comparator Register 15 */ + uint32_t RESERVED31[1U]; + __IOM uint32_t FUNCTION15; /*!< Offset: 0x118 (R/W) Function Register 15 */ + uint32_t RESERVED32[934U]; + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ + uint32_t RESERVED33[1U]; + __IM uint32_t DEVARCH; /*!< Offset: 0xFBC (R/ ) Device Architecture Register */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCDISS_Pos 23U /*!< DWT CTRL: CYCDISS Position */ +#define DWT_CTRL_CYCDISS_Msk (0x1UL << DWT_CTRL_CYCDISS_Pos) /*!< DWT CTRL: CYCDISS Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_ID_Pos 27U /*!< DWT FUNCTION: ID Position */ +#define DWT_FUNCTION_ID_Msk (0x1FUL << DWT_FUNCTION_ID_Pos) /*!< DWT FUNCTION: ID Mask */ + +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_ACTION_Pos 4U /*!< DWT FUNCTION: ACTION Position */ +#define DWT_FUNCTION_ACTION_Msk (0x1UL << DWT_FUNCTION_ACTION_Pos) /*!< DWT FUNCTION: ACTION Mask */ + +#define DWT_FUNCTION_MATCH_Pos 0U /*!< DWT FUNCTION: MATCH Position */ +#define DWT_FUNCTION_MATCH_Msk (0xFUL /*<< DWT_FUNCTION_MATCH_Pos*/) /*!< DWT FUNCTION: MATCH Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IOM uint32_t PSCR; /*!< Offset: 0x308 (R/W) Periodic Synchronization Control Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t ITFTTD0; /*!< Offset: 0xEEC (R/ ) Integration Test FIFO Test Data 0 Register */ + __IOM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/W) Integration Test ATB Control Register 2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) Integration Test ATB Control Register 0 */ + __IM uint32_t ITFTTD1; /*!< Offset: 0xEFC (R/ ) Integration Test FIFO Test Data 1 Register */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) Device Configuration Register */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) Device Type Identifier Register */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_FOnMan_Pos 6U /*!< TPI FFCR: FOnMan Position */ +#define TPI_FFCR_FOnMan_Msk (0x1UL << TPI_FFCR_FOnMan_Pos) /*!< TPI FFCR: FOnMan Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration Test FIFO Test Data 0 Register Definitions */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD0: ATB Interface 2 ATVALIDPosition */ +#define TPI_ITFTTD0_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD0: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD0_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD0_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD0: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD0_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD0: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD0_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD0_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD0: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data2_Pos 16U /*!< TPI ITFTTD0: ATB Interface 1 data2 Position */ +#define TPI_ITFTTD0_ATB_IF1_data2_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data2 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data1_Pos 8U /*!< TPI ITFTTD0: ATB Interface 1 data1 Position */ +#define TPI_ITFTTD0_ATB_IF1_data1_Msk (0xFFUL << TPI_ITFTTD0_ATB_IF1_data1_Pos) /*!< TPI ITFTTD0: ATB Interface 1 data1 Mask */ + +#define TPI_ITFTTD0_ATB_IF1_data0_Pos 0U /*!< TPI ITFTTD0: ATB Interface 1 data0 Position */ +#define TPI_ITFTTD0_ATB_IF1_data0_Msk (0xFFUL /*<< TPI_ITFTTD0_ATB_IF1_data0_Pos*/) /*!< TPI ITFTTD0: ATB Interface 1 data0 Mask */ + +/* TPI Integration Test ATB Control Register 2 Register Definitions */ +#define TPI_ITATBCTR2_AFVALID2S_Pos 1U /*!< TPI ITATBCTR2: AFVALID2S Position */ +#define TPI_ITATBCTR2_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID2S_Pos) /*!< TPI ITATBCTR2: AFVALID2SS Mask */ + +#define TPI_ITATBCTR2_AFVALID1S_Pos 1U /*!< TPI ITATBCTR2: AFVALID1S Position */ +#define TPI_ITATBCTR2_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR2_AFVALID1S_Pos) /*!< TPI ITATBCTR2: AFVALID1SS Mask */ + +#define TPI_ITATBCTR2_ATREADY2S_Pos 0U /*!< TPI ITATBCTR2: ATREADY2S Position */ +#define TPI_ITATBCTR2_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2S_Pos*/) /*!< TPI ITATBCTR2: ATREADY2S Mask */ + +#define TPI_ITATBCTR2_ATREADY1S_Pos 0U /*!< TPI ITATBCTR2: ATREADY1S Position */ +#define TPI_ITATBCTR2_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1S_Pos*/) /*!< TPI ITATBCTR2: ATREADY1S Mask */ + +/* TPI Integration Test FIFO Test Data 1 Register Definitions */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Pos 29U /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF2_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 2 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF2_bytecount_Pos 27U /*!< TPI ITFTTD1: ATB Interface 2 byte count Position */ +#define TPI_ITFTTD1_ATB_IF2_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF2_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 2 byte count Mask */ + +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Pos 26U /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Position */ +#define TPI_ITFTTD1_ATB_IF1_ATVALID_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_ATVALID_Pos) /*!< TPI ITFTTD1: ATB Interface 1 ATVALID Mask */ + +#define TPI_ITFTTD1_ATB_IF1_bytecount_Pos 24U /*!< TPI ITFTTD1: ATB Interface 1 byte count Position */ +#define TPI_ITFTTD1_ATB_IF1_bytecount_Msk (0x3UL << TPI_ITFTTD1_ATB_IF1_bytecount_Pos) /*!< TPI ITFTTD1: ATB Interface 1 byte countt Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data2_Pos 16U /*!< TPI ITFTTD1: ATB Interface 2 data2 Position */ +#define TPI_ITFTTD1_ATB_IF2_data2_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data2 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data1_Pos 8U /*!< TPI ITFTTD1: ATB Interface 2 data1 Position */ +#define TPI_ITFTTD1_ATB_IF2_data1_Msk (0xFFUL << TPI_ITFTTD1_ATB_IF2_data1_Pos) /*!< TPI ITFTTD1: ATB Interface 2 data1 Mask */ + +#define TPI_ITFTTD1_ATB_IF2_data0_Pos 0U /*!< TPI ITFTTD1: ATB Interface 2 data0 Position */ +#define TPI_ITFTTD1_ATB_IF2_data0_Msk (0xFFUL /*<< TPI_ITFTTD1_ATB_IF2_data0_Pos*/) /*!< TPI ITFTTD1: ATB Interface 2 data0 Mask */ + +/* TPI Integration Test ATB Control Register 0 Definitions */ +#define TPI_ITATBCTR0_AFVALID2S_Pos 1U /*!< TPI ITATBCTR0: AFVALID2S Position */ +#define TPI_ITATBCTR0_AFVALID2S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID2S_Pos) /*!< TPI ITATBCTR0: AFVALID2SS Mask */ + +#define TPI_ITATBCTR0_AFVALID1S_Pos 1U /*!< TPI ITATBCTR0: AFVALID1S Position */ +#define TPI_ITATBCTR0_AFVALID1S_Msk (0x1UL << TPI_ITATBCTR0_AFVALID1S_Pos) /*!< TPI ITATBCTR0: AFVALID1SS Mask */ + +#define TPI_ITATBCTR0_ATREADY2S_Pos 0U /*!< TPI ITATBCTR0: ATREADY2S Position */ +#define TPI_ITATBCTR0_ATREADY2S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2S_Pos*/) /*!< TPI ITATBCTR0: ATREADY2S Mask */ + +#define TPI_ITATBCTR0_ATREADY1S_Pos 0U /*!< TPI ITATBCTR0: ATREADY1S Position */ +#define TPI_ITATBCTR0_ATREADY1S_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1S_Pos*/) /*!< TPI ITATBCTR0: ATREADY1S Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_FIFOSZ_Pos 6U /*!< TPI DEVID: FIFOSZ Position */ +#define TPI_DEVID_FIFOSZ_Msk (0x7UL << TPI_DEVID_FIFOSZ_Pos) /*!< TPI DEVID: FIFOSZ Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x3FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) MPU Region Limit Address Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Region Base Address Register Alias 1 */ + __IOM uint32_t RLAR_A1; /*!< Offset: 0x018 (R/W) MPU Region Limit Address Register Alias 1 */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Region Base Address Register Alias 2 */ + __IOM uint32_t RLAR_A2; /*!< Offset: 0x020 (R/W) MPU Region Limit Address Register Alias 2 */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Region Base Address Register Alias 3 */ + __IOM uint32_t RLAR_A3; /*!< Offset: 0x028 (R/W) MPU Region Limit Address Register Alias 3 */ + uint32_t RESERVED0[1]; + union { + __IOM uint32_t MAIR[2]; + struct { + __IOM uint32_t MAIR0; /*!< Offset: 0x030 (R/W) MPU Memory Attribute Indirection Register 0 */ + __IOM uint32_t MAIR1; /*!< Offset: 0x034 (R/W) MPU Memory Attribute Indirection Register 1 */ + }; + }; +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_BASE_Pos 5U /*!< MPU RBAR: BASE Position */ +#define MPU_RBAR_BASE_Msk (0x7FFFFFFUL << MPU_RBAR_BASE_Pos) /*!< MPU RBAR: BASE Mask */ + +#define MPU_RBAR_SH_Pos 3U /*!< MPU RBAR: SH Position */ +#define MPU_RBAR_SH_Msk (0x3UL << MPU_RBAR_SH_Pos) /*!< MPU RBAR: SH Mask */ + +#define MPU_RBAR_AP_Pos 1U /*!< MPU RBAR: AP Position */ +#define MPU_RBAR_AP_Msk (0x3UL << MPU_RBAR_AP_Pos) /*!< MPU RBAR: AP Mask */ + +#define MPU_RBAR_XN_Pos 0U /*!< MPU RBAR: XN Position */ +#define MPU_RBAR_XN_Msk (01UL /*<< MPU_RBAR_XN_Pos*/) /*!< MPU RBAR: XN Mask */ + +/* MPU Region Limit Address Register Definitions */ +#define MPU_RLAR_LIMIT_Pos 5U /*!< MPU RLAR: LIMIT Position */ +#define MPU_RLAR_LIMIT_Msk (0x7FFFFFFUL << MPU_RLAR_LIMIT_Pos) /*!< MPU RLAR: LIMIT Mask */ + +#define MPU_RLAR_AttrIndx_Pos 1U /*!< MPU RLAR: AttrIndx Position */ +#define MPU_RLAR_AttrIndx_Msk (0x7UL << MPU_RLAR_AttrIndx_Pos) /*!< MPU RLAR: AttrIndx Mask */ + +#define MPU_RLAR_EN_Pos 0U /*!< MPU RLAR: Region enable bit Position */ +#define MPU_RLAR_EN_Msk (1UL /*<< MPU_RLAR_EN_Pos*/) /*!< MPU RLAR: Region enable bit Disable Mask */ + +/* MPU Memory Attribute Indirection Register 0 Definitions */ +#define MPU_MAIR0_Attr3_Pos 24U /*!< MPU MAIR0: Attr3 Position */ +#define MPU_MAIR0_Attr3_Msk (0xFFUL << MPU_MAIR0_Attr3_Pos) /*!< MPU MAIR0: Attr3 Mask */ + +#define MPU_MAIR0_Attr2_Pos 16U /*!< MPU MAIR0: Attr2 Position */ +#define MPU_MAIR0_Attr2_Msk (0xFFUL << MPU_MAIR0_Attr2_Pos) /*!< MPU MAIR0: Attr2 Mask */ + +#define MPU_MAIR0_Attr1_Pos 8U /*!< MPU MAIR0: Attr1 Position */ +#define MPU_MAIR0_Attr1_Msk (0xFFUL << MPU_MAIR0_Attr1_Pos) /*!< MPU MAIR0: Attr1 Mask */ + +#define MPU_MAIR0_Attr0_Pos 0U /*!< MPU MAIR0: Attr0 Position */ +#define MPU_MAIR0_Attr0_Msk (0xFFUL /*<< MPU_MAIR0_Attr0_Pos*/) /*!< MPU MAIR0: Attr0 Mask */ + +/* MPU Memory Attribute Indirection Register 1 Definitions */ +#define MPU_MAIR1_Attr7_Pos 24U /*!< MPU MAIR1: Attr7 Position */ +#define MPU_MAIR1_Attr7_Msk (0xFFUL << MPU_MAIR1_Attr7_Pos) /*!< MPU MAIR1: Attr7 Mask */ + +#define MPU_MAIR1_Attr6_Pos 16U /*!< MPU MAIR1: Attr6 Position */ +#define MPU_MAIR1_Attr6_Msk (0xFFUL << MPU_MAIR1_Attr6_Pos) /*!< MPU MAIR1: Attr6 Mask */ + +#define MPU_MAIR1_Attr5_Pos 8U /*!< MPU MAIR1: Attr5 Position */ +#define MPU_MAIR1_Attr5_Msk (0xFFUL << MPU_MAIR1_Attr5_Pos) /*!< MPU MAIR1: Attr5 Mask */ + +#define MPU_MAIR1_Attr4_Pos 0U /*!< MPU MAIR1: Attr4 Position */ +#define MPU_MAIR1_Attr4_Msk (0xFFUL /*<< MPU_MAIR1_Attr4_Pos*/) /*!< MPU MAIR1: Attr4 Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SAU Security Attribution Unit (SAU) + \brief Type definitions for the Security Attribution Unit (SAU) + @{ + */ + +/** + \brief Structure type to access the Security Attribution Unit (SAU). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SAU Control Register */ + __IM uint32_t TYPE; /*!< Offset: 0x004 (R/ ) SAU Type Register */ +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) SAU Region Number Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) SAU Region Base Address Register */ + __IOM uint32_t RLAR; /*!< Offset: 0x010 (R/W) SAU Region Limit Address Register */ +#else + uint32_t RESERVED0[3]; +#endif + __IOM uint32_t SFSR; /*!< Offset: 0x014 (R/W) Secure Fault Status Register */ + __IOM uint32_t SFAR; /*!< Offset: 0x018 (R/W) Secure Fault Address Register */ +} SAU_Type; + +/* SAU Control Register Definitions */ +#define SAU_CTRL_ALLNS_Pos 1U /*!< SAU CTRL: ALLNS Position */ +#define SAU_CTRL_ALLNS_Msk (1UL << SAU_CTRL_ALLNS_Pos) /*!< SAU CTRL: ALLNS Mask */ + +#define SAU_CTRL_ENABLE_Pos 0U /*!< SAU CTRL: ENABLE Position */ +#define SAU_CTRL_ENABLE_Msk (1UL /*<< SAU_CTRL_ENABLE_Pos*/) /*!< SAU CTRL: ENABLE Mask */ + +/* SAU Type Register Definitions */ +#define SAU_TYPE_SREGION_Pos 0U /*!< SAU TYPE: SREGION Position */ +#define SAU_TYPE_SREGION_Msk (0xFFUL /*<< SAU_TYPE_SREGION_Pos*/) /*!< SAU TYPE: SREGION Mask */ + +#if defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) +/* SAU Region Number Register Definitions */ +#define SAU_RNR_REGION_Pos 0U /*!< SAU RNR: REGION Position */ +#define SAU_RNR_REGION_Msk (0xFFUL /*<< SAU_RNR_REGION_Pos*/) /*!< SAU RNR: REGION Mask */ + +/* SAU Region Base Address Register Definitions */ +#define SAU_RBAR_BADDR_Pos 5U /*!< SAU RBAR: BADDR Position */ +#define SAU_RBAR_BADDR_Msk (0x7FFFFFFUL << SAU_RBAR_BADDR_Pos) /*!< SAU RBAR: BADDR Mask */ + +/* SAU Region Limit Address Register Definitions */ +#define SAU_RLAR_LADDR_Pos 5U /*!< SAU RLAR: LADDR Position */ +#define SAU_RLAR_LADDR_Msk (0x7FFFFFFUL << SAU_RLAR_LADDR_Pos) /*!< SAU RLAR: LADDR Mask */ + +#define SAU_RLAR_NSC_Pos 1U /*!< SAU RLAR: NSC Position */ +#define SAU_RLAR_NSC_Msk (1UL << SAU_RLAR_NSC_Pos) /*!< SAU RLAR: NSC Mask */ + +#define SAU_RLAR_ENABLE_Pos 0U /*!< SAU RLAR: ENABLE Position */ +#define SAU_RLAR_ENABLE_Msk (1UL /*<< SAU_RLAR_ENABLE_Pos*/) /*!< SAU RLAR: ENABLE Mask */ + +#endif /* defined (__SAUREGION_PRESENT) && (__SAUREGION_PRESENT == 1U) */ + +/* Secure Fault Status Register Definitions */ +#define SAU_SFSR_LSERR_Pos 7U /*!< SAU SFSR: LSERR Position */ +#define SAU_SFSR_LSERR_Msk (1UL << SAU_SFSR_LSERR_Pos) /*!< SAU SFSR: LSERR Mask */ + +#define SAU_SFSR_SFARVALID_Pos 6U /*!< SAU SFSR: SFARVALID Position */ +#define SAU_SFSR_SFARVALID_Msk (1UL << SAU_SFSR_SFARVALID_Pos) /*!< SAU SFSR: SFARVALID Mask */ + +#define SAU_SFSR_LSPERR_Pos 5U /*!< SAU SFSR: LSPERR Position */ +#define SAU_SFSR_LSPERR_Msk (1UL << SAU_SFSR_LSPERR_Pos) /*!< SAU SFSR: LSPERR Mask */ + +#define SAU_SFSR_INVTRAN_Pos 4U /*!< SAU SFSR: INVTRAN Position */ +#define SAU_SFSR_INVTRAN_Msk (1UL << SAU_SFSR_INVTRAN_Pos) /*!< SAU SFSR: INVTRAN Mask */ + +#define SAU_SFSR_AUVIOL_Pos 3U /*!< SAU SFSR: AUVIOL Position */ +#define SAU_SFSR_AUVIOL_Msk (1UL << SAU_SFSR_AUVIOL_Pos) /*!< SAU SFSR: AUVIOL Mask */ + +#define SAU_SFSR_INVER_Pos 2U /*!< SAU SFSR: INVER Position */ +#define SAU_SFSR_INVER_Msk (1UL << SAU_SFSR_INVER_Pos) /*!< SAU SFSR: INVER Mask */ + +#define SAU_SFSR_INVIS_Pos 1U /*!< SAU SFSR: INVIS Position */ +#define SAU_SFSR_INVIS_Msk (1UL << SAU_SFSR_INVIS_Pos) /*!< SAU SFSR: INVIS Mask */ + +#define SAU_SFSR_INVEP_Pos 0U /*!< SAU SFSR: INVEP Position */ +#define SAU_SFSR_INVEP_Msk (1UL /*<< SAU_SFSR_INVEP_Pos*/) /*!< SAU SFSR: INVEP Mask */ + +/*@} end of group CMSIS_SAU */ +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_LSPENS_Pos 29U /*!< FPCCR: LSPENS Position */ +#define FPU_FPCCR_LSPENS_Msk (1UL << FPU_FPCCR_LSPENS_Pos) /*!< FPCCR: LSPENS bit Mask */ + +#define FPU_FPCCR_CLRONRET_Pos 28U /*!< FPCCR: CLRONRET Position */ +#define FPU_FPCCR_CLRONRET_Msk (1UL << FPU_FPCCR_CLRONRET_Pos) /*!< FPCCR: CLRONRET bit Mask */ + +#define FPU_FPCCR_CLRONRETS_Pos 27U /*!< FPCCR: CLRONRETS Position */ +#define FPU_FPCCR_CLRONRETS_Msk (1UL << FPU_FPCCR_CLRONRETS_Pos) /*!< FPCCR: CLRONRETS bit Mask */ + +#define FPU_FPCCR_TS_Pos 26U /*!< FPCCR: TS Position */ +#define FPU_FPCCR_TS_Msk (1UL << FPU_FPCCR_TS_Pos) /*!< FPCCR: TS bit Mask */ + +#define FPU_FPCCR_UFRDY_Pos 10U /*!< FPCCR: UFRDY Position */ +#define FPU_FPCCR_UFRDY_Msk (1UL << FPU_FPCCR_UFRDY_Pos) /*!< FPCCR: UFRDY bit Mask */ + +#define FPU_FPCCR_SPLIMVIOL_Pos 9U /*!< FPCCR: SPLIMVIOL Position */ +#define FPU_FPCCR_SPLIMVIOL_Msk (1UL << FPU_FPCCR_SPLIMVIOL_Pos) /*!< FPCCR: SPLIMVIOL bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_SFRDY_Pos 7U /*!< FPCCR: SFRDY Position */ +#define FPU_FPCCR_SFRDY_Msk (1UL << FPU_FPCCR_SFRDY_Pos) /*!< FPCCR: SFRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_S_Pos 2U /*!< FPCCR: Security status of the FP context bit Position */ +#define FPU_FPCCR_S_Msk (1UL << FPU_FPCCR_S_Pos) /*!< FPCCR: Security status of the FP context bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ + uint32_t RESERVED4[1U]; + __IOM uint32_t DAUTHCTRL; /*!< Offset: 0x014 (R/W) Debug Authentication Control Register */ + __IOM uint32_t DSCSR; /*!< Offset: 0x018 (R/W) Debug Security Control and Status Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESTART_ST_Pos 26U /*!< CoreDebug DHCSR: S_RESTART_ST Position */ +#define CoreDebug_DHCSR_S_RESTART_ST_Msk (1UL << CoreDebug_DHCSR_S_RESTART_ST_Pos) /*!< CoreDebug DHCSR: S_RESTART_ST Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/* Debug Authentication Control Register Definitions */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos 3U /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Position */ +#define CoreDebug_DAUTHCTRL_INTSPNIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPNIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPNIDEN, Mask */ + +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos 2U /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPNIDENSEL_Msk (1UL << CoreDebug_DAUTHCTRL_SPNIDENSEL_Pos) /*!< CoreDebug DAUTHCTRL: SPNIDENSEL Mask */ + +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Pos 1U /*!< CoreDebug DAUTHCTRL: INTSPIDEN Position */ +#define CoreDebug_DAUTHCTRL_INTSPIDEN_Msk (1UL << CoreDebug_DAUTHCTRL_INTSPIDEN_Pos) /*!< CoreDebug DAUTHCTRL: INTSPIDEN Mask */ + +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Pos 0U /*!< CoreDebug DAUTHCTRL: SPIDENSEL Position */ +#define CoreDebug_DAUTHCTRL_SPIDENSEL_Msk (1UL /*<< CoreDebug_DAUTHCTRL_SPIDENSEL_Pos*/) /*!< CoreDebug DAUTHCTRL: SPIDENSEL Mask */ + +/* Debug Security Control and Status Register Definitions */ +#define CoreDebug_DSCSR_CDS_Pos 16U /*!< CoreDebug DSCSR: CDS Position */ +#define CoreDebug_DSCSR_CDS_Msk (1UL << CoreDebug_DSCSR_CDS_Pos) /*!< CoreDebug DSCSR: CDS Mask */ + +#define CoreDebug_DSCSR_SBRSEL_Pos 1U /*!< CoreDebug DSCSR: SBRSEL Position */ +#define CoreDebug_DSCSR_SBRSEL_Msk (1UL << CoreDebug_DSCSR_SBRSEL_Pos) /*!< CoreDebug DSCSR: SBRSEL Mask */ + +#define CoreDebug_DSCSR_SBRSELEN_Pos 0U /*!< CoreDebug DSCSR: SBRSELEN Position */ +#define CoreDebug_DSCSR_SBRSELEN_Msk (1UL /*<< CoreDebug_DSCSR_SBRSELEN_Pos*/) /*!< CoreDebug DSCSR: SBRSELEN Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ + #define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ + #define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ + #define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ + #define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ + #define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ + #define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ + #define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ + #define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + + #define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ + #define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ + #define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ + #define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + #define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ + #define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ + #define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ + #define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE ) /*!< Core Debug configuration struct */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ + #endif + + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SAU_BASE (SCS_BASE + 0x0DD0UL) /*!< Security Attribution Unit */ + #define SAU ((SAU_Type *) SAU_BASE ) /*!< Security Attribution Unit */ + #endif + + #define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ + #define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #define SCS_BASE_NS (0xE002E000UL) /*!< System Control Space Base Address (non-secure address space) */ + #define CoreDebug_BASE_NS (0xE002EDF0UL) /*!< Core Debug Base Address (non-secure address space) */ + #define SysTick_BASE_NS (SCS_BASE_NS + 0x0010UL) /*!< SysTick Base Address (non-secure address space) */ + #define NVIC_BASE_NS (SCS_BASE_NS + 0x0100UL) /*!< NVIC Base Address (non-secure address space) */ + #define SCB_BASE_NS (SCS_BASE_NS + 0x0D00UL) /*!< System Control Block Base Address (non-secure address space) */ + + #define SCnSCB_NS ((SCnSCB_Type *) SCS_BASE_NS ) /*!< System control Register not in SCB(non-secure address space) */ + #define SCB_NS ((SCB_Type *) SCB_BASE_NS ) /*!< SCB configuration struct (non-secure address space) */ + #define SysTick_NS ((SysTick_Type *) SysTick_BASE_NS ) /*!< SysTick configuration struct (non-secure address space) */ + #define NVIC_NS ((NVIC_Type *) NVIC_BASE_NS ) /*!< NVIC configuration struct (non-secure address space) */ + #define CoreDebug_NS ((CoreDebug_Type *) CoreDebug_BASE_NS) /*!< Core Debug configuration struct (non-secure address space) */ + + #if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE_NS (SCS_BASE_NS + 0x0D90UL) /*!< Memory Protection Unit (non-secure address space) */ + #define MPU_NS ((MPU_Type *) MPU_BASE_NS ) /*!< Memory Protection Unit (non-secure address space) */ + #endif + + #define FPU_BASE_NS (SCS_BASE_NS + 0x0F30UL) /*!< Floating Point Unit (non-secure address space) */ + #define FPU_NS ((FPU_Type *) FPU_BASE_NS ) /*!< Floating Point Unit (non-secure address space) */ + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* Special LR values for Secure/Non-Secure call handling and exception handling */ + +/* Function Return Payload (from ARMv8-M Architecture Reference Manual) LR value on entry from Secure BLXNS */ +#define FNC_RETURN (0xFEFFFFFFUL) /* bit [0] ignored when processing a branch */ + +/* The following EXC_RETURN mask values are used to evaluate the LR on exception entry */ +#define EXC_RETURN_PREFIX (0xFF000000UL) /* bits [31:24] set to indicate an EXC_RETURN value */ +#define EXC_RETURN_S (0x00000040UL) /* bit [6] stack used to push registers: 0=Non-secure 1=Secure */ +#define EXC_RETURN_DCRS (0x00000020UL) /* bit [5] stacking rules for called registers: 0=skipped 1=saved */ +#define EXC_RETURN_FTYPE (0x00000010UL) /* bit [4] allocate stack for floating-point context: 0=done 1=skipped */ +#define EXC_RETURN_MODE (0x00000008UL) /* bit [3] processor mode for return: 0=Handler mode 1=Thread mode */ +#define EXC_RETURN_SPSEL (0x00000004UL) /* bit [2] stack pointer used to restore context: 0=MSP 1=PSP */ +#define EXC_RETURN_ES (0x00000001UL) /* bit [0] security state exception was taken to: 0=Non-secure 1=Secure */ + +/* Integrity Signature (from ARMv8-M Architecture Reference Manual) for exception context stacking */ +#if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) /* Value for processors with floating-point extension: */ +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125AUL) /* bit [0] SFTC must match LR bit[4] EXC_RETURN_FTYPE */ +#else +#define EXC_INTEGRITY_SIGNATURE (0xFEFA125BUL) /* Value for processors without floating-point extension */ +#endif + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Get Interrupt Target State + \details Reads the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + \return 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_GetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Target State + \details Sets the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_SetTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] |= ((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Clear Interrupt Target State + \details Clears the interrupt target field in the NVIC and returns the interrupt target bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 if interrupt is assigned to Secure + 1 if interrupt is assigned to Non Secure + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t NVIC_ClearTargetState(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] &= ~((uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL))); + return((uint32_t)(((NVIC->ITNS[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; + __DSB(); +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief Set Priority Grouping (non-secure) + \details Sets the non-secure priority grouping field when in secure state using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB_NS->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB_NS->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping (non-secure) + \details Reads the priority grouping field from the non-secure NVIC when in secure state. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriorityGrouping_NS(void) +{ + return ((uint32_t)((SCB_NS->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt (non-secure) + \details Enables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_EnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Interrupt Enable status (non-secure) + \details Returns a device specific interrupt enable status from the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetEnableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt (non-secure) + \details Disables a device specific interrupt in the non-secure NVIC interrupt controller when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_DisableIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Pending Interrupt (non-secure) + \details Reads the NVIC pending register in the non-secure NVIC when in secure state and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt (non-secure) + \details Sets the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_SetPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt (non-secure) + \details Clears the pending bit of a device specific interrupt in the non-secure NVIC pending register when in secure state. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void TZ_NVIC_ClearPendingIRQ_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt (non-secure) + \details Reads the active register in non-secure NVIC when in secure state and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetActive_NS(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC_NS->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority (non-secure) + \details Sets the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every non-secure processor exception. + */ +__STATIC_INLINE void TZ_NVIC_SetPriority_NS(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC_NS->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority (non-secure) + \details Reads the priority of a non-secure device specific interrupt or a non-secure processor exception when in secure state. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t TZ_NVIC_GetPriority_NS(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC_NS->IPR[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB_NS->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} +#endif /* defined (__ARM_FEATURE_CMSE) &&(__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_NVICFunctions */ + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv8.h" + +#endif + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = FPU->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) + { + return 2U; /* Double + Single precision FPU */ + } + else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## SAU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SAUFunctions SAU Functions + \brief Functions that configure the SAU. + @{ + */ + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + +/** + \brief Enable SAU + \details Enables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Enable(void) +{ + SAU->CTRL |= (SAU_CTRL_ENABLE_Msk); +} + + + +/** + \brief Disable SAU + \details Disables the Security Attribution Unit (SAU). + */ +__STATIC_INLINE void TZ_SAU_Disable(void) +{ + SAU->CTRL &= ~(SAU_CTRL_ENABLE_Msk); +} + +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +/*@} end of CMSIS_Core_SAUFunctions */ + + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +/** + \brief System Tick Configuration (non-secure) + \details Initializes the non-secure System Timer and its interrupt when in secure state, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function TZ_SysTick_Config_NS is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + + */ +__STATIC_INLINE uint32_t TZ_SysTick_Config_NS(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick_NS->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + TZ_NVIC_SetPriority_NS (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick_NS->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick_NS->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} +#endif /* defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) */ + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \param [in] ch Character to transmit. + \returns Character to transmit. + */ +__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) +{ + if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM35P_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm4.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm4.h new file mode 100644 index 0000000..12c023b --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm4.h @@ -0,0 +1,2124 @@ +/**************************************************************************//** + * @file core_cm4.h + * @brief CMSIS Cortex-M4 Core Peripheral Access Layer Header File + * @version V5.1.0 + * @date 13. March 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM4_H_GENERIC +#define __CORE_CM4_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M4 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM4 definitions */ +#define __CM4_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM4_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM4_CMSIS_VERSION ((__CM4_CMSIS_VERSION_MAIN << 16U) | \ + __CM4_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (4U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM4_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM4_H_DEPENDANT +#define __CORE_CM4_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM4_REV + #define __CM4_REV 0x0000U + #warning "__CM4_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M4 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:1; /*!< bit: 9 Reserved */ + uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit */ + uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ +#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ +#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t FPCA:1; /*!< bit: 2 FP extension active flag */ + uint32_t _reserved0:29; /*!< bit: 3..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[24U]; + __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RESERVED1[24U]; + __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[24U]; + __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[24U]; + __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[56U]; + __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED5[644U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + uint32_t RESERVED0[5U]; + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ +#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ +#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_DISOOFP_Pos 9U /*!< ACTLR: DISOOFP Position */ +#define SCnSCB_ACTLR_DISOOFP_Msk (1UL << SCnSCB_ACTLR_DISOOFP_Pos) /*!< ACTLR: DISOOFP Mask */ + +#define SCnSCB_ACTLR_DISFPCA_Pos 8U /*!< ACTLR: DISFPCA Position */ +#define SCnSCB_ACTLR_DISFPCA_Msk (1UL << SCnSCB_ACTLR_DISFPCA_Pos) /*!< ACTLR: DISFPCA Mask */ + +#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ +#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ + +#define SCnSCB_ACTLR_DISDEFWBUF_Pos 1U /*!< ACTLR: DISDEFWBUF Position */ +#define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos) /*!< ACTLR: DISDEFWBUF Mask */ + +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[32U]; + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[6U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ +#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED0[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Mask Register Definitions */ +#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ +#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ +#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ + +#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ +#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ +#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ + +#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ +#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ + +#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ +#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ + +#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ +#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ + +#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ +#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x1UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x1UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ +#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ + +#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ +#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x1UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x1UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ +#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ + +#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ +#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ + __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ + __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ + __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif /* defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and FP Feature Register 2 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/* Media and FP Feature Register 2 Definitions */ + +#define FPU_MVFR2_VFP_Misc_Pos 4U /*!< MVFR2: VFP Misc bits Position */ +#define FPU_MVFR2_VFP_Misc_Msk (0xFUL << FPU_MVFR2_VFP_Misc_Pos) /*!< MVFR2: VFP Misc bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ +#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ +#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ +#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ +#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ +#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ +#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ +#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +#define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ +#define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ +#define EXC_RETURN_HANDLER_FPU (0xFFFFFFE1UL) /* return to Handler mode, uses MSP after return, restore floating-point state */ +#define EXC_RETURN_THREAD_MSP_FPU (0xFFFFFFE9UL) /* return to Thread mode, uses MSP after return, restore floating-point state */ +#define EXC_RETURN_THREAD_PSP_FPU (0xFFFFFFEDUL) /* return to Thread mode, uses PSP after return, restore floating-point state */ + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t vectors = (uint32_t )SCB->VTOR; + (* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector; + /* ARM Application Note 321 states that the M4 does not require the architectural barrier */ +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t vectors = (uint32_t )SCB->VTOR; + return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)); +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = FPU->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \param [in] ch Character to transmit. + \returns Character to transmit. + */ +__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) +{ + if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM4_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm7.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm7.h new file mode 100644 index 0000000..c4515d8 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_cm7.h @@ -0,0 +1,2725 @@ +/**************************************************************************//** + * @file core_cm7.h + * @brief CMSIS Cortex-M7 Core Peripheral Access Layer Header File + * @version V5.1.1 + * @date 28. March 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_CM7_H_GENERIC +#define __CORE_CM7_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup Cortex_M7 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS CM7 definitions */ +#define __CM7_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __CM7_CMSIS_VERSION_SUB ( __CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __CM7_CMSIS_VERSION ((__CM7_CMSIS_VERSION_MAIN << 16U) | \ + __CM7_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_M (7U) /*!< Cortex-M Core */ + +/** __FPU_USED indicates whether an FPU is used or not. + For this, __FPU_PRESENT has to be checked prior to making use of FPU specific registers and functions. +*/ +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #if defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U) + #define __FPU_USED 1U + #else + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #define __FPU_USED 0U + #endif + #else + #define __FPU_USED 0U + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM7_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_CM7_H_DEPENDANT +#define __CORE_CM7_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __CM7_REV + #define __CM7_REV 0x0000U + #warning "__CM7_REV not defined in device header file; using default!" + #endif + + #ifndef __FPU_PRESENT + #define __FPU_PRESENT 0U + #warning "__FPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __ICACHE_PRESENT + #define __ICACHE_PRESENT 0U + #warning "__ICACHE_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DCACHE_PRESENT + #define __DCACHE_PRESENT 0U + #warning "__DCACHE_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __DTCM_PRESENT + #define __DTCM_PRESENT 0U + #warning "__DTCM_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group Cortex_M7 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + - Core FPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:16; /*!< bit: 0..15 Reserved */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:7; /*!< bit: 20..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + +#define APSR_GE_Pos 16U /*!< APSR: GE Position */ +#define APSR_GE_Msk (0xFUL << APSR_GE_Pos) /*!< APSR: GE Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:1; /*!< bit: 9 Reserved */ + uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ + uint32_t GE:4; /*!< bit: 16..19 Greater than or Equal flags */ + uint32_t _reserved1:4; /*!< bit: 20..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit */ + uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ +#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_GE_Pos 16U /*!< xPSR: GE Position */ +#define xPSR_GE_Msk (0xFUL << xPSR_GE_Pos) /*!< xPSR: GE Mask */ + +#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ +#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t FPCA:1; /*!< bit: 2 FP extension active flag */ + uint32_t _reserved0:29; /*!< bit: 3..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_FPCA_Pos 2U /*!< CONTROL: FPCA Position */ +#define CONTROL_FPCA_Msk (1UL << CONTROL_FPCA_Pos) /*!< CONTROL: FPCA Mask */ + +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[24U]; + __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RESERVED1[24U]; + __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[24U]; + __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[24U]; + __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[56U]; + __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED5[644U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHPR[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t ID_PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t ID_DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ID_AFR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t ID_MFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ID_ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + uint32_t RESERVED0[1U]; + __IM uint32_t CLIDR; /*!< Offset: 0x078 (R/ ) Cache Level ID register */ + __IM uint32_t CTR; /*!< Offset: 0x07C (R/ ) Cache Type register */ + __IM uint32_t CCSIDR; /*!< Offset: 0x080 (R/ ) Cache Size ID Register */ + __IOM uint32_t CSSELR; /*!< Offset: 0x084 (R/W) Cache Size Selection Register */ + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + uint32_t RESERVED3[93U]; + __OM uint32_t STIR; /*!< Offset: 0x200 ( /W) Software Triggered Interrupt Register */ + uint32_t RESERVED4[15U]; + __IM uint32_t MVFR0; /*!< Offset: 0x240 (R/ ) Media and VFP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x244 (R/ ) Media and VFP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x248 (R/ ) Media and VFP Feature Register 2 */ + uint32_t RESERVED5[1U]; + __OM uint32_t ICIALLU; /*!< Offset: 0x250 ( /W) I-Cache Invalidate All to PoU */ + uint32_t RESERVED6[1U]; + __OM uint32_t ICIMVAU; /*!< Offset: 0x258 ( /W) I-Cache Invalidate by MVA to PoU */ + __OM uint32_t DCIMVAC; /*!< Offset: 0x25C ( /W) D-Cache Invalidate by MVA to PoC */ + __OM uint32_t DCISW; /*!< Offset: 0x260 ( /W) D-Cache Invalidate by Set-way */ + __OM uint32_t DCCMVAU; /*!< Offset: 0x264 ( /W) D-Cache Clean by MVA to PoU */ + __OM uint32_t DCCMVAC; /*!< Offset: 0x268 ( /W) D-Cache Clean by MVA to PoC */ + __OM uint32_t DCCSW; /*!< Offset: 0x26C ( /W) D-Cache Clean by Set-way */ + __OM uint32_t DCCIMVAC; /*!< Offset: 0x270 ( /W) D-Cache Clean and Invalidate by MVA to PoC */ + __OM uint32_t DCCISW; /*!< Offset: 0x274 ( /W) D-Cache Clean and Invalidate by Set-way */ + uint32_t RESERVED7[6U]; + __IOM uint32_t ITCMCR; /*!< Offset: 0x290 (R/W) Instruction Tightly-Coupled Memory Control Register */ + __IOM uint32_t DTCMCR; /*!< Offset: 0x294 (R/W) Data Tightly-Coupled Memory Control Registers */ + __IOM uint32_t AHBPCR; /*!< Offset: 0x298 (R/W) AHBP Control Register */ + __IOM uint32_t CACR; /*!< Offset: 0x29C (R/W) L1 Cache Control Register */ + __IOM uint32_t AHBSCR; /*!< Offset: 0x2A0 (R/W) AHB Slave Control Register */ + uint32_t RESERVED8[1U]; + __IOM uint32_t ABFSR; /*!< Offset: 0x2A8 (R/W) Auxiliary Bus Fault Status Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ +#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_BP_Pos 18U /*!< SCB CCR: Branch prediction enable bit Position */ +#define SCB_CCR_BP_Msk (1UL << SCB_CCR_BP_Pos) /*!< SCB CCR: Branch prediction enable bit Mask */ + +#define SCB_CCR_IC_Pos 17U /*!< SCB CCR: Instruction cache enable bit Position */ +#define SCB_CCR_IC_Msk (1UL << SCB_CCR_IC_Pos) /*!< SCB CCR: Instruction cache enable bit Mask */ + +#define SCB_CCR_DC_Pos 16U /*!< SCB CCR: Cache enable bit Position */ +#define SCB_CCR_DC_Msk (1UL << SCB_CCR_DC_Pos) /*!< SCB CCR: Cache enable bit Mask */ + +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ +#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MLSPERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 5U) /*!< SCB CFSR (MMFSR): MLSPERR Position */ +#define SCB_CFSR_MLSPERR_Msk (1UL << SCB_CFSR_MLSPERR_Pos) /*!< SCB CFSR (MMFSR): MLSPERR Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_LSPERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 5U) /*!< SCB CFSR (BFSR): LSPERR Position */ +#define SCB_CFSR_LSPERR_Msk (1UL << SCB_CFSR_LSPERR_Pos) /*!< SCB CFSR (BFSR): LSPERR Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/* SCB Cache Level ID Register Definitions */ +#define SCB_CLIDR_LOUU_Pos 27U /*!< SCB CLIDR: LoUU Position */ +#define SCB_CLIDR_LOUU_Msk (7UL << SCB_CLIDR_LOUU_Pos) /*!< SCB CLIDR: LoUU Mask */ + +#define SCB_CLIDR_LOC_Pos 24U /*!< SCB CLIDR: LoC Position */ +#define SCB_CLIDR_LOC_Msk (7UL << SCB_CLIDR_LOC_Pos) /*!< SCB CLIDR: LoC Mask */ + +/* SCB Cache Type Register Definitions */ +#define SCB_CTR_FORMAT_Pos 29U /*!< SCB CTR: Format Position */ +#define SCB_CTR_FORMAT_Msk (7UL << SCB_CTR_FORMAT_Pos) /*!< SCB CTR: Format Mask */ + +#define SCB_CTR_CWG_Pos 24U /*!< SCB CTR: CWG Position */ +#define SCB_CTR_CWG_Msk (0xFUL << SCB_CTR_CWG_Pos) /*!< SCB CTR: CWG Mask */ + +#define SCB_CTR_ERG_Pos 20U /*!< SCB CTR: ERG Position */ +#define SCB_CTR_ERG_Msk (0xFUL << SCB_CTR_ERG_Pos) /*!< SCB CTR: ERG Mask */ + +#define SCB_CTR_DMINLINE_Pos 16U /*!< SCB CTR: DminLine Position */ +#define SCB_CTR_DMINLINE_Msk (0xFUL << SCB_CTR_DMINLINE_Pos) /*!< SCB CTR: DminLine Mask */ + +#define SCB_CTR_IMINLINE_Pos 0U /*!< SCB CTR: ImInLine Position */ +#define SCB_CTR_IMINLINE_Msk (0xFUL /*<< SCB_CTR_IMINLINE_Pos*/) /*!< SCB CTR: ImInLine Mask */ + +/* SCB Cache Size ID Register Definitions */ +#define SCB_CCSIDR_WT_Pos 31U /*!< SCB CCSIDR: WT Position */ +#define SCB_CCSIDR_WT_Msk (1UL << SCB_CCSIDR_WT_Pos) /*!< SCB CCSIDR: WT Mask */ + +#define SCB_CCSIDR_WB_Pos 30U /*!< SCB CCSIDR: WB Position */ +#define SCB_CCSIDR_WB_Msk (1UL << SCB_CCSIDR_WB_Pos) /*!< SCB CCSIDR: WB Mask */ + +#define SCB_CCSIDR_RA_Pos 29U /*!< SCB CCSIDR: RA Position */ +#define SCB_CCSIDR_RA_Msk (1UL << SCB_CCSIDR_RA_Pos) /*!< SCB CCSIDR: RA Mask */ + +#define SCB_CCSIDR_WA_Pos 28U /*!< SCB CCSIDR: WA Position */ +#define SCB_CCSIDR_WA_Msk (1UL << SCB_CCSIDR_WA_Pos) /*!< SCB CCSIDR: WA Mask */ + +#define SCB_CCSIDR_NUMSETS_Pos 13U /*!< SCB CCSIDR: NumSets Position */ +#define SCB_CCSIDR_NUMSETS_Msk (0x7FFFUL << SCB_CCSIDR_NUMSETS_Pos) /*!< SCB CCSIDR: NumSets Mask */ + +#define SCB_CCSIDR_ASSOCIATIVITY_Pos 3U /*!< SCB CCSIDR: Associativity Position */ +#define SCB_CCSIDR_ASSOCIATIVITY_Msk (0x3FFUL << SCB_CCSIDR_ASSOCIATIVITY_Pos) /*!< SCB CCSIDR: Associativity Mask */ + +#define SCB_CCSIDR_LINESIZE_Pos 0U /*!< SCB CCSIDR: LineSize Position */ +#define SCB_CCSIDR_LINESIZE_Msk (7UL /*<< SCB_CCSIDR_LINESIZE_Pos*/) /*!< SCB CCSIDR: LineSize Mask */ + +/* SCB Cache Size Selection Register Definitions */ +#define SCB_CSSELR_LEVEL_Pos 1U /*!< SCB CSSELR: Level Position */ +#define SCB_CSSELR_LEVEL_Msk (7UL << SCB_CSSELR_LEVEL_Pos) /*!< SCB CSSELR: Level Mask */ + +#define SCB_CSSELR_IND_Pos 0U /*!< SCB CSSELR: InD Position */ +#define SCB_CSSELR_IND_Msk (1UL /*<< SCB_CSSELR_IND_Pos*/) /*!< SCB CSSELR: InD Mask */ + +/* SCB Software Triggered Interrupt Register Definitions */ +#define SCB_STIR_INTID_Pos 0U /*!< SCB STIR: INTID Position */ +#define SCB_STIR_INTID_Msk (0x1FFUL /*<< SCB_STIR_INTID_Pos*/) /*!< SCB STIR: INTID Mask */ + +/* SCB D-Cache Invalidate by Set-way Register Definitions */ +#define SCB_DCISW_WAY_Pos 30U /*!< SCB DCISW: Way Position */ +#define SCB_DCISW_WAY_Msk (3UL << SCB_DCISW_WAY_Pos) /*!< SCB DCISW: Way Mask */ + +#define SCB_DCISW_SET_Pos 5U /*!< SCB DCISW: Set Position */ +#define SCB_DCISW_SET_Msk (0x1FFUL << SCB_DCISW_SET_Pos) /*!< SCB DCISW: Set Mask */ + +/* SCB D-Cache Clean by Set-way Register Definitions */ +#define SCB_DCCSW_WAY_Pos 30U /*!< SCB DCCSW: Way Position */ +#define SCB_DCCSW_WAY_Msk (3UL << SCB_DCCSW_WAY_Pos) /*!< SCB DCCSW: Way Mask */ + +#define SCB_DCCSW_SET_Pos 5U /*!< SCB DCCSW: Set Position */ +#define SCB_DCCSW_SET_Msk (0x1FFUL << SCB_DCCSW_SET_Pos) /*!< SCB DCCSW: Set Mask */ + +/* SCB D-Cache Clean and Invalidate by Set-way Register Definitions */ +#define SCB_DCCISW_WAY_Pos 30U /*!< SCB DCCISW: Way Position */ +#define SCB_DCCISW_WAY_Msk (3UL << SCB_DCCISW_WAY_Pos) /*!< SCB DCCISW: Way Mask */ + +#define SCB_DCCISW_SET_Pos 5U /*!< SCB DCCISW: Set Position */ +#define SCB_DCCISW_SET_Msk (0x1FFUL << SCB_DCCISW_SET_Pos) /*!< SCB DCCISW: Set Mask */ + +/* Instruction Tightly-Coupled Memory Control Register Definitions */ +#define SCB_ITCMCR_SZ_Pos 3U /*!< SCB ITCMCR: SZ Position */ +#define SCB_ITCMCR_SZ_Msk (0xFUL << SCB_ITCMCR_SZ_Pos) /*!< SCB ITCMCR: SZ Mask */ + +#define SCB_ITCMCR_RETEN_Pos 2U /*!< SCB ITCMCR: RETEN Position */ +#define SCB_ITCMCR_RETEN_Msk (1UL << SCB_ITCMCR_RETEN_Pos) /*!< SCB ITCMCR: RETEN Mask */ + +#define SCB_ITCMCR_RMW_Pos 1U /*!< SCB ITCMCR: RMW Position */ +#define SCB_ITCMCR_RMW_Msk (1UL << SCB_ITCMCR_RMW_Pos) /*!< SCB ITCMCR: RMW Mask */ + +#define SCB_ITCMCR_EN_Pos 0U /*!< SCB ITCMCR: EN Position */ +#define SCB_ITCMCR_EN_Msk (1UL /*<< SCB_ITCMCR_EN_Pos*/) /*!< SCB ITCMCR: EN Mask */ + +/* Data Tightly-Coupled Memory Control Register Definitions */ +#define SCB_DTCMCR_SZ_Pos 3U /*!< SCB DTCMCR: SZ Position */ +#define SCB_DTCMCR_SZ_Msk (0xFUL << SCB_DTCMCR_SZ_Pos) /*!< SCB DTCMCR: SZ Mask */ + +#define SCB_DTCMCR_RETEN_Pos 2U /*!< SCB DTCMCR: RETEN Position */ +#define SCB_DTCMCR_RETEN_Msk (1UL << SCB_DTCMCR_RETEN_Pos) /*!< SCB DTCMCR: RETEN Mask */ + +#define SCB_DTCMCR_RMW_Pos 1U /*!< SCB DTCMCR: RMW Position */ +#define SCB_DTCMCR_RMW_Msk (1UL << SCB_DTCMCR_RMW_Pos) /*!< SCB DTCMCR: RMW Mask */ + +#define SCB_DTCMCR_EN_Pos 0U /*!< SCB DTCMCR: EN Position */ +#define SCB_DTCMCR_EN_Msk (1UL /*<< SCB_DTCMCR_EN_Pos*/) /*!< SCB DTCMCR: EN Mask */ + +/* AHBP Control Register Definitions */ +#define SCB_AHBPCR_SZ_Pos 1U /*!< SCB AHBPCR: SZ Position */ +#define SCB_AHBPCR_SZ_Msk (7UL << SCB_AHBPCR_SZ_Pos) /*!< SCB AHBPCR: SZ Mask */ + +#define SCB_AHBPCR_EN_Pos 0U /*!< SCB AHBPCR: EN Position */ +#define SCB_AHBPCR_EN_Msk (1UL /*<< SCB_AHBPCR_EN_Pos*/) /*!< SCB AHBPCR: EN Mask */ + +/* L1 Cache Control Register Definitions */ +#define SCB_CACR_FORCEWT_Pos 2U /*!< SCB CACR: FORCEWT Position */ +#define SCB_CACR_FORCEWT_Msk (1UL << SCB_CACR_FORCEWT_Pos) /*!< SCB CACR: FORCEWT Mask */ + +#define SCB_CACR_ECCEN_Pos 1U /*!< SCB CACR: ECCEN Position */ +#define SCB_CACR_ECCEN_Msk (1UL << SCB_CACR_ECCEN_Pos) /*!< SCB CACR: ECCEN Mask */ + +#define SCB_CACR_SIWT_Pos 0U /*!< SCB CACR: SIWT Position */ +#define SCB_CACR_SIWT_Msk (1UL /*<< SCB_CACR_SIWT_Pos*/) /*!< SCB CACR: SIWT Mask */ + +/* AHBS Control Register Definitions */ +#define SCB_AHBSCR_INITCOUNT_Pos 11U /*!< SCB AHBSCR: INITCOUNT Position */ +#define SCB_AHBSCR_INITCOUNT_Msk (0x1FUL << SCB_AHBPCR_INITCOUNT_Pos) /*!< SCB AHBSCR: INITCOUNT Mask */ + +#define SCB_AHBSCR_TPRI_Pos 2U /*!< SCB AHBSCR: TPRI Position */ +#define SCB_AHBSCR_TPRI_Msk (0x1FFUL << SCB_AHBPCR_TPRI_Pos) /*!< SCB AHBSCR: TPRI Mask */ + +#define SCB_AHBSCR_CTL_Pos 0U /*!< SCB AHBSCR: CTL Position*/ +#define SCB_AHBSCR_CTL_Msk (3UL /*<< SCB_AHBPCR_CTL_Pos*/) /*!< SCB AHBSCR: CTL Mask */ + +/* Auxiliary Bus Fault Status Register Definitions */ +#define SCB_ABFSR_AXIMTYPE_Pos 8U /*!< SCB ABFSR: AXIMTYPE Position*/ +#define SCB_ABFSR_AXIMTYPE_Msk (3UL << SCB_ABFSR_AXIMTYPE_Pos) /*!< SCB ABFSR: AXIMTYPE Mask */ + +#define SCB_ABFSR_EPPB_Pos 4U /*!< SCB ABFSR: EPPB Position*/ +#define SCB_ABFSR_EPPB_Msk (1UL << SCB_ABFSR_EPPB_Pos) /*!< SCB ABFSR: EPPB Mask */ + +#define SCB_ABFSR_AXIM_Pos 3U /*!< SCB ABFSR: AXIM Position*/ +#define SCB_ABFSR_AXIM_Msk (1UL << SCB_ABFSR_AXIM_Pos) /*!< SCB ABFSR: AXIM Mask */ + +#define SCB_ABFSR_AHBP_Pos 2U /*!< SCB ABFSR: AHBP Position*/ +#define SCB_ABFSR_AHBP_Msk (1UL << SCB_ABFSR_AHBP_Pos) /*!< SCB ABFSR: AHBP Mask */ + +#define SCB_ABFSR_DTCM_Pos 1U /*!< SCB ABFSR: DTCM Position*/ +#define SCB_ABFSR_DTCM_Msk (1UL << SCB_ABFSR_DTCM_Pos) /*!< SCB ABFSR: DTCM Mask */ + +#define SCB_ABFSR_ITCM_Pos 0U /*!< SCB ABFSR: ITCM Position*/ +#define SCB_ABFSR_ITCM_Msk (1UL /*<< SCB_ABFSR_ITCM_Pos*/) /*!< SCB ABFSR: ITCM Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_DISDYNADD_Pos 26U /*!< ACTLR: DISDYNADD Position */ +#define SCnSCB_ACTLR_DISDYNADD_Msk (1UL << SCnSCB_ACTLR_DISDYNADD_Pos) /*!< ACTLR: DISDYNADD Mask */ + +#define SCnSCB_ACTLR_DISISSCH1_Pos 21U /*!< ACTLR: DISISSCH1 Position */ +#define SCnSCB_ACTLR_DISISSCH1_Msk (0x1FUL << SCnSCB_ACTLR_DISISSCH1_Pos) /*!< ACTLR: DISISSCH1 Mask */ + +#define SCnSCB_ACTLR_DISDI_Pos 16U /*!< ACTLR: DISDI Position */ +#define SCnSCB_ACTLR_DISDI_Msk (0x1FUL << SCnSCB_ACTLR_DISDI_Pos) /*!< ACTLR: DISDI Mask */ + +#define SCnSCB_ACTLR_DISCRITAXIRUR_Pos 15U /*!< ACTLR: DISCRITAXIRUR Position */ +#define SCnSCB_ACTLR_DISCRITAXIRUR_Msk (1UL << SCnSCB_ACTLR_DISCRITAXIRUR_Pos) /*!< ACTLR: DISCRITAXIRUR Mask */ + +#define SCnSCB_ACTLR_DISBTACALLOC_Pos 14U /*!< ACTLR: DISBTACALLOC Position */ +#define SCnSCB_ACTLR_DISBTACALLOC_Msk (1UL << SCnSCB_ACTLR_DISBTACALLOC_Pos) /*!< ACTLR: DISBTACALLOC Mask */ + +#define SCnSCB_ACTLR_DISBTACREAD_Pos 13U /*!< ACTLR: DISBTACREAD Position */ +#define SCnSCB_ACTLR_DISBTACREAD_Msk (1UL << SCnSCB_ACTLR_DISBTACREAD_Pos) /*!< ACTLR: DISBTACREAD Mask */ + +#define SCnSCB_ACTLR_DISITMATBFLUSH_Pos 12U /*!< ACTLR: DISITMATBFLUSH Position */ +#define SCnSCB_ACTLR_DISITMATBFLUSH_Msk (1UL << SCnSCB_ACTLR_DISITMATBFLUSH_Pos) /*!< ACTLR: DISITMATBFLUSH Mask */ + +#define SCnSCB_ACTLR_DISRAMODE_Pos 11U /*!< ACTLR: DISRAMODE Position */ +#define SCnSCB_ACTLR_DISRAMODE_Msk (1UL << SCnSCB_ACTLR_DISRAMODE_Pos) /*!< ACTLR: DISRAMODE Mask */ + +#define SCnSCB_ACTLR_FPEXCODIS_Pos 10U /*!< ACTLR: FPEXCODIS Position */ +#define SCnSCB_ACTLR_FPEXCODIS_Msk (1UL << SCnSCB_ACTLR_FPEXCODIS_Pos) /*!< ACTLR: FPEXCODIS Mask */ + +#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ +#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ + +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[32U]; + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[6U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFFFFFFFFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ +#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED0[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ + uint32_t RESERVED3[981U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( W) Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R ) Lock Status Register */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Mask Register Definitions */ +#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ +#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ +#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ + +#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ +#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ +#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ + +#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ +#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ + +#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ +#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ + +#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ +#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ + +#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ +#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x1UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x1UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ +#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ + +#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ +#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x1UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x1UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ +#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ + +#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ +#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ + __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ + __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ + __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ +} MPU_Type; + +#define MPU_TYPE_RALIASES 4U + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif /* defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_FPU Floating Point Unit (FPU) + \brief Type definitions for the Floating Point Unit (FPU) + @{ + */ + +/** + \brief Structure type to access the Floating Point Unit (FPU). + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IOM uint32_t FPCCR; /*!< Offset: 0x004 (R/W) Floating-Point Context Control Register */ + __IOM uint32_t FPCAR; /*!< Offset: 0x008 (R/W) Floating-Point Context Address Register */ + __IOM uint32_t FPDSCR; /*!< Offset: 0x00C (R/W) Floating-Point Default Status Control Register */ + __IM uint32_t MVFR0; /*!< Offset: 0x010 (R/ ) Media and FP Feature Register 0 */ + __IM uint32_t MVFR1; /*!< Offset: 0x014 (R/ ) Media and FP Feature Register 1 */ + __IM uint32_t MVFR2; /*!< Offset: 0x018 (R/ ) Media and FP Feature Register 2 */ +} FPU_Type; + +/* Floating-Point Context Control Register Definitions */ +#define FPU_FPCCR_ASPEN_Pos 31U /*!< FPCCR: ASPEN bit Position */ +#define FPU_FPCCR_ASPEN_Msk (1UL << FPU_FPCCR_ASPEN_Pos) /*!< FPCCR: ASPEN bit Mask */ + +#define FPU_FPCCR_LSPEN_Pos 30U /*!< FPCCR: LSPEN Position */ +#define FPU_FPCCR_LSPEN_Msk (1UL << FPU_FPCCR_LSPEN_Pos) /*!< FPCCR: LSPEN bit Mask */ + +#define FPU_FPCCR_MONRDY_Pos 8U /*!< FPCCR: MONRDY Position */ +#define FPU_FPCCR_MONRDY_Msk (1UL << FPU_FPCCR_MONRDY_Pos) /*!< FPCCR: MONRDY bit Mask */ + +#define FPU_FPCCR_BFRDY_Pos 6U /*!< FPCCR: BFRDY Position */ +#define FPU_FPCCR_BFRDY_Msk (1UL << FPU_FPCCR_BFRDY_Pos) /*!< FPCCR: BFRDY bit Mask */ + +#define FPU_FPCCR_MMRDY_Pos 5U /*!< FPCCR: MMRDY Position */ +#define FPU_FPCCR_MMRDY_Msk (1UL << FPU_FPCCR_MMRDY_Pos) /*!< FPCCR: MMRDY bit Mask */ + +#define FPU_FPCCR_HFRDY_Pos 4U /*!< FPCCR: HFRDY Position */ +#define FPU_FPCCR_HFRDY_Msk (1UL << FPU_FPCCR_HFRDY_Pos) /*!< FPCCR: HFRDY bit Mask */ + +#define FPU_FPCCR_THREAD_Pos 3U /*!< FPCCR: processor mode bit Position */ +#define FPU_FPCCR_THREAD_Msk (1UL << FPU_FPCCR_THREAD_Pos) /*!< FPCCR: processor mode active bit Mask */ + +#define FPU_FPCCR_USER_Pos 1U /*!< FPCCR: privilege level bit Position */ +#define FPU_FPCCR_USER_Msk (1UL << FPU_FPCCR_USER_Pos) /*!< FPCCR: privilege level bit Mask */ + +#define FPU_FPCCR_LSPACT_Pos 0U /*!< FPCCR: Lazy state preservation active bit Position */ +#define FPU_FPCCR_LSPACT_Msk (1UL /*<< FPU_FPCCR_LSPACT_Pos*/) /*!< FPCCR: Lazy state preservation active bit Mask */ + +/* Floating-Point Context Address Register Definitions */ +#define FPU_FPCAR_ADDRESS_Pos 3U /*!< FPCAR: ADDRESS bit Position */ +#define FPU_FPCAR_ADDRESS_Msk (0x1FFFFFFFUL << FPU_FPCAR_ADDRESS_Pos) /*!< FPCAR: ADDRESS bit Mask */ + +/* Floating-Point Default Status Control Register Definitions */ +#define FPU_FPDSCR_AHP_Pos 26U /*!< FPDSCR: AHP bit Position */ +#define FPU_FPDSCR_AHP_Msk (1UL << FPU_FPDSCR_AHP_Pos) /*!< FPDSCR: AHP bit Mask */ + +#define FPU_FPDSCR_DN_Pos 25U /*!< FPDSCR: DN bit Position */ +#define FPU_FPDSCR_DN_Msk (1UL << FPU_FPDSCR_DN_Pos) /*!< FPDSCR: DN bit Mask */ + +#define FPU_FPDSCR_FZ_Pos 24U /*!< FPDSCR: FZ bit Position */ +#define FPU_FPDSCR_FZ_Msk (1UL << FPU_FPDSCR_FZ_Pos) /*!< FPDSCR: FZ bit Mask */ + +#define FPU_FPDSCR_RMode_Pos 22U /*!< FPDSCR: RMode bit Position */ +#define FPU_FPDSCR_RMode_Msk (3UL << FPU_FPDSCR_RMode_Pos) /*!< FPDSCR: RMode bit Mask */ + +/* Media and FP Feature Register 0 Definitions */ +#define FPU_MVFR0_FP_rounding_modes_Pos 28U /*!< MVFR0: FP rounding modes bits Position */ +#define FPU_MVFR0_FP_rounding_modes_Msk (0xFUL << FPU_MVFR0_FP_rounding_modes_Pos) /*!< MVFR0: FP rounding modes bits Mask */ + +#define FPU_MVFR0_Short_vectors_Pos 24U /*!< MVFR0: Short vectors bits Position */ +#define FPU_MVFR0_Short_vectors_Msk (0xFUL << FPU_MVFR0_Short_vectors_Pos) /*!< MVFR0: Short vectors bits Mask */ + +#define FPU_MVFR0_Square_root_Pos 20U /*!< MVFR0: Square root bits Position */ +#define FPU_MVFR0_Square_root_Msk (0xFUL << FPU_MVFR0_Square_root_Pos) /*!< MVFR0: Square root bits Mask */ + +#define FPU_MVFR0_Divide_Pos 16U /*!< MVFR0: Divide bits Position */ +#define FPU_MVFR0_Divide_Msk (0xFUL << FPU_MVFR0_Divide_Pos) /*!< MVFR0: Divide bits Mask */ + +#define FPU_MVFR0_FP_excep_trapping_Pos 12U /*!< MVFR0: FP exception trapping bits Position */ +#define FPU_MVFR0_FP_excep_trapping_Msk (0xFUL << FPU_MVFR0_FP_excep_trapping_Pos) /*!< MVFR0: FP exception trapping bits Mask */ + +#define FPU_MVFR0_Double_precision_Pos 8U /*!< MVFR0: Double-precision bits Position */ +#define FPU_MVFR0_Double_precision_Msk (0xFUL << FPU_MVFR0_Double_precision_Pos) /*!< MVFR0: Double-precision bits Mask */ + +#define FPU_MVFR0_Single_precision_Pos 4U /*!< MVFR0: Single-precision bits Position */ +#define FPU_MVFR0_Single_precision_Msk (0xFUL << FPU_MVFR0_Single_precision_Pos) /*!< MVFR0: Single-precision bits Mask */ + +#define FPU_MVFR0_A_SIMD_registers_Pos 0U /*!< MVFR0: A_SIMD registers bits Position */ +#define FPU_MVFR0_A_SIMD_registers_Msk (0xFUL /*<< FPU_MVFR0_A_SIMD_registers_Pos*/) /*!< MVFR0: A_SIMD registers bits Mask */ + +/* Media and FP Feature Register 1 Definitions */ +#define FPU_MVFR1_FP_fused_MAC_Pos 28U /*!< MVFR1: FP fused MAC bits Position */ +#define FPU_MVFR1_FP_fused_MAC_Msk (0xFUL << FPU_MVFR1_FP_fused_MAC_Pos) /*!< MVFR1: FP fused MAC bits Mask */ + +#define FPU_MVFR1_FP_HPFP_Pos 24U /*!< MVFR1: FP HPFP bits Position */ +#define FPU_MVFR1_FP_HPFP_Msk (0xFUL << FPU_MVFR1_FP_HPFP_Pos) /*!< MVFR1: FP HPFP bits Mask */ + +#define FPU_MVFR1_D_NaN_mode_Pos 4U /*!< MVFR1: D_NaN mode bits Position */ +#define FPU_MVFR1_D_NaN_mode_Msk (0xFUL << FPU_MVFR1_D_NaN_mode_Pos) /*!< MVFR1: D_NaN mode bits Mask */ + +#define FPU_MVFR1_FtZ_mode_Pos 0U /*!< MVFR1: FtZ mode bits Position */ +#define FPU_MVFR1_FtZ_mode_Msk (0xFUL /*<< FPU_MVFR1_FtZ_mode_Pos*/) /*!< MVFR1: FtZ mode bits Mask */ + +/* Media and FP Feature Register 2 Definitions */ + +#define FPU_MVFR2_VFP_Misc_Pos 4U /*!< MVFR2: VFP Misc bits Position */ +#define FPU_MVFR2_VFP_Misc_Msk (0xFUL << FPU_MVFR2_VFP_Misc_Pos) /*!< MVFR2: VFP Misc bits Mask */ + +/*@} end of group CMSIS_FPU */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ +#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ +#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ +#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ +#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ +#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ +#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ +#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +#define FPU_BASE (SCS_BASE + 0x0F30UL) /*!< Floating Point Unit */ +#define FPU ((FPU_Type *) FPU_BASE ) /*!< Floating Point Unit */ + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ +#define EXC_RETURN_HANDLER_FPU (0xFFFFFFE1UL) /* return to Handler mode, uses MSP after return, restore floating-point state */ +#define EXC_RETURN_THREAD_MSP_FPU (0xFFFFFFE9UL) /* return to Thread mode, uses MSP after return, restore floating-point state */ +#define EXC_RETURN_THREAD_PSP_FPU (0xFFFFFFEDUL) /* return to Thread mode, uses PSP after return, restore floating-point state */ + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t vectors = (uint32_t )SCB->VTOR; + (* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector; + __DSB(); +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t vectors = (uint32_t )SCB->VTOR; + return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)); +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## MPU functions #################################### */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + +#include "mpu_armv7.h" + +#endif + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + uint32_t mvfr0; + + mvfr0 = SCB->MVFR0; + if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x220U) + { + return 2U; /* Double + Single precision FPU */ + } + else if ((mvfr0 & (FPU_MVFR0_Single_precision_Msk | FPU_MVFR0_Double_precision_Msk)) == 0x020U) + { + return 1U; /* Single precision FPU */ + } + else + { + return 0U; /* No FPU */ + } +} + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ########################## Cache functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_CacheFunctions Cache Functions + \brief Functions that configure Instruction and Data cache. + @{ + */ + +/* Cache Size ID Register Macros */ +#define CCSIDR_WAYS(x) (((x) & SCB_CCSIDR_ASSOCIATIVITY_Msk) >> SCB_CCSIDR_ASSOCIATIVITY_Pos) +#define CCSIDR_SETS(x) (((x) & SCB_CCSIDR_NUMSETS_Msk ) >> SCB_CCSIDR_NUMSETS_Pos ) + +#define __SCB_DCACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */ +#define __SCB_ICACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */ + +/** + \brief Enable I-Cache + \details Turns on I-Cache + */ +__STATIC_FORCEINLINE void SCB_EnableICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ + + __DSB(); + __ISB(); + SCB->ICIALLU = 0UL; /* invalidate I-Cache */ + __DSB(); + __ISB(); + SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Disable I-Cache + \details Turns off I-Cache + */ +__STATIC_FORCEINLINE void SCB_DisableICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + __DSB(); + __ISB(); + SCB->CCR &= ~(uint32_t)SCB_CCR_IC_Msk; /* disable I-Cache */ + SCB->ICIALLU = 0UL; /* invalidate I-Cache */ + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Invalidate I-Cache + \details Invalidates I-Cache + */ +__STATIC_FORCEINLINE void SCB_InvalidateICache (void) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + __DSB(); + __ISB(); + SCB->ICIALLU = 0UL; + __DSB(); + __ISB(); + #endif +} + + +/** + \brief I-Cache Invalidate by address + \details Invalidates I-Cache for the given address. + I-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity. + I-Cache memory blocks which are part of given address + given size are invalidated. + \param[in] addr address + \param[in] isize size of memory block (in number of bytes) +*/ +__STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (void *addr, int32_t isize) +{ + #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) + if ( isize > 0 ) { + int32_t op_size = isize + (((uint32_t)addr) & (__SCB_ICACHE_LINE_SIZE - 1U)); + uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_ICACHE_LINE_SIZE - 1U) */; + + __DSB(); + + do { + SCB->ICIMVAU = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ + op_addr += __SCB_ICACHE_LINE_SIZE; + op_size -= __SCB_ICACHE_LINE_SIZE; + } while ( op_size > 0 ); + + __DSB(); + __ISB(); + } + #endif +} + + +/** + \brief Enable D-Cache + \details Turns on D-Cache + */ +__STATIC_FORCEINLINE void SCB_EnableDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | + ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + __DSB(); + + SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Disable D-Cache + \details Turns off D-Cache + */ +__STATIC_FORCEINLINE void SCB_DisableDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + SCB->CCR &= ~(uint32_t)SCB_CCR_DC_Msk; /* disable D-Cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean & invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) | + ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Invalidate D-Cache + \details Invalidates D-Cache + */ +__STATIC_FORCEINLINE void SCB_InvalidateDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | + ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Clean D-Cache + \details Cleans D-Cache + */ +__STATIC_FORCEINLINE void SCB_CleanDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCSW = (((sets << SCB_DCCSW_SET_Pos) & SCB_DCCSW_SET_Msk) | + ((ways << SCB_DCCSW_WAY_Pos) & SCB_DCCSW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief Clean & Invalidate D-Cache + \details Cleans and Invalidates D-Cache + */ +__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + uint32_t ccsidr; + uint32_t sets; + uint32_t ways; + + SCB->CSSELR = 0U; /* select Level 1 data cache */ + __DSB(); + + ccsidr = SCB->CCSIDR; + + /* clean & invalidate D-Cache */ + sets = (uint32_t)(CCSIDR_SETS(ccsidr)); + do { + ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); + do { + SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) | + ((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) ); + #if defined ( __CC_ARM ) + __schedule_barrier(); + #endif + } while (ways-- != 0U); + } while(sets-- != 0U); + + __DSB(); + __ISB(); + #endif +} + + +/** + \brief D-Cache Invalidate by address + \details Invalidates D-Cache for the given address. + D-Cache is invalidated starting from a 32 byte aligned address in 32 byte granularity. + D-Cache memory blocks which are part of given address + given size are invalidated. + \param[in] addr address + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (void *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + if ( dsize > 0 ) { + int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); + uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; + + __DSB(); + + do { + SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ + op_addr += __SCB_DCACHE_LINE_SIZE; + op_size -= __SCB_DCACHE_LINE_SIZE; + } while ( op_size > 0 ); + + __DSB(); + __ISB(); + } + #endif +} + + +/** + \brief D-Cache Clean by address + \details Cleans D-Cache for the given address + D-Cache is cleaned starting from a 32 byte aligned address in 32 byte granularity. + D-Cache memory blocks which are part of given address + given size are cleaned. + \param[in] addr address + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (uint32_t *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + if ( dsize > 0 ) { + int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); + uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; + + __DSB(); + + do { + SCB->DCCMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ + op_addr += __SCB_DCACHE_LINE_SIZE; + op_size -= __SCB_DCACHE_LINE_SIZE; + } while ( op_size > 0 ); + + __DSB(); + __ISB(); + } + #endif +} + + +/** + \brief D-Cache Clean and Invalidate by address + \details Cleans and invalidates D_Cache for the given address + D-Cache is cleaned and invalidated starting from a 32 byte aligned address in 32 byte granularity. + D-Cache memory blocks which are part of given address + given size are cleaned and invalidated. + \param[in] addr address (aligned to 32-byte boundary) + \param[in] dsize size of memory block (in number of bytes) +*/ +__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t *addr, int32_t dsize) +{ + #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) + if ( dsize > 0 ) { + int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); + uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; + + __DSB(); + + do { + SCB->DCCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ + op_addr += __SCB_DCACHE_LINE_SIZE; + op_size -= __SCB_DCACHE_LINE_SIZE; + } while ( op_size > 0 ); + + __DSB(); + __ISB(); + } + #endif +} + +/*@} end of CMSIS_Core_CacheFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \param [in] ch Character to transmit. + \returns Character to transmit. + */ +__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) +{ + if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_CM7_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_sc000.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_sc000.h new file mode 100644 index 0000000..cf92577 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_sc000.h @@ -0,0 +1,1025 @@ +/**************************************************************************//** + * @file core_sc000.h + * @brief CMSIS SC000 Core Peripheral Access Layer Header File + * @version V5.0.6 + * @date 12. November 2018 + ******************************************************************************/ +/* + * Copyright (c) 2009-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_SC000_H_GENERIC +#define __CORE_SC000_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup SC000 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS SC000 definitions */ +#define __SC000_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __SC000_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __SC000_CMSIS_VERSION ((__SC000_CMSIS_VERSION_MAIN << 16U) | \ + __SC000_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_SC (000U) /*!< Cortex secure core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_SC000_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_SC000_H_DEPENDANT +#define __CORE_SC000_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __SC000_REV + #define __SC000_REV 0x0000U + #warning "__SC000_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 2U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group SC000 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:28; /*!< bit: 0..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:15; /*!< bit: 9..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit (read 0) */ + uint32_t _reserved1:3; /*!< bit: 25..27 Reserved */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t _reserved0:1; /*!< bit: 0 Reserved */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[1U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[31U]; + __IOM uint32_t ICER[1U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RSERVED1[31U]; + __IOM uint32_t ISPR[1U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[31U]; + __IOM uint32_t ICPR[1U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[31U]; + uint32_t RESERVED4[64U]; + __IOM uint32_t IP[8U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register */ +} NVIC_Type; + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + uint32_t RESERVED0[1U]; + __IOM uint32_t SHP[2U]; /*!< Offset: 0x01C (R/W) System Handlers Priority Registers. [0] is RESERVED */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + uint32_t RESERVED1[154U]; + __IOM uint32_t SFCR; /*!< Offset: 0x290 (R/W) Security Features Control Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x1FFFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ +} MPU_Type; + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 8U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0xFFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief SC000 Core Debug Registers (DCB registers, SHCSR, and DFSR) are only accessible over DAP and not via processor. + Therefore they are not covered by the SC000 header file. + @{ + */ +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else +/*#define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping not available for SC000 */ +/*#define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping not available for SC000 */ + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ +/*#define NVIC_GetActive __NVIC_GetActive not available for SC000 */ + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/* Interrupt Priorities are WORD accessible only under Armv6-M */ +/* The following MACROS handle generation of the register offset and byte masks */ +#define _BIT_SHIFT(IRQn) ( ((((uint32_t)(int32_t)(IRQn)) ) & 0x03UL) * 8UL) +#define _SHP_IDX(IRQn) ( (((((uint32_t)(int32_t)(IRQn)) & 0x0FUL)-8UL) >> 2UL) ) +#define _IP_IDX(IRQn) ( (((uint32_t)(int32_t)(IRQn)) >> 2UL) ) + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[0U] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[0U] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[_IP_IDX(IRQn)] = ((uint32_t)(NVIC->IP[_IP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } + else + { + SCB->SHP[_SHP_IDX(IRQn)] = ((uint32_t)(SCB->SHP[_SHP_IDX(IRQn)] & ~(0xFFUL << _BIT_SHIFT(IRQn))) | + (((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn))); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return((uint32_t)(((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) & (uint32_t)0xFFUL) >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector; + /* ARM Application Note 321 states that the M0 and M0+ do not require the architectural barrier - assume SC000 is the same */ +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t *vectors = (uint32_t *)SCB->VTOR; + return vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET]; +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + SCB_AIRCR_SYSRESETREQ_Msk); + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_SC000_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_sc300.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_sc300.h new file mode 100644 index 0000000..40f3af8 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/core_sc300.h @@ -0,0 +1,1912 @@ +/**************************************************************************//** + * @file core_sc300.h + * @brief CMSIS SC300 Core Peripheral Access Layer Header File + * @version V5.0.8 + * @date 31. May 2019 + ******************************************************************************/ +/* + * Copyright (c) 2009-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef __CORE_SC300_H_GENERIC +#define __CORE_SC300_H_GENERIC + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +/** + \page CMSIS_MISRA_Exceptions MISRA-C:2004 Compliance Exceptions + CMSIS violates the following MISRA-C:2004 rules: + + \li Required Rule 8.5, object/function definition in header file.
+ Function definitions in header files are used to allow 'inlining'. + + \li Required Rule 18.4, declaration of union type or object of union type: '{...}'.
+ Unions are used for effective representation of core registers. + + \li Advisory Rule 19.7, Function-like macro defined.
+ Function-like macros are used to allow more efficient code. + */ + + +/******************************************************************************* + * CMSIS definitions + ******************************************************************************/ +/** + \ingroup SC3000 + @{ + */ + +#include "cmsis_version.h" + +/* CMSIS SC300 definitions */ +#define __SC300_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ +#define __SC300_CMSIS_VERSION_SUB (__CM_CMSIS_VERSION_SUB) /*!< \deprecated [15:0] CMSIS HAL sub version */ +#define __SC300_CMSIS_VERSION ((__SC300_CMSIS_VERSION_MAIN << 16U) | \ + __SC300_CMSIS_VERSION_SUB ) /*!< \deprecated CMSIS HAL version number */ + +#define __CORTEX_SC (300U) /*!< Cortex secure core */ + +/** __FPU_USED indicates whether an FPU is used or not. + This core does not support an FPU at all +*/ +#define __FPU_USED 0U + +#if defined ( __CC_ARM ) + #if defined __TARGET_FPU_VFP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) + #if defined __ARM_FP + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __GNUC__ ) + #if defined (__VFP_FP__) && !defined(__SOFTFP__) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __ICCARM__ ) + #if defined __ARMVFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TI_ARM__ ) + #if defined __TI_VFP_SUPPORT__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __TASKING__ ) + #if defined __FPU_VFP__ + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#elif defined ( __CSMC__ ) + #if ( __CSMC__ & 0x400U) + #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" + #endif + +#endif + +#include "cmsis_compiler.h" /* CMSIS compiler specific defines */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_SC300_H_GENERIC */ + +#ifndef __CMSIS_GENERIC + +#ifndef __CORE_SC300_H_DEPENDANT +#define __CORE_SC300_H_DEPENDANT + +#ifdef __cplusplus + extern "C" { +#endif + +/* check device defines and use defaults */ +#if defined __CHECK_DEVICE_DEFINES + #ifndef __SC300_REV + #define __SC300_REV 0x0000U + #warning "__SC300_REV not defined in device header file; using default!" + #endif + + #ifndef __MPU_PRESENT + #define __MPU_PRESENT 0U + #warning "__MPU_PRESENT not defined in device header file; using default!" + #endif + + #ifndef __NVIC_PRIO_BITS + #define __NVIC_PRIO_BITS 3U + #warning "__NVIC_PRIO_BITS not defined in device header file; using default!" + #endif + + #ifndef __Vendor_SysTickConfig + #define __Vendor_SysTickConfig 0U + #warning "__Vendor_SysTickConfig not defined in device header file; using default!" + #endif +#endif + +/* IO definitions (access restrictions to peripheral registers) */ +/** + \defgroup CMSIS_glob_defs CMSIS Global Defines + + IO Type Qualifiers are used + \li to specify the access to peripheral variables. + \li for automatic generation of peripheral register debug information. +*/ +#ifdef __cplusplus + #define __I volatile /*!< Defines 'read only' permissions */ +#else + #define __I volatile const /*!< Defines 'read only' permissions */ +#endif +#define __O volatile /*!< Defines 'write only' permissions */ +#define __IO volatile /*!< Defines 'read / write' permissions */ + +/* following defines should be used for structure members */ +#define __IM volatile const /*! Defines 'read only' structure member permissions */ +#define __OM volatile /*! Defines 'write only' structure member permissions */ +#define __IOM volatile /*! Defines 'read / write' structure member permissions */ + +/*@} end of group SC300 */ + + + +/******************************************************************************* + * Register Abstraction + Core Register contain: + - Core Register + - Core NVIC Register + - Core SCB Register + - Core SysTick Register + - Core Debug Register + - Core MPU Register + ******************************************************************************/ +/** + \defgroup CMSIS_core_register Defines and Type Definitions + \brief Type definitions and defines for Cortex-M processor based devices. +*/ + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CORE Status and Control Registers + \brief Core Register type definitions. + @{ + */ + +/** + \brief Union type to access the Application Program Status Register (APSR). + */ +typedef union +{ + struct + { + uint32_t _reserved0:27; /*!< bit: 0..26 Reserved */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} APSR_Type; + +/* APSR Register Definitions */ +#define APSR_N_Pos 31U /*!< APSR: N Position */ +#define APSR_N_Msk (1UL << APSR_N_Pos) /*!< APSR: N Mask */ + +#define APSR_Z_Pos 30U /*!< APSR: Z Position */ +#define APSR_Z_Msk (1UL << APSR_Z_Pos) /*!< APSR: Z Mask */ + +#define APSR_C_Pos 29U /*!< APSR: C Position */ +#define APSR_C_Msk (1UL << APSR_C_Pos) /*!< APSR: C Mask */ + +#define APSR_V_Pos 28U /*!< APSR: V Position */ +#define APSR_V_Msk (1UL << APSR_V_Pos) /*!< APSR: V Mask */ + +#define APSR_Q_Pos 27U /*!< APSR: Q Position */ +#define APSR_Q_Msk (1UL << APSR_Q_Pos) /*!< APSR: Q Mask */ + + +/** + \brief Union type to access the Interrupt Program Status Register (IPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:23; /*!< bit: 9..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} IPSR_Type; + +/* IPSR Register Definitions */ +#define IPSR_ISR_Pos 0U /*!< IPSR: ISR Position */ +#define IPSR_ISR_Msk (0x1FFUL /*<< IPSR_ISR_Pos*/) /*!< IPSR: ISR Mask */ + + +/** + \brief Union type to access the Special-Purpose Program Status Registers (xPSR). + */ +typedef union +{ + struct + { + uint32_t ISR:9; /*!< bit: 0.. 8 Exception number */ + uint32_t _reserved0:1; /*!< bit: 9 Reserved */ + uint32_t ICI_IT_1:6; /*!< bit: 10..15 ICI/IT part 1 */ + uint32_t _reserved1:8; /*!< bit: 16..23 Reserved */ + uint32_t T:1; /*!< bit: 24 Thumb bit */ + uint32_t ICI_IT_2:2; /*!< bit: 25..26 ICI/IT part 2 */ + uint32_t Q:1; /*!< bit: 27 Saturation condition flag */ + uint32_t V:1; /*!< bit: 28 Overflow condition code flag */ + uint32_t C:1; /*!< bit: 29 Carry condition code flag */ + uint32_t Z:1; /*!< bit: 30 Zero condition code flag */ + uint32_t N:1; /*!< bit: 31 Negative condition code flag */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} xPSR_Type; + +/* xPSR Register Definitions */ +#define xPSR_N_Pos 31U /*!< xPSR: N Position */ +#define xPSR_N_Msk (1UL << xPSR_N_Pos) /*!< xPSR: N Mask */ + +#define xPSR_Z_Pos 30U /*!< xPSR: Z Position */ +#define xPSR_Z_Msk (1UL << xPSR_Z_Pos) /*!< xPSR: Z Mask */ + +#define xPSR_C_Pos 29U /*!< xPSR: C Position */ +#define xPSR_C_Msk (1UL << xPSR_C_Pos) /*!< xPSR: C Mask */ + +#define xPSR_V_Pos 28U /*!< xPSR: V Position */ +#define xPSR_V_Msk (1UL << xPSR_V_Pos) /*!< xPSR: V Mask */ + +#define xPSR_Q_Pos 27U /*!< xPSR: Q Position */ +#define xPSR_Q_Msk (1UL << xPSR_Q_Pos) /*!< xPSR: Q Mask */ + +#define xPSR_ICI_IT_2_Pos 25U /*!< xPSR: ICI/IT part 2 Position */ +#define xPSR_ICI_IT_2_Msk (3UL << xPSR_ICI_IT_2_Pos) /*!< xPSR: ICI/IT part 2 Mask */ + +#define xPSR_T_Pos 24U /*!< xPSR: T Position */ +#define xPSR_T_Msk (1UL << xPSR_T_Pos) /*!< xPSR: T Mask */ + +#define xPSR_ICI_IT_1_Pos 10U /*!< xPSR: ICI/IT part 1 Position */ +#define xPSR_ICI_IT_1_Msk (0x3FUL << xPSR_ICI_IT_1_Pos) /*!< xPSR: ICI/IT part 1 Mask */ + +#define xPSR_ISR_Pos 0U /*!< xPSR: ISR Position */ +#define xPSR_ISR_Msk (0x1FFUL /*<< xPSR_ISR_Pos*/) /*!< xPSR: ISR Mask */ + + +/** + \brief Union type to access the Control Registers (CONTROL). + */ +typedef union +{ + struct + { + uint32_t nPRIV:1; /*!< bit: 0 Execution privilege in Thread mode */ + uint32_t SPSEL:1; /*!< bit: 1 Stack to be used */ + uint32_t _reserved1:30; /*!< bit: 2..31 Reserved */ + } b; /*!< Structure used for bit access */ + uint32_t w; /*!< Type used for word access */ +} CONTROL_Type; + +/* CONTROL Register Definitions */ +#define CONTROL_SPSEL_Pos 1U /*!< CONTROL: SPSEL Position */ +#define CONTROL_SPSEL_Msk (1UL << CONTROL_SPSEL_Pos) /*!< CONTROL: SPSEL Mask */ + +#define CONTROL_nPRIV_Pos 0U /*!< CONTROL: nPRIV Position */ +#define CONTROL_nPRIV_Msk (1UL /*<< CONTROL_nPRIV_Pos*/) /*!< CONTROL: nPRIV Mask */ + +/*@} end of group CMSIS_CORE */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC) + \brief Type definitions for the NVIC Registers + @{ + */ + +/** + \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC). + */ +typedef struct +{ + __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */ + uint32_t RESERVED0[24U]; + __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */ + uint32_t RESERVED1[24U]; + __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */ + uint32_t RESERVED2[24U]; + __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */ + uint32_t RESERVED3[24U]; + __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */ + uint32_t RESERVED4[56U]; + __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */ + uint32_t RESERVED5[644U]; + __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */ +} NVIC_Type; + +/* Software Triggered Interrupt Register Definitions */ +#define NVIC_STIR_INTID_Pos 0U /*!< STIR: INTLINESNUM Position */ +#define NVIC_STIR_INTID_Msk (0x1FFUL /*<< NVIC_STIR_INTID_Pos*/) /*!< STIR: INTLINESNUM Mask */ + +/*@} end of group CMSIS_NVIC */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCB System Control Block (SCB) + \brief Type definitions for the System Control Block Registers + @{ + */ + +/** + \brief Structure type to access the System Control Block (SCB). + */ +typedef struct +{ + __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */ + __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */ + __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */ + __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */ + __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */ + __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */ + __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */ + __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */ + __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */ + __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */ + __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */ + __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */ + __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */ + __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */ + __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */ + __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */ + __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */ + __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */ + __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */ + uint32_t RESERVED0[5U]; + __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */ + uint32_t RESERVED1[129U]; + __IOM uint32_t SFCR; /*!< Offset: 0x290 (R/W) Security Features Control Register */ +} SCB_Type; + +/* SCB CPUID Register Definitions */ +#define SCB_CPUID_IMPLEMENTER_Pos 24U /*!< SCB CPUID: IMPLEMENTER Position */ +#define SCB_CPUID_IMPLEMENTER_Msk (0xFFUL << SCB_CPUID_IMPLEMENTER_Pos) /*!< SCB CPUID: IMPLEMENTER Mask */ + +#define SCB_CPUID_VARIANT_Pos 20U /*!< SCB CPUID: VARIANT Position */ +#define SCB_CPUID_VARIANT_Msk (0xFUL << SCB_CPUID_VARIANT_Pos) /*!< SCB CPUID: VARIANT Mask */ + +#define SCB_CPUID_ARCHITECTURE_Pos 16U /*!< SCB CPUID: ARCHITECTURE Position */ +#define SCB_CPUID_ARCHITECTURE_Msk (0xFUL << SCB_CPUID_ARCHITECTURE_Pos) /*!< SCB CPUID: ARCHITECTURE Mask */ + +#define SCB_CPUID_PARTNO_Pos 4U /*!< SCB CPUID: PARTNO Position */ +#define SCB_CPUID_PARTNO_Msk (0xFFFUL << SCB_CPUID_PARTNO_Pos) /*!< SCB CPUID: PARTNO Mask */ + +#define SCB_CPUID_REVISION_Pos 0U /*!< SCB CPUID: REVISION Position */ +#define SCB_CPUID_REVISION_Msk (0xFUL /*<< SCB_CPUID_REVISION_Pos*/) /*!< SCB CPUID: REVISION Mask */ + +/* SCB Interrupt Control State Register Definitions */ +#define SCB_ICSR_NMIPENDSET_Pos 31U /*!< SCB ICSR: NMIPENDSET Position */ +#define SCB_ICSR_NMIPENDSET_Msk (1UL << SCB_ICSR_NMIPENDSET_Pos) /*!< SCB ICSR: NMIPENDSET Mask */ + +#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */ +#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */ + +#define SCB_ICSR_PENDSVCLR_Pos 27U /*!< SCB ICSR: PENDSVCLR Position */ +#define SCB_ICSR_PENDSVCLR_Msk (1UL << SCB_ICSR_PENDSVCLR_Pos) /*!< SCB ICSR: PENDSVCLR Mask */ + +#define SCB_ICSR_PENDSTSET_Pos 26U /*!< SCB ICSR: PENDSTSET Position */ +#define SCB_ICSR_PENDSTSET_Msk (1UL << SCB_ICSR_PENDSTSET_Pos) /*!< SCB ICSR: PENDSTSET Mask */ + +#define SCB_ICSR_PENDSTCLR_Pos 25U /*!< SCB ICSR: PENDSTCLR Position */ +#define SCB_ICSR_PENDSTCLR_Msk (1UL << SCB_ICSR_PENDSTCLR_Pos) /*!< SCB ICSR: PENDSTCLR Mask */ + +#define SCB_ICSR_ISRPREEMPT_Pos 23U /*!< SCB ICSR: ISRPREEMPT Position */ +#define SCB_ICSR_ISRPREEMPT_Msk (1UL << SCB_ICSR_ISRPREEMPT_Pos) /*!< SCB ICSR: ISRPREEMPT Mask */ + +#define SCB_ICSR_ISRPENDING_Pos 22U /*!< SCB ICSR: ISRPENDING Position */ +#define SCB_ICSR_ISRPENDING_Msk (1UL << SCB_ICSR_ISRPENDING_Pos) /*!< SCB ICSR: ISRPENDING Mask */ + +#define SCB_ICSR_VECTPENDING_Pos 12U /*!< SCB ICSR: VECTPENDING Position */ +#define SCB_ICSR_VECTPENDING_Msk (0x1FFUL << SCB_ICSR_VECTPENDING_Pos) /*!< SCB ICSR: VECTPENDING Mask */ + +#define SCB_ICSR_RETTOBASE_Pos 11U /*!< SCB ICSR: RETTOBASE Position */ +#define SCB_ICSR_RETTOBASE_Msk (1UL << SCB_ICSR_RETTOBASE_Pos) /*!< SCB ICSR: RETTOBASE Mask */ + +#define SCB_ICSR_VECTACTIVE_Pos 0U /*!< SCB ICSR: VECTACTIVE Position */ +#define SCB_ICSR_VECTACTIVE_Msk (0x1FFUL /*<< SCB_ICSR_VECTACTIVE_Pos*/) /*!< SCB ICSR: VECTACTIVE Mask */ + +/* SCB Vector Table Offset Register Definitions */ +#define SCB_VTOR_TBLBASE_Pos 29U /*!< SCB VTOR: TBLBASE Position */ +#define SCB_VTOR_TBLBASE_Msk (1UL << SCB_VTOR_TBLBASE_Pos) /*!< SCB VTOR: TBLBASE Mask */ + +#define SCB_VTOR_TBLOFF_Pos 7U /*!< SCB VTOR: TBLOFF Position */ +#define SCB_VTOR_TBLOFF_Msk (0x3FFFFFUL << SCB_VTOR_TBLOFF_Pos) /*!< SCB VTOR: TBLOFF Mask */ + +/* SCB Application Interrupt and Reset Control Register Definitions */ +#define SCB_AIRCR_VECTKEY_Pos 16U /*!< SCB AIRCR: VECTKEY Position */ +#define SCB_AIRCR_VECTKEY_Msk (0xFFFFUL << SCB_AIRCR_VECTKEY_Pos) /*!< SCB AIRCR: VECTKEY Mask */ + +#define SCB_AIRCR_VECTKEYSTAT_Pos 16U /*!< SCB AIRCR: VECTKEYSTAT Position */ +#define SCB_AIRCR_VECTKEYSTAT_Msk (0xFFFFUL << SCB_AIRCR_VECTKEYSTAT_Pos) /*!< SCB AIRCR: VECTKEYSTAT Mask */ + +#define SCB_AIRCR_ENDIANESS_Pos 15U /*!< SCB AIRCR: ENDIANESS Position */ +#define SCB_AIRCR_ENDIANESS_Msk (1UL << SCB_AIRCR_ENDIANESS_Pos) /*!< SCB AIRCR: ENDIANESS Mask */ + +#define SCB_AIRCR_PRIGROUP_Pos 8U /*!< SCB AIRCR: PRIGROUP Position */ +#define SCB_AIRCR_PRIGROUP_Msk (7UL << SCB_AIRCR_PRIGROUP_Pos) /*!< SCB AIRCR: PRIGROUP Mask */ + +#define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */ +#define SCB_AIRCR_SYSRESETREQ_Msk (1UL << SCB_AIRCR_SYSRESETREQ_Pos) /*!< SCB AIRCR: SYSRESETREQ Mask */ + +#define SCB_AIRCR_VECTCLRACTIVE_Pos 1U /*!< SCB AIRCR: VECTCLRACTIVE Position */ +#define SCB_AIRCR_VECTCLRACTIVE_Msk (1UL << SCB_AIRCR_VECTCLRACTIVE_Pos) /*!< SCB AIRCR: VECTCLRACTIVE Mask */ + +#define SCB_AIRCR_VECTRESET_Pos 0U /*!< SCB AIRCR: VECTRESET Position */ +#define SCB_AIRCR_VECTRESET_Msk (1UL /*<< SCB_AIRCR_VECTRESET_Pos*/) /*!< SCB AIRCR: VECTRESET Mask */ + +/* SCB System Control Register Definitions */ +#define SCB_SCR_SEVONPEND_Pos 4U /*!< SCB SCR: SEVONPEND Position */ +#define SCB_SCR_SEVONPEND_Msk (1UL << SCB_SCR_SEVONPEND_Pos) /*!< SCB SCR: SEVONPEND Mask */ + +#define SCB_SCR_SLEEPDEEP_Pos 2U /*!< SCB SCR: SLEEPDEEP Position */ +#define SCB_SCR_SLEEPDEEP_Msk (1UL << SCB_SCR_SLEEPDEEP_Pos) /*!< SCB SCR: SLEEPDEEP Mask */ + +#define SCB_SCR_SLEEPONEXIT_Pos 1U /*!< SCB SCR: SLEEPONEXIT Position */ +#define SCB_SCR_SLEEPONEXIT_Msk (1UL << SCB_SCR_SLEEPONEXIT_Pos) /*!< SCB SCR: SLEEPONEXIT Mask */ + +/* SCB Configuration Control Register Definitions */ +#define SCB_CCR_STKALIGN_Pos 9U /*!< SCB CCR: STKALIGN Position */ +#define SCB_CCR_STKALIGN_Msk (1UL << SCB_CCR_STKALIGN_Pos) /*!< SCB CCR: STKALIGN Mask */ + +#define SCB_CCR_BFHFNMIGN_Pos 8U /*!< SCB CCR: BFHFNMIGN Position */ +#define SCB_CCR_BFHFNMIGN_Msk (1UL << SCB_CCR_BFHFNMIGN_Pos) /*!< SCB CCR: BFHFNMIGN Mask */ + +#define SCB_CCR_DIV_0_TRP_Pos 4U /*!< SCB CCR: DIV_0_TRP Position */ +#define SCB_CCR_DIV_0_TRP_Msk (1UL << SCB_CCR_DIV_0_TRP_Pos) /*!< SCB CCR: DIV_0_TRP Mask */ + +#define SCB_CCR_UNALIGN_TRP_Pos 3U /*!< SCB CCR: UNALIGN_TRP Position */ +#define SCB_CCR_UNALIGN_TRP_Msk (1UL << SCB_CCR_UNALIGN_TRP_Pos) /*!< SCB CCR: UNALIGN_TRP Mask */ + +#define SCB_CCR_USERSETMPEND_Pos 1U /*!< SCB CCR: USERSETMPEND Position */ +#define SCB_CCR_USERSETMPEND_Msk (1UL << SCB_CCR_USERSETMPEND_Pos) /*!< SCB CCR: USERSETMPEND Mask */ + +#define SCB_CCR_NONBASETHRDENA_Pos 0U /*!< SCB CCR: NONBASETHRDENA Position */ +#define SCB_CCR_NONBASETHRDENA_Msk (1UL /*<< SCB_CCR_NONBASETHRDENA_Pos*/) /*!< SCB CCR: NONBASETHRDENA Mask */ + +/* SCB System Handler Control and State Register Definitions */ +#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */ +#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */ + +#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */ +#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */ + +#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */ +#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */ + +#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */ +#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */ + +#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */ +#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */ + +#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */ +#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */ + +#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */ +#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */ + +#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */ +#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */ + +#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */ +#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */ + +#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */ +#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */ + +#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */ +#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */ + +#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */ +#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */ + +#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */ +#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */ + +#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */ +#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */ + +/* SCB Configurable Fault Status Register Definitions */ +#define SCB_CFSR_USGFAULTSR_Pos 16U /*!< SCB CFSR: Usage Fault Status Register Position */ +#define SCB_CFSR_USGFAULTSR_Msk (0xFFFFUL << SCB_CFSR_USGFAULTSR_Pos) /*!< SCB CFSR: Usage Fault Status Register Mask */ + +#define SCB_CFSR_BUSFAULTSR_Pos 8U /*!< SCB CFSR: Bus Fault Status Register Position */ +#define SCB_CFSR_BUSFAULTSR_Msk (0xFFUL << SCB_CFSR_BUSFAULTSR_Pos) /*!< SCB CFSR: Bus Fault Status Register Mask */ + +#define SCB_CFSR_MEMFAULTSR_Pos 0U /*!< SCB CFSR: Memory Manage Fault Status Register Position */ +#define SCB_CFSR_MEMFAULTSR_Msk (0xFFUL /*<< SCB_CFSR_MEMFAULTSR_Pos*/) /*!< SCB CFSR: Memory Manage Fault Status Register Mask */ + +/* MemManage Fault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_MMARVALID_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 7U) /*!< SCB CFSR (MMFSR): MMARVALID Position */ +#define SCB_CFSR_MMARVALID_Msk (1UL << SCB_CFSR_MMARVALID_Pos) /*!< SCB CFSR (MMFSR): MMARVALID Mask */ + +#define SCB_CFSR_MSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 4U) /*!< SCB CFSR (MMFSR): MSTKERR Position */ +#define SCB_CFSR_MSTKERR_Msk (1UL << SCB_CFSR_MSTKERR_Pos) /*!< SCB CFSR (MMFSR): MSTKERR Mask */ + +#define SCB_CFSR_MUNSTKERR_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 3U) /*!< SCB CFSR (MMFSR): MUNSTKERR Position */ +#define SCB_CFSR_MUNSTKERR_Msk (1UL << SCB_CFSR_MUNSTKERR_Pos) /*!< SCB CFSR (MMFSR): MUNSTKERR Mask */ + +#define SCB_CFSR_DACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 1U) /*!< SCB CFSR (MMFSR): DACCVIOL Position */ +#define SCB_CFSR_DACCVIOL_Msk (1UL << SCB_CFSR_DACCVIOL_Pos) /*!< SCB CFSR (MMFSR): DACCVIOL Mask */ + +#define SCB_CFSR_IACCVIOL_Pos (SCB_SHCSR_MEMFAULTACT_Pos + 0U) /*!< SCB CFSR (MMFSR): IACCVIOL Position */ +#define SCB_CFSR_IACCVIOL_Msk (1UL /*<< SCB_CFSR_IACCVIOL_Pos*/) /*!< SCB CFSR (MMFSR): IACCVIOL Mask */ + +/* BusFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_BFARVALID_Pos (SCB_CFSR_BUSFAULTSR_Pos + 7U) /*!< SCB CFSR (BFSR): BFARVALID Position */ +#define SCB_CFSR_BFARVALID_Msk (1UL << SCB_CFSR_BFARVALID_Pos) /*!< SCB CFSR (BFSR): BFARVALID Mask */ + +#define SCB_CFSR_STKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 4U) /*!< SCB CFSR (BFSR): STKERR Position */ +#define SCB_CFSR_STKERR_Msk (1UL << SCB_CFSR_STKERR_Pos) /*!< SCB CFSR (BFSR): STKERR Mask */ + +#define SCB_CFSR_UNSTKERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 3U) /*!< SCB CFSR (BFSR): UNSTKERR Position */ +#define SCB_CFSR_UNSTKERR_Msk (1UL << SCB_CFSR_UNSTKERR_Pos) /*!< SCB CFSR (BFSR): UNSTKERR Mask */ + +#define SCB_CFSR_IMPRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 2U) /*!< SCB CFSR (BFSR): IMPRECISERR Position */ +#define SCB_CFSR_IMPRECISERR_Msk (1UL << SCB_CFSR_IMPRECISERR_Pos) /*!< SCB CFSR (BFSR): IMPRECISERR Mask */ + +#define SCB_CFSR_PRECISERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 1U) /*!< SCB CFSR (BFSR): PRECISERR Position */ +#define SCB_CFSR_PRECISERR_Msk (1UL << SCB_CFSR_PRECISERR_Pos) /*!< SCB CFSR (BFSR): PRECISERR Mask */ + +#define SCB_CFSR_IBUSERR_Pos (SCB_CFSR_BUSFAULTSR_Pos + 0U) /*!< SCB CFSR (BFSR): IBUSERR Position */ +#define SCB_CFSR_IBUSERR_Msk (1UL << SCB_CFSR_IBUSERR_Pos) /*!< SCB CFSR (BFSR): IBUSERR Mask */ + +/* UsageFault Status Register (part of SCB Configurable Fault Status Register) */ +#define SCB_CFSR_DIVBYZERO_Pos (SCB_CFSR_USGFAULTSR_Pos + 9U) /*!< SCB CFSR (UFSR): DIVBYZERO Position */ +#define SCB_CFSR_DIVBYZERO_Msk (1UL << SCB_CFSR_DIVBYZERO_Pos) /*!< SCB CFSR (UFSR): DIVBYZERO Mask */ + +#define SCB_CFSR_UNALIGNED_Pos (SCB_CFSR_USGFAULTSR_Pos + 8U) /*!< SCB CFSR (UFSR): UNALIGNED Position */ +#define SCB_CFSR_UNALIGNED_Msk (1UL << SCB_CFSR_UNALIGNED_Pos) /*!< SCB CFSR (UFSR): UNALIGNED Mask */ + +#define SCB_CFSR_NOCP_Pos (SCB_CFSR_USGFAULTSR_Pos + 3U) /*!< SCB CFSR (UFSR): NOCP Position */ +#define SCB_CFSR_NOCP_Msk (1UL << SCB_CFSR_NOCP_Pos) /*!< SCB CFSR (UFSR): NOCP Mask */ + +#define SCB_CFSR_INVPC_Pos (SCB_CFSR_USGFAULTSR_Pos + 2U) /*!< SCB CFSR (UFSR): INVPC Position */ +#define SCB_CFSR_INVPC_Msk (1UL << SCB_CFSR_INVPC_Pos) /*!< SCB CFSR (UFSR): INVPC Mask */ + +#define SCB_CFSR_INVSTATE_Pos (SCB_CFSR_USGFAULTSR_Pos + 1U) /*!< SCB CFSR (UFSR): INVSTATE Position */ +#define SCB_CFSR_INVSTATE_Msk (1UL << SCB_CFSR_INVSTATE_Pos) /*!< SCB CFSR (UFSR): INVSTATE Mask */ + +#define SCB_CFSR_UNDEFINSTR_Pos (SCB_CFSR_USGFAULTSR_Pos + 0U) /*!< SCB CFSR (UFSR): UNDEFINSTR Position */ +#define SCB_CFSR_UNDEFINSTR_Msk (1UL << SCB_CFSR_UNDEFINSTR_Pos) /*!< SCB CFSR (UFSR): UNDEFINSTR Mask */ + +/* SCB Hard Fault Status Register Definitions */ +#define SCB_HFSR_DEBUGEVT_Pos 31U /*!< SCB HFSR: DEBUGEVT Position */ +#define SCB_HFSR_DEBUGEVT_Msk (1UL << SCB_HFSR_DEBUGEVT_Pos) /*!< SCB HFSR: DEBUGEVT Mask */ + +#define SCB_HFSR_FORCED_Pos 30U /*!< SCB HFSR: FORCED Position */ +#define SCB_HFSR_FORCED_Msk (1UL << SCB_HFSR_FORCED_Pos) /*!< SCB HFSR: FORCED Mask */ + +#define SCB_HFSR_VECTTBL_Pos 1U /*!< SCB HFSR: VECTTBL Position */ +#define SCB_HFSR_VECTTBL_Msk (1UL << SCB_HFSR_VECTTBL_Pos) /*!< SCB HFSR: VECTTBL Mask */ + +/* SCB Debug Fault Status Register Definitions */ +#define SCB_DFSR_EXTERNAL_Pos 4U /*!< SCB DFSR: EXTERNAL Position */ +#define SCB_DFSR_EXTERNAL_Msk (1UL << SCB_DFSR_EXTERNAL_Pos) /*!< SCB DFSR: EXTERNAL Mask */ + +#define SCB_DFSR_VCATCH_Pos 3U /*!< SCB DFSR: VCATCH Position */ +#define SCB_DFSR_VCATCH_Msk (1UL << SCB_DFSR_VCATCH_Pos) /*!< SCB DFSR: VCATCH Mask */ + +#define SCB_DFSR_DWTTRAP_Pos 2U /*!< SCB DFSR: DWTTRAP Position */ +#define SCB_DFSR_DWTTRAP_Msk (1UL << SCB_DFSR_DWTTRAP_Pos) /*!< SCB DFSR: DWTTRAP Mask */ + +#define SCB_DFSR_BKPT_Pos 1U /*!< SCB DFSR: BKPT Position */ +#define SCB_DFSR_BKPT_Msk (1UL << SCB_DFSR_BKPT_Pos) /*!< SCB DFSR: BKPT Mask */ + +#define SCB_DFSR_HALTED_Pos 0U /*!< SCB DFSR: HALTED Position */ +#define SCB_DFSR_HALTED_Msk (1UL /*<< SCB_DFSR_HALTED_Pos*/) /*!< SCB DFSR: HALTED Mask */ + +/*@} end of group CMSIS_SCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SCnSCB System Controls not in SCB (SCnSCB) + \brief Type definitions for the System Control and ID Register not in the SCB + @{ + */ + +/** + \brief Structure type to access the System Control and ID Register not in the SCB. + */ +typedef struct +{ + uint32_t RESERVED0[1U]; + __IM uint32_t ICTR; /*!< Offset: 0x004 (R/ ) Interrupt Controller Type Register */ + __IOM uint32_t ACTLR; /*!< Offset: 0x008 (R/W) Auxiliary Control Register */ +} SCnSCB_Type; + +/* Interrupt Controller Type Register Definitions */ +#define SCnSCB_ICTR_INTLINESNUM_Pos 0U /*!< ICTR: INTLINESNUM Position */ +#define SCnSCB_ICTR_INTLINESNUM_Msk (0xFUL /*<< SCnSCB_ICTR_INTLINESNUM_Pos*/) /*!< ICTR: INTLINESNUM Mask */ + +/* Auxiliary Control Register Definitions */ +#define SCnSCB_ACTLR_DISFOLD_Pos 2U /*!< ACTLR: DISFOLD Position */ +#define SCnSCB_ACTLR_DISFOLD_Msk (1UL << SCnSCB_ACTLR_DISFOLD_Pos) /*!< ACTLR: DISFOLD Mask */ + +#define SCnSCB_ACTLR_DISDEFWBUF_Pos 1U /*!< ACTLR: DISDEFWBUF Position */ +#define SCnSCB_ACTLR_DISDEFWBUF_Msk (1UL << SCnSCB_ACTLR_DISDEFWBUF_Pos) /*!< ACTLR: DISDEFWBUF Mask */ + +#define SCnSCB_ACTLR_DISMCYCINT_Pos 0U /*!< ACTLR: DISMCYCINT Position */ +#define SCnSCB_ACTLR_DISMCYCINT_Msk (1UL /*<< SCnSCB_ACTLR_DISMCYCINT_Pos*/) /*!< ACTLR: DISMCYCINT Mask */ + +/*@} end of group CMSIS_SCnotSCB */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_SysTick System Tick Timer (SysTick) + \brief Type definitions for the System Timer Registers. + @{ + */ + +/** + \brief Structure type to access the System Timer (SysTick). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */ + __IOM uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */ + __IOM uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */ + __IM uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */ +} SysTick_Type; + +/* SysTick Control / Status Register Definitions */ +#define SysTick_CTRL_COUNTFLAG_Pos 16U /*!< SysTick CTRL: COUNTFLAG Position */ +#define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */ + +#define SysTick_CTRL_CLKSOURCE_Pos 2U /*!< SysTick CTRL: CLKSOURCE Position */ +#define SysTick_CTRL_CLKSOURCE_Msk (1UL << SysTick_CTRL_CLKSOURCE_Pos) /*!< SysTick CTRL: CLKSOURCE Mask */ + +#define SysTick_CTRL_TICKINT_Pos 1U /*!< SysTick CTRL: TICKINT Position */ +#define SysTick_CTRL_TICKINT_Msk (1UL << SysTick_CTRL_TICKINT_Pos) /*!< SysTick CTRL: TICKINT Mask */ + +#define SysTick_CTRL_ENABLE_Pos 0U /*!< SysTick CTRL: ENABLE Position */ +#define SysTick_CTRL_ENABLE_Msk (1UL /*<< SysTick_CTRL_ENABLE_Pos*/) /*!< SysTick CTRL: ENABLE Mask */ + +/* SysTick Reload Register Definitions */ +#define SysTick_LOAD_RELOAD_Pos 0U /*!< SysTick LOAD: RELOAD Position */ +#define SysTick_LOAD_RELOAD_Msk (0xFFFFFFUL /*<< SysTick_LOAD_RELOAD_Pos*/) /*!< SysTick LOAD: RELOAD Mask */ + +/* SysTick Current Register Definitions */ +#define SysTick_VAL_CURRENT_Pos 0U /*!< SysTick VAL: CURRENT Position */ +#define SysTick_VAL_CURRENT_Msk (0xFFFFFFUL /*<< SysTick_VAL_CURRENT_Pos*/) /*!< SysTick VAL: CURRENT Mask */ + +/* SysTick Calibration Register Definitions */ +#define SysTick_CALIB_NOREF_Pos 31U /*!< SysTick CALIB: NOREF Position */ +#define SysTick_CALIB_NOREF_Msk (1UL << SysTick_CALIB_NOREF_Pos) /*!< SysTick CALIB: NOREF Mask */ + +#define SysTick_CALIB_SKEW_Pos 30U /*!< SysTick CALIB: SKEW Position */ +#define SysTick_CALIB_SKEW_Msk (1UL << SysTick_CALIB_SKEW_Pos) /*!< SysTick CALIB: SKEW Mask */ + +#define SysTick_CALIB_TENMS_Pos 0U /*!< SysTick CALIB: TENMS Position */ +#define SysTick_CALIB_TENMS_Msk (0xFFFFFFUL /*<< SysTick_CALIB_TENMS_Pos*/) /*!< SysTick CALIB: TENMS Mask */ + +/*@} end of group CMSIS_SysTick */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_ITM Instrumentation Trace Macrocell (ITM) + \brief Type definitions for the Instrumentation Trace Macrocell (ITM) + @{ + */ + +/** + \brief Structure type to access the Instrumentation Trace Macrocell Register (ITM). + */ +typedef struct +{ + __OM union + { + __OM uint8_t u8; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 8-bit */ + __OM uint16_t u16; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 16-bit */ + __OM uint32_t u32; /*!< Offset: 0x000 ( /W) ITM Stimulus Port 32-bit */ + } PORT [32U]; /*!< Offset: 0x000 ( /W) ITM Stimulus Port Registers */ + uint32_t RESERVED0[864U]; + __IOM uint32_t TER; /*!< Offset: 0xE00 (R/W) ITM Trace Enable Register */ + uint32_t RESERVED1[15U]; + __IOM uint32_t TPR; /*!< Offset: 0xE40 (R/W) ITM Trace Privilege Register */ + uint32_t RESERVED2[15U]; + __IOM uint32_t TCR; /*!< Offset: 0xE80 (R/W) ITM Trace Control Register */ + uint32_t RESERVED3[32U]; + uint32_t RESERVED4[43U]; + __OM uint32_t LAR; /*!< Offset: 0xFB0 ( /W) ITM Lock Access Register */ + __IM uint32_t LSR; /*!< Offset: 0xFB4 (R/ ) ITM Lock Status Register */ + uint32_t RESERVED5[6U]; + __IM uint32_t PID4; /*!< Offset: 0xFD0 (R/ ) ITM Peripheral Identification Register #4 */ + __IM uint32_t PID5; /*!< Offset: 0xFD4 (R/ ) ITM Peripheral Identification Register #5 */ + __IM uint32_t PID6; /*!< Offset: 0xFD8 (R/ ) ITM Peripheral Identification Register #6 */ + __IM uint32_t PID7; /*!< Offset: 0xFDC (R/ ) ITM Peripheral Identification Register #7 */ + __IM uint32_t PID0; /*!< Offset: 0xFE0 (R/ ) ITM Peripheral Identification Register #0 */ + __IM uint32_t PID1; /*!< Offset: 0xFE4 (R/ ) ITM Peripheral Identification Register #1 */ + __IM uint32_t PID2; /*!< Offset: 0xFE8 (R/ ) ITM Peripheral Identification Register #2 */ + __IM uint32_t PID3; /*!< Offset: 0xFEC (R/ ) ITM Peripheral Identification Register #3 */ + __IM uint32_t CID0; /*!< Offset: 0xFF0 (R/ ) ITM Component Identification Register #0 */ + __IM uint32_t CID1; /*!< Offset: 0xFF4 (R/ ) ITM Component Identification Register #1 */ + __IM uint32_t CID2; /*!< Offset: 0xFF8 (R/ ) ITM Component Identification Register #2 */ + __IM uint32_t CID3; /*!< Offset: 0xFFC (R/ ) ITM Component Identification Register #3 */ +} ITM_Type; + +/* ITM Trace Privilege Register Definitions */ +#define ITM_TPR_PRIVMASK_Pos 0U /*!< ITM TPR: PRIVMASK Position */ +#define ITM_TPR_PRIVMASK_Msk (0xFUL /*<< ITM_TPR_PRIVMASK_Pos*/) /*!< ITM TPR: PRIVMASK Mask */ + +/* ITM Trace Control Register Definitions */ +#define ITM_TCR_BUSY_Pos 23U /*!< ITM TCR: BUSY Position */ +#define ITM_TCR_BUSY_Msk (1UL << ITM_TCR_BUSY_Pos) /*!< ITM TCR: BUSY Mask */ + +#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */ +#define ITM_TCR_TraceBusID_Msk (0x7FUL << ITM_TCR_TraceBusID_Pos) /*!< ITM TCR: ATBID Mask */ + +#define ITM_TCR_GTSFREQ_Pos 10U /*!< ITM TCR: Global timestamp frequency Position */ +#define ITM_TCR_GTSFREQ_Msk (3UL << ITM_TCR_GTSFREQ_Pos) /*!< ITM TCR: Global timestamp frequency Mask */ + +#define ITM_TCR_TSPrescale_Pos 8U /*!< ITM TCR: TSPrescale Position */ +#define ITM_TCR_TSPrescale_Msk (3UL << ITM_TCR_TSPrescale_Pos) /*!< ITM TCR: TSPrescale Mask */ + +#define ITM_TCR_SWOENA_Pos 4U /*!< ITM TCR: SWOENA Position */ +#define ITM_TCR_SWOENA_Msk (1UL << ITM_TCR_SWOENA_Pos) /*!< ITM TCR: SWOENA Mask */ + +#define ITM_TCR_DWTENA_Pos 3U /*!< ITM TCR: DWTENA Position */ +#define ITM_TCR_DWTENA_Msk (1UL << ITM_TCR_DWTENA_Pos) /*!< ITM TCR: DWTENA Mask */ + +#define ITM_TCR_SYNCENA_Pos 2U /*!< ITM TCR: SYNCENA Position */ +#define ITM_TCR_SYNCENA_Msk (1UL << ITM_TCR_SYNCENA_Pos) /*!< ITM TCR: SYNCENA Mask */ + +#define ITM_TCR_TSENA_Pos 1U /*!< ITM TCR: TSENA Position */ +#define ITM_TCR_TSENA_Msk (1UL << ITM_TCR_TSENA_Pos) /*!< ITM TCR: TSENA Mask */ + +#define ITM_TCR_ITMENA_Pos 0U /*!< ITM TCR: ITM Enable bit Position */ +#define ITM_TCR_ITMENA_Msk (1UL /*<< ITM_TCR_ITMENA_Pos*/) /*!< ITM TCR: ITM Enable bit Mask */ + +/* ITM Lock Status Register Definitions */ +#define ITM_LSR_ByteAcc_Pos 2U /*!< ITM LSR: ByteAcc Position */ +#define ITM_LSR_ByteAcc_Msk (1UL << ITM_LSR_ByteAcc_Pos) /*!< ITM LSR: ByteAcc Mask */ + +#define ITM_LSR_Access_Pos 1U /*!< ITM LSR: Access Position */ +#define ITM_LSR_Access_Msk (1UL << ITM_LSR_Access_Pos) /*!< ITM LSR: Access Mask */ + +#define ITM_LSR_Present_Pos 0U /*!< ITM LSR: Present Position */ +#define ITM_LSR_Present_Msk (1UL /*<< ITM_LSR_Present_Pos*/) /*!< ITM LSR: Present Mask */ + +/*@}*/ /* end of group CMSIS_ITM */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_DWT Data Watchpoint and Trace (DWT) + \brief Type definitions for the Data Watchpoint and Trace (DWT) + @{ + */ + +/** + \brief Structure type to access the Data Watchpoint and Trace Register (DWT). + */ +typedef struct +{ + __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */ + __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */ + __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */ + __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */ + __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */ + __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */ + __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */ + __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */ + __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */ + __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */ + __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */ + uint32_t RESERVED0[1U]; + __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */ + __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */ + __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */ + uint32_t RESERVED1[1U]; + __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */ + __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */ + __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */ + uint32_t RESERVED2[1U]; + __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */ + __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */ + __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */ +} DWT_Type; + +/* DWT Control Register Definitions */ +#define DWT_CTRL_NUMCOMP_Pos 28U /*!< DWT CTRL: NUMCOMP Position */ +#define DWT_CTRL_NUMCOMP_Msk (0xFUL << DWT_CTRL_NUMCOMP_Pos) /*!< DWT CTRL: NUMCOMP Mask */ + +#define DWT_CTRL_NOTRCPKT_Pos 27U /*!< DWT CTRL: NOTRCPKT Position */ +#define DWT_CTRL_NOTRCPKT_Msk (0x1UL << DWT_CTRL_NOTRCPKT_Pos) /*!< DWT CTRL: NOTRCPKT Mask */ + +#define DWT_CTRL_NOEXTTRIG_Pos 26U /*!< DWT CTRL: NOEXTTRIG Position */ +#define DWT_CTRL_NOEXTTRIG_Msk (0x1UL << DWT_CTRL_NOEXTTRIG_Pos) /*!< DWT CTRL: NOEXTTRIG Mask */ + +#define DWT_CTRL_NOCYCCNT_Pos 25U /*!< DWT CTRL: NOCYCCNT Position */ +#define DWT_CTRL_NOCYCCNT_Msk (0x1UL << DWT_CTRL_NOCYCCNT_Pos) /*!< DWT CTRL: NOCYCCNT Mask */ + +#define DWT_CTRL_NOPRFCNT_Pos 24U /*!< DWT CTRL: NOPRFCNT Position */ +#define DWT_CTRL_NOPRFCNT_Msk (0x1UL << DWT_CTRL_NOPRFCNT_Pos) /*!< DWT CTRL: NOPRFCNT Mask */ + +#define DWT_CTRL_CYCEVTENA_Pos 22U /*!< DWT CTRL: CYCEVTENA Position */ +#define DWT_CTRL_CYCEVTENA_Msk (0x1UL << DWT_CTRL_CYCEVTENA_Pos) /*!< DWT CTRL: CYCEVTENA Mask */ + +#define DWT_CTRL_FOLDEVTENA_Pos 21U /*!< DWT CTRL: FOLDEVTENA Position */ +#define DWT_CTRL_FOLDEVTENA_Msk (0x1UL << DWT_CTRL_FOLDEVTENA_Pos) /*!< DWT CTRL: FOLDEVTENA Mask */ + +#define DWT_CTRL_LSUEVTENA_Pos 20U /*!< DWT CTRL: LSUEVTENA Position */ +#define DWT_CTRL_LSUEVTENA_Msk (0x1UL << DWT_CTRL_LSUEVTENA_Pos) /*!< DWT CTRL: LSUEVTENA Mask */ + +#define DWT_CTRL_SLEEPEVTENA_Pos 19U /*!< DWT CTRL: SLEEPEVTENA Position */ +#define DWT_CTRL_SLEEPEVTENA_Msk (0x1UL << DWT_CTRL_SLEEPEVTENA_Pos) /*!< DWT CTRL: SLEEPEVTENA Mask */ + +#define DWT_CTRL_EXCEVTENA_Pos 18U /*!< DWT CTRL: EXCEVTENA Position */ +#define DWT_CTRL_EXCEVTENA_Msk (0x1UL << DWT_CTRL_EXCEVTENA_Pos) /*!< DWT CTRL: EXCEVTENA Mask */ + +#define DWT_CTRL_CPIEVTENA_Pos 17U /*!< DWT CTRL: CPIEVTENA Position */ +#define DWT_CTRL_CPIEVTENA_Msk (0x1UL << DWT_CTRL_CPIEVTENA_Pos) /*!< DWT CTRL: CPIEVTENA Mask */ + +#define DWT_CTRL_EXCTRCENA_Pos 16U /*!< DWT CTRL: EXCTRCENA Position */ +#define DWT_CTRL_EXCTRCENA_Msk (0x1UL << DWT_CTRL_EXCTRCENA_Pos) /*!< DWT CTRL: EXCTRCENA Mask */ + +#define DWT_CTRL_PCSAMPLENA_Pos 12U /*!< DWT CTRL: PCSAMPLENA Position */ +#define DWT_CTRL_PCSAMPLENA_Msk (0x1UL << DWT_CTRL_PCSAMPLENA_Pos) /*!< DWT CTRL: PCSAMPLENA Mask */ + +#define DWT_CTRL_SYNCTAP_Pos 10U /*!< DWT CTRL: SYNCTAP Position */ +#define DWT_CTRL_SYNCTAP_Msk (0x3UL << DWT_CTRL_SYNCTAP_Pos) /*!< DWT CTRL: SYNCTAP Mask */ + +#define DWT_CTRL_CYCTAP_Pos 9U /*!< DWT CTRL: CYCTAP Position */ +#define DWT_CTRL_CYCTAP_Msk (0x1UL << DWT_CTRL_CYCTAP_Pos) /*!< DWT CTRL: CYCTAP Mask */ + +#define DWT_CTRL_POSTINIT_Pos 5U /*!< DWT CTRL: POSTINIT Position */ +#define DWT_CTRL_POSTINIT_Msk (0xFUL << DWT_CTRL_POSTINIT_Pos) /*!< DWT CTRL: POSTINIT Mask */ + +#define DWT_CTRL_POSTPRESET_Pos 1U /*!< DWT CTRL: POSTPRESET Position */ +#define DWT_CTRL_POSTPRESET_Msk (0xFUL << DWT_CTRL_POSTPRESET_Pos) /*!< DWT CTRL: POSTPRESET Mask */ + +#define DWT_CTRL_CYCCNTENA_Pos 0U /*!< DWT CTRL: CYCCNTENA Position */ +#define DWT_CTRL_CYCCNTENA_Msk (0x1UL /*<< DWT_CTRL_CYCCNTENA_Pos*/) /*!< DWT CTRL: CYCCNTENA Mask */ + +/* DWT CPI Count Register Definitions */ +#define DWT_CPICNT_CPICNT_Pos 0U /*!< DWT CPICNT: CPICNT Position */ +#define DWT_CPICNT_CPICNT_Msk (0xFFUL /*<< DWT_CPICNT_CPICNT_Pos*/) /*!< DWT CPICNT: CPICNT Mask */ + +/* DWT Exception Overhead Count Register Definitions */ +#define DWT_EXCCNT_EXCCNT_Pos 0U /*!< DWT EXCCNT: EXCCNT Position */ +#define DWT_EXCCNT_EXCCNT_Msk (0xFFUL /*<< DWT_EXCCNT_EXCCNT_Pos*/) /*!< DWT EXCCNT: EXCCNT Mask */ + +/* DWT Sleep Count Register Definitions */ +#define DWT_SLEEPCNT_SLEEPCNT_Pos 0U /*!< DWT SLEEPCNT: SLEEPCNT Position */ +#define DWT_SLEEPCNT_SLEEPCNT_Msk (0xFFUL /*<< DWT_SLEEPCNT_SLEEPCNT_Pos*/) /*!< DWT SLEEPCNT: SLEEPCNT Mask */ + +/* DWT LSU Count Register Definitions */ +#define DWT_LSUCNT_LSUCNT_Pos 0U /*!< DWT LSUCNT: LSUCNT Position */ +#define DWT_LSUCNT_LSUCNT_Msk (0xFFUL /*<< DWT_LSUCNT_LSUCNT_Pos*/) /*!< DWT LSUCNT: LSUCNT Mask */ + +/* DWT Folded-instruction Count Register Definitions */ +#define DWT_FOLDCNT_FOLDCNT_Pos 0U /*!< DWT FOLDCNT: FOLDCNT Position */ +#define DWT_FOLDCNT_FOLDCNT_Msk (0xFFUL /*<< DWT_FOLDCNT_FOLDCNT_Pos*/) /*!< DWT FOLDCNT: FOLDCNT Mask */ + +/* DWT Comparator Mask Register Definitions */ +#define DWT_MASK_MASK_Pos 0U /*!< DWT MASK: MASK Position */ +#define DWT_MASK_MASK_Msk (0x1FUL /*<< DWT_MASK_MASK_Pos*/) /*!< DWT MASK: MASK Mask */ + +/* DWT Comparator Function Register Definitions */ +#define DWT_FUNCTION_MATCHED_Pos 24U /*!< DWT FUNCTION: MATCHED Position */ +#define DWT_FUNCTION_MATCHED_Msk (0x1UL << DWT_FUNCTION_MATCHED_Pos) /*!< DWT FUNCTION: MATCHED Mask */ + +#define DWT_FUNCTION_DATAVADDR1_Pos 16U /*!< DWT FUNCTION: DATAVADDR1 Position */ +#define DWT_FUNCTION_DATAVADDR1_Msk (0xFUL << DWT_FUNCTION_DATAVADDR1_Pos) /*!< DWT FUNCTION: DATAVADDR1 Mask */ + +#define DWT_FUNCTION_DATAVADDR0_Pos 12U /*!< DWT FUNCTION: DATAVADDR0 Position */ +#define DWT_FUNCTION_DATAVADDR0_Msk (0xFUL << DWT_FUNCTION_DATAVADDR0_Pos) /*!< DWT FUNCTION: DATAVADDR0 Mask */ + +#define DWT_FUNCTION_DATAVSIZE_Pos 10U /*!< DWT FUNCTION: DATAVSIZE Position */ +#define DWT_FUNCTION_DATAVSIZE_Msk (0x3UL << DWT_FUNCTION_DATAVSIZE_Pos) /*!< DWT FUNCTION: DATAVSIZE Mask */ + +#define DWT_FUNCTION_LNK1ENA_Pos 9U /*!< DWT FUNCTION: LNK1ENA Position */ +#define DWT_FUNCTION_LNK1ENA_Msk (0x1UL << DWT_FUNCTION_LNK1ENA_Pos) /*!< DWT FUNCTION: LNK1ENA Mask */ + +#define DWT_FUNCTION_DATAVMATCH_Pos 8U /*!< DWT FUNCTION: DATAVMATCH Position */ +#define DWT_FUNCTION_DATAVMATCH_Msk (0x1UL << DWT_FUNCTION_DATAVMATCH_Pos) /*!< DWT FUNCTION: DATAVMATCH Mask */ + +#define DWT_FUNCTION_CYCMATCH_Pos 7U /*!< DWT FUNCTION: CYCMATCH Position */ +#define DWT_FUNCTION_CYCMATCH_Msk (0x1UL << DWT_FUNCTION_CYCMATCH_Pos) /*!< DWT FUNCTION: CYCMATCH Mask */ + +#define DWT_FUNCTION_EMITRANGE_Pos 5U /*!< DWT FUNCTION: EMITRANGE Position */ +#define DWT_FUNCTION_EMITRANGE_Msk (0x1UL << DWT_FUNCTION_EMITRANGE_Pos) /*!< DWT FUNCTION: EMITRANGE Mask */ + +#define DWT_FUNCTION_FUNCTION_Pos 0U /*!< DWT FUNCTION: FUNCTION Position */ +#define DWT_FUNCTION_FUNCTION_Msk (0xFUL /*<< DWT_FUNCTION_FUNCTION_Pos*/) /*!< DWT FUNCTION: FUNCTION Mask */ + +/*@}*/ /* end of group CMSIS_DWT */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_TPI Trace Port Interface (TPI) + \brief Type definitions for the Trace Port Interface (TPI) + @{ + */ + +/** + \brief Structure type to access the Trace Port Interface Register (TPI). + */ +typedef struct +{ + __IM uint32_t SSPSR; /*!< Offset: 0x000 (R/ ) Supported Parallel Port Size Register */ + __IOM uint32_t CSPSR; /*!< Offset: 0x004 (R/W) Current Parallel Port Size Register */ + uint32_t RESERVED0[2U]; + __IOM uint32_t ACPR; /*!< Offset: 0x010 (R/W) Asynchronous Clock Prescaler Register */ + uint32_t RESERVED1[55U]; + __IOM uint32_t SPPR; /*!< Offset: 0x0F0 (R/W) Selected Pin Protocol Register */ + uint32_t RESERVED2[131U]; + __IM uint32_t FFSR; /*!< Offset: 0x300 (R/ ) Formatter and Flush Status Register */ + __IOM uint32_t FFCR; /*!< Offset: 0x304 (R/W) Formatter and Flush Control Register */ + __IM uint32_t FSCR; /*!< Offset: 0x308 (R/ ) Formatter Synchronization Counter Register */ + uint32_t RESERVED3[759U]; + __IM uint32_t TRIGGER; /*!< Offset: 0xEE8 (R/ ) TRIGGER Register */ + __IM uint32_t FIFO0; /*!< Offset: 0xEEC (R/ ) Integration ETM Data */ + __IM uint32_t ITATBCTR2; /*!< Offset: 0xEF0 (R/ ) ITATBCTR2 */ + uint32_t RESERVED4[1U]; + __IM uint32_t ITATBCTR0; /*!< Offset: 0xEF8 (R/ ) ITATBCTR0 */ + __IM uint32_t FIFO1; /*!< Offset: 0xEFC (R/ ) Integration ITM Data */ + __IOM uint32_t ITCTRL; /*!< Offset: 0xF00 (R/W) Integration Mode Control */ + uint32_t RESERVED5[39U]; + __IOM uint32_t CLAIMSET; /*!< Offset: 0xFA0 (R/W) Claim tag set */ + __IOM uint32_t CLAIMCLR; /*!< Offset: 0xFA4 (R/W) Claim tag clear */ + uint32_t RESERVED7[8U]; + __IM uint32_t DEVID; /*!< Offset: 0xFC8 (R/ ) TPIU_DEVID */ + __IM uint32_t DEVTYPE; /*!< Offset: 0xFCC (R/ ) TPIU_DEVTYPE */ +} TPI_Type; + +/* TPI Asynchronous Clock Prescaler Register Definitions */ +#define TPI_ACPR_PRESCALER_Pos 0U /*!< TPI ACPR: PRESCALER Position */ +#define TPI_ACPR_PRESCALER_Msk (0x1FFFUL /*<< TPI_ACPR_PRESCALER_Pos*/) /*!< TPI ACPR: PRESCALER Mask */ + +/* TPI Selected Pin Protocol Register Definitions */ +#define TPI_SPPR_TXMODE_Pos 0U /*!< TPI SPPR: TXMODE Position */ +#define TPI_SPPR_TXMODE_Msk (0x3UL /*<< TPI_SPPR_TXMODE_Pos*/) /*!< TPI SPPR: TXMODE Mask */ + +/* TPI Formatter and Flush Status Register Definitions */ +#define TPI_FFSR_FtNonStop_Pos 3U /*!< TPI FFSR: FtNonStop Position */ +#define TPI_FFSR_FtNonStop_Msk (0x1UL << TPI_FFSR_FtNonStop_Pos) /*!< TPI FFSR: FtNonStop Mask */ + +#define TPI_FFSR_TCPresent_Pos 2U /*!< TPI FFSR: TCPresent Position */ +#define TPI_FFSR_TCPresent_Msk (0x1UL << TPI_FFSR_TCPresent_Pos) /*!< TPI FFSR: TCPresent Mask */ + +#define TPI_FFSR_FtStopped_Pos 1U /*!< TPI FFSR: FtStopped Position */ +#define TPI_FFSR_FtStopped_Msk (0x1UL << TPI_FFSR_FtStopped_Pos) /*!< TPI FFSR: FtStopped Mask */ + +#define TPI_FFSR_FlInProg_Pos 0U /*!< TPI FFSR: FlInProg Position */ +#define TPI_FFSR_FlInProg_Msk (0x1UL /*<< TPI_FFSR_FlInProg_Pos*/) /*!< TPI FFSR: FlInProg Mask */ + +/* TPI Formatter and Flush Control Register Definitions */ +#define TPI_FFCR_TrigIn_Pos 8U /*!< TPI FFCR: TrigIn Position */ +#define TPI_FFCR_TrigIn_Msk (0x1UL << TPI_FFCR_TrigIn_Pos) /*!< TPI FFCR: TrigIn Mask */ + +#define TPI_FFCR_EnFCont_Pos 1U /*!< TPI FFCR: EnFCont Position */ +#define TPI_FFCR_EnFCont_Msk (0x1UL << TPI_FFCR_EnFCont_Pos) /*!< TPI FFCR: EnFCont Mask */ + +/* TPI TRIGGER Register Definitions */ +#define TPI_TRIGGER_TRIGGER_Pos 0U /*!< TPI TRIGGER: TRIGGER Position */ +#define TPI_TRIGGER_TRIGGER_Msk (0x1UL /*<< TPI_TRIGGER_TRIGGER_Pos*/) /*!< TPI TRIGGER: TRIGGER Mask */ + +/* TPI Integration ETM Data Register Definitions (FIFO0) */ +#define TPI_FIFO0_ITM_ATVALID_Pos 29U /*!< TPI FIFO0: ITM_ATVALID Position */ +#define TPI_FIFO0_ITM_ATVALID_Msk (0x1UL << TPI_FIFO0_ITM_ATVALID_Pos) /*!< TPI FIFO0: ITM_ATVALID Mask */ + +#define TPI_FIFO0_ITM_bytecount_Pos 27U /*!< TPI FIFO0: ITM_bytecount Position */ +#define TPI_FIFO0_ITM_bytecount_Msk (0x3UL << TPI_FIFO0_ITM_bytecount_Pos) /*!< TPI FIFO0: ITM_bytecount Mask */ + +#define TPI_FIFO0_ETM_ATVALID_Pos 26U /*!< TPI FIFO0: ETM_ATVALID Position */ +#define TPI_FIFO0_ETM_ATVALID_Msk (0x1UL << TPI_FIFO0_ETM_ATVALID_Pos) /*!< TPI FIFO0: ETM_ATVALID Mask */ + +#define TPI_FIFO0_ETM_bytecount_Pos 24U /*!< TPI FIFO0: ETM_bytecount Position */ +#define TPI_FIFO0_ETM_bytecount_Msk (0x3UL << TPI_FIFO0_ETM_bytecount_Pos) /*!< TPI FIFO0: ETM_bytecount Mask */ + +#define TPI_FIFO0_ETM2_Pos 16U /*!< TPI FIFO0: ETM2 Position */ +#define TPI_FIFO0_ETM2_Msk (0xFFUL << TPI_FIFO0_ETM2_Pos) /*!< TPI FIFO0: ETM2 Mask */ + +#define TPI_FIFO0_ETM1_Pos 8U /*!< TPI FIFO0: ETM1 Position */ +#define TPI_FIFO0_ETM1_Msk (0xFFUL << TPI_FIFO0_ETM1_Pos) /*!< TPI FIFO0: ETM1 Mask */ + +#define TPI_FIFO0_ETM0_Pos 0U /*!< TPI FIFO0: ETM0 Position */ +#define TPI_FIFO0_ETM0_Msk (0xFFUL /*<< TPI_FIFO0_ETM0_Pos*/) /*!< TPI FIFO0: ETM0 Mask */ + +/* TPI ITATBCTR2 Register Definitions */ +#define TPI_ITATBCTR2_ATREADY2_Pos 0U /*!< TPI ITATBCTR2: ATREADY2 Position */ +#define TPI_ITATBCTR2_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY2_Pos*/) /*!< TPI ITATBCTR2: ATREADY2 Mask */ + +#define TPI_ITATBCTR2_ATREADY1_Pos 0U /*!< TPI ITATBCTR2: ATREADY1 Position */ +#define TPI_ITATBCTR2_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR2_ATREADY1_Pos*/) /*!< TPI ITATBCTR2: ATREADY1 Mask */ + +/* TPI Integration ITM Data Register Definitions (FIFO1) */ +#define TPI_FIFO1_ITM_ATVALID_Pos 29U /*!< TPI FIFO1: ITM_ATVALID Position */ +#define TPI_FIFO1_ITM_ATVALID_Msk (0x1UL << TPI_FIFO1_ITM_ATVALID_Pos) /*!< TPI FIFO1: ITM_ATVALID Mask */ + +#define TPI_FIFO1_ITM_bytecount_Pos 27U /*!< TPI FIFO1: ITM_bytecount Position */ +#define TPI_FIFO1_ITM_bytecount_Msk (0x3UL << TPI_FIFO1_ITM_bytecount_Pos) /*!< TPI FIFO1: ITM_bytecount Mask */ + +#define TPI_FIFO1_ETM_ATVALID_Pos 26U /*!< TPI FIFO1: ETM_ATVALID Position */ +#define TPI_FIFO1_ETM_ATVALID_Msk (0x1UL << TPI_FIFO1_ETM_ATVALID_Pos) /*!< TPI FIFO1: ETM_ATVALID Mask */ + +#define TPI_FIFO1_ETM_bytecount_Pos 24U /*!< TPI FIFO1: ETM_bytecount Position */ +#define TPI_FIFO1_ETM_bytecount_Msk (0x3UL << TPI_FIFO1_ETM_bytecount_Pos) /*!< TPI FIFO1: ETM_bytecount Mask */ + +#define TPI_FIFO1_ITM2_Pos 16U /*!< TPI FIFO1: ITM2 Position */ +#define TPI_FIFO1_ITM2_Msk (0xFFUL << TPI_FIFO1_ITM2_Pos) /*!< TPI FIFO1: ITM2 Mask */ + +#define TPI_FIFO1_ITM1_Pos 8U /*!< TPI FIFO1: ITM1 Position */ +#define TPI_FIFO1_ITM1_Msk (0xFFUL << TPI_FIFO1_ITM1_Pos) /*!< TPI FIFO1: ITM1 Mask */ + +#define TPI_FIFO1_ITM0_Pos 0U /*!< TPI FIFO1: ITM0 Position */ +#define TPI_FIFO1_ITM0_Msk (0xFFUL /*<< TPI_FIFO1_ITM0_Pos*/) /*!< TPI FIFO1: ITM0 Mask */ + +/* TPI ITATBCTR0 Register Definitions */ +#define TPI_ITATBCTR0_ATREADY2_Pos 0U /*!< TPI ITATBCTR0: ATREADY2 Position */ +#define TPI_ITATBCTR0_ATREADY2_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY2_Pos*/) /*!< TPI ITATBCTR0: ATREADY2 Mask */ + +#define TPI_ITATBCTR0_ATREADY1_Pos 0U /*!< TPI ITATBCTR0: ATREADY1 Position */ +#define TPI_ITATBCTR0_ATREADY1_Msk (0x1UL /*<< TPI_ITATBCTR0_ATREADY1_Pos*/) /*!< TPI ITATBCTR0: ATREADY1 Mask */ + +/* TPI Integration Mode Control Register Definitions */ +#define TPI_ITCTRL_Mode_Pos 0U /*!< TPI ITCTRL: Mode Position */ +#define TPI_ITCTRL_Mode_Msk (0x3UL /*<< TPI_ITCTRL_Mode_Pos*/) /*!< TPI ITCTRL: Mode Mask */ + +/* TPI DEVID Register Definitions */ +#define TPI_DEVID_NRZVALID_Pos 11U /*!< TPI DEVID: NRZVALID Position */ +#define TPI_DEVID_NRZVALID_Msk (0x1UL << TPI_DEVID_NRZVALID_Pos) /*!< TPI DEVID: NRZVALID Mask */ + +#define TPI_DEVID_MANCVALID_Pos 10U /*!< TPI DEVID: MANCVALID Position */ +#define TPI_DEVID_MANCVALID_Msk (0x1UL << TPI_DEVID_MANCVALID_Pos) /*!< TPI DEVID: MANCVALID Mask */ + +#define TPI_DEVID_PTINVALID_Pos 9U /*!< TPI DEVID: PTINVALID Position */ +#define TPI_DEVID_PTINVALID_Msk (0x1UL << TPI_DEVID_PTINVALID_Pos) /*!< TPI DEVID: PTINVALID Mask */ + +#define TPI_DEVID_MinBufSz_Pos 6U /*!< TPI DEVID: MinBufSz Position */ +#define TPI_DEVID_MinBufSz_Msk (0x7UL << TPI_DEVID_MinBufSz_Pos) /*!< TPI DEVID: MinBufSz Mask */ + +#define TPI_DEVID_AsynClkIn_Pos 5U /*!< TPI DEVID: AsynClkIn Position */ +#define TPI_DEVID_AsynClkIn_Msk (0x1UL << TPI_DEVID_AsynClkIn_Pos) /*!< TPI DEVID: AsynClkIn Mask */ + +#define TPI_DEVID_NrTraceInput_Pos 0U /*!< TPI DEVID: NrTraceInput Position */ +#define TPI_DEVID_NrTraceInput_Msk (0x1FUL /*<< TPI_DEVID_NrTraceInput_Pos*/) /*!< TPI DEVID: NrTraceInput Mask */ + +/* TPI DEVTYPE Register Definitions */ +#define TPI_DEVTYPE_SubType_Pos 4U /*!< TPI DEVTYPE: SubType Position */ +#define TPI_DEVTYPE_SubType_Msk (0xFUL /*<< TPI_DEVTYPE_SubType_Pos*/) /*!< TPI DEVTYPE: SubType Mask */ + +#define TPI_DEVTYPE_MajorType_Pos 0U /*!< TPI DEVTYPE: MajorType Position */ +#define TPI_DEVTYPE_MajorType_Msk (0xFUL << TPI_DEVTYPE_MajorType_Pos) /*!< TPI DEVTYPE: MajorType Mask */ + +/*@}*/ /* end of group CMSIS_TPI */ + + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_MPU Memory Protection Unit (MPU) + \brief Type definitions for the Memory Protection Unit (MPU) + @{ + */ + +/** + \brief Structure type to access the Memory Protection Unit (MPU). + */ +typedef struct +{ + __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */ + __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */ + __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */ + __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */ + __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */ + __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */ + __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */ + __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */ + __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */ + __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */ +} MPU_Type; + +/* MPU Type Register Definitions */ +#define MPU_TYPE_IREGION_Pos 16U /*!< MPU TYPE: IREGION Position */ +#define MPU_TYPE_IREGION_Msk (0xFFUL << MPU_TYPE_IREGION_Pos) /*!< MPU TYPE: IREGION Mask */ + +#define MPU_TYPE_DREGION_Pos 8U /*!< MPU TYPE: DREGION Position */ +#define MPU_TYPE_DREGION_Msk (0xFFUL << MPU_TYPE_DREGION_Pos) /*!< MPU TYPE: DREGION Mask */ + +#define MPU_TYPE_SEPARATE_Pos 0U /*!< MPU TYPE: SEPARATE Position */ +#define MPU_TYPE_SEPARATE_Msk (1UL /*<< MPU_TYPE_SEPARATE_Pos*/) /*!< MPU TYPE: SEPARATE Mask */ + +/* MPU Control Register Definitions */ +#define MPU_CTRL_PRIVDEFENA_Pos 2U /*!< MPU CTRL: PRIVDEFENA Position */ +#define MPU_CTRL_PRIVDEFENA_Msk (1UL << MPU_CTRL_PRIVDEFENA_Pos) /*!< MPU CTRL: PRIVDEFENA Mask */ + +#define MPU_CTRL_HFNMIENA_Pos 1U /*!< MPU CTRL: HFNMIENA Position */ +#define MPU_CTRL_HFNMIENA_Msk (1UL << MPU_CTRL_HFNMIENA_Pos) /*!< MPU CTRL: HFNMIENA Mask */ + +#define MPU_CTRL_ENABLE_Pos 0U /*!< MPU CTRL: ENABLE Position */ +#define MPU_CTRL_ENABLE_Msk (1UL /*<< MPU_CTRL_ENABLE_Pos*/) /*!< MPU CTRL: ENABLE Mask */ + +/* MPU Region Number Register Definitions */ +#define MPU_RNR_REGION_Pos 0U /*!< MPU RNR: REGION Position */ +#define MPU_RNR_REGION_Msk (0xFFUL /*<< MPU_RNR_REGION_Pos*/) /*!< MPU RNR: REGION Mask */ + +/* MPU Region Base Address Register Definitions */ +#define MPU_RBAR_ADDR_Pos 5U /*!< MPU RBAR: ADDR Position */ +#define MPU_RBAR_ADDR_Msk (0x7FFFFFFUL << MPU_RBAR_ADDR_Pos) /*!< MPU RBAR: ADDR Mask */ + +#define MPU_RBAR_VALID_Pos 4U /*!< MPU RBAR: VALID Position */ +#define MPU_RBAR_VALID_Msk (1UL << MPU_RBAR_VALID_Pos) /*!< MPU RBAR: VALID Mask */ + +#define MPU_RBAR_REGION_Pos 0U /*!< MPU RBAR: REGION Position */ +#define MPU_RBAR_REGION_Msk (0xFUL /*<< MPU_RBAR_REGION_Pos*/) /*!< MPU RBAR: REGION Mask */ + +/* MPU Region Attribute and Size Register Definitions */ +#define MPU_RASR_ATTRS_Pos 16U /*!< MPU RASR: MPU Region Attribute field Position */ +#define MPU_RASR_ATTRS_Msk (0xFFFFUL << MPU_RASR_ATTRS_Pos) /*!< MPU RASR: MPU Region Attribute field Mask */ + +#define MPU_RASR_XN_Pos 28U /*!< MPU RASR: ATTRS.XN Position */ +#define MPU_RASR_XN_Msk (1UL << MPU_RASR_XN_Pos) /*!< MPU RASR: ATTRS.XN Mask */ + +#define MPU_RASR_AP_Pos 24U /*!< MPU RASR: ATTRS.AP Position */ +#define MPU_RASR_AP_Msk (0x7UL << MPU_RASR_AP_Pos) /*!< MPU RASR: ATTRS.AP Mask */ + +#define MPU_RASR_TEX_Pos 19U /*!< MPU RASR: ATTRS.TEX Position */ +#define MPU_RASR_TEX_Msk (0x7UL << MPU_RASR_TEX_Pos) /*!< MPU RASR: ATTRS.TEX Mask */ + +#define MPU_RASR_S_Pos 18U /*!< MPU RASR: ATTRS.S Position */ +#define MPU_RASR_S_Msk (1UL << MPU_RASR_S_Pos) /*!< MPU RASR: ATTRS.S Mask */ + +#define MPU_RASR_C_Pos 17U /*!< MPU RASR: ATTRS.C Position */ +#define MPU_RASR_C_Msk (1UL << MPU_RASR_C_Pos) /*!< MPU RASR: ATTRS.C Mask */ + +#define MPU_RASR_B_Pos 16U /*!< MPU RASR: ATTRS.B Position */ +#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos) /*!< MPU RASR: ATTRS.B Mask */ + +#define MPU_RASR_SRD_Pos 8U /*!< MPU RASR: Sub-Region Disable Position */ +#define MPU_RASR_SRD_Msk (0xFFUL << MPU_RASR_SRD_Pos) /*!< MPU RASR: Sub-Region Disable Mask */ + +#define MPU_RASR_SIZE_Pos 1U /*!< MPU RASR: Region Size Field Position */ +#define MPU_RASR_SIZE_Msk (0x1FUL << MPU_RASR_SIZE_Pos) /*!< MPU RASR: Region Size Field Mask */ + +#define MPU_RASR_ENABLE_Pos 0U /*!< MPU RASR: Region enable bit Position */ +#define MPU_RASR_ENABLE_Msk (1UL /*<< MPU_RASR_ENABLE_Pos*/) /*!< MPU RASR: Region enable bit Disable Mask */ + +/*@} end of group CMSIS_MPU */ +#endif + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_CoreDebug Core Debug Registers (CoreDebug) + \brief Type definitions for the Core Debug Registers + @{ + */ + +/** + \brief Structure type to access the Core Debug Register (CoreDebug). + */ +typedef struct +{ + __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */ + __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */ + __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */ + __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */ +} CoreDebug_Type; + +/* Debug Halting Control and Status Register Definitions */ +#define CoreDebug_DHCSR_DBGKEY_Pos 16U /*!< CoreDebug DHCSR: DBGKEY Position */ +#define CoreDebug_DHCSR_DBGKEY_Msk (0xFFFFUL << CoreDebug_DHCSR_DBGKEY_Pos) /*!< CoreDebug DHCSR: DBGKEY Mask */ + +#define CoreDebug_DHCSR_S_RESET_ST_Pos 25U /*!< CoreDebug DHCSR: S_RESET_ST Position */ +#define CoreDebug_DHCSR_S_RESET_ST_Msk (1UL << CoreDebug_DHCSR_S_RESET_ST_Pos) /*!< CoreDebug DHCSR: S_RESET_ST Mask */ + +#define CoreDebug_DHCSR_S_RETIRE_ST_Pos 24U /*!< CoreDebug DHCSR: S_RETIRE_ST Position */ +#define CoreDebug_DHCSR_S_RETIRE_ST_Msk (1UL << CoreDebug_DHCSR_S_RETIRE_ST_Pos) /*!< CoreDebug DHCSR: S_RETIRE_ST Mask */ + +#define CoreDebug_DHCSR_S_LOCKUP_Pos 19U /*!< CoreDebug DHCSR: S_LOCKUP Position */ +#define CoreDebug_DHCSR_S_LOCKUP_Msk (1UL << CoreDebug_DHCSR_S_LOCKUP_Pos) /*!< CoreDebug DHCSR: S_LOCKUP Mask */ + +#define CoreDebug_DHCSR_S_SLEEP_Pos 18U /*!< CoreDebug DHCSR: S_SLEEP Position */ +#define CoreDebug_DHCSR_S_SLEEP_Msk (1UL << CoreDebug_DHCSR_S_SLEEP_Pos) /*!< CoreDebug DHCSR: S_SLEEP Mask */ + +#define CoreDebug_DHCSR_S_HALT_Pos 17U /*!< CoreDebug DHCSR: S_HALT Position */ +#define CoreDebug_DHCSR_S_HALT_Msk (1UL << CoreDebug_DHCSR_S_HALT_Pos) /*!< CoreDebug DHCSR: S_HALT Mask */ + +#define CoreDebug_DHCSR_S_REGRDY_Pos 16U /*!< CoreDebug DHCSR: S_REGRDY Position */ +#define CoreDebug_DHCSR_S_REGRDY_Msk (1UL << CoreDebug_DHCSR_S_REGRDY_Pos) /*!< CoreDebug DHCSR: S_REGRDY Mask */ + +#define CoreDebug_DHCSR_C_SNAPSTALL_Pos 5U /*!< CoreDebug DHCSR: C_SNAPSTALL Position */ +#define CoreDebug_DHCSR_C_SNAPSTALL_Msk (1UL << CoreDebug_DHCSR_C_SNAPSTALL_Pos) /*!< CoreDebug DHCSR: C_SNAPSTALL Mask */ + +#define CoreDebug_DHCSR_C_MASKINTS_Pos 3U /*!< CoreDebug DHCSR: C_MASKINTS Position */ +#define CoreDebug_DHCSR_C_MASKINTS_Msk (1UL << CoreDebug_DHCSR_C_MASKINTS_Pos) /*!< CoreDebug DHCSR: C_MASKINTS Mask */ + +#define CoreDebug_DHCSR_C_STEP_Pos 2U /*!< CoreDebug DHCSR: C_STEP Position */ +#define CoreDebug_DHCSR_C_STEP_Msk (1UL << CoreDebug_DHCSR_C_STEP_Pos) /*!< CoreDebug DHCSR: C_STEP Mask */ + +#define CoreDebug_DHCSR_C_HALT_Pos 1U /*!< CoreDebug DHCSR: C_HALT Position */ +#define CoreDebug_DHCSR_C_HALT_Msk (1UL << CoreDebug_DHCSR_C_HALT_Pos) /*!< CoreDebug DHCSR: C_HALT Mask */ + +#define CoreDebug_DHCSR_C_DEBUGEN_Pos 0U /*!< CoreDebug DHCSR: C_DEBUGEN Position */ +#define CoreDebug_DHCSR_C_DEBUGEN_Msk (1UL /*<< CoreDebug_DHCSR_C_DEBUGEN_Pos*/) /*!< CoreDebug DHCSR: C_DEBUGEN Mask */ + +/* Debug Core Register Selector Register Definitions */ +#define CoreDebug_DCRSR_REGWnR_Pos 16U /*!< CoreDebug DCRSR: REGWnR Position */ +#define CoreDebug_DCRSR_REGWnR_Msk (1UL << CoreDebug_DCRSR_REGWnR_Pos) /*!< CoreDebug DCRSR: REGWnR Mask */ + +#define CoreDebug_DCRSR_REGSEL_Pos 0U /*!< CoreDebug DCRSR: REGSEL Position */ +#define CoreDebug_DCRSR_REGSEL_Msk (0x1FUL /*<< CoreDebug_DCRSR_REGSEL_Pos*/) /*!< CoreDebug DCRSR: REGSEL Mask */ + +/* Debug Exception and Monitor Control Register Definitions */ +#define CoreDebug_DEMCR_TRCENA_Pos 24U /*!< CoreDebug DEMCR: TRCENA Position */ +#define CoreDebug_DEMCR_TRCENA_Msk (1UL << CoreDebug_DEMCR_TRCENA_Pos) /*!< CoreDebug DEMCR: TRCENA Mask */ + +#define CoreDebug_DEMCR_MON_REQ_Pos 19U /*!< CoreDebug DEMCR: MON_REQ Position */ +#define CoreDebug_DEMCR_MON_REQ_Msk (1UL << CoreDebug_DEMCR_MON_REQ_Pos) /*!< CoreDebug DEMCR: MON_REQ Mask */ + +#define CoreDebug_DEMCR_MON_STEP_Pos 18U /*!< CoreDebug DEMCR: MON_STEP Position */ +#define CoreDebug_DEMCR_MON_STEP_Msk (1UL << CoreDebug_DEMCR_MON_STEP_Pos) /*!< CoreDebug DEMCR: MON_STEP Mask */ + +#define CoreDebug_DEMCR_MON_PEND_Pos 17U /*!< CoreDebug DEMCR: MON_PEND Position */ +#define CoreDebug_DEMCR_MON_PEND_Msk (1UL << CoreDebug_DEMCR_MON_PEND_Pos) /*!< CoreDebug DEMCR: MON_PEND Mask */ + +#define CoreDebug_DEMCR_MON_EN_Pos 16U /*!< CoreDebug DEMCR: MON_EN Position */ +#define CoreDebug_DEMCR_MON_EN_Msk (1UL << CoreDebug_DEMCR_MON_EN_Pos) /*!< CoreDebug DEMCR: MON_EN Mask */ + +#define CoreDebug_DEMCR_VC_HARDERR_Pos 10U /*!< CoreDebug DEMCR: VC_HARDERR Position */ +#define CoreDebug_DEMCR_VC_HARDERR_Msk (1UL << CoreDebug_DEMCR_VC_HARDERR_Pos) /*!< CoreDebug DEMCR: VC_HARDERR Mask */ + +#define CoreDebug_DEMCR_VC_INTERR_Pos 9U /*!< CoreDebug DEMCR: VC_INTERR Position */ +#define CoreDebug_DEMCR_VC_INTERR_Msk (1UL << CoreDebug_DEMCR_VC_INTERR_Pos) /*!< CoreDebug DEMCR: VC_INTERR Mask */ + +#define CoreDebug_DEMCR_VC_BUSERR_Pos 8U /*!< CoreDebug DEMCR: VC_BUSERR Position */ +#define CoreDebug_DEMCR_VC_BUSERR_Msk (1UL << CoreDebug_DEMCR_VC_BUSERR_Pos) /*!< CoreDebug DEMCR: VC_BUSERR Mask */ + +#define CoreDebug_DEMCR_VC_STATERR_Pos 7U /*!< CoreDebug DEMCR: VC_STATERR Position */ +#define CoreDebug_DEMCR_VC_STATERR_Msk (1UL << CoreDebug_DEMCR_VC_STATERR_Pos) /*!< CoreDebug DEMCR: VC_STATERR Mask */ + +#define CoreDebug_DEMCR_VC_CHKERR_Pos 6U /*!< CoreDebug DEMCR: VC_CHKERR Position */ +#define CoreDebug_DEMCR_VC_CHKERR_Msk (1UL << CoreDebug_DEMCR_VC_CHKERR_Pos) /*!< CoreDebug DEMCR: VC_CHKERR Mask */ + +#define CoreDebug_DEMCR_VC_NOCPERR_Pos 5U /*!< CoreDebug DEMCR: VC_NOCPERR Position */ +#define CoreDebug_DEMCR_VC_NOCPERR_Msk (1UL << CoreDebug_DEMCR_VC_NOCPERR_Pos) /*!< CoreDebug DEMCR: VC_NOCPERR Mask */ + +#define CoreDebug_DEMCR_VC_MMERR_Pos 4U /*!< CoreDebug DEMCR: VC_MMERR Position */ +#define CoreDebug_DEMCR_VC_MMERR_Msk (1UL << CoreDebug_DEMCR_VC_MMERR_Pos) /*!< CoreDebug DEMCR: VC_MMERR Mask */ + +#define CoreDebug_DEMCR_VC_CORERESET_Pos 0U /*!< CoreDebug DEMCR: VC_CORERESET Position */ +#define CoreDebug_DEMCR_VC_CORERESET_Msk (1UL /*<< CoreDebug_DEMCR_VC_CORERESET_Pos*/) /*!< CoreDebug DEMCR: VC_CORERESET Mask */ + +/*@} end of group CMSIS_CoreDebug */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_bitfield Core register bit field macros + \brief Macros for use with bit field definitions (xxx_Pos, xxx_Msk). + @{ + */ + +/** + \brief Mask and shift a bit field value for use in a register bit range. + \param[in] field Name of the register bit field. + \param[in] value Value of the bit field. This parameter is interpreted as an uint32_t type. + \return Masked and shifted value. +*/ +#define _VAL2FLD(field, value) (((uint32_t)(value) << field ## _Pos) & field ## _Msk) + +/** + \brief Mask and shift a register value to extract a bit filed value. + \param[in] field Name of the register bit field. + \param[in] value Value of register. This parameter is interpreted as an uint32_t type. + \return Masked and shifted bit field value. +*/ +#define _FLD2VAL(field, value) (((uint32_t)(value) & field ## _Msk) >> field ## _Pos) + +/*@} end of group CMSIS_core_bitfield */ + + +/** + \ingroup CMSIS_core_register + \defgroup CMSIS_core_base Core Definitions + \brief Definitions for base addresses, unions, and structures. + @{ + */ + +/* Memory mapping of Core Hardware */ +#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */ +#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */ +#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */ +#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */ +#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */ +#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */ +#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */ +#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */ + +#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */ +#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */ +#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */ +#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */ +#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */ +#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */ +#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */ +#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */ + +#if defined (__MPU_PRESENT) && (__MPU_PRESENT == 1U) + #define MPU_BASE (SCS_BASE + 0x0D90UL) /*!< Memory Protection Unit */ + #define MPU ((MPU_Type *) MPU_BASE ) /*!< Memory Protection Unit */ +#endif + +/*@} */ + + + +/******************************************************************************* + * Hardware Abstraction Layer + Core Function Interface contains: + - Core NVIC Functions + - Core SysTick Functions + - Core Debug Functions + - Core Register Access Functions + ******************************************************************************/ +/** + \defgroup CMSIS_Core_FunctionInterface Functions and Instructions Reference +*/ + + + +/* ########################## NVIC functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_NVICFunctions NVIC Functions + \brief Functions that manage interrupts and exceptions via the NVIC. + @{ + */ + +#ifdef CMSIS_NVIC_VIRTUAL + #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE + #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h" + #endif + #include CMSIS_NVIC_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping + #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping + #define NVIC_EnableIRQ __NVIC_EnableIRQ + #define NVIC_GetEnableIRQ __NVIC_GetEnableIRQ + #define NVIC_DisableIRQ __NVIC_DisableIRQ + #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ + #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ + #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ + #define NVIC_GetActive __NVIC_GetActive + #define NVIC_SetPriority __NVIC_SetPriority + #define NVIC_GetPriority __NVIC_GetPriority + #define NVIC_SystemReset __NVIC_SystemReset +#endif /* CMSIS_NVIC_VIRTUAL */ + +#ifdef CMSIS_VECTAB_VIRTUAL + #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE + #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h" + #endif + #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE +#else + #define NVIC_SetVector __NVIC_SetVector + #define NVIC_GetVector __NVIC_GetVector +#endif /* (CMSIS_VECTAB_VIRTUAL) */ + +#define NVIC_USER_IRQ_OFFSET 16 + + +/* The following EXC_RETURN values are saved the LR on exception entry */ +#define EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ +#define EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ +#define EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ + + +/** + \brief Set Priority Grouping + \details Sets the priority grouping field using the required unlock sequence. + The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. + Only values from 0..7 are used. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Priority grouping field. + */ +__STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + uint32_t reg_value; + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + + reg_value = SCB->AIRCR; /* read old register configuration */ + reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ + reg_value = (reg_value | + ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ + SCB->AIRCR = reg_value; +} + + +/** + \brief Get Priority Grouping + \details Reads the priority grouping field from the NVIC Interrupt Controller. + \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). + */ +__STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping(void) +{ + return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); +} + + +/** + \brief Enable Interrupt + \details Enables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_EnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + __COMPILER_BARRIER(); + NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __COMPILER_BARRIER(); + } +} + + +/** + \brief Get Interrupt Enable status + \details Returns a device specific interrupt enable status from the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt is not enabled. + \return 1 Interrupt is enabled. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Disable Interrupt + \details Disables a device specific interrupt in the NVIC interrupt controller. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_DisableIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + __DSB(); + __ISB(); + } +} + + +/** + \brief Get Pending Interrupt + \details Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not pending. + \return 1 Interrupt status is pending. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Pending Interrupt + \details Sets the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Clear Pending Interrupt + \details Clears the pending bit of a device specific interrupt in the NVIC pending register. + \param [in] IRQn Device specific interrupt number. + \note IRQn must not be negative. + */ +__STATIC_INLINE void __NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); + } +} + + +/** + \brief Get Active Interrupt + \details Reads the active register in the NVIC and returns the active bit for the device specific interrupt. + \param [in] IRQn Device specific interrupt number. + \return 0 Interrupt status is not active. + \return 1 Interrupt status is active. + \note IRQn must not be negative. + */ +__STATIC_INLINE uint32_t __NVIC_GetActive(IRQn_Type IRQn) +{ + if ((int32_t)(IRQn) >= 0) + { + return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL)); + } + else + { + return(0U); + } +} + + +/** + \brief Set Interrupt Priority + \details Sets the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + \note The priority cannot be set for every processor exception. + */ +__STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + if ((int32_t)(IRQn) >= 0) + { + NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } + else + { + SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + + +/** + \brief Get Interrupt Priority + \details Reads the priority of a device specific interrupt or a processor exception. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Interrupt Priority. + Value is aligned automatically to the implemented priority bits of the microcontroller. + */ +__STATIC_INLINE uint32_t __NVIC_GetPriority(IRQn_Type IRQn) +{ + + if ((int32_t)(IRQn) >= 0) + { + return(((uint32_t)NVIC->IP[((uint32_t)IRQn)] >> (8U - __NVIC_PRIO_BITS))); + } + else + { + return(((uint32_t)SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] >> (8U - __NVIC_PRIO_BITS))); + } +} + + +/** + \brief Encode Priority + \details Encodes the priority for an interrupt with the given priority group, + preemptive priority value, and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set. + \param [in] PriorityGroup Used priority group. + \param [in] PreemptPriority Preemptive priority value (starting from 0). + \param [in] SubPriority Subpriority value (starting from 0). + \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). + */ +__STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + return ( + ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | + ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) + ); +} + + +/** + \brief Decode Priority + \details Decodes an interrupt priority value with a given priority group to + preemptive priority value and subpriority value. + In case of a conflict between priority grouping and available + priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set. + \param [in] Priority Priority value, which can be retrieved with the function \ref NVIC_GetPriority(). + \param [in] PriorityGroup Used priority group. + \param [out] pPreemptPriority Preemptive priority value (starting from 0). + \param [out] pSubPriority Subpriority value (starting from 0). + */ +__STATIC_INLINE void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* const pPreemptPriority, uint32_t* const pSubPriority) +{ + uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ + uint32_t PreemptPriorityBits; + uint32_t SubPriorityBits; + + PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); + SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); + + *pPreemptPriority = (Priority >> SubPriorityBits) & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL); + *pSubPriority = (Priority ) & (uint32_t)((1UL << (SubPriorityBits )) - 1UL); +} + + +/** + \brief Set Interrupt Vector + \details Sets an interrupt vector in SRAM based interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + VTOR must been relocated to SRAM before. + \param [in] IRQn Interrupt number + \param [in] vector Address of interrupt handler function + */ +__STATIC_INLINE void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) +{ + uint32_t vectors = (uint32_t )SCB->VTOR; + (* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)) = vector; + /* ARM Application Note 321 states that the M3 does not require the architectural barrier */ +} + + +/** + \brief Get Interrupt Vector + \details Reads an interrupt vector from interrupt vector table. + The interrupt number can be positive to specify a device specific interrupt, + or negative to specify a processor exception. + \param [in] IRQn Interrupt number. + \return Address of interrupt handler function + */ +__STATIC_INLINE uint32_t __NVIC_GetVector(IRQn_Type IRQn) +{ + uint32_t vectors = (uint32_t )SCB->VTOR; + return (uint32_t)(* (int *) (vectors + ((int32_t)IRQn + NVIC_USER_IRQ_OFFSET) * 4)); +} + + +/** + \brief System Reset + \details Initiates a system reset request to reset the MCU. + */ +__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void) +{ + __DSB(); /* Ensure all outstanding memory accesses included + buffered write are completed before reset */ + SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | + (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | + SCB_AIRCR_SYSRESETREQ_Msk ); /* Keep priority group unchanged */ + __DSB(); /* Ensure completion of memory access */ + + for(;;) /* wait until reset */ + { + __NOP(); + } +} + +/*@} end of CMSIS_Core_NVICFunctions */ + + +/* ########################## FPU functions #################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_FpuFunctions FPU Functions + \brief Function that provides FPU type. + @{ + */ + +/** + \brief get FPU type + \details returns the FPU type + \returns + - \b 0: No FPU + - \b 1: Single precision FPU + - \b 2: Double + Single precision FPU + */ +__STATIC_INLINE uint32_t SCB_GetFPUType(void) +{ + return 0U; /* No FPU */ +} + + +/*@} end of CMSIS_Core_FpuFunctions */ + + + +/* ################################## SysTick function ############################################ */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_Core_SysTickFunctions SysTick Functions + \brief Functions that configure the System. + @{ + */ + +#if defined (__Vendor_SysTickConfig) && (__Vendor_SysTickConfig == 0U) + +/** + \brief System Tick Configuration + \details Initializes the System Timer and its interrupt, and starts the System Tick Timer. + Counter is in free running mode to generate periodic interrupts. + \param [in] ticks Number of ticks between two interrupts. + \return 0 Function succeeded. + \return 1 Function failed. + \note When the variable __Vendor_SysTickConfig is set to 1, then the + function SysTick_Config is not included. In this case, the file device.h + must contain a vendor-specific implementation of this function. + */ +__STATIC_INLINE uint32_t SysTick_Config(uint32_t ticks) +{ + if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk) + { + return (1UL); /* Reload value impossible */ + } + + SysTick->LOAD = (uint32_t)(ticks - 1UL); /* set reload register */ + NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL); /* set Priority for Systick Interrupt */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_TICKINT_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable SysTick IRQ and SysTick Timer */ + return (0UL); /* Function successful */ +} + +#endif + +/*@} end of CMSIS_Core_SysTickFunctions */ + + + +/* ##################################### Debug In/Output function ########################################### */ +/** + \ingroup CMSIS_Core_FunctionInterface + \defgroup CMSIS_core_DebugFunctions ITM Functions + \brief Functions that access the ITM debug interface. + @{ + */ + +extern volatile int32_t ITM_RxBuffer; /*!< External variable to receive characters. */ +#define ITM_RXBUFFER_EMPTY ((int32_t)0x5AA55AA5U) /*!< Value identifying \ref ITM_RxBuffer is ready for next character. */ + + +/** + \brief ITM Send Character + \details Transmits a character via the ITM channel 0, and + \li Just returns when no debugger is connected that has booked the output. + \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. + \param [in] ch Character to transmit. + \returns Character to transmit. + */ +__STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) +{ + if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ + ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ + { + while (ITM->PORT[0U].u32 == 0UL) + { + __NOP(); + } + ITM->PORT[0U].u8 = (uint8_t)ch; + } + return (ch); +} + + +/** + \brief ITM Receive Character + \details Inputs a character via the external variable \ref ITM_RxBuffer. + \return Received character. + \return -1 No character pending. + */ +__STATIC_INLINE int32_t ITM_ReceiveChar (void) +{ + int32_t ch = -1; /* no character available */ + + if (ITM_RxBuffer != ITM_RXBUFFER_EMPTY) + { + ch = ITM_RxBuffer; + ITM_RxBuffer = ITM_RXBUFFER_EMPTY; /* ready for next character */ + } + + return (ch); +} + + +/** + \brief ITM Check Character + \details Checks whether a character is pending for reading in the variable \ref ITM_RxBuffer. + \return 0 No character available. + \return 1 Character available. + */ +__STATIC_INLINE int32_t ITM_CheckChar (void) +{ + + if (ITM_RxBuffer == ITM_RXBUFFER_EMPTY) + { + return (0); /* no character available */ + } + else + { + return (1); /* character available */ + } +} + +/*@} end of CMSIS_core_DebugFunctions */ + + + + +#ifdef __cplusplus +} +#endif + +#endif /* __CORE_SC300_H_DEPENDANT */ + +#endif /* __CMSIS_GENERIC */ diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/mpu_armv7.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/mpu_armv7.h new file mode 100644 index 0000000..66ef59b --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/mpu_armv7.h @@ -0,0 +1,272 @@ +/****************************************************************************** + * @file mpu_armv7.h + * @brief CMSIS MPU API for Armv7-M MPU + * @version V5.1.0 + * @date 08. March 2019 + ******************************************************************************/ +/* + * Copyright (c) 2017-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef ARM_MPU_ARMV7_H +#define ARM_MPU_ARMV7_H + +#define ARM_MPU_REGION_SIZE_32B ((uint8_t)0x04U) ///!< MPU Region Size 32 Bytes +#define ARM_MPU_REGION_SIZE_64B ((uint8_t)0x05U) ///!< MPU Region Size 64 Bytes +#define ARM_MPU_REGION_SIZE_128B ((uint8_t)0x06U) ///!< MPU Region Size 128 Bytes +#define ARM_MPU_REGION_SIZE_256B ((uint8_t)0x07U) ///!< MPU Region Size 256 Bytes +#define ARM_MPU_REGION_SIZE_512B ((uint8_t)0x08U) ///!< MPU Region Size 512 Bytes +#define ARM_MPU_REGION_SIZE_1KB ((uint8_t)0x09U) ///!< MPU Region Size 1 KByte +#define ARM_MPU_REGION_SIZE_2KB ((uint8_t)0x0AU) ///!< MPU Region Size 2 KBytes +#define ARM_MPU_REGION_SIZE_4KB ((uint8_t)0x0BU) ///!< MPU Region Size 4 KBytes +#define ARM_MPU_REGION_SIZE_8KB ((uint8_t)0x0CU) ///!< MPU Region Size 8 KBytes +#define ARM_MPU_REGION_SIZE_16KB ((uint8_t)0x0DU) ///!< MPU Region Size 16 KBytes +#define ARM_MPU_REGION_SIZE_32KB ((uint8_t)0x0EU) ///!< MPU Region Size 32 KBytes +#define ARM_MPU_REGION_SIZE_64KB ((uint8_t)0x0FU) ///!< MPU Region Size 64 KBytes +#define ARM_MPU_REGION_SIZE_128KB ((uint8_t)0x10U) ///!< MPU Region Size 128 KBytes +#define ARM_MPU_REGION_SIZE_256KB ((uint8_t)0x11U) ///!< MPU Region Size 256 KBytes +#define ARM_MPU_REGION_SIZE_512KB ((uint8_t)0x12U) ///!< MPU Region Size 512 KBytes +#define ARM_MPU_REGION_SIZE_1MB ((uint8_t)0x13U) ///!< MPU Region Size 1 MByte +#define ARM_MPU_REGION_SIZE_2MB ((uint8_t)0x14U) ///!< MPU Region Size 2 MBytes +#define ARM_MPU_REGION_SIZE_4MB ((uint8_t)0x15U) ///!< MPU Region Size 4 MBytes +#define ARM_MPU_REGION_SIZE_8MB ((uint8_t)0x16U) ///!< MPU Region Size 8 MBytes +#define ARM_MPU_REGION_SIZE_16MB ((uint8_t)0x17U) ///!< MPU Region Size 16 MBytes +#define ARM_MPU_REGION_SIZE_32MB ((uint8_t)0x18U) ///!< MPU Region Size 32 MBytes +#define ARM_MPU_REGION_SIZE_64MB ((uint8_t)0x19U) ///!< MPU Region Size 64 MBytes +#define ARM_MPU_REGION_SIZE_128MB ((uint8_t)0x1AU) ///!< MPU Region Size 128 MBytes +#define ARM_MPU_REGION_SIZE_256MB ((uint8_t)0x1BU) ///!< MPU Region Size 256 MBytes +#define ARM_MPU_REGION_SIZE_512MB ((uint8_t)0x1CU) ///!< MPU Region Size 512 MBytes +#define ARM_MPU_REGION_SIZE_1GB ((uint8_t)0x1DU) ///!< MPU Region Size 1 GByte +#define ARM_MPU_REGION_SIZE_2GB ((uint8_t)0x1EU) ///!< MPU Region Size 2 GBytes +#define ARM_MPU_REGION_SIZE_4GB ((uint8_t)0x1FU) ///!< MPU Region Size 4 GBytes + +#define ARM_MPU_AP_NONE 0U ///!< MPU Access Permission no access +#define ARM_MPU_AP_PRIV 1U ///!< MPU Access Permission privileged access only +#define ARM_MPU_AP_URO 2U ///!< MPU Access Permission unprivileged access read-only +#define ARM_MPU_AP_FULL 3U ///!< MPU Access Permission full access +#define ARM_MPU_AP_PRO 5U ///!< MPU Access Permission privileged access read-only +#define ARM_MPU_AP_RO 6U ///!< MPU Access Permission read-only access + +/** MPU Region Base Address Register Value +* +* \param Region The region to be configured, number 0 to 15. +* \param BaseAddress The base address for the region. +*/ +#define ARM_MPU_RBAR(Region, BaseAddress) \ + (((BaseAddress) & MPU_RBAR_ADDR_Msk) | \ + ((Region) & MPU_RBAR_REGION_Msk) | \ + (MPU_RBAR_VALID_Msk)) + +/** +* MPU Memory Access Attributes +* +* \param TypeExtField Type extension field, allows you to configure memory access type, for example strongly ordered, peripheral. +* \param IsShareable Region is shareable between multiple bus masters. +* \param IsCacheable Region is cacheable, i.e. its value may be kept in cache. +* \param IsBufferable Region is bufferable, i.e. using write-back caching. Cacheable but non-bufferable regions use write-through policy. +*/ +#define ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable) \ + ((((TypeExtField) << MPU_RASR_TEX_Pos) & MPU_RASR_TEX_Msk) | \ + (((IsShareable) << MPU_RASR_S_Pos) & MPU_RASR_S_Msk) | \ + (((IsCacheable) << MPU_RASR_C_Pos) & MPU_RASR_C_Msk) | \ + (((IsBufferable) << MPU_RASR_B_Pos) & MPU_RASR_B_Msk)) + +/** +* MPU Region Attribute and Size Register Value +* +* \param DisableExec Instruction access disable bit, 1= disable instruction fetches. +* \param AccessPermission Data access permissions, allows you to configure read/write access for User and Privileged mode. +* \param AccessAttributes Memory access attribution, see \ref ARM_MPU_ACCESS_. +* \param SubRegionDisable Sub-region disable field. +* \param Size Region size of the region to be configured, for example 4K, 8K. +*/ +#define ARM_MPU_RASR_EX(DisableExec, AccessPermission, AccessAttributes, SubRegionDisable, Size) \ + ((((DisableExec) << MPU_RASR_XN_Pos) & MPU_RASR_XN_Msk) | \ + (((AccessPermission) << MPU_RASR_AP_Pos) & MPU_RASR_AP_Msk) | \ + (((AccessAttributes) & (MPU_RASR_TEX_Msk | MPU_RASR_S_Msk | MPU_RASR_C_Msk | MPU_RASR_B_Msk))) | \ + (((SubRegionDisable) << MPU_RASR_SRD_Pos) & MPU_RASR_SRD_Msk) | \ + (((Size) << MPU_RASR_SIZE_Pos) & MPU_RASR_SIZE_Msk) | \ + (((MPU_RASR_ENABLE_Msk)))) + +/** +* MPU Region Attribute and Size Register Value +* +* \param DisableExec Instruction access disable bit, 1= disable instruction fetches. +* \param AccessPermission Data access permissions, allows you to configure read/write access for User and Privileged mode. +* \param TypeExtField Type extension field, allows you to configure memory access type, for example strongly ordered, peripheral. +* \param IsShareable Region is shareable between multiple bus masters. +* \param IsCacheable Region is cacheable, i.e. its value may be kept in cache. +* \param IsBufferable Region is bufferable, i.e. using write-back caching. Cacheable but non-bufferable regions use write-through policy. +* \param SubRegionDisable Sub-region disable field. +* \param Size Region size of the region to be configured, for example 4K, 8K. +*/ +#define ARM_MPU_RASR(DisableExec, AccessPermission, TypeExtField, IsShareable, IsCacheable, IsBufferable, SubRegionDisable, Size) \ + ARM_MPU_RASR_EX(DisableExec, AccessPermission, ARM_MPU_ACCESS_(TypeExtField, IsShareable, IsCacheable, IsBufferable), SubRegionDisable, Size) + +/** +* MPU Memory Access Attribute for strongly ordered memory. +* - TEX: 000b +* - Shareable +* - Non-cacheable +* - Non-bufferable +*/ +#define ARM_MPU_ACCESS_ORDERED ARM_MPU_ACCESS_(0U, 1U, 0U, 0U) + +/** +* MPU Memory Access Attribute for device memory. +* - TEX: 000b (if shareable) or 010b (if non-shareable) +* - Shareable or non-shareable +* - Non-cacheable +* - Bufferable (if shareable) or non-bufferable (if non-shareable) +* +* \param IsShareable Configures the device memory as shareable or non-shareable. +*/ +#define ARM_MPU_ACCESS_DEVICE(IsShareable) ((IsShareable) ? ARM_MPU_ACCESS_(0U, 1U, 0U, 1U) : ARM_MPU_ACCESS_(2U, 0U, 0U, 0U)) + +/** +* MPU Memory Access Attribute for normal memory. +* - TEX: 1BBb (reflecting outer cacheability rules) +* - Shareable or non-shareable +* - Cacheable or non-cacheable (reflecting inner cacheability rules) +* - Bufferable or non-bufferable (reflecting inner cacheability rules) +* +* \param OuterCp Configures the outer cache policy. +* \param InnerCp Configures the inner cache policy. +* \param IsShareable Configures the memory as shareable or non-shareable. +*/ +#define ARM_MPU_ACCESS_NORMAL(OuterCp, InnerCp, IsShareable) ARM_MPU_ACCESS_((4U | (OuterCp)), IsShareable, ((InnerCp) & 2U), ((InnerCp) & 1U)) + +/** +* MPU Memory Access Attribute non-cacheable policy. +*/ +#define ARM_MPU_CACHEP_NOCACHE 0U + +/** +* MPU Memory Access Attribute write-back, write and read allocate policy. +*/ +#define ARM_MPU_CACHEP_WB_WRA 1U + +/** +* MPU Memory Access Attribute write-through, no write allocate policy. +*/ +#define ARM_MPU_CACHEP_WT_NWA 2U + +/** +* MPU Memory Access Attribute write-back, no write allocate policy. +*/ +#define ARM_MPU_CACHEP_WB_NWA 3U + + +/** +* Struct for a single MPU Region +*/ +typedef struct { + uint32_t RBAR; //!< The region base address register value (RBAR) + uint32_t RASR; //!< The region attribute and size register value (RASR) \ref MPU_RASR +} ARM_MPU_Region_t; + +/** Enable the MPU. +* \param MPU_Control Default access permissions for unconfigured regions. +*/ +__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control) +{ + MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; +#endif + __DSB(); + __ISB(); +} + +/** Disable the MPU. +*/ +__STATIC_INLINE void ARM_MPU_Disable(void) +{ + __DMB(); +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; +#endif + MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk; +} + +/** Clear and disable the given MPU region. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr) +{ + MPU->RNR = rnr; + MPU->RASR = 0U; +} + +/** Configure an MPU region. +* \param rbar Value for RBAR register. +* \param rsar Value for RSAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rbar, uint32_t rasr) +{ + MPU->RBAR = rbar; + MPU->RASR = rasr; +} + +/** Configure the given MPU region. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rsar Value for RSAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegionEx(uint32_t rnr, uint32_t rbar, uint32_t rasr) +{ + MPU->RNR = rnr; + MPU->RBAR = rbar; + MPU->RASR = rasr; +} + +/** Memcopy with strictly ordered memory access, e.g. for register targets. +* \param dst Destination data is copied to. +* \param src Source data is copied from. +* \param len Amount of data words to be copied. +*/ +__STATIC_INLINE void ARM_MPU_OrderedMemcpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len) +{ + uint32_t i; + for (i = 0U; i < len; ++i) + { + dst[i] = src[i]; + } +} + +/** Load the given number of MPU regions from a table. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_Load(ARM_MPU_Region_t const* table, uint32_t cnt) +{ + const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U; + while (cnt > MPU_TYPE_RALIASES) { + ARM_MPU_OrderedMemcpy(&(MPU->RBAR), &(table->RBAR), MPU_TYPE_RALIASES*rowWordSize); + table += MPU_TYPE_RALIASES; + cnt -= MPU_TYPE_RALIASES; + } + ARM_MPU_OrderedMemcpy(&(MPU->RBAR), &(table->RBAR), cnt*rowWordSize); +} + +#endif diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/mpu_armv8.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/mpu_armv8.h new file mode 100644 index 0000000..0041d4d --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/mpu_armv8.h @@ -0,0 +1,346 @@ +/****************************************************************************** + * @file mpu_armv8.h + * @brief CMSIS MPU API for Armv8-M and Armv8.1-M MPU + * @version V5.1.0 + * @date 08. March 2019 + ******************************************************************************/ +/* + * Copyright (c) 2017-2019 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef ARM_MPU_ARMV8_H +#define ARM_MPU_ARMV8_H + +/** \brief Attribute for device memory (outer only) */ +#define ARM_MPU_ATTR_DEVICE ( 0U ) + +/** \brief Attribute for non-cacheable, normal memory */ +#define ARM_MPU_ATTR_NON_CACHEABLE ( 4U ) + +/** \brief Attribute for normal memory (outer and inner) +* \param NT Non-Transient: Set to 1 for non-transient data. +* \param WB Write-Back: Set to 1 to use write-back update policy. +* \param RA Read Allocation: Set to 1 to use cache allocation on read miss. +* \param WA Write Allocation: Set to 1 to use cache allocation on write miss. +*/ +#define ARM_MPU_ATTR_MEMORY_(NT, WB, RA, WA) \ + (((NT & 1U) << 3U) | ((WB & 1U) << 2U) | ((RA & 1U) << 1U) | (WA & 1U)) + +/** \brief Device memory type non Gathering, non Re-ordering, non Early Write Acknowledgement */ +#define ARM_MPU_ATTR_DEVICE_nGnRnE (0U) + +/** \brief Device memory type non Gathering, non Re-ordering, Early Write Acknowledgement */ +#define ARM_MPU_ATTR_DEVICE_nGnRE (1U) + +/** \brief Device memory type non Gathering, Re-ordering, Early Write Acknowledgement */ +#define ARM_MPU_ATTR_DEVICE_nGRE (2U) + +/** \brief Device memory type Gathering, Re-ordering, Early Write Acknowledgement */ +#define ARM_MPU_ATTR_DEVICE_GRE (3U) + +/** \brief Memory Attribute +* \param O Outer memory attributes +* \param I O == ARM_MPU_ATTR_DEVICE: Device memory attributes, else: Inner memory attributes +*/ +#define ARM_MPU_ATTR(O, I) (((O & 0xFU) << 4U) | (((O & 0xFU) != 0U) ? (I & 0xFU) : ((I & 0x3U) << 2U))) + +/** \brief Normal memory non-shareable */ +#define ARM_MPU_SH_NON (0U) + +/** \brief Normal memory outer shareable */ +#define ARM_MPU_SH_OUTER (2U) + +/** \brief Normal memory inner shareable */ +#define ARM_MPU_SH_INNER (3U) + +/** \brief Memory access permissions +* \param RO Read-Only: Set to 1 for read-only memory. +* \param NP Non-Privileged: Set to 1 for non-privileged memory. +*/ +#define ARM_MPU_AP_(RO, NP) (((RO & 1U) << 1U) | (NP & 1U)) + +/** \brief Region Base Address Register value +* \param BASE The base address bits [31:5] of a memory region. The value is zero extended. Effective address gets 32 byte aligned. +* \param SH Defines the Shareability domain for this memory region. +* \param RO Read-Only: Set to 1 for a read-only memory region. +* \param NP Non-Privileged: Set to 1 for a non-privileged memory region. +* \oaram XN eXecute Never: Set to 1 for a non-executable memory region. +*/ +#define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \ + ((BASE & MPU_RBAR_BASE_Msk) | \ + ((SH << MPU_RBAR_SH_Pos) & MPU_RBAR_SH_Msk) | \ + ((ARM_MPU_AP_(RO, NP) << MPU_RBAR_AP_Pos) & MPU_RBAR_AP_Msk) | \ + ((XN << MPU_RBAR_XN_Pos) & MPU_RBAR_XN_Msk)) + +/** \brief Region Limit Address Register value +* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended. +* \param IDX The attribute index to be associated with this memory region. +*/ +#define ARM_MPU_RLAR(LIMIT, IDX) \ + ((LIMIT & MPU_RLAR_LIMIT_Msk) | \ + ((IDX << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \ + (MPU_RLAR_EN_Msk)) + +#if defined(MPU_RLAR_PXN_Pos) + +/** \brief Region Limit Address Register with PXN value +* \param LIMIT The limit address bits [31:5] for this memory region. The value is one extended. +* \param PXN Privileged execute never. Defines whether code can be executed from this privileged region. +* \param IDX The attribute index to be associated with this memory region. +*/ +#define ARM_MPU_RLAR_PXN(LIMIT, PXN, IDX) \ + ((LIMIT & MPU_RLAR_LIMIT_Msk) | \ + ((PXN << MPU_RLAR_PXN_Pos) & MPU_RLAR_PXN_Msk) | \ + ((IDX << MPU_RLAR_AttrIndx_Pos) & MPU_RLAR_AttrIndx_Msk) | \ + (MPU_RLAR_EN_Msk)) + +#endif + +/** +* Struct for a single MPU Region +*/ +typedef struct { + uint32_t RBAR; /*!< Region Base Address Register value */ + uint32_t RLAR; /*!< Region Limit Address Register value */ +} ARM_MPU_Region_t; + +/** Enable the MPU. +* \param MPU_Control Default access permissions for unconfigured regions. +*/ +__STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control) +{ + MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; +#endif + __DSB(); + __ISB(); +} + +/** Disable the MPU. +*/ +__STATIC_INLINE void ARM_MPU_Disable(void) +{ + __DMB(); +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; +#endif + MPU->CTRL &= ~MPU_CTRL_ENABLE_Msk; +} + +#ifdef MPU_NS +/** Enable the Non-secure MPU. +* \param MPU_Control Default access permissions for unconfigured regions. +*/ +__STATIC_INLINE void ARM_MPU_Enable_NS(uint32_t MPU_Control) +{ + MPU_NS->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB_NS->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; +#endif + __DSB(); + __ISB(); +} + +/** Disable the Non-secure MPU. +*/ +__STATIC_INLINE void ARM_MPU_Disable_NS(void) +{ + __DMB(); +#ifdef SCB_SHCSR_MEMFAULTENA_Msk + SCB_NS->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; +#endif + MPU_NS->CTRL &= ~MPU_CTRL_ENABLE_Msk; +} +#endif + +/** Set the memory attribute encoding to the given MPU. +* \param mpu Pointer to the MPU to be configured. +* \param idx The attribute index to be set [0-7] +* \param attr The attribute value to be set. +*/ +__STATIC_INLINE void ARM_MPU_SetMemAttrEx(MPU_Type* mpu, uint8_t idx, uint8_t attr) +{ + const uint8_t reg = idx / 4U; + const uint32_t pos = ((idx % 4U) * 8U); + const uint32_t mask = 0xFFU << pos; + + if (reg >= (sizeof(mpu->MAIR) / sizeof(mpu->MAIR[0]))) { + return; // invalid index + } + + mpu->MAIR[reg] = ((mpu->MAIR[reg] & ~mask) | ((attr << pos) & mask)); +} + +/** Set the memory attribute encoding. +* \param idx The attribute index to be set [0-7] +* \param attr The attribute value to be set. +*/ +__STATIC_INLINE void ARM_MPU_SetMemAttr(uint8_t idx, uint8_t attr) +{ + ARM_MPU_SetMemAttrEx(MPU, idx, attr); +} + +#ifdef MPU_NS +/** Set the memory attribute encoding to the Non-secure MPU. +* \param idx The attribute index to be set [0-7] +* \param attr The attribute value to be set. +*/ +__STATIC_INLINE void ARM_MPU_SetMemAttr_NS(uint8_t idx, uint8_t attr) +{ + ARM_MPU_SetMemAttrEx(MPU_NS, idx, attr); +} +#endif + +/** Clear and disable the given MPU region of the given MPU. +* \param mpu Pointer to MPU to be used. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegionEx(MPU_Type* mpu, uint32_t rnr) +{ + mpu->RNR = rnr; + mpu->RLAR = 0U; +} + +/** Clear and disable the given MPU region. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegion(uint32_t rnr) +{ + ARM_MPU_ClrRegionEx(MPU, rnr); +} + +#ifdef MPU_NS +/** Clear and disable the given Non-secure MPU region. +* \param rnr Region number to be cleared. +*/ +__STATIC_INLINE void ARM_MPU_ClrRegion_NS(uint32_t rnr) +{ + ARM_MPU_ClrRegionEx(MPU_NS, rnr); +} +#endif + +/** Configure the given MPU region of the given MPU. +* \param mpu Pointer to MPU to be used. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rlar Value for RLAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegionEx(MPU_Type* mpu, uint32_t rnr, uint32_t rbar, uint32_t rlar) +{ + mpu->RNR = rnr; + mpu->RBAR = rbar; + mpu->RLAR = rlar; +} + +/** Configure the given MPU region. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rlar Value for RLAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegion(uint32_t rnr, uint32_t rbar, uint32_t rlar) +{ + ARM_MPU_SetRegionEx(MPU, rnr, rbar, rlar); +} + +#ifdef MPU_NS +/** Configure the given Non-secure MPU region. +* \param rnr Region number to be configured. +* \param rbar Value for RBAR register. +* \param rlar Value for RLAR register. +*/ +__STATIC_INLINE void ARM_MPU_SetRegion_NS(uint32_t rnr, uint32_t rbar, uint32_t rlar) +{ + ARM_MPU_SetRegionEx(MPU_NS, rnr, rbar, rlar); +} +#endif + +/** Memcopy with strictly ordered memory access, e.g. for register targets. +* \param dst Destination data is copied to. +* \param src Source data is copied from. +* \param len Amount of data words to be copied. +*/ +__STATIC_INLINE void ARM_MPU_OrderedMemcpy(volatile uint32_t* dst, const uint32_t* __RESTRICT src, uint32_t len) +{ + uint32_t i; + for (i = 0U; i < len; ++i) + { + dst[i] = src[i]; + } +} + +/** Load the given number of MPU regions from a table to the given MPU. +* \param mpu Pointer to the MPU registers to be used. +* \param rnr First region number to be configured. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_LoadEx(MPU_Type* mpu, uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) +{ + const uint32_t rowWordSize = sizeof(ARM_MPU_Region_t)/4U; + if (cnt == 1U) { + mpu->RNR = rnr; + ARM_MPU_OrderedMemcpy(&(mpu->RBAR), &(table->RBAR), rowWordSize); + } else { + uint32_t rnrBase = rnr & ~(MPU_TYPE_RALIASES-1U); + uint32_t rnrOffset = rnr % MPU_TYPE_RALIASES; + + mpu->RNR = rnrBase; + while ((rnrOffset + cnt) > MPU_TYPE_RALIASES) { + uint32_t c = MPU_TYPE_RALIASES - rnrOffset; + ARM_MPU_OrderedMemcpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), c*rowWordSize); + table += c; + cnt -= c; + rnrOffset = 0U; + rnrBase += MPU_TYPE_RALIASES; + mpu->RNR = rnrBase; + } + + ARM_MPU_OrderedMemcpy(&(mpu->RBAR)+(rnrOffset*2U), &(table->RBAR), cnt*rowWordSize); + } +} + +/** Load the given number of MPU regions from a table. +* \param rnr First region number to be configured. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_Load(uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) +{ + ARM_MPU_LoadEx(MPU, rnr, table, cnt); +} + +#ifdef MPU_NS +/** Load the given number of MPU regions from a table to the Non-secure MPU. +* \param rnr First region number to be configured. +* \param table Pointer to the MPU configuration table. +* \param cnt Amount of regions to be configured. +*/ +__STATIC_INLINE void ARM_MPU_Load_NS(uint32_t rnr, ARM_MPU_Region_t const* table, uint32_t cnt) +{ + ARM_MPU_LoadEx(MPU_NS, rnr, table, cnt); +} +#endif + +#endif + diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/Include/tz_context.h b/firmware/memory_chip_gone/Drivers/CMSIS/Include/tz_context.h new file mode 100644 index 0000000..0d09749 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/Include/tz_context.h @@ -0,0 +1,70 @@ +/****************************************************************************** + * @file tz_context.h + * @brief Context Management for Armv8-M TrustZone + * @version V1.0.1 + * @date 10. January 2018 + ******************************************************************************/ +/* + * Copyright (c) 2017-2018 Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the License); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if defined ( __ICCARM__ ) + #pragma system_include /* treat file as system include file for MISRA check */ +#elif defined (__clang__) + #pragma clang system_header /* treat file as system include file */ +#endif + +#ifndef TZ_CONTEXT_H +#define TZ_CONTEXT_H + +#include + +#ifndef TZ_MODULEID_T +#define TZ_MODULEID_T +/// \details Data type that identifies secure software modules called by a process. +typedef uint32_t TZ_ModuleId_t; +#endif + +/// \details TZ Memory ID identifies an allocated memory slot. +typedef uint32_t TZ_MemoryId_t; + +/// Initialize secure context memory system +/// \return execution status (1: success, 0: error) +uint32_t TZ_InitContextSystem_S (void); + +/// Allocate context memory for calling secure software modules in TrustZone +/// \param[in] module identifies software modules called from non-secure mode +/// \return value != 0 id TrustZone memory slot identifier +/// \return value 0 no memory available or internal error +TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module); + +/// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S +/// \param[in] id TrustZone memory slot identifier +/// \return execution status (1: success, 0: error) +uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id); + +/// Load secure context (called on RTOS thread context switch) +/// \param[in] id TrustZone memory slot identifier +/// \return execution status (1: success, 0: error) +uint32_t TZ_LoadContext_S (TZ_MemoryId_t id); + +/// Store secure context (called on RTOS thread context switch) +/// \param[in] id TrustZone memory slot identifier +/// \return execution status (1: success, 0: error) +uint32_t TZ_StoreContext_S (TZ_MemoryId_t id); + +#endif // TZ_CONTEXT_H diff --git a/firmware/memory_chip_gone/Drivers/CMSIS/LICENSE.txt b/firmware/memory_chip_gone/Drivers/CMSIS/LICENSE.txt new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/CMSIS/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h new file mode 100644 index 0000000..09855d2 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h @@ -0,0 +1,4424 @@ +/** + ****************************************************************************** + * @file stm32_hal_legacy.h + * @author MCD Application Team + * @brief This file contains aliases definition for the STM32Cube HAL constants + * macros and functions maintained for legacy purpose. + ****************************************************************************** + * @attention + * + * Copyright (c) 2021 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32_HAL_LEGACY +#define STM32_HAL_LEGACY + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup HAL_AES_Aliased_Defines HAL CRYP Aliased Defines maintained for legacy purpose + * @{ + */ +#define AES_FLAG_RDERR CRYP_FLAG_RDERR +#define AES_FLAG_WRERR CRYP_FLAG_WRERR +#define AES_CLEARFLAG_CCF CRYP_CLEARFLAG_CCF +#define AES_CLEARFLAG_RDERR CRYP_CLEARFLAG_RDERR +#define AES_CLEARFLAG_WRERR CRYP_CLEARFLAG_WRERR +#if defined(STM32H7) || defined(STM32MP1) +#define CRYP_DATATYPE_32B CRYP_NO_SWAP +#define CRYP_DATATYPE_16B CRYP_HALFWORD_SWAP +#define CRYP_DATATYPE_8B CRYP_BYTE_SWAP +#define CRYP_DATATYPE_1B CRYP_BIT_SWAP +#endif /* STM32H7 || STM32MP1 */ +/** + * @} + */ + +/** @defgroup HAL_ADC_Aliased_Defines HAL ADC Aliased Defines maintained for legacy purpose + * @{ + */ +#define ADC_RESOLUTION12b ADC_RESOLUTION_12B +#define ADC_RESOLUTION10b ADC_RESOLUTION_10B +#define ADC_RESOLUTION8b ADC_RESOLUTION_8B +#define ADC_RESOLUTION6b ADC_RESOLUTION_6B +#define OVR_DATA_OVERWRITTEN ADC_OVR_DATA_OVERWRITTEN +#define OVR_DATA_PRESERVED ADC_OVR_DATA_PRESERVED +#define EOC_SINGLE_CONV ADC_EOC_SINGLE_CONV +#define EOC_SEQ_CONV ADC_EOC_SEQ_CONV +#define EOC_SINGLE_SEQ_CONV ADC_EOC_SINGLE_SEQ_CONV +#define REGULAR_GROUP ADC_REGULAR_GROUP +#define INJECTED_GROUP ADC_INJECTED_GROUP +#define REGULAR_INJECTED_GROUP ADC_REGULAR_INJECTED_GROUP +#define AWD_EVENT ADC_AWD_EVENT +#define AWD1_EVENT ADC_AWD1_EVENT +#define AWD2_EVENT ADC_AWD2_EVENT +#define AWD3_EVENT ADC_AWD3_EVENT +#define OVR_EVENT ADC_OVR_EVENT +#define JQOVF_EVENT ADC_JQOVF_EVENT +#define ALL_CHANNELS ADC_ALL_CHANNELS +#define REGULAR_CHANNELS ADC_REGULAR_CHANNELS +#define INJECTED_CHANNELS ADC_INJECTED_CHANNELS +#define SYSCFG_FLAG_SENSOR_ADC ADC_FLAG_SENSOR +#define SYSCFG_FLAG_VREF_ADC ADC_FLAG_VREFINT +#define ADC_CLOCKPRESCALER_PCLK_DIV1 ADC_CLOCK_SYNC_PCLK_DIV1 +#define ADC_CLOCKPRESCALER_PCLK_DIV2 ADC_CLOCK_SYNC_PCLK_DIV2 +#define ADC_CLOCKPRESCALER_PCLK_DIV4 ADC_CLOCK_SYNC_PCLK_DIV4 +#define ADC_CLOCKPRESCALER_PCLK_DIV6 ADC_CLOCK_SYNC_PCLK_DIV6 +#define ADC_CLOCKPRESCALER_PCLK_DIV8 ADC_CLOCK_SYNC_PCLK_DIV8 +#define ADC_EXTERNALTRIG0_T6_TRGO ADC_EXTERNALTRIGCONV_T6_TRGO +#define ADC_EXTERNALTRIG1_T21_CC2 ADC_EXTERNALTRIGCONV_T21_CC2 +#define ADC_EXTERNALTRIG2_T2_TRGO ADC_EXTERNALTRIGCONV_T2_TRGO +#define ADC_EXTERNALTRIG3_T2_CC4 ADC_EXTERNALTRIGCONV_T2_CC4 +#define ADC_EXTERNALTRIG4_T22_TRGO ADC_EXTERNALTRIGCONV_T22_TRGO +#define ADC_EXTERNALTRIG7_EXT_IT11 ADC_EXTERNALTRIGCONV_EXT_IT11 +#define ADC_CLOCK_ASYNC ADC_CLOCK_ASYNC_DIV1 +#define ADC_EXTERNALTRIG_EDGE_NONE ADC_EXTERNALTRIGCONVEDGE_NONE +#define ADC_EXTERNALTRIG_EDGE_RISING ADC_EXTERNALTRIGCONVEDGE_RISING +#define ADC_EXTERNALTRIG_EDGE_FALLING ADC_EXTERNALTRIGCONVEDGE_FALLING +#define ADC_EXTERNALTRIG_EDGE_RISINGFALLING ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING +#define ADC_SAMPLETIME_2CYCLE_5 ADC_SAMPLETIME_2CYCLES_5 + +#define HAL_ADC_STATE_BUSY_REG HAL_ADC_STATE_REG_BUSY +#define HAL_ADC_STATE_BUSY_INJ HAL_ADC_STATE_INJ_BUSY +#define HAL_ADC_STATE_EOC_REG HAL_ADC_STATE_REG_EOC +#define HAL_ADC_STATE_EOC_INJ HAL_ADC_STATE_INJ_EOC +#define HAL_ADC_STATE_ERROR HAL_ADC_STATE_ERROR_INTERNAL +#define HAL_ADC_STATE_BUSY HAL_ADC_STATE_BUSY_INTERNAL +#define HAL_ADC_STATE_AWD HAL_ADC_STATE_AWD1 + +#if defined(STM32H7) +#define ADC_CHANNEL_VBAT_DIV4 ADC_CHANNEL_VBAT +#endif /* STM32H7 */ + +#if defined(STM32U5) +#define ADC_SAMPLETIME_5CYCLE ADC_SAMPLETIME_5CYCLES +#define ADC_SAMPLETIME_391CYCLES_5 ADC_SAMPLETIME_391CYCLES +#define ADC4_SAMPLETIME_160CYCLES_5 ADC4_SAMPLETIME_814CYCLES_5 +#endif /* STM32U5 */ + +#if defined(STM32H5) +#define ADC_CHANNEL_VCORE ADC_CHANNEL_VDDCORE +#endif /* STM32H5 */ +/** + * @} + */ + +/** @defgroup HAL_CEC_Aliased_Defines HAL CEC Aliased Defines maintained for legacy purpose + * @{ + */ + +#define __HAL_CEC_GET_IT __HAL_CEC_GET_FLAG + +/** + * @} + */ + +/** @defgroup HAL_COMP_Aliased_Defines HAL COMP Aliased Defines maintained for legacy purpose + * @{ + */ +#define COMP_WINDOWMODE_DISABLED COMP_WINDOWMODE_DISABLE +#define COMP_WINDOWMODE_ENABLED COMP_WINDOWMODE_ENABLE +#define COMP_EXTI_LINE_COMP1_EVENT COMP_EXTI_LINE_COMP1 +#define COMP_EXTI_LINE_COMP2_EVENT COMP_EXTI_LINE_COMP2 +#define COMP_EXTI_LINE_COMP3_EVENT COMP_EXTI_LINE_COMP3 +#define COMP_EXTI_LINE_COMP4_EVENT COMP_EXTI_LINE_COMP4 +#define COMP_EXTI_LINE_COMP5_EVENT COMP_EXTI_LINE_COMP5 +#define COMP_EXTI_LINE_COMP6_EVENT COMP_EXTI_LINE_COMP6 +#define COMP_EXTI_LINE_COMP7_EVENT COMP_EXTI_LINE_COMP7 +#if defined(STM32L0) +#define COMP_LPTIMCONNECTION_ENABLED ((uint32_t)0x00000003U) /*!< COMPX output generic naming: connected to LPTIM + input 1 for COMP1, LPTIM input 2 for COMP2 */ +#endif +#define COMP_OUTPUT_COMP6TIM2OCREFCLR COMP_OUTPUT_COMP6_TIM2OCREFCLR +#if defined(STM32F373xC) || defined(STM32F378xx) +#define COMP_OUTPUT_TIM3IC1 COMP_OUTPUT_COMP1_TIM3IC1 +#define COMP_OUTPUT_TIM3OCREFCLR COMP_OUTPUT_COMP1_TIM3OCREFCLR +#endif /* STM32F373xC || STM32F378xx */ + +#if defined(STM32L0) || defined(STM32L4) +#define COMP_WINDOWMODE_ENABLE COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON + +#define COMP_NONINVERTINGINPUT_IO1 COMP_INPUT_PLUS_IO1 +#define COMP_NONINVERTINGINPUT_IO2 COMP_INPUT_PLUS_IO2 +#define COMP_NONINVERTINGINPUT_IO3 COMP_INPUT_PLUS_IO3 +#define COMP_NONINVERTINGINPUT_IO4 COMP_INPUT_PLUS_IO4 +#define COMP_NONINVERTINGINPUT_IO5 COMP_INPUT_PLUS_IO5 +#define COMP_NONINVERTINGINPUT_IO6 COMP_INPUT_PLUS_IO6 + +#define COMP_INVERTINGINPUT_1_4VREFINT COMP_INPUT_MINUS_1_4VREFINT +#define COMP_INVERTINGINPUT_1_2VREFINT COMP_INPUT_MINUS_1_2VREFINT +#define COMP_INVERTINGINPUT_3_4VREFINT COMP_INPUT_MINUS_3_4VREFINT +#define COMP_INVERTINGINPUT_VREFINT COMP_INPUT_MINUS_VREFINT +#define COMP_INVERTINGINPUT_DAC1_CH1 COMP_INPUT_MINUS_DAC1_CH1 +#define COMP_INVERTINGINPUT_DAC1_CH2 COMP_INPUT_MINUS_DAC1_CH2 +#define COMP_INVERTINGINPUT_DAC1 COMP_INPUT_MINUS_DAC1_CH1 +#define COMP_INVERTINGINPUT_DAC2 COMP_INPUT_MINUS_DAC1_CH2 +#define COMP_INVERTINGINPUT_IO1 COMP_INPUT_MINUS_IO1 +#if defined(STM32L0) +/* Issue fixed on STM32L0 COMP driver: only 2 dedicated IO (IO1 and IO2), */ +/* IO2 was wrongly assigned to IO shared with DAC and IO3 was corresponding */ +/* to the second dedicated IO (only for COMP2). */ +#define COMP_INVERTINGINPUT_IO2 COMP_INPUT_MINUS_DAC1_CH2 +#define COMP_INVERTINGINPUT_IO3 COMP_INPUT_MINUS_IO2 +#else +#define COMP_INVERTINGINPUT_IO2 COMP_INPUT_MINUS_IO2 +#define COMP_INVERTINGINPUT_IO3 COMP_INPUT_MINUS_IO3 +#endif +#define COMP_INVERTINGINPUT_IO4 COMP_INPUT_MINUS_IO4 +#define COMP_INVERTINGINPUT_IO5 COMP_INPUT_MINUS_IO5 + +#define COMP_OUTPUTLEVEL_LOW COMP_OUTPUT_LEVEL_LOW +#define COMP_OUTPUTLEVEL_HIGH COMP_OUTPUT_LEVEL_HIGH + +/* Note: Literal "COMP_FLAG_LOCK" kept for legacy purpose. */ +/* To check COMP lock state, use macro "__HAL_COMP_IS_LOCKED()". */ +#if defined(COMP_CSR_LOCK) +#define COMP_FLAG_LOCK COMP_CSR_LOCK +#elif defined(COMP_CSR_COMP1LOCK) +#define COMP_FLAG_LOCK COMP_CSR_COMP1LOCK +#elif defined(COMP_CSR_COMPxLOCK) +#define COMP_FLAG_LOCK COMP_CSR_COMPxLOCK +#endif + +#if defined(STM32L4) +#define COMP_BLANKINGSRCE_TIM1OC5 COMP_BLANKINGSRC_TIM1_OC5_COMP1 +#define COMP_BLANKINGSRCE_TIM2OC3 COMP_BLANKINGSRC_TIM2_OC3_COMP1 +#define COMP_BLANKINGSRCE_TIM3OC3 COMP_BLANKINGSRC_TIM3_OC3_COMP1 +#define COMP_BLANKINGSRCE_TIM3OC4 COMP_BLANKINGSRC_TIM3_OC4_COMP2 +#define COMP_BLANKINGSRCE_TIM8OC5 COMP_BLANKINGSRC_TIM8_OC5_COMP2 +#define COMP_BLANKINGSRCE_TIM15OC1 COMP_BLANKINGSRC_TIM15_OC1_COMP2 +#define COMP_BLANKINGSRCE_NONE COMP_BLANKINGSRC_NONE +#endif + +#if defined(STM32L0) +#define COMP_MODE_HIGHSPEED COMP_POWERMODE_MEDIUMSPEED +#define COMP_MODE_LOWSPEED COMP_POWERMODE_ULTRALOWPOWER +#else +#define COMP_MODE_HIGHSPEED COMP_POWERMODE_HIGHSPEED +#define COMP_MODE_MEDIUMSPEED COMP_POWERMODE_MEDIUMSPEED +#define COMP_MODE_LOWPOWER COMP_POWERMODE_LOWPOWER +#define COMP_MODE_ULTRALOWPOWER COMP_POWERMODE_ULTRALOWPOWER +#endif + +#endif + +#if defined(STM32U5) +#define __HAL_COMP_COMP1_EXTI_CLEAR_RASING_FLAG __HAL_COMP_COMP1_EXTI_CLEAR_RISING_FLAG +#endif + +/** + * @} + */ + +/** @defgroup HAL_CORTEX_Aliased_Defines HAL CORTEX Aliased Defines maintained for legacy purpose + * @{ + */ +#define __HAL_CORTEX_SYSTICKCLK_CONFIG HAL_SYSTICK_CLKSourceConfig +#if defined(STM32U5) +#define MPU_DEVICE_nGnRnE MPU_DEVICE_NGNRNE +#define MPU_DEVICE_nGnRE MPU_DEVICE_NGNRE +#define MPU_DEVICE_nGRE MPU_DEVICE_NGRE +#endif /* STM32U5 */ +/** + * @} + */ + +/** @defgroup CRC_Aliases CRC API aliases + * @{ + */ +#if defined(STM32H5) || defined(STM32C0) +#else +#define HAL_CRC_Input_Data_Reverse HAL_CRCEx_Input_Data_Reverse /*!< Aliased to HAL_CRCEx_Input_Data_Reverse for + inter STM32 series compatibility */ +#define HAL_CRC_Output_Data_Reverse HAL_CRCEx_Output_Data_Reverse /*!< Aliased to HAL_CRCEx_Output_Data_Reverse for + inter STM32 series compatibility */ +#endif +/** + * @} + */ + +/** @defgroup HAL_CRC_Aliased_Defines HAL CRC Aliased Defines maintained for legacy purpose + * @{ + */ + +#define CRC_OUTPUTDATA_INVERSION_DISABLED CRC_OUTPUTDATA_INVERSION_DISABLE +#define CRC_OUTPUTDATA_INVERSION_ENABLED CRC_OUTPUTDATA_INVERSION_ENABLE + +/** + * @} + */ + +/** @defgroup HAL_DAC_Aliased_Defines HAL DAC Aliased Defines maintained for legacy purpose + * @{ + */ + +#define DAC1_CHANNEL_1 DAC_CHANNEL_1 +#define DAC1_CHANNEL_2 DAC_CHANNEL_2 +#define DAC2_CHANNEL_1 DAC_CHANNEL_1 +#define DAC_WAVE_NONE 0x00000000U +#define DAC_WAVE_NOISE DAC_CR_WAVE1_0 +#define DAC_WAVE_TRIANGLE DAC_CR_WAVE1_1 +#define DAC_WAVEGENERATION_NONE DAC_WAVE_NONE +#define DAC_WAVEGENERATION_NOISE DAC_WAVE_NOISE +#define DAC_WAVEGENERATION_TRIANGLE DAC_WAVE_TRIANGLE + +#if defined(STM32G4) || defined(STM32H7) || defined (STM32U5) +#define DAC_CHIPCONNECT_DISABLE DAC_CHIPCONNECT_EXTERNAL +#define DAC_CHIPCONNECT_ENABLE DAC_CHIPCONNECT_INTERNAL +#endif + +#if defined(STM32U5) +#define DAC_TRIGGER_STOP_LPTIM1_OUT DAC_TRIGGER_STOP_LPTIM1_CH1 +#define DAC_TRIGGER_STOP_LPTIM3_OUT DAC_TRIGGER_STOP_LPTIM3_CH1 +#define DAC_TRIGGER_LPTIM1_OUT DAC_TRIGGER_LPTIM1_CH1 +#define DAC_TRIGGER_LPTIM3_OUT DAC_TRIGGER_LPTIM3_CH1 +#endif + +#if defined(STM32H5) +#define DAC_TRIGGER_LPTIM1_OUT DAC_TRIGGER_LPTIM1_CH1 +#define DAC_TRIGGER_LPTIM2_OUT DAC_TRIGGER_LPTIM2_CH1 +#endif + +#if defined(STM32L1) || defined(STM32L4) || defined(STM32G0) || defined(STM32L5) || defined(STM32H7) || \ + defined(STM32F4) || defined(STM32G4) +#define HAL_DAC_MSP_INIT_CB_ID HAL_DAC_MSPINIT_CB_ID +#define HAL_DAC_MSP_DEINIT_CB_ID HAL_DAC_MSPDEINIT_CB_ID +#endif + +/** + * @} + */ + +/** @defgroup HAL_DMA_Aliased_Defines HAL DMA Aliased Defines maintained for legacy purpose + * @{ + */ +#define HAL_REMAPDMA_ADC_DMA_CH2 DMA_REMAP_ADC_DMA_CH2 +#define HAL_REMAPDMA_USART1_TX_DMA_CH4 DMA_REMAP_USART1_TX_DMA_CH4 +#define HAL_REMAPDMA_USART1_RX_DMA_CH5 DMA_REMAP_USART1_RX_DMA_CH5 +#define HAL_REMAPDMA_TIM16_DMA_CH4 DMA_REMAP_TIM16_DMA_CH4 +#define HAL_REMAPDMA_TIM17_DMA_CH2 DMA_REMAP_TIM17_DMA_CH2 +#define HAL_REMAPDMA_USART3_DMA_CH32 DMA_REMAP_USART3_DMA_CH32 +#define HAL_REMAPDMA_TIM16_DMA_CH6 DMA_REMAP_TIM16_DMA_CH6 +#define HAL_REMAPDMA_TIM17_DMA_CH7 DMA_REMAP_TIM17_DMA_CH7 +#define HAL_REMAPDMA_SPI2_DMA_CH67 DMA_REMAP_SPI2_DMA_CH67 +#define HAL_REMAPDMA_USART2_DMA_CH67 DMA_REMAP_USART2_DMA_CH67 +#define HAL_REMAPDMA_I2C1_DMA_CH76 DMA_REMAP_I2C1_DMA_CH76 +#define HAL_REMAPDMA_TIM1_DMA_CH6 DMA_REMAP_TIM1_DMA_CH6 +#define HAL_REMAPDMA_TIM2_DMA_CH7 DMA_REMAP_TIM2_DMA_CH7 +#define HAL_REMAPDMA_TIM3_DMA_CH6 DMA_REMAP_TIM3_DMA_CH6 + +#define IS_HAL_REMAPDMA IS_DMA_REMAP +#define __HAL_REMAPDMA_CHANNEL_ENABLE __HAL_DMA_REMAP_CHANNEL_ENABLE +#define __HAL_REMAPDMA_CHANNEL_DISABLE __HAL_DMA_REMAP_CHANNEL_DISABLE + +#if defined(STM32L4) + +#define HAL_DMAMUX1_REQUEST_GEN_EXTI0 HAL_DMAMUX1_REQ_GEN_EXTI0 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI1 HAL_DMAMUX1_REQ_GEN_EXTI1 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI2 HAL_DMAMUX1_REQ_GEN_EXTI2 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI3 HAL_DMAMUX1_REQ_GEN_EXTI3 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI4 HAL_DMAMUX1_REQ_GEN_EXTI4 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI5 HAL_DMAMUX1_REQ_GEN_EXTI5 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI6 HAL_DMAMUX1_REQ_GEN_EXTI6 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI7 HAL_DMAMUX1_REQ_GEN_EXTI7 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI8 HAL_DMAMUX1_REQ_GEN_EXTI8 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI9 HAL_DMAMUX1_REQ_GEN_EXTI9 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI10 HAL_DMAMUX1_REQ_GEN_EXTI10 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI11 HAL_DMAMUX1_REQ_GEN_EXTI11 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI12 HAL_DMAMUX1_REQ_GEN_EXTI12 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI13 HAL_DMAMUX1_REQ_GEN_EXTI13 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI14 HAL_DMAMUX1_REQ_GEN_EXTI14 +#define HAL_DMAMUX1_REQUEST_GEN_EXTI15 HAL_DMAMUX1_REQ_GEN_EXTI15 +#define HAL_DMAMUX1_REQUEST_GEN_DMAMUX1_CH0_EVT HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH0_EVT +#define HAL_DMAMUX1_REQUEST_GEN_DMAMUX1_CH1_EVT HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH1_EVT +#define HAL_DMAMUX1_REQUEST_GEN_DMAMUX1_CH2_EVT HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH2_EVT +#define HAL_DMAMUX1_REQUEST_GEN_DMAMUX1_CH3_EVT HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH3_EVT +#define HAL_DMAMUX1_REQUEST_GEN_LPTIM1_OUT HAL_DMAMUX1_REQ_GEN_LPTIM1_OUT +#define HAL_DMAMUX1_REQUEST_GEN_LPTIM2_OUT HAL_DMAMUX1_REQ_GEN_LPTIM2_OUT +#define HAL_DMAMUX1_REQUEST_GEN_DSI_TE HAL_DMAMUX1_REQ_GEN_DSI_TE +#define HAL_DMAMUX1_REQUEST_GEN_DSI_EOT HAL_DMAMUX1_REQ_GEN_DSI_EOT +#define HAL_DMAMUX1_REQUEST_GEN_DMA2D_EOT HAL_DMAMUX1_REQ_GEN_DMA2D_EOT +#define HAL_DMAMUX1_REQUEST_GEN_LTDC_IT HAL_DMAMUX1_REQ_GEN_LTDC_IT + +#define HAL_DMAMUX_REQUEST_GEN_NO_EVENT HAL_DMAMUX_REQ_GEN_NO_EVENT +#define HAL_DMAMUX_REQUEST_GEN_RISING HAL_DMAMUX_REQ_GEN_RISING +#define HAL_DMAMUX_REQUEST_GEN_FALLING HAL_DMAMUX_REQ_GEN_FALLING +#define HAL_DMAMUX_REQUEST_GEN_RISING_FALLING HAL_DMAMUX_REQ_GEN_RISING_FALLING + +#if defined(STM32L4R5xx) || defined(STM32L4R9xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || \ + defined(STM32L4S7xx) || defined(STM32L4S9xx) +#define DMA_REQUEST_DCMI_PSSI DMA_REQUEST_DCMI +#endif + +#endif /* STM32L4 */ + +#if defined(STM32G0) +#define DMA_REQUEST_DAC1_CHANNEL1 DMA_REQUEST_DAC1_CH1 +#define DMA_REQUEST_DAC1_CHANNEL2 DMA_REQUEST_DAC1_CH2 +#define DMA_REQUEST_TIM16_TRIG_COM DMA_REQUEST_TIM16_COM +#define DMA_REQUEST_TIM17_TRIG_COM DMA_REQUEST_TIM17_COM + +#define LL_DMAMUX_REQ_TIM16_TRIG_COM LL_DMAMUX_REQ_TIM16_COM +#define LL_DMAMUX_REQ_TIM17_TRIG_COM LL_DMAMUX_REQ_TIM17_COM +#endif + +#if defined(STM32H7) + +#define DMA_REQUEST_DAC1 DMA_REQUEST_DAC1_CH1 +#define DMA_REQUEST_DAC2 DMA_REQUEST_DAC1_CH2 + +#define BDMA_REQUEST_LP_UART1_RX BDMA_REQUEST_LPUART1_RX +#define BDMA_REQUEST_LP_UART1_TX BDMA_REQUEST_LPUART1_TX + +#define HAL_DMAMUX1_REQUEST_GEN_DMAMUX1_CH0_EVT HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH0_EVT +#define HAL_DMAMUX1_REQUEST_GEN_DMAMUX1_CH1_EVT HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH1_EVT +#define HAL_DMAMUX1_REQUEST_GEN_DMAMUX1_CH2_EVT HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH2_EVT +#define HAL_DMAMUX1_REQUEST_GEN_LPTIM1_OUT HAL_DMAMUX1_REQ_GEN_LPTIM1_OUT +#define HAL_DMAMUX1_REQUEST_GEN_LPTIM2_OUT HAL_DMAMUX1_REQ_GEN_LPTIM2_OUT +#define HAL_DMAMUX1_REQUEST_GEN_LPTIM3_OUT HAL_DMAMUX1_REQ_GEN_LPTIM3_OUT +#define HAL_DMAMUX1_REQUEST_GEN_EXTI0 HAL_DMAMUX1_REQ_GEN_EXTI0 +#define HAL_DMAMUX1_REQUEST_GEN_TIM12_TRGO HAL_DMAMUX1_REQ_GEN_TIM12_TRGO + +#define HAL_DMAMUX2_REQUEST_GEN_DMAMUX2_CH0_EVT HAL_DMAMUX2_REQ_GEN_DMAMUX2_CH0_EVT +#define HAL_DMAMUX2_REQUEST_GEN_DMAMUX2_CH1_EVT HAL_DMAMUX2_REQ_GEN_DMAMUX2_CH1_EVT +#define HAL_DMAMUX2_REQUEST_GEN_DMAMUX2_CH2_EVT HAL_DMAMUX2_REQ_GEN_DMAMUX2_CH2_EVT +#define HAL_DMAMUX2_REQUEST_GEN_DMAMUX2_CH3_EVT HAL_DMAMUX2_REQ_GEN_DMAMUX2_CH3_EVT +#define HAL_DMAMUX2_REQUEST_GEN_DMAMUX2_CH4_EVT HAL_DMAMUX2_REQ_GEN_DMAMUX2_CH4_EVT +#define HAL_DMAMUX2_REQUEST_GEN_DMAMUX2_CH5_EVT HAL_DMAMUX2_REQ_GEN_DMAMUX2_CH5_EVT +#define HAL_DMAMUX2_REQUEST_GEN_DMAMUX2_CH6_EVT HAL_DMAMUX2_REQ_GEN_DMAMUX2_CH6_EVT +#define HAL_DMAMUX2_REQUEST_GEN_LPUART1_RX_WKUP HAL_DMAMUX2_REQ_GEN_LPUART1_RX_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_LPUART1_TX_WKUP HAL_DMAMUX2_REQ_GEN_LPUART1_TX_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_LPTIM2_WKUP HAL_DMAMUX2_REQ_GEN_LPTIM2_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_LPTIM2_OUT HAL_DMAMUX2_REQ_GEN_LPTIM2_OUT +#define HAL_DMAMUX2_REQUEST_GEN_LPTIM3_WKUP HAL_DMAMUX2_REQ_GEN_LPTIM3_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_LPTIM3_OUT HAL_DMAMUX2_REQ_GEN_LPTIM3_OUT +#define HAL_DMAMUX2_REQUEST_GEN_LPTIM4_WKUP HAL_DMAMUX2_REQ_GEN_LPTIM4_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_LPTIM5_WKUP HAL_DMAMUX2_REQ_GEN_LPTIM5_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_I2C4_WKUP HAL_DMAMUX2_REQ_GEN_I2C4_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_SPI6_WKUP HAL_DMAMUX2_REQ_GEN_SPI6_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_COMP1_OUT HAL_DMAMUX2_REQ_GEN_COMP1_OUT +#define HAL_DMAMUX2_REQUEST_GEN_COMP2_OUT HAL_DMAMUX2_REQ_GEN_COMP2_OUT +#define HAL_DMAMUX2_REQUEST_GEN_RTC_WKUP HAL_DMAMUX2_REQ_GEN_RTC_WKUP +#define HAL_DMAMUX2_REQUEST_GEN_EXTI0 HAL_DMAMUX2_REQ_GEN_EXTI0 +#define HAL_DMAMUX2_REQUEST_GEN_EXTI2 HAL_DMAMUX2_REQ_GEN_EXTI2 +#define HAL_DMAMUX2_REQUEST_GEN_I2C4_IT_EVT HAL_DMAMUX2_REQ_GEN_I2C4_IT_EVT +#define HAL_DMAMUX2_REQUEST_GEN_SPI6_IT HAL_DMAMUX2_REQ_GEN_SPI6_IT +#define HAL_DMAMUX2_REQUEST_GEN_LPUART1_TX_IT HAL_DMAMUX2_REQ_GEN_LPUART1_TX_IT +#define HAL_DMAMUX2_REQUEST_GEN_LPUART1_RX_IT HAL_DMAMUX2_REQ_GEN_LPUART1_RX_IT +#define HAL_DMAMUX2_REQUEST_GEN_ADC3_IT HAL_DMAMUX2_REQ_GEN_ADC3_IT +#define HAL_DMAMUX2_REQUEST_GEN_ADC3_AWD1_OUT HAL_DMAMUX2_REQ_GEN_ADC3_AWD1_OUT +#define HAL_DMAMUX2_REQUEST_GEN_BDMA_CH0_IT HAL_DMAMUX2_REQ_GEN_BDMA_CH0_IT +#define HAL_DMAMUX2_REQUEST_GEN_BDMA_CH1_IT HAL_DMAMUX2_REQ_GEN_BDMA_CH1_IT + +#define HAL_DMAMUX_REQUEST_GEN_NO_EVENT HAL_DMAMUX_REQ_GEN_NO_EVENT +#define HAL_DMAMUX_REQUEST_GEN_RISING HAL_DMAMUX_REQ_GEN_RISING +#define HAL_DMAMUX_REQUEST_GEN_FALLING HAL_DMAMUX_REQ_GEN_FALLING +#define HAL_DMAMUX_REQUEST_GEN_RISING_FALLING HAL_DMAMUX_REQ_GEN_RISING_FALLING + +#define DFSDM_FILTER_EXT_TRIG_LPTIM1 DFSDM_FILTER_EXT_TRIG_LPTIM1_OUT +#define DFSDM_FILTER_EXT_TRIG_LPTIM2 DFSDM_FILTER_EXT_TRIG_LPTIM2_OUT +#define DFSDM_FILTER_EXT_TRIG_LPTIM3 DFSDM_FILTER_EXT_TRIG_LPTIM3_OUT + +#define DAC_TRIGGER_LP1_OUT DAC_TRIGGER_LPTIM1_OUT +#define DAC_TRIGGER_LP2_OUT DAC_TRIGGER_LPTIM2_OUT + +#endif /* STM32H7 */ + +#if defined(STM32U5) +#define GPDMA1_REQUEST_DCMI GPDMA1_REQUEST_DCMI_PSSI +#endif /* STM32U5 */ +/** + * @} + */ + +/** @defgroup HAL_FLASH_Aliased_Defines HAL FLASH Aliased Defines maintained for legacy purpose + * @{ + */ + +#define TYPEPROGRAM_BYTE FLASH_TYPEPROGRAM_BYTE +#define TYPEPROGRAM_HALFWORD FLASH_TYPEPROGRAM_HALFWORD +#define TYPEPROGRAM_WORD FLASH_TYPEPROGRAM_WORD +#define TYPEPROGRAM_DOUBLEWORD FLASH_TYPEPROGRAM_DOUBLEWORD +#define TYPEERASE_SECTORS FLASH_TYPEERASE_SECTORS +#define TYPEERASE_PAGES FLASH_TYPEERASE_PAGES +#define TYPEERASE_PAGEERASE FLASH_TYPEERASE_PAGES +#define TYPEERASE_MASSERASE FLASH_TYPEERASE_MASSERASE +#define WRPSTATE_DISABLE OB_WRPSTATE_DISABLE +#define WRPSTATE_ENABLE OB_WRPSTATE_ENABLE +#define HAL_FLASH_TIMEOUT_VALUE FLASH_TIMEOUT_VALUE +#define OBEX_PCROP OPTIONBYTE_PCROP +#define OBEX_BOOTCONFIG OPTIONBYTE_BOOTCONFIG +#define PCROPSTATE_DISABLE OB_PCROP_STATE_DISABLE +#define PCROPSTATE_ENABLE OB_PCROP_STATE_ENABLE +#define TYPEERASEDATA_BYTE FLASH_TYPEERASEDATA_BYTE +#define TYPEERASEDATA_HALFWORD FLASH_TYPEERASEDATA_HALFWORD +#define TYPEERASEDATA_WORD FLASH_TYPEERASEDATA_WORD +#define TYPEPROGRAMDATA_BYTE FLASH_TYPEPROGRAMDATA_BYTE +#define TYPEPROGRAMDATA_HALFWORD FLASH_TYPEPROGRAMDATA_HALFWORD +#define TYPEPROGRAMDATA_WORD FLASH_TYPEPROGRAMDATA_WORD +#define TYPEPROGRAMDATA_FASTBYTE FLASH_TYPEPROGRAMDATA_FASTBYTE +#define TYPEPROGRAMDATA_FASTHALFWORD FLASH_TYPEPROGRAMDATA_FASTHALFWORD +#define TYPEPROGRAMDATA_FASTWORD FLASH_TYPEPROGRAMDATA_FASTWORD +#if !defined(STM32F2) && !defined(STM32F4) && !defined(STM32F7) && !defined(STM32H7) && !defined(STM32H5) +#define PAGESIZE FLASH_PAGE_SIZE +#endif /* STM32F2 && STM32F4 && STM32F7 && STM32H7 && STM32H5 */ +#define TYPEPROGRAM_FASTBYTE FLASH_TYPEPROGRAM_BYTE +#define TYPEPROGRAM_FASTHALFWORD FLASH_TYPEPROGRAM_HALFWORD +#define TYPEPROGRAM_FASTWORD FLASH_TYPEPROGRAM_WORD +#define VOLTAGE_RANGE_1 FLASH_VOLTAGE_RANGE_1 +#define VOLTAGE_RANGE_2 FLASH_VOLTAGE_RANGE_2 +#define VOLTAGE_RANGE_3 FLASH_VOLTAGE_RANGE_3 +#define VOLTAGE_RANGE_4 FLASH_VOLTAGE_RANGE_4 +#define TYPEPROGRAM_FAST FLASH_TYPEPROGRAM_FAST +#define TYPEPROGRAM_FAST_AND_LAST FLASH_TYPEPROGRAM_FAST_AND_LAST +#define WRPAREA_BANK1_AREAA OB_WRPAREA_BANK1_AREAA +#define WRPAREA_BANK1_AREAB OB_WRPAREA_BANK1_AREAB +#define WRPAREA_BANK2_AREAA OB_WRPAREA_BANK2_AREAA +#define WRPAREA_BANK2_AREAB OB_WRPAREA_BANK2_AREAB +#define IWDG_STDBY_FREEZE OB_IWDG_STDBY_FREEZE +#define IWDG_STDBY_ACTIVE OB_IWDG_STDBY_RUN +#define IWDG_STOP_FREEZE OB_IWDG_STOP_FREEZE +#define IWDG_STOP_ACTIVE OB_IWDG_STOP_RUN +#define FLASH_ERROR_NONE HAL_FLASH_ERROR_NONE +#define FLASH_ERROR_RD HAL_FLASH_ERROR_RD +#define FLASH_ERROR_PG HAL_FLASH_ERROR_PROG +#define FLASH_ERROR_PGP HAL_FLASH_ERROR_PGS +#define FLASH_ERROR_WRP HAL_FLASH_ERROR_WRP +#define FLASH_ERROR_OPTV HAL_FLASH_ERROR_OPTV +#define FLASH_ERROR_OPTVUSR HAL_FLASH_ERROR_OPTVUSR +#define FLASH_ERROR_PROG HAL_FLASH_ERROR_PROG +#define FLASH_ERROR_OP HAL_FLASH_ERROR_OPERATION +#define FLASH_ERROR_PGA HAL_FLASH_ERROR_PGA +#define FLASH_ERROR_SIZE HAL_FLASH_ERROR_SIZE +#define FLASH_ERROR_SIZ HAL_FLASH_ERROR_SIZE +#define FLASH_ERROR_PGS HAL_FLASH_ERROR_PGS +#define FLASH_ERROR_MIS HAL_FLASH_ERROR_MIS +#define FLASH_ERROR_FAST HAL_FLASH_ERROR_FAST +#define FLASH_ERROR_FWWERR HAL_FLASH_ERROR_FWWERR +#define FLASH_ERROR_NOTZERO HAL_FLASH_ERROR_NOTZERO +#define FLASH_ERROR_OPERATION HAL_FLASH_ERROR_OPERATION +#define FLASH_ERROR_ERS HAL_FLASH_ERROR_ERS +#define OB_WDG_SW OB_IWDG_SW +#define OB_WDG_HW OB_IWDG_HW +#define OB_SDADC12_VDD_MONITOR_SET OB_SDACD_VDD_MONITOR_SET +#define OB_SDADC12_VDD_MONITOR_RESET OB_SDACD_VDD_MONITOR_RESET +#define OB_RAM_PARITY_CHECK_SET OB_SRAM_PARITY_SET +#define OB_RAM_PARITY_CHECK_RESET OB_SRAM_PARITY_RESET +#define IS_OB_SDADC12_VDD_MONITOR IS_OB_SDACD_VDD_MONITOR +#define OB_RDP_LEVEL0 OB_RDP_LEVEL_0 +#define OB_RDP_LEVEL1 OB_RDP_LEVEL_1 +#define OB_RDP_LEVEL2 OB_RDP_LEVEL_2 +#if defined(STM32G0) || defined(STM32C0) +#define OB_BOOT_LOCK_DISABLE OB_BOOT_ENTRY_FORCED_NONE +#define OB_BOOT_LOCK_ENABLE OB_BOOT_ENTRY_FORCED_FLASH +#else +#define OB_BOOT_ENTRY_FORCED_NONE OB_BOOT_LOCK_DISABLE +#define OB_BOOT_ENTRY_FORCED_FLASH OB_BOOT_LOCK_ENABLE +#endif +#if defined(STM32H7) +#define FLASH_FLAG_SNECCE_BANK1RR FLASH_FLAG_SNECCERR_BANK1 +#define FLASH_FLAG_DBECCE_BANK1RR FLASH_FLAG_DBECCERR_BANK1 +#define FLASH_FLAG_STRBER_BANK1R FLASH_FLAG_STRBERR_BANK1 +#define FLASH_FLAG_SNECCE_BANK2RR FLASH_FLAG_SNECCERR_BANK2 +#define FLASH_FLAG_DBECCE_BANK2RR FLASH_FLAG_DBECCERR_BANK2 +#define FLASH_FLAG_STRBER_BANK2R FLASH_FLAG_STRBERR_BANK2 +#define FLASH_FLAG_WDW FLASH_FLAG_WBNE +#define OB_WRP_SECTOR_All OB_WRP_SECTOR_ALL +#endif /* STM32H7 */ +#if defined(STM32H7RS) +#define FLASH_OPTKEY1 FLASH_OPT_KEY1 +#define FLASH_OPTKEY2 FLASH_OPT_KEY2 +#endif /* STM32H7RS */ +#if defined(STM32U5) +#define OB_USER_nRST_STOP OB_USER_NRST_STOP +#define OB_USER_nRST_STDBY OB_USER_NRST_STDBY +#define OB_USER_nRST_SHDW OB_USER_NRST_SHDW +#define OB_USER_nSWBOOT0 OB_USER_NSWBOOT0 +#define OB_USER_nBOOT0 OB_USER_NBOOT0 +#define OB_nBOOT0_RESET OB_NBOOT0_RESET +#define OB_nBOOT0_SET OB_NBOOT0_SET +#define OB_USER_SRAM134_RST OB_USER_SRAM_RST +#define OB_SRAM134_RST_ERASE OB_SRAM_RST_ERASE +#define OB_SRAM134_RST_NOT_ERASE OB_SRAM_RST_NOT_ERASE +#endif /* STM32U5 */ +#if defined(STM32U0) +#define OB_USER_nRST_STOP OB_USER_NRST_STOP +#define OB_USER_nRST_STDBY OB_USER_NRST_STDBY +#define OB_USER_nRST_SHDW OB_USER_NRST_SHDW +#define OB_USER_nBOOT_SEL OB_USER_NBOOT_SEL +#define OB_USER_nBOOT0 OB_USER_NBOOT0 +#define OB_USER_nBOOT1 OB_USER_NBOOT1 +#define OB_nBOOT0_RESET OB_NBOOT0_RESET +#define OB_nBOOT0_SET OB_NBOOT0_SET +#endif /* STM32U0 */ +#if defined(STM32H5) +#define FLASH_ECC_AREA_EDATA FLASH_ECC_AREA_EDATA_BANK1 +#endif /* STM32H5 */ + +/** + * @} + */ + +/** @defgroup HAL_JPEG_Aliased_Macros HAL JPEG Aliased Macros maintained for legacy purpose + * @{ + */ + +#if defined(STM32H7) +#define __HAL_RCC_JPEG_CLK_ENABLE __HAL_RCC_JPGDECEN_CLK_ENABLE +#define __HAL_RCC_JPEG_CLK_DISABLE __HAL_RCC_JPGDECEN_CLK_DISABLE +#define __HAL_RCC_JPEG_FORCE_RESET __HAL_RCC_JPGDECRST_FORCE_RESET +#define __HAL_RCC_JPEG_RELEASE_RESET __HAL_RCC_JPGDECRST_RELEASE_RESET +#define __HAL_RCC_JPEG_CLK_SLEEP_ENABLE __HAL_RCC_JPGDEC_CLK_SLEEP_ENABLE +#define __HAL_RCC_JPEG_CLK_SLEEP_DISABLE __HAL_RCC_JPGDEC_CLK_SLEEP_DISABLE +#endif /* STM32H7 */ + +/** + * @} + */ + +/** @defgroup HAL_SYSCFG_Aliased_Defines HAL SYSCFG Aliased Defines maintained for legacy purpose + * @{ + */ + +#define HAL_SYSCFG_FASTMODEPLUS_I2C_PA9 I2C_FASTMODEPLUS_PA9 +#define HAL_SYSCFG_FASTMODEPLUS_I2C_PA10 I2C_FASTMODEPLUS_PA10 +#define HAL_SYSCFG_FASTMODEPLUS_I2C_PB6 I2C_FASTMODEPLUS_PB6 +#define HAL_SYSCFG_FASTMODEPLUS_I2C_PB7 I2C_FASTMODEPLUS_PB7 +#define HAL_SYSCFG_FASTMODEPLUS_I2C_PB8 I2C_FASTMODEPLUS_PB8 +#define HAL_SYSCFG_FASTMODEPLUS_I2C_PB9 I2C_FASTMODEPLUS_PB9 +#define HAL_SYSCFG_FASTMODEPLUS_I2C1 I2C_FASTMODEPLUS_I2C1 +#define HAL_SYSCFG_FASTMODEPLUS_I2C2 I2C_FASTMODEPLUS_I2C2 +#define HAL_SYSCFG_FASTMODEPLUS_I2C3 I2C_FASTMODEPLUS_I2C3 +#if defined(STM32G4) + +#define HAL_SYSCFG_EnableIOAnalogSwitchBooster HAL_SYSCFG_EnableIOSwitchBooster +#define HAL_SYSCFG_DisableIOAnalogSwitchBooster HAL_SYSCFG_DisableIOSwitchBooster +#define HAL_SYSCFG_EnableIOAnalogSwitchVDD HAL_SYSCFG_EnableIOSwitchVDD +#define HAL_SYSCFG_DisableIOAnalogSwitchVDD HAL_SYSCFG_DisableIOSwitchVDD +#endif /* STM32G4 */ + +#if defined(STM32U5) + +#define HAL_SYSCFG_EnableIOAnalogSwitchBooster HAL_SYSCFG_EnableIOAnalogBooster +#define HAL_SYSCFG_DisableIOAnalogSwitchBooster HAL_SYSCFG_DisableIOAnalogBooster +#define HAL_SYSCFG_EnableIOAnalogSwitchVoltageSelection HAL_SYSCFG_EnableIOAnalogVoltageSelection +#define HAL_SYSCFG_DisableIOAnalogSwitchVoltageSelection HAL_SYSCFG_DisableIOAnalogVoltageSelection + +#endif /* STM32U5 */ + +#if defined(STM32H5) +#define SYSCFG_IT_FPU_IOC SBS_IT_FPU_IOC +#define SYSCFG_IT_FPU_DZC SBS_IT_FPU_DZC +#define SYSCFG_IT_FPU_UFC SBS_IT_FPU_UFC +#define SYSCFG_IT_FPU_OFC SBS_IT_FPU_OFC +#define SYSCFG_IT_FPU_IDC SBS_IT_FPU_IDC +#define SYSCFG_IT_FPU_IXC SBS_IT_FPU_IXC + +#define SYSCFG_BREAK_FLASH_ECC SBS_BREAK_FLASH_ECC +#define SYSCFG_BREAK_PVD SBS_BREAK_PVD +#define SYSCFG_BREAK_SRAM_ECC SBS_BREAK_SRAM_ECC +#define SYSCFG_BREAK_LOCKUP SBS_BREAK_LOCKUP + +#define SYSCFG_VREFBUF_VOLTAGE_SCALE0 VREFBUF_VOLTAGE_SCALE0 +#define SYSCFG_VREFBUF_VOLTAGE_SCALE1 VREFBUF_VOLTAGE_SCALE1 +#define SYSCFG_VREFBUF_VOLTAGE_SCALE2 VREFBUF_VOLTAGE_SCALE2 +#define SYSCFG_VREFBUF_VOLTAGE_SCALE3 VREFBUF_VOLTAGE_SCALE3 + +#define SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE VREFBUF_HIGH_IMPEDANCE_DISABLE +#define SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE VREFBUF_HIGH_IMPEDANCE_ENABLE + +#define SYSCFG_FASTMODEPLUS_PB6 SBS_FASTMODEPLUS_PB6 +#define SYSCFG_FASTMODEPLUS_PB7 SBS_FASTMODEPLUS_PB7 +#define SYSCFG_FASTMODEPLUS_PB8 SBS_FASTMODEPLUS_PB8 +#define SYSCFG_FASTMODEPLUS_PB9 SBS_FASTMODEPLUS_PB9 + +#define SYSCFG_ETH_MII SBS_ETH_MII +#define SYSCFG_ETH_RMII SBS_ETH_RMII +#define IS_SYSCFG_ETHERNET_CONFIG IS_SBS_ETHERNET_CONFIG + +#define SYSCFG_MEMORIES_ERASE_FLAG_IPMEE SBS_MEMORIES_ERASE_FLAG_IPMEE +#define SYSCFG_MEMORIES_ERASE_FLAG_MCLR SBS_MEMORIES_ERASE_FLAG_MCLR +#define IS_SYSCFG_MEMORIES_ERASE_FLAG IS_SBS_MEMORIES_ERASE_FLAG + +#define IS_SYSCFG_CODE_CONFIG IS_SBS_CODE_CONFIG + +#define SYSCFG_MPU_NSEC SBS_MPU_NSEC +#define SYSCFG_VTOR_NSEC SBS_VTOR_NSEC +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +#define SYSCFG_SAU SBS_SAU +#define SYSCFG_MPU_SEC SBS_MPU_SEC +#define SYSCFG_VTOR_AIRCR_SEC SBS_VTOR_AIRCR_SEC +#define SYSCFG_LOCK_ALL SBS_LOCK_ALL +#else +#define SYSCFG_LOCK_ALL SBS_LOCK_ALL +#endif /* __ARM_FEATURE_CMSE */ + +#define SYSCFG_CLK SBS_CLK +#define SYSCFG_CLASSB SBS_CLASSB +#define SYSCFG_FPU SBS_FPU +#define SYSCFG_ALL SBS_ALL + +#define SYSCFG_SEC SBS_SEC +#define SYSCFG_NSEC SBS_NSEC + +#define __HAL_SYSCFG_FPU_INTERRUPT_ENABLE __HAL_SBS_FPU_INTERRUPT_ENABLE +#define __HAL_SYSCFG_FPU_INTERRUPT_DISABLE __HAL_SBS_FPU_INTERRUPT_DISABLE + +#define __HAL_SYSCFG_BREAK_ECC_LOCK __HAL_SBS_BREAK_ECC_LOCK +#define __HAL_SYSCFG_BREAK_LOCKUP_LOCK __HAL_SBS_BREAK_LOCKUP_LOCK +#define __HAL_SYSCFG_BREAK_PVD_LOCK __HAL_SBS_BREAK_PVD_LOCK +#define __HAL_SYSCFG_BREAK_SRAM_ECC_LOCK __HAL_SBS_BREAK_SRAM_ECC_LOCK + +#define __HAL_SYSCFG_FASTMODEPLUS_ENABLE __HAL_SBS_FASTMODEPLUS_ENABLE +#define __HAL_SYSCFG_FASTMODEPLUS_DISABLE __HAL_SBS_FASTMODEPLUS_DISABLE + +#define __HAL_SYSCFG_GET_MEMORIES_ERASE_STATUS __HAL_SBS_GET_MEMORIES_ERASE_STATUS +#define __HAL_SYSCFG_CLEAR_MEMORIES_ERASE_STATUS __HAL_SBS_CLEAR_MEMORIES_ERASE_STATUS + +#define IS_SYSCFG_FPU_INTERRUPT IS_SBS_FPU_INTERRUPT +#define IS_SYSCFG_BREAK_CONFIG IS_SBS_BREAK_CONFIG +#define IS_SYSCFG_VREFBUF_VOLTAGE_SCALE IS_VREFBUF_VOLTAGE_SCALE +#define IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE IS_VREFBUF_HIGH_IMPEDANCE +#define IS_SYSCFG_VREFBUF_TRIMMING IS_VREFBUF_TRIMMING +#define IS_SYSCFG_FASTMODEPLUS IS_SBS_FASTMODEPLUS +#define IS_SYSCFG_ITEMS_ATTRIBUTES IS_SBS_ITEMS_ATTRIBUTES +#define IS_SYSCFG_ATTRIBUTES IS_SBS_ATTRIBUTES +#define IS_SYSCFG_LOCK_ITEMS IS_SBS_LOCK_ITEMS + +#define HAL_SYSCFG_VREFBUF_VoltageScalingConfig HAL_VREFBUF_VoltageScalingConfig +#define HAL_SYSCFG_VREFBUF_HighImpedanceConfig HAL_VREFBUF_HighImpedanceConfig +#define HAL_SYSCFG_VREFBUF_TrimmingConfig HAL_VREFBUF_TrimmingConfig +#define HAL_SYSCFG_EnableVREFBUF HAL_EnableVREFBUF +#define HAL_SYSCFG_DisableVREFBUF HAL_DisableVREFBUF + +#define HAL_SYSCFG_EnableIOAnalogSwitchBooster HAL_SBS_EnableIOAnalogSwitchBooster +#define HAL_SYSCFG_DisableIOAnalogSwitchBooster HAL_SBS_DisableIOAnalogSwitchBooster +#define HAL_SYSCFG_ETHInterfaceSelect HAL_SBS_ETHInterfaceSelect + +#define HAL_SYSCFG_Lock HAL_SBS_Lock +#define HAL_SYSCFG_GetLock HAL_SBS_GetLock + +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) +#define HAL_SYSCFG_ConfigAttributes HAL_SBS_ConfigAttributes +#define HAL_SYSCFG_GetConfigAttributes HAL_SBS_GetConfigAttributes +#endif /* __ARM_FEATURE_CMSE */ + +#endif /* STM32H5 */ + + +/** + * @} + */ + + +/** @defgroup LL_FMC_Aliased_Defines LL FMC Aliased Defines maintained for compatibility purpose + * @{ + */ +#if defined(STM32L4) || defined(STM32F7) || defined(STM32H7) || defined(STM32G4) +#define FMC_NAND_PCC_WAIT_FEATURE_DISABLE FMC_NAND_WAIT_FEATURE_DISABLE +#define FMC_NAND_PCC_WAIT_FEATURE_ENABLE FMC_NAND_WAIT_FEATURE_ENABLE +#define FMC_NAND_PCC_MEM_BUS_WIDTH_8 FMC_NAND_MEM_BUS_WIDTH_8 +#define FMC_NAND_PCC_MEM_BUS_WIDTH_16 FMC_NAND_MEM_BUS_WIDTH_16 +#elif defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) +#define FMC_NAND_WAIT_FEATURE_DISABLE FMC_NAND_PCC_WAIT_FEATURE_DISABLE +#define FMC_NAND_WAIT_FEATURE_ENABLE FMC_NAND_PCC_WAIT_FEATURE_ENABLE +#define FMC_NAND_MEM_BUS_WIDTH_8 FMC_NAND_PCC_MEM_BUS_WIDTH_8 +#define FMC_NAND_MEM_BUS_WIDTH_16 FMC_NAND_PCC_MEM_BUS_WIDTH_16 +#endif +/** + * @} + */ + +/** @defgroup LL_FSMC_Aliased_Defines LL FSMC Aliased Defines maintained for legacy purpose + * @{ + */ + +#define FSMC_NORSRAM_TYPEDEF FSMC_NORSRAM_TypeDef +#define FSMC_NORSRAM_EXTENDED_TYPEDEF FSMC_NORSRAM_EXTENDED_TypeDef +/** + * @} + */ + +/** @defgroup HAL_GPIO_Aliased_Macros HAL GPIO Aliased Macros maintained for legacy purpose + * @{ + */ +#define GET_GPIO_SOURCE GPIO_GET_INDEX +#define GET_GPIO_INDEX GPIO_GET_INDEX + +#if defined(STM32F4) +#define GPIO_AF12_SDMMC GPIO_AF12_SDIO +#define GPIO_AF12_SDMMC1 GPIO_AF12_SDIO +#endif + +#if defined(STM32F7) +#define GPIO_AF12_SDIO GPIO_AF12_SDMMC1 +#define GPIO_AF12_SDMMC GPIO_AF12_SDMMC1 +#endif + +#if defined(STM32L4) +#define GPIO_AF12_SDIO GPIO_AF12_SDMMC1 +#define GPIO_AF12_SDMMC GPIO_AF12_SDMMC1 +#endif + +#if defined(STM32H7) +#define GPIO_AF7_SDIO1 GPIO_AF7_SDMMC1 +#define GPIO_AF8_SDIO1 GPIO_AF8_SDMMC1 +#define GPIO_AF12_SDIO1 GPIO_AF12_SDMMC1 +#define GPIO_AF9_SDIO2 GPIO_AF9_SDMMC2 +#define GPIO_AF10_SDIO2 GPIO_AF10_SDMMC2 +#define GPIO_AF11_SDIO2 GPIO_AF11_SDMMC2 + +#if defined (STM32H743xx) || defined (STM32H753xx) || defined (STM32H750xx) || defined (STM32H742xx) || \ + defined (STM32H745xx) || defined (STM32H755xx) || defined (STM32H747xx) || defined (STM32H757xx) +#define GPIO_AF10_OTG2_HS GPIO_AF10_OTG2_FS +#define GPIO_AF10_OTG1_FS GPIO_AF10_OTG1_HS +#define GPIO_AF12_OTG2_FS GPIO_AF12_OTG1_FS +#endif /*STM32H743xx || STM32H753xx || STM32H750xx || STM32H742xx || STM32H745xx || STM32H755xx || STM32H747xx || \ + STM32H757xx */ +#endif /* STM32H7 */ + +#define GPIO_AF0_LPTIM GPIO_AF0_LPTIM1 +#define GPIO_AF1_LPTIM GPIO_AF1_LPTIM1 +#define GPIO_AF2_LPTIM GPIO_AF2_LPTIM1 + +#if defined(STM32L0) || defined(STM32L4) || defined(STM32F4) || defined(STM32F2) || defined(STM32F7) || \ + defined(STM32G4) || defined(STM32H7) || defined(STM32WB) || defined(STM32U5) +#define GPIO_SPEED_LOW GPIO_SPEED_FREQ_LOW +#define GPIO_SPEED_MEDIUM GPIO_SPEED_FREQ_MEDIUM +#define GPIO_SPEED_FAST GPIO_SPEED_FREQ_HIGH +#define GPIO_SPEED_HIGH GPIO_SPEED_FREQ_VERY_HIGH +#endif /* STM32L0 || STM32L4 || STM32F4 || STM32F2 || STM32F7 || STM32G4 || STM32H7 || STM32WB || STM32U5*/ + +#if defined(STM32L1) +#define GPIO_SPEED_VERY_LOW GPIO_SPEED_FREQ_LOW +#define GPIO_SPEED_LOW GPIO_SPEED_FREQ_MEDIUM +#define GPIO_SPEED_MEDIUM GPIO_SPEED_FREQ_HIGH +#define GPIO_SPEED_HIGH GPIO_SPEED_FREQ_VERY_HIGH +#endif /* STM32L1 */ + +#if defined(STM32F0) || defined(STM32F3) || defined(STM32F1) +#define GPIO_SPEED_LOW GPIO_SPEED_FREQ_LOW +#define GPIO_SPEED_MEDIUM GPIO_SPEED_FREQ_MEDIUM +#define GPIO_SPEED_HIGH GPIO_SPEED_FREQ_HIGH +#endif /* STM32F0 || STM32F3 || STM32F1 */ + +#define GPIO_AF6_DFSDM GPIO_AF6_DFSDM1 + +#if defined(STM32U5) || defined(STM32H5) +#define GPIO_AF0_RTC_50Hz GPIO_AF0_RTC_50HZ +#endif /* STM32U5 || STM32H5 */ +#if defined(STM32U5) +#define GPIO_AF0_S2DSTOP GPIO_AF0_SRDSTOP +#define GPIO_AF11_LPGPIO GPIO_AF11_LPGPIO1 +#endif /* STM32U5 */ + +#if defined(STM32WBA) +#define GPIO_AF11_RF_ANTSW0 GPIO_AF11_RF +#define GPIO_AF11_RF_ANTSW1 GPIO_AF11_RF +#define GPIO_AF11_RF_ANTSW2 GPIO_AF11_RF +#define GPIO_AF11_RF_IO1 GPIO_AF11_RF +#define GPIO_AF11_RF_IO2 GPIO_AF11_RF +#define GPIO_AF11_RF_IO3 GPIO_AF11_RF +#define GPIO_AF11_RF_IO4 GPIO_AF11_RF +#define GPIO_AF11_RF_IO5 GPIO_AF11_RF +#define GPIO_AF11_RF_IO6 GPIO_AF11_RF +#define GPIO_AF11_RF_IO7 GPIO_AF11_RF +#define GPIO_AF11_RF_IO8 GPIO_AF11_RF +#define GPIO_AF11_RF_IO9 GPIO_AF11_RF +#endif /* STM32WBA */ +/** + * @} + */ + +/** @defgroup HAL_GTZC_Aliased_Defines HAL GTZC Aliased Defines maintained for legacy purpose + * @{ + */ +#if defined(STM32U5) +#define GTZC_PERIPH_DCMI GTZC_PERIPH_DCMI_PSSI +#define GTZC_PERIPH_LTDC GTZC_PERIPH_LTDCUSB +#endif /* STM32U5 */ +#if defined(STM32H5) +#define GTZC_PERIPH_DAC12 GTZC_PERIPH_DAC1 +#define GTZC_PERIPH_ADC12 GTZC_PERIPH_ADC +#define GTZC_PERIPH_USBFS GTZC_PERIPH_USB +#endif /* STM32H5 */ +#if defined(STM32H5) || defined(STM32U5) +#define GTZC_MCPBB_NB_VCTR_REG_MAX GTZC_MPCBB_NB_VCTR_REG_MAX +#define GTZC_MCPBB_NB_LCK_VCTR_REG_MAX GTZC_MPCBB_NB_LCK_VCTR_REG_MAX +#define GTZC_MCPBB_SUPERBLOCK_UNLOCKED GTZC_MPCBB_SUPERBLOCK_UNLOCKED +#define GTZC_MCPBB_SUPERBLOCK_LOCKED GTZC_MPCBB_SUPERBLOCK_LOCKED +#define GTZC_MCPBB_BLOCK_NSEC GTZC_MPCBB_BLOCK_NSEC +#define GTZC_MCPBB_BLOCK_SEC GTZC_MPCBB_BLOCK_SEC +#define GTZC_MCPBB_BLOCK_NPRIV GTZC_MPCBB_BLOCK_NPRIV +#define GTZC_MCPBB_BLOCK_PRIV GTZC_MPCBB_BLOCK_PRIV +#define GTZC_MCPBB_LOCK_OFF GTZC_MPCBB_LOCK_OFF +#define GTZC_MCPBB_LOCK_ON GTZC_MPCBB_LOCK_ON +#endif /* STM32H5 || STM32U5 */ +/** + * @} + */ + +/** @defgroup HAL_HRTIM_Aliased_Macros HAL HRTIM Aliased Macros maintained for legacy purpose + * @{ + */ +#define HRTIM_TIMDELAYEDPROTECTION_DISABLED HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DISABLED +#define HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT1_EEV68 HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DELAYEDOUT1_EEV6 +#define HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT2_EEV68 HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DELAYEDOUT2_EEV6 +#define HRTIM_TIMDELAYEDPROTECTION_DELAYEDBOTH_EEV68 HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DELAYEDBOTH_EEV6 +#define HRTIM_TIMDELAYEDPROTECTION_BALANCED_EEV68 HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_BALANCED_EEV6 +#define HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT1_DEEV79 HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DELAYEDOUT1_DEEV7 +#define HRTIM_TIMDELAYEDPROTECTION_DELAYEDOUT2_DEEV79 HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DELAYEDOUT2_DEEV7 +#define HRTIM_TIMDELAYEDPROTECTION_DELAYEDBOTH_EEV79 HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DELAYEDBOTH_EEV7 +#define HRTIM_TIMDELAYEDPROTECTION_BALANCED_EEV79 HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_BALANCED_EEV7 + +#define __HAL_HRTIM_SetCounter __HAL_HRTIM_SETCOUNTER +#define __HAL_HRTIM_GetCounter __HAL_HRTIM_GETCOUNTER +#define __HAL_HRTIM_SetPeriod __HAL_HRTIM_SETPERIOD +#define __HAL_HRTIM_GetPeriod __HAL_HRTIM_GETPERIOD +#define __HAL_HRTIM_SetClockPrescaler __HAL_HRTIM_SETCLOCKPRESCALER +#define __HAL_HRTIM_GetClockPrescaler __HAL_HRTIM_GETCLOCKPRESCALER +#define __HAL_HRTIM_SetCompare __HAL_HRTIM_SETCOMPARE +#define __HAL_HRTIM_GetCompare __HAL_HRTIM_GETCOMPARE + +#if defined(STM32F3) || defined(STM32G4) || defined(STM32H7) +#define HRTIMInterruptResquests HRTIMInterruptRequests +#endif /* STM32F3 || STM32G4 || STM32H7 */ + +#if defined(STM32G4) +#define HAL_HRTIM_ExternalEventCounterConfig HAL_HRTIM_ExtEventCounterConfig +#define HAL_HRTIM_ExternalEventCounterEnable HAL_HRTIM_ExtEventCounterEnable +#define HAL_HRTIM_ExternalEventCounterDisable HAL_HRTIM_ExtEventCounterDisable +#define HAL_HRTIM_ExternalEventCounterReset HAL_HRTIM_ExtEventCounterReset +#define HRTIM_TIMEEVENT_A HRTIM_EVENTCOUNTER_A +#define HRTIM_TIMEEVENT_B HRTIM_EVENTCOUNTER_B +#define HRTIM_TIMEEVENTRESETMODE_UNCONDITIONAL HRTIM_EVENTCOUNTER_RSTMODE_UNCONDITIONAL +#define HRTIM_TIMEEVENTRESETMODE_CONDITIONAL HRTIM_EVENTCOUNTER_RSTMODE_CONDITIONAL +#endif /* STM32G4 */ + +#if defined(STM32H7) +#define HRTIM_OUTPUTSET_TIMAEV1_TIMBCMP1 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTSET_TIMAEV2_TIMBCMP2 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTSET_TIMAEV3_TIMCCMP2 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTSET_TIMAEV4_TIMCCMP3 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTSET_TIMAEV5_TIMDCMP1 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTSET_TIMAEV6_TIMDCMP2 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTSET_TIMAEV7_TIMECMP3 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTSET_TIMAEV8_TIMECMP4 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTSET_TIMAEV9_TIMFCMP4 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTSET_TIMBEV1_TIMACMP1 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTSET_TIMBEV2_TIMACMP2 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTSET_TIMBEV3_TIMCCMP3 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTSET_TIMBEV4_TIMCCMP4 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTSET_TIMBEV5_TIMDCMP3 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTSET_TIMBEV6_TIMDCMP4 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTSET_TIMBEV7_TIMECMP1 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTSET_TIMBEV8_TIMECMP2 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTSET_TIMBEV9_TIMFCMP3 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTSET_TIMCEV1_TIMACMP1 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTSET_TIMCEV2_TIMACMP2 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTSET_TIMCEV3_TIMBCMP2 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTSET_TIMCEV4_TIMBCMP3 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTSET_TIMCEV5_TIMDCMP2 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTSET_TIMCEV6_TIMDCMP4 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTSET_TIMCEV7_TIMECMP3 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTSET_TIMCEV8_TIMECMP4 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTSET_TIMCEV9_TIMFCMP2 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTSET_TIMDEV1_TIMACMP1 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTSET_TIMDEV2_TIMACMP4 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTSET_TIMDEV3_TIMBCMP2 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTSET_TIMDEV4_TIMBCMP4 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTSET_TIMDEV5_TIMCCMP4 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTSET_TIMDEV6_TIMECMP1 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTSET_TIMDEV7_TIMECMP4 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTSET_TIMDEV8_TIMFCMP1 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTSET_TIMDEV9_TIMFCMP3 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTSET_TIMEEV1_TIMACMP4 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTSET_TIMEEV2_TIMBCMP3 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTSET_TIMEEV3_TIMBCMP4 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTSET_TIMEEV4_TIMCCMP1 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTSET_TIMEEV5_TIMDCMP2 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTSET_TIMEEV6_TIMDCMP1 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTSET_TIMEEV7_TIMDCMP2 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTSET_TIMEEV8_TIMFCMP3 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTSET_TIMEEV9_TIMFCMP4 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTSET_TIMFEV1_TIMACMP3 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTSET_TIMFEV2_TIMBCMP1 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTSET_TIMFEV3_TIMBCMP4 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTSET_TIMFEV4_TIMCCMP1 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTSET_TIMFEV5_TIMCCMP4 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTSET_TIMFEV6_TIMDCMP3 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTSET_TIMFEV7_TIMDCMP4 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTSET_TIMFEV8_TIMECMP2 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTSET_TIMFEV9_TIMECMP3 HRTIM_OUTPUTSET_TIMEV_9 + +#define HRTIM_OUTPUTRESET_TIMAEV1_TIMBCMP1 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTRESET_TIMAEV2_TIMBCMP2 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTRESET_TIMAEV3_TIMCCMP2 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTRESET_TIMAEV4_TIMCCMP3 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTRESET_TIMAEV5_TIMDCMP1 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTRESET_TIMAEV6_TIMDCMP2 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTRESET_TIMAEV7_TIMECMP3 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTRESET_TIMAEV8_TIMECMP4 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTRESET_TIMAEV9_TIMFCMP4 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTRESET_TIMBEV1_TIMACMP1 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTRESET_TIMBEV2_TIMACMP2 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTRESET_TIMBEV3_TIMCCMP3 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTRESET_TIMBEV4_TIMCCMP4 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTRESET_TIMBEV5_TIMDCMP3 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTRESET_TIMBEV6_TIMDCMP4 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTRESET_TIMBEV7_TIMECMP1 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTRESET_TIMBEV8_TIMECMP2 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTRESET_TIMBEV9_TIMFCMP3 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTRESET_TIMCEV1_TIMACMP1 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTRESET_TIMCEV2_TIMACMP2 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTRESET_TIMCEV3_TIMBCMP2 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTRESET_TIMCEV4_TIMBCMP3 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTRESET_TIMCEV5_TIMDCMP2 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTRESET_TIMCEV6_TIMDCMP4 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTRESET_TIMCEV7_TIMECMP3 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTRESET_TIMCEV8_TIMECMP4 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTRESET_TIMCEV9_TIMFCMP2 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTRESET_TIMDEV1_TIMACMP1 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTRESET_TIMDEV2_TIMACMP4 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTRESET_TIMDEV3_TIMBCMP2 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTRESET_TIMDEV4_TIMBCMP4 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTRESET_TIMDEV5_TIMCCMP4 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTRESET_TIMDEV6_TIMECMP1 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTRESET_TIMDEV7_TIMECMP4 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTRESET_TIMDEV8_TIMFCMP1 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTRESET_TIMDEV9_TIMFCMP3 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTRESET_TIMEEV1_TIMACMP4 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTRESET_TIMEEV2_TIMBCMP3 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTRESET_TIMEEV3_TIMBCMP4 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTRESET_TIMEEV4_TIMCCMP1 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTRESET_TIMEEV5_TIMDCMP2 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTRESET_TIMEEV6_TIMDCMP1 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTRESET_TIMEEV7_TIMDCMP2 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTRESET_TIMEEV8_TIMFCMP3 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTRESET_TIMEEV9_TIMFCMP4 HRTIM_OUTPUTSET_TIMEV_9 +#define HRTIM_OUTPUTRESET_TIMFEV1_TIMACMP3 HRTIM_OUTPUTSET_TIMEV_1 +#define HRTIM_OUTPUTRESET_TIMFEV2_TIMBCMP1 HRTIM_OUTPUTSET_TIMEV_2 +#define HRTIM_OUTPUTRESET_TIMFEV3_TIMBCMP4 HRTIM_OUTPUTSET_TIMEV_3 +#define HRTIM_OUTPUTRESET_TIMFEV4_TIMCCMP1 HRTIM_OUTPUTSET_TIMEV_4 +#define HRTIM_OUTPUTRESET_TIMFEV5_TIMCCMP4 HRTIM_OUTPUTSET_TIMEV_5 +#define HRTIM_OUTPUTRESET_TIMFEV6_TIMDCMP3 HRTIM_OUTPUTSET_TIMEV_6 +#define HRTIM_OUTPUTRESET_TIMFEV7_TIMDCMP4 HRTIM_OUTPUTSET_TIMEV_7 +#define HRTIM_OUTPUTRESET_TIMFEV8_TIMECMP2 HRTIM_OUTPUTSET_TIMEV_8 +#define HRTIM_OUTPUTRESET_TIMFEV9_TIMECMP3 HRTIM_OUTPUTSET_TIMEV_9 +#endif /* STM32H7 */ + +#if defined(STM32F3) +/** @brief Constants defining available sources associated to external events. + */ +#define HRTIM_EVENTSRC_1 (0x00000000U) +#define HRTIM_EVENTSRC_2 (HRTIM_EECR1_EE1SRC_0) +#define HRTIM_EVENTSRC_3 (HRTIM_EECR1_EE1SRC_1) +#define HRTIM_EVENTSRC_4 (HRTIM_EECR1_EE1SRC_1 | HRTIM_EECR1_EE1SRC_0) + +/** @brief Constants defining the DLL calibration periods (in micro seconds) + */ +#define HRTIM_CALIBRATIONRATE_7300 0x00000000U +#define HRTIM_CALIBRATIONRATE_910 (HRTIM_DLLCR_CALRTE_0) +#define HRTIM_CALIBRATIONRATE_114 (HRTIM_DLLCR_CALRTE_1) +#define HRTIM_CALIBRATIONRATE_14 (HRTIM_DLLCR_CALRTE_1 | HRTIM_DLLCR_CALRTE_0) +#endif /* STM32F3 */ + +/** + * @} + */ + +/** @defgroup HAL_I2C_Aliased_Defines HAL I2C Aliased Defines maintained for legacy purpose + * @{ + */ +#define I2C_DUALADDRESS_DISABLED I2C_DUALADDRESS_DISABLE +#define I2C_DUALADDRESS_ENABLED I2C_DUALADDRESS_ENABLE +#define I2C_GENERALCALL_DISABLED I2C_GENERALCALL_DISABLE +#define I2C_GENERALCALL_ENABLED I2C_GENERALCALL_ENABLE +#define I2C_NOSTRETCH_DISABLED I2C_NOSTRETCH_DISABLE +#define I2C_NOSTRETCH_ENABLED I2C_NOSTRETCH_ENABLE +#define I2C_ANALOGFILTER_ENABLED I2C_ANALOGFILTER_ENABLE +#define I2C_ANALOGFILTER_DISABLED I2C_ANALOGFILTER_DISABLE +#if defined(STM32F0) || defined(STM32F1) || defined(STM32F3) || defined(STM32G0) || defined(STM32L4) || \ + defined(STM32L1) || defined(STM32F7) +#define HAL_I2C_STATE_MEM_BUSY_TX HAL_I2C_STATE_BUSY_TX +#define HAL_I2C_STATE_MEM_BUSY_RX HAL_I2C_STATE_BUSY_RX +#define HAL_I2C_STATE_MASTER_BUSY_TX HAL_I2C_STATE_BUSY_TX +#define HAL_I2C_STATE_MASTER_BUSY_RX HAL_I2C_STATE_BUSY_RX +#define HAL_I2C_STATE_SLAVE_BUSY_TX HAL_I2C_STATE_BUSY_TX +#define HAL_I2C_STATE_SLAVE_BUSY_RX HAL_I2C_STATE_BUSY_RX +#endif +/** + * @} + */ + +/** @defgroup HAL_IRDA_Aliased_Defines HAL IRDA Aliased Defines maintained for legacy purpose + * @{ + */ +#define IRDA_ONE_BIT_SAMPLE_DISABLED IRDA_ONE_BIT_SAMPLE_DISABLE +#define IRDA_ONE_BIT_SAMPLE_ENABLED IRDA_ONE_BIT_SAMPLE_ENABLE + +/** + * @} + */ + +/** @defgroup HAL_IWDG_Aliased_Defines HAL IWDG Aliased Defines maintained for legacy purpose + * @{ + */ +#define KR_KEY_RELOAD IWDG_KEY_RELOAD +#define KR_KEY_ENABLE IWDG_KEY_ENABLE +#define KR_KEY_EWA IWDG_KEY_WRITE_ACCESS_ENABLE +#define KR_KEY_DWA IWDG_KEY_WRITE_ACCESS_DISABLE +/** + * @} + */ + +/** @defgroup HAL_LPTIM_Aliased_Defines HAL LPTIM Aliased Defines maintained for legacy purpose + * @{ + */ + +#define LPTIM_CLOCKSAMPLETIME_DIRECTTRANSISTION LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION +#define LPTIM_CLOCKSAMPLETIME_2TRANSISTIONS LPTIM_CLOCKSAMPLETIME_2TRANSITIONS +#define LPTIM_CLOCKSAMPLETIME_4TRANSISTIONS LPTIM_CLOCKSAMPLETIME_4TRANSITIONS +#define LPTIM_CLOCKSAMPLETIME_8TRANSISTIONS LPTIM_CLOCKSAMPLETIME_8TRANSITIONS + +#define LPTIM_CLOCKPOLARITY_RISINGEDGE LPTIM_CLOCKPOLARITY_RISING +#define LPTIM_CLOCKPOLARITY_FALLINGEDGE LPTIM_CLOCKPOLARITY_FALLING +#define LPTIM_CLOCKPOLARITY_BOTHEDGES LPTIM_CLOCKPOLARITY_RISING_FALLING + +#define LPTIM_TRIGSAMPLETIME_DIRECTTRANSISTION LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION +#define LPTIM_TRIGSAMPLETIME_2TRANSISTIONS LPTIM_TRIGSAMPLETIME_2TRANSITIONS +#define LPTIM_TRIGSAMPLETIME_4TRANSISTIONS LPTIM_TRIGSAMPLETIME_4TRANSITIONS +#define LPTIM_TRIGSAMPLETIME_8TRANSISTIONS LPTIM_TRIGSAMPLETIME_8TRANSITIONS + +/* The following 3 definition have also been present in a temporary version of lptim.h */ +/* They need to be renamed also to the right name, just in case */ +#define LPTIM_TRIGSAMPLETIME_2TRANSITION LPTIM_TRIGSAMPLETIME_2TRANSITIONS +#define LPTIM_TRIGSAMPLETIME_4TRANSITION LPTIM_TRIGSAMPLETIME_4TRANSITIONS +#define LPTIM_TRIGSAMPLETIME_8TRANSITION LPTIM_TRIGSAMPLETIME_8TRANSITIONS + + +/** @defgroup HAL_LPTIM_Aliased_Defines HAL LPTIM Aliased Defines maintained for legacy purpose + * @{ + */ +#define HAL_LPTIM_ReadCompare HAL_LPTIM_ReadCapturedValue +/** + * @} + */ + +#if defined(STM32U5) +#define LPTIM_ISR_CC1 LPTIM_ISR_CC1IF +#define LPTIM_ISR_CC2 LPTIM_ISR_CC2IF +#define LPTIM_CHANNEL_ALL 0x00000000U +#endif /* STM32U5 */ +/** + * @} + */ + +/** @defgroup HAL_NAND_Aliased_Defines HAL NAND Aliased Defines maintained for legacy purpose + * @{ + */ +#define HAL_NAND_Read_Page HAL_NAND_Read_Page_8b +#define HAL_NAND_Write_Page HAL_NAND_Write_Page_8b +#define HAL_NAND_Read_SpareArea HAL_NAND_Read_SpareArea_8b +#define HAL_NAND_Write_SpareArea HAL_NAND_Write_SpareArea_8b + +#define NAND_AddressTypedef NAND_AddressTypeDef + +#define __ARRAY_ADDRESS ARRAY_ADDRESS +#define __ADDR_1st_CYCLE ADDR_1ST_CYCLE +#define __ADDR_2nd_CYCLE ADDR_2ND_CYCLE +#define __ADDR_3rd_CYCLE ADDR_3RD_CYCLE +#define __ADDR_4th_CYCLE ADDR_4TH_CYCLE +/** + * @} + */ + +/** @defgroup HAL_NOR_Aliased_Defines HAL NOR Aliased Defines maintained for legacy purpose + * @{ + */ +#define NOR_StatusTypedef HAL_NOR_StatusTypeDef +#define NOR_SUCCESS HAL_NOR_STATUS_SUCCESS +#define NOR_ONGOING HAL_NOR_STATUS_ONGOING +#define NOR_ERROR HAL_NOR_STATUS_ERROR +#define NOR_TIMEOUT HAL_NOR_STATUS_TIMEOUT + +#define __NOR_WRITE NOR_WRITE +#define __NOR_ADDR_SHIFT NOR_ADDR_SHIFT +/** + * @} + */ + +/** @defgroup HAL_OPAMP_Aliased_Defines HAL OPAMP Aliased Defines maintained for legacy purpose + * @{ + */ + +#define OPAMP_NONINVERTINGINPUT_VP0 OPAMP_NONINVERTINGINPUT_IO0 +#define OPAMP_NONINVERTINGINPUT_VP1 OPAMP_NONINVERTINGINPUT_IO1 +#define OPAMP_NONINVERTINGINPUT_VP2 OPAMP_NONINVERTINGINPUT_IO2 +#define OPAMP_NONINVERTINGINPUT_VP3 OPAMP_NONINVERTINGINPUT_IO3 + +#define OPAMP_SEC_NONINVERTINGINPUT_VP0 OPAMP_SEC_NONINVERTINGINPUT_IO0 +#define OPAMP_SEC_NONINVERTINGINPUT_VP1 OPAMP_SEC_NONINVERTINGINPUT_IO1 +#define OPAMP_SEC_NONINVERTINGINPUT_VP2 OPAMP_SEC_NONINVERTINGINPUT_IO2 +#define OPAMP_SEC_NONINVERTINGINPUT_VP3 OPAMP_SEC_NONINVERTINGINPUT_IO3 + +#define OPAMP_INVERTINGINPUT_VM0 OPAMP_INVERTINGINPUT_IO0 +#define OPAMP_INVERTINGINPUT_VM1 OPAMP_INVERTINGINPUT_IO1 + +#define IOPAMP_INVERTINGINPUT_VM0 OPAMP_INVERTINGINPUT_IO0 +#define IOPAMP_INVERTINGINPUT_VM1 OPAMP_INVERTINGINPUT_IO1 + +#define OPAMP_SEC_INVERTINGINPUT_VM0 OPAMP_SEC_INVERTINGINPUT_IO0 +#define OPAMP_SEC_INVERTINGINPUT_VM1 OPAMP_SEC_INVERTINGINPUT_IO1 + +#define OPAMP_INVERTINGINPUT_VINM OPAMP_SEC_INVERTINGINPUT_IO1 + +#define OPAMP_PGACONNECT_NO OPAMP_PGA_CONNECT_INVERTINGINPUT_NO +#define OPAMP_PGACONNECT_VM0 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0 +#define OPAMP_PGACONNECT_VM1 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1 + +#if defined(STM32L1) || defined(STM32L4) || defined(STM32L5) || defined(STM32H7) || defined(STM32G4) || defined(STM32U5) +#define HAL_OPAMP_MSP_INIT_CB_ID HAL_OPAMP_MSPINIT_CB_ID +#define HAL_OPAMP_MSP_DEINIT_CB_ID HAL_OPAMP_MSPDEINIT_CB_ID +#endif + +#if defined(STM32L4) || defined(STM32L5) +#define OPAMP_POWERMODE_NORMAL OPAMP_POWERMODE_NORMALPOWER +#elif defined(STM32G4) +#define OPAMP_POWERMODE_NORMAL OPAMP_POWERMODE_NORMALSPEED +#endif + +/** + * @} + */ + +/** @defgroup HAL_I2S_Aliased_Defines HAL I2S Aliased Defines maintained for legacy purpose + * @{ + */ +#define I2S_STANDARD_PHILLIPS I2S_STANDARD_PHILIPS + +#if defined(STM32H7) +#define I2S_IT_TXE I2S_IT_TXP +#define I2S_IT_RXNE I2S_IT_RXP + +#define I2S_FLAG_TXE I2S_FLAG_TXP +#define I2S_FLAG_RXNE I2S_FLAG_RXP +#endif + +#if defined(STM32F7) +#define I2S_CLOCK_SYSCLK I2S_CLOCK_PLL +#endif +/** + * @} + */ + +/** @defgroup HAL_PCCARD_Aliased_Defines HAL PCCARD Aliased Defines maintained for legacy purpose + * @{ + */ + +/* Compact Flash-ATA registers description */ +#define CF_DATA ATA_DATA +#define CF_SECTOR_COUNT ATA_SECTOR_COUNT +#define CF_SECTOR_NUMBER ATA_SECTOR_NUMBER +#define CF_CYLINDER_LOW ATA_CYLINDER_LOW +#define CF_CYLINDER_HIGH ATA_CYLINDER_HIGH +#define CF_CARD_HEAD ATA_CARD_HEAD +#define CF_STATUS_CMD ATA_STATUS_CMD +#define CF_STATUS_CMD_ALTERNATE ATA_STATUS_CMD_ALTERNATE +#define CF_COMMON_DATA_AREA ATA_COMMON_DATA_AREA + +/* Compact Flash-ATA commands */ +#define CF_READ_SECTOR_CMD ATA_READ_SECTOR_CMD +#define CF_WRITE_SECTOR_CMD ATA_WRITE_SECTOR_CMD +#define CF_ERASE_SECTOR_CMD ATA_ERASE_SECTOR_CMD +#define CF_IDENTIFY_CMD ATA_IDENTIFY_CMD + +#define PCCARD_StatusTypedef HAL_PCCARD_StatusTypeDef +#define PCCARD_SUCCESS HAL_PCCARD_STATUS_SUCCESS +#define PCCARD_ONGOING HAL_PCCARD_STATUS_ONGOING +#define PCCARD_ERROR HAL_PCCARD_STATUS_ERROR +#define PCCARD_TIMEOUT HAL_PCCARD_STATUS_TIMEOUT +/** + * @} + */ + +/** @defgroup HAL_RTC_Aliased_Defines HAL RTC Aliased Defines maintained for legacy purpose + * @{ + */ + +#define FORMAT_BIN RTC_FORMAT_BIN +#define FORMAT_BCD RTC_FORMAT_BCD + +#define RTC_ALARMSUBSECONDMASK_None RTC_ALARMSUBSECONDMASK_NONE +#define RTC_TAMPERERASEBACKUP_DISABLED RTC_TAMPER_ERASE_BACKUP_DISABLE +#define RTC_TAMPERMASK_FLAG_DISABLED RTC_TAMPERMASK_FLAG_DISABLE +#define RTC_TAMPERMASK_FLAG_ENABLED RTC_TAMPERMASK_FLAG_ENABLE + +#define RTC_MASKTAMPERFLAG_DISABLED RTC_TAMPERMASK_FLAG_DISABLE +#define RTC_MASKTAMPERFLAG_ENABLED RTC_TAMPERMASK_FLAG_ENABLE +#define RTC_TAMPERERASEBACKUP_ENABLED RTC_TAMPER_ERASE_BACKUP_ENABLE +#define RTC_TAMPER1_2_INTERRUPT RTC_ALL_TAMPER_INTERRUPT +#define RTC_TAMPER1_2_3_INTERRUPT RTC_ALL_TAMPER_INTERRUPT + +#define RTC_TIMESTAMPPIN_PC13 RTC_TIMESTAMPPIN_DEFAULT +#define RTC_TIMESTAMPPIN_PA0 RTC_TIMESTAMPPIN_POS1 +#define RTC_TIMESTAMPPIN_PI8 RTC_TIMESTAMPPIN_POS1 +#define RTC_TIMESTAMPPIN_PC1 RTC_TIMESTAMPPIN_POS2 + +#define RTC_OUTPUT_REMAP_PC13 RTC_OUTPUT_REMAP_NONE +#define RTC_OUTPUT_REMAP_PB14 RTC_OUTPUT_REMAP_POS1 +#define RTC_OUTPUT_REMAP_PB2 RTC_OUTPUT_REMAP_POS1 + +#define RTC_TAMPERPIN_PC13 RTC_TAMPERPIN_DEFAULT +#define RTC_TAMPERPIN_PA0 RTC_TAMPERPIN_POS1 +#define RTC_TAMPERPIN_PI8 RTC_TAMPERPIN_POS1 + +#if defined(STM32H5) || defined(STM32H7RS) || defined(STM32N6) +#define TAMP_SECRETDEVICE_ERASE_NONE TAMP_DEVICESECRETS_ERASE_NONE +#define TAMP_SECRETDEVICE_ERASE_BKP_SRAM TAMP_DEVICESECRETS_ERASE_BKPSRAM +#endif /* STM32H5 || STM32H7RS || STM32N6 */ + +#if defined(STM32WBA) +#define TAMP_SECRETDEVICE_ERASE_NONE TAMP_DEVICESECRETS_ERASE_NONE +#define TAMP_SECRETDEVICE_ERASE_SRAM2 TAMP_DEVICESECRETS_ERASE_SRAM2 +#define TAMP_SECRETDEVICE_ERASE_RHUK TAMP_DEVICESECRETS_ERASE_RHUK +#define TAMP_SECRETDEVICE_ERASE_ICACHE TAMP_DEVICESECRETS_ERASE_ICACHE +#define TAMP_SECRETDEVICE_ERASE_SAES_AES_HASH TAMP_DEVICESECRETS_ERASE_SAES_AES_HASH +#define TAMP_SECRETDEVICE_ERASE_PKA_SRAM TAMP_DEVICESECRETS_ERASE_PKA_SRAM +#define TAMP_SECRETDEVICE_ERASE_ALL TAMP_DEVICESECRETS_ERASE_ALL +#endif /* STM32WBA */ + +#if defined(STM32H5) || defined(STM32WBA) || defined(STM32H7RS) || defined(STM32N6) +#define TAMP_SECRETDEVICE_ERASE_DISABLE TAMP_DEVICESECRETS_ERASE_NONE +#define TAMP_SECRETDEVICE_ERASE_ENABLE TAMP_SECRETDEVICE_ERASE_ALL +#endif /* STM32H5 || STM32WBA || STM32H7RS || STM32N6 */ + +#if defined(STM32F7) || defined(STM32WB) +#define RTC_TAMPCR_TAMPXE RTC_TAMPER_ENABLE_BITS_MASK +#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_IT_ENABLE_BITS_MASK +#endif /* STM32F7 || STM32WB */ + +#if defined(STM32H7) +#define RTC_TAMPCR_TAMPXE RTC_TAMPER_X +#define RTC_TAMPCR_TAMPXIE RTC_TAMPER_X_INTERRUPT +#endif /* STM32H7 */ + +#if defined(STM32F7) || defined(STM32H7) || defined(STM32L0) || defined(STM32WB) +#define RTC_TAMPER1_INTERRUPT RTC_IT_TAMP1 +#define RTC_TAMPER2_INTERRUPT RTC_IT_TAMP2 +#define RTC_TAMPER3_INTERRUPT RTC_IT_TAMP3 +#define RTC_ALL_TAMPER_INTERRUPT RTC_IT_TAMP +#endif /* STM32F7 || STM32H7 || STM32L0 || STM32WB */ + +/** + * @} + */ + + +/** @defgroup HAL_SMARTCARD_Aliased_Defines HAL SMARTCARD Aliased Defines maintained for legacy purpose + * @{ + */ +#define SMARTCARD_NACK_ENABLED SMARTCARD_NACK_ENABLE +#define SMARTCARD_NACK_DISABLED SMARTCARD_NACK_DISABLE + +#define SMARTCARD_ONEBIT_SAMPLING_DISABLED SMARTCARD_ONE_BIT_SAMPLE_DISABLE +#define SMARTCARD_ONEBIT_SAMPLING_ENABLED SMARTCARD_ONE_BIT_SAMPLE_ENABLE +#define SMARTCARD_ONEBIT_SAMPLING_DISABLE SMARTCARD_ONE_BIT_SAMPLE_DISABLE +#define SMARTCARD_ONEBIT_SAMPLING_ENABLE SMARTCARD_ONE_BIT_SAMPLE_ENABLE + +#define SMARTCARD_TIMEOUT_DISABLED SMARTCARD_TIMEOUT_DISABLE +#define SMARTCARD_TIMEOUT_ENABLED SMARTCARD_TIMEOUT_ENABLE + +#define SMARTCARD_LASTBIT_DISABLED SMARTCARD_LASTBIT_DISABLE +#define SMARTCARD_LASTBIT_ENABLED SMARTCARD_LASTBIT_ENABLE +/** + * @} + */ + + +/** @defgroup HAL_SMBUS_Aliased_Defines HAL SMBUS Aliased Defines maintained for legacy purpose + * @{ + */ +#define SMBUS_DUALADDRESS_DISABLED SMBUS_DUALADDRESS_DISABLE +#define SMBUS_DUALADDRESS_ENABLED SMBUS_DUALADDRESS_ENABLE +#define SMBUS_GENERALCALL_DISABLED SMBUS_GENERALCALL_DISABLE +#define SMBUS_GENERALCALL_ENABLED SMBUS_GENERALCALL_ENABLE +#define SMBUS_NOSTRETCH_DISABLED SMBUS_NOSTRETCH_DISABLE +#define SMBUS_NOSTRETCH_ENABLED SMBUS_NOSTRETCH_ENABLE +#define SMBUS_ANALOGFILTER_ENABLED SMBUS_ANALOGFILTER_ENABLE +#define SMBUS_ANALOGFILTER_DISABLED SMBUS_ANALOGFILTER_DISABLE +#define SMBUS_PEC_DISABLED SMBUS_PEC_DISABLE +#define SMBUS_PEC_ENABLED SMBUS_PEC_ENABLE +#define HAL_SMBUS_STATE_SLAVE_LISTEN HAL_SMBUS_STATE_LISTEN +/** + * @} + */ + +/** @defgroup HAL_SPI_Aliased_Defines HAL SPI Aliased Defines maintained for legacy purpose + * @{ + */ +#define SPI_TIMODE_DISABLED SPI_TIMODE_DISABLE +#define SPI_TIMODE_ENABLED SPI_TIMODE_ENABLE + +#define SPI_CRCCALCULATION_DISABLED SPI_CRCCALCULATION_DISABLE +#define SPI_CRCCALCULATION_ENABLED SPI_CRCCALCULATION_ENABLE + +#define SPI_NSS_PULSE_DISABLED SPI_NSS_PULSE_DISABLE +#define SPI_NSS_PULSE_ENABLED SPI_NSS_PULSE_ENABLE + +#if defined(STM32H7) + +#define SPI_FLAG_TXE SPI_FLAG_TXP +#define SPI_FLAG_RXNE SPI_FLAG_RXP + +#define SPI_IT_TXE SPI_IT_TXP +#define SPI_IT_RXNE SPI_IT_RXP + +#define SPI_FRLVL_EMPTY SPI_RX_FIFO_0PACKET +#define SPI_FRLVL_QUARTER_FULL SPI_RX_FIFO_1PACKET +#define SPI_FRLVL_HALF_FULL SPI_RX_FIFO_2PACKET +#define SPI_FRLVL_FULL SPI_RX_FIFO_3PACKET + +#endif /* STM32H7 */ + +/** + * @} + */ + +/** @defgroup HAL_TIM_Aliased_Defines HAL TIM Aliased Defines maintained for legacy purpose + * @{ + */ +#define CCER_CCxE_MASK TIM_CCER_CCxE_MASK +#define CCER_CCxNE_MASK TIM_CCER_CCxNE_MASK + +#define TIM_DMABase_CR1 TIM_DMABASE_CR1 +#define TIM_DMABase_CR2 TIM_DMABASE_CR2 +#define TIM_DMABase_SMCR TIM_DMABASE_SMCR +#define TIM_DMABase_DIER TIM_DMABASE_DIER +#define TIM_DMABase_SR TIM_DMABASE_SR +#define TIM_DMABase_EGR TIM_DMABASE_EGR +#define TIM_DMABase_CCMR1 TIM_DMABASE_CCMR1 +#define TIM_DMABase_CCMR2 TIM_DMABASE_CCMR2 +#define TIM_DMABase_CCER TIM_DMABASE_CCER +#define TIM_DMABase_CNT TIM_DMABASE_CNT +#define TIM_DMABase_PSC TIM_DMABASE_PSC +#define TIM_DMABase_ARR TIM_DMABASE_ARR +#define TIM_DMABase_RCR TIM_DMABASE_RCR +#define TIM_DMABase_CCR1 TIM_DMABASE_CCR1 +#define TIM_DMABase_CCR2 TIM_DMABASE_CCR2 +#define TIM_DMABase_CCR3 TIM_DMABASE_CCR3 +#define TIM_DMABase_CCR4 TIM_DMABASE_CCR4 +#define TIM_DMABase_BDTR TIM_DMABASE_BDTR +#define TIM_DMABase_DCR TIM_DMABASE_DCR +#define TIM_DMABase_DMAR TIM_DMABASE_DMAR +#define TIM_DMABase_OR1 TIM_DMABASE_OR1 +#define TIM_DMABase_CCMR3 TIM_DMABASE_CCMR3 +#define TIM_DMABase_CCR5 TIM_DMABASE_CCR5 +#define TIM_DMABase_CCR6 TIM_DMABASE_CCR6 +#define TIM_DMABase_OR2 TIM_DMABASE_OR2 +#define TIM_DMABase_OR3 TIM_DMABASE_OR3 +#define TIM_DMABase_OR TIM_DMABASE_OR + +#define TIM_EventSource_Update TIM_EVENTSOURCE_UPDATE +#define TIM_EventSource_CC1 TIM_EVENTSOURCE_CC1 +#define TIM_EventSource_CC2 TIM_EVENTSOURCE_CC2 +#define TIM_EventSource_CC3 TIM_EVENTSOURCE_CC3 +#define TIM_EventSource_CC4 TIM_EVENTSOURCE_CC4 +#define TIM_EventSource_COM TIM_EVENTSOURCE_COM +#define TIM_EventSource_Trigger TIM_EVENTSOURCE_TRIGGER +#define TIM_EventSource_Break TIM_EVENTSOURCE_BREAK +#define TIM_EventSource_Break2 TIM_EVENTSOURCE_BREAK2 + +#define TIM_DMABurstLength_1Transfer TIM_DMABURSTLENGTH_1TRANSFER +#define TIM_DMABurstLength_2Transfers TIM_DMABURSTLENGTH_2TRANSFERS +#define TIM_DMABurstLength_3Transfers TIM_DMABURSTLENGTH_3TRANSFERS +#define TIM_DMABurstLength_4Transfers TIM_DMABURSTLENGTH_4TRANSFERS +#define TIM_DMABurstLength_5Transfers TIM_DMABURSTLENGTH_5TRANSFERS +#define TIM_DMABurstLength_6Transfers TIM_DMABURSTLENGTH_6TRANSFERS +#define TIM_DMABurstLength_7Transfers TIM_DMABURSTLENGTH_7TRANSFERS +#define TIM_DMABurstLength_8Transfers TIM_DMABURSTLENGTH_8TRANSFERS +#define TIM_DMABurstLength_9Transfers TIM_DMABURSTLENGTH_9TRANSFERS +#define TIM_DMABurstLength_10Transfers TIM_DMABURSTLENGTH_10TRANSFERS +#define TIM_DMABurstLength_11Transfers TIM_DMABURSTLENGTH_11TRANSFERS +#define TIM_DMABurstLength_12Transfers TIM_DMABURSTLENGTH_12TRANSFERS +#define TIM_DMABurstLength_13Transfers TIM_DMABURSTLENGTH_13TRANSFERS +#define TIM_DMABurstLength_14Transfers TIM_DMABURSTLENGTH_14TRANSFERS +#define TIM_DMABurstLength_15Transfers TIM_DMABURSTLENGTH_15TRANSFERS +#define TIM_DMABurstLength_16Transfers TIM_DMABURSTLENGTH_16TRANSFERS +#define TIM_DMABurstLength_17Transfers TIM_DMABURSTLENGTH_17TRANSFERS +#define TIM_DMABurstLength_18Transfers TIM_DMABURSTLENGTH_18TRANSFERS + +#if defined(STM32L0) +#define TIM22_TI1_GPIO1 TIM22_TI1_GPIO +#define TIM22_TI1_GPIO2 TIM22_TI1_GPIO +#endif + +#if defined(STM32F3) +#define IS_TIM_HALL_INTERFACE_INSTANCE IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE +#endif + +#if defined(STM32H7) +#define TIM_TIM1_ETR_COMP1_OUT TIM_TIM1_ETR_COMP1 +#define TIM_TIM1_ETR_COMP2_OUT TIM_TIM1_ETR_COMP2 +#define TIM_TIM8_ETR_COMP1_OUT TIM_TIM8_ETR_COMP1 +#define TIM_TIM8_ETR_COMP2_OUT TIM_TIM8_ETR_COMP2 +#define TIM_TIM2_ETR_COMP1_OUT TIM_TIM2_ETR_COMP1 +#define TIM_TIM2_ETR_COMP2_OUT TIM_TIM2_ETR_COMP2 +#define TIM_TIM3_ETR_COMP1_OUT TIM_TIM3_ETR_COMP1 +#define TIM_TIM1_TI1_COMP1_OUT TIM_TIM1_TI1_COMP1 +#define TIM_TIM8_TI1_COMP2_OUT TIM_TIM8_TI1_COMP2 +#define TIM_TIM2_TI4_COMP1_OUT TIM_TIM2_TI4_COMP1 +#define TIM_TIM2_TI4_COMP2_OUT TIM_TIM2_TI4_COMP2 +#define TIM_TIM2_TI4_COMP1COMP2_OUT TIM_TIM2_TI4_COMP1_COMP2 +#define TIM_TIM3_TI1_COMP1_OUT TIM_TIM3_TI1_COMP1 +#define TIM_TIM3_TI1_COMP2_OUT TIM_TIM3_TI1_COMP2 +#define TIM_TIM3_TI1_COMP1COMP2_OUT TIM_TIM3_TI1_COMP1_COMP2 +#endif + +#if defined(STM32U5) || defined(STM32MP2) +#define OCREF_CLEAR_SELECT_Pos OCREF_CLEAR_SELECT_POS +#define OCREF_CLEAR_SELECT_Msk OCREF_CLEAR_SELECT_MSK +#endif +/** + * @} + */ + +/** @defgroup HAL_TSC_Aliased_Defines HAL TSC Aliased Defines maintained for legacy purpose + * @{ + */ +#define TSC_SYNC_POL_FALL TSC_SYNC_POLARITY_FALLING +#define TSC_SYNC_POL_RISE_HIGH TSC_SYNC_POLARITY_RISING +/** + * @} + */ + +/** @defgroup HAL_UART_Aliased_Defines HAL UART Aliased Defines maintained for legacy purpose + * @{ + */ +#define UART_ONEBIT_SAMPLING_DISABLED UART_ONE_BIT_SAMPLE_DISABLE +#define UART_ONEBIT_SAMPLING_ENABLED UART_ONE_BIT_SAMPLE_ENABLE +#define UART_ONE_BIT_SAMPLE_DISABLED UART_ONE_BIT_SAMPLE_DISABLE +#define UART_ONE_BIT_SAMPLE_ENABLED UART_ONE_BIT_SAMPLE_ENABLE + +#define __HAL_UART_ONEBIT_ENABLE __HAL_UART_ONE_BIT_SAMPLE_ENABLE +#define __HAL_UART_ONEBIT_DISABLE __HAL_UART_ONE_BIT_SAMPLE_DISABLE + +#define __DIV_SAMPLING16 UART_DIV_SAMPLING16 +#define __DIVMANT_SAMPLING16 UART_DIVMANT_SAMPLING16 +#define __DIVFRAQ_SAMPLING16 UART_DIVFRAQ_SAMPLING16 +#define __UART_BRR_SAMPLING16 UART_BRR_SAMPLING16 + +#define __DIV_SAMPLING8 UART_DIV_SAMPLING8 +#define __DIVMANT_SAMPLING8 UART_DIVMANT_SAMPLING8 +#define __DIVFRAQ_SAMPLING8 UART_DIVFRAQ_SAMPLING8 +#define __UART_BRR_SAMPLING8 UART_BRR_SAMPLING8 + +#define __DIV_LPUART UART_DIV_LPUART + +#define UART_WAKEUPMETHODE_IDLELINE UART_WAKEUPMETHOD_IDLELINE +#define UART_WAKEUPMETHODE_ADDRESSMARK UART_WAKEUPMETHOD_ADDRESSMARK + +/** + * @} + */ + + +/** @defgroup HAL_USART_Aliased_Defines HAL USART Aliased Defines maintained for legacy purpose + * @{ + */ + +#define USART_CLOCK_DISABLED USART_CLOCK_DISABLE +#define USART_CLOCK_ENABLED USART_CLOCK_ENABLE + +#define USARTNACK_ENABLED USART_NACK_ENABLE +#define USARTNACK_DISABLED USART_NACK_DISABLE +/** + * @} + */ + +/** @defgroup HAL_WWDG_Aliased_Defines HAL WWDG Aliased Defines maintained for legacy purpose + * @{ + */ +#define CFR_BASE WWDG_CFR_BASE + +/** + * @} + */ + +/** @defgroup HAL_CAN_Aliased_Defines HAL CAN Aliased Defines maintained for legacy purpose + * @{ + */ +#define CAN_FilterFIFO0 CAN_FILTER_FIFO0 +#define CAN_FilterFIFO1 CAN_FILTER_FIFO1 +#define CAN_IT_RQCP0 CAN_IT_TME +#define CAN_IT_RQCP1 CAN_IT_TME +#define CAN_IT_RQCP2 CAN_IT_TME +#define INAK_TIMEOUT CAN_TIMEOUT_VALUE +#define SLAK_TIMEOUT CAN_TIMEOUT_VALUE +#define CAN_TXSTATUS_FAILED ((uint8_t)0x00U) +#define CAN_TXSTATUS_OK ((uint8_t)0x01U) +#define CAN_TXSTATUS_PENDING ((uint8_t)0x02U) + +/** + * @} + */ + +/** @defgroup HAL_ETH_Aliased_Defines HAL ETH Aliased Defines maintained for legacy purpose + * @{ + */ + +#define VLAN_TAG ETH_VLAN_TAG +#define MIN_ETH_PAYLOAD ETH_MIN_ETH_PAYLOAD +#define MAX_ETH_PAYLOAD ETH_MAX_ETH_PAYLOAD +#define JUMBO_FRAME_PAYLOAD ETH_JUMBO_FRAME_PAYLOAD +#define MACMIIAR_CR_MASK ETH_MACMIIAR_CR_MASK +#define MACCR_CLEAR_MASK ETH_MACCR_CLEAR_MASK +#define MACFCR_CLEAR_MASK ETH_MACFCR_CLEAR_MASK +#define DMAOMR_CLEAR_MASK ETH_DMAOMR_CLEAR_MASK + +#define ETH_MMCCR 0x00000100U +#define ETH_MMCRIR 0x00000104U +#define ETH_MMCTIR 0x00000108U +#define ETH_MMCRIMR 0x0000010CU +#define ETH_MMCTIMR 0x00000110U +#define ETH_MMCTGFSCCR 0x0000014CU +#define ETH_MMCTGFMSCCR 0x00000150U +#define ETH_MMCTGFCR 0x00000168U +#define ETH_MMCRFCECR 0x00000194U +#define ETH_MMCRFAECR 0x00000198U +#define ETH_MMCRGUFCR 0x000001C4U + +#define ETH_MAC_TXFIFO_FULL 0x02000000U /* Tx FIFO full */ +#define ETH_MAC_TXFIFONOT_EMPTY 0x01000000U /* Tx FIFO not empty */ +#define ETH_MAC_TXFIFO_WRITE_ACTIVE 0x00400000U /* Tx FIFO write active */ +#define ETH_MAC_TXFIFO_IDLE 0x00000000U /* Tx FIFO read status: Idle */ +#define ETH_MAC_TXFIFO_READ 0x00100000U /* Tx FIFO read status: Read (transferring data to + the MAC transmitter) */ +#define ETH_MAC_TXFIFO_WAITING 0x00200000U /* Tx FIFO read status: Waiting for TxStatus from + MAC transmitter */ +#define ETH_MAC_TXFIFO_WRITING 0x00300000U /* Tx FIFO read status: Writing the received TxStatus + or flushing the TxFIFO */ +#define ETH_MAC_TRANSMISSION_PAUSE 0x00080000U /* MAC transmitter in pause */ +#define ETH_MAC_TRANSMITFRAMECONTROLLER_IDLE 0x00000000U /* MAC transmit frame controller: Idle */ +#define ETH_MAC_TRANSMITFRAMECONTROLLER_WAITING 0x00020000U /* MAC transmit frame controller: Waiting for Status + of previous frame or IFG/backoff period to be over */ +#define ETH_MAC_TRANSMITFRAMECONTROLLER_GENRATING_PCF 0x00040000U /* MAC transmit frame controller: Generating and + transmitting a Pause control frame (in full duplex mode) */ +#define ETH_MAC_TRANSMITFRAMECONTROLLER_TRANSFERRING 0x00060000U /* MAC transmit frame controller: Transferring input + frame for transmission */ +#define ETH_MAC_MII_TRANSMIT_ACTIVE 0x00010000U /* MAC MII transmit engine active */ +#define ETH_MAC_RXFIFO_EMPTY 0x00000000U /* Rx FIFO fill level: empty */ +#define ETH_MAC_RXFIFO_BELOW_THRESHOLD 0x00000100U /* Rx FIFO fill level: fill-level below flow-control + de-activate threshold */ +#define ETH_MAC_RXFIFO_ABOVE_THRESHOLD 0x00000200U /* Rx FIFO fill level: fill-level above flow-control + activate threshold */ +#define ETH_MAC_RXFIFO_FULL 0x00000300U /* Rx FIFO fill level: full */ +#if defined(STM32F1) +#else +#define ETH_MAC_READCONTROLLER_IDLE 0x00000000U /* Rx FIFO read controller IDLE state */ +#define ETH_MAC_READCONTROLLER_READING_DATA 0x00000020U /* Rx FIFO read controller Reading frame data */ +#define ETH_MAC_READCONTROLLER_READING_STATUS 0x00000040U /* Rx FIFO read controller Reading frame status + (or time-stamp) */ +#endif +#define ETH_MAC_READCONTROLLER_FLUSHING 0x00000060U /* Rx FIFO read controller Flushing the frame data and + status */ +#define ETH_MAC_RXFIFO_WRITE_ACTIVE 0x00000010U /* Rx FIFO write controller active */ +#define ETH_MAC_SMALL_FIFO_NOTACTIVE 0x00000000U /* MAC small FIFO read / write controllers not active */ +#define ETH_MAC_SMALL_FIFO_READ_ACTIVE 0x00000002U /* MAC small FIFO read controller active */ +#define ETH_MAC_SMALL_FIFO_WRITE_ACTIVE 0x00000004U /* MAC small FIFO write controller active */ +#define ETH_MAC_SMALL_FIFO_RW_ACTIVE 0x00000006U /* MAC small FIFO read / write controllers active */ +#define ETH_MAC_MII_RECEIVE_PROTOCOL_ACTIVE 0x00000001U /* MAC MII receive protocol engine active */ + +#define ETH_TxPacketConfig ETH_TxPacketConfigTypeDef /* Transmit Packet Configuration structure definition */ + +/** + * @} + */ + +/** @defgroup HAL_DCMI_Aliased_Defines HAL DCMI Aliased Defines maintained for legacy purpose + * @{ + */ +#define HAL_DCMI_ERROR_OVF HAL_DCMI_ERROR_OVR +#define DCMI_IT_OVF DCMI_IT_OVR +#define DCMI_FLAG_OVFRI DCMI_FLAG_OVRRI +#define DCMI_FLAG_OVFMI DCMI_FLAG_OVRMI + +#define HAL_DCMI_ConfigCROP HAL_DCMI_ConfigCrop +#define HAL_DCMI_EnableCROP HAL_DCMI_EnableCrop +#define HAL_DCMI_DisableCROP HAL_DCMI_DisableCrop + +/** + * @} + */ + +#if defined(STM32L4) || defined(STM32F7) || defined(STM32F427xx) || defined(STM32F437xx) \ + || defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx) \ + || defined(STM32H7) +/** @defgroup HAL_DMA2D_Aliased_Defines HAL DMA2D Aliased Defines maintained for legacy purpose + * @{ + */ +#define DMA2D_ARGB8888 DMA2D_OUTPUT_ARGB8888 +#define DMA2D_RGB888 DMA2D_OUTPUT_RGB888 +#define DMA2D_RGB565 DMA2D_OUTPUT_RGB565 +#define DMA2D_ARGB1555 DMA2D_OUTPUT_ARGB1555 +#define DMA2D_ARGB4444 DMA2D_OUTPUT_ARGB4444 + +#define CM_ARGB8888 DMA2D_INPUT_ARGB8888 +#define CM_RGB888 DMA2D_INPUT_RGB888 +#define CM_RGB565 DMA2D_INPUT_RGB565 +#define CM_ARGB1555 DMA2D_INPUT_ARGB1555 +#define CM_ARGB4444 DMA2D_INPUT_ARGB4444 +#define CM_L8 DMA2D_INPUT_L8 +#define CM_AL44 DMA2D_INPUT_AL44 +#define CM_AL88 DMA2D_INPUT_AL88 +#define CM_L4 DMA2D_INPUT_L4 +#define CM_A8 DMA2D_INPUT_A8 +#define CM_A4 DMA2D_INPUT_A4 +/** + * @} + */ +#endif /* STM32L4 || STM32F7 || STM32F4 || STM32H7 */ + +#if defined(STM32L4) || defined(STM32F7) || defined(STM32F427xx) || defined(STM32F437xx) \ + || defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx) \ + || defined(STM32H7) || defined(STM32U5) +/** @defgroup DMA2D_Aliases DMA2D API Aliases + * @{ + */ +#define HAL_DMA2D_DisableCLUT HAL_DMA2D_CLUTLoading_Abort /*!< Aliased to HAL_DMA2D_CLUTLoading_Abort + for compatibility with legacy code */ +/** + * @} + */ + +#endif /* STM32L4 || STM32F7 || STM32F4 || STM32H7 || STM32U5 */ + +/** @defgroup HAL_PPP_Aliased_Defines HAL PPP Aliased Defines maintained for legacy purpose + * @{ + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup HAL_CRYP_Aliased_Functions HAL CRYP Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_CRYP_ComputationCpltCallback HAL_CRYPEx_ComputationCpltCallback +/** + * @} + */ + +/** @defgroup HAL_DCACHE_Aliased_Functions HAL DCACHE Aliased Functions maintained for legacy purpose + * @{ + */ + +#if defined(STM32U5) +#define HAL_DCACHE_CleanInvalidateByAddr HAL_DCACHE_CleanInvalidByAddr +#define HAL_DCACHE_CleanInvalidateByAddr_IT HAL_DCACHE_CleanInvalidByAddr_IT +#endif /* STM32U5 */ + +/** + * @} + */ + +#if !defined(STM32F2) +/** @defgroup HASH_alias HASH API alias + * @{ + */ +#define HAL_HASHEx_IRQHandler HAL_HASH_IRQHandler /*!< Redirection for compatibility with legacy code */ +/** + * + * @} + */ +#endif /* STM32F2 */ +/** @defgroup HAL_HASH_Aliased_Functions HAL HASH Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_HASH_STATETypeDef HAL_HASH_StateTypeDef +#define HAL_HASHPhaseTypeDef HAL_HASH_PhaseTypeDef +#define HAL_HMAC_MD5_Finish HAL_HASH_MD5_Finish +#define HAL_HMAC_SHA1_Finish HAL_HASH_SHA1_Finish +#define HAL_HMAC_SHA224_Finish HAL_HASH_SHA224_Finish +#define HAL_HMAC_SHA256_Finish HAL_HASH_SHA256_Finish + +/*HASH Algorithm Selection*/ + +#define HASH_AlgoSelection_SHA1 HASH_ALGOSELECTION_SHA1 +#define HASH_AlgoSelection_SHA224 HASH_ALGOSELECTION_SHA224 +#define HASH_AlgoSelection_SHA256 HASH_ALGOSELECTION_SHA256 +#define HASH_AlgoSelection_MD5 HASH_ALGOSELECTION_MD5 + +#define HASH_AlgoMode_HASH HASH_ALGOMODE_HASH +#define HASH_AlgoMode_HMAC HASH_ALGOMODE_HMAC + +#define HASH_HMACKeyType_ShortKey HASH_HMAC_KEYTYPE_SHORTKEY +#define HASH_HMACKeyType_LongKey HASH_HMAC_KEYTYPE_LONGKEY + +#if defined(STM32L4) || defined(STM32L5) || defined(STM32F2) || defined(STM32F4) || defined(STM32F7) || defined(STM32H7) + +#define HAL_HASH_MD5_Accumulate HAL_HASH_MD5_Accmlt +#define HAL_HASH_MD5_Accumulate_End HAL_HASH_MD5_Accmlt_End +#define HAL_HASH_MD5_Accumulate_IT HAL_HASH_MD5_Accmlt_IT +#define HAL_HASH_MD5_Accumulate_End_IT HAL_HASH_MD5_Accmlt_End_IT + +#define HAL_HASH_SHA1_Accumulate HAL_HASH_SHA1_Accmlt +#define HAL_HASH_SHA1_Accumulate_End HAL_HASH_SHA1_Accmlt_End +#define HAL_HASH_SHA1_Accumulate_IT HAL_HASH_SHA1_Accmlt_IT +#define HAL_HASH_SHA1_Accumulate_End_IT HAL_HASH_SHA1_Accmlt_End_IT + +#define HAL_HASHEx_SHA224_Accumulate HAL_HASHEx_SHA224_Accmlt +#define HAL_HASHEx_SHA224_Accumulate_End HAL_HASHEx_SHA224_Accmlt_End +#define HAL_HASHEx_SHA224_Accumulate_IT HAL_HASHEx_SHA224_Accmlt_IT +#define HAL_HASHEx_SHA224_Accumulate_End_IT HAL_HASHEx_SHA224_Accmlt_End_IT + +#define HAL_HASHEx_SHA256_Accumulate HAL_HASHEx_SHA256_Accmlt +#define HAL_HASHEx_SHA256_Accumulate_End HAL_HASHEx_SHA256_Accmlt_End +#define HAL_HASHEx_SHA256_Accumulate_IT HAL_HASHEx_SHA256_Accmlt_IT +#define HAL_HASHEx_SHA256_Accumulate_End_IT HAL_HASHEx_SHA256_Accmlt_End_IT + +#endif /* STM32L4 || STM32L5 || STM32F2 || STM32F4 || STM32F7 || STM32H7 */ +/** + * @} + */ + +/** @defgroup HAL_Aliased_Functions HAL Generic Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_EnableDBGSleepMode HAL_DBGMCU_EnableDBGSleepMode +#define HAL_DisableDBGSleepMode HAL_DBGMCU_DisableDBGSleepMode +#define HAL_EnableDBGStopMode HAL_DBGMCU_EnableDBGStopMode +#define HAL_DisableDBGStopMode HAL_DBGMCU_DisableDBGStopMode +#define HAL_EnableDBGStandbyMode HAL_DBGMCU_EnableDBGStandbyMode +#define HAL_DisableDBGStandbyMode HAL_DBGMCU_DisableDBGStandbyMode +#define HAL_DBG_LowPowerConfig(Periph, cmd) (((cmd\ + )==ENABLE)? HAL_DBGMCU_DBG_EnableLowPowerConfig(Periph) : \ + HAL_DBGMCU_DBG_DisableLowPowerConfig(Periph)) +#define HAL_VREFINT_OutputSelect HAL_SYSCFG_VREFINT_OutputSelect +#define HAL_Lock_Cmd(cmd) (((cmd)==ENABLE) ? HAL_SYSCFG_Enable_Lock_VREFINT() : HAL_SYSCFG_Disable_Lock_VREFINT()) +#if defined(STM32L0) +#else +#define HAL_VREFINT_Cmd(cmd) (((cmd)==ENABLE)? HAL_SYSCFG_EnableVREFINT() : HAL_SYSCFG_DisableVREFINT()) +#endif +#define HAL_ADC_EnableBuffer_Cmd(cmd) (((cmd)==ENABLE) ? HAL_ADCEx_EnableVREFINT() : HAL_ADCEx_DisableVREFINT()) +#define HAL_ADC_EnableBufferSensor_Cmd(cmd) (((cmd\ + )==ENABLE) ? HAL_ADCEx_EnableVREFINTTempSensor() : \ + HAL_ADCEx_DisableVREFINTTempSensor()) +#if defined(STM32H7A3xx) || defined(STM32H7B3xx) || defined(STM32H7B0xx) || defined(STM32H7A3xxQ) || \ + defined(STM32H7B3xxQ) || defined(STM32H7B0xxQ) +#define HAL_EnableSRDomainDBGStopMode HAL_EnableDomain3DBGStopMode +#define HAL_DisableSRDomainDBGStopMode HAL_DisableDomain3DBGStopMode +#define HAL_EnableSRDomainDBGStandbyMode HAL_EnableDomain3DBGStandbyMode +#define HAL_DisableSRDomainDBGStandbyMode HAL_DisableDomain3DBGStandbyMode +#endif /* STM32H7A3xx || STM32H7B3xx || STM32H7B0xx || STM32H7A3xxQ || STM32H7B3xxQ || STM32H7B0xxQ */ + +/** + * @} + */ + +/** @defgroup HAL_FLASH_Aliased_Functions HAL FLASH Aliased Functions maintained for legacy purpose + * @{ + */ +#define FLASH_HalfPageProgram HAL_FLASHEx_HalfPageProgram +#define FLASH_EnableRunPowerDown HAL_FLASHEx_EnableRunPowerDown +#define FLASH_DisableRunPowerDown HAL_FLASHEx_DisableRunPowerDown +#define HAL_DATA_EEPROMEx_Unlock HAL_FLASHEx_DATAEEPROM_Unlock +#define HAL_DATA_EEPROMEx_Lock HAL_FLASHEx_DATAEEPROM_Lock +#define HAL_DATA_EEPROMEx_Erase HAL_FLASHEx_DATAEEPROM_Erase +#define HAL_DATA_EEPROMEx_Program HAL_FLASHEx_DATAEEPROM_Program + +/** + * @} + */ + +/** @defgroup HAL_I2C_Aliased_Functions HAL I2C Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_I2CEx_AnalogFilter_Config HAL_I2CEx_ConfigAnalogFilter +#define HAL_I2CEx_DigitalFilter_Config HAL_I2CEx_ConfigDigitalFilter +#define HAL_FMPI2CEx_AnalogFilter_Config HAL_FMPI2CEx_ConfigAnalogFilter +#define HAL_FMPI2CEx_DigitalFilter_Config HAL_FMPI2CEx_ConfigDigitalFilter + +#define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) (((cmd) == ENABLE)? \ + HAL_I2CEx_EnableFastModePlus(SYSCFG_I2CFastModePlus): \ + HAL_I2CEx_DisableFastModePlus(SYSCFG_I2CFastModePlus)) + +#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || \ + defined(STM32F2) || defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || \ + defined(STM32L4) || defined(STM32L5) || defined(STM32G4) || defined(STM32L1) +#define HAL_I2C_Master_Sequential_Transmit_IT HAL_I2C_Master_Seq_Transmit_IT +#define HAL_I2C_Master_Sequential_Receive_IT HAL_I2C_Master_Seq_Receive_IT +#define HAL_I2C_Slave_Sequential_Transmit_IT HAL_I2C_Slave_Seq_Transmit_IT +#define HAL_I2C_Slave_Sequential_Receive_IT HAL_I2C_Slave_Seq_Receive_IT +#endif /* STM32H7 || STM32WB || STM32G0 || STM32F0 || STM32F1 || STM32F2 || STM32F3 || STM32F4 || STM32F7 || STM32L0 || + STM32L4 || STM32L5 || STM32G4 || STM32L1 */ +#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) || \ + defined(STM32L0) || defined(STM32L4) || defined(STM32L5) || defined(STM32G4)|| defined(STM32L1) +#define HAL_I2C_Master_Sequential_Transmit_DMA HAL_I2C_Master_Seq_Transmit_DMA +#define HAL_I2C_Master_Sequential_Receive_DMA HAL_I2C_Master_Seq_Receive_DMA +#define HAL_I2C_Slave_Sequential_Transmit_DMA HAL_I2C_Slave_Seq_Transmit_DMA +#define HAL_I2C_Slave_Sequential_Receive_DMA HAL_I2C_Slave_Seq_Receive_DMA +#endif /* STM32H7 || STM32WB || STM32G0 || STM32F4 || STM32F7 || STM32L0 || STM32L4 || STM32L5 || STM32G4 || STM32L1 */ + +#if defined(STM32F4) +#define HAL_FMPI2C_Master_Sequential_Transmit_IT HAL_FMPI2C_Master_Seq_Transmit_IT +#define HAL_FMPI2C_Master_Sequential_Receive_IT HAL_FMPI2C_Master_Seq_Receive_IT +#define HAL_FMPI2C_Slave_Sequential_Transmit_IT HAL_FMPI2C_Slave_Seq_Transmit_IT +#define HAL_FMPI2C_Slave_Sequential_Receive_IT HAL_FMPI2C_Slave_Seq_Receive_IT +#define HAL_FMPI2C_Master_Sequential_Transmit_DMA HAL_FMPI2C_Master_Seq_Transmit_DMA +#define HAL_FMPI2C_Master_Sequential_Receive_DMA HAL_FMPI2C_Master_Seq_Receive_DMA +#define HAL_FMPI2C_Slave_Sequential_Transmit_DMA HAL_FMPI2C_Slave_Seq_Transmit_DMA +#define HAL_FMPI2C_Slave_Sequential_Receive_DMA HAL_FMPI2C_Slave_Seq_Receive_DMA +#endif /* STM32F4 */ +/** + * @} + */ + +/** @defgroup HAL_PWR_Aliased HAL PWR Aliased maintained for legacy purpose + * @{ + */ + +#if defined(STM32G0) +#define HAL_PWR_ConfigPVD HAL_PWREx_ConfigPVD +#define HAL_PWR_EnablePVD HAL_PWREx_EnablePVD +#define HAL_PWR_DisablePVD HAL_PWREx_DisablePVD +#define HAL_PWR_PVD_IRQHandler HAL_PWREx_PVD_IRQHandler +#endif +#define HAL_PWR_PVDConfig HAL_PWR_ConfigPVD +#define HAL_PWR_DisableBkUpReg HAL_PWREx_DisableBkUpReg +#define HAL_PWR_DisableFlashPowerDown HAL_PWREx_DisableFlashPowerDown +#define HAL_PWR_DisableVddio2Monitor HAL_PWREx_DisableVddio2Monitor +#define HAL_PWR_EnableBkUpReg HAL_PWREx_EnableBkUpReg +#define HAL_PWR_EnableFlashPowerDown HAL_PWREx_EnableFlashPowerDown +#define HAL_PWR_EnableVddio2Monitor HAL_PWREx_EnableVddio2Monitor +#define HAL_PWR_PVD_PVM_IRQHandler HAL_PWREx_PVD_PVM_IRQHandler +#define HAL_PWR_PVDLevelConfig HAL_PWR_ConfigPVD +#define HAL_PWR_Vddio2Monitor_IRQHandler HAL_PWREx_Vddio2Monitor_IRQHandler +#define HAL_PWR_Vddio2MonitorCallback HAL_PWREx_Vddio2MonitorCallback +#define HAL_PWREx_ActivateOverDrive HAL_PWREx_EnableOverDrive +#define HAL_PWREx_DeactivateOverDrive HAL_PWREx_DisableOverDrive +#define HAL_PWREx_DisableSDADCAnalog HAL_PWREx_DisableSDADC +#define HAL_PWREx_EnableSDADCAnalog HAL_PWREx_EnableSDADC +#define HAL_PWREx_PVMConfig HAL_PWREx_ConfigPVM + +#define PWR_MODE_NORMAL PWR_PVD_MODE_NORMAL +#define PWR_MODE_IT_RISING PWR_PVD_MODE_IT_RISING +#define PWR_MODE_IT_FALLING PWR_PVD_MODE_IT_FALLING +#define PWR_MODE_IT_RISING_FALLING PWR_PVD_MODE_IT_RISING_FALLING +#define PWR_MODE_EVENT_RISING PWR_PVD_MODE_EVENT_RISING +#define PWR_MODE_EVENT_FALLING PWR_PVD_MODE_EVENT_FALLING +#define PWR_MODE_EVENT_RISING_FALLING PWR_PVD_MODE_EVENT_RISING_FALLING + +#define CR_OFFSET_BB PWR_CR_OFFSET_BB +#define CSR_OFFSET_BB PWR_CSR_OFFSET_BB +#define PMODE_BIT_NUMBER VOS_BIT_NUMBER +#define CR_PMODE_BB CR_VOS_BB + +#define DBP_BitNumber DBP_BIT_NUMBER +#define PVDE_BitNumber PVDE_BIT_NUMBER +#define PMODE_BitNumber PMODE_BIT_NUMBER +#define EWUP_BitNumber EWUP_BIT_NUMBER +#define FPDS_BitNumber FPDS_BIT_NUMBER +#define ODEN_BitNumber ODEN_BIT_NUMBER +#define ODSWEN_BitNumber ODSWEN_BIT_NUMBER +#define MRLVDS_BitNumber MRLVDS_BIT_NUMBER +#define LPLVDS_BitNumber LPLVDS_BIT_NUMBER +#define BRE_BitNumber BRE_BIT_NUMBER + +#define PWR_MODE_EVT PWR_PVD_MODE_NORMAL + +#if defined (STM32U5) +#define PWR_SRAM1_PAGE1_STOP_RETENTION PWR_SRAM1_PAGE1_STOP +#define PWR_SRAM1_PAGE2_STOP_RETENTION PWR_SRAM1_PAGE2_STOP +#define PWR_SRAM1_PAGE3_STOP_RETENTION PWR_SRAM1_PAGE3_STOP +#define PWR_SRAM1_PAGE4_STOP_RETENTION PWR_SRAM1_PAGE4_STOP +#define PWR_SRAM1_PAGE5_STOP_RETENTION PWR_SRAM1_PAGE5_STOP +#define PWR_SRAM1_PAGE6_STOP_RETENTION PWR_SRAM1_PAGE6_STOP +#define PWR_SRAM1_PAGE7_STOP_RETENTION PWR_SRAM1_PAGE7_STOP +#define PWR_SRAM1_PAGE8_STOP_RETENTION PWR_SRAM1_PAGE8_STOP +#define PWR_SRAM1_PAGE9_STOP_RETENTION PWR_SRAM1_PAGE9_STOP +#define PWR_SRAM1_PAGE10_STOP_RETENTION PWR_SRAM1_PAGE10_STOP +#define PWR_SRAM1_PAGE11_STOP_RETENTION PWR_SRAM1_PAGE11_STOP +#define PWR_SRAM1_PAGE12_STOP_RETENTION PWR_SRAM1_PAGE12_STOP +#define PWR_SRAM1_FULL_STOP_RETENTION PWR_SRAM1_FULL_STOP + +#define PWR_SRAM2_PAGE1_STOP_RETENTION PWR_SRAM2_PAGE1_STOP +#define PWR_SRAM2_PAGE2_STOP_RETENTION PWR_SRAM2_PAGE2_STOP +#define PWR_SRAM2_FULL_STOP_RETENTION PWR_SRAM2_FULL_STOP + +#define PWR_SRAM3_PAGE1_STOP_RETENTION PWR_SRAM3_PAGE1_STOP +#define PWR_SRAM3_PAGE2_STOP_RETENTION PWR_SRAM3_PAGE2_STOP +#define PWR_SRAM3_PAGE3_STOP_RETENTION PWR_SRAM3_PAGE3_STOP +#define PWR_SRAM3_PAGE4_STOP_RETENTION PWR_SRAM3_PAGE4_STOP +#define PWR_SRAM3_PAGE5_STOP_RETENTION PWR_SRAM3_PAGE5_STOP +#define PWR_SRAM3_PAGE6_STOP_RETENTION PWR_SRAM3_PAGE6_STOP +#define PWR_SRAM3_PAGE7_STOP_RETENTION PWR_SRAM3_PAGE7_STOP +#define PWR_SRAM3_PAGE8_STOP_RETENTION PWR_SRAM3_PAGE8_STOP +#define PWR_SRAM3_PAGE9_STOP_RETENTION PWR_SRAM3_PAGE9_STOP +#define PWR_SRAM3_PAGE10_STOP_RETENTION PWR_SRAM3_PAGE10_STOP +#define PWR_SRAM3_PAGE11_STOP_RETENTION PWR_SRAM3_PAGE11_STOP +#define PWR_SRAM3_PAGE12_STOP_RETENTION PWR_SRAM3_PAGE12_STOP +#define PWR_SRAM3_PAGE13_STOP_RETENTION PWR_SRAM3_PAGE13_STOP +#define PWR_SRAM3_FULL_STOP_RETENTION PWR_SRAM3_FULL_STOP + +#define PWR_SRAM4_FULL_STOP_RETENTION PWR_SRAM4_FULL_STOP + +#define PWR_SRAM5_PAGE1_STOP_RETENTION PWR_SRAM5_PAGE1_STOP +#define PWR_SRAM5_PAGE2_STOP_RETENTION PWR_SRAM5_PAGE2_STOP +#define PWR_SRAM5_PAGE3_STOP_RETENTION PWR_SRAM5_PAGE3_STOP +#define PWR_SRAM5_PAGE4_STOP_RETENTION PWR_SRAM5_PAGE4_STOP +#define PWR_SRAM5_PAGE5_STOP_RETENTION PWR_SRAM5_PAGE5_STOP +#define PWR_SRAM5_PAGE6_STOP_RETENTION PWR_SRAM5_PAGE6_STOP +#define PWR_SRAM5_PAGE7_STOP_RETENTION PWR_SRAM5_PAGE7_STOP +#define PWR_SRAM5_PAGE8_STOP_RETENTION PWR_SRAM5_PAGE8_STOP +#define PWR_SRAM5_PAGE9_STOP_RETENTION PWR_SRAM5_PAGE9_STOP +#define PWR_SRAM5_PAGE10_STOP_RETENTION PWR_SRAM5_PAGE10_STOP +#define PWR_SRAM5_PAGE11_STOP_RETENTION PWR_SRAM5_PAGE11_STOP +#define PWR_SRAM5_PAGE12_STOP_RETENTION PWR_SRAM5_PAGE12_STOP +#define PWR_SRAM5_PAGE13_STOP_RETENTION PWR_SRAM5_PAGE13_STOP +#define PWR_SRAM5_FULL_STOP_RETENTION PWR_SRAM5_FULL_STOP + +#define PWR_SRAM6_PAGE1_STOP_RETENTION PWR_SRAM6_PAGE1_STOP +#define PWR_SRAM6_PAGE2_STOP_RETENTION PWR_SRAM6_PAGE2_STOP +#define PWR_SRAM6_PAGE3_STOP_RETENTION PWR_SRAM6_PAGE3_STOP +#define PWR_SRAM6_PAGE4_STOP_RETENTION PWR_SRAM6_PAGE4_STOP +#define PWR_SRAM6_PAGE5_STOP_RETENTION PWR_SRAM6_PAGE5_STOP +#define PWR_SRAM6_PAGE6_STOP_RETENTION PWR_SRAM6_PAGE6_STOP +#define PWR_SRAM6_PAGE7_STOP_RETENTION PWR_SRAM6_PAGE7_STOP +#define PWR_SRAM6_PAGE8_STOP_RETENTION PWR_SRAM6_PAGE8_STOP +#define PWR_SRAM6_FULL_STOP_RETENTION PWR_SRAM6_FULL_STOP + + +#define PWR_ICACHE_FULL_STOP_RETENTION PWR_ICACHE_FULL_STOP +#define PWR_DCACHE1_FULL_STOP_RETENTION PWR_DCACHE1_FULL_STOP +#define PWR_DCACHE2_FULL_STOP_RETENTION PWR_DCACHE2_FULL_STOP +#define PWR_DMA2DRAM_FULL_STOP_RETENTION PWR_DMA2DRAM_FULL_STOP +#define PWR_PERIPHRAM_FULL_STOP_RETENTION PWR_PERIPHRAM_FULL_STOP +#define PWR_PKA32RAM_FULL_STOP_RETENTION PWR_PKA32RAM_FULL_STOP +#define PWR_GRAPHICPRAM_FULL_STOP_RETENTION PWR_GRAPHICPRAM_FULL_STOP +#define PWR_DSIRAM_FULL_STOP_RETENTION PWR_DSIRAM_FULL_STOP +#define PWR_JPEGRAM_FULL_STOP_RETENTION PWR_JPEGRAM_FULL_STOP + + +#define PWR_SRAM2_PAGE1_STANDBY_RETENTION PWR_SRAM2_PAGE1_STANDBY +#define PWR_SRAM2_PAGE2_STANDBY_RETENTION PWR_SRAM2_PAGE2_STANDBY +#define PWR_SRAM2_FULL_STANDBY_RETENTION PWR_SRAM2_FULL_STANDBY + +#define PWR_SRAM1_FULL_RUN_RETENTION PWR_SRAM1_FULL_RUN +#define PWR_SRAM2_FULL_RUN_RETENTION PWR_SRAM2_FULL_RUN +#define PWR_SRAM3_FULL_RUN_RETENTION PWR_SRAM3_FULL_RUN +#define PWR_SRAM4_FULL_RUN_RETENTION PWR_SRAM4_FULL_RUN +#define PWR_SRAM5_FULL_RUN_RETENTION PWR_SRAM5_FULL_RUN +#define PWR_SRAM6_FULL_RUN_RETENTION PWR_SRAM6_FULL_RUN + +#define PWR_ALL_RAM_RUN_RETENTION_MASK PWR_ALL_RAM_RUN_MASK +#endif + +/** + * @} + */ + +/** @defgroup HAL_RTC_Aliased_Functions HAL RTC Aliased Functions maintained for legacy purpose + * @{ + */ +#if defined(STM32H5) || defined(STM32WBA) || defined(STM32H7RS) || defined(STM32N6) +#define HAL_RTCEx_SetBoothardwareKey HAL_RTCEx_LockBootHardwareKey +#define HAL_RTCEx_BKUPBlock_Enable HAL_RTCEx_BKUPBlock +#define HAL_RTCEx_BKUPBlock_Disable HAL_RTCEx_BKUPUnblock +#define HAL_RTCEx_Erase_SecretDev_Conf HAL_RTCEx_ConfigEraseDeviceSecrets +#endif /* STM32H5 || STM32WBA || STM32H7RS || STM32N6 */ + +/** + * @} + */ + +/** @defgroup HAL_SMBUS_Aliased_Functions HAL SMBUS Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_SMBUS_Slave_Listen_IT HAL_SMBUS_EnableListen_IT +#define HAL_SMBUS_SlaveAddrCallback HAL_SMBUS_AddrCallback +#define HAL_SMBUS_SlaveListenCpltCallback HAL_SMBUS_ListenCpltCallback +/** + * @} + */ + +/** @defgroup HAL_SPI_Aliased_Functions HAL SPI Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_SPI_FlushRxFifo HAL_SPIEx_FlushRxFifo +/** + * @} + */ + +/** @defgroup HAL_TIM_Aliased_Functions HAL TIM Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_TIM_DMADelayPulseCplt TIM_DMADelayPulseCplt +#define HAL_TIM_DMAError TIM_DMAError +#define HAL_TIM_DMACaptureCplt TIM_DMACaptureCplt +#define HAL_TIMEx_DMACommutationCplt TIMEx_DMACommutationCplt +#if defined(STM32H7) || defined(STM32G0) || defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || \ + defined(STM32F3) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) +#define HAL_TIM_SlaveConfigSynchronization HAL_TIM_SlaveConfigSynchro +#define HAL_TIM_SlaveConfigSynchronization_IT HAL_TIM_SlaveConfigSynchro_IT +#define HAL_TIMEx_CommutationCallback HAL_TIMEx_CommutCallback +#define HAL_TIMEx_ConfigCommutationEvent HAL_TIMEx_ConfigCommutEvent +#define HAL_TIMEx_ConfigCommutationEvent_IT HAL_TIMEx_ConfigCommutEvent_IT +#define HAL_TIMEx_ConfigCommutationEvent_DMA HAL_TIMEx_ConfigCommutEvent_DMA +#endif /* STM32H7 || STM32G0 || STM32F0 || STM32F1 || STM32F2 || STM32F3 || STM32F4 || STM32F7 || STM32L0 */ +/** + * @} + */ + +/** @defgroup HAL_UART_Aliased_Functions HAL UART Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_UART_WakeupCallback HAL_UARTEx_WakeupCallback +/** + * @} + */ + +/** @defgroup HAL_LTDC_Aliased_Functions HAL LTDC Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_LTDC_LineEvenCallback HAL_LTDC_LineEventCallback +#define HAL_LTDC_Relaod HAL_LTDC_Reload +#define HAL_LTDC_StructInitFromVideoConfig HAL_LTDCEx_StructInitFromVideoConfig +#define HAL_LTDC_StructInitFromAdaptedCommandConfig HAL_LTDCEx_StructInitFromAdaptedCommandConfig +/** + * @} + */ + + +/** @defgroup HAL_PPP_Aliased_Functions HAL PPP Aliased Functions maintained for legacy purpose + * @{ + */ + +/** + * @} + */ + +/* Exported macros ------------------------------------------------------------*/ + +/** @defgroup HAL_AES_Aliased_Macros HAL CRYP Aliased Macros maintained for legacy purpose + * @{ + */ +#define AES_IT_CC CRYP_IT_CC +#define AES_IT_ERR CRYP_IT_ERR +#define AES_FLAG_CCF CRYP_FLAG_CCF +/** + * @} + */ + +/** @defgroup HAL_Aliased_Macros HAL Generic Aliased Macros maintained for legacy purpose + * @{ + */ +#define __HAL_GET_BOOT_MODE __HAL_SYSCFG_GET_BOOT_MODE +#define __HAL_REMAPMEMORY_FLASH __HAL_SYSCFG_REMAPMEMORY_FLASH +#define __HAL_REMAPMEMORY_SYSTEMFLASH __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH +#define __HAL_REMAPMEMORY_SRAM __HAL_SYSCFG_REMAPMEMORY_SRAM +#define __HAL_REMAPMEMORY_FMC __HAL_SYSCFG_REMAPMEMORY_FMC +#define __HAL_REMAPMEMORY_FMC_SDRAM __HAL_SYSCFG_REMAPMEMORY_FMC_SDRAM +#define __HAL_REMAPMEMORY_FSMC __HAL_SYSCFG_REMAPMEMORY_FSMC +#define __HAL_REMAPMEMORY_QUADSPI __HAL_SYSCFG_REMAPMEMORY_QUADSPI +#define __HAL_FMC_BANK __HAL_SYSCFG_FMC_BANK +#define __HAL_GET_FLAG __HAL_SYSCFG_GET_FLAG +#define __HAL_CLEAR_FLAG __HAL_SYSCFG_CLEAR_FLAG +#define __HAL_VREFINT_OUT_ENABLE __HAL_SYSCFG_VREFINT_OUT_ENABLE +#define __HAL_VREFINT_OUT_DISABLE __HAL_SYSCFG_VREFINT_OUT_DISABLE +#define __HAL_SYSCFG_SRAM2_WRP_ENABLE __HAL_SYSCFG_SRAM2_WRP_0_31_ENABLE + +#define SYSCFG_FLAG_VREF_READY SYSCFG_FLAG_VREFINT_READY +#define SYSCFG_FLAG_RC48 RCC_FLAG_HSI48 +#define IS_SYSCFG_FASTMODEPLUS_CONFIG IS_I2C_FASTMODEPLUS +#define UFB_MODE_BitNumber UFB_MODE_BIT_NUMBER +#define CMP_PD_BitNumber CMP_PD_BIT_NUMBER + +/** + * @} + */ + + +/** @defgroup HAL_ADC_Aliased_Macros HAL ADC Aliased Macros maintained for legacy purpose + * @{ + */ +#define __ADC_ENABLE __HAL_ADC_ENABLE +#define __ADC_DISABLE __HAL_ADC_DISABLE +#define __HAL_ADC_ENABLING_CONDITIONS ADC_ENABLING_CONDITIONS +#define __HAL_ADC_DISABLING_CONDITIONS ADC_DISABLING_CONDITIONS +#define __HAL_ADC_IS_ENABLED ADC_IS_ENABLE +#define __ADC_IS_ENABLED ADC_IS_ENABLE +#define __HAL_ADC_IS_SOFTWARE_START_REGULAR ADC_IS_SOFTWARE_START_REGULAR +#define __HAL_ADC_IS_SOFTWARE_START_INJECTED ADC_IS_SOFTWARE_START_INJECTED +#define __HAL_ADC_IS_CONVERSION_ONGOING_REGULAR_INJECTED ADC_IS_CONVERSION_ONGOING_REGULAR_INJECTED +#define __HAL_ADC_IS_CONVERSION_ONGOING_REGULAR ADC_IS_CONVERSION_ONGOING_REGULAR +#define __HAL_ADC_IS_CONVERSION_ONGOING_INJECTED ADC_IS_CONVERSION_ONGOING_INJECTED +#define __HAL_ADC_IS_CONVERSION_ONGOING ADC_IS_CONVERSION_ONGOING +#define __HAL_ADC_CLEAR_ERRORCODE ADC_CLEAR_ERRORCODE + +#define __HAL_ADC_GET_RESOLUTION ADC_GET_RESOLUTION +#define __HAL_ADC_JSQR_RK ADC_JSQR_RK +#define __HAL_ADC_CFGR_AWD1CH ADC_CFGR_AWD1CH_SHIFT +#define __HAL_ADC_CFGR_AWD23CR ADC_CFGR_AWD23CR +#define __HAL_ADC_CFGR_INJECT_AUTO_CONVERSION ADC_CFGR_INJECT_AUTO_CONVERSION +#define __HAL_ADC_CFGR_INJECT_CONTEXT_QUEUE ADC_CFGR_INJECT_CONTEXT_QUEUE +#define __HAL_ADC_CFGR_INJECT_DISCCONTINUOUS ADC_CFGR_INJECT_DISCCONTINUOUS +#define __HAL_ADC_CFGR_REG_DISCCONTINUOUS ADC_CFGR_REG_DISCCONTINUOUS +#define __HAL_ADC_CFGR_DISCONTINUOUS_NUM ADC_CFGR_DISCONTINUOUS_NUM +#define __HAL_ADC_CFGR_AUTOWAIT ADC_CFGR_AUTOWAIT +#define __HAL_ADC_CFGR_CONTINUOUS ADC_CFGR_CONTINUOUS +#define __HAL_ADC_CFGR_OVERRUN ADC_CFGR_OVERRUN +#define __HAL_ADC_CFGR_DMACONTREQ ADC_CFGR_DMACONTREQ +#define __HAL_ADC_CFGR_EXTSEL ADC_CFGR_EXTSEL_SET +#define __HAL_ADC_JSQR_JEXTSEL ADC_JSQR_JEXTSEL_SET +#define __HAL_ADC_OFR_CHANNEL ADC_OFR_CHANNEL +#define __HAL_ADC_DIFSEL_CHANNEL ADC_DIFSEL_CHANNEL +#define __HAL_ADC_CALFACT_DIFF_SET ADC_CALFACT_DIFF_SET +#define __HAL_ADC_CALFACT_DIFF_GET ADC_CALFACT_DIFF_GET +#define __HAL_ADC_TRX_HIGHTHRESHOLD ADC_TRX_HIGHTHRESHOLD + +#define __HAL_ADC_OFFSET_SHIFT_RESOLUTION ADC_OFFSET_SHIFT_RESOLUTION +#define __HAL_ADC_AWD1THRESHOLD_SHIFT_RESOLUTION ADC_AWD1THRESHOLD_SHIFT_RESOLUTION +#define __HAL_ADC_AWD23THRESHOLD_SHIFT_RESOLUTION ADC_AWD23THRESHOLD_SHIFT_RESOLUTION +#define __HAL_ADC_COMMON_REGISTER ADC_COMMON_REGISTER +#define __HAL_ADC_COMMON_CCR_MULTI ADC_COMMON_CCR_MULTI +#define __HAL_ADC_MULTIMODE_IS_ENABLED ADC_MULTIMODE_IS_ENABLE +#define __ADC_MULTIMODE_IS_ENABLED ADC_MULTIMODE_IS_ENABLE +#define __HAL_ADC_NONMULTIMODE_OR_MULTIMODEMASTER ADC_NONMULTIMODE_OR_MULTIMODEMASTER +#define __HAL_ADC_COMMON_ADC_OTHER ADC_COMMON_ADC_OTHER +#define __HAL_ADC_MULTI_SLAVE ADC_MULTI_SLAVE + +#define __HAL_ADC_SQR1_L ADC_SQR1_L_SHIFT +#define __HAL_ADC_JSQR_JL ADC_JSQR_JL_SHIFT +#define __HAL_ADC_JSQR_RK_JL ADC_JSQR_RK_JL +#define __HAL_ADC_CR1_DISCONTINUOUS_NUM ADC_CR1_DISCONTINUOUS_NUM +#define __HAL_ADC_CR1_SCAN ADC_CR1_SCAN_SET +#define __HAL_ADC_CONVCYCLES_MAX_RANGE ADC_CONVCYCLES_MAX_RANGE +#define __HAL_ADC_CLOCK_PRESCALER_RANGE ADC_CLOCK_PRESCALER_RANGE +#define __HAL_ADC_GET_CLOCK_PRESCALER ADC_GET_CLOCK_PRESCALER + +#define __HAL_ADC_SQR1 ADC_SQR1 +#define __HAL_ADC_SMPR1 ADC_SMPR1 +#define __HAL_ADC_SMPR2 ADC_SMPR2 +#define __HAL_ADC_SQR3_RK ADC_SQR3_RK +#define __HAL_ADC_SQR2_RK ADC_SQR2_RK +#define __HAL_ADC_SQR1_RK ADC_SQR1_RK +#define __HAL_ADC_CR2_CONTINUOUS ADC_CR2_CONTINUOUS +#define __HAL_ADC_CR1_DISCONTINUOUS ADC_CR1_DISCONTINUOUS +#define __HAL_ADC_CR1_SCANCONV ADC_CR1_SCANCONV +#define __HAL_ADC_CR2_EOCSelection ADC_CR2_EOCSelection +#define __HAL_ADC_CR2_DMAContReq ADC_CR2_DMAContReq +#define __HAL_ADC_JSQR ADC_JSQR + +#define __HAL_ADC_CHSELR_CHANNEL ADC_CHSELR_CHANNEL +#define __HAL_ADC_CFGR1_REG_DISCCONTINUOUS ADC_CFGR1_REG_DISCCONTINUOUS +#define __HAL_ADC_CFGR1_AUTOOFF ADC_CFGR1_AUTOOFF +#define __HAL_ADC_CFGR1_AUTOWAIT ADC_CFGR1_AUTOWAIT +#define __HAL_ADC_CFGR1_CONTINUOUS ADC_CFGR1_CONTINUOUS +#define __HAL_ADC_CFGR1_OVERRUN ADC_CFGR1_OVERRUN +#define __HAL_ADC_CFGR1_SCANDIR ADC_CFGR1_SCANDIR +#define __HAL_ADC_CFGR1_DMACONTREQ ADC_CFGR1_DMACONTREQ + +/** + * @} + */ + +/** @defgroup HAL_DAC_Aliased_Macros HAL DAC Aliased Macros maintained for legacy purpose + * @{ + */ +#define __HAL_DHR12R1_ALIGNEMENT DAC_DHR12R1_ALIGNMENT +#define __HAL_DHR12R2_ALIGNEMENT DAC_DHR12R2_ALIGNMENT +#define __HAL_DHR12RD_ALIGNEMENT DAC_DHR12RD_ALIGNMENT +#define IS_DAC_GENERATE_WAVE IS_DAC_WAVE + +/** + * @} + */ + +/** @defgroup HAL_DBGMCU_Aliased_Macros HAL DBGMCU Aliased Macros maintained for legacy purpose + * @{ + */ +#define __HAL_FREEZE_TIM1_DBGMCU __HAL_DBGMCU_FREEZE_TIM1 +#define __HAL_UNFREEZE_TIM1_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM1 +#define __HAL_FREEZE_TIM2_DBGMCU __HAL_DBGMCU_FREEZE_TIM2 +#define __HAL_UNFREEZE_TIM2_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM2 +#define __HAL_FREEZE_TIM3_DBGMCU __HAL_DBGMCU_FREEZE_TIM3 +#define __HAL_UNFREEZE_TIM3_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM3 +#define __HAL_FREEZE_TIM4_DBGMCU __HAL_DBGMCU_FREEZE_TIM4 +#define __HAL_UNFREEZE_TIM4_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM4 +#define __HAL_FREEZE_TIM5_DBGMCU __HAL_DBGMCU_FREEZE_TIM5 +#define __HAL_UNFREEZE_TIM5_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM5 +#define __HAL_FREEZE_TIM6_DBGMCU __HAL_DBGMCU_FREEZE_TIM6 +#define __HAL_UNFREEZE_TIM6_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM6 +#define __HAL_FREEZE_TIM7_DBGMCU __HAL_DBGMCU_FREEZE_TIM7 +#define __HAL_UNFREEZE_TIM7_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM7 +#define __HAL_FREEZE_TIM8_DBGMCU __HAL_DBGMCU_FREEZE_TIM8 +#define __HAL_UNFREEZE_TIM8_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM8 + +#define __HAL_FREEZE_TIM9_DBGMCU __HAL_DBGMCU_FREEZE_TIM9 +#define __HAL_UNFREEZE_TIM9_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM9 +#define __HAL_FREEZE_TIM10_DBGMCU __HAL_DBGMCU_FREEZE_TIM10 +#define __HAL_UNFREEZE_TIM10_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM10 +#define __HAL_FREEZE_TIM11_DBGMCU __HAL_DBGMCU_FREEZE_TIM11 +#define __HAL_UNFREEZE_TIM11_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM11 +#define __HAL_FREEZE_TIM12_DBGMCU __HAL_DBGMCU_FREEZE_TIM12 +#define __HAL_UNFREEZE_TIM12_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM12 +#define __HAL_FREEZE_TIM13_DBGMCU __HAL_DBGMCU_FREEZE_TIM13 +#define __HAL_UNFREEZE_TIM13_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM13 +#define __HAL_FREEZE_TIM14_DBGMCU __HAL_DBGMCU_FREEZE_TIM14 +#define __HAL_UNFREEZE_TIM14_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM14 +#define __HAL_FREEZE_CAN2_DBGMCU __HAL_DBGMCU_FREEZE_CAN2 +#define __HAL_UNFREEZE_CAN2_DBGMCU __HAL_DBGMCU_UNFREEZE_CAN2 + + +#define __HAL_FREEZE_TIM15_DBGMCU __HAL_DBGMCU_FREEZE_TIM15 +#define __HAL_UNFREEZE_TIM15_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM15 +#define __HAL_FREEZE_TIM16_DBGMCU __HAL_DBGMCU_FREEZE_TIM16 +#define __HAL_UNFREEZE_TIM16_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM16 +#define __HAL_FREEZE_TIM17_DBGMCU __HAL_DBGMCU_FREEZE_TIM17 +#define __HAL_UNFREEZE_TIM17_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM17 +#define __HAL_FREEZE_RTC_DBGMCU __HAL_DBGMCU_FREEZE_RTC +#define __HAL_UNFREEZE_RTC_DBGMCU __HAL_DBGMCU_UNFREEZE_RTC +#if defined(STM32H7) +#define __HAL_FREEZE_WWDG_DBGMCU __HAL_DBGMCU_FREEZE_WWDG1 +#define __HAL_UNFREEZE_WWDG_DBGMCU __HAL_DBGMCU_UnFreeze_WWDG1 +#define __HAL_FREEZE_IWDG_DBGMCU __HAL_DBGMCU_FREEZE_IWDG1 +#define __HAL_UNFREEZE_IWDG_DBGMCU __HAL_DBGMCU_UnFreeze_IWDG1 +#else +#define __HAL_FREEZE_WWDG_DBGMCU __HAL_DBGMCU_FREEZE_WWDG +#define __HAL_UNFREEZE_WWDG_DBGMCU __HAL_DBGMCU_UNFREEZE_WWDG +#define __HAL_FREEZE_IWDG_DBGMCU __HAL_DBGMCU_FREEZE_IWDG +#define __HAL_UNFREEZE_IWDG_DBGMCU __HAL_DBGMCU_UNFREEZE_IWDG +#endif /* STM32H7 */ +#define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT +#define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT +#define __HAL_FREEZE_I2C2_TIMEOUT_DBGMCU __HAL_DBGMCU_FREEZE_I2C2_TIMEOUT +#define __HAL_UNFREEZE_I2C2_TIMEOUT_DBGMCU __HAL_DBGMCU_UNFREEZE_I2C2_TIMEOUT +#define __HAL_FREEZE_I2C3_TIMEOUT_DBGMCU __HAL_DBGMCU_FREEZE_I2C3_TIMEOUT +#define __HAL_UNFREEZE_I2C3_TIMEOUT_DBGMCU __HAL_DBGMCU_UNFREEZE_I2C3_TIMEOUT +#define __HAL_FREEZE_CAN1_DBGMCU __HAL_DBGMCU_FREEZE_CAN1 +#define __HAL_UNFREEZE_CAN1_DBGMCU __HAL_DBGMCU_UNFREEZE_CAN1 +#define __HAL_FREEZE_LPTIM1_DBGMCU __HAL_DBGMCU_FREEZE_LPTIM1 +#define __HAL_UNFREEZE_LPTIM1_DBGMCU __HAL_DBGMCU_UNFREEZE_LPTIM1 +#define __HAL_FREEZE_LPTIM2_DBGMCU __HAL_DBGMCU_FREEZE_LPTIM2 +#define __HAL_UNFREEZE_LPTIM2_DBGMCU __HAL_DBGMCU_UNFREEZE_LPTIM2 + +/** + * @} + */ + +/** @defgroup HAL_COMP_Aliased_Macros HAL COMP Aliased Macros maintained for legacy purpose + * @{ + */ +#if defined(STM32F3) +#define COMP_START __HAL_COMP_ENABLE +#define COMP_STOP __HAL_COMP_DISABLE +#define COMP_LOCK __HAL_COMP_LOCK + +#if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || defined(STM32F303x8) || \ + defined(STM32F334x8) || defined(STM32F328xx) +#define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_RISING_EDGE() : \ + __HAL_COMP_COMP6_EXTI_ENABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_RISING_EDGE() : \ + __HAL_COMP_COMP6_EXTI_DISABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP6_EXTI_ENABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP6_EXTI_DISABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_IT() : \ + __HAL_COMP_COMP6_EXTI_ENABLE_IT()) +#define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_IT() : \ + __HAL_COMP_COMP6_EXTI_DISABLE_IT()) +#define __HAL_COMP_EXTI_GET_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_GET_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_GET_FLAG() : \ + __HAL_COMP_COMP6_EXTI_GET_FLAG()) +#define __HAL_COMP_EXTI_CLEAR_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_CLEAR_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_CLEAR_FLAG() : \ + __HAL_COMP_COMP6_EXTI_CLEAR_FLAG()) +#endif +#if defined(STM32F302xE) || defined(STM32F302xC) +#define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_RISING_EDGE() : \ + __HAL_COMP_COMP6_EXTI_ENABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_RISING_EDGE() : \ + __HAL_COMP_COMP6_EXTI_DISABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP6_EXTI_ENABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP6_EXTI_DISABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_IT() : \ + __HAL_COMP_COMP6_EXTI_ENABLE_IT()) +#define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_IT() : \ + __HAL_COMP_COMP6_EXTI_DISABLE_IT()) +#define __HAL_COMP_EXTI_GET_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_GET_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_GET_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_GET_FLAG() : \ + __HAL_COMP_COMP6_EXTI_GET_FLAG()) +#define __HAL_COMP_EXTI_CLEAR_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_CLEAR_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_CLEAR_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_CLEAR_FLAG() : \ + __HAL_COMP_COMP6_EXTI_CLEAR_FLAG()) +#endif +#if defined(STM32F303xE) || defined(STM32F398xx) || defined(STM32F303xC) || defined(STM32F358xx) +#define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP3) ? __HAL_COMP_COMP3_EXTI_ENABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP5) ? __HAL_COMP_COMP5_EXTI_ENABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP6) ? __HAL_COMP_COMP6_EXTI_ENABLE_RISING_EDGE() : \ + __HAL_COMP_COMP7_EXTI_ENABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP3) ? __HAL_COMP_COMP3_EXTI_DISABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP5) ? __HAL_COMP_COMP5_EXTI_DISABLE_RISING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP6) ? __HAL_COMP_COMP6_EXTI_DISABLE_RISING_EDGE() : \ + __HAL_COMP_COMP7_EXTI_DISABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP3) ? __HAL_COMP_COMP3_EXTI_ENABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP5) ? __HAL_COMP_COMP5_EXTI_ENABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP6) ? __HAL_COMP_COMP6_EXTI_ENABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP7_EXTI_ENABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP3) ? __HAL_COMP_COMP3_EXTI_DISABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP5) ? __HAL_COMP_COMP5_EXTI_DISABLE_FALLING_EDGE() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP6) ? __HAL_COMP_COMP6_EXTI_DISABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP7_EXTI_DISABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_ENABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP3) ? __HAL_COMP_COMP3_EXTI_ENABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_ENABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP5) ? __HAL_COMP_COMP5_EXTI_ENABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP6) ? __HAL_COMP_COMP6_EXTI_ENABLE_IT() : \ + __HAL_COMP_COMP7_EXTI_ENABLE_IT()) +#define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_DISABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP3) ? __HAL_COMP_COMP3_EXTI_DISABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_DISABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP5) ? __HAL_COMP_COMP5_EXTI_DISABLE_IT() : \ + ((__EXTILINE__) == COMP_EXTI_LINE_COMP6) ? __HAL_COMP_COMP6_EXTI_DISABLE_IT() : \ + __HAL_COMP_COMP7_EXTI_DISABLE_IT()) +#define __HAL_COMP_EXTI_GET_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_GET_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_GET_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP3) ? __HAL_COMP_COMP3_EXTI_GET_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_GET_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP5) ? __HAL_COMP_COMP5_EXTI_GET_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP6) ? __HAL_COMP_COMP6_EXTI_GET_FLAG() : \ + __HAL_COMP_COMP7_EXTI_GET_FLAG()) +#define __HAL_COMP_EXTI_CLEAR_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_CLEAR_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP2) ? __HAL_COMP_COMP2_EXTI_CLEAR_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP3) ? __HAL_COMP_COMP3_EXTI_CLEAR_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP4) ? __HAL_COMP_COMP4_EXTI_CLEAR_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP5) ? __HAL_COMP_COMP5_EXTI_CLEAR_FLAG() : \ + ((__FLAG__) == COMP_EXTI_LINE_COMP6) ? __HAL_COMP_COMP6_EXTI_CLEAR_FLAG() : \ + __HAL_COMP_COMP7_EXTI_CLEAR_FLAG()) +#endif +#if defined(STM32F373xC) ||defined(STM32F378xx) +#define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE() : \ + __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE() : \ + __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_IT() : \ + __HAL_COMP_COMP2_EXTI_ENABLE_IT()) +#define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_IT() : \ + __HAL_COMP_COMP2_EXTI_DISABLE_IT()) +#define __HAL_COMP_EXTI_GET_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_GET_FLAG() : \ + __HAL_COMP_COMP2_EXTI_GET_FLAG()) +#define __HAL_COMP_EXTI_CLEAR_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_CLEAR_FLAG() : \ + __HAL_COMP_COMP2_EXTI_CLEAR_FLAG()) +#endif +#else +#define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE() : \ + __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_RISING_EDGE() : \ + __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_FALLING_EDGE() : \ + __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE()) +#define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_IT() : \ + __HAL_COMP_COMP2_EXTI_ENABLE_IT()) +#define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__) (((__EXTILINE__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_IT() : \ + __HAL_COMP_COMP2_EXTI_DISABLE_IT()) +#define __HAL_COMP_EXTI_GET_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_GET_FLAG() : \ + __HAL_COMP_COMP2_EXTI_GET_FLAG()) +#define __HAL_COMP_EXTI_CLEAR_FLAG(__FLAG__) (((__FLAG__) == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_CLEAR_FLAG() : \ + __HAL_COMP_COMP2_EXTI_CLEAR_FLAG()) +#endif + +#define __HAL_COMP_GET_EXTI_LINE COMP_GET_EXTI_LINE + +#if defined(STM32L0) || defined(STM32L4) +/* Note: On these STM32 families, the only argument of this macro */ +/* is COMP_FLAG_LOCK. */ +/* This macro is replaced by __HAL_COMP_IS_LOCKED with only HAL handle */ +/* argument. */ +#define __HAL_COMP_GET_FLAG(__HANDLE__, __FLAG__) (__HAL_COMP_IS_LOCKED(__HANDLE__)) +#endif +/** + * @} + */ + +#if defined(STM32L0) || defined(STM32L4) +/** @defgroup HAL_COMP_Aliased_Functions HAL COMP Aliased Functions maintained for legacy purpose + * @{ + */ +#define HAL_COMP_Start_IT HAL_COMP_Start /* Function considered as legacy as EXTI event or IT configuration is + done into HAL_COMP_Init() */ +#define HAL_COMP_Stop_IT HAL_COMP_Stop /* Function considered as legacy as EXTI event or IT configuration is + done into HAL_COMP_Init() */ +/** + * @} + */ +#endif + +/** @defgroup HAL_DAC_Aliased_Macros HAL DAC Aliased Macros maintained for legacy purpose + * @{ + */ + +#define IS_DAC_WAVE(WAVE) (((WAVE) == DAC_WAVE_NONE) || \ + ((WAVE) == DAC_WAVE_NOISE)|| \ + ((WAVE) == DAC_WAVE_TRIANGLE)) + +/** + * @} + */ + +/** @defgroup HAL_FLASH_Aliased_Macros HAL FLASH Aliased Macros maintained for legacy purpose + * @{ + */ + +#define IS_WRPAREA IS_OB_WRPAREA +#define IS_TYPEPROGRAM IS_FLASH_TYPEPROGRAM +#define IS_TYPEPROGRAMFLASH IS_FLASH_TYPEPROGRAM +#define IS_TYPEERASE IS_FLASH_TYPEERASE +#define IS_NBSECTORS IS_FLASH_NBSECTORS +#define IS_OB_WDG_SOURCE IS_OB_IWDG_SOURCE + +/** + * @} + */ + +/** @defgroup HAL_I2C_Aliased_Macros HAL I2C Aliased Macros maintained for legacy purpose + * @{ + */ + +#define __HAL_I2C_RESET_CR2 I2C_RESET_CR2 +#define __HAL_I2C_GENERATE_START I2C_GENERATE_START +#if defined(STM32F1) +#define __HAL_I2C_FREQ_RANGE I2C_FREQRANGE +#else +#define __HAL_I2C_FREQ_RANGE I2C_FREQ_RANGE +#endif /* STM32F1 */ +#define __HAL_I2C_RISE_TIME I2C_RISE_TIME +#define __HAL_I2C_SPEED_STANDARD I2C_SPEED_STANDARD +#define __HAL_I2C_SPEED_FAST I2C_SPEED_FAST +#define __HAL_I2C_SPEED I2C_SPEED +#define __HAL_I2C_7BIT_ADD_WRITE I2C_7BIT_ADD_WRITE +#define __HAL_I2C_7BIT_ADD_READ I2C_7BIT_ADD_READ +#define __HAL_I2C_10BIT_ADDRESS I2C_10BIT_ADDRESS +#define __HAL_I2C_10BIT_HEADER_WRITE I2C_10BIT_HEADER_WRITE +#define __HAL_I2C_10BIT_HEADER_READ I2C_10BIT_HEADER_READ +#define __HAL_I2C_MEM_ADD_MSB I2C_MEM_ADD_MSB +#define __HAL_I2C_MEM_ADD_LSB I2C_MEM_ADD_LSB +#define __HAL_I2C_FREQRANGE I2C_FREQRANGE +/** + * @} + */ + +/** @defgroup HAL_I2S_Aliased_Macros HAL I2S Aliased Macros maintained for legacy purpose + * @{ + */ + +#define IS_I2S_INSTANCE IS_I2S_ALL_INSTANCE +#define IS_I2S_INSTANCE_EXT IS_I2S_ALL_INSTANCE_EXT + +#if defined(STM32H7) +#define __HAL_I2S_CLEAR_FREFLAG __HAL_I2S_CLEAR_TIFREFLAG +#endif + +/** + * @} + */ + +/** @defgroup HAL_IRDA_Aliased_Macros HAL IRDA Aliased Macros maintained for legacy purpose + * @{ + */ + +#define __IRDA_DISABLE __HAL_IRDA_DISABLE +#define __IRDA_ENABLE __HAL_IRDA_ENABLE + +#define __HAL_IRDA_GETCLOCKSOURCE IRDA_GETCLOCKSOURCE +#define __HAL_IRDA_MASK_COMPUTATION IRDA_MASK_COMPUTATION +#define __IRDA_GETCLOCKSOURCE IRDA_GETCLOCKSOURCE +#define __IRDA_MASK_COMPUTATION IRDA_MASK_COMPUTATION + +#define IS_IRDA_ONEBIT_SAMPLE IS_IRDA_ONE_BIT_SAMPLE + + +/** + * @} + */ + + +/** @defgroup HAL_IWDG_Aliased_Macros HAL IWDG Aliased Macros maintained for legacy purpose + * @{ + */ +#define __HAL_IWDG_ENABLE_WRITE_ACCESS IWDG_ENABLE_WRITE_ACCESS +#define __HAL_IWDG_DISABLE_WRITE_ACCESS IWDG_DISABLE_WRITE_ACCESS +/** + * @} + */ + + +/** @defgroup HAL_LPTIM_Aliased_Macros HAL LPTIM Aliased Macros maintained for legacy purpose + * @{ + */ + +#define __HAL_LPTIM_ENABLE_INTERRUPT __HAL_LPTIM_ENABLE_IT +#define __HAL_LPTIM_DISABLE_INTERRUPT __HAL_LPTIM_DISABLE_IT +#define __HAL_LPTIM_GET_ITSTATUS __HAL_LPTIM_GET_IT_SOURCE + +/** + * @} + */ + + +/** @defgroup HAL_OPAMP_Aliased_Macros HAL OPAMP Aliased Macros maintained for legacy purpose + * @{ + */ +#define __OPAMP_CSR_OPAXPD OPAMP_CSR_OPAXPD +#define __OPAMP_CSR_S3SELX OPAMP_CSR_S3SELX +#define __OPAMP_CSR_S4SELX OPAMP_CSR_S4SELX +#define __OPAMP_CSR_S5SELX OPAMP_CSR_S5SELX +#define __OPAMP_CSR_S6SELX OPAMP_CSR_S6SELX +#define __OPAMP_CSR_OPAXCAL_L OPAMP_CSR_OPAXCAL_L +#define __OPAMP_CSR_OPAXCAL_H OPAMP_CSR_OPAXCAL_H +#define __OPAMP_CSR_OPAXLPM OPAMP_CSR_OPAXLPM +#define __OPAMP_CSR_ALL_SWITCHES OPAMP_CSR_ALL_SWITCHES +#define __OPAMP_CSR_ANAWSELX OPAMP_CSR_ANAWSELX +#define __OPAMP_CSR_OPAXCALOUT OPAMP_CSR_OPAXCALOUT +#define __OPAMP_OFFSET_TRIM_BITSPOSITION OPAMP_OFFSET_TRIM_BITSPOSITION +#define __OPAMP_OFFSET_TRIM_SET OPAMP_OFFSET_TRIM_SET + +/** + * @} + */ + + +/** @defgroup HAL_PWR_Aliased_Macros HAL PWR Aliased Macros maintained for legacy purpose + * @{ + */ +#define __HAL_PVD_EVENT_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_EVENT +#define __HAL_PVD_EVENT_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_EVENT +#define __HAL_PVD_EXTI_FALLINGTRIGGER_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE +#define __HAL_PVD_EXTI_FALLINGTRIGGER_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE +#define __HAL_PVD_EXTI_RISINGTRIGGER_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE +#define __HAL_PVD_EXTI_RISINGTRIGGER_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE +#define __HAL_PVM_EVENT_DISABLE __HAL_PWR_PVM_EVENT_DISABLE +#define __HAL_PVM_EVENT_ENABLE __HAL_PWR_PVM_EVENT_ENABLE +#define __HAL_PVM_EXTI_FALLINGTRIGGER_DISABLE __HAL_PWR_PVM_EXTI_FALLINGTRIGGER_DISABLE +#define __HAL_PVM_EXTI_FALLINGTRIGGER_ENABLE __HAL_PWR_PVM_EXTI_FALLINGTRIGGER_ENABLE +#define __HAL_PVM_EXTI_RISINGTRIGGER_DISABLE __HAL_PWR_PVM_EXTI_RISINGTRIGGER_DISABLE +#define __HAL_PVM_EXTI_RISINGTRIGGER_ENABLE __HAL_PWR_PVM_EXTI_RISINGTRIGGER_ENABLE +#define __HAL_PWR_INTERNALWAKEUP_DISABLE HAL_PWREx_DisableInternalWakeUpLine +#define __HAL_PWR_INTERNALWAKEUP_ENABLE HAL_PWREx_EnableInternalWakeUpLine +#define __HAL_PWR_PULL_UP_DOWN_CONFIG_DISABLE HAL_PWREx_DisablePullUpPullDownConfig +#define __HAL_PWR_PULL_UP_DOWN_CONFIG_ENABLE HAL_PWREx_EnablePullUpPullDownConfig +#define __HAL_PWR_PVD_EXTI_CLEAR_EGDE_TRIGGER() do { __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE(); \ + __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE(); \ + } while(0) +#define __HAL_PWR_PVD_EXTI_EVENT_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_EVENT +#define __HAL_PWR_PVD_EXTI_EVENT_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_EVENT +#define __HAL_PWR_PVD_EXTI_FALLINGTRIGGER_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE +#define __HAL_PWR_PVD_EXTI_FALLINGTRIGGER_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE +#define __HAL_PWR_PVD_EXTI_RISINGTRIGGER_DISABLE __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE +#define __HAL_PWR_PVD_EXTI_RISINGTRIGGER_ENABLE __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE +#define __HAL_PWR_PVD_EXTI_SET_FALLING_EGDE_TRIGGER __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE +#define __HAL_PWR_PVD_EXTI_SET_RISING_EDGE_TRIGGER __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE +#define __HAL_PWR_PVM_DISABLE() do { HAL_PWREx_DisablePVM1();HAL_PWREx_DisablePVM2(); \ + HAL_PWREx_DisablePVM3();HAL_PWREx_DisablePVM4(); \ + } while(0) +#define __HAL_PWR_PVM_ENABLE() do { HAL_PWREx_EnablePVM1();HAL_PWREx_EnablePVM2(); \ + HAL_PWREx_EnablePVM3();HAL_PWREx_EnablePVM4(); \ + } while(0) +#define __HAL_PWR_SRAM2CONTENT_PRESERVE_DISABLE HAL_PWREx_DisableSRAM2ContentRetention +#define __HAL_PWR_SRAM2CONTENT_PRESERVE_ENABLE HAL_PWREx_EnableSRAM2ContentRetention +#define __HAL_PWR_VDDIO2_DISABLE HAL_PWREx_DisableVddIO2 +#define __HAL_PWR_VDDIO2_ENABLE HAL_PWREx_EnableVddIO2 +#define __HAL_PWR_VDDIO2_EXTI_CLEAR_EGDE_TRIGGER __HAL_PWR_VDDIO2_EXTI_DISABLE_FALLING_EDGE +#define __HAL_PWR_VDDIO2_EXTI_SET_FALLING_EGDE_TRIGGER __HAL_PWR_VDDIO2_EXTI_ENABLE_FALLING_EDGE +#define __HAL_PWR_VDDUSB_DISABLE HAL_PWREx_DisableVddUSB +#define __HAL_PWR_VDDUSB_ENABLE HAL_PWREx_EnableVddUSB + +#if defined (STM32F4) +#define __HAL_PVD_EXTI_ENABLE_IT(PWR_EXTI_LINE_PVD) __HAL_PWR_PVD_EXTI_ENABLE_IT() +#define __HAL_PVD_EXTI_DISABLE_IT(PWR_EXTI_LINE_PVD) __HAL_PWR_PVD_EXTI_DISABLE_IT() +#define __HAL_PVD_EXTI_GET_FLAG(PWR_EXTI_LINE_PVD) __HAL_PWR_PVD_EXTI_GET_FLAG() +#define __HAL_PVD_EXTI_CLEAR_FLAG(PWR_EXTI_LINE_PVD) __HAL_PWR_PVD_EXTI_CLEAR_FLAG() +#define __HAL_PVD_EXTI_GENERATE_SWIT(PWR_EXTI_LINE_PVD) __HAL_PWR_PVD_EXTI_GENERATE_SWIT() +#else +#define __HAL_PVD_EXTI_CLEAR_FLAG __HAL_PWR_PVD_EXTI_CLEAR_FLAG +#define __HAL_PVD_EXTI_DISABLE_IT __HAL_PWR_PVD_EXTI_DISABLE_IT +#define __HAL_PVD_EXTI_ENABLE_IT __HAL_PWR_PVD_EXTI_ENABLE_IT +#define __HAL_PVD_EXTI_GENERATE_SWIT __HAL_PWR_PVD_EXTI_GENERATE_SWIT +#define __HAL_PVD_EXTI_GET_FLAG __HAL_PWR_PVD_EXTI_GET_FLAG +#endif /* STM32F4 */ +/** + * @} + */ + + +/** @defgroup HAL_RCC_Aliased HAL RCC Aliased maintained for legacy purpose + * @{ + */ + +#define RCC_StopWakeUpClock_MSI RCC_STOP_WAKEUPCLOCK_MSI +#define RCC_StopWakeUpClock_HSI RCC_STOP_WAKEUPCLOCK_HSI + +#define HAL_RCC_CCSCallback HAL_RCC_CSSCallback +#define HAL_RC48_EnableBuffer_Cmd(cmd) (((cmd)==ENABLE) ? \ + HAL_RCCEx_EnableHSI48_VREFINT() : HAL_RCCEx_DisableHSI48_VREFINT()) + +#define __ADC_CLK_DISABLE __HAL_RCC_ADC_CLK_DISABLE +#define __ADC_CLK_ENABLE __HAL_RCC_ADC_CLK_ENABLE +#define __ADC_CLK_SLEEP_DISABLE __HAL_RCC_ADC_CLK_SLEEP_DISABLE +#define __ADC_CLK_SLEEP_ENABLE __HAL_RCC_ADC_CLK_SLEEP_ENABLE +#define __ADC_FORCE_RESET __HAL_RCC_ADC_FORCE_RESET +#define __ADC_RELEASE_RESET __HAL_RCC_ADC_RELEASE_RESET +#define __ADC1_CLK_DISABLE __HAL_RCC_ADC1_CLK_DISABLE +#define __ADC1_CLK_ENABLE __HAL_RCC_ADC1_CLK_ENABLE +#define __ADC1_FORCE_RESET __HAL_RCC_ADC1_FORCE_RESET +#define __ADC1_RELEASE_RESET __HAL_RCC_ADC1_RELEASE_RESET +#define __ADC1_CLK_SLEEP_ENABLE __HAL_RCC_ADC1_CLK_SLEEP_ENABLE +#define __ADC1_CLK_SLEEP_DISABLE __HAL_RCC_ADC1_CLK_SLEEP_DISABLE +#define __ADC2_CLK_DISABLE __HAL_RCC_ADC2_CLK_DISABLE +#define __ADC2_CLK_ENABLE __HAL_RCC_ADC2_CLK_ENABLE +#define __ADC2_FORCE_RESET __HAL_RCC_ADC2_FORCE_RESET +#define __ADC2_RELEASE_RESET __HAL_RCC_ADC2_RELEASE_RESET +#define __ADC3_CLK_DISABLE __HAL_RCC_ADC3_CLK_DISABLE +#define __ADC3_CLK_ENABLE __HAL_RCC_ADC3_CLK_ENABLE +#define __ADC3_FORCE_RESET __HAL_RCC_ADC3_FORCE_RESET +#define __ADC3_RELEASE_RESET __HAL_RCC_ADC3_RELEASE_RESET +#define __AES_CLK_DISABLE __HAL_RCC_AES_CLK_DISABLE +#define __AES_CLK_ENABLE __HAL_RCC_AES_CLK_ENABLE +#define __AES_CLK_SLEEP_DISABLE __HAL_RCC_AES_CLK_SLEEP_DISABLE +#define __AES_CLK_SLEEP_ENABLE __HAL_RCC_AES_CLK_SLEEP_ENABLE +#define __AES_FORCE_RESET __HAL_RCC_AES_FORCE_RESET +#define __AES_RELEASE_RESET __HAL_RCC_AES_RELEASE_RESET +#define __CRYP_CLK_SLEEP_ENABLE __HAL_RCC_CRYP_CLK_SLEEP_ENABLE +#define __CRYP_CLK_SLEEP_DISABLE __HAL_RCC_CRYP_CLK_SLEEP_DISABLE +#define __CRYP_CLK_ENABLE __HAL_RCC_CRYP_CLK_ENABLE +#define __CRYP_CLK_DISABLE __HAL_RCC_CRYP_CLK_DISABLE +#define __CRYP_FORCE_RESET __HAL_RCC_CRYP_FORCE_RESET +#define __CRYP_RELEASE_RESET __HAL_RCC_CRYP_RELEASE_RESET +#define __AFIO_CLK_DISABLE __HAL_RCC_AFIO_CLK_DISABLE +#define __AFIO_CLK_ENABLE __HAL_RCC_AFIO_CLK_ENABLE +#define __AFIO_FORCE_RESET __HAL_RCC_AFIO_FORCE_RESET +#define __AFIO_RELEASE_RESET __HAL_RCC_AFIO_RELEASE_RESET +#define __AHB_FORCE_RESET __HAL_RCC_AHB_FORCE_RESET +#define __AHB_RELEASE_RESET __HAL_RCC_AHB_RELEASE_RESET +#define __AHB1_FORCE_RESET __HAL_RCC_AHB1_FORCE_RESET +#define __AHB1_RELEASE_RESET __HAL_RCC_AHB1_RELEASE_RESET +#define __AHB2_FORCE_RESET __HAL_RCC_AHB2_FORCE_RESET +#define __AHB2_RELEASE_RESET __HAL_RCC_AHB2_RELEASE_RESET +#define __AHB3_FORCE_RESET __HAL_RCC_AHB3_FORCE_RESET +#define __AHB3_RELEASE_RESET __HAL_RCC_AHB3_RELEASE_RESET +#define __APB1_FORCE_RESET __HAL_RCC_APB1_FORCE_RESET +#define __APB1_RELEASE_RESET __HAL_RCC_APB1_RELEASE_RESET +#define __APB2_FORCE_RESET __HAL_RCC_APB2_FORCE_RESET +#define __APB2_RELEASE_RESET __HAL_RCC_APB2_RELEASE_RESET +#if defined(STM32C0) +#define __HAL_RCC_APB1_FORCE_RESET __HAL_RCC_APB1_GRP1_FORCE_RESET +#define __HAL_RCC_APB1_RELEASE_RESET __HAL_RCC_APB1_GRP1_RELEASE_RESET +#define __HAL_RCC_APB2_FORCE_RESET __HAL_RCC_APB1_GRP2_FORCE_RESET +#define __HAL_RCC_APB2_RELEASE_RESET __HAL_RCC_APB1_GRP2_RELEASE_RESET +#endif /* STM32C0 */ +#define __BKP_CLK_DISABLE __HAL_RCC_BKP_CLK_DISABLE +#define __BKP_CLK_ENABLE __HAL_RCC_BKP_CLK_ENABLE +#define __BKP_FORCE_RESET __HAL_RCC_BKP_FORCE_RESET +#define __BKP_RELEASE_RESET __HAL_RCC_BKP_RELEASE_RESET +#define __CAN1_CLK_DISABLE __HAL_RCC_CAN1_CLK_DISABLE +#define __CAN1_CLK_ENABLE __HAL_RCC_CAN1_CLK_ENABLE +#define __CAN1_CLK_SLEEP_DISABLE __HAL_RCC_CAN1_CLK_SLEEP_DISABLE +#define __CAN1_CLK_SLEEP_ENABLE __HAL_RCC_CAN1_CLK_SLEEP_ENABLE +#define __CAN1_FORCE_RESET __HAL_RCC_CAN1_FORCE_RESET +#define __CAN1_RELEASE_RESET __HAL_RCC_CAN1_RELEASE_RESET +#define __CAN_CLK_DISABLE __HAL_RCC_CAN1_CLK_DISABLE +#define __CAN_CLK_ENABLE __HAL_RCC_CAN1_CLK_ENABLE +#define __CAN_FORCE_RESET __HAL_RCC_CAN1_FORCE_RESET +#define __CAN_RELEASE_RESET __HAL_RCC_CAN1_RELEASE_RESET +#define __CAN2_CLK_DISABLE __HAL_RCC_CAN2_CLK_DISABLE +#define __CAN2_CLK_ENABLE __HAL_RCC_CAN2_CLK_ENABLE +#define __CAN2_FORCE_RESET __HAL_RCC_CAN2_FORCE_RESET +#define __CAN2_RELEASE_RESET __HAL_RCC_CAN2_RELEASE_RESET +#define __CEC_CLK_DISABLE __HAL_RCC_CEC_CLK_DISABLE +#define __CEC_CLK_ENABLE __HAL_RCC_CEC_CLK_ENABLE +#define __COMP_CLK_DISABLE __HAL_RCC_COMP_CLK_DISABLE +#define __COMP_CLK_ENABLE __HAL_RCC_COMP_CLK_ENABLE +#define __COMP_FORCE_RESET __HAL_RCC_COMP_FORCE_RESET +#define __COMP_RELEASE_RESET __HAL_RCC_COMP_RELEASE_RESET +#define __COMP_CLK_SLEEP_ENABLE __HAL_RCC_COMP_CLK_SLEEP_ENABLE +#define __COMP_CLK_SLEEP_DISABLE __HAL_RCC_COMP_CLK_SLEEP_DISABLE +#define __CEC_FORCE_RESET __HAL_RCC_CEC_FORCE_RESET +#define __CEC_RELEASE_RESET __HAL_RCC_CEC_RELEASE_RESET +#define __CRC_CLK_DISABLE __HAL_RCC_CRC_CLK_DISABLE +#define __CRC_CLK_ENABLE __HAL_RCC_CRC_CLK_ENABLE +#define __CRC_CLK_SLEEP_DISABLE __HAL_RCC_CRC_CLK_SLEEP_DISABLE +#define __CRC_CLK_SLEEP_ENABLE __HAL_RCC_CRC_CLK_SLEEP_ENABLE +#define __CRC_FORCE_RESET __HAL_RCC_CRC_FORCE_RESET +#define __CRC_RELEASE_RESET __HAL_RCC_CRC_RELEASE_RESET +#define __DAC_CLK_DISABLE __HAL_RCC_DAC_CLK_DISABLE +#define __DAC_CLK_ENABLE __HAL_RCC_DAC_CLK_ENABLE +#define __DAC_FORCE_RESET __HAL_RCC_DAC_FORCE_RESET +#define __DAC_RELEASE_RESET __HAL_RCC_DAC_RELEASE_RESET +#define __DAC1_CLK_DISABLE __HAL_RCC_DAC1_CLK_DISABLE +#define __DAC1_CLK_ENABLE __HAL_RCC_DAC1_CLK_ENABLE +#define __DAC1_CLK_SLEEP_DISABLE __HAL_RCC_DAC1_CLK_SLEEP_DISABLE +#define __DAC1_CLK_SLEEP_ENABLE __HAL_RCC_DAC1_CLK_SLEEP_ENABLE +#define __DAC1_FORCE_RESET __HAL_RCC_DAC1_FORCE_RESET +#define __DAC1_RELEASE_RESET __HAL_RCC_DAC1_RELEASE_RESET +#define __DBGMCU_CLK_ENABLE __HAL_RCC_DBGMCU_CLK_ENABLE +#define __DBGMCU_CLK_DISABLE __HAL_RCC_DBGMCU_CLK_DISABLE +#define __DBGMCU_FORCE_RESET __HAL_RCC_DBGMCU_FORCE_RESET +#define __DBGMCU_RELEASE_RESET __HAL_RCC_DBGMCU_RELEASE_RESET +#define __DFSDM_CLK_DISABLE __HAL_RCC_DFSDM_CLK_DISABLE +#define __DFSDM_CLK_ENABLE __HAL_RCC_DFSDM_CLK_ENABLE +#define __DFSDM_CLK_SLEEP_DISABLE __HAL_RCC_DFSDM_CLK_SLEEP_DISABLE +#define __DFSDM_CLK_SLEEP_ENABLE __HAL_RCC_DFSDM_CLK_SLEEP_ENABLE +#define __DFSDM_FORCE_RESET __HAL_RCC_DFSDM_FORCE_RESET +#define __DFSDM_RELEASE_RESET __HAL_RCC_DFSDM_RELEASE_RESET +#define __DMA1_CLK_DISABLE __HAL_RCC_DMA1_CLK_DISABLE +#define __DMA1_CLK_ENABLE __HAL_RCC_DMA1_CLK_ENABLE +#define __DMA1_CLK_SLEEP_DISABLE __HAL_RCC_DMA1_CLK_SLEEP_DISABLE +#define __DMA1_CLK_SLEEP_ENABLE __HAL_RCC_DMA1_CLK_SLEEP_ENABLE +#define __DMA1_FORCE_RESET __HAL_RCC_DMA1_FORCE_RESET +#define __DMA1_RELEASE_RESET __HAL_RCC_DMA1_RELEASE_RESET +#define __DMA2_CLK_DISABLE __HAL_RCC_DMA2_CLK_DISABLE +#define __DMA2_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE +#define __DMA2_CLK_SLEEP_DISABLE __HAL_RCC_DMA2_CLK_SLEEP_DISABLE +#define __DMA2_CLK_SLEEP_ENABLE __HAL_RCC_DMA2_CLK_SLEEP_ENABLE +#define __DMA2_FORCE_RESET __HAL_RCC_DMA2_FORCE_RESET +#define __DMA2_RELEASE_RESET __HAL_RCC_DMA2_RELEASE_RESET +#define __ETHMAC_CLK_DISABLE __HAL_RCC_ETHMAC_CLK_DISABLE +#define __ETHMAC_CLK_ENABLE __HAL_RCC_ETHMAC_CLK_ENABLE +#define __ETHMAC_FORCE_RESET __HAL_RCC_ETHMAC_FORCE_RESET +#define __ETHMAC_RELEASE_RESET __HAL_RCC_ETHMAC_RELEASE_RESET +#define __ETHMACRX_CLK_DISABLE __HAL_RCC_ETHMACRX_CLK_DISABLE +#define __ETHMACRX_CLK_ENABLE __HAL_RCC_ETHMACRX_CLK_ENABLE +#define __ETHMACTX_CLK_DISABLE __HAL_RCC_ETHMACTX_CLK_DISABLE +#define __ETHMACTX_CLK_ENABLE __HAL_RCC_ETHMACTX_CLK_ENABLE +#define __FIREWALL_CLK_DISABLE __HAL_RCC_FIREWALL_CLK_DISABLE +#define __FIREWALL_CLK_ENABLE __HAL_RCC_FIREWALL_CLK_ENABLE +#define __FLASH_CLK_DISABLE __HAL_RCC_FLASH_CLK_DISABLE +#define __FLASH_CLK_ENABLE __HAL_RCC_FLASH_CLK_ENABLE +#define __FLASH_CLK_SLEEP_DISABLE __HAL_RCC_FLASH_CLK_SLEEP_DISABLE +#define __FLASH_CLK_SLEEP_ENABLE __HAL_RCC_FLASH_CLK_SLEEP_ENABLE +#define __FLASH_FORCE_RESET __HAL_RCC_FLASH_FORCE_RESET +#define __FLASH_RELEASE_RESET __HAL_RCC_FLASH_RELEASE_RESET +#define __FLITF_CLK_DISABLE __HAL_RCC_FLITF_CLK_DISABLE +#define __FLITF_CLK_ENABLE __HAL_RCC_FLITF_CLK_ENABLE +#define __FLITF_FORCE_RESET __HAL_RCC_FLITF_FORCE_RESET +#define __FLITF_RELEASE_RESET __HAL_RCC_FLITF_RELEASE_RESET +#define __FLITF_CLK_SLEEP_ENABLE __HAL_RCC_FLITF_CLK_SLEEP_ENABLE +#define __FLITF_CLK_SLEEP_DISABLE __HAL_RCC_FLITF_CLK_SLEEP_DISABLE +#define __FMC_CLK_DISABLE __HAL_RCC_FMC_CLK_DISABLE +#define __FMC_CLK_ENABLE __HAL_RCC_FMC_CLK_ENABLE +#define __FMC_CLK_SLEEP_DISABLE __HAL_RCC_FMC_CLK_SLEEP_DISABLE +#define __FMC_CLK_SLEEP_ENABLE __HAL_RCC_FMC_CLK_SLEEP_ENABLE +#define __FMC_FORCE_RESET __HAL_RCC_FMC_FORCE_RESET +#define __FMC_RELEASE_RESET __HAL_RCC_FMC_RELEASE_RESET +#define __FSMC_CLK_DISABLE __HAL_RCC_FSMC_CLK_DISABLE +#define __FSMC_CLK_ENABLE __HAL_RCC_FSMC_CLK_ENABLE +#define __GPIOA_CLK_DISABLE __HAL_RCC_GPIOA_CLK_DISABLE +#define __GPIOA_CLK_ENABLE __HAL_RCC_GPIOA_CLK_ENABLE +#define __GPIOA_CLK_SLEEP_DISABLE __HAL_RCC_GPIOA_CLK_SLEEP_DISABLE +#define __GPIOA_CLK_SLEEP_ENABLE __HAL_RCC_GPIOA_CLK_SLEEP_ENABLE +#define __GPIOA_FORCE_RESET __HAL_RCC_GPIOA_FORCE_RESET +#define __GPIOA_RELEASE_RESET __HAL_RCC_GPIOA_RELEASE_RESET +#define __GPIOB_CLK_DISABLE __HAL_RCC_GPIOB_CLK_DISABLE +#define __GPIOB_CLK_ENABLE __HAL_RCC_GPIOB_CLK_ENABLE +#define __GPIOB_CLK_SLEEP_DISABLE __HAL_RCC_GPIOB_CLK_SLEEP_DISABLE +#define __GPIOB_CLK_SLEEP_ENABLE __HAL_RCC_GPIOB_CLK_SLEEP_ENABLE +#define __GPIOB_FORCE_RESET __HAL_RCC_GPIOB_FORCE_RESET +#define __GPIOB_RELEASE_RESET __HAL_RCC_GPIOB_RELEASE_RESET +#define __GPIOC_CLK_DISABLE __HAL_RCC_GPIOC_CLK_DISABLE +#define __GPIOC_CLK_ENABLE __HAL_RCC_GPIOC_CLK_ENABLE +#define __GPIOC_CLK_SLEEP_DISABLE __HAL_RCC_GPIOC_CLK_SLEEP_DISABLE +#define __GPIOC_CLK_SLEEP_ENABLE __HAL_RCC_GPIOC_CLK_SLEEP_ENABLE +#define __GPIOC_FORCE_RESET __HAL_RCC_GPIOC_FORCE_RESET +#define __GPIOC_RELEASE_RESET __HAL_RCC_GPIOC_RELEASE_RESET +#define __GPIOD_CLK_DISABLE __HAL_RCC_GPIOD_CLK_DISABLE +#define __GPIOD_CLK_ENABLE __HAL_RCC_GPIOD_CLK_ENABLE +#define __GPIOD_CLK_SLEEP_DISABLE __HAL_RCC_GPIOD_CLK_SLEEP_DISABLE +#define __GPIOD_CLK_SLEEP_ENABLE __HAL_RCC_GPIOD_CLK_SLEEP_ENABLE +#define __GPIOD_FORCE_RESET __HAL_RCC_GPIOD_FORCE_RESET +#define __GPIOD_RELEASE_RESET __HAL_RCC_GPIOD_RELEASE_RESET +#define __GPIOE_CLK_DISABLE __HAL_RCC_GPIOE_CLK_DISABLE +#define __GPIOE_CLK_ENABLE __HAL_RCC_GPIOE_CLK_ENABLE +#define __GPIOE_CLK_SLEEP_DISABLE __HAL_RCC_GPIOE_CLK_SLEEP_DISABLE +#define __GPIOE_CLK_SLEEP_ENABLE __HAL_RCC_GPIOE_CLK_SLEEP_ENABLE +#define __GPIOE_FORCE_RESET __HAL_RCC_GPIOE_FORCE_RESET +#define __GPIOE_RELEASE_RESET __HAL_RCC_GPIOE_RELEASE_RESET +#define __GPIOF_CLK_DISABLE __HAL_RCC_GPIOF_CLK_DISABLE +#define __GPIOF_CLK_ENABLE __HAL_RCC_GPIOF_CLK_ENABLE +#define __GPIOF_CLK_SLEEP_DISABLE __HAL_RCC_GPIOF_CLK_SLEEP_DISABLE +#define __GPIOF_CLK_SLEEP_ENABLE __HAL_RCC_GPIOF_CLK_SLEEP_ENABLE +#define __GPIOF_FORCE_RESET __HAL_RCC_GPIOF_FORCE_RESET +#define __GPIOF_RELEASE_RESET __HAL_RCC_GPIOF_RELEASE_RESET +#define __GPIOG_CLK_DISABLE __HAL_RCC_GPIOG_CLK_DISABLE +#define __GPIOG_CLK_ENABLE __HAL_RCC_GPIOG_CLK_ENABLE +#define __GPIOG_CLK_SLEEP_DISABLE __HAL_RCC_GPIOG_CLK_SLEEP_DISABLE +#define __GPIOG_CLK_SLEEP_ENABLE __HAL_RCC_GPIOG_CLK_SLEEP_ENABLE +#define __GPIOG_FORCE_RESET __HAL_RCC_GPIOG_FORCE_RESET +#define __GPIOG_RELEASE_RESET __HAL_RCC_GPIOG_RELEASE_RESET +#define __GPIOH_CLK_DISABLE __HAL_RCC_GPIOH_CLK_DISABLE +#define __GPIOH_CLK_ENABLE __HAL_RCC_GPIOH_CLK_ENABLE +#define __GPIOH_CLK_SLEEP_DISABLE __HAL_RCC_GPIOH_CLK_SLEEP_DISABLE +#define __GPIOH_CLK_SLEEP_ENABLE __HAL_RCC_GPIOH_CLK_SLEEP_ENABLE +#define __GPIOH_FORCE_RESET __HAL_RCC_GPIOH_FORCE_RESET +#define __GPIOH_RELEASE_RESET __HAL_RCC_GPIOH_RELEASE_RESET +#define __I2C1_CLK_DISABLE __HAL_RCC_I2C1_CLK_DISABLE +#define __I2C1_CLK_ENABLE __HAL_RCC_I2C1_CLK_ENABLE +#define __I2C1_CLK_SLEEP_DISABLE __HAL_RCC_I2C1_CLK_SLEEP_DISABLE +#define __I2C1_CLK_SLEEP_ENABLE __HAL_RCC_I2C1_CLK_SLEEP_ENABLE +#define __I2C1_FORCE_RESET __HAL_RCC_I2C1_FORCE_RESET +#define __I2C1_RELEASE_RESET __HAL_RCC_I2C1_RELEASE_RESET +#define __I2C2_CLK_DISABLE __HAL_RCC_I2C2_CLK_DISABLE +#define __I2C2_CLK_ENABLE __HAL_RCC_I2C2_CLK_ENABLE +#define __I2C2_CLK_SLEEP_DISABLE __HAL_RCC_I2C2_CLK_SLEEP_DISABLE +#define __I2C2_CLK_SLEEP_ENABLE __HAL_RCC_I2C2_CLK_SLEEP_ENABLE +#define __I2C2_FORCE_RESET __HAL_RCC_I2C2_FORCE_RESET +#define __I2C2_RELEASE_RESET __HAL_RCC_I2C2_RELEASE_RESET +#define __I2C3_CLK_DISABLE __HAL_RCC_I2C3_CLK_DISABLE +#define __I2C3_CLK_ENABLE __HAL_RCC_I2C3_CLK_ENABLE +#define __I2C3_CLK_SLEEP_DISABLE __HAL_RCC_I2C3_CLK_SLEEP_DISABLE +#define __I2C3_CLK_SLEEP_ENABLE __HAL_RCC_I2C3_CLK_SLEEP_ENABLE +#define __I2C3_FORCE_RESET __HAL_RCC_I2C3_FORCE_RESET +#define __I2C3_RELEASE_RESET __HAL_RCC_I2C3_RELEASE_RESET +#define __LCD_CLK_DISABLE __HAL_RCC_LCD_CLK_DISABLE +#define __LCD_CLK_ENABLE __HAL_RCC_LCD_CLK_ENABLE +#define __LCD_CLK_SLEEP_DISABLE __HAL_RCC_LCD_CLK_SLEEP_DISABLE +#define __LCD_CLK_SLEEP_ENABLE __HAL_RCC_LCD_CLK_SLEEP_ENABLE +#define __LCD_FORCE_RESET __HAL_RCC_LCD_FORCE_RESET +#define __LCD_RELEASE_RESET __HAL_RCC_LCD_RELEASE_RESET +#define __LPTIM1_CLK_DISABLE __HAL_RCC_LPTIM1_CLK_DISABLE +#define __LPTIM1_CLK_ENABLE __HAL_RCC_LPTIM1_CLK_ENABLE +#define __LPTIM1_CLK_SLEEP_DISABLE __HAL_RCC_LPTIM1_CLK_SLEEP_DISABLE +#define __LPTIM1_CLK_SLEEP_ENABLE __HAL_RCC_LPTIM1_CLK_SLEEP_ENABLE +#define __LPTIM1_FORCE_RESET __HAL_RCC_LPTIM1_FORCE_RESET +#define __LPTIM1_RELEASE_RESET __HAL_RCC_LPTIM1_RELEASE_RESET +#define __LPTIM2_CLK_DISABLE __HAL_RCC_LPTIM2_CLK_DISABLE +#define __LPTIM2_CLK_ENABLE __HAL_RCC_LPTIM2_CLK_ENABLE +#define __LPTIM2_CLK_SLEEP_DISABLE __HAL_RCC_LPTIM2_CLK_SLEEP_DISABLE +#define __LPTIM2_CLK_SLEEP_ENABLE __HAL_RCC_LPTIM2_CLK_SLEEP_ENABLE +#define __LPTIM2_FORCE_RESET __HAL_RCC_LPTIM2_FORCE_RESET +#define __LPTIM2_RELEASE_RESET __HAL_RCC_LPTIM2_RELEASE_RESET +#define __LPUART1_CLK_DISABLE __HAL_RCC_LPUART1_CLK_DISABLE +#define __LPUART1_CLK_ENABLE __HAL_RCC_LPUART1_CLK_ENABLE +#define __LPUART1_CLK_SLEEP_DISABLE __HAL_RCC_LPUART1_CLK_SLEEP_DISABLE +#define __LPUART1_CLK_SLEEP_ENABLE __HAL_RCC_LPUART1_CLK_SLEEP_ENABLE +#define __LPUART1_FORCE_RESET __HAL_RCC_LPUART1_FORCE_RESET +#define __LPUART1_RELEASE_RESET __HAL_RCC_LPUART1_RELEASE_RESET +#define __OPAMP_CLK_DISABLE __HAL_RCC_OPAMP_CLK_DISABLE +#define __OPAMP_CLK_ENABLE __HAL_RCC_OPAMP_CLK_ENABLE +#define __OPAMP_CLK_SLEEP_DISABLE __HAL_RCC_OPAMP_CLK_SLEEP_DISABLE +#define __OPAMP_CLK_SLEEP_ENABLE __HAL_RCC_OPAMP_CLK_SLEEP_ENABLE +#define __OPAMP_FORCE_RESET __HAL_RCC_OPAMP_FORCE_RESET +#define __OPAMP_RELEASE_RESET __HAL_RCC_OPAMP_RELEASE_RESET +#define __OTGFS_CLK_DISABLE __HAL_RCC_OTGFS_CLK_DISABLE +#define __OTGFS_CLK_ENABLE __HAL_RCC_OTGFS_CLK_ENABLE +#define __OTGFS_CLK_SLEEP_DISABLE __HAL_RCC_OTGFS_CLK_SLEEP_DISABLE +#define __OTGFS_CLK_SLEEP_ENABLE __HAL_RCC_OTGFS_CLK_SLEEP_ENABLE +#define __OTGFS_FORCE_RESET __HAL_RCC_OTGFS_FORCE_RESET +#define __OTGFS_RELEASE_RESET __HAL_RCC_OTGFS_RELEASE_RESET +#define __PWR_CLK_DISABLE __HAL_RCC_PWR_CLK_DISABLE +#define __PWR_CLK_ENABLE __HAL_RCC_PWR_CLK_ENABLE +#define __PWR_CLK_SLEEP_DISABLE __HAL_RCC_PWR_CLK_SLEEP_DISABLE +#define __PWR_CLK_SLEEP_ENABLE __HAL_RCC_PWR_CLK_SLEEP_ENABLE +#define __PWR_FORCE_RESET __HAL_RCC_PWR_FORCE_RESET +#define __PWR_RELEASE_RESET __HAL_RCC_PWR_RELEASE_RESET +#define __QSPI_CLK_DISABLE __HAL_RCC_QSPI_CLK_DISABLE +#define __QSPI_CLK_ENABLE __HAL_RCC_QSPI_CLK_ENABLE +#define __QSPI_CLK_SLEEP_DISABLE __HAL_RCC_QSPI_CLK_SLEEP_DISABLE +#define __QSPI_CLK_SLEEP_ENABLE __HAL_RCC_QSPI_CLK_SLEEP_ENABLE +#define __QSPI_FORCE_RESET __HAL_RCC_QSPI_FORCE_RESET +#define __QSPI_RELEASE_RESET __HAL_RCC_QSPI_RELEASE_RESET + +#if defined(STM32WB) +#define __HAL_RCC_QSPI_CLK_DISABLE __HAL_RCC_QUADSPI_CLK_DISABLE +#define __HAL_RCC_QSPI_CLK_ENABLE __HAL_RCC_QUADSPI_CLK_ENABLE +#define __HAL_RCC_QSPI_CLK_SLEEP_DISABLE __HAL_RCC_QUADSPI_CLK_SLEEP_DISABLE +#define __HAL_RCC_QSPI_CLK_SLEEP_ENABLE __HAL_RCC_QUADSPI_CLK_SLEEP_ENABLE +#define __HAL_RCC_QSPI_FORCE_RESET __HAL_RCC_QUADSPI_FORCE_RESET +#define __HAL_RCC_QSPI_RELEASE_RESET __HAL_RCC_QUADSPI_RELEASE_RESET +#define __HAL_RCC_QSPI_IS_CLK_ENABLED __HAL_RCC_QUADSPI_IS_CLK_ENABLED +#define __HAL_RCC_QSPI_IS_CLK_DISABLED __HAL_RCC_QUADSPI_IS_CLK_DISABLED +#define __HAL_RCC_QSPI_IS_CLK_SLEEP_ENABLED __HAL_RCC_QUADSPI_IS_CLK_SLEEP_ENABLED +#define __HAL_RCC_QSPI_IS_CLK_SLEEP_DISABLED __HAL_RCC_QUADSPI_IS_CLK_SLEEP_DISABLED +#define QSPI_IRQHandler QUADSPI_IRQHandler +#endif /* __HAL_RCC_QUADSPI_CLK_ENABLE */ + +#define __RNG_CLK_DISABLE __HAL_RCC_RNG_CLK_DISABLE +#define __RNG_CLK_ENABLE __HAL_RCC_RNG_CLK_ENABLE +#define __RNG_CLK_SLEEP_DISABLE __HAL_RCC_RNG_CLK_SLEEP_DISABLE +#define __RNG_CLK_SLEEP_ENABLE __HAL_RCC_RNG_CLK_SLEEP_ENABLE +#define __RNG_FORCE_RESET __HAL_RCC_RNG_FORCE_RESET +#define __RNG_RELEASE_RESET __HAL_RCC_RNG_RELEASE_RESET +#define __SAI1_CLK_DISABLE __HAL_RCC_SAI1_CLK_DISABLE +#define __SAI1_CLK_ENABLE __HAL_RCC_SAI1_CLK_ENABLE +#define __SAI1_CLK_SLEEP_DISABLE __HAL_RCC_SAI1_CLK_SLEEP_DISABLE +#define __SAI1_CLK_SLEEP_ENABLE __HAL_RCC_SAI1_CLK_SLEEP_ENABLE +#define __SAI1_FORCE_RESET __HAL_RCC_SAI1_FORCE_RESET +#define __SAI1_RELEASE_RESET __HAL_RCC_SAI1_RELEASE_RESET +#define __SAI2_CLK_DISABLE __HAL_RCC_SAI2_CLK_DISABLE +#define __SAI2_CLK_ENABLE __HAL_RCC_SAI2_CLK_ENABLE +#define __SAI2_CLK_SLEEP_DISABLE __HAL_RCC_SAI2_CLK_SLEEP_DISABLE +#define __SAI2_CLK_SLEEP_ENABLE __HAL_RCC_SAI2_CLK_SLEEP_ENABLE +#define __SAI2_FORCE_RESET __HAL_RCC_SAI2_FORCE_RESET +#define __SAI2_RELEASE_RESET __HAL_RCC_SAI2_RELEASE_RESET +#define __SDIO_CLK_DISABLE __HAL_RCC_SDIO_CLK_DISABLE +#define __SDIO_CLK_ENABLE __HAL_RCC_SDIO_CLK_ENABLE +#define __SDMMC_CLK_DISABLE __HAL_RCC_SDMMC_CLK_DISABLE +#define __SDMMC_CLK_ENABLE __HAL_RCC_SDMMC_CLK_ENABLE +#define __SDMMC_CLK_SLEEP_DISABLE __HAL_RCC_SDMMC_CLK_SLEEP_DISABLE +#define __SDMMC_CLK_SLEEP_ENABLE __HAL_RCC_SDMMC_CLK_SLEEP_ENABLE +#define __SDMMC_FORCE_RESET __HAL_RCC_SDMMC_FORCE_RESET +#define __SDMMC_RELEASE_RESET __HAL_RCC_SDMMC_RELEASE_RESET +#define __SPI1_CLK_DISABLE __HAL_RCC_SPI1_CLK_DISABLE +#define __SPI1_CLK_ENABLE __HAL_RCC_SPI1_CLK_ENABLE +#define __SPI1_CLK_SLEEP_DISABLE __HAL_RCC_SPI1_CLK_SLEEP_DISABLE +#define __SPI1_CLK_SLEEP_ENABLE __HAL_RCC_SPI1_CLK_SLEEP_ENABLE +#define __SPI1_FORCE_RESET __HAL_RCC_SPI1_FORCE_RESET +#define __SPI1_RELEASE_RESET __HAL_RCC_SPI1_RELEASE_RESET +#define __SPI2_CLK_DISABLE __HAL_RCC_SPI2_CLK_DISABLE +#define __SPI2_CLK_ENABLE __HAL_RCC_SPI2_CLK_ENABLE +#define __SPI2_CLK_SLEEP_DISABLE __HAL_RCC_SPI2_CLK_SLEEP_DISABLE +#define __SPI2_CLK_SLEEP_ENABLE __HAL_RCC_SPI2_CLK_SLEEP_ENABLE +#define __SPI2_FORCE_RESET __HAL_RCC_SPI2_FORCE_RESET +#define __SPI2_RELEASE_RESET __HAL_RCC_SPI2_RELEASE_RESET +#define __SPI3_CLK_DISABLE __HAL_RCC_SPI3_CLK_DISABLE +#define __SPI3_CLK_ENABLE __HAL_RCC_SPI3_CLK_ENABLE +#define __SPI3_CLK_SLEEP_DISABLE __HAL_RCC_SPI3_CLK_SLEEP_DISABLE +#define __SPI3_CLK_SLEEP_ENABLE __HAL_RCC_SPI3_CLK_SLEEP_ENABLE +#define __SPI3_FORCE_RESET __HAL_RCC_SPI3_FORCE_RESET +#define __SPI3_RELEASE_RESET __HAL_RCC_SPI3_RELEASE_RESET +#define __SRAM_CLK_DISABLE __HAL_RCC_SRAM_CLK_DISABLE +#define __SRAM_CLK_ENABLE __HAL_RCC_SRAM_CLK_ENABLE +#define __SRAM1_CLK_SLEEP_DISABLE __HAL_RCC_SRAM1_CLK_SLEEP_DISABLE +#define __SRAM1_CLK_SLEEP_ENABLE __HAL_RCC_SRAM1_CLK_SLEEP_ENABLE +#define __SRAM2_CLK_SLEEP_DISABLE __HAL_RCC_SRAM2_CLK_SLEEP_DISABLE +#define __SRAM2_CLK_SLEEP_ENABLE __HAL_RCC_SRAM2_CLK_SLEEP_ENABLE +#define __SWPMI1_CLK_DISABLE __HAL_RCC_SWPMI1_CLK_DISABLE +#define __SWPMI1_CLK_ENABLE __HAL_RCC_SWPMI1_CLK_ENABLE +#define __SWPMI1_CLK_SLEEP_DISABLE __HAL_RCC_SWPMI1_CLK_SLEEP_DISABLE +#define __SWPMI1_CLK_SLEEP_ENABLE __HAL_RCC_SWPMI1_CLK_SLEEP_ENABLE +#define __SWPMI1_FORCE_RESET __HAL_RCC_SWPMI1_FORCE_RESET +#define __SWPMI1_RELEASE_RESET __HAL_RCC_SWPMI1_RELEASE_RESET +#define __SYSCFG_CLK_DISABLE __HAL_RCC_SYSCFG_CLK_DISABLE +#define __SYSCFG_CLK_ENABLE __HAL_RCC_SYSCFG_CLK_ENABLE +#define __SYSCFG_CLK_SLEEP_DISABLE __HAL_RCC_SYSCFG_CLK_SLEEP_DISABLE +#define __SYSCFG_CLK_SLEEP_ENABLE __HAL_RCC_SYSCFG_CLK_SLEEP_ENABLE +#define __SYSCFG_FORCE_RESET __HAL_RCC_SYSCFG_FORCE_RESET +#define __SYSCFG_RELEASE_RESET __HAL_RCC_SYSCFG_RELEASE_RESET +#define __TIM1_CLK_DISABLE __HAL_RCC_TIM1_CLK_DISABLE +#define __TIM1_CLK_ENABLE __HAL_RCC_TIM1_CLK_ENABLE +#define __TIM1_CLK_SLEEP_DISABLE __HAL_RCC_TIM1_CLK_SLEEP_DISABLE +#define __TIM1_CLK_SLEEP_ENABLE __HAL_RCC_TIM1_CLK_SLEEP_ENABLE +#define __TIM1_FORCE_RESET __HAL_RCC_TIM1_FORCE_RESET +#define __TIM1_RELEASE_RESET __HAL_RCC_TIM1_RELEASE_RESET +#define __TIM10_CLK_DISABLE __HAL_RCC_TIM10_CLK_DISABLE +#define __TIM10_CLK_ENABLE __HAL_RCC_TIM10_CLK_ENABLE +#define __TIM10_FORCE_RESET __HAL_RCC_TIM10_FORCE_RESET +#define __TIM10_RELEASE_RESET __HAL_RCC_TIM10_RELEASE_RESET +#define __TIM11_CLK_DISABLE __HAL_RCC_TIM11_CLK_DISABLE +#define __TIM11_CLK_ENABLE __HAL_RCC_TIM11_CLK_ENABLE +#define __TIM11_FORCE_RESET __HAL_RCC_TIM11_FORCE_RESET +#define __TIM11_RELEASE_RESET __HAL_RCC_TIM11_RELEASE_RESET +#define __TIM12_CLK_DISABLE __HAL_RCC_TIM12_CLK_DISABLE +#define __TIM12_CLK_ENABLE __HAL_RCC_TIM12_CLK_ENABLE +#define __TIM12_FORCE_RESET __HAL_RCC_TIM12_FORCE_RESET +#define __TIM12_RELEASE_RESET __HAL_RCC_TIM12_RELEASE_RESET +#define __TIM13_CLK_DISABLE __HAL_RCC_TIM13_CLK_DISABLE +#define __TIM13_CLK_ENABLE __HAL_RCC_TIM13_CLK_ENABLE +#define __TIM13_FORCE_RESET __HAL_RCC_TIM13_FORCE_RESET +#define __TIM13_RELEASE_RESET __HAL_RCC_TIM13_RELEASE_RESET +#define __TIM14_CLK_DISABLE __HAL_RCC_TIM14_CLK_DISABLE +#define __TIM14_CLK_ENABLE __HAL_RCC_TIM14_CLK_ENABLE +#define __TIM14_FORCE_RESET __HAL_RCC_TIM14_FORCE_RESET +#define __TIM14_RELEASE_RESET __HAL_RCC_TIM14_RELEASE_RESET +#define __TIM15_CLK_DISABLE __HAL_RCC_TIM15_CLK_DISABLE +#define __TIM15_CLK_ENABLE __HAL_RCC_TIM15_CLK_ENABLE +#define __TIM15_CLK_SLEEP_DISABLE __HAL_RCC_TIM15_CLK_SLEEP_DISABLE +#define __TIM15_CLK_SLEEP_ENABLE __HAL_RCC_TIM15_CLK_SLEEP_ENABLE +#define __TIM15_FORCE_RESET __HAL_RCC_TIM15_FORCE_RESET +#define __TIM15_RELEASE_RESET __HAL_RCC_TIM15_RELEASE_RESET +#define __TIM16_CLK_DISABLE __HAL_RCC_TIM16_CLK_DISABLE +#define __TIM16_CLK_ENABLE __HAL_RCC_TIM16_CLK_ENABLE +#define __TIM16_CLK_SLEEP_DISABLE __HAL_RCC_TIM16_CLK_SLEEP_DISABLE +#define __TIM16_CLK_SLEEP_ENABLE __HAL_RCC_TIM16_CLK_SLEEP_ENABLE +#define __TIM16_FORCE_RESET __HAL_RCC_TIM16_FORCE_RESET +#define __TIM16_RELEASE_RESET __HAL_RCC_TIM16_RELEASE_RESET +#define __TIM17_CLK_DISABLE __HAL_RCC_TIM17_CLK_DISABLE +#define __TIM17_CLK_ENABLE __HAL_RCC_TIM17_CLK_ENABLE +#define __TIM17_CLK_SLEEP_DISABLE __HAL_RCC_TIM17_CLK_SLEEP_DISABLE +#define __TIM17_CLK_SLEEP_ENABLE __HAL_RCC_TIM17_CLK_SLEEP_ENABLE +#define __TIM17_FORCE_RESET __HAL_RCC_TIM17_FORCE_RESET +#define __TIM17_RELEASE_RESET __HAL_RCC_TIM17_RELEASE_RESET +#define __TIM2_CLK_DISABLE __HAL_RCC_TIM2_CLK_DISABLE +#define __TIM2_CLK_ENABLE __HAL_RCC_TIM2_CLK_ENABLE +#define __TIM2_CLK_SLEEP_DISABLE __HAL_RCC_TIM2_CLK_SLEEP_DISABLE +#define __TIM2_CLK_SLEEP_ENABLE __HAL_RCC_TIM2_CLK_SLEEP_ENABLE +#define __TIM2_FORCE_RESET __HAL_RCC_TIM2_FORCE_RESET +#define __TIM2_RELEASE_RESET __HAL_RCC_TIM2_RELEASE_RESET +#define __TIM3_CLK_DISABLE __HAL_RCC_TIM3_CLK_DISABLE +#define __TIM3_CLK_ENABLE __HAL_RCC_TIM3_CLK_ENABLE +#define __TIM3_CLK_SLEEP_DISABLE __HAL_RCC_TIM3_CLK_SLEEP_DISABLE +#define __TIM3_CLK_SLEEP_ENABLE __HAL_RCC_TIM3_CLK_SLEEP_ENABLE +#define __TIM3_FORCE_RESET __HAL_RCC_TIM3_FORCE_RESET +#define __TIM3_RELEASE_RESET __HAL_RCC_TIM3_RELEASE_RESET +#define __TIM4_CLK_DISABLE __HAL_RCC_TIM4_CLK_DISABLE +#define __TIM4_CLK_ENABLE __HAL_RCC_TIM4_CLK_ENABLE +#define __TIM4_CLK_SLEEP_DISABLE __HAL_RCC_TIM4_CLK_SLEEP_DISABLE +#define __TIM4_CLK_SLEEP_ENABLE __HAL_RCC_TIM4_CLK_SLEEP_ENABLE +#define __TIM4_FORCE_RESET __HAL_RCC_TIM4_FORCE_RESET +#define __TIM4_RELEASE_RESET __HAL_RCC_TIM4_RELEASE_RESET +#define __TIM5_CLK_DISABLE __HAL_RCC_TIM5_CLK_DISABLE +#define __TIM5_CLK_ENABLE __HAL_RCC_TIM5_CLK_ENABLE +#define __TIM5_CLK_SLEEP_DISABLE __HAL_RCC_TIM5_CLK_SLEEP_DISABLE +#define __TIM5_CLK_SLEEP_ENABLE __HAL_RCC_TIM5_CLK_SLEEP_ENABLE +#define __TIM5_FORCE_RESET __HAL_RCC_TIM5_FORCE_RESET +#define __TIM5_RELEASE_RESET __HAL_RCC_TIM5_RELEASE_RESET +#define __TIM6_CLK_DISABLE __HAL_RCC_TIM6_CLK_DISABLE +#define __TIM6_CLK_ENABLE __HAL_RCC_TIM6_CLK_ENABLE +#define __TIM6_CLK_SLEEP_DISABLE __HAL_RCC_TIM6_CLK_SLEEP_DISABLE +#define __TIM6_CLK_SLEEP_ENABLE __HAL_RCC_TIM6_CLK_SLEEP_ENABLE +#define __TIM6_FORCE_RESET __HAL_RCC_TIM6_FORCE_RESET +#define __TIM6_RELEASE_RESET __HAL_RCC_TIM6_RELEASE_RESET +#define __TIM7_CLK_DISABLE __HAL_RCC_TIM7_CLK_DISABLE +#define __TIM7_CLK_ENABLE __HAL_RCC_TIM7_CLK_ENABLE +#define __TIM7_CLK_SLEEP_DISABLE __HAL_RCC_TIM7_CLK_SLEEP_DISABLE +#define __TIM7_CLK_SLEEP_ENABLE __HAL_RCC_TIM7_CLK_SLEEP_ENABLE +#define __TIM7_FORCE_RESET __HAL_RCC_TIM7_FORCE_RESET +#define __TIM7_RELEASE_RESET __HAL_RCC_TIM7_RELEASE_RESET +#define __TIM8_CLK_DISABLE __HAL_RCC_TIM8_CLK_DISABLE +#define __TIM8_CLK_ENABLE __HAL_RCC_TIM8_CLK_ENABLE +#define __TIM8_CLK_SLEEP_DISABLE __HAL_RCC_TIM8_CLK_SLEEP_DISABLE +#define __TIM8_CLK_SLEEP_ENABLE __HAL_RCC_TIM8_CLK_SLEEP_ENABLE +#define __TIM8_FORCE_RESET __HAL_RCC_TIM8_FORCE_RESET +#define __TIM8_RELEASE_RESET __HAL_RCC_TIM8_RELEASE_RESET +#define __TIM9_CLK_DISABLE __HAL_RCC_TIM9_CLK_DISABLE +#define __TIM9_CLK_ENABLE __HAL_RCC_TIM9_CLK_ENABLE +#define __TIM9_FORCE_RESET __HAL_RCC_TIM9_FORCE_RESET +#define __TIM9_RELEASE_RESET __HAL_RCC_TIM9_RELEASE_RESET +#define __TSC_CLK_DISABLE __HAL_RCC_TSC_CLK_DISABLE +#define __TSC_CLK_ENABLE __HAL_RCC_TSC_CLK_ENABLE +#define __TSC_CLK_SLEEP_DISABLE __HAL_RCC_TSC_CLK_SLEEP_DISABLE +#define __TSC_CLK_SLEEP_ENABLE __HAL_RCC_TSC_CLK_SLEEP_ENABLE +#define __TSC_FORCE_RESET __HAL_RCC_TSC_FORCE_RESET +#define __TSC_RELEASE_RESET __HAL_RCC_TSC_RELEASE_RESET +#define __UART4_CLK_DISABLE __HAL_RCC_UART4_CLK_DISABLE +#define __UART4_CLK_ENABLE __HAL_RCC_UART4_CLK_ENABLE +#define __UART4_CLK_SLEEP_DISABLE __HAL_RCC_UART4_CLK_SLEEP_DISABLE +#define __UART4_CLK_SLEEP_ENABLE __HAL_RCC_UART4_CLK_SLEEP_ENABLE +#define __UART4_FORCE_RESET __HAL_RCC_UART4_FORCE_RESET +#define __UART4_RELEASE_RESET __HAL_RCC_UART4_RELEASE_RESET +#define __UART5_CLK_DISABLE __HAL_RCC_UART5_CLK_DISABLE +#define __UART5_CLK_ENABLE __HAL_RCC_UART5_CLK_ENABLE +#define __UART5_CLK_SLEEP_DISABLE __HAL_RCC_UART5_CLK_SLEEP_DISABLE +#define __UART5_CLK_SLEEP_ENABLE __HAL_RCC_UART5_CLK_SLEEP_ENABLE +#define __UART5_FORCE_RESET __HAL_RCC_UART5_FORCE_RESET +#define __UART5_RELEASE_RESET __HAL_RCC_UART5_RELEASE_RESET +#define __USART1_CLK_DISABLE __HAL_RCC_USART1_CLK_DISABLE +#define __USART1_CLK_ENABLE __HAL_RCC_USART1_CLK_ENABLE +#define __USART1_CLK_SLEEP_DISABLE __HAL_RCC_USART1_CLK_SLEEP_DISABLE +#define __USART1_CLK_SLEEP_ENABLE __HAL_RCC_USART1_CLK_SLEEP_ENABLE +#define __USART1_FORCE_RESET __HAL_RCC_USART1_FORCE_RESET +#define __USART1_RELEASE_RESET __HAL_RCC_USART1_RELEASE_RESET +#define __USART2_CLK_DISABLE __HAL_RCC_USART2_CLK_DISABLE +#define __USART2_CLK_ENABLE __HAL_RCC_USART2_CLK_ENABLE +#define __USART2_CLK_SLEEP_DISABLE __HAL_RCC_USART2_CLK_SLEEP_DISABLE +#define __USART2_CLK_SLEEP_ENABLE __HAL_RCC_USART2_CLK_SLEEP_ENABLE +#define __USART2_FORCE_RESET __HAL_RCC_USART2_FORCE_RESET +#define __USART2_RELEASE_RESET __HAL_RCC_USART2_RELEASE_RESET +#define __USART3_CLK_DISABLE __HAL_RCC_USART3_CLK_DISABLE +#define __USART3_CLK_ENABLE __HAL_RCC_USART3_CLK_ENABLE +#define __USART3_CLK_SLEEP_DISABLE __HAL_RCC_USART3_CLK_SLEEP_DISABLE +#define __USART3_CLK_SLEEP_ENABLE __HAL_RCC_USART3_CLK_SLEEP_ENABLE +#define __USART3_FORCE_RESET __HAL_RCC_USART3_FORCE_RESET +#define __USART3_RELEASE_RESET __HAL_RCC_USART3_RELEASE_RESET +#define __USART4_CLK_DISABLE __HAL_RCC_UART4_CLK_DISABLE +#define __USART4_CLK_ENABLE __HAL_RCC_UART4_CLK_ENABLE +#define __USART4_CLK_SLEEP_ENABLE __HAL_RCC_UART4_CLK_SLEEP_ENABLE +#define __USART4_CLK_SLEEP_DISABLE __HAL_RCC_UART4_CLK_SLEEP_DISABLE +#define __USART4_FORCE_RESET __HAL_RCC_UART4_FORCE_RESET +#define __USART4_RELEASE_RESET __HAL_RCC_UART4_RELEASE_RESET +#define __USART5_CLK_DISABLE __HAL_RCC_UART5_CLK_DISABLE +#define __USART5_CLK_ENABLE __HAL_RCC_UART5_CLK_ENABLE +#define __USART5_CLK_SLEEP_ENABLE __HAL_RCC_UART5_CLK_SLEEP_ENABLE +#define __USART5_CLK_SLEEP_DISABLE __HAL_RCC_UART5_CLK_SLEEP_DISABLE +#define __USART5_FORCE_RESET __HAL_RCC_UART5_FORCE_RESET +#define __USART5_RELEASE_RESET __HAL_RCC_UART5_RELEASE_RESET +#define __USART7_CLK_DISABLE __HAL_RCC_UART7_CLK_DISABLE +#define __USART7_CLK_ENABLE __HAL_RCC_UART7_CLK_ENABLE +#define __USART7_FORCE_RESET __HAL_RCC_UART7_FORCE_RESET +#define __USART7_RELEASE_RESET __HAL_RCC_UART7_RELEASE_RESET +#define __USART8_CLK_DISABLE __HAL_RCC_UART8_CLK_DISABLE +#define __USART8_CLK_ENABLE __HAL_RCC_UART8_CLK_ENABLE +#define __USART8_FORCE_RESET __HAL_RCC_UART8_FORCE_RESET +#define __USART8_RELEASE_RESET __HAL_RCC_UART8_RELEASE_RESET +#define __USB_CLK_DISABLE __HAL_RCC_USB_CLK_DISABLE +#define __USB_CLK_ENABLE __HAL_RCC_USB_CLK_ENABLE +#define __USB_FORCE_RESET __HAL_RCC_USB_FORCE_RESET +#define __USB_CLK_SLEEP_ENABLE __HAL_RCC_USB_CLK_SLEEP_ENABLE +#define __USB_CLK_SLEEP_DISABLE __HAL_RCC_USB_CLK_SLEEP_DISABLE +#define __USB_OTG_FS_CLK_DISABLE __HAL_RCC_USB_OTG_FS_CLK_DISABLE +#define __USB_OTG_FS_CLK_ENABLE __HAL_RCC_USB_OTG_FS_CLK_ENABLE +#define __USB_RELEASE_RESET __HAL_RCC_USB_RELEASE_RESET + +#if defined(STM32H7) +#define __HAL_RCC_WWDG_CLK_DISABLE __HAL_RCC_WWDG1_CLK_DISABLE +#define __HAL_RCC_WWDG_CLK_ENABLE __HAL_RCC_WWDG1_CLK_ENABLE +#define __HAL_RCC_WWDG_CLK_SLEEP_DISABLE __HAL_RCC_WWDG1_CLK_SLEEP_DISABLE +#define __HAL_RCC_WWDG_CLK_SLEEP_ENABLE __HAL_RCC_WWDG1_CLK_SLEEP_ENABLE + +#define __HAL_RCC_WWDG_FORCE_RESET ((void)0U) /* Not available on the STM32H7*/ +#define __HAL_RCC_WWDG_RELEASE_RESET ((void)0U) /* Not available on the STM32H7*/ + + +#define __HAL_RCC_WWDG_IS_CLK_ENABLED __HAL_RCC_WWDG1_IS_CLK_ENABLED +#define __HAL_RCC_WWDG_IS_CLK_DISABLED __HAL_RCC_WWDG1_IS_CLK_DISABLED +#define RCC_SPI4CLKSOURCE_D2PCLK1 RCC_SPI4CLKSOURCE_D2PCLK2 +#define RCC_SPI5CLKSOURCE_D2PCLK1 RCC_SPI5CLKSOURCE_D2PCLK2 +#define RCC_SPI45CLKSOURCE_D2PCLK1 RCC_SPI45CLKSOURCE_D2PCLK2 +#define RCC_SPI45CLKSOURCE_CDPCLK1 RCC_SPI45CLKSOURCE_CDPCLK2 +#define RCC_SPI45CLKSOURCE_PCLK1 RCC_SPI45CLKSOURCE_PCLK2 +#endif + +#define __WWDG_CLK_DISABLE __HAL_RCC_WWDG_CLK_DISABLE +#define __WWDG_CLK_ENABLE __HAL_RCC_WWDG_CLK_ENABLE +#define __WWDG_CLK_SLEEP_DISABLE __HAL_RCC_WWDG_CLK_SLEEP_DISABLE +#define __WWDG_CLK_SLEEP_ENABLE __HAL_RCC_WWDG_CLK_SLEEP_ENABLE +#define __WWDG_FORCE_RESET __HAL_RCC_WWDG_FORCE_RESET +#define __WWDG_RELEASE_RESET __HAL_RCC_WWDG_RELEASE_RESET + +#define __TIM21_CLK_ENABLE __HAL_RCC_TIM21_CLK_ENABLE +#define __TIM21_CLK_DISABLE __HAL_RCC_TIM21_CLK_DISABLE +#define __TIM21_FORCE_RESET __HAL_RCC_TIM21_FORCE_RESET +#define __TIM21_RELEASE_RESET __HAL_RCC_TIM21_RELEASE_RESET +#define __TIM21_CLK_SLEEP_ENABLE __HAL_RCC_TIM21_CLK_SLEEP_ENABLE +#define __TIM21_CLK_SLEEP_DISABLE __HAL_RCC_TIM21_CLK_SLEEP_DISABLE +#define __TIM22_CLK_ENABLE __HAL_RCC_TIM22_CLK_ENABLE +#define __TIM22_CLK_DISABLE __HAL_RCC_TIM22_CLK_DISABLE +#define __TIM22_FORCE_RESET __HAL_RCC_TIM22_FORCE_RESET +#define __TIM22_RELEASE_RESET __HAL_RCC_TIM22_RELEASE_RESET +#define __TIM22_CLK_SLEEP_ENABLE __HAL_RCC_TIM22_CLK_SLEEP_ENABLE +#define __TIM22_CLK_SLEEP_DISABLE __HAL_RCC_TIM22_CLK_SLEEP_DISABLE +#define __CRS_CLK_DISABLE __HAL_RCC_CRS_CLK_DISABLE +#define __CRS_CLK_ENABLE __HAL_RCC_CRS_CLK_ENABLE +#define __CRS_CLK_SLEEP_DISABLE __HAL_RCC_CRS_CLK_SLEEP_DISABLE +#define __CRS_CLK_SLEEP_ENABLE __HAL_RCC_CRS_CLK_SLEEP_ENABLE +#define __CRS_FORCE_RESET __HAL_RCC_CRS_FORCE_RESET +#define __CRS_RELEASE_RESET __HAL_RCC_CRS_RELEASE_RESET +#define __RCC_BACKUPRESET_FORCE __HAL_RCC_BACKUPRESET_FORCE +#define __RCC_BACKUPRESET_RELEASE __HAL_RCC_BACKUPRESET_RELEASE + +#define __USB_OTG_FS_FORCE_RESET __HAL_RCC_USB_OTG_FS_FORCE_RESET +#define __USB_OTG_FS_RELEASE_RESET __HAL_RCC_USB_OTG_FS_RELEASE_RESET +#define __USB_OTG_FS_CLK_SLEEP_ENABLE __HAL_RCC_USB_OTG_FS_CLK_SLEEP_ENABLE +#define __USB_OTG_FS_CLK_SLEEP_DISABLE __HAL_RCC_USB_OTG_FS_CLK_SLEEP_DISABLE +#define __USB_OTG_HS_CLK_DISABLE __HAL_RCC_USB_OTG_HS_CLK_DISABLE +#define __USB_OTG_HS_CLK_ENABLE __HAL_RCC_USB_OTG_HS_CLK_ENABLE +#define __USB_OTG_HS_ULPI_CLK_ENABLE __HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE +#define __USB_OTG_HS_ULPI_CLK_DISABLE __HAL_RCC_USB_OTG_HS_ULPI_CLK_DISABLE +#define __TIM9_CLK_SLEEP_ENABLE __HAL_RCC_TIM9_CLK_SLEEP_ENABLE +#define __TIM9_CLK_SLEEP_DISABLE __HAL_RCC_TIM9_CLK_SLEEP_DISABLE +#define __TIM10_CLK_SLEEP_ENABLE __HAL_RCC_TIM10_CLK_SLEEP_ENABLE +#define __TIM10_CLK_SLEEP_DISABLE __HAL_RCC_TIM10_CLK_SLEEP_DISABLE +#define __TIM11_CLK_SLEEP_ENABLE __HAL_RCC_TIM11_CLK_SLEEP_ENABLE +#define __TIM11_CLK_SLEEP_DISABLE __HAL_RCC_TIM11_CLK_SLEEP_DISABLE +#define __ETHMACPTP_CLK_SLEEP_ENABLE __HAL_RCC_ETHMACPTP_CLK_SLEEP_ENABLE +#define __ETHMACPTP_CLK_SLEEP_DISABLE __HAL_RCC_ETHMACPTP_CLK_SLEEP_DISABLE +#define __ETHMACPTP_CLK_ENABLE __HAL_RCC_ETHMACPTP_CLK_ENABLE +#define __ETHMACPTP_CLK_DISABLE __HAL_RCC_ETHMACPTP_CLK_DISABLE +#define __HASH_CLK_ENABLE __HAL_RCC_HASH_CLK_ENABLE +#define __HASH_FORCE_RESET __HAL_RCC_HASH_FORCE_RESET +#define __HASH_RELEASE_RESET __HAL_RCC_HASH_RELEASE_RESET +#define __HASH_CLK_SLEEP_ENABLE __HAL_RCC_HASH_CLK_SLEEP_ENABLE +#define __HASH_CLK_SLEEP_DISABLE __HAL_RCC_HASH_CLK_SLEEP_DISABLE +#define __HASH_CLK_DISABLE __HAL_RCC_HASH_CLK_DISABLE +#define __SPI5_CLK_ENABLE __HAL_RCC_SPI5_CLK_ENABLE +#define __SPI5_CLK_DISABLE __HAL_RCC_SPI5_CLK_DISABLE +#define __SPI5_FORCE_RESET __HAL_RCC_SPI5_FORCE_RESET +#define __SPI5_RELEASE_RESET __HAL_RCC_SPI5_RELEASE_RESET +#define __SPI5_CLK_SLEEP_ENABLE __HAL_RCC_SPI5_CLK_SLEEP_ENABLE +#define __SPI5_CLK_SLEEP_DISABLE __HAL_RCC_SPI5_CLK_SLEEP_DISABLE +#define __SPI6_CLK_ENABLE __HAL_RCC_SPI6_CLK_ENABLE +#define __SPI6_CLK_DISABLE __HAL_RCC_SPI6_CLK_DISABLE +#define __SPI6_FORCE_RESET __HAL_RCC_SPI6_FORCE_RESET +#define __SPI6_RELEASE_RESET __HAL_RCC_SPI6_RELEASE_RESET +#define __SPI6_CLK_SLEEP_ENABLE __HAL_RCC_SPI6_CLK_SLEEP_ENABLE +#define __SPI6_CLK_SLEEP_DISABLE __HAL_RCC_SPI6_CLK_SLEEP_DISABLE +#define __LTDC_CLK_ENABLE __HAL_RCC_LTDC_CLK_ENABLE +#define __LTDC_CLK_DISABLE __HAL_RCC_LTDC_CLK_DISABLE +#define __LTDC_FORCE_RESET __HAL_RCC_LTDC_FORCE_RESET +#define __LTDC_RELEASE_RESET __HAL_RCC_LTDC_RELEASE_RESET +#define __LTDC_CLK_SLEEP_ENABLE __HAL_RCC_LTDC_CLK_SLEEP_ENABLE +#define __ETHMAC_CLK_SLEEP_ENABLE __HAL_RCC_ETHMAC_CLK_SLEEP_ENABLE +#define __ETHMAC_CLK_SLEEP_DISABLE __HAL_RCC_ETHMAC_CLK_SLEEP_DISABLE +#define __ETHMACTX_CLK_SLEEP_ENABLE __HAL_RCC_ETHMACTX_CLK_SLEEP_ENABLE +#define __ETHMACTX_CLK_SLEEP_DISABLE __HAL_RCC_ETHMACTX_CLK_SLEEP_DISABLE +#define __ETHMACRX_CLK_SLEEP_ENABLE __HAL_RCC_ETHMACRX_CLK_SLEEP_ENABLE +#define __ETHMACRX_CLK_SLEEP_DISABLE __HAL_RCC_ETHMACRX_CLK_SLEEP_DISABLE +#define __TIM12_CLK_SLEEP_ENABLE __HAL_RCC_TIM12_CLK_SLEEP_ENABLE +#define __TIM12_CLK_SLEEP_DISABLE __HAL_RCC_TIM12_CLK_SLEEP_DISABLE +#define __TIM13_CLK_SLEEP_ENABLE __HAL_RCC_TIM13_CLK_SLEEP_ENABLE +#define __TIM13_CLK_SLEEP_DISABLE __HAL_RCC_TIM13_CLK_SLEEP_DISABLE +#define __TIM14_CLK_SLEEP_ENABLE __HAL_RCC_TIM14_CLK_SLEEP_ENABLE +#define __TIM14_CLK_SLEEP_DISABLE __HAL_RCC_TIM14_CLK_SLEEP_DISABLE +#define __BKPSRAM_CLK_ENABLE __HAL_RCC_BKPSRAM_CLK_ENABLE +#define __BKPSRAM_CLK_DISABLE __HAL_RCC_BKPSRAM_CLK_DISABLE +#define __BKPSRAM_CLK_SLEEP_ENABLE __HAL_RCC_BKPSRAM_CLK_SLEEP_ENABLE +#define __BKPSRAM_CLK_SLEEP_DISABLE __HAL_RCC_BKPSRAM_CLK_SLEEP_DISABLE +#define __CCMDATARAMEN_CLK_ENABLE __HAL_RCC_CCMDATARAMEN_CLK_ENABLE +#define __CCMDATARAMEN_CLK_DISABLE __HAL_RCC_CCMDATARAMEN_CLK_DISABLE +#define __USART6_CLK_ENABLE __HAL_RCC_USART6_CLK_ENABLE +#define __USART6_CLK_DISABLE __HAL_RCC_USART6_CLK_DISABLE +#define __USART6_FORCE_RESET __HAL_RCC_USART6_FORCE_RESET +#define __USART6_RELEASE_RESET __HAL_RCC_USART6_RELEASE_RESET +#define __USART6_CLK_SLEEP_ENABLE __HAL_RCC_USART6_CLK_SLEEP_ENABLE +#define __USART6_CLK_SLEEP_DISABLE __HAL_RCC_USART6_CLK_SLEEP_DISABLE +#define __SPI4_CLK_ENABLE __HAL_RCC_SPI4_CLK_ENABLE +#define __SPI4_CLK_DISABLE __HAL_RCC_SPI4_CLK_DISABLE +#define __SPI4_FORCE_RESET __HAL_RCC_SPI4_FORCE_RESET +#define __SPI4_RELEASE_RESET __HAL_RCC_SPI4_RELEASE_RESET +#define __SPI4_CLK_SLEEP_ENABLE __HAL_RCC_SPI4_CLK_SLEEP_ENABLE +#define __SPI4_CLK_SLEEP_DISABLE __HAL_RCC_SPI4_CLK_SLEEP_DISABLE +#define __GPIOI_CLK_ENABLE __HAL_RCC_GPIOI_CLK_ENABLE +#define __GPIOI_CLK_DISABLE __HAL_RCC_GPIOI_CLK_DISABLE +#define __GPIOI_FORCE_RESET __HAL_RCC_GPIOI_FORCE_RESET +#define __GPIOI_RELEASE_RESET __HAL_RCC_GPIOI_RELEASE_RESET +#define __GPIOI_CLK_SLEEP_ENABLE __HAL_RCC_GPIOI_CLK_SLEEP_ENABLE +#define __GPIOI_CLK_SLEEP_DISABLE __HAL_RCC_GPIOI_CLK_SLEEP_DISABLE +#define __GPIOJ_CLK_ENABLE __HAL_RCC_GPIOJ_CLK_ENABLE +#define __GPIOJ_CLK_DISABLE __HAL_RCC_GPIOJ_CLK_DISABLE +#define __GPIOJ_FORCE_RESET __HAL_RCC_GPIOJ_FORCE_RESET +#define __GPIOJ_RELEASE_RESET __HAL_RCC_GPIOJ_RELEASE_RESET +#define __GPIOJ_CLK_SLEEP_ENABLE __HAL_RCC_GPIOJ_CLK_SLEEP_ENABLE +#define __GPIOJ_CLK_SLEEP_DISABLE __HAL_RCC_GPIOJ_CLK_SLEEP_DISABLE +#define __GPIOK_CLK_ENABLE __HAL_RCC_GPIOK_CLK_ENABLE +#define __GPIOK_CLK_DISABLE __HAL_RCC_GPIOK_CLK_DISABLE +#define __GPIOK_RELEASE_RESET __HAL_RCC_GPIOK_RELEASE_RESET +#define __GPIOK_CLK_SLEEP_ENABLE __HAL_RCC_GPIOK_CLK_SLEEP_ENABLE +#define __GPIOK_CLK_SLEEP_DISABLE __HAL_RCC_GPIOK_CLK_SLEEP_DISABLE +#define __ETH_CLK_ENABLE __HAL_RCC_ETH_CLK_ENABLE +#define __ETH_CLK_DISABLE __HAL_RCC_ETH_CLK_DISABLE +#define __DCMI_CLK_ENABLE __HAL_RCC_DCMI_CLK_ENABLE +#define __DCMI_CLK_DISABLE __HAL_RCC_DCMI_CLK_DISABLE +#define __DCMI_FORCE_RESET __HAL_RCC_DCMI_FORCE_RESET +#define __DCMI_RELEASE_RESET __HAL_RCC_DCMI_RELEASE_RESET +#define __DCMI_CLK_SLEEP_ENABLE __HAL_RCC_DCMI_CLK_SLEEP_ENABLE +#define __DCMI_CLK_SLEEP_DISABLE __HAL_RCC_DCMI_CLK_SLEEP_DISABLE +#define __UART7_CLK_ENABLE __HAL_RCC_UART7_CLK_ENABLE +#define __UART7_CLK_DISABLE __HAL_RCC_UART7_CLK_DISABLE +#define __UART7_RELEASE_RESET __HAL_RCC_UART7_RELEASE_RESET +#define __UART7_FORCE_RESET __HAL_RCC_UART7_FORCE_RESET +#define __UART7_CLK_SLEEP_ENABLE __HAL_RCC_UART7_CLK_SLEEP_ENABLE +#define __UART7_CLK_SLEEP_DISABLE __HAL_RCC_UART7_CLK_SLEEP_DISABLE +#define __UART8_CLK_ENABLE __HAL_RCC_UART8_CLK_ENABLE +#define __UART8_CLK_DISABLE __HAL_RCC_UART8_CLK_DISABLE +#define __UART8_FORCE_RESET __HAL_RCC_UART8_FORCE_RESET +#define __UART8_RELEASE_RESET __HAL_RCC_UART8_RELEASE_RESET +#define __UART8_CLK_SLEEP_ENABLE __HAL_RCC_UART8_CLK_SLEEP_ENABLE +#define __UART8_CLK_SLEEP_DISABLE __HAL_RCC_UART8_CLK_SLEEP_DISABLE +#define __OTGHS_CLK_SLEEP_ENABLE __HAL_RCC_USB_OTG_HS_CLK_SLEEP_ENABLE +#define __OTGHS_CLK_SLEEP_DISABLE __HAL_RCC_USB_OTG_HS_CLK_SLEEP_DISABLE +#define __OTGHS_FORCE_RESET __HAL_RCC_USB_OTG_HS_FORCE_RESET +#define __OTGHS_RELEASE_RESET __HAL_RCC_USB_OTG_HS_RELEASE_RESET +#define __OTGHSULPI_CLK_SLEEP_ENABLE __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_ENABLE +#define __OTGHSULPI_CLK_SLEEP_DISABLE __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_DISABLE +#define __HAL_RCC_OTGHS_CLK_SLEEP_ENABLE __HAL_RCC_USB_OTG_HS_CLK_SLEEP_ENABLE +#define __HAL_RCC_OTGHS_CLK_SLEEP_DISABLE __HAL_RCC_USB_OTG_HS_CLK_SLEEP_DISABLE +#define __HAL_RCC_OTGHS_IS_CLK_SLEEP_ENABLED __HAL_RCC_USB_OTG_HS_IS_CLK_SLEEP_ENABLED +#define __HAL_RCC_OTGHS_IS_CLK_SLEEP_DISABLED __HAL_RCC_USB_OTG_HS_IS_CLK_SLEEP_DISABLED +#define __HAL_RCC_OTGHS_FORCE_RESET __HAL_RCC_USB_OTG_HS_FORCE_RESET +#define __HAL_RCC_OTGHS_RELEASE_RESET __HAL_RCC_USB_OTG_HS_RELEASE_RESET +#define __HAL_RCC_OTGHSULPI_CLK_SLEEP_ENABLE __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_ENABLE +#define __HAL_RCC_OTGHSULPI_CLK_SLEEP_DISABLE __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_DISABLE +#define __HAL_RCC_OTGHSULPI_IS_CLK_SLEEP_ENABLED __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_SLEEP_ENABLED +#define __HAL_RCC_OTGHSULPI_IS_CLK_SLEEP_DISABLED __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_SLEEP_DISABLED +#define __SRAM3_CLK_SLEEP_ENABLE __HAL_RCC_SRAM3_CLK_SLEEP_ENABLE +#define __CAN2_CLK_SLEEP_ENABLE __HAL_RCC_CAN2_CLK_SLEEP_ENABLE +#define __CAN2_CLK_SLEEP_DISABLE __HAL_RCC_CAN2_CLK_SLEEP_DISABLE +#define __DAC_CLK_SLEEP_ENABLE __HAL_RCC_DAC_CLK_SLEEP_ENABLE +#define __DAC_CLK_SLEEP_DISABLE __HAL_RCC_DAC_CLK_SLEEP_DISABLE +#define __ADC2_CLK_SLEEP_ENABLE __HAL_RCC_ADC2_CLK_SLEEP_ENABLE +#define __ADC2_CLK_SLEEP_DISABLE __HAL_RCC_ADC2_CLK_SLEEP_DISABLE +#define __ADC3_CLK_SLEEP_ENABLE __HAL_RCC_ADC3_CLK_SLEEP_ENABLE +#define __ADC3_CLK_SLEEP_DISABLE __HAL_RCC_ADC3_CLK_SLEEP_DISABLE +#define __FSMC_FORCE_RESET __HAL_RCC_FSMC_FORCE_RESET +#define __FSMC_RELEASE_RESET __HAL_RCC_FSMC_RELEASE_RESET +#define __FSMC_CLK_SLEEP_ENABLE __HAL_RCC_FSMC_CLK_SLEEP_ENABLE +#define __FSMC_CLK_SLEEP_DISABLE __HAL_RCC_FSMC_CLK_SLEEP_DISABLE +#define __SDIO_FORCE_RESET __HAL_RCC_SDIO_FORCE_RESET +#define __SDIO_RELEASE_RESET __HAL_RCC_SDIO_RELEASE_RESET +#define __SDIO_CLK_SLEEP_DISABLE __HAL_RCC_SDIO_CLK_SLEEP_DISABLE +#define __SDIO_CLK_SLEEP_ENABLE __HAL_RCC_SDIO_CLK_SLEEP_ENABLE +#define __DMA2D_CLK_ENABLE __HAL_RCC_DMA2D_CLK_ENABLE +#define __DMA2D_CLK_DISABLE __HAL_RCC_DMA2D_CLK_DISABLE +#define __DMA2D_FORCE_RESET __HAL_RCC_DMA2D_FORCE_RESET +#define __DMA2D_RELEASE_RESET __HAL_RCC_DMA2D_RELEASE_RESET +#define __DMA2D_CLK_SLEEP_ENABLE __HAL_RCC_DMA2D_CLK_SLEEP_ENABLE +#define __DMA2D_CLK_SLEEP_DISABLE __HAL_RCC_DMA2D_CLK_SLEEP_DISABLE + +/* alias define maintained for legacy */ +#define __HAL_RCC_OTGFS_FORCE_RESET __HAL_RCC_USB_OTG_FS_FORCE_RESET +#define __HAL_RCC_OTGFS_RELEASE_RESET __HAL_RCC_USB_OTG_FS_RELEASE_RESET + +#define __ADC12_CLK_ENABLE __HAL_RCC_ADC12_CLK_ENABLE +#define __ADC12_CLK_DISABLE __HAL_RCC_ADC12_CLK_DISABLE +#define __ADC34_CLK_ENABLE __HAL_RCC_ADC34_CLK_ENABLE +#define __ADC34_CLK_DISABLE __HAL_RCC_ADC34_CLK_DISABLE +#define __DAC2_CLK_ENABLE __HAL_RCC_DAC2_CLK_ENABLE +#define __DAC2_CLK_DISABLE __HAL_RCC_DAC2_CLK_DISABLE +#define __TIM18_CLK_ENABLE __HAL_RCC_TIM18_CLK_ENABLE +#define __TIM18_CLK_DISABLE __HAL_RCC_TIM18_CLK_DISABLE +#define __TIM19_CLK_ENABLE __HAL_RCC_TIM19_CLK_ENABLE +#define __TIM19_CLK_DISABLE __HAL_RCC_TIM19_CLK_DISABLE +#define __TIM20_CLK_ENABLE __HAL_RCC_TIM20_CLK_ENABLE +#define __TIM20_CLK_DISABLE __HAL_RCC_TIM20_CLK_DISABLE +#define __HRTIM1_CLK_ENABLE __HAL_RCC_HRTIM1_CLK_ENABLE +#define __HRTIM1_CLK_DISABLE __HAL_RCC_HRTIM1_CLK_DISABLE +#define __SDADC1_CLK_ENABLE __HAL_RCC_SDADC1_CLK_ENABLE +#define __SDADC2_CLK_ENABLE __HAL_RCC_SDADC2_CLK_ENABLE +#define __SDADC3_CLK_ENABLE __HAL_RCC_SDADC3_CLK_ENABLE +#define __SDADC1_CLK_DISABLE __HAL_RCC_SDADC1_CLK_DISABLE +#define __SDADC2_CLK_DISABLE __HAL_RCC_SDADC2_CLK_DISABLE +#define __SDADC3_CLK_DISABLE __HAL_RCC_SDADC3_CLK_DISABLE + +#define __ADC12_FORCE_RESET __HAL_RCC_ADC12_FORCE_RESET +#define __ADC12_RELEASE_RESET __HAL_RCC_ADC12_RELEASE_RESET +#define __ADC34_FORCE_RESET __HAL_RCC_ADC34_FORCE_RESET +#define __ADC34_RELEASE_RESET __HAL_RCC_ADC34_RELEASE_RESET +#define __DAC2_FORCE_RESET __HAL_RCC_DAC2_FORCE_RESET +#define __DAC2_RELEASE_RESET __HAL_RCC_DAC2_RELEASE_RESET +#define __TIM18_FORCE_RESET __HAL_RCC_TIM18_FORCE_RESET +#define __TIM18_RELEASE_RESET __HAL_RCC_TIM18_RELEASE_RESET +#define __TIM19_FORCE_RESET __HAL_RCC_TIM19_FORCE_RESET +#define __TIM19_RELEASE_RESET __HAL_RCC_TIM19_RELEASE_RESET +#define __TIM20_FORCE_RESET __HAL_RCC_TIM20_FORCE_RESET +#define __TIM20_RELEASE_RESET __HAL_RCC_TIM20_RELEASE_RESET +#define __HRTIM1_FORCE_RESET __HAL_RCC_HRTIM1_FORCE_RESET +#define __HRTIM1_RELEASE_RESET __HAL_RCC_HRTIM1_RELEASE_RESET +#define __SDADC1_FORCE_RESET __HAL_RCC_SDADC1_FORCE_RESET +#define __SDADC2_FORCE_RESET __HAL_RCC_SDADC2_FORCE_RESET +#define __SDADC3_FORCE_RESET __HAL_RCC_SDADC3_FORCE_RESET +#define __SDADC1_RELEASE_RESET __HAL_RCC_SDADC1_RELEASE_RESET +#define __SDADC2_RELEASE_RESET __HAL_RCC_SDADC2_RELEASE_RESET +#define __SDADC3_RELEASE_RESET __HAL_RCC_SDADC3_RELEASE_RESET + +#define __ADC1_IS_CLK_ENABLED __HAL_RCC_ADC1_IS_CLK_ENABLED +#define __ADC1_IS_CLK_DISABLED __HAL_RCC_ADC1_IS_CLK_DISABLED +#define __ADC12_IS_CLK_ENABLED __HAL_RCC_ADC12_IS_CLK_ENABLED +#define __ADC12_IS_CLK_DISABLED __HAL_RCC_ADC12_IS_CLK_DISABLED +#define __ADC34_IS_CLK_ENABLED __HAL_RCC_ADC34_IS_CLK_ENABLED +#define __ADC34_IS_CLK_DISABLED __HAL_RCC_ADC34_IS_CLK_DISABLED +#define __CEC_IS_CLK_ENABLED __HAL_RCC_CEC_IS_CLK_ENABLED +#define __CEC_IS_CLK_DISABLED __HAL_RCC_CEC_IS_CLK_DISABLED +#define __CRC_IS_CLK_ENABLED __HAL_RCC_CRC_IS_CLK_ENABLED +#define __CRC_IS_CLK_DISABLED __HAL_RCC_CRC_IS_CLK_DISABLED +#define __DAC1_IS_CLK_ENABLED __HAL_RCC_DAC1_IS_CLK_ENABLED +#define __DAC1_IS_CLK_DISABLED __HAL_RCC_DAC1_IS_CLK_DISABLED +#define __DAC2_IS_CLK_ENABLED __HAL_RCC_DAC2_IS_CLK_ENABLED +#define __DAC2_IS_CLK_DISABLED __HAL_RCC_DAC2_IS_CLK_DISABLED +#define __DMA1_IS_CLK_ENABLED __HAL_RCC_DMA1_IS_CLK_ENABLED +#define __DMA1_IS_CLK_DISABLED __HAL_RCC_DMA1_IS_CLK_DISABLED +#define __DMA2_IS_CLK_ENABLED __HAL_RCC_DMA2_IS_CLK_ENABLED +#define __DMA2_IS_CLK_DISABLED __HAL_RCC_DMA2_IS_CLK_DISABLED +#define __FLITF_IS_CLK_ENABLED __HAL_RCC_FLITF_IS_CLK_ENABLED +#define __FLITF_IS_CLK_DISABLED __HAL_RCC_FLITF_IS_CLK_DISABLED +#define __FMC_IS_CLK_ENABLED __HAL_RCC_FMC_IS_CLK_ENABLED +#define __FMC_IS_CLK_DISABLED __HAL_RCC_FMC_IS_CLK_DISABLED +#define __GPIOA_IS_CLK_ENABLED __HAL_RCC_GPIOA_IS_CLK_ENABLED +#define __GPIOA_IS_CLK_DISABLED __HAL_RCC_GPIOA_IS_CLK_DISABLED +#define __GPIOB_IS_CLK_ENABLED __HAL_RCC_GPIOB_IS_CLK_ENABLED +#define __GPIOB_IS_CLK_DISABLED __HAL_RCC_GPIOB_IS_CLK_DISABLED +#define __GPIOC_IS_CLK_ENABLED __HAL_RCC_GPIOC_IS_CLK_ENABLED +#define __GPIOC_IS_CLK_DISABLED __HAL_RCC_GPIOC_IS_CLK_DISABLED +#define __GPIOD_IS_CLK_ENABLED __HAL_RCC_GPIOD_IS_CLK_ENABLED +#define __GPIOD_IS_CLK_DISABLED __HAL_RCC_GPIOD_IS_CLK_DISABLED +#define __GPIOE_IS_CLK_ENABLED __HAL_RCC_GPIOE_IS_CLK_ENABLED +#define __GPIOE_IS_CLK_DISABLED __HAL_RCC_GPIOE_IS_CLK_DISABLED +#define __GPIOF_IS_CLK_ENABLED __HAL_RCC_GPIOF_IS_CLK_ENABLED +#define __GPIOF_IS_CLK_DISABLED __HAL_RCC_GPIOF_IS_CLK_DISABLED +#define __GPIOG_IS_CLK_ENABLED __HAL_RCC_GPIOG_IS_CLK_ENABLED +#define __GPIOG_IS_CLK_DISABLED __HAL_RCC_GPIOG_IS_CLK_DISABLED +#define __GPIOH_IS_CLK_ENABLED __HAL_RCC_GPIOH_IS_CLK_ENABLED +#define __GPIOH_IS_CLK_DISABLED __HAL_RCC_GPIOH_IS_CLK_DISABLED +#define __HRTIM1_IS_CLK_ENABLED __HAL_RCC_HRTIM1_IS_CLK_ENABLED +#define __HRTIM1_IS_CLK_DISABLED __HAL_RCC_HRTIM1_IS_CLK_DISABLED +#define __I2C1_IS_CLK_ENABLED __HAL_RCC_I2C1_IS_CLK_ENABLED +#define __I2C1_IS_CLK_DISABLED __HAL_RCC_I2C1_IS_CLK_DISABLED +#define __I2C2_IS_CLK_ENABLED __HAL_RCC_I2C2_IS_CLK_ENABLED +#define __I2C2_IS_CLK_DISABLED __HAL_RCC_I2C2_IS_CLK_DISABLED +#define __I2C3_IS_CLK_ENABLED __HAL_RCC_I2C3_IS_CLK_ENABLED +#define __I2C3_IS_CLK_DISABLED __HAL_RCC_I2C3_IS_CLK_DISABLED +#define __PWR_IS_CLK_ENABLED __HAL_RCC_PWR_IS_CLK_ENABLED +#define __PWR_IS_CLK_DISABLED __HAL_RCC_PWR_IS_CLK_DISABLED +#define __SYSCFG_IS_CLK_ENABLED __HAL_RCC_SYSCFG_IS_CLK_ENABLED +#define __SYSCFG_IS_CLK_DISABLED __HAL_RCC_SYSCFG_IS_CLK_DISABLED +#define __SPI1_IS_CLK_ENABLED __HAL_RCC_SPI1_IS_CLK_ENABLED +#define __SPI1_IS_CLK_DISABLED __HAL_RCC_SPI1_IS_CLK_DISABLED +#define __SPI2_IS_CLK_ENABLED __HAL_RCC_SPI2_IS_CLK_ENABLED +#define __SPI2_IS_CLK_DISABLED __HAL_RCC_SPI2_IS_CLK_DISABLED +#define __SPI3_IS_CLK_ENABLED __HAL_RCC_SPI3_IS_CLK_ENABLED +#define __SPI3_IS_CLK_DISABLED __HAL_RCC_SPI3_IS_CLK_DISABLED +#define __SPI4_IS_CLK_ENABLED __HAL_RCC_SPI4_IS_CLK_ENABLED +#define __SPI4_IS_CLK_DISABLED __HAL_RCC_SPI4_IS_CLK_DISABLED +#define __SDADC1_IS_CLK_ENABLED __HAL_RCC_SDADC1_IS_CLK_ENABLED +#define __SDADC1_IS_CLK_DISABLED __HAL_RCC_SDADC1_IS_CLK_DISABLED +#define __SDADC2_IS_CLK_ENABLED __HAL_RCC_SDADC2_IS_CLK_ENABLED +#define __SDADC2_IS_CLK_DISABLED __HAL_RCC_SDADC2_IS_CLK_DISABLED +#define __SDADC3_IS_CLK_ENABLED __HAL_RCC_SDADC3_IS_CLK_ENABLED +#define __SDADC3_IS_CLK_DISABLED __HAL_RCC_SDADC3_IS_CLK_DISABLED +#define __SRAM_IS_CLK_ENABLED __HAL_RCC_SRAM_IS_CLK_ENABLED +#define __SRAM_IS_CLK_DISABLED __HAL_RCC_SRAM_IS_CLK_DISABLED +#define __TIM1_IS_CLK_ENABLED __HAL_RCC_TIM1_IS_CLK_ENABLED +#define __TIM1_IS_CLK_DISABLED __HAL_RCC_TIM1_IS_CLK_DISABLED +#define __TIM2_IS_CLK_ENABLED __HAL_RCC_TIM2_IS_CLK_ENABLED +#define __TIM2_IS_CLK_DISABLED __HAL_RCC_TIM2_IS_CLK_DISABLED +#define __TIM3_IS_CLK_ENABLED __HAL_RCC_TIM3_IS_CLK_ENABLED +#define __TIM3_IS_CLK_DISABLED __HAL_RCC_TIM3_IS_CLK_DISABLED +#define __TIM4_IS_CLK_ENABLED __HAL_RCC_TIM4_IS_CLK_ENABLED +#define __TIM4_IS_CLK_DISABLED __HAL_RCC_TIM4_IS_CLK_DISABLED +#define __TIM5_IS_CLK_ENABLED __HAL_RCC_TIM5_IS_CLK_ENABLED +#define __TIM5_IS_CLK_DISABLED __HAL_RCC_TIM5_IS_CLK_DISABLED +#define __TIM6_IS_CLK_ENABLED __HAL_RCC_TIM6_IS_CLK_ENABLED +#define __TIM6_IS_CLK_DISABLED __HAL_RCC_TIM6_IS_CLK_DISABLED +#define __TIM7_IS_CLK_ENABLED __HAL_RCC_TIM7_IS_CLK_ENABLED +#define __TIM7_IS_CLK_DISABLED __HAL_RCC_TIM7_IS_CLK_DISABLED +#define __TIM8_IS_CLK_ENABLED __HAL_RCC_TIM8_IS_CLK_ENABLED +#define __TIM8_IS_CLK_DISABLED __HAL_RCC_TIM8_IS_CLK_DISABLED +#define __TIM12_IS_CLK_ENABLED __HAL_RCC_TIM12_IS_CLK_ENABLED +#define __TIM12_IS_CLK_DISABLED __HAL_RCC_TIM12_IS_CLK_DISABLED +#define __TIM13_IS_CLK_ENABLED __HAL_RCC_TIM13_IS_CLK_ENABLED +#define __TIM13_IS_CLK_DISABLED __HAL_RCC_TIM13_IS_CLK_DISABLED +#define __TIM14_IS_CLK_ENABLED __HAL_RCC_TIM14_IS_CLK_ENABLED +#define __TIM14_IS_CLK_DISABLED __HAL_RCC_TIM14_IS_CLK_DISABLED +#define __TIM15_IS_CLK_ENABLED __HAL_RCC_TIM15_IS_CLK_ENABLED +#define __TIM15_IS_CLK_DISABLED __HAL_RCC_TIM15_IS_CLK_DISABLED +#define __TIM16_IS_CLK_ENABLED __HAL_RCC_TIM16_IS_CLK_ENABLED +#define __TIM16_IS_CLK_DISABLED __HAL_RCC_TIM16_IS_CLK_DISABLED +#define __TIM17_IS_CLK_ENABLED __HAL_RCC_TIM17_IS_CLK_ENABLED +#define __TIM17_IS_CLK_DISABLED __HAL_RCC_TIM17_IS_CLK_DISABLED +#define __TIM18_IS_CLK_ENABLED __HAL_RCC_TIM18_IS_CLK_ENABLED +#define __TIM18_IS_CLK_DISABLED __HAL_RCC_TIM18_IS_CLK_DISABLED +#define __TIM19_IS_CLK_ENABLED __HAL_RCC_TIM19_IS_CLK_ENABLED +#define __TIM19_IS_CLK_DISABLED __HAL_RCC_TIM19_IS_CLK_DISABLED +#define __TIM20_IS_CLK_ENABLED __HAL_RCC_TIM20_IS_CLK_ENABLED +#define __TIM20_IS_CLK_DISABLED __HAL_RCC_TIM20_IS_CLK_DISABLED +#define __TSC_IS_CLK_ENABLED __HAL_RCC_TSC_IS_CLK_ENABLED +#define __TSC_IS_CLK_DISABLED __HAL_RCC_TSC_IS_CLK_DISABLED +#define __UART4_IS_CLK_ENABLED __HAL_RCC_UART4_IS_CLK_ENABLED +#define __UART4_IS_CLK_DISABLED __HAL_RCC_UART4_IS_CLK_DISABLED +#define __UART5_IS_CLK_ENABLED __HAL_RCC_UART5_IS_CLK_ENABLED +#define __UART5_IS_CLK_DISABLED __HAL_RCC_UART5_IS_CLK_DISABLED +#define __USART1_IS_CLK_ENABLED __HAL_RCC_USART1_IS_CLK_ENABLED +#define __USART1_IS_CLK_DISABLED __HAL_RCC_USART1_IS_CLK_DISABLED +#define __USART2_IS_CLK_ENABLED __HAL_RCC_USART2_IS_CLK_ENABLED +#define __USART2_IS_CLK_DISABLED __HAL_RCC_USART2_IS_CLK_DISABLED +#define __USART3_IS_CLK_ENABLED __HAL_RCC_USART3_IS_CLK_ENABLED +#define __USART3_IS_CLK_DISABLED __HAL_RCC_USART3_IS_CLK_DISABLED +#define __USB_IS_CLK_ENABLED __HAL_RCC_USB_IS_CLK_ENABLED +#define __USB_IS_CLK_DISABLED __HAL_RCC_USB_IS_CLK_DISABLED +#define __WWDG_IS_CLK_ENABLED __HAL_RCC_WWDG_IS_CLK_ENABLED +#define __WWDG_IS_CLK_DISABLED __HAL_RCC_WWDG_IS_CLK_DISABLED + +#if defined(STM32L1) +#define __HAL_RCC_CRYP_CLK_DISABLE __HAL_RCC_AES_CLK_DISABLE +#define __HAL_RCC_CRYP_CLK_ENABLE __HAL_RCC_AES_CLK_ENABLE +#define __HAL_RCC_CRYP_CLK_SLEEP_DISABLE __HAL_RCC_AES_CLK_SLEEP_DISABLE +#define __HAL_RCC_CRYP_CLK_SLEEP_ENABLE __HAL_RCC_AES_CLK_SLEEP_ENABLE +#define __HAL_RCC_CRYP_FORCE_RESET __HAL_RCC_AES_FORCE_RESET +#define __HAL_RCC_CRYP_RELEASE_RESET __HAL_RCC_AES_RELEASE_RESET +#endif /* STM32L1 */ + +#if defined(STM32F4) +#define __HAL_RCC_SDMMC1_FORCE_RESET __HAL_RCC_SDIO_FORCE_RESET +#define __HAL_RCC_SDMMC1_RELEASE_RESET __HAL_RCC_SDIO_RELEASE_RESET +#define __HAL_RCC_SDMMC1_CLK_SLEEP_ENABLE __HAL_RCC_SDIO_CLK_SLEEP_ENABLE +#define __HAL_RCC_SDMMC1_CLK_SLEEP_DISABLE __HAL_RCC_SDIO_CLK_SLEEP_DISABLE +#define __HAL_RCC_SDMMC1_CLK_ENABLE __HAL_RCC_SDIO_CLK_ENABLE +#define __HAL_RCC_SDMMC1_CLK_DISABLE __HAL_RCC_SDIO_CLK_DISABLE +#define __HAL_RCC_SDMMC1_IS_CLK_ENABLED __HAL_RCC_SDIO_IS_CLK_ENABLED +#define __HAL_RCC_SDMMC1_IS_CLK_DISABLED __HAL_RCC_SDIO_IS_CLK_DISABLED +#define Sdmmc1ClockSelection SdioClockSelection +#define RCC_PERIPHCLK_SDMMC1 RCC_PERIPHCLK_SDIO +#define RCC_SDMMC1CLKSOURCE_CLK48 RCC_SDIOCLKSOURCE_CK48 +#define RCC_SDMMC1CLKSOURCE_SYSCLK RCC_SDIOCLKSOURCE_SYSCLK +#define __HAL_RCC_SDMMC1_CONFIG __HAL_RCC_SDIO_CONFIG +#define __HAL_RCC_GET_SDMMC1_SOURCE __HAL_RCC_GET_SDIO_SOURCE +#endif + +#if defined(STM32F7) || defined(STM32L4) +#define __HAL_RCC_SDIO_FORCE_RESET __HAL_RCC_SDMMC1_FORCE_RESET +#define __HAL_RCC_SDIO_RELEASE_RESET __HAL_RCC_SDMMC1_RELEASE_RESET +#define __HAL_RCC_SDIO_CLK_SLEEP_ENABLE __HAL_RCC_SDMMC1_CLK_SLEEP_ENABLE +#define __HAL_RCC_SDIO_CLK_SLEEP_DISABLE __HAL_RCC_SDMMC1_CLK_SLEEP_DISABLE +#define __HAL_RCC_SDIO_CLK_ENABLE __HAL_RCC_SDMMC1_CLK_ENABLE +#define __HAL_RCC_SDIO_CLK_DISABLE __HAL_RCC_SDMMC1_CLK_DISABLE +#define __HAL_RCC_SDIO_IS_CLK_ENABLED __HAL_RCC_SDMMC1_IS_CLK_ENABLED +#define __HAL_RCC_SDIO_IS_CLK_DISABLED __HAL_RCC_SDMMC1_IS_CLK_DISABLED +#define SdioClockSelection Sdmmc1ClockSelection +#define RCC_PERIPHCLK_SDIO RCC_PERIPHCLK_SDMMC1 +#define __HAL_RCC_SDIO_CONFIG __HAL_RCC_SDMMC1_CONFIG +#define __HAL_RCC_GET_SDIO_SOURCE __HAL_RCC_GET_SDMMC1_SOURCE +#endif + +#if defined(STM32F7) +#define RCC_SDIOCLKSOURCE_CLK48 RCC_SDMMC1CLKSOURCE_CLK48 +#define RCC_SDIOCLKSOURCE_SYSCLK RCC_SDMMC1CLKSOURCE_SYSCLK +#endif + +#if defined(STM32H7) +#define __HAL_RCC_USB_OTG_HS_CLK_ENABLE() __HAL_RCC_USB1_OTG_HS_CLK_ENABLE() +#define __HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE() __HAL_RCC_USB1_OTG_HS_ULPI_CLK_ENABLE() +#define __HAL_RCC_USB_OTG_HS_CLK_DISABLE() __HAL_RCC_USB1_OTG_HS_CLK_DISABLE() +#define __HAL_RCC_USB_OTG_HS_ULPI_CLK_DISABLE() __HAL_RCC_USB1_OTG_HS_ULPI_CLK_DISABLE() +#define __HAL_RCC_USB_OTG_HS_FORCE_RESET() __HAL_RCC_USB1_OTG_HS_FORCE_RESET() +#define __HAL_RCC_USB_OTG_HS_RELEASE_RESET() __HAL_RCC_USB1_OTG_HS_RELEASE_RESET() +#define __HAL_RCC_USB_OTG_HS_CLK_SLEEP_ENABLE() __HAL_RCC_USB1_OTG_HS_CLK_SLEEP_ENABLE() +#define __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_ENABLE() __HAL_RCC_USB1_OTG_HS_ULPI_CLK_SLEEP_ENABLE() +#define __HAL_RCC_USB_OTG_HS_CLK_SLEEP_DISABLE() __HAL_RCC_USB1_OTG_HS_CLK_SLEEP_DISABLE() +#define __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_DISABLE() __HAL_RCC_USB1_OTG_HS_ULPI_CLK_SLEEP_DISABLE() + +#define __HAL_RCC_USB_OTG_FS_CLK_ENABLE() __HAL_RCC_USB2_OTG_FS_CLK_ENABLE() +#define __HAL_RCC_USB_OTG_FS_ULPI_CLK_ENABLE() __HAL_RCC_USB2_OTG_FS_ULPI_CLK_ENABLE() +#define __HAL_RCC_USB_OTG_FS_CLK_DISABLE() __HAL_RCC_USB2_OTG_FS_CLK_DISABLE() +#define __HAL_RCC_USB_OTG_FS_ULPI_CLK_DISABLE() __HAL_RCC_USB2_OTG_FS_ULPI_CLK_DISABLE() +#define __HAL_RCC_USB_OTG_FS_FORCE_RESET() __HAL_RCC_USB2_OTG_FS_FORCE_RESET() +#define __HAL_RCC_USB_OTG_FS_RELEASE_RESET() __HAL_RCC_USB2_OTG_FS_RELEASE_RESET() +#define __HAL_RCC_USB_OTG_FS_CLK_SLEEP_ENABLE() __HAL_RCC_USB2_OTG_FS_CLK_SLEEP_ENABLE() +#define __HAL_RCC_USB_OTG_FS_ULPI_CLK_SLEEP_ENABLE() __HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_ENABLE() +#define __HAL_RCC_USB_OTG_FS_CLK_SLEEP_DISABLE() __HAL_RCC_USB2_OTG_FS_CLK_SLEEP_DISABLE() +#define __HAL_RCC_USB_OTG_FS_ULPI_CLK_SLEEP_DISABLE() __HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE() +#endif + +#define __HAL_RCC_I2SCLK __HAL_RCC_I2S_CONFIG +#define __HAL_RCC_I2SCLK_CONFIG __HAL_RCC_I2S_CONFIG + +#define __RCC_PLLSRC RCC_GET_PLL_OSCSOURCE + +#define IS_RCC_MSIRANGE IS_RCC_MSI_CLOCK_RANGE +#define IS_RCC_RTCCLK_SOURCE IS_RCC_RTCCLKSOURCE +#define IS_RCC_SYSCLK_DIV IS_RCC_HCLK +#define IS_RCC_HCLK_DIV IS_RCC_PCLK +#define IS_RCC_PERIPHCLK IS_RCC_PERIPHCLOCK + +#define RCC_IT_HSI14 RCC_IT_HSI14RDY + +#define RCC_IT_CSSLSE RCC_IT_LSECSS +#define RCC_IT_CSSHSE RCC_IT_CSS + +#define RCC_PLLMUL_3 RCC_PLL_MUL3 +#define RCC_PLLMUL_4 RCC_PLL_MUL4 +#define RCC_PLLMUL_6 RCC_PLL_MUL6 +#define RCC_PLLMUL_8 RCC_PLL_MUL8 +#define RCC_PLLMUL_12 RCC_PLL_MUL12 +#define RCC_PLLMUL_16 RCC_PLL_MUL16 +#define RCC_PLLMUL_24 RCC_PLL_MUL24 +#define RCC_PLLMUL_32 RCC_PLL_MUL32 +#define RCC_PLLMUL_48 RCC_PLL_MUL48 + +#define RCC_PLLDIV_2 RCC_PLL_DIV2 +#define RCC_PLLDIV_3 RCC_PLL_DIV3 +#define RCC_PLLDIV_4 RCC_PLL_DIV4 + +#define IS_RCC_MCOSOURCE IS_RCC_MCO1SOURCE +#define __HAL_RCC_MCO_CONFIG __HAL_RCC_MCO1_CONFIG +#define RCC_MCO_NODIV RCC_MCODIV_1 +#define RCC_MCO_DIV1 RCC_MCODIV_1 +#define RCC_MCO_DIV2 RCC_MCODIV_2 +#define RCC_MCO_DIV4 RCC_MCODIV_4 +#define RCC_MCO_DIV8 RCC_MCODIV_8 +#define RCC_MCO_DIV16 RCC_MCODIV_16 +#define RCC_MCO_DIV32 RCC_MCODIV_32 +#define RCC_MCO_DIV64 RCC_MCODIV_64 +#define RCC_MCO_DIV128 RCC_MCODIV_128 +#define RCC_MCOSOURCE_NONE RCC_MCO1SOURCE_NOCLOCK +#define RCC_MCOSOURCE_LSI RCC_MCO1SOURCE_LSI +#define RCC_MCOSOURCE_LSE RCC_MCO1SOURCE_LSE +#define RCC_MCOSOURCE_SYSCLK RCC_MCO1SOURCE_SYSCLK +#define RCC_MCOSOURCE_HSI RCC_MCO1SOURCE_HSI +#define RCC_MCOSOURCE_HSI14 RCC_MCO1SOURCE_HSI14 +#define RCC_MCOSOURCE_HSI48 RCC_MCO1SOURCE_HSI48 +#define RCC_MCOSOURCE_HSE RCC_MCO1SOURCE_HSE +#define RCC_MCOSOURCE_PLLCLK_DIV1 RCC_MCO1SOURCE_PLLCLK +#define RCC_MCOSOURCE_PLLCLK_NODIV RCC_MCO1SOURCE_PLLCLK +#define RCC_MCOSOURCE_PLLCLK_DIV2 RCC_MCO1SOURCE_PLLCLK_DIV2 + +#if defined(STM32U0) +#define RCC_SYSCLKSOURCE_STATUS_PLLR RCC_SYSCLKSOURCE_STATUS_PLLCLK +#endif + +#if defined(STM32L4) || defined(STM32WB) || defined(STM32G0) || defined(STM32G4) || defined(STM32L5) || \ + defined(STM32WL) || defined(STM32C0) || defined(STM32N6) || defined(STM32H7RS) || defined(STM32U0) +#define RCC_RTCCLKSOURCE_NO_CLK RCC_RTCCLKSOURCE_NONE +#else +#define RCC_RTCCLKSOURCE_NONE RCC_RTCCLKSOURCE_NO_CLK +#endif + +#define RCC_USBCLK_PLLSAI1 RCC_USBCLKSOURCE_PLLSAI1 +#define RCC_USBCLK_PLL RCC_USBCLKSOURCE_PLL +#define RCC_USBCLK_MSI RCC_USBCLKSOURCE_MSI +#define RCC_USBCLKSOURCE_PLLCLK RCC_USBCLKSOURCE_PLL +#define RCC_USBPLLCLK_DIV1 RCC_USBCLKSOURCE_PLL +#define RCC_USBPLLCLK_DIV1_5 RCC_USBCLKSOURCE_PLL_DIV1_5 +#define RCC_USBPLLCLK_DIV2 RCC_USBCLKSOURCE_PLL_DIV2 +#define RCC_USBPLLCLK_DIV3 RCC_USBCLKSOURCE_PLL_DIV3 + +#define HSION_BitNumber RCC_HSION_BIT_NUMBER +#define HSION_BITNUMBER RCC_HSION_BIT_NUMBER +#define HSEON_BitNumber RCC_HSEON_BIT_NUMBER +#define HSEON_BITNUMBER RCC_HSEON_BIT_NUMBER +#define MSION_BITNUMBER RCC_MSION_BIT_NUMBER +#define CSSON_BitNumber RCC_CSSON_BIT_NUMBER +#define CSSON_BITNUMBER RCC_CSSON_BIT_NUMBER +#define PLLON_BitNumber RCC_PLLON_BIT_NUMBER +#define PLLON_BITNUMBER RCC_PLLON_BIT_NUMBER +#define PLLI2SON_BitNumber RCC_PLLI2SON_BIT_NUMBER +#define I2SSRC_BitNumber RCC_I2SSRC_BIT_NUMBER +#define RTCEN_BitNumber RCC_RTCEN_BIT_NUMBER +#define RTCEN_BITNUMBER RCC_RTCEN_BIT_NUMBER +#define BDRST_BitNumber RCC_BDRST_BIT_NUMBER +#define BDRST_BITNUMBER RCC_BDRST_BIT_NUMBER +#define RTCRST_BITNUMBER RCC_RTCRST_BIT_NUMBER +#define LSION_BitNumber RCC_LSION_BIT_NUMBER +#define LSION_BITNUMBER RCC_LSION_BIT_NUMBER +#define LSEON_BitNumber RCC_LSEON_BIT_NUMBER +#define LSEON_BITNUMBER RCC_LSEON_BIT_NUMBER +#define LSEBYP_BITNUMBER RCC_LSEBYP_BIT_NUMBER +#define PLLSAION_BitNumber RCC_PLLSAION_BIT_NUMBER +#define TIMPRE_BitNumber RCC_TIMPRE_BIT_NUMBER +#define RMVF_BitNumber RCC_RMVF_BIT_NUMBER +#define RMVF_BITNUMBER RCC_RMVF_BIT_NUMBER +#define RCC_CR2_HSI14TRIM_BitNumber RCC_HSI14TRIM_BIT_NUMBER +#define CR_BYTE2_ADDRESS RCC_CR_BYTE2_ADDRESS +#define CIR_BYTE1_ADDRESS RCC_CIR_BYTE1_ADDRESS +#define CIR_BYTE2_ADDRESS RCC_CIR_BYTE2_ADDRESS +#define BDCR_BYTE0_ADDRESS RCC_BDCR_BYTE0_ADDRESS +#define DBP_TIMEOUT_VALUE RCC_DBP_TIMEOUT_VALUE +#define LSE_TIMEOUT_VALUE RCC_LSE_TIMEOUT_VALUE + +#define CR_HSION_BB RCC_CR_HSION_BB +#define CR_CSSON_BB RCC_CR_CSSON_BB +#define CR_PLLON_BB RCC_CR_PLLON_BB +#define CR_PLLI2SON_BB RCC_CR_PLLI2SON_BB +#define CR_MSION_BB RCC_CR_MSION_BB +#define CSR_LSION_BB RCC_CSR_LSION_BB +#define CSR_LSEON_BB RCC_CSR_LSEON_BB +#define CSR_LSEBYP_BB RCC_CSR_LSEBYP_BB +#define CSR_RTCEN_BB RCC_CSR_RTCEN_BB +#define CSR_RTCRST_BB RCC_CSR_RTCRST_BB +#define CFGR_I2SSRC_BB RCC_CFGR_I2SSRC_BB +#define BDCR_RTCEN_BB RCC_BDCR_RTCEN_BB +#define BDCR_BDRST_BB RCC_BDCR_BDRST_BB +#define CR_HSEON_BB RCC_CR_HSEON_BB +#define CSR_RMVF_BB RCC_CSR_RMVF_BB +#define CR_PLLSAION_BB RCC_CR_PLLSAION_BB +#define DCKCFGR_TIMPRE_BB RCC_DCKCFGR_TIMPRE_BB + +#define __HAL_RCC_CRS_ENABLE_FREQ_ERROR_COUNTER __HAL_RCC_CRS_FREQ_ERROR_COUNTER_ENABLE +#define __HAL_RCC_CRS_DISABLE_FREQ_ERROR_COUNTER __HAL_RCC_CRS_FREQ_ERROR_COUNTER_DISABLE +#define __HAL_RCC_CRS_ENABLE_AUTOMATIC_CALIB __HAL_RCC_CRS_AUTOMATIC_CALIB_ENABLE +#define __HAL_RCC_CRS_DISABLE_AUTOMATIC_CALIB __HAL_RCC_CRS_AUTOMATIC_CALIB_DISABLE +#define __HAL_RCC_CRS_CALCULATE_RELOADVALUE __HAL_RCC_CRS_RELOADVALUE_CALCULATE + +#define __HAL_RCC_GET_IT_SOURCE __HAL_RCC_GET_IT + +#define RCC_CRS_SYNCWARM RCC_CRS_SYNCWARN +#define RCC_CRS_TRIMOV RCC_CRS_TRIMOVF + +#define RCC_PERIPHCLK_CK48 RCC_PERIPHCLK_CLK48 +#define RCC_CK48CLKSOURCE_PLLQ RCC_CLK48CLKSOURCE_PLLQ +#define RCC_CK48CLKSOURCE_PLLSAIP RCC_CLK48CLKSOURCE_PLLSAIP +#define RCC_CK48CLKSOURCE_PLLI2SQ RCC_CLK48CLKSOURCE_PLLI2SQ +#define IS_RCC_CK48CLKSOURCE IS_RCC_CLK48CLKSOURCE +#define RCC_SDIOCLKSOURCE_CK48 RCC_SDIOCLKSOURCE_CLK48 + +#define __HAL_RCC_DFSDM_CLK_ENABLE __HAL_RCC_DFSDM1_CLK_ENABLE +#define __HAL_RCC_DFSDM_CLK_DISABLE __HAL_RCC_DFSDM1_CLK_DISABLE +#define __HAL_RCC_DFSDM_IS_CLK_ENABLED __HAL_RCC_DFSDM1_IS_CLK_ENABLED +#define __HAL_RCC_DFSDM_IS_CLK_DISABLED __HAL_RCC_DFSDM1_IS_CLK_DISABLED +#define __HAL_RCC_DFSDM_FORCE_RESET __HAL_RCC_DFSDM1_FORCE_RESET +#define __HAL_RCC_DFSDM_RELEASE_RESET __HAL_RCC_DFSDM1_RELEASE_RESET +#define __HAL_RCC_DFSDM_CLK_SLEEP_ENABLE __HAL_RCC_DFSDM1_CLK_SLEEP_ENABLE +#define __HAL_RCC_DFSDM_CLK_SLEEP_DISABLE __HAL_RCC_DFSDM1_CLK_SLEEP_DISABLE +#define __HAL_RCC_DFSDM_IS_CLK_SLEEP_ENABLED __HAL_RCC_DFSDM1_IS_CLK_SLEEP_ENABLED +#define __HAL_RCC_DFSDM_IS_CLK_SLEEP_DISABLED __HAL_RCC_DFSDM1_IS_CLK_SLEEP_DISABLED +#define DfsdmClockSelection Dfsdm1ClockSelection +#define RCC_PERIPHCLK_DFSDM RCC_PERIPHCLK_DFSDM1 +#define RCC_DFSDMCLKSOURCE_PCLK RCC_DFSDM1CLKSOURCE_PCLK2 +#define RCC_DFSDMCLKSOURCE_SYSCLK RCC_DFSDM1CLKSOURCE_SYSCLK +#define __HAL_RCC_DFSDM_CONFIG __HAL_RCC_DFSDM1_CONFIG +#define __HAL_RCC_GET_DFSDM_SOURCE __HAL_RCC_GET_DFSDM1_SOURCE +#define RCC_DFSDM1CLKSOURCE_PCLK RCC_DFSDM1CLKSOURCE_PCLK2 +#define RCC_SWPMI1CLKSOURCE_PCLK RCC_SWPMI1CLKSOURCE_PCLK1 +#if !defined(STM32U0) +#define RCC_LPTIM1CLKSOURCE_PCLK RCC_LPTIM1CLKSOURCE_PCLK1 +#define RCC_LPTIM2CLKSOURCE_PCLK RCC_LPTIM2CLKSOURCE_PCLK1 +#endif + +#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB1 RCC_DFSDM1AUDIOCLKSOURCE_I2S1 +#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB2 RCC_DFSDM1AUDIOCLKSOURCE_I2S2 +#define RCC_DFSDM2AUDIOCLKSOURCE_I2SAPB1 RCC_DFSDM2AUDIOCLKSOURCE_I2S1 +#define RCC_DFSDM2AUDIOCLKSOURCE_I2SAPB2 RCC_DFSDM2AUDIOCLKSOURCE_I2S2 +#define RCC_DFSDM1CLKSOURCE_APB2 RCC_DFSDM1CLKSOURCE_PCLK2 +#define RCC_DFSDM2CLKSOURCE_APB2 RCC_DFSDM2CLKSOURCE_PCLK2 +#define RCC_FMPI2C1CLKSOURCE_APB RCC_FMPI2C1CLKSOURCE_PCLK1 +#if defined(STM32U5) +#define MSIKPLLModeSEL RCC_MSIKPLL_MODE_SEL +#define MSISPLLModeSEL RCC_MSISPLL_MODE_SEL +#define __HAL_RCC_AHB21_CLK_DISABLE __HAL_RCC_AHB2_1_CLK_DISABLE +#define __HAL_RCC_AHB22_CLK_DISABLE __HAL_RCC_AHB2_2_CLK_DISABLE +#define __HAL_RCC_AHB1_CLK_Disable_Clear __HAL_RCC_AHB1_CLK_ENABLE +#define __HAL_RCC_AHB21_CLK_Disable_Clear __HAL_RCC_AHB2_1_CLK_ENABLE +#define __HAL_RCC_AHB22_CLK_Disable_Clear __HAL_RCC_AHB2_2_CLK_ENABLE +#define __HAL_RCC_AHB3_CLK_Disable_Clear __HAL_RCC_AHB3_CLK_ENABLE +#define __HAL_RCC_APB1_CLK_Disable_Clear __HAL_RCC_APB1_CLK_ENABLE +#define __HAL_RCC_APB2_CLK_Disable_Clear __HAL_RCC_APB2_CLK_ENABLE +#define __HAL_RCC_APB3_CLK_Disable_Clear __HAL_RCC_APB3_CLK_ENABLE +#define IS_RCC_MSIPLLModeSelection IS_RCC_MSIPLLMODE_SELECT +#define RCC_PERIPHCLK_CLK48 RCC_PERIPHCLK_ICLK +#define RCC_CLK48CLKSOURCE_HSI48 RCC_ICLK_CLKSOURCE_HSI48 +#define RCC_CLK48CLKSOURCE_PLL2 RCC_ICLK_CLKSOURCE_PLL2 +#define RCC_CLK48CLKSOURCE_PLL1 RCC_ICLK_CLKSOURCE_PLL1 +#define RCC_CLK48CLKSOURCE_MSIK RCC_ICLK_CLKSOURCE_MSIK +#define __HAL_RCC_ADC1_CLK_ENABLE __HAL_RCC_ADC12_CLK_ENABLE +#define __HAL_RCC_ADC1_CLK_DISABLE __HAL_RCC_ADC12_CLK_DISABLE +#define __HAL_RCC_ADC1_IS_CLK_ENABLED __HAL_RCC_ADC12_IS_CLK_ENABLED +#define __HAL_RCC_ADC1_IS_CLK_DISABLED __HAL_RCC_ADC12_IS_CLK_DISABLED +#define __HAL_RCC_ADC1_FORCE_RESET __HAL_RCC_ADC12_FORCE_RESET +#define __HAL_RCC_ADC1_RELEASE_RESET __HAL_RCC_ADC12_RELEASE_RESET +#define __HAL_RCC_ADC1_CLK_SLEEP_ENABLE __HAL_RCC_ADC12_CLK_SLEEP_ENABLE +#define __HAL_RCC_ADC1_CLK_SLEEP_DISABLE __HAL_RCC_ADC12_CLK_SLEEP_DISABLE +#define __HAL_RCC_GET_CLK48_SOURCE __HAL_RCC_GET_ICLK_SOURCE +#define __HAL_RCC_PLLFRACN_ENABLE __HAL_RCC_PLL_FRACN_ENABLE +#define __HAL_RCC_PLLFRACN_DISABLE __HAL_RCC_PLL_FRACN_DISABLE +#define __HAL_RCC_PLLFRACN_CONFIG __HAL_RCC_PLL_FRACN_CONFIG +#define IS_RCC_PLLFRACN_VALUE IS_RCC_PLL_FRACN_VALUE +#endif /* STM32U5 */ + +#if defined(STM32H5) +#define __HAL_RCC_PLLFRACN_ENABLE __HAL_RCC_PLL_FRACN_ENABLE +#define __HAL_RCC_PLLFRACN_DISABLE __HAL_RCC_PLL_FRACN_DISABLE +#define __HAL_RCC_PLLFRACN_CONFIG __HAL_RCC_PLL_FRACN_CONFIG +#define IS_RCC_PLLFRACN_VALUE IS_RCC_PLL_FRACN_VALUE + +#define RCC_PLLSOURCE_NONE RCC_PLL1_SOURCE_NONE +#define RCC_PLLSOURCE_HSI RCC_PLL1_SOURCE_HSI +#define RCC_PLLSOURCE_CSI RCC_PLL1_SOURCE_CSI +#define RCC_PLLSOURCE_HSE RCC_PLL1_SOURCE_HSE +#define RCC_PLLVCIRANGE_0 RCC_PLL1_VCIRANGE_0 +#define RCC_PLLVCIRANGE_1 RCC_PLL1_VCIRANGE_1 +#define RCC_PLLVCIRANGE_2 RCC_PLL1_VCIRANGE_2 +#define RCC_PLLVCIRANGE_3 RCC_PLL1_VCIRANGE_3 +#define RCC_PLL1VCOWIDE RCC_PLL1_VCORANGE_WIDE +#define RCC_PLL1VCOMEDIUM RCC_PLL1_VCORANGE_MEDIUM + +#define IS_RCC_PLLSOURCE IS_RCC_PLL1_SOURCE +#define IS_RCC_PLLRGE_VALUE IS_RCC_PLL1_VCIRGE_VALUE +#define IS_RCC_PLLVCORGE_VALUE IS_RCC_PLL1_VCORGE_VALUE +#define IS_RCC_PLLCLOCKOUT_VALUE IS_RCC_PLL1_CLOCKOUT_VALUE +#define IS_RCC_PLL_FRACN_VALUE IS_RCC_PLL1_FRACN_VALUE +#define IS_RCC_PLLM_VALUE IS_RCC_PLL1_DIVM_VALUE +#define IS_RCC_PLLN_VALUE IS_RCC_PLL1_MULN_VALUE +#define IS_RCC_PLLP_VALUE IS_RCC_PLL1_DIVP_VALUE +#define IS_RCC_PLLQ_VALUE IS_RCC_PLL1_DIVQ_VALUE +#define IS_RCC_PLLR_VALUE IS_RCC_PLL1_DIVR_VALUE + +#define __HAL_RCC_PLL_ENABLE __HAL_RCC_PLL1_ENABLE +#define __HAL_RCC_PLL_DISABLE __HAL_RCC_PLL1_DISABLE +#define __HAL_RCC_PLL_FRACN_ENABLE __HAL_RCC_PLL1_FRACN_ENABLE +#define __HAL_RCC_PLL_FRACN_DISABLE __HAL_RCC_PLL1_FRACN_DISABLE +#define __HAL_RCC_PLL_CONFIG __HAL_RCC_PLL1_CONFIG +#define __HAL_RCC_PLL_PLLSOURCE_CONFIG __HAL_RCC_PLL1_PLLSOURCE_CONFIG +#define __HAL_RCC_PLL_DIVM_CONFIG __HAL_RCC_PLL1_DIVM_CONFIG +#define __HAL_RCC_PLL_FRACN_CONFIG __HAL_RCC_PLL1_FRACN_CONFIG +#define __HAL_RCC_PLL_VCIRANGE __HAL_RCC_PLL1_VCIRANGE +#define __HAL_RCC_PLL_VCORANGE __HAL_RCC_PLL1_VCORANGE +#define __HAL_RCC_GET_PLL_OSCSOURCE __HAL_RCC_GET_PLL1_OSCSOURCE +#define __HAL_RCC_PLLCLKOUT_ENABLE __HAL_RCC_PLL1_CLKOUT_ENABLE +#define __HAL_RCC_PLLCLKOUT_DISABLE __HAL_RCC_PLL1_CLKOUT_DISABLE +#define __HAL_RCC_GET_PLLCLKOUT_CONFIG __HAL_RCC_GET_PLL1_CLKOUT_CONFIG + +#define __HAL_RCC_PLL2FRACN_ENABLE __HAL_RCC_PLL2_FRACN_ENABLE +#define __HAL_RCC_PLL2FRACN_DISABLE __HAL_RCC_PLL2_FRACN_DISABLE +#define __HAL_RCC_PLL2CLKOUT_ENABLE __HAL_RCC_PLL2_CLKOUT_ENABLE +#define __HAL_RCC_PLL2CLKOUT_DISABLE __HAL_RCC_PLL2_CLKOUT_DISABLE +#define __HAL_RCC_PLL2FRACN_CONFIG __HAL_RCC_PLL2_FRACN_CONFIG +#define __HAL_RCC_GET_PLL2CLKOUT_CONFIG __HAL_RCC_GET_PLL2_CLKOUT_CONFIG + +#define __HAL_RCC_PLL3FRACN_ENABLE __HAL_RCC_PLL3_FRACN_ENABLE +#define __HAL_RCC_PLL3FRACN_DISABLE __HAL_RCC_PLL3_FRACN_DISABLE +#define __HAL_RCC_PLL3CLKOUT_ENABLE __HAL_RCC_PLL3_CLKOUT_ENABLE +#define __HAL_RCC_PLL3CLKOUT_DISABLE __HAL_RCC_PLL3_CLKOUT_DISABLE +#define __HAL_RCC_PLL3FRACN_CONFIG __HAL_RCC_PLL3_FRACN_CONFIG +#define __HAL_RCC_GET_PLL3CLKOUT_CONFIG __HAL_RCC_GET_PLL3_CLKOUT_CONFIG + +#define RCC_PLL2VCIRANGE_0 RCC_PLL2_VCIRANGE_0 +#define RCC_PLL2VCIRANGE_1 RCC_PLL2_VCIRANGE_1 +#define RCC_PLL2VCIRANGE_2 RCC_PLL2_VCIRANGE_2 +#define RCC_PLL2VCIRANGE_3 RCC_PLL2_VCIRANGE_3 + +#define RCC_PLL2VCOWIDE RCC_PLL2_VCORANGE_WIDE +#define RCC_PLL2VCOMEDIUM RCC_PLL2_VCORANGE_MEDIUM + +#define RCC_PLL2SOURCE_NONE RCC_PLL2_SOURCE_NONE +#define RCC_PLL2SOURCE_HSI RCC_PLL2_SOURCE_HSI +#define RCC_PLL2SOURCE_CSI RCC_PLL2_SOURCE_CSI +#define RCC_PLL2SOURCE_HSE RCC_PLL2_SOURCE_HSE + +#define RCC_PLL3VCIRANGE_0 RCC_PLL3_VCIRANGE_0 +#define RCC_PLL3VCIRANGE_1 RCC_PLL3_VCIRANGE_1 +#define RCC_PLL3VCIRANGE_2 RCC_PLL3_VCIRANGE_2 +#define RCC_PLL3VCIRANGE_3 RCC_PLL3_VCIRANGE_3 + +#define RCC_PLL3VCOWIDE RCC_PLL3_VCORANGE_WIDE +#define RCC_PLL3VCOMEDIUM RCC_PLL3_VCORANGE_MEDIUM + +#define RCC_PLL3SOURCE_NONE RCC_PLL3_SOURCE_NONE +#define RCC_PLL3SOURCE_HSI RCC_PLL3_SOURCE_HSI +#define RCC_PLL3SOURCE_CSI RCC_PLL3_SOURCE_CSI +#define RCC_PLL3SOURCE_HSE RCC_PLL3_SOURCE_HSE + + +#endif /* STM32H5 */ + +/** + * @} + */ + +/** @defgroup HAL_RNG_Aliased_Macros HAL RNG Aliased Macros maintained for legacy purpose + * @{ + */ +#define HAL_RNG_ReadyCallback(__HANDLE__) HAL_RNG_ReadyDataCallback((__HANDLE__), uint32_t random32bit) + +/** + * @} + */ + +/** @defgroup HAL_RTC_Aliased_Macros HAL RTC Aliased Macros maintained for legacy purpose + * @{ + */ +#if defined (STM32G0) || defined (STM32L5) || defined (STM32L412xx) || defined (STM32L422xx) || \ + defined (STM32L4P5xx)|| defined (STM32L4Q5xx) || defined (STM32G4) || defined (STM32WL) || defined (STM32U5) || \ + defined (STM32WBA) || defined (STM32H5) || defined (STM32C0) || defined (STM32N6) || defined (STM32H7RS) || \ + defined (STM32U0) || defined (STM32U3) +#else +#define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG +#endif +#define __HAL_RTC_DISABLE_IT __HAL_RTC_EXTI_DISABLE_IT +#define __HAL_RTC_ENABLE_IT __HAL_RTC_EXTI_ENABLE_IT + +#if defined (STM32F1) +#define __HAL_RTC_EXTI_CLEAR_FLAG(RTC_EXTI_LINE_ALARM_EVENT) __HAL_RTC_ALARM_EXTI_CLEAR_FLAG() + +#define __HAL_RTC_EXTI_ENABLE_IT(RTC_EXTI_LINE_ALARM_EVENT) __HAL_RTC_ALARM_EXTI_ENABLE_IT() + +#define __HAL_RTC_EXTI_DISABLE_IT(RTC_EXTI_LINE_ALARM_EVENT) __HAL_RTC_ALARM_EXTI_DISABLE_IT() + +#define __HAL_RTC_EXTI_GET_FLAG(RTC_EXTI_LINE_ALARM_EVENT) __HAL_RTC_ALARM_EXTI_GET_FLAG() + +#define __HAL_RTC_EXTI_GENERATE_SWIT(RTC_EXTI_LINE_ALARM_EVENT) __HAL_RTC_ALARM_EXTI_GENERATE_SWIT() +#else +#define __HAL_RTC_EXTI_CLEAR_FLAG(__EXTI_LINE__) (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_CLEAR_FLAG() : \ + (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG() : \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG())) +#define __HAL_RTC_EXTI_ENABLE_IT(__EXTI_LINE__) (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_ENABLE_IT() : \ + (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT() : \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT())) +#define __HAL_RTC_EXTI_DISABLE_IT(__EXTI_LINE__) (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_DISABLE_IT() : \ + (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_IT() : \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_IT())) +#define __HAL_RTC_EXTI_GET_FLAG(__EXTI_LINE__) (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_GET_FLAG() : \ + (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_GET_FLAG() : \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GET_FLAG())) +#define __HAL_RTC_EXTI_GENERATE_SWIT(__EXTI_LINE__) (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_GENERATE_SWIT() : \ + (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_GENERATE_SWIT() : \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT())) +#endif /* STM32F1 */ + +#if defined (STM32F0) || defined (STM32F2) || defined (STM32F3) || defined (STM32F4) || defined (STM32F7) || \ + defined (STM32H7) || \ + defined (STM32L0) || defined (STM32L1) || \ + defined (STM32WB) +#define __HAL_RTC_TAMPER_GET_IT __HAL_RTC_TAMPER_GET_FLAG +#endif + +#define IS_ALARM IS_RTC_ALARM +#define IS_ALARM_MASK IS_RTC_ALARM_MASK +#define IS_TAMPER IS_RTC_TAMPER +#define IS_TAMPER_ERASE_MODE IS_RTC_TAMPER_ERASE_MODE +#define IS_TAMPER_FILTER IS_RTC_TAMPER_FILTER +#define IS_TAMPER_INTERRUPT IS_RTC_TAMPER_INTERRUPT +#define IS_TAMPER_MASKFLAG_STATE IS_RTC_TAMPER_MASKFLAG_STATE +#define IS_TAMPER_PRECHARGE_DURATION IS_RTC_TAMPER_PRECHARGE_DURATION +#define IS_TAMPER_PULLUP_STATE IS_RTC_TAMPER_PULLUP_STATE +#define IS_TAMPER_SAMPLING_FREQ IS_RTC_TAMPER_SAMPLING_FREQ +#define IS_TAMPER_TIMESTAMPONTAMPER_DETECTION IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION +#define IS_TAMPER_TRIGGER IS_RTC_TAMPER_TRIGGER +#define IS_WAKEUP_CLOCK IS_RTC_WAKEUP_CLOCK +#define IS_WAKEUP_COUNTER IS_RTC_WAKEUP_COUNTER + +#define __RTC_WRITEPROTECTION_ENABLE __HAL_RTC_WRITEPROTECTION_ENABLE +#define __RTC_WRITEPROTECTION_DISABLE __HAL_RTC_WRITEPROTECTION_DISABLE + +#if defined (STM32H5) +#define __HAL_RCC_RTCAPB_CLK_ENABLE __HAL_RCC_RTC_CLK_ENABLE +#define __HAL_RCC_RTCAPB_CLK_DISABLE __HAL_RCC_RTC_CLK_DISABLE +#endif /* STM32H5 */ + +/** + * @} + */ + +/** @defgroup HAL_SD_Aliased_Macros HAL SD/MMC Aliased Macros maintained for legacy purpose + * @{ + */ + +#define SD_OCR_CID_CSD_OVERWRIETE SD_OCR_CID_CSD_OVERWRITE +#define SD_CMD_SD_APP_STAUS SD_CMD_SD_APP_STATUS + +#if !defined(STM32F1) && !defined(STM32F2) && !defined(STM32F4) && !defined(STM32L1) +#define eMMC_HIGH_VOLTAGE_RANGE EMMC_HIGH_VOLTAGE_RANGE +#define eMMC_DUAL_VOLTAGE_RANGE EMMC_DUAL_VOLTAGE_RANGE +#define eMMC_LOW_VOLTAGE_RANGE EMMC_LOW_VOLTAGE_RANGE + +#define SDMMC_NSpeed_CLK_DIV SDMMC_NSPEED_CLK_DIV +#define SDMMC_HSpeed_CLK_DIV SDMMC_HSPEED_CLK_DIV +#endif + +#if defined(STM32F4) || defined(STM32F2) +#define SD_SDMMC_DISABLED SD_SDIO_DISABLED +#define SD_SDMMC_FUNCTION_BUSY SD_SDIO_FUNCTION_BUSY +#define SD_SDMMC_FUNCTION_FAILED SD_SDIO_FUNCTION_FAILED +#define SD_SDMMC_UNKNOWN_FUNCTION SD_SDIO_UNKNOWN_FUNCTION +#define SD_CMD_SDMMC_SEN_OP_COND SD_CMD_SDIO_SEN_OP_COND +#define SD_CMD_SDMMC_RW_DIRECT SD_CMD_SDIO_RW_DIRECT +#define SD_CMD_SDMMC_RW_EXTENDED SD_CMD_SDIO_RW_EXTENDED +#define __HAL_SD_SDMMC_ENABLE __HAL_SD_SDIO_ENABLE +#define __HAL_SD_SDMMC_DISABLE __HAL_SD_SDIO_DISABLE +#define __HAL_SD_SDMMC_DMA_ENABLE __HAL_SD_SDIO_DMA_ENABLE +#define __HAL_SD_SDMMC_DMA_DISABLE __HAL_SD_SDIO_DMA_DISABL +#define __HAL_SD_SDMMC_ENABLE_IT __HAL_SD_SDIO_ENABLE_IT +#define __HAL_SD_SDMMC_DISABLE_IT __HAL_SD_SDIO_DISABLE_IT +#define __HAL_SD_SDMMC_GET_FLAG __HAL_SD_SDIO_GET_FLAG +#define __HAL_SD_SDMMC_CLEAR_FLAG __HAL_SD_SDIO_CLEAR_FLAG +#define __HAL_SD_SDMMC_GET_IT __HAL_SD_SDIO_GET_IT +#define __HAL_SD_SDMMC_CLEAR_IT __HAL_SD_SDIO_CLEAR_IT +#define SDMMC_STATIC_FLAGS SDIO_STATIC_FLAGS +#define SDMMC_CMD0TIMEOUT SDIO_CMD0TIMEOUT +#define SD_SDMMC_SEND_IF_COND SD_SDIO_SEND_IF_COND +/* alias CMSIS */ +#define SDMMC1_IRQn SDIO_IRQn +#define SDMMC1_IRQHandler SDIO_IRQHandler +#endif + +#if defined(STM32F7) || defined(STM32L4) +#define SD_SDIO_DISABLED SD_SDMMC_DISABLED +#define SD_SDIO_FUNCTION_BUSY SD_SDMMC_FUNCTION_BUSY +#define SD_SDIO_FUNCTION_FAILED SD_SDMMC_FUNCTION_FAILED +#define SD_SDIO_UNKNOWN_FUNCTION SD_SDMMC_UNKNOWN_FUNCTION +#define SD_CMD_SDIO_SEN_OP_COND SD_CMD_SDMMC_SEN_OP_COND +#define SD_CMD_SDIO_RW_DIRECT SD_CMD_SDMMC_RW_DIRECT +#define SD_CMD_SDIO_RW_EXTENDED SD_CMD_SDMMC_RW_EXTENDED +#define __HAL_SD_SDIO_ENABLE __HAL_SD_SDMMC_ENABLE +#define __HAL_SD_SDIO_DISABLE __HAL_SD_SDMMC_DISABLE +#define __HAL_SD_SDIO_DMA_ENABLE __HAL_SD_SDMMC_DMA_ENABLE +#define __HAL_SD_SDIO_DMA_DISABL __HAL_SD_SDMMC_DMA_DISABLE +#define __HAL_SD_SDIO_ENABLE_IT __HAL_SD_SDMMC_ENABLE_IT +#define __HAL_SD_SDIO_DISABLE_IT __HAL_SD_SDMMC_DISABLE_IT +#define __HAL_SD_SDIO_GET_FLAG __HAL_SD_SDMMC_GET_FLAG +#define __HAL_SD_SDIO_CLEAR_FLAG __HAL_SD_SDMMC_CLEAR_FLAG +#define __HAL_SD_SDIO_GET_IT __HAL_SD_SDMMC_GET_IT +#define __HAL_SD_SDIO_CLEAR_IT __HAL_SD_SDMMC_CLEAR_IT +#define SDIO_STATIC_FLAGS SDMMC_STATIC_FLAGS +#define SDIO_CMD0TIMEOUT SDMMC_CMD0TIMEOUT +#define SD_SDIO_SEND_IF_COND SD_SDMMC_SEND_IF_COND +/* alias CMSIS for compatibilities */ +#define SDIO_IRQn SDMMC1_IRQn +#define SDIO_IRQHandler SDMMC1_IRQHandler +#endif + +#if defined(STM32F7) || defined(STM32F4) || defined(STM32F2) || defined(STM32L4) || defined(STM32H7) +#define HAL_SD_CardCIDTypedef HAL_SD_CardCIDTypeDef +#define HAL_SD_CardCSDTypedef HAL_SD_CardCSDTypeDef +#define HAL_SD_CardStatusTypedef HAL_SD_CardStatusTypeDef +#define HAL_SD_CardStateTypedef HAL_SD_CardStateTypeDef +#endif + +#if defined(STM32H7) || defined(STM32L5) +#define HAL_MMCEx_Read_DMADoubleBuffer0CpltCallback HAL_MMCEx_Read_DMADoubleBuf0CpltCallback +#define HAL_MMCEx_Read_DMADoubleBuffer1CpltCallback HAL_MMCEx_Read_DMADoubleBuf1CpltCallback +#define HAL_MMCEx_Write_DMADoubleBuffer0CpltCallback HAL_MMCEx_Write_DMADoubleBuf0CpltCallback +#define HAL_MMCEx_Write_DMADoubleBuffer1CpltCallback HAL_MMCEx_Write_DMADoubleBuf1CpltCallback +#define HAL_SDEx_Read_DMADoubleBuffer0CpltCallback HAL_SDEx_Read_DMADoubleBuf0CpltCallback +#define HAL_SDEx_Read_DMADoubleBuffer1CpltCallback HAL_SDEx_Read_DMADoubleBuf1CpltCallback +#define HAL_SDEx_Write_DMADoubleBuffer0CpltCallback HAL_SDEx_Write_DMADoubleBuf0CpltCallback +#define HAL_SDEx_Write_DMADoubleBuffer1CpltCallback HAL_SDEx_Write_DMADoubleBuf1CpltCallback +#define HAL_SD_DriveTransciver_1_8V_Callback HAL_SD_DriveTransceiver_1_8V_Callback +#endif +/** + * @} + */ + +/** @defgroup HAL_SMARTCARD_Aliased_Macros HAL SMARTCARD Aliased Macros maintained for legacy purpose + * @{ + */ + +#define __SMARTCARD_ENABLE_IT __HAL_SMARTCARD_ENABLE_IT +#define __SMARTCARD_DISABLE_IT __HAL_SMARTCARD_DISABLE_IT +#define __SMARTCARD_ENABLE __HAL_SMARTCARD_ENABLE +#define __SMARTCARD_DISABLE __HAL_SMARTCARD_DISABLE +#define __SMARTCARD_DMA_REQUEST_ENABLE __HAL_SMARTCARD_DMA_REQUEST_ENABLE +#define __SMARTCARD_DMA_REQUEST_DISABLE __HAL_SMARTCARD_DMA_REQUEST_DISABLE + +#define __HAL_SMARTCARD_GETCLOCKSOURCE SMARTCARD_GETCLOCKSOURCE +#define __SMARTCARD_GETCLOCKSOURCE SMARTCARD_GETCLOCKSOURCE + +#define IS_SMARTCARD_ONEBIT_SAMPLING IS_SMARTCARD_ONE_BIT_SAMPLE + +/** + * @} + */ + +/** @defgroup HAL_SMBUS_Aliased_Macros HAL SMBUS Aliased Macros maintained for legacy purpose + * @{ + */ +#define __HAL_SMBUS_RESET_CR1 SMBUS_RESET_CR1 +#define __HAL_SMBUS_RESET_CR2 SMBUS_RESET_CR2 +#define __HAL_SMBUS_GENERATE_START SMBUS_GENERATE_START +#define __HAL_SMBUS_GET_ADDR_MATCH SMBUS_GET_ADDR_MATCH +#define __HAL_SMBUS_GET_DIR SMBUS_GET_DIR +#define __HAL_SMBUS_GET_STOP_MODE SMBUS_GET_STOP_MODE +#define __HAL_SMBUS_GET_PEC_MODE SMBUS_GET_PEC_MODE +#define __HAL_SMBUS_GET_ALERT_ENABLED SMBUS_GET_ALERT_ENABLED +/** + * @} + */ + +/** @defgroup HAL_SPI_Aliased_Macros HAL SPI Aliased Macros maintained for legacy purpose + * @{ + */ + +#define __HAL_SPI_1LINE_TX SPI_1LINE_TX +#define __HAL_SPI_1LINE_RX SPI_1LINE_RX +#define __HAL_SPI_RESET_CRC SPI_RESET_CRC + +/** + * @} + */ + +/** @defgroup HAL_UART_Aliased_Macros HAL UART Aliased Macros maintained for legacy purpose + * @{ + */ + +#define __HAL_UART_GETCLOCKSOURCE UART_GETCLOCKSOURCE +#define __HAL_UART_MASK_COMPUTATION UART_MASK_COMPUTATION +#define __UART_GETCLOCKSOURCE UART_GETCLOCKSOURCE +#define __UART_MASK_COMPUTATION UART_MASK_COMPUTATION + +#define IS_UART_WAKEUPMETHODE IS_UART_WAKEUPMETHOD + +#define IS_UART_ONEBIT_SAMPLE IS_UART_ONE_BIT_SAMPLE +#define IS_UART_ONEBIT_SAMPLING IS_UART_ONE_BIT_SAMPLE + +/** + * @} + */ + + +/** @defgroup HAL_USART_Aliased_Macros HAL USART Aliased Macros maintained for legacy purpose + * @{ + */ + +#define __USART_ENABLE_IT __HAL_USART_ENABLE_IT +#define __USART_DISABLE_IT __HAL_USART_DISABLE_IT +#define __USART_ENABLE __HAL_USART_ENABLE +#define __USART_DISABLE __HAL_USART_DISABLE + +#define __HAL_USART_GETCLOCKSOURCE USART_GETCLOCKSOURCE +#define __USART_GETCLOCKSOURCE USART_GETCLOCKSOURCE + +#if defined(STM32F0) || defined(STM32F3) || defined(STM32F7) +#define USART_OVERSAMPLING_16 0x00000000U +#define USART_OVERSAMPLING_8 USART_CR1_OVER8 + +#define IS_USART_OVERSAMPLING(__SAMPLING__) (((__SAMPLING__) == USART_OVERSAMPLING_16) || \ + ((__SAMPLING__) == USART_OVERSAMPLING_8)) +#endif /* STM32F0 || STM32F3 || STM32F7 */ +/** + * @} + */ + +/** @defgroup HAL_USB_Aliased_Macros HAL USB Aliased Macros maintained for legacy purpose + * @{ + */ +#define USB_EXTI_LINE_WAKEUP USB_WAKEUP_EXTI_LINE + +#define USB_FS_EXTI_TRIGGER_RISING_EDGE USB_OTG_FS_WAKEUP_EXTI_RISING_EDGE +#define USB_FS_EXTI_TRIGGER_FALLING_EDGE USB_OTG_FS_WAKEUP_EXTI_FALLING_EDGE +#define USB_FS_EXTI_TRIGGER_BOTH_EDGE USB_OTG_FS_WAKEUP_EXTI_RISING_FALLING_EDGE +#define USB_FS_EXTI_LINE_WAKEUP USB_OTG_FS_WAKEUP_EXTI_LINE + +#define USB_HS_EXTI_TRIGGER_RISING_EDGE USB_OTG_HS_WAKEUP_EXTI_RISING_EDGE +#define USB_HS_EXTI_TRIGGER_FALLING_EDGE USB_OTG_HS_WAKEUP_EXTI_FALLING_EDGE +#define USB_HS_EXTI_TRIGGER_BOTH_EDGE USB_OTG_HS_WAKEUP_EXTI_RISING_FALLING_EDGE +#define USB_HS_EXTI_LINE_WAKEUP USB_OTG_HS_WAKEUP_EXTI_LINE + +#define __HAL_USB_EXTI_ENABLE_IT __HAL_USB_WAKEUP_EXTI_ENABLE_IT +#define __HAL_USB_EXTI_DISABLE_IT __HAL_USB_WAKEUP_EXTI_DISABLE_IT +#define __HAL_USB_EXTI_GET_FLAG __HAL_USB_WAKEUP_EXTI_GET_FLAG +#define __HAL_USB_EXTI_CLEAR_FLAG __HAL_USB_WAKEUP_EXTI_CLEAR_FLAG +#define __HAL_USB_EXTI_SET_RISING_EDGE_TRIGGER __HAL_USB_WAKEUP_EXTI_ENABLE_RISING_EDGE +#define __HAL_USB_EXTI_SET_FALLING_EDGE_TRIGGER __HAL_USB_WAKEUP_EXTI_ENABLE_FALLING_EDGE +#define __HAL_USB_EXTI_SET_FALLINGRISING_TRIGGER __HAL_USB_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE + +#define __HAL_USB_FS_EXTI_ENABLE_IT __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_IT +#define __HAL_USB_FS_EXTI_DISABLE_IT __HAL_USB_OTG_FS_WAKEUP_EXTI_DISABLE_IT +#define __HAL_USB_FS_EXTI_GET_FLAG __HAL_USB_OTG_FS_WAKEUP_EXTI_GET_FLAG +#define __HAL_USB_FS_EXTI_CLEAR_FLAG __HAL_USB_OTG_FS_WAKEUP_EXTI_CLEAR_FLAG +#define __HAL_USB_FS_EXTI_SET_RISING_EGDE_TRIGGER __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_EDGE +#define __HAL_USB_FS_EXTI_SET_FALLING_EGDE_TRIGGER __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_FALLING_EDGE +#define __HAL_USB_FS_EXTI_SET_FALLINGRISING_TRIGGER __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE +#define __HAL_USB_FS_EXTI_GENERATE_SWIT __HAL_USB_OTG_FS_WAKEUP_EXTI_GENERATE_SWIT + +#define __HAL_USB_HS_EXTI_ENABLE_IT __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_IT +#define __HAL_USB_HS_EXTI_DISABLE_IT __HAL_USB_OTG_HS_WAKEUP_EXTI_DISABLE_IT +#define __HAL_USB_HS_EXTI_GET_FLAG __HAL_USB_OTG_HS_WAKEUP_EXTI_GET_FLAG +#define __HAL_USB_HS_EXTI_CLEAR_FLAG __HAL_USB_OTG_HS_WAKEUP_EXTI_CLEAR_FLAG +#define __HAL_USB_HS_EXTI_SET_RISING_EGDE_TRIGGER __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_RISING_EDGE +#define __HAL_USB_HS_EXTI_SET_FALLING_EGDE_TRIGGER __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_FALLING_EDGE +#define __HAL_USB_HS_EXTI_SET_FALLINGRISING_TRIGGER __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE +#define __HAL_USB_HS_EXTI_GENERATE_SWIT __HAL_USB_OTG_HS_WAKEUP_EXTI_GENERATE_SWIT + +#define HAL_PCD_ActiveRemoteWakeup HAL_PCD_ActivateRemoteWakeup +#define HAL_PCD_DeActiveRemoteWakeup HAL_PCD_DeActivateRemoteWakeup + +#define HAL_PCD_SetTxFiFo HAL_PCDEx_SetTxFiFo +#define HAL_PCD_SetRxFiFo HAL_PCDEx_SetRxFiFo +#if defined(STM32U5) +#define USB_OTG_GOTGCTL_BSESVLD USB_OTG_GOTGCTL_BSVLD +#define USB_OTG_GAHBCFG_GINT USB_OTG_GAHBCFG_GINTMSK +#define USB_OTG_GUSBCFG_PHYLPCS USB_OTG_GUSBCFG_PHYLPC +#define USB_OTG_GRSTCTL_HSRST USB_OTG_GRSTCTL_PSRST +#define USB_OTG_GINTSTS_BOUTNAKEFF USB_OTG_GINTSTS_GONAKEFF +#define USB_OTG_GINTSTS_WKUINT USB_OTG_GINTSTS_WKUPINT +#define USB_OTG_GINTMSK_PXFRM_IISOOXFRM USB_OTG_GINTMSK_IPXFRM_IISOOXFRM +#define USB_OTG_GRXSTSP_EPNUM USB_OTG_GRXSTSP_EPNUM_CHNUM +#define USB_OTG_GLPMCFG_L1ResumeOK USB_OTG_GLPMCFG_L1RSMOK +#define USB_OTG_HPTXFSIZ_PTXFD USB_OTG_HPTXFSIZ_PTXFSIZ +#define USB_OTG_HCCHAR_MC USB_OTG_HCCHAR_MCNT +#define USB_OTG_HCCHAR_MC_0 USB_OTG_HCCHAR_MCNT_0 +#define USB_OTG_HCCHAR_MC_1 USB_OTG_HCCHAR_MCNT_1 +#define USB_OTG_HCINTMSK_AHBERR USB_OTG_HCINTMSK_AHBERRM +#define USB_OTG_HCTSIZ_DOPING USB_OTG_HCTSIZ_DOPNG +#define USB_OTG_DOEPMSK_OPEM USB_OTG_DOEPMSK_OUTPKTERRM +#define USB_OTG_DIEPCTL_SODDFRM USB_OTG_DIEPCTL_SD1PID_SODDFRM +#define USB_OTG_DIEPTSIZ_MULCNT USB_OTG_DIEPTSIZ_MCNT +#define USB_OTG_DOEPCTL_SODDFRM USB_OTG_DOEPCTL_SD1PID_SODDFRM +#define USB_OTG_DOEPCTL_DPID USB_OTG_DOEPCTL_DPID_EONUM +#define USB_OTG_DOEPTSIZ_STUPCNT USB_OTG_DOEPTSIZ_RXDPID +#define USB_OTG_DOEPTSIZ_STUPCNT_0 USB_OTG_DOEPTSIZ_RXDPID_0 +#define USB_OTG_DOEPTSIZ_STUPCNT_1 USB_OTG_DOEPTSIZ_RXDPID_1 +#define USB_OTG_PCGCCTL_STOPCLK USB_OTG_PCGCCTL_STPPCLK +#define USB_OTG_PCGCCTL_GATECLK USB_OTG_PCGCCTL_GATEHCLK +#endif +/** + * @} + */ + +/** @defgroup HAL_TIM_Aliased_Macros HAL TIM Aliased Macros maintained for legacy purpose + * @{ + */ +#define __HAL_TIM_SetICPrescalerValue TIM_SET_ICPRESCALERVALUE +#define __HAL_TIM_ResetICPrescalerValue TIM_RESET_ICPRESCALERVALUE + +#define TIM_GET_ITSTATUS __HAL_TIM_GET_IT_SOURCE +#define TIM_GET_CLEAR_IT __HAL_TIM_CLEAR_IT + +#define __HAL_TIM_GET_ITSTATUS __HAL_TIM_GET_IT_SOURCE + +#define __HAL_TIM_DIRECTION_STATUS __HAL_TIM_IS_TIM_COUNTING_DOWN +#define __HAL_TIM_PRESCALER __HAL_TIM_SET_PRESCALER +#define __HAL_TIM_SetCounter __HAL_TIM_SET_COUNTER +#define __HAL_TIM_GetCounter __HAL_TIM_GET_COUNTER +#define __HAL_TIM_SetAutoreload __HAL_TIM_SET_AUTORELOAD +#define __HAL_TIM_GetAutoreload __HAL_TIM_GET_AUTORELOAD +#define __HAL_TIM_SetClockDivision __HAL_TIM_SET_CLOCKDIVISION +#define __HAL_TIM_GetClockDivision __HAL_TIM_GET_CLOCKDIVISION +#define __HAL_TIM_SetICPrescaler __HAL_TIM_SET_ICPRESCALER +#define __HAL_TIM_GetICPrescaler __HAL_TIM_GET_ICPRESCALER +#define __HAL_TIM_SetCompare __HAL_TIM_SET_COMPARE +#define __HAL_TIM_GetCompare __HAL_TIM_GET_COMPARE + +#define TIM_BREAKINPUTSOURCE_DFSDM TIM_BREAKINPUTSOURCE_DFSDM1 + +#define TIM_OCMODE_ASSYMETRIC_PWM1 TIM_OCMODE_ASYMMETRIC_PWM1 +#define TIM_OCMODE_ASSYMETRIC_PWM2 TIM_OCMODE_ASYMMETRIC_PWM2 +/** + * @} + */ + +/** @defgroup HAL_ETH_Aliased_Macros HAL ETH Aliased Macros maintained for legacy purpose + * @{ + */ + +#define __HAL_ETH_EXTI_ENABLE_IT __HAL_ETH_WAKEUP_EXTI_ENABLE_IT +#define __HAL_ETH_EXTI_DISABLE_IT __HAL_ETH_WAKEUP_EXTI_DISABLE_IT +#define __HAL_ETH_EXTI_GET_FLAG __HAL_ETH_WAKEUP_EXTI_GET_FLAG +#define __HAL_ETH_EXTI_CLEAR_FLAG __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG +#define __HAL_ETH_EXTI_SET_RISING_EGDE_TRIGGER __HAL_ETH_WAKEUP_EXTI_ENABLE_RISING_EDGE_TRIGGER +#define __HAL_ETH_EXTI_SET_FALLING_EGDE_TRIGGER __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLING_EDGE_TRIGGER +#define __HAL_ETH_EXTI_SET_FALLINGRISING_TRIGGER __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLINGRISING_TRIGGER + +#define ETH_PROMISCIOUSMODE_ENABLE ETH_PROMISCUOUS_MODE_ENABLE +#define ETH_PROMISCIOUSMODE_DISABLE ETH_PROMISCUOUS_MODE_DISABLE +#define IS_ETH_PROMISCIOUS_MODE IS_ETH_PROMISCUOUS_MODE +/** + * @} + */ + +/** @defgroup HAL_LTDC_Aliased_Macros HAL LTDC Aliased Macros maintained for legacy purpose + * @{ + */ +#define __HAL_LTDC_LAYER LTDC_LAYER +#define __HAL_LTDC_RELOAD_CONFIG __HAL_LTDC_RELOAD_IMMEDIATE_CONFIG +/** + * @} + */ + +/** @defgroup HAL_SAI_Aliased_Macros HAL SAI Aliased Macros maintained for legacy purpose + * @{ + */ +#define SAI_OUTPUTDRIVE_DISABLED SAI_OUTPUTDRIVE_DISABLE +#define SAI_OUTPUTDRIVE_ENABLED SAI_OUTPUTDRIVE_ENABLE +#define SAI_MASTERDIVIDER_ENABLED SAI_MASTERDIVIDER_ENABLE +#define SAI_MASTERDIVIDER_DISABLED SAI_MASTERDIVIDER_DISABLE +#define SAI_STREOMODE SAI_STEREOMODE +#define SAI_FIFOStatus_Empty SAI_FIFOSTATUS_EMPTY +#define SAI_FIFOStatus_Less1QuarterFull SAI_FIFOSTATUS_LESS1QUARTERFULL +#define SAI_FIFOStatus_1QuarterFull SAI_FIFOSTATUS_1QUARTERFULL +#define SAI_FIFOStatus_HalfFull SAI_FIFOSTATUS_HALFFULL +#define SAI_FIFOStatus_3QuartersFull SAI_FIFOSTATUS_3QUARTERFULL +#define SAI_FIFOStatus_Full SAI_FIFOSTATUS_FULL +#define IS_SAI_BLOCK_MONO_STREO_MODE IS_SAI_BLOCK_MONO_STEREO_MODE +#define SAI_SYNCHRONOUS_EXT SAI_SYNCHRONOUS_EXT_SAI1 +#define SAI_SYNCEXT_IN_ENABLE SAI_SYNCEXT_OUTBLOCKA_ENABLE +/** + * @} + */ + +/** @defgroup HAL_SPDIFRX_Aliased_Macros HAL SPDIFRX Aliased Macros maintained for legacy purpose + * @{ + */ +#if defined(STM32H7) +#define HAL_SPDIFRX_ReceiveControlFlow HAL_SPDIFRX_ReceiveCtrlFlow +#define HAL_SPDIFRX_ReceiveControlFlow_IT HAL_SPDIFRX_ReceiveCtrlFlow_IT +#define HAL_SPDIFRX_ReceiveControlFlow_DMA HAL_SPDIFRX_ReceiveCtrlFlow_DMA +#endif +/** + * @} + */ + +/** @defgroup HAL_HRTIM_Aliased_Functions HAL HRTIM Aliased Functions maintained for legacy purpose + * @{ + */ +#if defined (STM32H7) || defined (STM32G4) || defined (STM32F3) +#define HAL_HRTIM_WaveformCounterStart_IT HAL_HRTIM_WaveformCountStart_IT +#define HAL_HRTIM_WaveformCounterStart_DMA HAL_HRTIM_WaveformCountStart_DMA +#define HAL_HRTIM_WaveformCounterStart HAL_HRTIM_WaveformCountStart +#define HAL_HRTIM_WaveformCounterStop_IT HAL_HRTIM_WaveformCountStop_IT +#define HAL_HRTIM_WaveformCounterStop_DMA HAL_HRTIM_WaveformCountStop_DMA +#define HAL_HRTIM_WaveformCounterStop HAL_HRTIM_WaveformCountStop +#endif +/** + * @} + */ + +/** @defgroup HAL_QSPI_Aliased_Macros HAL QSPI Aliased Macros maintained for legacy purpose + * @{ + */ +#if defined (STM32L4) || defined (STM32F4) || defined (STM32F7) || defined(STM32H7) +#define HAL_QPSI_TIMEOUT_DEFAULT_VALUE HAL_QSPI_TIMEOUT_DEFAULT_VALUE +#endif /* STM32L4 || STM32F4 || STM32F7 */ +/** + * @} + */ + +/** @defgroup HAL_Generic_Aliased_Macros HAL Generic Aliased Macros maintained for legacy purpose + * @{ + */ +#if defined (STM32F7) +#define ART_ACCLERATOR_ENABLE ART_ACCELERATOR_ENABLE +#endif /* STM32F7 */ +/** + * @} + */ + +/** @defgroup HAL_PPP_Aliased_Macros HAL PPP Aliased Macros maintained for legacy purpose + * @{ + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32_HAL_LEGACY */ + + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h new file mode 100644 index 0000000..7c39315 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal.h @@ -0,0 +1,710 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal.h + * @author MCD Application Team + * @brief This file contains all the functions prototypes for the HAL + * module driver. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_H +#define STM32WBxx_HAL_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_conf.h" +#include "stm32wbxx_ll_system.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup HAL HAL + * @{ + */ + +/** @defgroup HAL_TICK_FREQ Tick Frequency + * @{ + */ +typedef enum +{ + HAL_TICK_FREQ_10HZ = 100U, + HAL_TICK_FREQ_100HZ = 10U, + HAL_TICK_FREQ_1KHZ = 1U, + HAL_TICK_FREQ_DEFAULT = HAL_TICK_FREQ_1KHZ +} HAL_TickFreqTypeDef; + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup HAL_Exported_Constants HAL Exported Constants + * @{ + */ + +/** @defgroup SYSCFG_Exported_Constants SYSCFG Exported Constants + * @{ + */ + +/** @defgroup SYSCFG_BootMode BOOT Mode + * @{ + */ +#define SYSCFG_BOOT_MAINFLASH LL_SYSCFG_REMAP_FLASH /*!< Main Flash memory mapped at 0x00000000 */ +#define SYSCFG_BOOT_SYSTEMFLASH LL_SYSCFG_REMAP_SYSTEMFLASH /*!< System Flash memory mapped at 0x00000000 */ +#define SYSCFG_BOOT_SRAM LL_SYSCFG_REMAP_SRAM /*!< SRAM1 mapped at 0x00000000 */ +#if defined(LL_SYSCFG_REMAP_QUADSPI) +#define SYSCFG_BOOT_QUADSPI LL_SYSCFG_REMAP_QUADSPI /*!< QUADSPI memory mapped at 0x00000000 */ +#endif /* LL_SYSCFG_REMAP_QUADSPI */ +/** + * @} + */ + +/** @defgroup SYSCFG_FPU_Interrupts FPU Interrupts + * @{ + */ +#define SYSCFG_IT_FPU_IOC SYSCFG_CFGR1_FPU_IE_0 /*!< Floating Point Unit Invalid operation Interrupt */ +#define SYSCFG_IT_FPU_DZC SYSCFG_CFGR1_FPU_IE_1 /*!< Floating Point Unit Divide-by-zero Interrupt */ +#define SYSCFG_IT_FPU_UFC SYSCFG_CFGR1_FPU_IE_2 /*!< Floating Point Unit Underflow Interrupt */ +#define SYSCFG_IT_FPU_OFC SYSCFG_CFGR1_FPU_IE_3 /*!< Floating Point Unit Overflow Interrupt */ +#define SYSCFG_IT_FPU_IDC SYSCFG_CFGR1_FPU_IE_4 /*!< Floating Point Unit Input denormal Interrupt */ +#define SYSCFG_IT_FPU_IXC SYSCFG_CFGR1_FPU_IE_5 /*!< Floating Point Unit Inexact Interrupt */ + +/** + * @} + */ + +/** @defgroup SYSCFG_SRAM2WRP SRAM2 Page Write protection (0 to 31) + * @{ + */ +#define SYSCFG_SRAM2WRP_PAGE0 LL_SYSCFG_SRAM2WRP_PAGE0 /*!< SRAM2A Write protection page 0 */ +#define SYSCFG_SRAM2WRP_PAGE1 LL_SYSCFG_SRAM2WRP_PAGE1 /*!< SRAM2A Write protection page 1 */ +#define SYSCFG_SRAM2WRP_PAGE2 LL_SYSCFG_SRAM2WRP_PAGE2 /*!< SRAM2A Write protection page 2 */ +#define SYSCFG_SRAM2WRP_PAGE3 LL_SYSCFG_SRAM2WRP_PAGE3 /*!< SRAM2A Write protection page 3 */ +#define SYSCFG_SRAM2WRP_PAGE4 LL_SYSCFG_SRAM2WRP_PAGE4 /*!< SRAM2A Write protection page 4 */ +#define SYSCFG_SRAM2WRP_PAGE5 LL_SYSCFG_SRAM2WRP_PAGE5 /*!< SRAM2A Write protection page 5 */ +#define SYSCFG_SRAM2WRP_PAGE6 LL_SYSCFG_SRAM2WRP_PAGE6 /*!< SRAM2A Write protection page 6 */ +#define SYSCFG_SRAM2WRP_PAGE7 LL_SYSCFG_SRAM2WRP_PAGE7 /*!< SRAM2A Write protection page 7 */ +#define SYSCFG_SRAM2WRP_PAGE8 LL_SYSCFG_SRAM2WRP_PAGE8 /*!< SRAM2A Write protection page 8 */ +#define SYSCFG_SRAM2WRP_PAGE9 LL_SYSCFG_SRAM2WRP_PAGE9 /*!< SRAM2A Write protection page 9 */ +#define SYSCFG_SRAM2WRP_PAGE10 LL_SYSCFG_SRAM2WRP_PAGE10 /*!< SRAM2A Write protection page 10 */ +#define SYSCFG_SRAM2WRP_PAGE11 LL_SYSCFG_SRAM2WRP_PAGE11 /*!< SRAM2A Write protection page 11 */ +#define SYSCFG_SRAM2WRP_PAGE12 LL_SYSCFG_SRAM2WRP_PAGE12 /*!< SRAM2A Write protection page 12 */ +#define SYSCFG_SRAM2WRP_PAGE13 LL_SYSCFG_SRAM2WRP_PAGE13 /*!< SRAM2A Write protection page 13 */ +#define SYSCFG_SRAM2WRP_PAGE14 LL_SYSCFG_SRAM2WRP_PAGE14 /*!< SRAM2A Write protection page 14 */ +#define SYSCFG_SRAM2WRP_PAGE15 LL_SYSCFG_SRAM2WRP_PAGE15 /*!< SRAM2A Write protection page 15 */ +#define SYSCFG_SRAM2WRP_PAGE16 LL_SYSCFG_SRAM2WRP_PAGE16 /*!< SRAM2A Write protection page 16 */ +#define SYSCFG_SRAM2WRP_PAGE17 LL_SYSCFG_SRAM2WRP_PAGE17 /*!< SRAM2A Write protection page 17 */ +#define SYSCFG_SRAM2WRP_PAGE18 LL_SYSCFG_SRAM2WRP_PAGE18 /*!< SRAM2A Write protection page 18 */ +#define SYSCFG_SRAM2WRP_PAGE19 LL_SYSCFG_SRAM2WRP_PAGE19 /*!< SRAM2A Write protection page 19 */ +#define SYSCFG_SRAM2WRP_PAGE20 LL_SYSCFG_SRAM2WRP_PAGE20 /*!< SRAM2A Write protection page 20 */ +#define SYSCFG_SRAM2WRP_PAGE21 LL_SYSCFG_SRAM2WRP_PAGE21 /*!< SRAM2A Write protection page 21 */ +#define SYSCFG_SRAM2WRP_PAGE22 LL_SYSCFG_SRAM2WRP_PAGE22 /*!< SRAM2A Write protection page 22 */ +#define SYSCFG_SRAM2WRP_PAGE23 LL_SYSCFG_SRAM2WRP_PAGE23 /*!< SRAM2A Write protection page 23 */ +#define SYSCFG_SRAM2WRP_PAGE24 LL_SYSCFG_SRAM2WRP_PAGE24 /*!< SRAM2A Write protection page 24 */ +#define SYSCFG_SRAM2WRP_PAGE25 LL_SYSCFG_SRAM2WRP_PAGE25 /*!< SRAM2A Write protection page 25 */ +#define SYSCFG_SRAM2WRP_PAGE26 LL_SYSCFG_SRAM2WRP_PAGE26 /*!< SRAM2A Write protection page 26 */ +#define SYSCFG_SRAM2WRP_PAGE27 LL_SYSCFG_SRAM2WRP_PAGE27 /*!< SRAM2A Write protection page 27 */ +#define SYSCFG_SRAM2WRP_PAGE28 LL_SYSCFG_SRAM2WRP_PAGE28 /*!< SRAM2A Write protection page 28 */ +#define SYSCFG_SRAM2WRP_PAGE29 LL_SYSCFG_SRAM2WRP_PAGE29 /*!< SRAM2A Write protection page 29 */ +#define SYSCFG_SRAM2WRP_PAGE30 LL_SYSCFG_SRAM2WRP_PAGE30 /*!< SRAM2A Write protection page 30 */ +#define SYSCFG_SRAM2WRP_PAGE31 LL_SYSCFG_SRAM2WRP_PAGE31 /*!< SRAM2A Write protection page 31 */ + +/** + * @} + */ + +/** @defgroup SYSCFG_SRAM2WRP_32_63 SRAM2 Page Write protection (32 to 63) + * @{ + */ +#define SYSCFG_SRAM2WRP_PAGE32 LL_SYSCFG_SRAM2WRP_PAGE32 /*!< SRAM2B Write protection page 32 */ +#define SYSCFG_SRAM2WRP_PAGE33 LL_SYSCFG_SRAM2WRP_PAGE33 /*!< SRAM2B Write protection page 33 */ +#define SYSCFG_SRAM2WRP_PAGE34 LL_SYSCFG_SRAM2WRP_PAGE34 /*!< SRAM2B Write protection page 34 */ +#define SYSCFG_SRAM2WRP_PAGE35 LL_SYSCFG_SRAM2WRP_PAGE35 /*!< SRAM2B Write protection page 35 */ +#if defined(LL_SYSCFG_SRAM2WRP_PAGE36) +#define SYSCFG_SRAM2WRP_PAGE36 LL_SYSCFG_SRAM2WRP_PAGE36 /*!< SRAM2B Write protection page 36 */ +#define SYSCFG_SRAM2WRP_PAGE37 LL_SYSCFG_SRAM2WRP_PAGE37 /*!< SRAM2B Write protection page 37 */ +#define SYSCFG_SRAM2WRP_PAGE38 LL_SYSCFG_SRAM2WRP_PAGE38 /*!< SRAM2B Write protection page 38 */ +#define SYSCFG_SRAM2WRP_PAGE39 LL_SYSCFG_SRAM2WRP_PAGE39 /*!< SRAM2B Write protection page 39 */ +#define SYSCFG_SRAM2WRP_PAGE40 LL_SYSCFG_SRAM2WRP_PAGE40 /*!< SRAM2B Write protection page 40 */ +#define SYSCFG_SRAM2WRP_PAGE41 LL_SYSCFG_SRAM2WRP_PAGE41 /*!< SRAM2B Write protection page 41 */ +#define SYSCFG_SRAM2WRP_PAGE42 LL_SYSCFG_SRAM2WRP_PAGE42 /*!< SRAM2B Write protection page 42 */ +#define SYSCFG_SRAM2WRP_PAGE43 LL_SYSCFG_SRAM2WRP_PAGE43 /*!< SRAM2B Write protection page 43 */ +#define SYSCFG_SRAM2WRP_PAGE44 LL_SYSCFG_SRAM2WRP_PAGE44 /*!< SRAM2B Write protection page 44 */ +#define SYSCFG_SRAM2WRP_PAGE45 LL_SYSCFG_SRAM2WRP_PAGE45 /*!< SRAM2B Write protection page 45 */ +#define SYSCFG_SRAM2WRP_PAGE46 LL_SYSCFG_SRAM2WRP_PAGE46 /*!< SRAM2B Write protection page 46 */ +#define SYSCFG_SRAM2WRP_PAGE47 LL_SYSCFG_SRAM2WRP_PAGE47 /*!< SRAM2B Write protection page 47 */ +#define SYSCFG_SRAM2WRP_PAGE48 LL_SYSCFG_SRAM2WRP_PAGE48 /*!< SRAM2B Write protection page 48 */ +#define SYSCFG_SRAM2WRP_PAGE49 LL_SYSCFG_SRAM2WRP_PAGE49 /*!< SRAM2B Write protection page 49 */ +#define SYSCFG_SRAM2WRP_PAGE50 LL_SYSCFG_SRAM2WRP_PAGE50 /*!< SRAM2B Write protection page 50 */ +#define SYSCFG_SRAM2WRP_PAGE51 LL_SYSCFG_SRAM2WRP_PAGE51 /*!< SRAM2B Write protection page 51 */ +#define SYSCFG_SRAM2WRP_PAGE52 LL_SYSCFG_SRAM2WRP_PAGE52 /*!< SRAM2B Write protection page 52 */ +#define SYSCFG_SRAM2WRP_PAGE53 LL_SYSCFG_SRAM2WRP_PAGE53 /*!< SRAM2B Write protection page 53 */ +#define SYSCFG_SRAM2WRP_PAGE54 LL_SYSCFG_SRAM2WRP_PAGE54 /*!< SRAM2B Write protection page 54 */ +#define SYSCFG_SRAM2WRP_PAGE55 LL_SYSCFG_SRAM2WRP_PAGE55 /*!< SRAM2B Write protection page 55 */ +#define SYSCFG_SRAM2WRP_PAGE56 LL_SYSCFG_SRAM2WRP_PAGE56 /*!< SRAM2B Write protection page 56 */ +#define SYSCFG_SRAM2WRP_PAGE57 LL_SYSCFG_SRAM2WRP_PAGE57 /*!< SRAM2B Write protection page 57 */ +#define SYSCFG_SRAM2WRP_PAGE58 LL_SYSCFG_SRAM2WRP_PAGE58 /*!< SRAM2B Write protection page 58 */ +#define SYSCFG_SRAM2WRP_PAGE59 LL_SYSCFG_SRAM2WRP_PAGE59 /*!< SRAM2B Write protection page 59 */ +#define SYSCFG_SRAM2WRP_PAGE60 LL_SYSCFG_SRAM2WRP_PAGE60 /*!< SRAM2B Write protection page 60 */ +#define SYSCFG_SRAM2WRP_PAGE61 LL_SYSCFG_SRAM2WRP_PAGE61 /*!< SRAM2B Write protection page 61 */ +#define SYSCFG_SRAM2WRP_PAGE62 LL_SYSCFG_SRAM2WRP_PAGE62 /*!< SRAM2B Write protection page 62 */ +#define SYSCFG_SRAM2WRP_PAGE63 LL_SYSCFG_SRAM2WRP_PAGE63 /*!< SRAM2B Write protection page 63 */ +#endif /* LL_SYSCFG_SRAM2WRP_PAGE36 */ + +/** + * @} + */ + +#if defined(VREFBUF) +/** @defgroup SYSCFG_VREFBUF_VoltageScale VREFBUF Voltage Scale + * @{ + */ +#define SYSCFG_VREFBUF_VOLTAGE_SCALE0 LL_VREFBUF_VOLTAGE_SCALE0 /*!< Voltage reference scale 0 (VREF_OUT1) */ +#define SYSCFG_VREFBUF_VOLTAGE_SCALE1 LL_VREFBUF_VOLTAGE_SCALE1 /*!< Voltage reference scale 1 (VREF_OUT2) */ + +/** + * @} + */ + +/** @defgroup SYSCFG_VREFBUF_HighImpedance VREFBUF High Impedance + * @{ + */ +#define SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE 0x00000000U /*!< VREF_plus pin is internally connected to Voltage reference buffer output */ +#define SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE VREFBUF_CSR_HIZ /*!< VREF_plus pin is high impedance */ + +/** + * @} + */ +#endif /* VREFBUF */ + +/** @defgroup SYSCFG_SRAM_flags_definition SRAM Flags + * @{ + */ + +#define SYSCFG_FLAG_SRAM2_PE SYSCFG_CFGR2_SPF /*!< SRAM2 parity error */ +#define SYSCFG_FLAG_SRAM2_BUSY SYSCFG_SCSR_SRAM2BSY /*!< SRAM2 busy by erase operation */ + +/** + * @} + */ + +/** @defgroup SYSCFG_FastModePlus_GPIO Fast-mode Plus on GPIO + * @{ + */ + +/** @brief Fast-mode Plus driving capability on a specific GPIO + */ +#define SYSCFG_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_PB6_FMP /*!< Enable Fast-mode Plus on PB6 */ +#define SYSCFG_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_PB7_FMP /*!< Enable Fast-mode Plus on PB7 */ +#define SYSCFG_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_PB8_FMP /*!< Enable Fast-mode Plus on PB8 */ +#define SYSCFG_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_PB9_FMP /*!< Enable Fast-mode Plus on PB9 */ + +/** + * @} + */ + +/** @defgroup Secure_IP_Write_Access Secure IP Write Access + * @{ + */ +#if defined(LL_SYSCFG_SECURE_ACCESS_AES1) +#define HAL_SYSCFG_SECURE_ACCESS_AES1 LL_SYSCFG_SECURE_ACCESS_AES1 /*!< Enabling the security access of Advanced Encryption Standard 1 KEY[7:0] */ +#endif /* LL_SYSCFG_SECURE_ACCESS_AES1 */ +#define HAL_SYSCFG_SECURE_ACCESS_AES2 LL_SYSCFG_SECURE_ACCESS_AES2 /*!< Enabling the security access of Advanced Encryption Standard 2 */ +#define HAL_SYSCFG_SECURE_ACCESS_PKA LL_SYSCFG_SECURE_ACCESS_PKA /*!< Enabling the security access of Public Key Accelerator */ +#define HAL_SYSCFG_SECURE_ACCESS_RNG LL_SYSCFG_SECURE_ACCESS_RNG /*!< Enabling the security access of Random Number Generator */ +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ +/** @defgroup HAL_Exported_Macros HAL Exported Macros + * @{ + */ + +/** @defgroup DBGMCU_Exported_Macros DBGMCU Exported Macros + * @{ + */ + +/** @brief Freeze and Unfreeze Peripherals in Debug mode + */ + +/** @defgroup DBGMCU_APBx_GRPx_STOP_IP DBGMCU CPU1 APBx GRPx STOP IP + * @{ + */ +#if defined(LL_DBGMCU_APB1_GRP1_TIM2_STOP) +#define __HAL_DBGMCU_FREEZE_TIM2() LL_DBGMCU_APB1_GRP1_FreezePeriph(LL_DBGMCU_APB1_GRP1_TIM2_STOP) +#define __HAL_DBGMCU_UNFREEZE_TIM2() LL_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_DBGMCU_APB1_GRP1_TIM2_STOP) +#endif /* LL_DBGMCU_APB1_GRP1_TIM2_STOP */ + +#if defined(LL_DBGMCU_APB1_GRP1_RTC_STOP) +#define __HAL_DBGMCU_FREEZE_RTC() LL_DBGMCU_APB1_GRP1_FreezePeriph(LL_DBGMCU_APB1_GRP1_RTC_STOP) +#define __HAL_DBGMCU_UNFREEZE_RTC() LL_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_DBGMCU_APB1_GRP1_RTC_STOP) +#endif /* LL_DBGMCU_APB1_GRP1_RTC_STOP */ + +#if defined(LL_DBGMCU_APB1_GRP1_WWDG_STOP) +#define __HAL_DBGMCU_FREEZE_WWDG() LL_DBGMCU_APB1_GRP1_FreezePeriph(LL_DBGMCU_APB1_GRP1_WWDG_STOP) +#define __HAL_DBGMCU_UNFREEZE_WWDG() LL_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_DBGMCU_APB1_GRP1_WWDG_STOP) +#endif /* LL_DBGMCU_APB1_GRP1_WWDG_STOP */ + +#if defined(LL_DBGMCU_APB1_GRP1_IWDG_STOP) +#define __HAL_DBGMCU_FREEZE_IWDG() LL_DBGMCU_APB1_GRP1_FreezePeriph(LL_DBGMCU_APB1_GRP1_IWDG_STOP) +#define __HAL_DBGMCU_UNFREEZE_IWDG() LL_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_DBGMCU_APB1_GRP1_IWDG_STOP) +#endif /* LL_DBGMCU_APB1_GRP1_IWDG_STOP */ + +#if defined(LL_DBGMCU_APB1_GRP1_I2C1_STOP) +#define __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT() LL_DBGMCU_APB1_GRP1_FreezePeriph(LL_DBGMCU_APB1_GRP1_I2C1_STOP) +#define __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT() LL_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_DBGMCU_APB1_GRP1_I2C1_STOP) +#endif /* LL_DBGMCU_APB1_GRP1_I2C1_STOP */ + +#if defined(LL_DBGMCU_APB1_GRP1_I2C3_STOP) +#define __HAL_DBGMCU_FREEZE_I2C3_TIMEOUT() LL_DBGMCU_APB1_GRP1_FreezePeriph(LL_DBGMCU_APB1_GRP1_I2C3_STOP) +#define __HAL_DBGMCU_UNFREEZE_I2C3_TIMEOUT() LL_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_DBGMCU_APB1_GRP1_I2C3_STOP) +#endif /* LL_DBGMCU_APB1_GRP1_I2C3_STOP */ + +#if defined(LL_DBGMCU_APB1_GRP1_LPTIM1_STOP) +#define __HAL_DBGMCU_FREEZE_LPTIM1() LL_DBGMCU_APB1_GRP1_FreezePeriph(LL_DBGMCU_APB1_GRP1_LPTIM1_STOP) +#define __HAL_DBGMCU_UNFREEZE_LPTIM1() LL_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_DBGMCU_APB1_GRP1_LPTIM1_STOP) +#endif /* LL_DBGMCU_APB1_GRP1_LPTIM1_STOP */ + +#if defined(LL_DBGMCU_APB1_GRP2_LPTIM2_STOP) +#define __HAL_DBGMCU_FREEZE_LPTIM2() LL_DBGMCU_APB1_GRP2_FreezePeriph(LL_DBGMCU_APB1_GRP2_LPTIM2_STOP) +#define __HAL_DBGMCU_UNFREEZE_LPTIM2() LL_DBGMCU_APB1_GRP2_UnFreezePeriph(LL_DBGMCU_APB1_GRP2_LPTIM2_STOP) +#endif /* LL_DBGMCU_APB1_GRP2_LPTIM2_STOP */ + +#if defined(LL_DBGMCU_APB2_GRP1_TIM1_STOP) +#define __HAL_DBGMCU_FREEZE_TIM1() LL_DBGMCU_APB2_GRP1_FreezePeriph(LL_DBGMCU_APB2_GRP1_TIM1_STOP) +#define __HAL_DBGMCU_UNFREEZE_TIM1() LL_DBGMCU_APB2_GRP1_UnFreezePeriph(LL_DBGMCU_APB2_GRP1_TIM1_STOP) +#endif /* LL_DBGMCU_APB2_GRP1_TIM1_STOP */ + +#if defined(LL_DBGMCU_APB2_GRP1_TIM16_STOP) +#define __HAL_DBGMCU_FREEZE_TIM16() LL_DBGMCU_APB2_GRP1_FreezePeriph(LL_DBGMCU_APB2_GRP1_TIM16_STOP) +#define __HAL_DBGMCU_UNFREEZE_TIM16() LL_DBGMCU_APB2_GRP1_UnFreezePeriph(LL_DBGMCU_APB2_GRP1_TIM16_STOP) +#endif /* LL_DBGMCU_APB2_GRP1_TIM16_STOP */ + +#if defined(LL_DBGMCU_APB2_GRP1_TIM17_STOP) +#define __HAL_DBGMCU_FREEZE_TIM17() LL_DBGMCU_APB2_GRP1_FreezePeriph(LL_DBGMCU_APB2_GRP1_TIM17_STOP) +#define __HAL_DBGMCU_UNFREEZE_TIM17() LL_DBGMCU_APB2_GRP1_UnFreezePeriph(LL_DBGMCU_APB2_GRP1_TIM17_STOP) +#endif /* LL_DBGMCU_APB2_GRP1_TIM17_STOP */ + +/** + * @} + */ + +/** @defgroup DBGMCU_C2_APBx_GRPx_STOP_IP DBGMCU CPU2 APBx GRPx STOP IP + * @{ + */ +#if defined(LL_C2_DBGMCU_APB1_GRP1_TIM2_STOP) +#define __HAL_C2_DBGMCU_FREEZE_TIM2() LL_C2_DBGMCU_APB1_GRP1_FreezePeriph(LL_C2_DBGMCU_APB1_GRP1_TIM2_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_TIM2() LL_C2_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB1_GRP1_TIM2_STOP) +#endif /* LL_C2_DBGMCU_APB1_GRP1_TIM2_STOP */ + +#if defined(LL_C2_DBGMCU_APB1_GRP1_RTC_STOP) +#define __HAL_C2_DBGMCU_FREEZE_RTC() LL_C2_DBGMCU_APB1_GRP1_FreezePeriph(LL_C2_DBGMCU_APB1_GRP1_RTC_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_RTC() LL_C2_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB1_GRP1_RTC_STOP) +#endif /* LL_C2_DBGMCU_APB1_GRP1_RTC_STOP */ + +#if defined(LL_C2_DBGMCU_APB1_GRP1_IWDG_STOP) +#define __HAL_C2_DBGMCU_FREEZE_IWDG() LL_C2_DBGMCU_APB1_GRP1_FreezePeriph(LL_C2_DBGMCU_APB1_GRP1_IWDG_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_IWDG() LL_C2_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB1_GRP1_IWDG_STOP) +#endif /* LL_C2_DBGMCU_APB1_GRP1_IWDG_STOP */ + +#if defined(LL_C2_DBGMCU_APB1_GRP1_I2C1_STOP) +#define __HAL_C2_DBGMCU_FREEZE_I2C1_TIMEOUT() LL_C2_DBGMCU_APB1_GRP1_FreezePeriph(LL_C2_DBGMCU_APB1_GRP1_I2C1_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_I2C1_TIMEOUT() LL_C2_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB1_GRP1_I2C1_STOP) +#endif /* LL_C2_DBGMCU_APB1_GRP1_I2C1_STOP */ + +#if defined(LL_C2_DBGMCU_APB1_GRP1_I2C3_STOP) +#define __HAL_C2_DBGMCU_FREEZE_I2C3_TIMEOUT() LL_C2_DBGMCU_APB1_GRP1_FreezePeriph(LL_C2_DBGMCU_APB1_GRP1_I2C3_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_I2C3_TIMEOUT() LL_C2_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB1_GRP1_I2C3_STOP) +#endif /* LL_C2_DBGMCU_APB1_GRP1_I2C3_STOP */ + +#if defined(LL_C2_DBGMCU_APB1_GRP1_LPTIM1_STOP) +#define __HAL_C2_DBGMCU_FREEZE_LPTIM1() LL_C2_DBGMCU_APB1_GRP1_FreezePeriph(LL_C2_DBGMCU_APB1_GRP1_LPTIM1_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_LPTIM1() LL_C2_DBGMCU_APB1_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB1_GRP1_LPTIM1_STOP) +#endif /* LL_C2_DBGMCU_APB1_GRP1_LPTIM1_STOP */ + +#if defined(LL_C2_DBGMCU_APB1_GRP2_LPTIM2_STOP) +#define __HAL_C2_DBGMCU_FREEZE_LPTIM2() LL_C2_DBGMCU_APB1_GRP2_FreezePeriph(LL_C2_DBGMCU_APB1_GRP2_LPTIM2_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_LPTIM2() LL_C2_DBGMCU_APB1_GRP2_UnFreezePeriph(LL_C2_DBGMCU_APB1_GRP2_LPTIM2_STOP) +#endif /* LL_C2_DBGMCU_APB1_GRP2_LPTIM2_STOP */ + +#if defined(LL_C2_DBGMCU_APB2_GRP1_TIM1_STOP) +#define __HAL_C2_DBGMCU_FREEZE_TIM1() LL_C2_DBGMCU_APB2_GRP1_FreezePeriph(LL_C2_DBGMCU_APB2_GRP1_TIM1_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_TIM1() LL_C2_DBGMCU_APB2_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB2_GRP1_TIM1_STOP) +#endif /* LL_C2_DBGMCU_APB2_GRP1_TIM1_STOP */ + +#if defined(LL_C2_DBGMCU_APB2_GRP1_TIM16_STOP) +#define __HAL_C2_DBGMCU_FREEZE_TIM16() LL_C2_DBGMCU_APB2_GRP1_FreezePeriph(LL_C2_DBGMCU_APB2_GRP1_TIM16_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_TIM16() LL_C2_DBGMCU_APB2_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB2_GRP1_TIM16_STOP) +#endif /* LL_C2_DBGMCU_APB2_GRP1_TIM16_STOP */ + +#if defined(LL_C2_DBGMCU_APB2_GRP1_TIM17_STOP) +#define __HAL_C2_DBGMCU_FREEZE_TIM17() LL_C2_DBGMCU_APB2_GRP1_FreezePeriph(LL_C2_DBGMCU_APB2_GRP1_TIM17_STOP) +#define __HAL_C2_DBGMCU_UNFREEZE_TIM17() LL_C2_DBGMCU_APB2_GRP1_UnFreezePeriph(LL_C2_DBGMCU_APB2_GRP1_TIM17_STOP) +#endif /* LL_C2_DBGMCU_APB2_GRP1_TIM17_STOP */ + +/** + * @} + */ + +/** + * @} + */ + +/** @defgroup SYSCFG_Exported_Macros SYSCFG Exported Macros + * @{ + */ + +/** @brief Main Flash memory mapped at 0x00000000 + */ +#define __HAL_SYSCFG_REMAPMEMORY_FLASH() LL_SYSCFG_SetRemapMemory(LL_SYSCFG_REMAP_FLASH) + +/** @brief System Flash memory mapped at 0x00000000 + */ +#define __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH() LL_SYSCFG_SetRemapMemory(LL_SYSCFG_REMAP_SYSTEMFLASH) + +/** @brief Embedded SRAM mapped at 0x00000000 + */ +#define __HAL_SYSCFG_REMAPMEMORY_SRAM() LL_SYSCFG_SetRemapMemory(LL_SYSCFG_REMAP_SRAM) + +#if defined(LL_SYSCFG_REMAP_QUADSPI) +/** @brief QUADSPI mapped at 0x00000000. + */ +#define __HAL_SYSCFG_REMAPMEMORY_QUADSPI() LL_SYSCFG_SetRemapMemory(LL_SYSCFG_REMAP_QUADSPI) +#endif /* LL_SYSCFG_REMAP_QUADSPI */ + +/** + * @brief Return the boot mode as configured by user. + * @retval The boot mode as configured by user. The returned value can be one + * of the following values: + * @arg @ref SYSCFG_BOOT_MAINFLASH + * @arg @ref SYSCFG_BOOT_SYSTEMFLASH + * @arg @ref SYSCFG_BOOT_SRAM +#if defined(LL_SYSCFG_REMAP_QUADSPI) + * @arg @ref SYSCFG_BOOT_QUADSPI +#endif + */ +#define __HAL_SYSCFG_GET_BOOT_MODE() LL_SYSCFG_GetRemapMemory() + +/** @brief SRAM2 page 0 to 31 write protection enable macro + * @param __SRAM2WRP__ This parameter can be a combination of values of @ref SYSCFG_SRAM2WRP + * @note Write protection can only be disabled by a system reset + */ +/* Legacy define */ +#define __HAL_SYSCFG_SRAM2_WRP_1_31_ENABLE __HAL_SYSCFG_SRAM2_WRP_0_31_ENABLE +#define __HAL_SYSCFG_SRAM2_WRP_0_31_ENABLE(__SRAM2WRP__) \ + do { \ + assert_param(IS_SYSCFG_SRAM2WRP_PAGE((__SRAM2WRP__))); \ + LL_SYSCFG_EnableSRAM2PageWRP_0_31(__SRAM2WRP__); \ + } while(0) + +/** @brief SRAM2 page 32 to 63 write protection enable macro + * @param __SRAM2WRP__ This parameter can be a combination of values of @ref SYSCFG_SRAM2WRP_32_63 + * @note Write protection can only be disabled by a system reset + */ +#define __HAL_SYSCFG_SRAM2_WRP_32_63_ENABLE(__SRAM2WRP__) \ + do { \ + assert_param(IS_SYSCFG_SRAM2WRP2_PAGE((__SRAM2WRP__))); \ + LL_SYSCFG_EnableSRAM2PageWRP_32_63(__SRAM2WRP__); \ + } while(0) + +/** @brief SRAM2 page write protection unlock prior to erase + * @note Writing a wrong key reactivates the write protection + */ +#define __HAL_SYSCFG_SRAM2_WRP_UNLOCK() LL_SYSCFG_UnlockSRAM2WRP() + +/** @brief SRAM2 erase + * @note __SYSCFG_GET_FLAG(SYSCFG_FLAG_SRAM2_BUSY) may be used to check end of erase + */ +#define __HAL_SYSCFG_SRAM2_ERASE() LL_SYSCFG_EnableSRAM2Erase() + +/** @brief Floating Point Unit interrupt enable/disable macros + * @param __INTERRUPT__ This parameter can be a value of @ref SYSCFG_FPU_Interrupts + */ +#define __HAL_SYSCFG_FPU_INTERRUPT_ENABLE(__INTERRUPT__) \ + do { \ + assert_param(IS_SYSCFG_FPU_INTERRUPT((__INTERRUPT__))); \ + SET_BIT(SYSCFG->CFGR1, (__INTERRUPT__)); \ + } while(0) + +#define __HAL_SYSCFG_FPU_INTERRUPT_DISABLE(__INTERRUPT__) \ + do { \ + assert_param(IS_SYSCFG_FPU_INTERRUPT((__INTERRUPT__))); \ + CLEAR_BIT(SYSCFG->CFGR1, (__INTERRUPT__)); \ + } while(0) + +/** @brief SYSCFG Break ECC lock. + * Enable and lock the connection of Flash ECC error connection to TIM1/16/17 Break input. + * @note The selected configuration is locked and can be unlocked only by system reset. + */ +#define __HAL_SYSCFG_BREAK_ECC_LOCK() LL_SYSCFG_SetTIMBreakInputs(LL_SYSCFG_TIMBREAK_ECC) + +/** @brief SYSCFG Break Cortex-M4 Lockup lock. + * Enable and lock the connection of Cortex-M4 LOCKUP (Hardfault) output to TIM1/16/17 Break input. + * @note The selected configuration is locked and can be unlocked only by system reset. + */ +#define __HAL_SYSCFG_BREAK_LOCKUP_LOCK() LL_SYSCFG_SetTIMBreakInputs(LL_SYSCFG_TIMBREAK_LOCKUP) + +/** @brief SYSCFG Break PVD lock. + * Enable and lock the PVD connection to Timer1/16/17 Break input, as well as the PVDE and PLS[2:0] + * in the PWR_CR2 register. + * @note The selected configuration is locked and can be unlocked only by system reset. + */ +#define __HAL_SYSCFG_BREAK_PVD_LOCK() LL_SYSCFG_SetTIMBreakInputs(LL_SYSCFG_TIMBREAK_PVD) + +/** @brief SYSCFG Break SRAM2 parity lock. + * Enable and lock the SRAM2 parity error signal connection to TIM1/16/17 Break input. + * @note The selected configuration is locked and can be unlocked by system reset. + */ +#define __HAL_SYSCFG_BREAK_SRAM2PARITY_LOCK() LL_SYSCFG_SetTIMBreakInputs(LL_SYSCFG_TIMBREAK_SRAM2_PARITY) + +/** @brief Check SYSCFG flag is set or not. + * @param __FLAG__ specifies the flag to check. + * This parameter can be one of the following values: + * @arg @ref SYSCFG_FLAG_SRAM2_PE SRAM2 Parity Error Flag + * @arg @ref SYSCFG_FLAG_SRAM2_BUSY SRAM2 Erase Ongoing + * @retval The new state of __FLAG__ (TRUE or FALSE). + */ +#define __HAL_SYSCFG_GET_FLAG(__FLAG__) ((((((__FLAG__) == SYSCFG_SCSR_SRAM2BSY)? SYSCFG->SCSR : SYSCFG->CFGR2) & \ + (__FLAG__))!= 0U) ? 1U : 0U) + +/** @brief Set the SPF bit to clear the SRAM Parity Error Flag. + */ +#define __HAL_SYSCFG_CLEAR_FLAG() LL_SYSCFG_ClearFlag_SP() + +/** @brief Fast mode Plus driving capability enable/disable macros + * @param __FASTMODEPLUS__ This parameter can be a value of @ref SYSCFG_FastModePlus_GPIO + */ +#define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) \ + do { \ + assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__))); \ + LL_SYSCFG_EnableFastModePlus(__FASTMODEPLUS__); \ + } while(0) + +#define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) \ + do { \ + assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__))); \ + LL_SYSCFG_DisableFastModePlus(__FASTMODEPLUS__); \ + } while(0) + +/** + * @} + */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup HAL_Private_Macros HAL Private Macros + * @{ + */ + +/** @defgroup SYSCFG_Private_Macros SYSCFG Private Macros + * @{ + */ + +#define IS_SYSCFG_FPU_INTERRUPT(__INTERRUPT__) ((((__INTERRUPT__) & SYSCFG_IT_FPU_IOC) == SYSCFG_IT_FPU_IOC) || \ + (((__INTERRUPT__) & SYSCFG_IT_FPU_DZC) == SYSCFG_IT_FPU_DZC) || \ + (((__INTERRUPT__) & SYSCFG_IT_FPU_UFC) == SYSCFG_IT_FPU_UFC) || \ + (((__INTERRUPT__) & SYSCFG_IT_FPU_OFC) == SYSCFG_IT_FPU_OFC) || \ + (((__INTERRUPT__) & SYSCFG_IT_FPU_IDC) == SYSCFG_IT_FPU_IDC) || \ + (((__INTERRUPT__) & SYSCFG_IT_FPU_IXC) == SYSCFG_IT_FPU_IXC)) + +#if defined(STM32WB15xx) || defined(STM32WB10xx) +#define IS_SYSCFG_SRAM2WRP_PAGE(__PAGE__) (((__PAGE__) > 0U) && ((__PAGE__) <= 0xFFFFFFFFU)) +#define IS_SYSCFG_SRAM2WRP2_PAGE(__PAGE__) (((__PAGE__) > 0U) && ((__PAGE__) <= 0x0000000FU)) +#else +#define IS_SYSCFG_SRAM2WRP_PAGE(__PAGE__) (((__PAGE__) > 0U) && ((__PAGE__) <= 0xFFFFFFFFU)) +#define IS_SYSCFG_SRAM2WRP2_PAGE(__PAGE__) IS_SYSCFG_SRAM2WRP_PAGE(__PAGE__) +#endif /* STM32WB15xx || STM32WB10xx */ + +#if defined(VREFBUF) +#define IS_SYSCFG_VREFBUF_VOLTAGE_SCALE(__SCALE__) (((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE0) || \ + ((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE1)) + +#define IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE(__VALUE__) (((__VALUE__) == SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE) || \ + ((__VALUE__) == SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE)) + +#define IS_SYSCFG_VREFBUF_TRIMMING(__VALUE__) (((__VALUE__) > 0U) && ((__VALUE__) <= VREFBUF_CCR_TRIM)) +#endif /* VREFBUF */ + +#define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \ + (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7) || \ + (((__PIN__) & SYSCFG_FASTMODEPLUS_PB8) == SYSCFG_FASTMODEPLUS_PB8) || \ + (((__PIN__) & SYSCFG_FASTMODEPLUS_PB9) == SYSCFG_FASTMODEPLUS_PB9)) + +#if defined(LL_SYSCFG_SECURE_ACCESS_AES1) +#define IS_SYSCFG_SECURITY_ACCESS(__VALUE__) ((((__VALUE__) & HAL_SYSCFG_SECURE_ACCESS_AES1) == HAL_SYSCFG_SECURE_ACCESS_AES1) || \ + (((__VALUE__) & HAL_SYSCFG_SECURE_ACCESS_AES2) == HAL_SYSCFG_SECURE_ACCESS_AES2) || \ + (((__VALUE__) & HAL_SYSCFG_SECURE_ACCESS_PKA) == HAL_SYSCFG_SECURE_ACCESS_PKA) || \ + (((__VALUE__) & HAL_SYSCFG_SECURE_ACCESS_RNG) == HAL_SYSCFG_SECURE_ACCESS_RNG)) +#else +#define IS_SYSCFG_SECURITY_ACCESS(__VALUE__) ((((__VALUE__) & HAL_SYSCFG_SECURE_ACCESS_AES2) == HAL_SYSCFG_SECURE_ACCESS_AES2) || \ + (((__VALUE__) & HAL_SYSCFG_SECURE_ACCESS_PKA) == HAL_SYSCFG_SECURE_ACCESS_PKA) || \ + (((__VALUE__) & HAL_SYSCFG_SECURE_ACCESS_RNG) == HAL_SYSCFG_SECURE_ACCESS_RNG)) +#endif /* LL_SYSCFG_SECURE_ACCESS_AES1 */ + +/** + * @} + */ + +/** + * @} + */ + +/** @defgroup HAL_Private_Macros HAL Private Macros + * @{ + */ +#define IS_TICKFREQ(FREQ) (((FREQ) == HAL_TICK_FREQ_10HZ) || \ + ((FREQ) == HAL_TICK_FREQ_100HZ) || \ + ((FREQ) == HAL_TICK_FREQ_1KHZ)) +/** + * @} + */ + + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup HAL_Exported_Functions HAL Exported Functions + * @{ + */ + +/** @defgroup HAL_Exported_Functions_Group1 HAL Initialization and Configuration functions + * @{ + */ + +/* Initialization and Configuration functions ******************************/ +HAL_StatusTypeDef HAL_Init(void); +HAL_StatusTypeDef HAL_DeInit(void); +void HAL_MspInit(void); +void HAL_MspDeInit(void); + +HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority); + +/** + * @} + */ + +/** @defgroup HAL_Exported_Functions_Group2 HAL Control functions + * @{ + */ + +/* Peripheral Control functions ************************************************/ +void HAL_IncTick(void); +void HAL_Delay(uint32_t Delay); +uint32_t HAL_GetTick(void); +uint32_t HAL_GetTickPrio(void); +HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq); +HAL_TickFreqTypeDef HAL_GetTickFreq(void); +void HAL_SuspendTick(void); +void HAL_ResumeTick(void); +uint32_t HAL_GetHalVersion(void); +uint32_t HAL_GetREVID(void); +uint32_t HAL_GetDEVID(void); +uint32_t HAL_GetUIDw0(void); +uint32_t HAL_GetUIDw1(void); +uint32_t HAL_GetUIDw2(void); + +/** + * @} + */ + +/** @defgroup HAL_Exported_Functions_Group3 HAL Debug functions + * @{ + */ + +/* DBGMCU Peripheral Control functions *****************************************/ +void HAL_DBGMCU_EnableDBGSleepMode(void); +void HAL_DBGMCU_DisableDBGSleepMode(void); +void HAL_DBGMCU_EnableDBGStopMode(void); +void HAL_DBGMCU_DisableDBGStopMode(void); +void HAL_DBGMCU_EnableDBGStandbyMode(void); +void HAL_DBGMCU_DisableDBGStandbyMode(void); +/** + * @} + */ + +/* Exported variables ---------------------------------------------------------*/ +/** @addtogroup HAL_Exported_Variables + * @{ + */ +extern __IO uint32_t uwTick; +extern uint32_t uwTickPrio; +extern HAL_TickFreqTypeDef uwTickFreq; +/** + * @} + */ + +/** @addtogroup HAL_Exported_Functions_Group4 HAL System Configuration functions + * @{ + */ + +/* SYSCFG Control functions ****************************************************/ +void HAL_SYSCFG_SRAM2Erase(void); +void HAL_SYSCFG_DisableSRAMFetch(void); +uint32_t HAL_SYSCFG_IsEnabledSRAMFetch(void); + +#if defined(VREFBUF) +void HAL_SYSCFG_VREFBUF_VoltageScalingConfig(uint32_t VoltageScaling); +void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode); +void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue); +HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF(void); +void HAL_SYSCFG_DisableVREFBUF(void); +#endif /* VREFBUF */ + +void HAL_SYSCFG_EnableIOBooster(void); +void HAL_SYSCFG_DisableIOBooster(void); +#if defined(SYSCFG_CFGR1_ANASWVDD) +void HAL_SYSCFG_EnableIOVdd(void); +void HAL_SYSCFG_DisableIOVdd(void); +#endif /* SYSCFG_CFGR1_ANASWVDD */ + +void HAL_SYSCFG_EnableSecurityAccess(uint32_t SecurityAccess); +void HAL_SYSCFG_DisableSecurityAccess(uint32_t SecurityAccess); +uint32_t HAL_SYSCFG_IsEnabledSecurityAccess(uint32_t SecurityAccess); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h new file mode 100644 index 0000000..fb1555c --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_cortex.h @@ -0,0 +1,416 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_cortex.h + * @author MCD Application Team + * @brief Header file of CORTEX HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_CORTEX_H +#define STM32WBxx_HAL_CORTEX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup CORTEX CORTEX + * @brief CORTEX HAL module driver + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup CORTEX_Exported_Types CORTEX Exported Types + * @{ + */ + +#if (__MPU_PRESENT == 1) +/** @defgroup CORTEX_MPU_Region_Initialization_Structure_definition MPU Region Initialization Structure Definition + * @brief MPU Region initialization structure + * @{ + */ +typedef struct +{ + uint8_t Enable; /*!< Specifies the status of the region. + This parameter can be a value of @ref CORTEX_MPU_Region_Enable */ + uint8_t Number; /*!< Specifies the number of the region to protect. + This parameter can be a value of @ref CORTEX_MPU_Region_Number */ + uint32_t BaseAddress; /*!< Specifies the base address of the region to protect. + */ + uint8_t Size; /*!< Specifies the size of the region to protect. + This parameter can be a value of @ref CORTEX_MPU_Region_Size */ + uint8_t SubRegionDisable; /*!< Specifies the number of the subregion protection to disable. + This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF */ + uint8_t TypeExtField; /*!< Specifies the TEX field level. + This parameter can be a value of @ref CORTEX_MPU_TEX_Levels */ + uint8_t AccessPermission; /*!< Specifies the region access permission type. + This parameter can be a value of @ref CORTEX_MPU_Region_Permission_Attributes */ + uint8_t DisableExec; /*!< Specifies the instruction access status. + This parameter can be a value of @ref CORTEX_MPU_Instruction_Access */ + uint8_t IsShareable; /*!< Specifies the shareability status of the protected region. + This parameter can be a value of @ref CORTEX_MPU_Access_Shareable */ + uint8_t IsCacheable; /*!< Specifies the cacheable status of the region protected. + This parameter can be a value of @ref CORTEX_MPU_Access_Cacheable */ + uint8_t IsBufferable; /*!< Specifies the bufferable status of the protected region. + This parameter can be a value of @ref CORTEX_MPU_Access_Bufferable */ +} MPU_Region_InitTypeDef; +/** + * @} + */ +#endif /* __MPU_PRESENT */ + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants + * @{ + */ +/** @defgroup CORTEX_Preemption_Priority_Group CORTEX Preemption Priority Group + * @{ + */ +#define NVIC_PRIORITYGROUP_0 (0x00000007U) /*!< 0 bit for pre-emption priority, + 4 bits for subpriority */ +#define NVIC_PRIORITYGROUP_1 (0x00000006U) /*!< 1 bit for pre-emption priority, + 3 bits for subpriority */ +#define NVIC_PRIORITYGROUP_2 (0x00000005U) /*!< 2 bits for pre-emption priority, + 2 bits for subpriority */ +#define NVIC_PRIORITYGROUP_3 (0x00000004U) /*!< 3 bits for pre-emption priority, + 1 bit for subpriority */ +#define NVIC_PRIORITYGROUP_4 (0x00000003U) /*!< 4 bits for pre-emption priority, + 0 bit for subpriority */ +/** + * @} + */ + +/** @defgroup CORTEX_SysTick_clock_source CORTEX SysTick clock source + * @{ + */ +#define SYSTICK_CLKSOURCE_HCLK_DIV8 0x00000000U +#define SYSTICK_CLKSOURCE_HCLK 0x00000004U + +/** + * @} + */ + +#if (__MPU_PRESENT == 1) +/** @defgroup CORTEX_MPU_HFNMI_PRIVDEF_Control CORTEX MPU HFNMI and PRIVILEGED Access control + * @{ + */ +#define MPU_HFNMI_PRIVDEF_NONE 0x00000000U +#define MPU_HARDFAULT_NMI (MPU_CTRL_HFNMIENA_Msk) +#define MPU_PRIVILEGED_DEFAULT (MPU_CTRL_PRIVDEFENA_Msk) +#define MPU_HFNMI_PRIVDEF (MPU_CTRL_HFNMIENA_Msk | MPU_CTRL_PRIVDEFENA_Msk) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_Region_Enable CORTEX MPU Region Enable + * @{ + */ +#define MPU_REGION_ENABLE ((uint8_t)0x01) +#define MPU_REGION_DISABLE ((uint8_t)0x00) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_Instruction_Access CORTEX MPU Instruction Access + * @{ + */ +#define MPU_INSTRUCTION_ACCESS_ENABLE ((uint8_t)0x00) +#define MPU_INSTRUCTION_ACCESS_DISABLE ((uint8_t)0x01) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_Access_Shareable CORTEX MPU Instruction Access Shareable + * @{ + */ +#define MPU_ACCESS_SHAREABLE ((uint8_t)0x01) +#define MPU_ACCESS_NOT_SHAREABLE ((uint8_t)0x00) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_Access_Cacheable CORTEX MPU Instruction Access Cacheable + * @{ + */ +#define MPU_ACCESS_CACHEABLE ((uint8_t)0x01) +#define MPU_ACCESS_NOT_CACHEABLE ((uint8_t)0x00) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_Access_Bufferable CORTEX MPU Instruction Access Bufferable + * @{ + */ +#define MPU_ACCESS_BUFFERABLE ((uint8_t)0x01) +#define MPU_ACCESS_NOT_BUFFERABLE ((uint8_t)0x00) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_TEX_Levels CORTEX MPU TEX Levels + * @{ + */ +#define MPU_TEX_LEVEL0 ((uint8_t)0x00) +#define MPU_TEX_LEVEL1 ((uint8_t)0x01) +#define MPU_TEX_LEVEL2 ((uint8_t)0x02) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_Region_Size CORTEX MPU Region Size + * @{ + */ +#define MPU_REGION_SIZE_32B ((uint8_t)0x04) +#define MPU_REGION_SIZE_64B ((uint8_t)0x05) +#define MPU_REGION_SIZE_128B ((uint8_t)0x06) +#define MPU_REGION_SIZE_256B ((uint8_t)0x07) +#define MPU_REGION_SIZE_512B ((uint8_t)0x08) +#define MPU_REGION_SIZE_1KB ((uint8_t)0x09) +#define MPU_REGION_SIZE_2KB ((uint8_t)0x0A) +#define MPU_REGION_SIZE_4KB ((uint8_t)0x0B) +#define MPU_REGION_SIZE_8KB ((uint8_t)0x0C) +#define MPU_REGION_SIZE_16KB ((uint8_t)0x0D) +#define MPU_REGION_SIZE_32KB ((uint8_t)0x0E) +#define MPU_REGION_SIZE_64KB ((uint8_t)0x0F) +#define MPU_REGION_SIZE_128KB ((uint8_t)0x10) +#define MPU_REGION_SIZE_256KB ((uint8_t)0x11) +#define MPU_REGION_SIZE_512KB ((uint8_t)0x12) +#define MPU_REGION_SIZE_1MB ((uint8_t)0x13) +#define MPU_REGION_SIZE_2MB ((uint8_t)0x14) +#define MPU_REGION_SIZE_4MB ((uint8_t)0x15) +#define MPU_REGION_SIZE_8MB ((uint8_t)0x16) +#define MPU_REGION_SIZE_16MB ((uint8_t)0x17) +#define MPU_REGION_SIZE_32MB ((uint8_t)0x18) +#define MPU_REGION_SIZE_64MB ((uint8_t)0x19) +#define MPU_REGION_SIZE_128MB ((uint8_t)0x1A) +#define MPU_REGION_SIZE_256MB ((uint8_t)0x1B) +#define MPU_REGION_SIZE_512MB ((uint8_t)0x1C) +#define MPU_REGION_SIZE_1GB ((uint8_t)0x1D) +#define MPU_REGION_SIZE_2GB ((uint8_t)0x1E) +#define MPU_REGION_SIZE_4GB ((uint8_t)0x1F) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_Region_Permission_Attributes CORTEX MPU Region Permission Attributes + * @{ + */ +#define MPU_REGION_NO_ACCESS ((uint8_t)0x00) +#define MPU_REGION_PRIV_RW ((uint8_t)0x01) +#define MPU_REGION_PRIV_RW_URO ((uint8_t)0x02) +#define MPU_REGION_FULL_ACCESS ((uint8_t)0x03) +#define MPU_REGION_PRIV_RO ((uint8_t)0x05) +#define MPU_REGION_PRIV_RO_URO ((uint8_t)0x06) +/** + * @} + */ + +/** @defgroup CORTEX_MPU_Region_Number CORTEX MPU Region Number + * @{ + */ +#define MPU_REGION_NUMBER0 ((uint8_t)0x00) +#define MPU_REGION_NUMBER1 ((uint8_t)0x01) +#define MPU_REGION_NUMBER2 ((uint8_t)0x02) +#define MPU_REGION_NUMBER3 ((uint8_t)0x03) +#define MPU_REGION_NUMBER4 ((uint8_t)0x04) +#define MPU_REGION_NUMBER5 ((uint8_t)0x05) +#define MPU_REGION_NUMBER6 ((uint8_t)0x06) +#define MPU_REGION_NUMBER7 ((uint8_t)0x07) +/** + * @} + */ +#endif /* __MPU_PRESENT */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ +/** @defgroup CORTEX_Exported_Macros CORTEX Exported Macros + * @{ + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup CORTEX_Exported_Functions CORTEX Exported Functions + * @{ + */ + +/** @defgroup CORTEX_Exported_Functions_Group1 Initialization and Configuration functions + * @brief Initialization and Configuration functions + * @{ + */ +/* Initialization and Configuration functions *****************************/ +void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup); +void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority); +void HAL_NVIC_EnableIRQ(IRQn_Type IRQn); +void HAL_NVIC_DisableIRQ(IRQn_Type IRQn); +void HAL_NVIC_SystemReset(void); +uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb); +/** + * @} + */ + +/** @defgroup CORTEX_Exported_Functions_Group2 Peripheral Control functions + * @brief Cortex control functions + * @{ + */ +/* Peripheral Control functions *************************************************/ +void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t *pPreemptPriority, uint32_t *pSubPriority); +uint32_t HAL_NVIC_GetPriorityGrouping(void); +uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn); +void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn); +void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn); +void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource); +void HAL_SYSTICK_IRQHandler(void); +void HAL_SYSTICK_Callback(void); + +#if (__MPU_PRESENT == 1U) +void HAL_MPU_Enable(uint32_t MPU_Control); +void HAL_MPU_Disable(void); +void HAL_MPU_EnableRegion(uint32_t RegionNumber); +void HAL_MPU_DisableRegion(uint32_t RegionNumber); +void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init); +#endif /* __MPU_PRESENT */ +/** + * @} + */ + +/** + * @} + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/** @defgroup CORTEX_Private_Macros CORTEX Private Macros + * @{ + */ +#define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PRIORITYGROUP_0) || \ + ((GROUP) == NVIC_PRIORITYGROUP_1) || \ + ((GROUP) == NVIC_PRIORITYGROUP_2) || \ + ((GROUP) == NVIC_PRIORITYGROUP_3) || \ + ((GROUP) == NVIC_PRIORITYGROUP_4)) + +#define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x10U) + +#define IS_NVIC_SUB_PRIORITY(PRIORITY) ((PRIORITY) < 0x10U) + +#define IS_NVIC_DEVICE_IRQ(IRQ) ((IRQ) > SysTick_IRQn) + +#define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \ + ((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8)) + +#if (__MPU_PRESENT == 1) +#define IS_MPU_REGION_ENABLE(STATE) (((STATE) == MPU_REGION_ENABLE) || \ + ((STATE) == MPU_REGION_DISABLE)) + +#define IS_MPU_INSTRUCTION_ACCESS(STATE) (((STATE) == MPU_INSTRUCTION_ACCESS_ENABLE) || \ + ((STATE) == MPU_INSTRUCTION_ACCESS_DISABLE)) + +#define IS_MPU_ACCESS_SHAREABLE(STATE) (((STATE) == MPU_ACCESS_SHAREABLE) || \ + ((STATE) == MPU_ACCESS_NOT_SHAREABLE)) + +#define IS_MPU_ACCESS_CACHEABLE(STATE) (((STATE) == MPU_ACCESS_CACHEABLE) || \ + ((STATE) == MPU_ACCESS_NOT_CACHEABLE)) + +#define IS_MPU_ACCESS_BUFFERABLE(STATE) (((STATE) == MPU_ACCESS_BUFFERABLE) || \ + ((STATE) == MPU_ACCESS_NOT_BUFFERABLE)) + +#define IS_MPU_TEX_LEVEL(TYPE) (((TYPE) == MPU_TEX_LEVEL0) || \ + ((TYPE) == MPU_TEX_LEVEL1) || \ + ((TYPE) == MPU_TEX_LEVEL2)) + +#define IS_MPU_REGION_PERMISSION_ATTRIBUTE(TYPE) (((TYPE) == MPU_REGION_NO_ACCESS) || \ + ((TYPE) == MPU_REGION_PRIV_RW) || \ + ((TYPE) == MPU_REGION_PRIV_RW_URO) || \ + ((TYPE) == MPU_REGION_FULL_ACCESS) || \ + ((TYPE) == MPU_REGION_PRIV_RO) || \ + ((TYPE) == MPU_REGION_PRIV_RO_URO)) + +#define IS_MPU_REGION_NUMBER(NUMBER) (((NUMBER) == MPU_REGION_NUMBER0) || \ + ((NUMBER) == MPU_REGION_NUMBER1) || \ + ((NUMBER) == MPU_REGION_NUMBER2) || \ + ((NUMBER) == MPU_REGION_NUMBER3) || \ + ((NUMBER) == MPU_REGION_NUMBER4) || \ + ((NUMBER) == MPU_REGION_NUMBER5) || \ + ((NUMBER) == MPU_REGION_NUMBER6) || \ + ((NUMBER) == MPU_REGION_NUMBER7)) + +#define IS_MPU_REGION_SIZE(SIZE) (((SIZE) == MPU_REGION_SIZE_32B) || \ + ((SIZE) == MPU_REGION_SIZE_64B) || \ + ((SIZE) == MPU_REGION_SIZE_128B) || \ + ((SIZE) == MPU_REGION_SIZE_256B) || \ + ((SIZE) == MPU_REGION_SIZE_512B) || \ + ((SIZE) == MPU_REGION_SIZE_1KB) || \ + ((SIZE) == MPU_REGION_SIZE_2KB) || \ + ((SIZE) == MPU_REGION_SIZE_4KB) || \ + ((SIZE) == MPU_REGION_SIZE_8KB) || \ + ((SIZE) == MPU_REGION_SIZE_16KB) || \ + ((SIZE) == MPU_REGION_SIZE_32KB) || \ + ((SIZE) == MPU_REGION_SIZE_64KB) || \ + ((SIZE) == MPU_REGION_SIZE_128KB) || \ + ((SIZE) == MPU_REGION_SIZE_256KB) || \ + ((SIZE) == MPU_REGION_SIZE_512KB) || \ + ((SIZE) == MPU_REGION_SIZE_1MB) || \ + ((SIZE) == MPU_REGION_SIZE_2MB) || \ + ((SIZE) == MPU_REGION_SIZE_4MB) || \ + ((SIZE) == MPU_REGION_SIZE_8MB) || \ + ((SIZE) == MPU_REGION_SIZE_16MB) || \ + ((SIZE) == MPU_REGION_SIZE_32MB) || \ + ((SIZE) == MPU_REGION_SIZE_64MB) || \ + ((SIZE) == MPU_REGION_SIZE_128MB) || \ + ((SIZE) == MPU_REGION_SIZE_256MB) || \ + ((SIZE) == MPU_REGION_SIZE_512MB) || \ + ((SIZE) == MPU_REGION_SIZE_1GB) || \ + ((SIZE) == MPU_REGION_SIZE_2GB) || \ + ((SIZE) == MPU_REGION_SIZE_4GB)) + +#define IS_MPU_SUB_REGION_DISABLE(SUBREGION) ((SUBREGION) < (uint16_t)0x00FFU) +#endif /* __MPU_PRESENT */ + +/** + * @} + */ + +/* Private functions ---------------------------------------------------------*/ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_CORTEX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h new file mode 100644 index 0000000..95ac1c5 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_def.h @@ -0,0 +1,210 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_def.h + * @author MCD Application Team + * @brief This file contains HAL common defines, enumeration, macros and + * structures definitions. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32WBxx_HAL_DEF +#define __STM32WBxx_HAL_DEF + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" +#include "Legacy/stm32_hal_legacy.h" /* Aliases file for old names compatibility */ +#include + +/* Exported types ------------------------------------------------------------*/ + +/** + * @brief HAL Status structures definition + */ +typedef enum +{ + HAL_OK = 0x00, + HAL_ERROR = 0x01, + HAL_BUSY = 0x02, + HAL_TIMEOUT = 0x03 +} HAL_StatusTypeDef; + +/** + * @brief HAL Lock structures definition + */ +typedef enum +{ + HAL_UNLOCKED = 0x00, + HAL_LOCKED = 0x01 +} HAL_LockTypeDef; + +/* Exported macros -----------------------------------------------------------*/ +#ifndef UNUSED +#define UNUSED(X) (void)(X) /* To avoid gcc/g++ warnings */ +#endif /* UNUSED */ + +#define HAL_MAX_DELAY 0xFFFFFFFFU + +#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT)) +#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U) + +#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \ + do{ \ + (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \ + (__DMA_HANDLE__).Parent = (__HANDLE__); \ + } while(0) + +/** @brief Reset the Handle's State field. + * @param __HANDLE__ specifies the Peripheral Handle. + * @note This macro can be used for the following purpose: + * - When the Handle is declared as local variable; before passing it as parameter + * to HAL_PPP_Init() for the first time, it is mandatory to use this macro + * to set to 0 the Handle's "State" field. + * Otherwise, "State" field may have any random value and the first time the function + * HAL_PPP_Init() is called, the low level hardware initialization will be missed + * (i.e. HAL_PPP_MspInit() will not be executed). + * - When there is a need to reconfigure the low level hardware: instead of calling + * HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init(). + * In this later function, when the Handle's "State" field is set to 0, it will execute the function + * HAL_PPP_MspInit() which will reconfigure the low level hardware. + * @retval None + */ +#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0) + +#if (USE_RTOS == 1) +/* Reserved for future use */ +#error " USE_RTOS should be 0 in the current HAL release " +#else +#define __HAL_LOCK(__HANDLE__) \ + do { \ + if((__HANDLE__)->Lock == HAL_LOCKED) \ + { \ + return HAL_BUSY; \ + } \ + else \ + { \ + (__HANDLE__)->Lock = HAL_LOCKED; \ + } \ + } while (0) + +#define __HAL_UNLOCK(__HANDLE__) \ + do { \ + (__HANDLE__)->Lock = HAL_UNLOCKED; \ + } while (0) +#endif /* USE_RTOS */ + + +#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */ +#ifndef __weak +#define __weak __attribute__((weak)) +#endif /* __weak */ +#ifndef __packed +#define __packed __attribute__((packed)) +#endif /* __packed */ +#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */ +#ifndef __weak +#define __weak __attribute__((weak)) +#endif /* __weak */ +#ifndef __packed +#define __packed __attribute__((__packed__)) +#endif /* __packed */ +#endif /* __GNUC__ */ + + +/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */ +#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */ +#ifndef __ALIGN_BEGIN +#define __ALIGN_BEGIN +#endif /* __ALIGN_BEGIN */ +#ifndef __ALIGN_END +#define __ALIGN_END __attribute__ ((aligned (4))) +#endif /* __ALIGN_END */ +#elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */ +#ifndef __ALIGN_END +#define __ALIGN_END __attribute__ ((aligned (4))) +#endif /* __ALIGN_END */ +#ifndef __ALIGN_BEGIN +#define __ALIGN_BEGIN +#endif /* __ALIGN_BEGIN */ +#else +#ifndef __ALIGN_END +#define __ALIGN_END +#endif /* __ALIGN_END */ +#ifndef __ALIGN_BEGIN +#if defined (__CC_ARM) /* ARM Compiler V5 */ +#define __ALIGN_BEGIN __align(4) +#elif defined (__ICCARM__) /* IAR Compiler */ +#define __ALIGN_BEGIN +#endif /* __CC_ARM */ +#endif /* __ALIGN_BEGIN */ +#endif /* __GNUC__ */ + +/** + * @brief __RAM_FUNC definition + */ +#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) +/* ARM Compiler V4/V5 and V6 + -------------------------- + RAM functions are defined using the toolchain options. + Functions that are executed in RAM should reside in a separate source module. + Using the 'Options for File' dialog you can simply change the 'Code / Const' + area of a module to a memory space in physical RAM. + Available memory areas are declared in the 'Target' tab of the 'Options for Target' + dialog. +*/ +#define __RAM_FUNC + +#elif defined ( __ICCARM__ ) +/* ICCARM Compiler + --------------- + RAM functions are defined using a specific toolchain keyword "__ramfunc". +*/ +#define __RAM_FUNC __ramfunc + +#elif defined ( __GNUC__ ) +/* GNU Compiler + ------------ + RAM functions are defined using a specific toolchain attribute + "__attribute__((section(".RamFunc")))". +*/ +#define __RAM_FUNC __attribute__((section(".RamFunc"))) + +#endif /* __CC_ARM || ... */ + +/** + * @brief __NOINLINE definition + */ +#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ ) +/* ARM V4/V5 and V6 & GNU Compiler + ------------------------------- +*/ +#define __NOINLINE __attribute__ ( (noinline) ) + +#elif defined ( __ICCARM__ ) +/* ICCARM Compiler + --------------- +*/ +#define __NOINLINE _Pragma("optimize = no_inline") + +#endif /* __CC_ARM || ... */ + + +#ifdef __cplusplus +} +#endif + +#endif /* ___STM32WBxx_HAL_DEF */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h new file mode 100644 index 0000000..d46cd6f --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma.h @@ -0,0 +1,714 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_dma.h + * @author MCD Application Team + * @brief Header file of DMA HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_DMA_H +#define STM32WBxx_HAL_DMA_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" +#include "stm32wbxx_ll_dma.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup DMA + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup DMA_Exported_Types DMA Exported Types + * @{ + */ + +/** + * @brief DMA Configuration Structure definition + */ +typedef struct +{ + uint32_t Request; /*!< Specifies the request selected for the specified channel. + This parameter can be a value of @ref DMA_request */ + + uint32_t Direction; /*!< Specifies if the data will be transferred from memory to peripheral, + from memory to memory or from peripheral to memory. + This parameter can be a value of @ref DMA_Data_transfer_direction */ + + uint32_t PeriphInc; /*!< Specifies whether the Peripheral address register should be incremented or not. + This parameter can be a value of @ref DMA_Peripheral_incremented_mode */ + + uint32_t MemInc; /*!< Specifies whether the memory address register should be incremented or not. + This parameter can be a value of @ref DMA_Memory_incremented_mode */ + + uint32_t PeriphDataAlignment; /*!< Specifies the Peripheral data width. + This parameter can be a value of @ref DMA_Peripheral_data_size */ + + uint32_t MemDataAlignment; /*!< Specifies the Memory data width. + This parameter can be a value of @ref DMA_Memory_data_size */ + + uint32_t Mode; /*!< Specifies the operation mode of the DMAy Channelx. + This parameter can be a value of @ref DMA_mode + @note The circular buffer mode cannot be used if the memory-to-memory + data transfer is configured on the selected Channel */ + + uint32_t Priority; /*!< Specifies the software priority for the DMAy Channelx. + This parameter can be a value of @ref DMA_Priority_level */ +} DMA_InitTypeDef; + +/** + * @brief HAL DMA State structures definition + */ +typedef enum +{ + HAL_DMA_STATE_RESET = 0x00U, /*!< DMA not yet initialized or disabled */ + HAL_DMA_STATE_READY = 0x01U, /*!< DMA initialized and ready for use */ + HAL_DMA_STATE_BUSY = 0x02U, /*!< DMA process is ongoing */ + HAL_DMA_STATE_TIMEOUT = 0x03U, /*!< DMA timeout state */ +} HAL_DMA_StateTypeDef; + +/** + * @brief HAL DMA Error Code structure definition + */ +typedef enum +{ + HAL_DMA_FULL_TRANSFER = 0x00U, /*!< Full transfer */ + HAL_DMA_HALF_TRANSFER = 0x01U /*!< Half Transfer */ +} HAL_DMA_LevelCompleteTypeDef; + + +/** + * @brief HAL DMA Callback ID structure definition + */ +typedef enum +{ + HAL_DMA_XFER_CPLT_CB_ID = 0x00U, /*!< Full transfer */ + HAL_DMA_XFER_HALFCPLT_CB_ID = 0x01U, /*!< Half transfer */ + HAL_DMA_XFER_ERROR_CB_ID = 0x02U, /*!< Error */ + HAL_DMA_XFER_ABORT_CB_ID = 0x03U, /*!< Abort */ + HAL_DMA_XFER_ALL_CB_ID = 0x04U /*!< All */ + +} HAL_DMA_CallbackIDTypeDef; + +/** + * @brief DMA handle Structure definition + */ +typedef struct __DMA_HandleTypeDef +{ + DMA_Channel_TypeDef *Instance; /*!< Register base address */ + + DMA_InitTypeDef Init; /*!< DMA communication parameters */ + + HAL_LockTypeDef Lock; /*!< DMA locking object */ + + __IO HAL_DMA_StateTypeDef State; /*!< DMA transfer state */ + + void *Parent; /*!< Parent object state */ + + void (* XferCpltCallback)(struct __DMA_HandleTypeDef *hdma); /*!< DMA transfer complete callback */ + + void (* XferHalfCpltCallback)(struct __DMA_HandleTypeDef *hdma); /*!< DMA Half transfer complete callback */ + + void (* XferErrorCallback)(struct __DMA_HandleTypeDef *hdma); /*!< DMA transfer error callback */ + + void (* XferAbortCallback)(struct __DMA_HandleTypeDef *hdma); /*!< DMA transfer abort callback */ + + __IO uint32_t ErrorCode; /*!< DMA Error code */ + + DMA_TypeDef *DmaBaseAddress; /*!< DMA Channel Base Address */ + + uint32_t ChannelIndex; /*!< DMA Channel Index */ + + DMAMUX_Channel_TypeDef *DMAmuxChannel; /*!< Register base address */ + + DMAMUX_ChannelStatus_TypeDef *DMAmuxChannelStatus; /*!< DMAMUX Channels Status Base Address */ + + uint32_t DMAmuxChannelStatusMask; /*!< DMAMUX Channel Status Mask */ + + DMAMUX_RequestGen_TypeDef *DMAmuxRequestGen; /*!< DMAMUX request generator Base Address */ + + DMAMUX_RequestGenStatus_TypeDef *DMAmuxRequestGenStatus; /*!< DMAMUX request generator Address */ + + uint32_t DMAmuxRequestGenStatusMask; /*!< DMAMUX request generator Status mask */ +} DMA_HandleTypeDef; +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup DMA_Exported_Constants DMA Exported Constants + * @{ + */ + +/** @defgroup DMA_Error_Code DMA Error Code + * @{ + */ +#define HAL_DMA_ERROR_NONE 0x00000000U /*!< No error */ +#define HAL_DMA_ERROR_TE 0x00000001U /*!< Transfer error */ +#define HAL_DMA_ERROR_NO_XFER 0x00000004U /*!< Abort requested with no Xfer ongoing */ +#define HAL_DMA_ERROR_TIMEOUT 0x00000020U /*!< Timeout error */ +#define HAL_DMA_ERROR_NOT_SUPPORTED 0x00000100U /*!< Not supported mode */ +#define HAL_DMA_ERROR_SYNC 0x00000200U /*!< DMAMUX sync overrun error */ +#define HAL_DMA_ERROR_REQGEN 0x00000400U /*!< DMAMUX request generator overrun error */ + +/** + * @} + */ + +/** @defgroup DMA_request DMA request + * @{ + */ + +#define DMA_REQUEST_MEM2MEM LL_DMAMUX_REQ_MEM2MEM /*!< memory to memory transfer */ + +#define DMA_REQUEST_GENERATOR0 LL_DMAMUX_REQ_GENERATOR0 /*!< DMAMUX request generator 0 */ +#define DMA_REQUEST_GENERATOR1 LL_DMAMUX_REQ_GENERATOR1 /*!< DMAMUX request generator 1 */ +#define DMA_REQUEST_GENERATOR2 LL_DMAMUX_REQ_GENERATOR2 /*!< DMAMUX request generator 2 */ +#define DMA_REQUEST_GENERATOR3 LL_DMAMUX_REQ_GENERATOR3 /*!< DMAMUX request generator 3 */ + +#define DMA_REQUEST_ADC1 LL_DMAMUX_REQ_ADC1 /*!< DMAMUX ADC1 request */ + +#define DMA_REQUEST_SPI1_RX LL_DMAMUX_REQ_SPI1_RX /*!< DMAMUX SPI1 RX request */ +#define DMA_REQUEST_SPI1_TX LL_DMAMUX_REQ_SPI1_TX /*!< DMAMUX SPI1 TX request */ +#if defined(SPI2) +#define DMA_REQUEST_SPI2_RX LL_DMAMUX_REQ_SPI2_RX /*!< DMAMUX SPI2 RX request */ +#define DMA_REQUEST_SPI2_TX LL_DMAMUX_REQ_SPI2_TX /*!< DMAMUX SPI2 TX request */ +#endif /* SPI2 */ + +#define DMA_REQUEST_I2C1_RX LL_DMAMUX_REQ_I2C1_RX /*!< DMAMUX I2C1 RX request */ +#define DMA_REQUEST_I2C1_TX LL_DMAMUX_REQ_I2C1_TX /*!< DMAMUX I2C1 TX request */ +#if defined(I2C3) +#define DMA_REQUEST_I2C3_RX LL_DMAMUX_REQ_I2C3_RX /*!< DMAMUX I2C3 RX request */ +#define DMA_REQUEST_I2C3_TX LL_DMAMUX_REQ_I2C3_TX /*!< DMAMUX I2C3 TX request */ +#endif /* I2C3 */ + +#define DMA_REQUEST_USART1_RX LL_DMAMUX_REQ_USART1_RX /*!< DMAMUX USART1 RX request */ +#define DMA_REQUEST_USART1_TX LL_DMAMUX_REQ_USART1_TX /*!< DMAMUX USART1 TX request */ + +#if defined(LPUART1) +#define DMA_REQUEST_LPUART1_RX LL_DMAMUX_REQ_LPUART1_RX /*!< DMAMUX LP_UART1_RX request */ +#define DMA_REQUEST_LPUART1_TX LL_DMAMUX_REQ_LPUART1_TX /*!< DMAMUX LP_UART1_RX request */ +#endif /* LPUART1 */ + +#if defined (SAI1) +#define DMA_REQUEST_SAI1_A LL_DMAMUX_REQ_SAI1_A /*!< DMAMUX SAI1 A request */ +#define DMA_REQUEST_SAI1_B LL_DMAMUX_REQ_SAI1_B /*!< DMAMUX SAI1 B request */ +#endif /* SAI1 */ + +#if defined(QUADSPI) +#define DMA_REQUEST_QUADSPI LL_DMAMUX_REQ_QUADSPI /*!< DMAMUX QUADSPI request */ +#endif /* QUADSPI */ + +#define DMA_REQUEST_TIM1_CH1 LL_DMAMUX_REQ_TIM1_CH1 /*!< DMAMUX TIM1 CH1 request */ +#define DMA_REQUEST_TIM1_CH2 LL_DMAMUX_REQ_TIM1_CH2 /*!< DMAMUX TIM1 CH2 request */ +#define DMA_REQUEST_TIM1_CH3 LL_DMAMUX_REQ_TIM1_CH3 /*!< DMAMUX TIM1 CH3 request */ +#define DMA_REQUEST_TIM1_CH4 LL_DMAMUX_REQ_TIM1_CH4 /*!< DMAMUX TIM1 CH4 request */ +#define DMA_REQUEST_TIM1_UP LL_DMAMUX_REQ_TIM1_UP /*!< DMAMUX TIM1 UP request */ +#define DMA_REQUEST_TIM1_TRIG LL_DMAMUX_REQ_TIM1_TRIG /*!< DMAMUX TIM1 TRIG request */ +#define DMA_REQUEST_TIM1_COM LL_DMAMUX_REQ_TIM1_COM /*!< DMAMUX TIM1 COM request */ + +#define DMA_REQUEST_TIM2_CH1 LL_DMAMUX_REQ_TIM2_CH1 /*!< DMAMUX TIM2 CH1 request */ +#define DMA_REQUEST_TIM2_CH2 LL_DMAMUX_REQ_TIM2_CH2 /*!< DMAMUX TIM2 CH2 request */ +#define DMA_REQUEST_TIM2_CH3 LL_DMAMUX_REQ_TIM2_CH3 /*!< DMAMUX TIM2 CH3 request */ +#define DMA_REQUEST_TIM2_CH4 LL_DMAMUX_REQ_TIM2_CH4 /*!< DMAMUX TIM2 CH4 request */ +#define DMA_REQUEST_TIM2_UP LL_DMAMUX_REQ_TIM2_UP /*!< DMAMUX TIM2 UP request */ + +#define DMA_REQUEST_TIM16_CH1 LL_DMAMUX_REQ_TIM16_CH1 /*!< DMAMUX TIM16 CH1 request */ +#define DMA_REQUEST_TIM16_UP LL_DMAMUX_REQ_TIM16_UP /*!< DMAMUX TIM16 UP request */ + +#define DMA_REQUEST_TIM17_CH1 LL_DMAMUX_REQ_TIM17_CH1 /*!< DMAMUX TIM17 CH1 request */ +#define DMA_REQUEST_TIM17_UP LL_DMAMUX_REQ_TIM17_UP /*!< DMAMUX TIM17 UP request */ + +#if defined(AES1) +#define DMA_REQUEST_AES1_IN LL_DMAMUX_REQ_AES1_IN /*!< DMAMUX AES1 IN request */ +#define DMA_REQUEST_AES1_OUT LL_DMAMUX_REQ_AES1_OUT /*!< DMAMUX AES1 OUT request */ +#endif /* AES1 */ + +#define DMA_REQUEST_AES2_IN LL_DMAMUX_REQ_AES2_IN /*!< DMAMUX AES2 IN request */ +#define DMA_REQUEST_AES2_OUT LL_DMAMUX_REQ_AES2_OUT /*!< DMAMUX AES2 OUT request */ +/** + * @} + */ + +/** @defgroup DMA_Data_transfer_direction DMA Data transfer direction + * @{ + */ +#define DMA_PERIPH_TO_MEMORY LL_DMA_DIRECTION_PERIPH_TO_MEMORY /*!< Peripheral to memory direction */ +#define DMA_MEMORY_TO_PERIPH LL_DMA_DIRECTION_MEMORY_TO_PERIPH /*!< Memory to peripheral direction */ +#define DMA_MEMORY_TO_MEMORY LL_DMA_DIRECTION_MEMORY_TO_MEMORY /*!< Memory to memory direction */ +/** + * @} + */ + +/** @defgroup DMA_Peripheral_incremented_mode DMA Peripheral incremented mode + * @{ + */ +#define DMA_PINC_ENABLE LL_DMA_PERIPH_INCREMENT /*!< Peripheral increment mode Enable */ +#define DMA_PINC_DISABLE LL_DMA_PERIPH_NOINCREMENT /*!< Peripheral increment mode Disable */ +/** + * @} + */ + +/** @defgroup DMA_Memory_incremented_mode DMA Memory incremented mode + * @{ + */ +#define DMA_MINC_ENABLE LL_DMA_MEMORY_INCREMENT /*!< Memory increment mode Enable */ +#define DMA_MINC_DISABLE LL_DMA_MEMORY_NOINCREMENT /*!< Memory increment mode Disable */ +/** + * @} + */ + +/** @defgroup DMA_Peripheral_data_size DMA Peripheral data size + * @{ + */ +#define DMA_PDATAALIGN_BYTE LL_DMA_PDATAALIGN_BYTE /*!< Peripheral data alignment : Byte */ +#define DMA_PDATAALIGN_HALFWORD LL_DMA_PDATAALIGN_HALFWORD /*!< Peripheral data alignment : HalfWord */ +#define DMA_PDATAALIGN_WORD LL_DMA_PDATAALIGN_WORD /*!< Peripheral data alignment : Word */ +/** + * @} + */ + +/** @defgroup DMA_Memory_data_size DMA Memory data size + * @{ + */ +#define DMA_MDATAALIGN_BYTE LL_DMA_MDATAALIGN_BYTE /*!< Memory data alignment : Byte */ +#define DMA_MDATAALIGN_HALFWORD LL_DMA_MDATAALIGN_HALFWORD /*!< Memory data alignment : HalfWord */ +#define DMA_MDATAALIGN_WORD LL_DMA_MDATAALIGN_WORD /*!< Memory data alignment : Word */ +/** + * @} + */ + +/** @defgroup DMA_mode DMA mode + * @{ + */ +#define DMA_NORMAL LL_DMA_MODE_NORMAL /*!< Normal mode */ +#define DMA_CIRCULAR LL_DMA_MODE_CIRCULAR /*!< Circular mode */ +/** + * @} + */ + +/** @defgroup DMA_Priority_level DMA Priority level + * @{ + */ +#define DMA_PRIORITY_LOW LL_DMA_PRIORITY_LOW /*!< Priority level : Low */ +#define DMA_PRIORITY_MEDIUM LL_DMA_PRIORITY_MEDIUM /*!< Priority level : Medium */ +#define DMA_PRIORITY_HIGH LL_DMA_PRIORITY_HIGH /*!< Priority level : High */ +#define DMA_PRIORITY_VERY_HIGH LL_DMA_PRIORITY_VERYHIGH /*!< Priority level : Very_High */ +/** + * @} + */ + + +/** @defgroup DMA_interrupt_enable_definitions DMA interrupt enable definitions + * @{ + */ +#define DMA_IT_TC LL_DMA_CCR_TCIE /*!< Transfer complete interrupt */ +#define DMA_IT_HT LL_DMA_CCR_HTIE /*!< Half Transfer interrupt */ +#define DMA_IT_TE LL_DMA_CCR_TEIE /*!< Transfer error interrupt */ +/** + * @} + */ + +/** @defgroup DMA_flag_definitions DMA flag definitions + * @{ + */ +#define DMA_FLAG_GL1 LL_DMA_ISR_GIF1 /*!< Channel 1 global flag */ +#define DMA_FLAG_TC1 LL_DMA_ISR_TCIF1 /*!< Channel 1 transfer complete flag */ +#define DMA_FLAG_HT1 LL_DMA_ISR_HTIF1 /*!< Channel 1 half transfer flag */ +#define DMA_FLAG_TE1 LL_DMA_ISR_TEIF1 /*!< Channel 1 transfer error flag */ +#define DMA_FLAG_GL2 LL_DMA_ISR_GIF2 /*!< Channel 2 global flag */ +#define DMA_FLAG_TC2 LL_DMA_ISR_TCIF2 /*!< Channel 2 transfer complete flag */ +#define DMA_FLAG_HT2 LL_DMA_ISR_HTIF2 /*!< Channel 2 half transfer flag */ +#define DMA_FLAG_TE2 LL_DMA_ISR_TEIF2 /*!< Channel 2 transfer error flag */ +#define DMA_FLAG_GL3 LL_DMA_ISR_GIF3 /*!< Channel 3 global flag */ +#define DMA_FLAG_TC3 LL_DMA_ISR_TCIF3 /*!< Channel 3 transfer complete flag */ +#define DMA_FLAG_HT3 LL_DMA_ISR_HTIF3 /*!< Channel 3 half transfer flag */ +#define DMA_FLAG_TE3 LL_DMA_ISR_TEIF3 /*!< Channel 3 transfer error flag */ +#define DMA_FLAG_GL4 LL_DMA_ISR_GIF4 /*!< Channel 4 global flag */ +#define DMA_FLAG_TC4 LL_DMA_ISR_TCIF4 /*!< Channel 4 transfer complete flag */ +#define DMA_FLAG_HT4 LL_DMA_ISR_HTIF4 /*!< Channel 4 half transfer flag */ +#define DMA_FLAG_TE4 LL_DMA_ISR_TEIF4 /*!< Channel 4 transfer error flag */ +#define DMA_FLAG_GL5 LL_DMA_ISR_GIF5 /*!< Channel 5 global flag */ +#define DMA_FLAG_TC5 LL_DMA_ISR_TCIF5 /*!< Channel 5 transfer complete flag */ +#define DMA_FLAG_HT5 LL_DMA_ISR_HTIF5 /*!< Channel 5 half transfer flag */ +#define DMA_FLAG_TE5 LL_DMA_ISR_TEIF5 /*!< Channel 5 transfer error flag */ +#define DMA_FLAG_GL6 LL_DMA_ISR_GIF6 /*!< Channel 6 global flag */ +#define DMA_FLAG_TC6 LL_DMA_ISR_TCIF6 /*!< Channel 6 transfer complete flag */ +#define DMA_FLAG_HT6 LL_DMA_ISR_HTIF6 /*!< Channel 6 half transfer flag */ +#define DMA_FLAG_TE6 LL_DMA_ISR_TEIF6 /*!< Channel 6 transfer error flag */ +#define DMA_FLAG_GL7 LL_DMA_ISR_GIF7 /*!< Channel 7 global flag */ +#define DMA_FLAG_TC7 LL_DMA_ISR_TCIF7 /*!< Channel 7 transfer complete flag */ +#define DMA_FLAG_HT7 LL_DMA_ISR_HTIF7 /*!< Channel 7 half transfer flag */ +#define DMA_FLAG_TE7 LL_DMA_ISR_TEIF7 /*!< Channel 7 transfer error flag */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ +/** @defgroup DMA_Exported_Macros DMA Exported Macros + * @{ + */ + +/** @brief Reset DMA handle state. + * @param __HANDLE__ DMA handle + * @retval None + */ +#define __HAL_DMA_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DMA_STATE_RESET) + +/** + * @brief Enable the specified DMA Channel. + * @param __HANDLE__ DMA handle + * @retval None + */ +#define __HAL_DMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CCR |= DMA_CCR_EN) + +/** + * @brief Disable the specified DMA Channel. + * @param __HANDLE__ DMA handle + * @retval None + */ +#define __HAL_DMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CCR &= ~DMA_CCR_EN) + + +/* Interrupt & Flag management */ + +/** + * @brief Return the current DMA Channel transfer complete flag. + * @param __HANDLE__ DMA handle + * @retval The specified transfer complete flag index. + */ + +#if defined(DMA2) +#define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \ + (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TC1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_TC1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TC2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_TC2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TC3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_TC3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TC4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_TC4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TC5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel5))? DMA_FLAG_TC5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TC6 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel6))? DMA_FLAG_TC6 :\ + DMA_FLAG_TC7) +#else +#define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \ + (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TC1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TC2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TC3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TC4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TC5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TC6 :\ + DMA_FLAG_TC7) +#endif /* DMA2 */ + +/** + * @brief Return the current DMA Channel half transfer complete flag. + * @param __HANDLE__ DMA handle + * @retval The specified half transfer complete flag index. + */ +#if defined(DMA2) +#define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\ + (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_HT1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_HT1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_HT2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_HT2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_HT3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_HT3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_HT4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_HT4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_HT5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel5))? DMA_FLAG_HT5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_HT6 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel6))? DMA_FLAG_HT6 :\ + DMA_FLAG_HT7) +#else +#define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\ + (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_HT1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_HT2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_HT3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_HT4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_HT5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_HT6 :\ + DMA_FLAG_HT7) +#endif /* DMA2 */ + +/** + * @brief Return the current DMA Channel transfer error flag. + * @param __HANDLE__ DMA handle + * @retval The specified transfer error flag index. + */ +#if defined(DMA2) +#define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\ + (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TE1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_FLAG_TE1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TE2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_FLAG_TE2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TE3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_FLAG_TE3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TE4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_FLAG_TE4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TE5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel5))? DMA_FLAG_TE5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TE6 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel6))? DMA_FLAG_TE6 :\ + DMA_FLAG_TE7) +#else +#define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\ + (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_FLAG_TE1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_FLAG_TE2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_FLAG_TE3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_FLAG_TE4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_FLAG_TE5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_FLAG_TE6 :\ + DMA_FLAG_TE7) +#endif /* DMA2 */ + +/** + * @brief Return the current DMA Channel Global interrupt flag. + * @param __HANDLE__ DMA handle + * @retval The specified transfer error flag index. + */ +#if defined(DMA2) +#define __HAL_DMA_GET_GI_FLAG_INDEX(__HANDLE__)\ + (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_ISR_GIF1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel1))? DMA_ISR_GIF1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_ISR_GIF2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel2))? DMA_ISR_GIF2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_ISR_GIF3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel3))? DMA_ISR_GIF3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_ISR_GIF4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel4))? DMA_ISR_GIF4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_ISR_GIF5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel5))? DMA_ISR_GIF5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_ISR_GIF6 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Channel6))? DMA_ISR_GIF6 :\ + DMA_ISR_GIF7) +#else +#define __HAL_DMA_GET_GI_FLAG_INDEX(__HANDLE__)\ + (((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel1))? DMA_ISR_GIF1 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel2))? DMA_ISR_GIF2 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel3))? DMA_ISR_GIF3 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel4))? DMA_ISR_GIF4 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel5))? DMA_ISR_GIF5 :\ + ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Channel6))? DMA_ISR_GIF6 :\ + DMA_ISR_GIF7) +#endif /* DMA2 */ + +/** + * @brief Get the DMA Channel pending flags. + * @param __HANDLE__ DMA handle + * @param __FLAG__ Get the specified flag. + * This parameter can be any combination of the following values: + * @arg DMA_FLAG_TCx: Transfer complete flag + * @arg DMA_FLAG_HTx: Half transfer complete flag + * @arg DMA_FLAG_TEx: Transfer error flag + * @arg DMA_FLAG_GLx: Global interrupt flag + * Where x can be from 1 to 7 to select the DMA Channel x flag. + * @retval The state of FLAG (SET or RESET). + */ +#if defined(DMA2) +#define __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__) (((uint32_t)((__HANDLE__)->Instance) > ((uint32_t)DMA1_Channel7))? \ + (DMA2->ISR & (__FLAG__)) : (DMA1->ISR & (__FLAG__))) +#else +#define __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__) (DMA1->ISR & (__FLAG__)) +#endif /* DMA2 */ + +/** + * @brief Clear the DMA Channel pending flags. + * @param __HANDLE__ DMA handle + * @param __FLAG__ specifies the flag to clear. + * This parameter can be any combination of the following values: + * @arg DMA_FLAG_TCx: Transfer complete flag + * @arg DMA_FLAG_HTx: Half transfer complete flag + * @arg DMA_FLAG_TEx: Transfer error flag + * @arg DMA_FLAG_GLx: Global interrupt flag + * Where x can be from 1 to 7 to select the DMA Channel x flag. + * @retval None + */ +#if defined(DMA2) +#define __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) (((uint32_t)((__HANDLE__)->Instance) > ((uint32_t)DMA1_Channel7))? \ + (DMA2->IFCR = (__FLAG__)) : (DMA1->IFCR = (__FLAG__))) +#else +#define __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) (DMA1->IFCR = (__FLAG__)) +#endif /* DMA2 */ + +/** + * @brief Enable the specified DMA Channel interrupts. + * @param __HANDLE__ DMA handle + * @param __INTERRUPT__ specifies the DMA interrupt sources to be enabled or disabled. + * This parameter can be any combination of the following values: + * @arg DMA_IT_TC: Transfer complete interrupt mask + * @arg DMA_IT_HT: Half transfer complete interrupt mask + * @arg DMA_IT_TE: Transfer error interrupt mask + * @retval None + */ +#define __HAL_DMA_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CCR |= (__INTERRUPT__)) + +/** + * @brief Disable the specified DMA Channel interrupts. + * @param __HANDLE__ DMA handle + * @param __INTERRUPT__ specifies the DMA interrupt sources to be enabled or disabled. + * This parameter can be any combination of the following values: + * @arg DMA_IT_TC: Transfer complete interrupt mask + * @arg DMA_IT_HT: Half transfer complete interrupt mask + * @arg DMA_IT_TE: Transfer error interrupt mask + * @retval None + */ +#define __HAL_DMA_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CCR &= ~(__INTERRUPT__)) + +/** + * @brief Check whether the specified DMA Channel interrupt is enabled or not. + * @param __HANDLE__ DMA handle + * @param __INTERRUPT__ specifies the DMA interrupt source to check. + * This parameter can be one of the following values: + * @arg DMA_IT_TC: Transfer complete interrupt mask + * @arg DMA_IT_HT: Half transfer complete interrupt mask + * @arg DMA_IT_TE: Transfer error interrupt mask + * @retval The state of DMA_IT (SET or RESET). + */ +#define __HAL_DMA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CCR & (__INTERRUPT__))) + +/** + * @brief Return the number of remaining data units in the current DMA Channel transfer. + * @param __HANDLE__ DMA handle + * @retval The number of remaining data units in the current DMA Channel transfer. + */ +#define __HAL_DMA_GET_COUNTER(__HANDLE__) ((__HANDLE__)->Instance->CNDTR) + +/** + * @} + */ + +/* Include DMA HAL Extension module */ +#include "stm32wbxx_hal_dma_ex.h" + +/* Exported functions --------------------------------------------------------*/ + +/** @addtogroup DMA_Exported_Functions + * @{ + */ + +/** @addtogroup DMA_Exported_Functions_Group1 + * @{ + */ +/* Initialization and de-initialization functions *****************************/ +HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma); +HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma); +/** + * @} + */ + +/** @addtogroup DMA_Exported_Functions_Group2 + * @{ + */ +/* IO operation functions *****************************************************/ +HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength); +HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, + uint32_t DataLength); +HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma); +HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma); +HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_LevelCompleteTypeDef CompleteLevel, + uint32_t Timeout); +void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma); +HAL_StatusTypeDef HAL_DMA_RegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID, void (* pCallback)(DMA_HandleTypeDef *_hdma)); +HAL_StatusTypeDef HAL_DMA_UnRegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID); + +/** + * @} + */ + +/** @addtogroup DMA_Exported_Functions_Group3 + * @{ + */ +/* Peripheral State and Error functions ***************************************/ +HAL_DMA_StateTypeDef HAL_DMA_GetState(DMA_HandleTypeDef *hdma); +uint32_t HAL_DMA_GetError(DMA_HandleTypeDef *hdma); +/** + * @} + */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup DMA_Private_Macros DMA Private Macros + * @{ + */ + +#define IS_DMA_DIRECTION(DIRECTION) (((DIRECTION) == DMA_PERIPH_TO_MEMORY ) || \ + ((DIRECTION) == DMA_MEMORY_TO_PERIPH) || \ + ((DIRECTION) == DMA_MEMORY_TO_MEMORY)) + +#define IS_DMA_BUFFER_SIZE(SIZE) (((SIZE) >= 0x1U) && ((SIZE) < 0x10000U)) + +#define IS_DMA_PERIPHERAL_INC_STATE(STATE) (((STATE) == DMA_PINC_ENABLE) || \ + ((STATE) == DMA_PINC_DISABLE)) + +#define IS_DMA_MEMORY_INC_STATE(STATE) (((STATE) == DMA_MINC_ENABLE) || \ + ((STATE) == DMA_MINC_DISABLE)) + + +#define IS_DMA_ALL_REQUEST(REQUEST) ((REQUEST) <= DMA_REQUEST_AES2_OUT) + +#define IS_DMA_PERIPHERAL_DATA_SIZE(SIZE) (((SIZE) == DMA_PDATAALIGN_BYTE) || \ + ((SIZE) == DMA_PDATAALIGN_HALFWORD) || \ + ((SIZE) == DMA_PDATAALIGN_WORD)) + +#define IS_DMA_MEMORY_DATA_SIZE(SIZE) (((SIZE) == DMA_MDATAALIGN_BYTE) || \ + ((SIZE) == DMA_MDATAALIGN_HALFWORD) || \ + ((SIZE) == DMA_MDATAALIGN_WORD )) + +#define IS_DMA_MODE(MODE) (((MODE) == DMA_NORMAL ) || \ + ((MODE) == DMA_CIRCULAR)) + +#define IS_DMA_PRIORITY(PRIORITY) (((PRIORITY) == DMA_PRIORITY_LOW ) || \ + ((PRIORITY) == DMA_PRIORITY_MEDIUM) || \ + ((PRIORITY) == DMA_PRIORITY_HIGH) || \ + ((PRIORITY) == DMA_PRIORITY_VERY_HIGH)) + +/** + * @} + */ + +/* Private functions ---------------------------------------------------------*/ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_DMA_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h new file mode 100644 index 0000000..e140e63 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_dma_ex.h @@ -0,0 +1,262 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_dma_ex.h + * @author MCD Application Team + * @brief Header file of DMA HAL extension module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_DMA_EX_H +#define STM32WBxx_HAL_DMA_EX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" +#include "stm32wbxx_ll_dmamux.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup DMAEx + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup DMAEx_Exported_Types DMAEx Exported Types + * @{ + */ + +/** + * @brief HAL DMA Synchro definition + */ + + +/** + * @brief HAL DMAMUX Synchronization configuration structure definition + */ +typedef struct +{ + uint32_t SyncSignalID; /*!< Specifies the synchronization signal gating the DMA request in periodic mode. + This parameter can be a value of @ref DMAEx_DMAMUX_SyncSignalID_selection */ + + uint32_t SyncPolarity; /*!< Specifies the polarity of the signal on which the DMA request is synchronized. + This parameter can be a value of @ref DMAEx_DMAMUX_SyncPolarity_selection */ + + FunctionalState SyncEnable; /*!< Specifies if the synchronization shall be enabled or disabled + This parameter can take the value ENABLE or DISABLE*/ + + FunctionalState EventEnable; /*!< Specifies if an event shall be generated once the RequestNumber is reached. + This parameter can take the value ENABLE or DISABLE */ + + uint32_t RequestNumber; /*!< Specifies the number of DMA request that will be authorized after a sync event + This parameter must be a number between Min_Data = 1 and Max_Data = 32 */ + + +} HAL_DMA_MuxSyncConfigTypeDef; + + +/** + * @brief HAL DMAMUX request generator parameters structure definition + */ +typedef struct +{ + uint32_t SignalID; /*!< Specifies the ID of the signal used for DMAMUX request generator + This parameter can be a value of @ref DMAEx_DMAMUX_SignalGeneratorID_selection */ + + uint32_t Polarity; /*!< Specifies the polarity of the signal on which the request is generated. + This parameter can be a value of @ref DMAEx_DMAMUX_RequestGeneneratorPolarity_selection */ + + uint32_t RequestNumber; /*!< Specifies the number of DMA request that will be generated after a signal event + This parameter must be a number between Min_Data = 1 and Max_Data = 32 */ + +} HAL_DMA_MuxRequestGeneratorConfigTypeDef; + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup DMAEx_Exported_Constants DMAEx Exported Constants + * @{ + */ + +/** @defgroup DMAEx_DMAMUX_SyncSignalID_selection DMAMUX SyncSignalID selection + * @{ + */ +#define HAL_DMAMUX1_SYNC_EXTI0 LL_DMAMUX_SYNC_EXTI_LINE0 /*!< Synchronization Signal is EXTI0 IT */ +#define HAL_DMAMUX1_SYNC_EXTI1 LL_DMAMUX_SYNC_EXTI_LINE1 /*!< Synchronization Signal is EXTI1 IT */ +#define HAL_DMAMUX1_SYNC_EXTI2 LL_DMAMUX_SYNC_EXTI_LINE2 /*!< Synchronization Signal is EXTI2 IT */ +#define HAL_DMAMUX1_SYNC_EXTI3 LL_DMAMUX_SYNC_EXTI_LINE3 /*!< Synchronization Signal is EXTI3 IT */ +#define HAL_DMAMUX1_SYNC_EXTI4 LL_DMAMUX_SYNC_EXTI_LINE4 /*!< Synchronization Signal is EXTI4 IT */ +#define HAL_DMAMUX1_SYNC_EXTI5 LL_DMAMUX_SYNC_EXTI_LINE5 /*!< Synchronization Signal is EXTI5 IT */ +#define HAL_DMAMUX1_SYNC_EXTI6 LL_DMAMUX_SYNC_EXTI_LINE6 /*!< Synchronization Signal is EXTI6 IT */ +#define HAL_DMAMUX1_SYNC_EXTI7 LL_DMAMUX_SYNC_EXTI_LINE7 /*!< Synchronization Signal is EXTI7 IT */ +#define HAL_DMAMUX1_SYNC_EXTI8 LL_DMAMUX_SYNC_EXTI_LINE8 /*!< Synchronization Signal is EXTI8 IT */ +#define HAL_DMAMUX1_SYNC_EXTI9 LL_DMAMUX_SYNC_EXTI_LINE9 /*!< Synchronization Signal is EXTI9 IT */ +#define HAL_DMAMUX1_SYNC_EXTI10 LL_DMAMUX_SYNC_EXTI_LINE10 /*!< Synchronization Signal is EXTI10 IT */ +#define HAL_DMAMUX1_SYNC_EXTI11 LL_DMAMUX_SYNC_EXTI_LINE11 /*!< Synchronization Signal is EXTI11 IT */ +#define HAL_DMAMUX1_SYNC_EXTI12 LL_DMAMUX_SYNC_EXTI_LINE12 /*!< Synchronization Signal is EXTI12 IT */ +#define HAL_DMAMUX1_SYNC_EXTI13 LL_DMAMUX_SYNC_EXTI_LINE13 /*!< Synchronization Signal is EXTI13 IT */ +#define HAL_DMAMUX1_SYNC_EXTI14 LL_DMAMUX_SYNC_EXTI_LINE14 /*!< Synchronization Signal is EXTI14 IT */ +#define HAL_DMAMUX1_SYNC_EXTI15 LL_DMAMUX_SYNC_EXTI_LINE15 /*!< Synchronization Signal is EXTI15 IT */ +#define HAL_DMAMUX1_SYNC_DMAMUX1_CH0_EVT LL_DMAMUX_SYNC_DMAMUX_CH0 /*!< Synchronization Signal is DMAMUX1 Channel0 Event */ +#define HAL_DMAMUX1_SYNC_DMAMUX1_CH1_EVT LL_DMAMUX_SYNC_DMAMUX_CH1 /*!< Synchronization Signal is DMAMUX1 Channel1 Event */ +#define HAL_DMAMUX1_SYNC_LPTIM1_OUT LL_DMAMUX_SYNC_LPTIM1_OUT /*!< Synchronization Signal is LPTIM1 OUT */ +#define HAL_DMAMUX1_SYNC_LPTIM2_OUT LL_DMAMUX_SYNC_LPTIM2_OUT /*!< Synchronization Signal is LPTIM2 OUT */ + +/** + * @} + */ + +/** @defgroup DMAEx_DMAMUX_SyncPolarity_selection DMAMUX SyncPolarity selection + * @{ + */ +#define HAL_DMAMUX_SYNC_NO_EVENT LL_DMAMUX_SYNC_NO_EVENT /*!< block synchronization events */ +#define HAL_DMAMUX_SYNC_RISING LL_DMAMUX_SYNC_POL_RISING /*!< synchronize with rising edge events */ +#define HAL_DMAMUX_SYNC_FALLING LL_DMAMUX_SYNC_POL_FALLING /*!< synchronize with falling edge events */ +#define HAL_DMAMUX_SYNC_RISING_FALLING LL_DMAMUX_SYNC_POL_RISING_FALLING /*!< synchronize with rising and falling edge events */ + +/** + * @} + */ + +/** @defgroup DMAEx_DMAMUX_SignalGeneratorID_selection DMAMUX SignalGeneratorID selection + * @{ + */ +#define HAL_DMAMUX1_REQ_GEN_EXTI0 LL_DMAMUX_REQ_GEN_EXTI_LINE0 /*!< Request generator Signal is EXTI0 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI1 LL_DMAMUX_REQ_GEN_EXTI_LINE1 /*!< Request generator Signal is EXTI1 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI2 LL_DMAMUX_REQ_GEN_EXTI_LINE2 /*!< Request generator Signal is EXTI2 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI3 LL_DMAMUX_REQ_GEN_EXTI_LINE3 /*!< Request generator Signal is EXTI3 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI4 LL_DMAMUX_REQ_GEN_EXTI_LINE4 /*!< Request generator Signal is EXTI4 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI5 LL_DMAMUX_REQ_GEN_EXTI_LINE5 /*!< Request generator Signal is EXTI5 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI6 LL_DMAMUX_REQ_GEN_EXTI_LINE6 /*!< Request generator Signal is EXTI6 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI7 LL_DMAMUX_REQ_GEN_EXTI_LINE7 /*!< Request generator Signal is EXTI7 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI8 LL_DMAMUX_REQ_GEN_EXTI_LINE8 /*!< Request generator Signal is EXTI8 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI9 LL_DMAMUX_REQ_GEN_EXTI_LINE9 /*!< Request generator Signal is EXTI9 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI10 LL_DMAMUX_REQ_GEN_EXTI_LINE10 /*!< Request generator Signal is EXTI10 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI11 LL_DMAMUX_REQ_GEN_EXTI_LINE11 /*!< Request generator Signal is EXTI11 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI12 LL_DMAMUX_REQ_GEN_EXTI_LINE12 /*!< Request generator Signal is EXTI12 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI13 LL_DMAMUX_REQ_GEN_EXTI_LINE13 /*!< Request generator Signal is EXTI13 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI14 LL_DMAMUX_REQ_GEN_EXTI_LINE14 /*!< Request generator Signal is EXTI14 IT */ +#define HAL_DMAMUX1_REQ_GEN_EXTI15 LL_DMAMUX_REQ_GEN_EXTI_LINE15 /*!< Request generator Signal is EXTI15 IT */ +#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH0_EVT LL_DMAMUX_REQ_GEN_DMAMUX_CH0 /*!< Request generator Signal is DMAMUX1 Channel0 Event */ +#define HAL_DMAMUX1_REQ_GEN_DMAMUX1_CH1_EVT LL_DMAMUX_REQ_GEN_DMAMUX_CH1 /*!< Request generator Signal is DMAMUX1 Channel1 Event */ +#define HAL_DMAMUX1_REQ_GEN_LPTIM1_OUT LL_DMAMUX_REQ_GEN_LPTIM1_OUT /*!< Request generator Signal is LPTIM1 OUT */ +#define HAL_DMAMUX1_REQ_GEN_LPTIM2_OUT LL_DMAMUX_REQ_GEN_LPTIM2_OUT /*!< Request generator Signal is LPTIM2 OUT */ + +/** + * @} + */ + +/** @defgroup DMAEx_DMAMUX_RequestGeneneratorPolarity_selection DMAMUX RequestGeneneratorPolarity selection + * @{ + */ +#define HAL_DMAMUX_REQ_GEN_NO_EVENT LL_DMAMUX_REQ_GEN_NO_EVENT /*!< block request generator events */ +#define HAL_DMAMUX_REQ_GEN_RISING LL_DMAMUX_REQ_GEN_POL_RISING /*!< generate request on rising edge events */ +#define HAL_DMAMUX_REQ_GEN_FALLING LL_DMAMUX_REQ_GEN_POL_FALLING /*!< generate request on falling edge events */ +#define HAL_DMAMUX_REQ_GEN_RISING_FALLING LL_DMAMUX_REQ_GEN_POL_RISING_FALLING /*!< generate request on rising and falling edge events */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup DMAEx_Exported_Functions + * @{ + */ + +/* IO operation functions *****************************************************/ +/** @addtogroup DMAEx_Exported_Functions_Group1 + * @{ + */ + +/* ------------------------- REQUEST -----------------------------------------*/ +HAL_StatusTypeDef HAL_DMAEx_ConfigMuxRequestGenerator(DMA_HandleTypeDef *hdma, + HAL_DMA_MuxRequestGeneratorConfigTypeDef *pRequestGeneratorConfig); +HAL_StatusTypeDef HAL_DMAEx_EnableMuxRequestGenerator(DMA_HandleTypeDef *hdma); +HAL_StatusTypeDef HAL_DMAEx_DisableMuxRequestGenerator(DMA_HandleTypeDef *hdma); +/* -------------------------------------------------------------------------- */ + +/* ------------------------- SYNCHRO -----------------------------------------*/ +HAL_StatusTypeDef HAL_DMAEx_ConfigMuxSync(DMA_HandleTypeDef *hdma, HAL_DMA_MuxSyncConfigTypeDef *pSyncConfig); +/* -------------------------------------------------------------------------- */ + +void HAL_DMAEx_MUX_IRQHandler(DMA_HandleTypeDef *hdma); + +/** + * @} + */ + +/** + * @} + */ + + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup DMAEx_Private_Macros DMAEx Private Macros + * @brief DMAEx private macros + * @{ + */ + +#define IS_DMAMUX_SYNC_SIGNAL_ID(SIGNAL_ID) ((SIGNAL_ID) <= HAL_DMAMUX1_SYNC_LPTIM2_OUT) + +#define IS_DMAMUX_SYNC_REQUEST_NUMBER(REQUEST_NUMBER) (((REQUEST_NUMBER) > 0U) && ((REQUEST_NUMBER) <= 32U)) + +#define IS_DMAMUX_SYNC_POLARITY(POLARITY) (((POLARITY) == HAL_DMAMUX_SYNC_NO_EVENT) || \ + ((POLARITY) == HAL_DMAMUX_SYNC_RISING) || \ + ((POLARITY) == HAL_DMAMUX_SYNC_FALLING) || \ + ((POLARITY) == HAL_DMAMUX_SYNC_RISING_FALLING)) + +#define IS_DMAMUX_SYNC_STATE(SYNC) (((SYNC) == DISABLE) || ((SYNC) == ENABLE)) + +#define IS_DMAMUX_SYNC_EVENT(EVENT) (((EVENT) == DISABLE) || \ + ((EVENT) == ENABLE)) + +#define IS_DMAMUX_REQUEST_GEN_SIGNAL_ID(SIGNAL_ID) ((SIGNAL_ID) <= HAL_DMAMUX1_REQ_GEN_LPTIM2_OUT) + +#define IS_DMAMUX_REQUEST_GEN_REQUEST_NUMBER(REQUEST_NUMBER) (((REQUEST_NUMBER) > 0U) && ((REQUEST_NUMBER) <= 32U)) + +#define IS_DMAMUX_REQUEST_GEN_POLARITY(POLARITY) (((POLARITY) == HAL_DMAMUX_REQ_GEN_NO_EVENT) || \ + ((POLARITY) == HAL_DMAMUX_REQ_GEN_RISING) || \ + ((POLARITY) == HAL_DMAMUX_REQ_GEN_FALLING) || \ + ((POLARITY) == HAL_DMAMUX_REQ_GEN_RISING_FALLING)) + +/** + * @} + */ + + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_DMA_EX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h new file mode 100644 index 0000000..a586d2d --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_exti.h @@ -0,0 +1,363 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_exti.h + * @author MCD Application Team + * @brief Header file of EXTI HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_EXTI_H +#define STM32WBxx_HAL_EXTI_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup EXTI EXTI + * @brief EXTI HAL module driver + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ + +/** @defgroup EXTI_Exported_Types EXTI Exported Types + * @{ + */ +typedef enum +{ + HAL_EXTI_COMMON_CB_ID = 0x00U, +} EXTI_CallbackIDTypeDef; + + +/** + * @brief EXTI Handle structure definition + */ +typedef struct +{ + uint32_t Line; /*!< Exti line number */ + void (* PendingCallback)(void); /*!< Exti pending callback */ +} EXTI_HandleTypeDef; + +/** + * @brief EXTI Configuration structure definition + */ +typedef struct +{ + uint32_t Line; /*!< The Exti line to be configured. This parameter + can be a value of @ref EXTI_Line */ + uint32_t Mode; /*!< The Exit Mode to be configured for a core. + This parameter can be a combination of @ref EXTI_Mode */ + uint32_t Trigger; /*!< The Exti Trigger to be configured. This parameter + can be a value of @ref EXTI_Trigger */ + uint32_t GPIOSel; /*!< The Exti GPIO multiplexer selection to be configured. + This parameter is only possible for line 0 to 15. It + can be a value of @ref EXTI_GPIOSel */ +} EXTI_ConfigTypeDef; + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup EXTI_Exported_Constants EXTI Exported Constants + * @{ + */ + +/** @defgroup EXTI_Line EXTI Line + * @{ + */ +#define EXTI_LINE_0 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x00u) +#define EXTI_LINE_1 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x01u) +#define EXTI_LINE_2 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x02u) +#define EXTI_LINE_3 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x03u) +#define EXTI_LINE_4 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x04u) +#define EXTI_LINE_5 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x05u) +#define EXTI_LINE_6 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x06u) +#define EXTI_LINE_7 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x07u) +#define EXTI_LINE_8 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x08u) +#define EXTI_LINE_9 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x09u) +#define EXTI_LINE_10 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x0Au) +#define EXTI_LINE_11 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x0Bu) +#define EXTI_LINE_12 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x0Cu) +#define EXTI_LINE_13 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x0Du) +#define EXTI_LINE_14 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x0Eu) +#define EXTI_LINE_15 (EXTI_GPIO | EXTI_EVENT | EXTI_REG1 | 0x0Fu) +#define EXTI_LINE_16 (EXTI_CONFIG | EXTI_REG1 | 0x10u) +#define EXTI_LINE_17 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG1 | 0x11u) +#define EXTI_LINE_18 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG1 | 0x12u) +#define EXTI_LINE_19 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG1 | 0x13u) +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) || defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define EXTI_LINE_20 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG1 | 0x14u) +#else +#define EXTI_LINE_20 (EXTI_RESERVED | EXTI_REG1 | 0x14u) +#endif /* STM32WB55xx || STM32WB5Mxx || ... */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) +#define EXTI_LINE_21 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG1 | 0x15u) +#else +#define EXTI_LINE_21 (EXTI_RESERVED | EXTI_REG1 | 0x15u) +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ +#define EXTI_LINE_22 (EXTI_DIRECT | EXTI_REG1 | 0x16u) +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) +#define EXTI_LINE_23 (EXTI_DIRECT | EXTI_REG1 | 0x17u) +#else +#define EXTI_LINE_23 (EXTI_RESERVED | EXTI_REG1 | 0x17u) +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ +#define EXTI_LINE_24 (EXTI_DIRECT | EXTI_REG1 | 0x18u) +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) || defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define EXTI_LINE_25 (EXTI_DIRECT | EXTI_REG1 | 0x19u) +#else +#define EXTI_LINE_25 (EXTI_RESERVED | EXTI_REG1 | 0x19u) +#endif /* STM32WB55xx || STM32WB5Mxx || ... */ +#define EXTI_LINE_26 (EXTI_RESERVED | EXTI_REG1 | 0x1Au) +#define EXTI_LINE_27 (EXTI_RESERVED | EXTI_REG1 | 0x1Bu) +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) +#define EXTI_LINE_28 (EXTI_DIRECT | EXTI_REG1 | 0x1Cu) +#else +#define EXTI_LINE_28 (EXTI_RESERVED | EXTI_REG1 | 0x1Cu) +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ +#define EXTI_LINE_29 (EXTI_DIRECT | EXTI_REG1 | 0x1Du) +#define EXTI_LINE_30 (EXTI_DIRECT | EXTI_REG1 | 0x1Eu) +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) || defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define EXTI_LINE_31 (EXTI_CONFIG | EXTI_REG1 | 0x1Fu) +#else +#define EXTI_LINE_31 (EXTI_RESERVED | EXTI_REG1 | 0x1Fu) +#endif /* STM32WB55xx || STM32WB5Mxx || ... */ +#define EXTI_LINE_32 (EXTI_RESERVED | EXTI_REG2 | 0x00u) +#define EXTI_LINE_33 (EXTI_CONFIG | EXTI_REG2 | 0x01u) +#define EXTI_LINE_34 (EXTI_RESERVED | EXTI_REG2 | 0x02u) +#define EXTI_LINE_35 (EXTI_RESERVED | EXTI_REG2 | 0x03u) +#define EXTI_LINE_36 (EXTI_DIRECT | EXTI_REG2 | 0x04u) +#define EXTI_LINE_37 (EXTI_DIRECT | EXTI_REG2 | 0x05u) +#define EXTI_LINE_38 (EXTI_DIRECT | EXTI_REG2 | 0x06u) +#define EXTI_LINE_39 (EXTI_DIRECT | EXTI_REG2 | 0x07u) +#define EXTI_LINE_40 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG2 | 0x08u) +#define EXTI_LINE_41 (EXTI_CONFIG | EXTI_EVENT | EXTI_REG2 | 0x09u) +#define EXTI_LINE_42 (EXTI_DIRECT | EXTI_REG2 | 0x0Au) +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) +#define EXTI_LINE_43 (EXTI_DIRECT | EXTI_REG2 | 0x0Bu) +#else +#define EXTI_LINE_43 (EXTI_RESERVED | EXTI_REG2 | 0x0Bu) +#endif /* STM32WB55xx || STM32WB5Mxx */ +#define EXTI_LINE_44 (EXTI_DIRECT | EXTI_REG2 | 0x0Cu) +#define EXTI_LINE_45 (EXTI_DIRECT | EXTI_REG2 | 0x0Du) +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB50xx) || defined (STM32WB35xx) || defined (STM32WB30xx) +#define EXTI_LINE_46 (EXTI_DIRECT | EXTI_REG2 | 0x0Eu) +#else +#define EXTI_LINE_46 (EXTI_RESERVED | EXTI_REG2 | 0x0Eu) +#endif /* STM32WB55xx || STM32WB5Mxx || ... */ +#define EXTI_LINE_47 (EXTI_RESERVED | EXTI_REG2 | 0x0Fu) +#define EXTI_LINE_48 (EXTI_DIRECT | EXTI_REG2 | 0x10u) +/** + * @} + */ + +/** @defgroup EXTI_Mode EXTI Mode + * @{ + */ +#define EXTI_MODE_NONE 0x00000000u +#define EXTI_MODE_INTERRUPT 0x00000001u +#define EXTI_MODE_EVENT 0x00000002u +/** + * @} + */ + +/** @defgroup EXTI_Trigger EXTI Trigger + * @{ + */ +#define EXTI_TRIGGER_NONE 0x00000000u +#define EXTI_TRIGGER_RISING 0x00000001u +#define EXTI_TRIGGER_FALLING 0x00000002u +#define EXTI_TRIGGER_RISING_FALLING (EXTI_TRIGGER_RISING | EXTI_TRIGGER_FALLING) +/** + * @} + */ + +/** @defgroup EXTI_GPIOSel EXTI GPIOSel + * @brief + * @{ + */ +#define EXTI_GPIOA 0x00000000u +#define EXTI_GPIOB 0x00000001u +#define EXTI_GPIOC 0x00000002u +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) +#define EXTI_GPIOD 0x00000003u +#endif /* STM32WB55xx || STM32WB5Mxx */ +#define EXTI_GPIOE 0x00000004u +#define EXTI_GPIOH 0x00000007u +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup EXTI_Exported_Macros EXTI Exported Macros + * @{ + */ + +/** + * @} + */ + +/* Private constants --------------------------------------------------------*/ +/** @defgroup EXTI_Private_Constants EXTI Private Constants + * @{ + */ +/** + * @brief EXTI Line property definition + */ +#define EXTI_PROPERTY_SHIFT 24u +#define EXTI_DIRECT (0x01uL << EXTI_PROPERTY_SHIFT) +#define EXTI_CONFIG (0x02uL << EXTI_PROPERTY_SHIFT) +#define EXTI_GPIO ((0x04uL << EXTI_PROPERTY_SHIFT) | EXTI_CONFIG) +#define EXTI_RESERVED (0x08uL << EXTI_PROPERTY_SHIFT) +#define EXTI_PROPERTY_MASK (EXTI_DIRECT | EXTI_CONFIG | EXTI_GPIO) + +/** + * @brief EXTI Event presence definition + */ +#define EXTI_EVENT_PRESENCE_SHIFT 28u +#define EXTI_EVENT (0x01uL << EXTI_EVENT_PRESENCE_SHIFT) +#define EXTI_EVENT_PRESENCE_MASK (EXTI_EVENT) + +/** + * @brief EXTI Register and bit usage + */ +#define EXTI_REG_SHIFT 16u +#define EXTI_REG1 (0x00uL << EXTI_REG_SHIFT) +#define EXTI_REG2 (0x01uL << EXTI_REG_SHIFT) +#define EXTI_REG_MASK (EXTI_REG1 | EXTI_REG2) +#define EXTI_PIN_MASK 0x0000001Fu + +/** + * @brief EXTI Mask for interrupt & event mode + */ +#define EXTI_MODE_MASK (EXTI_MODE_EVENT | EXTI_MODE_INTERRUPT) + +/** + * @brief EXTI Mask for trigger possibilities + */ +#define EXTI_TRIGGER_MASK (EXTI_TRIGGER_RISING | EXTI_TRIGGER_FALLING) + +/** + * @brief EXTI Line number + */ +#define EXTI_LINE_NB 49uL + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup EXTI_Private_Macros EXTI Private Macros + * @{ + */ +#define IS_EXTI_LINE(__EXTI_LINE__) ((((__EXTI_LINE__) & ~(EXTI_PROPERTY_MASK | EXTI_EVENT_PRESENCE_MASK | EXTI_REG_MASK | EXTI_PIN_MASK)) == 0x00u) && \ + ((((__EXTI_LINE__) & EXTI_PROPERTY_MASK) == EXTI_DIRECT) || \ + (((__EXTI_LINE__) & EXTI_PROPERTY_MASK) == EXTI_CONFIG) || \ + (((__EXTI_LINE__) & EXTI_PROPERTY_MASK) == EXTI_GPIO)) && \ + (((__EXTI_LINE__) & (EXTI_REG_MASK | EXTI_PIN_MASK)) < \ + (((EXTI_LINE_NB / 32u) << EXTI_REG_SHIFT) | (EXTI_LINE_NB % 32u)))) + +#define IS_EXTI_MODE(__EXTI_LINE__) ((((__EXTI_LINE__) & EXTI_MODE_MASK) != 0x00u) && \ + (((__EXTI_LINE__) & ~EXTI_MODE_MASK) == 0x00u)) + +#define IS_EXTI_TRIGGER(__EXTI_LINE__) (((__EXTI_LINE__) & ~EXTI_TRIGGER_MASK) == 0x00u) + +#define IS_EXTI_PENDING_EDGE(__EXTI_LINE__) ((__EXTI_LINE__) == EXTI_TRIGGER_RISING_FALLING) + +#define IS_EXTI_CONFIG_LINE(__EXTI_LINE__) (((__EXTI_LINE__) & EXTI_CONFIG) != 0x00u) + +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) +#define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ + ((__PORT__) == EXTI_GPIOB) || \ + ((__PORT__) == EXTI_GPIOC) || \ + ((__PORT__) == EXTI_GPIOD) || \ + ((__PORT__) == EXTI_GPIOE) || \ + ((__PORT__) == EXTI_GPIOH)) +#else +#define IS_EXTI_GPIO_PORT(__PORT__) (((__PORT__) == EXTI_GPIOA) || \ + ((__PORT__) == EXTI_GPIOB) || \ + ((__PORT__) == EXTI_GPIOC) || \ + ((__PORT__) == EXTI_GPIOE) || \ + ((__PORT__) == EXTI_GPIOH)) +#endif /* STM32WB55xx || STM32WB5Mxx */ + +#define IS_EXTI_GPIO_PIN(__PIN__) ((__PIN__) < 16u) + +/** + * @} + */ + + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup EXTI_Exported_Functions EXTI Exported Functions + * @brief EXTI Exported Functions + * @{ + */ + +/** @defgroup EXTI_Exported_Functions_Group1 Configuration functions + * @brief Configuration functions + * @{ + */ +/* Configuration functions ****************************************************/ +HAL_StatusTypeDef HAL_EXTI_SetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig); +HAL_StatusTypeDef HAL_EXTI_GetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig); +HAL_StatusTypeDef HAL_EXTI_ClearConfigLine(EXTI_HandleTypeDef *hexti); +HAL_StatusTypeDef HAL_EXTI_RegisterCallback(EXTI_HandleTypeDef *hexti, EXTI_CallbackIDTypeDef CallbackID, void (*pPendingCbfn)(void)); +HAL_StatusTypeDef HAL_EXTI_GetHandle(EXTI_HandleTypeDef *hexti, uint32_t ExtiLine); +/** + * @} + */ + +/** @defgroup EXTI_Exported_Functions_Group2 IO operation functions + * @brief IO operation functions + * @{ + */ +/* IO operation functions *****************************************************/ +void HAL_EXTI_IRQHandler(EXTI_HandleTypeDef *hexti); +uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge); +void HAL_EXTI_ClearPending(EXTI_HandleTypeDef *hexti, uint32_t Edge); +void HAL_EXTI_GenerateSWI(EXTI_HandleTypeDef *hexti); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_EXTI_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h new file mode 100644 index 0000000..012de76 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash.h @@ -0,0 +1,1003 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_flash.h + * @author MCD Application Team + * @brief Header file of FLASH HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_FLASH_H +#define STM32WBxx_HAL_FLASH_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup FLASH + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup FLASH_Exported_Types FLASH Exported Types + * @{ + */ + +/** + * @brief FLASH Erase structure definition + */ +typedef struct +{ + uint32_t TypeErase; /*!< Page erase. + This parameter can be a value of @ref FLASH_TYPE_ERASE */ + uint32_t Page; /*!< Initial Flash page to erase when page erase is enabled + This parameter must be a value between 0 and (FLASH_PAGE_NB - 1) */ + uint32_t NbPages; /*!< Number of pages to be erased. + This parameter must be a value between 1 and (FLASH_PAGE_NB - value of initial page)*/ +} FLASH_EraseInitTypeDef; + +/** + * @brief FLASH Option Bytes Program structure definition + */ +typedef struct +{ + uint32_t OptionType; /*!< Option byte to be configured. + This parameter can be a combination of the values of @ref FLASH_OB_TYPE */ + uint32_t WRPArea; /*!< Write protection area to be programmed (used for OPTIONBYTE_WRP). + Only one WRP area could be programmed at the same time. + This parameter can be value of @ref FLASH_OB_WRP_AREA */ + uint32_t WRPStartOffset; /*!< Write protection start offset (used for OPTIONBYTE_WRP). + This parameter must be a value between 0 and (max number of pages - 1) */ + uint32_t WRPEndOffset; /*!< Write protection end offset (used for OPTIONBYTE_WRP). + This parameter must be a value between WRPStartOffset and (max number of pages - 1) */ + uint32_t RDPLevel; /*!< Set the read protection level (used for OPTIONBYTE_RDP). + This parameter can be a value of @ref FLASH_OB_READ_PROTECTION */ + uint32_t UserType; /*!< User option byte(s) to be configured (used for OPTIONBYTE_USER). + This parameter can be a combination of @ref FLASH_OB_USER_TYPE */ + uint32_t UserConfig; /*!< Value of the user option byte (used for OPTIONBYTE_USER). + This parameter can be a combination of the values of + @ref FLASH_OB_USER_AGC_TRIM, @ref FLASH_OB_USER_BOR_LEVEL + @ref FLASH_OB_USER_RESET_CONFIG(*), @ref FLASH_OB_USER_INPUT_RESET_HOLDER(*) + @ref FLASH_OB_USER_nRST_STOP, @ref FLASH_OB_USER_nRST_STANDBY, + @ref FLASH_OB_USER_nRST_SHUTDOWN, @ref FLASH_OB_USER_IWDG_SW, + @ref FLASH_OB_USER_IWDG_STOP, @ref FLASH_OB_USER_IWDG_STANDBY, + @ref FLASH_OB_USER_WWDG_SW, @ref FLASH_OB_USER_nBOOT1, + @ref FLASH_OB_USER_SRAM2PE, @ref FLASH_OB_USER_SRAM2RST, + @ref FLASH_OB_USER_nSWBOOT0, @ref FLASH_OB_USER_nBOOT0 */ + uint32_t PCROPConfig; /*!< Configuration of the PCROP (used for OPTIONBYTE_PCROP). + This parameter must be a combination of values of @ref FLASH_OB_PCROP_ZONE + and @ref FLASH_OB_PCROP_RDP */ + uint32_t PCROP1AStartAddr; /*!< PCROP Zone A Start address (used for OPTIONBYTE_PCROP). It represents first address of start block + to protect. Make sure this parameter is multiple of PCROP granularity */ + uint32_t PCROP1AEndAddr; /*!< PCROP Zone A End address (used for OPTIONBYTE_PCROP). It represents first address of end block + to protect. Make sure this parameter is multiple of PCROP granularity */ + uint32_t PCROP1BStartAddr; /*!< PCROP Zone B Start address (used for OPTIONBYTE_PCROP). It represents first address of start block + to protect. Make sure this parameter is multiple of PCROP granularity */ + uint32_t PCROP1BEndAddr; /*!< PCROP Zone B End address (used for OPTIONBYTE_PCROP). It represents first address of end block + to protect. Make sure this parameter is multiple of PCROP granularity */ + uint32_t SecureFlashStartAddr; /*!< Secure Flash start address (used for OPTIONBYTE_SECURE_MODE). + This parameter must be a value between begin and end of Flash bank + => Contains the start address of the first 4kB page of the secure Flash area */ + uint32_t SecureRAM2aStartAddr; /*!< Secure Backup RAM2a start address (used for OPTIONBYTE_SECURE_MODE). + This parameter can be a value of @ref FLASH_SRAM2A_ADDRESS_RANGE */ + uint32_t SecureRAM2bStartAddr; /*!< Secure non-Backup RAM2b start address (used for OPTIONBYTE_SECURE_MODE) + This parameter can be a value of @ref FLASH_SRAM2B_ADDRESS_RANGE */ + uint32_t SecureMode; /*!< Secure mode activated or deactivated. + This parameter can be a value of @ref FLASH_OB_SECURITY_MODE */ + uint32_t C2BootRegion; /*!< CPU2 Secure Boot memory region(used for OPTIONBYTE_C2_BOOT_VECT). + This parameter can be a value of @ref FLASH_C2_OB_BOOT_REGION */ + uint32_t C2SecureBootVectAddr; /*!< CPU2 Secure Boot reset vector (used for OPTIONBYTE_C2_BOOT_VECT). + This parameter contains the CPU2 boot reset start address within + the selected memory region. Make sure this parameter is word aligned. */ + uint32_t IPCCdataBufAddr; /*!< IPCC mailbox data buffer base address (used for OPTIONBYTE_IPCC_BUF_ADDR). + This parameter contains the IPCC mailbox data buffer start address area in SRAM2. + Make sure this parameter is double-word aligned. */ +} FLASH_OBProgramInitTypeDef; + +/** + * @brief FLASH handle Structure definition + */ +typedef struct +{ + HAL_LockTypeDef Lock; /* FLASH locking object */ + uint32_t ErrorCode; /* FLASH error code */ + uint32_t ProcedureOnGoing; /* Internal variable to indicate which procedure is ongoing or not in IT context */ + uint32_t Address; /* Internal variable to save address selected for program in IT context */ + uint32_t Page; /* Internal variable to define the current page which is erasing in IT context */ + uint32_t NbPagesToErase; /* Internal variable to save the remaining pages to erase in IT context */ +} FLASH_ProcessTypeDef; + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup FLASH_Exported_Constants FLASH Exported Constants + * @{ + */ + +/** @defgroup FLASH_KEYS FLASH Keys + * @{ + */ +#define FLASH_KEY1 0x45670123U /*!< Flash key1 */ +#define FLASH_KEY2 0xCDEF89ABU /*!< Flash key2: used with FLASH_KEY1 + to unlock the FLASH registers access */ + +#define FLASH_OPTKEY1 0x08192A3BU /*!< Flash option byte key1 */ +#define FLASH_OPTKEY2 0x4C5D6E7FU /*!< Flash option byte key2: used with FLASH_OPTKEY1 + to allow option bytes operations */ +/** + * @} + */ + +/** @defgroup FLASH_LATENCY FLASH Latency + * @{ + */ +#define FLASH_LATENCY_0 FLASH_ACR_LATENCY_0WS /*!< FLASH Zero wait state */ +#define FLASH_LATENCY_1 FLASH_ACR_LATENCY_1WS /*!< FLASH One wait state */ +#define FLASH_LATENCY_2 FLASH_ACR_LATENCY_2WS /*!< FLASH Two wait states */ +#define FLASH_LATENCY_3 FLASH_ACR_LATENCY_3WS /*!< FLASH Three wait states */ +/** + * @} + */ + +/** @defgroup FLASH_FLAGS FLASH Flags Definition + * @{ + */ +#define FLASH_FLAG_EOP FLASH_SR_EOP /*!< FLASH End of operation flag */ +#define FLASH_FLAG_OPERR FLASH_SR_OPERR /*!< FLASH Operation error flag */ +#define FLASH_FLAG_PROGERR FLASH_SR_PROGERR /*!< FLASH Programming error flag */ +#define FLASH_FLAG_WRPERR FLASH_SR_WRPERR /*!< FLASH Write protection error flag */ +#define FLASH_FLAG_PGAERR FLASH_SR_PGAERR /*!< FLASH Programming alignment error flag */ +#define FLASH_FLAG_SIZERR FLASH_SR_SIZERR /*!< FLASH Size error flag */ +#define FLASH_FLAG_PGSERR FLASH_SR_PGSERR /*!< FLASH Programming sequence error flag */ +#define FLASH_FLAG_MISERR FLASH_SR_MISERR /*!< FLASH Fast programming data miss error flag */ +#define FLASH_FLAG_FASTERR FLASH_SR_FASTERR /*!< FLASH Fast programming error flag */ +#define FLASH_FLAG_OPTNV FLASH_SR_OPTNV /*!< FLASH User Option OPTVAL indication */ +#define FLASH_FLAG_RDERR FLASH_SR_RDERR /*!< FLASH PCROP read error flag */ +#define FLASH_FLAG_OPTVERR FLASH_SR_OPTVERR /*!< FLASH Option validity error flag */ +#define FLASH_FLAG_BSY FLASH_SR_BSY /*!< FLASH Busy flag */ +#define FLASH_FLAG_CFGBSY FLASH_SR_CFGBSY /*!< FLASH Programming/erase configuration busy */ +#define FLASH_FLAG_PESD FLASH_SR_PESD /*!< FLASH Programming/erase operation suspended */ +#define FLASH_FLAG_ECCC FLASH_ECCR_ECCC /*!< FLASH ECC correction */ +#define FLASH_FLAG_ECCD FLASH_ECCR_ECCD /*!< FLASH ECC detection */ + +#define FLASH_FLAG_SR_ERRORS (FLASH_FLAG_OPERR | FLASH_FLAG_PROGERR | FLASH_FLAG_WRPERR | \ + FLASH_FLAG_PGAERR | FLASH_FLAG_SIZERR | FLASH_FLAG_PGSERR | \ + FLASH_FLAG_MISERR | FLASH_FLAG_FASTERR | FLASH_FLAG_RDERR | \ + FLASH_FLAG_OPTVERR) /*!< All SR error flags */ + +#define FLASH_FLAG_ECCR_ERRORS (FLASH_FLAG_ECCC | FLASH_FLAG_ECCD) + +#define FLASH_FLAG_ALL_ERRORS (FLASH_FLAG_SR_ERRORS | FLASH_FLAG_ECCR_ERRORS) + +/** @defgroup FLASH_INTERRUPT_DEFINITION FLASH Interrupts Definition + * @brief FLASH Interrupt definition + * @{ + */ +#define FLASH_IT_EOP FLASH_CR_EOPIE /*!< End of FLASH Operation Interrupt source */ +#define FLASH_IT_OPERR FLASH_CR_ERRIE /*!< Error Interrupt source */ +#define FLASH_IT_RDERR FLASH_CR_RDERRIE /*!< PCROP Read Error Interrupt source */ +#define FLASH_IT_ECCC (FLASH_ECCR_ECCCIE >> FLASH_ECCR_ECCCIE_Pos) /*!< ECC Correction Interrupt source */ +/** + * @} + */ + +/** @defgroup FLASH_ERROR FLASH Error + * @{ + */ +#define HAL_FLASH_ERROR_NONE 0x00000000U +#define HAL_FLASH_ERROR_OP FLASH_FLAG_OPERR +#define HAL_FLASH_ERROR_PROG FLASH_FLAG_PROGERR +#define HAL_FLASH_ERROR_WRP FLASH_FLAG_WRPERR +#define HAL_FLASH_ERROR_PGA FLASH_FLAG_PGAERR +#define HAL_FLASH_ERROR_SIZ FLASH_FLAG_SIZERR +#define HAL_FLASH_ERROR_PGS FLASH_FLAG_PGSERR +#define HAL_FLASH_ERROR_MIS FLASH_FLAG_MISERR +#define HAL_FLASH_ERROR_FAST FLASH_FLAG_FASTERR +#define HAL_FLASH_ERROR_RD FLASH_FLAG_RDERR +#define HAL_FLASH_ERROR_OPTV FLASH_FLAG_OPTVERR +/** + * @} + */ + +/** @defgroup FLASH_TYPE_ERASE FLASH Erase Type + * @{ + */ +#define FLASH_TYPEERASE_PAGES FLASH_CR_PER /*!< Pages erase only*/ +/** + * @} + */ + +/** @defgroup FLASH_TYPE_PROGRAM FLASH Program Type + * @{ + */ +#define FLASH_TYPEPROGRAM_DOUBLEWORD FLASH_CR_PG /*!< Program a double-word (64-bit) at a specified address.*/ +#define FLASH_TYPEPROGRAM_FAST FLASH_CR_FSTPG /*!< Fast program a 64 row double-word (64-bit) at a specified address. + And another 64 row double-word (64-bit) will be programmed */ +/** + * @} + */ + +/** @defgroup FLASH_OB_TYPE FLASH Option Bytes Type + * @{ + */ +#define OPTIONBYTE_WRP 0x00000001U /*!< WRP option byte configuration */ +#define OPTIONBYTE_RDP 0x00000002U /*!< RDP option byte configuration */ +#define OPTIONBYTE_USER 0x00000004U /*!< User option byte configuration */ +#define OPTIONBYTE_PCROP 0x00000008U /*!< PCROP option byte configuration */ +#define OPTIONBYTE_IPCC_BUF_ADDR 0x00000010U /*!< IPCC mailbox buffer address configuration */ +#define OPTIONBYTE_C2_BOOT_VECT 0x00000100U /*!< CPU2 Secure Boot reset vector */ +#define OPTIONBYTE_SECURE_MODE 0x00000200U /*!< Secure mode on activated or not */ +#define OPTIONBYTE_ALL (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | \ + OPTIONBYTE_PCROP | OPTIONBYTE_IPCC_BUF_ADDR | OPTIONBYTE_C2_BOOT_VECT | \ + OPTIONBYTE_SECURE_MODE) /*!< All option byte configuration */ +/** + * @} + */ + +/** @defgroup FLASH_OB_WRP_AREA FLASH WRP Area + * @{ + */ +#define OB_WRPAREA_BANK1_AREAA 0x00000000U /*!< Flash Area A */ +#define OB_WRPAREA_BANK1_AREAB 0x00000001U /*!< Flash Area B */ +/** + * @} + */ + +/** @defgroup FLASH_OB_READ_PROTECTION FLASH Option Bytes Read Protection + * @{ + */ +#define OB_RDP_LEVEL_0 0x000000AAU +#define OB_RDP_LEVEL_1 0x000000BBU +#define OB_RDP_LEVEL_2 0x000000CCU /*!< Warning: When enabling read protection level 2 + it's no more possible to go back to level 1 or 0 */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_TYPE FLASH Option Bytes User Type + * @{ + */ +#define OB_USER_BOR_LEV FLASH_OPTR_BOR_LEV /*!< BOR reset Level */ +#define OB_USER_nRST_STOP FLASH_OPTR_nRST_STOP /*!< Reset generated when entering the stop mode */ +#define OB_USER_nRST_STDBY FLASH_OPTR_nRST_STDBY /*!< Reset generated when entering the standby mode */ +#define OB_USER_nRST_SHDW FLASH_OPTR_nRST_SHDW /*!< Reset generated when entering the shutdown mode */ +#if defined(FLASH_OPTR_IRHEN) +#define OB_USER_INPUT_RESET_HOLDER FLASH_OPTR_IRHEN /*!< Internal reset holder enable */ +#endif /* FLASH_OPTR_IRHEN */ +#define OB_USER_IWDG_SW FLASH_OPTR_IWDG_SW /*!< Independent watchdog selection */ +#define OB_USER_IWDG_STOP FLASH_OPTR_IWDG_STOP /*!< Independent watchdog counter freeze in stop mode */ +#define OB_USER_IWDG_STDBY FLASH_OPTR_IWDG_STDBY /*!< Independent watchdog counter freeze in standby mode */ +#define OB_USER_WWDG_SW FLASH_OPTR_WWDG_SW /*!< Window watchdog selection */ +#define OB_USER_nBOOT1 FLASH_OPTR_nBOOT1 /*!< Boot configuration */ +#define OB_USER_SRAM2PE FLASH_OPTR_SRAM2PE /*!< SRAM2 parity check enable */ +#define OB_USER_SRAM2RST FLASH_OPTR_SRAM2RST /*!< SRAM2 erase when system reset */ +#define OB_USER_nSWBOOT0 FLASH_OPTR_nSWBOOT0 /*!< Software BOOT0 */ +#define OB_USER_nBOOT0 FLASH_OPTR_nBOOT0 /*!< nBOOT0 option bit */ +#if defined(FLASH_OPTR_nRST_MODE) +#define OB_USER_NRST_MODE FLASH_OPTR_nRST_MODE /*!< Reset pin configuration */ +#endif /* FLASH_OPTR_nRST_MODE */ +#define OB_USER_AGC_TRIM FLASH_OPTR_AGC_TRIM /*!< Automatic Gain Control Trimming */ +#if defined(FLASH_OPTR_IRHEN) && defined(FLASH_OPTR_nRST_MODE) +#define OB_USER_ALL (OB_USER_BOR_LEV | OB_USER_nRST_STOP | OB_USER_nRST_STDBY | \ + OB_USER_nRST_SHDW | OB_USER_IWDG_SW | OB_USER_IWDG_STOP | \ + OB_USER_IWDG_STDBY | OB_USER_WWDG_SW | OB_USER_nBOOT1 | \ + OB_USER_SRAM2PE | OB_USER_SRAM2RST | OB_USER_nSWBOOT0 | \ + OB_USER_nBOOT0 | OB_USER_AGC_TRIM | OB_USER_NRST_MODE | \ + OB_USER_INPUT_RESET_HOLDER) /*!< all option bits */ +#else +#define OB_USER_ALL (OB_USER_BOR_LEV | OB_USER_nRST_STOP | OB_USER_nRST_STDBY | \ + OB_USER_nRST_SHDW | OB_USER_IWDG_SW | OB_USER_IWDG_STOP | \ + OB_USER_IWDG_STDBY | OB_USER_WWDG_SW | OB_USER_nBOOT1 | \ + OB_USER_SRAM2PE | OB_USER_SRAM2RST | OB_USER_nSWBOOT0 | \ + OB_USER_nBOOT0 | OB_USER_AGC_TRIM) /*!< all option bits */ +#endif /* FLASH_OPTR_IRHEN */ + +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_AGC_TRIM FLASH Option Bytes Automatic Gain Control Trimming + * @{ + */ +#define OB_AGC_TRIM_0 0x00000000U /*!< Automatic Gain Control Trimming Value 0 */ +#define OB_AGC_TRIM_1 FLASH_OPTR_AGC_TRIM_0 /*!< Automatic Gain Control Trimming Value 1 */ +#define OB_AGC_TRIM_2 FLASH_OPTR_AGC_TRIM_1 /*!< Automatic Gain Control Trimming Value 2 */ +#define OB_AGC_TRIM_3 (FLASH_OPTR_AGC_TRIM_1 | FLASH_OPTR_AGC_TRIM_0) /*!< Automatic Gain Control Trimming Value 3 */ +#define OB_AGC_TRIM_4 FLASH_OPTR_AGC_TRIM_2 /*!< Automatic Gain Control Trimming Value 4 */ +#define OB_AGC_TRIM_5 (FLASH_OPTR_AGC_TRIM_2 | FLASH_OPTR_AGC_TRIM_0) /*!< Automatic Gain Control Trimming Value 5 */ +#define OB_AGC_TRIM_6 (FLASH_OPTR_AGC_TRIM_2 | FLASH_OPTR_AGC_TRIM_1) /*!< Automatic Gain Control Trimming Value 6 */ +#define OB_AGC_TRIM_7 (FLASH_OPTR_AGC_TRIM_2 | FLASH_OPTR_AGC_TRIM_1 | FLASH_OPTR_AGC_TRIM_0) /*!< Automatic Gain Control Trimming Value 7 */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_BOR_LEVEL FLASH Option Bytes User BOR Level + * @{ + */ +#define OB_BOR_LEVEL_0 0x00000000U /*!< Reset level threshold is around 1.7V */ +#define OB_BOR_LEVEL_1 FLASH_OPTR_BOR_LEV_0 /*!< Reset level threshold is around 2.0V */ +#define OB_BOR_LEVEL_2 FLASH_OPTR_BOR_LEV_1 /*!< Reset level threshold is around 2.2V */ +#define OB_BOR_LEVEL_3 (FLASH_OPTR_BOR_LEV_0 | FLASH_OPTR_BOR_LEV_1) /*!< Reset level threshold is around 2.5V */ +#define OB_BOR_LEVEL_4 FLASH_OPTR_BOR_LEV_2 /*!< Reset level threshold is around 2.8V */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_nRST_STOP FLASH Option Bytes User Reset On Stop + * @{ + */ +#define OB_STOP_RST 0x00000000U /*!< Reset generated when entering the stop mode */ +#define OB_STOP_NORST FLASH_OPTR_nRST_STOP /*!< No reset generated when entering the stop mode */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_nRST_STANDBY FLASH Option Bytes User Reset On Standby + * @{ + */ +#define OB_STANDBY_RST 0x00000000U /*!< Reset generated when entering the standby mode */ +#define OB_STANDBY_NORST FLASH_OPTR_nRST_STDBY /*!< No reset generated when entering the standby mode */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_nRST_SHUTDOWN FLASH Option Bytes User Reset On Shutdown + * @{ + */ +#define OB_SHUTDOWN_RST 0x00000000U /*!< Reset generated when entering the shutdown mode */ +#define OB_SHUTDOWN_NORST FLASH_OPTR_nRST_SHDW /*!< No reset generated when entering the shutdown mode */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_IWDG_SW FLASH Option Bytes User IWDG Type + * @{ + */ +#define OB_IWDG_HW 0x00000000U /*!< Hardware independent watchdog */ +#define OB_IWDG_SW FLASH_OPTR_IWDG_SW /*!< Software independent watchdog */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_IWDG_STOP FLASH Option Bytes User IWDG Mode On Stop + * @{ + */ +#define OB_IWDG_STOP_FREEZE 0x00000000U /*!< Independent watchdog counter is frozen in Stop mode */ +#define OB_IWDG_STOP_RUN FLASH_OPTR_IWDG_STOP /*!< Independent watchdog counter is running in Stop mode */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_IWDG_STANDBY FLASH Option Bytes User IWDG Mode On Standby + * @{ + */ +#define OB_IWDG_STDBY_FREEZE 0x00000000U /*!< Independent watchdog counter is frozen in Standby mode */ +#define OB_IWDG_STDBY_RUN FLASH_OPTR_IWDG_STDBY /*!< Independent watchdog counter is running in Standby mode */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_WWDG_SW FLASH Option Bytes User WWDG Type + * @{ + */ +#define OB_WWDG_HW 0x00000000U /*!< Hardware window watchdog */ +#define OB_WWDG_SW FLASH_OPTR_WWDG_SW /*!< Software window watchdog */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_SRAM2PE FLASH Option Bytes SRAM2 parity check + * @{ + */ +#define OB_SRAM2_PARITY_ENABLE 0x00000000U /*!< SRAM2 parity check enable */ +#define OB_SRAM2_PARITY_DISABLE FLASH_OPTR_SRAM2PE /*!< SRAM2 parity check disable */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_SRAM2RST FLASH Option Bytes SRAM2 erase when system reset + * @{ + */ +#define OB_SRAM2_RST_ERASE 0x00000000U /*!< SRAM2 erased when a system reset */ +#define OB_SRAM2_RST_NOT_ERASE FLASH_OPTR_SRAM2RST /*!< SRAM2 is not erased when a system reset */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_nBOOT1 FLASH Option Bytes User BOOT1 Type + * @{ + */ +#define OB_BOOT1_SRAM 0x00000000U /*!< Embedded SRAM is selected as boot space (if BOOT0=1) */ +#define OB_BOOT1_SYSTEM FLASH_OPTR_nBOOT1 /*!< System memory is selected as boot space (if BOOT0=1) */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_nSWBOOT0 FLASH Option Bytes User Software BOOT0 + * @{ + */ +#define OB_BOOT0_FROM_OB 0x00000000U /*!< BOOT0 taken from the option bit nBOOT0 */ +#define OB_BOOT0_FROM_PIN FLASH_OPTR_nSWBOOT0 /*!< BOOT0 taken from PH3/BOOT0 pin */ +/** + * @} + */ + +/** @defgroup FLASH_OB_USER_nBOOT0 FLASH Option Bytes User nBOOT0 option bit + * @{ + */ +#define OB_BOOT0_RESET 0x00000000U /*!< nBOOT0 = 0 */ +#define OB_BOOT0_SET FLASH_OPTR_nBOOT0 /*!< nBOOT0 = 1 */ +/** + * @} + */ + +#if defined(FLASH_OPTR_nRST_MODE) +/** @defgroup FLASH_OB_USER_RESET_CONFIG FLASH Option Bytes User reset config bit + * @{ + */ +#define OB_RESET_MODE_INPUT_ONLY FLASH_OPTR_nRST_MODE_0 /*!< Reset pin is in Reset input mode only */ +#define OB_RESET_MODE_GPIO FLASH_OPTR_nRST_MODE_1 /*!< Reset pin is in GPIO normal mode only */ +#define OB_RESET_MODE_INPUT_OUTPUT (FLASH_OPTR_nRST_MODE_0 | FLASH_OPTR_nRST_MODE_1) /*!< Reset pin is in Reset input and output mode */ +/** + * @} + */ +#endif /* FLASH_OPTR_nRST_MODE */ + +#if defined(FLASH_OPTR_IRHEN) +/** @defgroup FLASH_OB_USER_INPUT_RESET_HOLDER FLASH Option Bytes User input reset holder bit + * @{ + */ +#define OB_IRH_ENABLE 0x00000000U /*!< Internal Reset handler enable */ +#define OB_IRH_DISABLE FLASH_OPTR_IRHEN /*!< Internal Reset handler disable */ +/** + * @} + */ +#endif /* FLASH_OPTR_IRHEN */ + +/** @defgroup FLASH_OB_PCROP_ZONE FLASH PCROP ZONE + * @{ + */ +#define OB_PCROP_ZONE_A 0x00000001U /*!< PCROP Zone A */ +#define OB_PCROP_ZONE_B 0x00000002U /*!< PCROP Zone B */ +/** + * @} + */ + +/** @defgroup FLASH_OB_PCROP_RDP FLASH Option Bytes PCROP On RDP Level Type + * @{ + */ +#define OB_PCROP_RDP_NOT_ERASE 0x00000000U /*!< PCROP area is not erased when the RDP level + is decreased from Level 1 to Level 0 */ +#define OB_PCROP_RDP_ERASE FLASH_PCROP1AER_PCROP_RDP /*!< PCROP area is erased when the RDP level is + decreased from Level 1 to Level 0 (full mass erase) */ +/** + * @} + */ + +/** @defgroup FLASH_OB_SECURITY_MODE Option Bytes FLASH Secure mode + * @{ + */ +#define SYSTEM_NOT_IN_SECURE_MODE 0x00000000U /*!< Unsecure mode: Security disabled */ +#define SYSTEM_IN_SECURE_MODE FLASH_OPTR_ESE /*!< Secure mode : Security enabled */ +/** + * @} + */ + +/** @defgroup FLASH_C2_OB_BOOT_REGION CPU2 Option Bytes Reset Boot Vector + * @{ + */ +#define OB_C2_BOOT_FROM_SRAM 0x00000000U /*!< CPU2 boot from Sram */ +#define OB_C2_BOOT_FROM_FLASH FLASH_SRRVR_C2OPT /*!< CPU2 boot from Flash */ +/** + * @} + */ +/** + * @} + */ + +/** @defgroup FLASH_SRAM2A_ADDRESS_RANGE RAM2A address range in secure mode + * @{ + */ + +#define SRAM2A_START_SECURE_ADDR_0 (SRAM2A_BASE + 0x0000U) /* When in secure mode (SRAM2A_BASE + 0x0000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_1 (SRAM2A_BASE + 0x0400U) /* When in secure mode (SRAM2A_BASE + 0x0400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_2 (SRAM2A_BASE + 0x0800U) /* When in secure mode (SRAM2A_BASE + 0x0800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_3 (SRAM2A_BASE + 0x0C00U) /* When in secure mode (SRAM2A_BASE + 0x0C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_4 (SRAM2A_BASE + 0x1000U) /* When in secure mode (SRAM2A_BASE + 0x1000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_5 (SRAM2A_BASE + 0x1400U) /* When in secure mode (SRAM2A_BASE + 0x1400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_6 (SRAM2A_BASE + 0x1800U) /* When in secure mode (SRAM2A_BASE + 0x1800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_7 (SRAM2A_BASE + 0x1C00U) /* When in secure mode (SRAM2A_BASE + 0x1C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_8 (SRAM2A_BASE + 0x2000U) /* When in secure mode (SRAM2A_BASE + 0x2000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_9 (SRAM2A_BASE + 0x2400U) /* When in secure mode (SRAM2A_BASE + 0x2400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_10 (SRAM2A_BASE + 0x2800U) /* When in secure mode (SRAM2A_BASE + 0x2800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_11 (SRAM2A_BASE + 0x2C00U) /* When in secure mode (SRAM2A_BASE + 0x2C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_12 (SRAM2A_BASE + 0x3000U) /* When in secure mode (SRAM2A_BASE + 0x3000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_13 (SRAM2A_BASE + 0x3400U) /* When in secure mode (SRAM2A_BASE + 0x3400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_14 (SRAM2A_BASE + 0x3800U) /* When in secure mode (SRAM2A_BASE + 0x3800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_15 (SRAM2A_BASE + 0x3C00U) /* When in secure mode (SRAM2A_BASE + 0x3C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_16 (SRAM2A_BASE + 0x4000U) /* When in secure mode (SRAM2A_BASE + 0x4000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_17 (SRAM2A_BASE + 0x4400U) /* When in secure mode (SRAM2A_BASE + 0x4400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_18 (SRAM2A_BASE + 0x4800U) /* When in secure mode (SRAM2A_BASE + 0x4800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_19 (SRAM2A_BASE + 0x4C00U) /* When in secure mode (SRAM2A_BASE + 0x4C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_20 (SRAM2A_BASE + 0x5000U) /* When in secure mode (SRAM2A_BASE + 0x5000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_21 (SRAM2A_BASE + 0x5400U) /* When in secure mode (SRAM2A_BASE + 0x5400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_22 (SRAM2A_BASE + 0x5800U) /* When in secure mode (SRAM2A_BASE + 0x5800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_23 (SRAM2A_BASE + 0x5C00U) /* When in secure mode (SRAM2A_BASE + 0x5C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_24 (SRAM2A_BASE + 0x6000U) /* When in secure mode (SRAM2A_BASE + 0x6000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_25 (SRAM2A_BASE + 0x6400U) /* When in secure mode (SRAM2A_BASE + 0x6400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_26 (SRAM2A_BASE + 0x6800U) /* When in secure mode (SRAM2A_BASE + 0x6800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_27 (SRAM2A_BASE + 0x6C00U) /* When in secure mode (SRAM2A_BASE + 0x6C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_28 (SRAM2A_BASE + 0x7000U) /* When in secure mode (SRAM2A_BASE + 0x7000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_29 (SRAM2A_BASE + 0x7400U) /* When in secure mode (SRAM2A_BASE + 0x7400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_30 (SRAM2A_BASE + 0x7800U) /* When in secure mode (SRAM2A_BASE + 0x7800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_START_SECURE_ADDR_31 (SRAM2A_BASE + 0x7C00U) /* When in secure mode (SRAM2A_BASE + 0x7C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2A_FULL_UNSECURE (SRAM2A_BASE + 0x8000U) /* The RAM2A is accessible to M0 Plus and M4 */ + +/** + * @} + */ + +/** @defgroup FLASH_SRAM2B_ADDRESS_RANGE RAM2B address range in secure mode + * @{ + */ + +#define SRAM2B_START_SECURE_ADDR_0 (SRAM2B_BASE + 0x0000U) /* When in secure mode (SRAM2B_BASE + 0x0000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_1 (SRAM2B_BASE + 0x0400U) /* When in secure mode (SRAM2B_BASE + 0x0400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_2 (SRAM2B_BASE + 0x0800U) /* When in secure mode (SRAM2B_BASE + 0x0800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_3 (SRAM2B_BASE + 0x0C00U) /* When in secure mode (SRAM2B_BASE + 0x0C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#if !defined(STM32WB10xx) && !defined(STM32WB15xx) && !defined(STM32WB1Mxx) +#define SRAM2B_START_SECURE_ADDR_4 (SRAM2B_BASE + 0x1000U) /* When in secure mode (SRAM2B_BASE + 0x1000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_5 (SRAM2B_BASE + 0x1400U) /* When in secure mode (SRAM2B_BASE + 0x1400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_6 (SRAM2B_BASE + 0x1800U) /* When in secure mode (SRAM2B_BASE + 0x1800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_7 (SRAM2B_BASE + 0x1C00U) /* When in secure mode (SRAM2B_BASE + 0x1C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_8 (SRAM2B_BASE + 0x2000U) /* When in secure mode (SRAM2B_BASE + 0x2000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_9 (SRAM2B_BASE + 0x2400U) /* When in secure mode (SRAM2B_BASE + 0x2400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_10 (SRAM2B_BASE + 0x2800U) /* When in secure mode (SRAM2B_BASE + 0x2800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_11 (SRAM2B_BASE + 0x2C00U) /* When in secure mode (SRAM2B_BASE + 0x2C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_12 (SRAM2B_BASE + 0x3000U) /* When in secure mode (SRAM2B_BASE + 0x3000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_13 (SRAM2B_BASE + 0x3400U) /* When in secure mode (SRAM2B_BASE + 0x3400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_14 (SRAM2B_BASE + 0x3800U) /* When in secure mode (SRAM2B_BASE + 0x3800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_15 (SRAM2B_BASE + 0x3C00U) /* When in secure mode (SRAM2B_BASE + 0x3C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_16 (SRAM2B_BASE + 0x4000U) /* When in secure mode (SRAM2B_BASE + 0x4000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_17 (SRAM2B_BASE + 0x4400U) /* When in secure mode (SRAM2B_BASE + 0x4400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_18 (SRAM2B_BASE + 0x4800U) /* When in secure mode (SRAM2B_BASE + 0x4800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_19 (SRAM2B_BASE + 0x4C00U) /* When in secure mode (SRAM2B_BASE + 0x4C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_20 (SRAM2B_BASE + 0x5000U) /* When in secure mode (SRAM2B_BASE + 0x5000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_21 (SRAM2B_BASE + 0x5400U) /* When in secure mode (SRAM2B_BASE + 0x5400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_22 (SRAM2B_BASE + 0x5800U) /* When in secure mode (SRAM2B_BASE + 0x5800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_23 (SRAM2B_BASE + 0x5C00U) /* When in secure mode (SRAM2B_BASE + 0x5C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_24 (SRAM2B_BASE + 0x6000U) /* When in secure mode (SRAM2B_BASE + 0x6000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_25 (SRAM2B_BASE + 0x6400U) /* When in secure mode (SRAM2B_BASE + 0x6400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_26 (SRAM2B_BASE + 0x6800U) /* When in secure mode (SRAM2B_BASE + 0x6800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_27 (SRAM2B_BASE + 0x6C00U) /* When in secure mode (SRAM2B_BASE + 0x6C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_28 (SRAM2B_BASE + 0x7000U) /* When in secure mode (SRAM2B_BASE + 0x7000) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_29 (SRAM2B_BASE + 0x7400U) /* When in secure mode (SRAM2B_BASE + 0x7400) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_30 (SRAM2B_BASE + 0x7800U) /* When in secure mode (SRAM2B_BASE + 0x7800) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_START_SECURE_ADDR_31 (SRAM2B_BASE + 0x7C00U) /* When in secure mode (SRAM2B_BASE + 0x7C00) -> SRAM2B_END_ADDR is accessible only by M0 Plus */ +#define SRAM2B_FULL_UNSECURE (SRAM2B_BASE + 0x8000U) /* The RAM2B is accessible to M0 Plus and M4 */ +#else +#define SRAM2B_FULL_UNSECURE (SRAM2B_BASE + 0x1000U) /* The RAM2B is accessible to M0 Plus and M4 */ +#endif /* !(STM32WB10xx) && !(STM32WB15xx) && !(STM32WB1Mxx) */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ +/** @defgroup FLASH_Exported_Macros FLASH Exported Macros + * @brief macros to control FLASH features + * @{ + */ + +/** + * @brief Set the FLASH Latency. + * @param __LATENCY__ FLASH Latency + * This parameter can be one of the following values : + * @arg @ref FLASH_LATENCY_0 FLASH Zero wait state + * @arg @ref FLASH_LATENCY_1 FLASH One wait state + * @arg @ref FLASH_LATENCY_2 FLASH Two wait states + * @arg @ref FLASH_LATENCY_3 FLASH Three wait states + * @retval None + */ +#define __HAL_FLASH_SET_LATENCY(__LATENCY__) MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (__LATENCY__)) + +/** + * @brief Get the FLASH Latency. + * @retval FLASH Latency + * Returned value can be one of the following values : + * @arg @ref FLASH_LATENCY_0 FLASH Zero wait state + * @arg @ref FLASH_LATENCY_1 FLASH One wait state + * @arg @ref FLASH_LATENCY_2 FLASH Two wait states + * @arg @ref FLASH_LATENCY_3 FLASH Three wait states + */ +#define __HAL_FLASH_GET_LATENCY() READ_BIT(FLASH->ACR, FLASH_ACR_LATENCY) + +/** + * @brief Enable the FLASH prefetch buffer. + * @retval None + */ +#define __HAL_FLASH_PREFETCH_BUFFER_ENABLE() SET_BIT(FLASH->ACR, FLASH_ACR_PRFTEN) + +/** + * @brief Disable the FLASH prefetch buffer. + * @retval None + */ +#define __HAL_FLASH_PREFETCH_BUFFER_DISABLE() CLEAR_BIT(FLASH->ACR, FLASH_ACR_PRFTEN) + +/** + * @brief Enable the FLASH instruction cache. + * @retval none + */ +#define __HAL_FLASH_INSTRUCTION_CACHE_ENABLE() SET_BIT(FLASH->ACR, FLASH_ACR_ICEN) + +/** + * @brief Disable the FLASH instruction cache. + * @retval none + */ +#define __HAL_FLASH_INSTRUCTION_CACHE_DISABLE() CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICEN) + +/** + * @brief Enable the FLASH data cache. + * @retval none + */ +#define __HAL_FLASH_DATA_CACHE_ENABLE() SET_BIT(FLASH->ACR, FLASH_ACR_DCEN) + +/** + * @brief Disable the FLASH data cache. + * @retval none + */ +#define __HAL_FLASH_DATA_CACHE_DISABLE() CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCEN) + +/** + * @brief Reset the FLASH instruction Cache. + * @note This function must be used only when the Instruction Cache is disabled. + * @retval None + */ +#define __HAL_FLASH_INSTRUCTION_CACHE_RESET() do { SET_BIT(FLASH->ACR, FLASH_ACR_ICRST); \ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICRST); \ + } while (0) + +/** + * @brief Reset the FLASH data Cache. + * @note This function must be used only when the data Cache is disabled. + * @retval None + */ +#define __HAL_FLASH_DATA_CACHE_RESET() do { SET_BIT(FLASH->ACR, FLASH_ACR_DCRST); \ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCRST); \ + } while (0) + +/** + * @} + */ + +/** @defgroup FLASH_Interrupt FLASH Interrupts Macros + * @brief macros to handle FLASH interrupts + * @{ + */ + +/** + * @brief Enable the specified FLASH interrupt. + * @param __INTERRUPT__ FLASH interrupt + * This parameter can be any combination of the following values: + * @arg @ref FLASH_IT_EOP End of FLASH Operation Interrupt + * @arg @ref FLASH_IT_OPERR Error Interrupt + * @arg @ref FLASH_IT_RDERR PCROP Read Error Interrupt + * @arg @ref FLASH_IT_ECCC ECC Correction Interrupt + * @retval none + */ +#define __HAL_FLASH_ENABLE_IT(__INTERRUPT__) do { if(((__INTERRUPT__) & FLASH_IT_ECCC) != 0U) { SET_BIT(FLASH->ECCR, FLASH_ECCR_ECCCIE); }\ + if(((__INTERRUPT__) & (~FLASH_IT_ECCC)) != 0U) { SET_BIT(FLASH->CR, ((__INTERRUPT__) & (~FLASH_IT_ECCC))); }\ + } while(0) + +/** + * @brief Disable the specified FLASH interrupt. + * @param __INTERRUPT__ FLASH interrupt + * This parameter can be any combination of the following values: + * @arg @ref FLASH_IT_EOP End of FLASH Operation Interrupt + * @arg @ref FLASH_IT_OPERR Error Interrupt + * @arg @ref FLASH_IT_RDERR PCROP Read Error Interrupt + * @arg @ref FLASH_IT_ECCC ECC Correction Interrupt + * @retval none + */ +#define __HAL_FLASH_DISABLE_IT(__INTERRUPT__) do { if(((__INTERRUPT__) & FLASH_IT_ECCC) != 0U) { CLEAR_BIT(FLASH->ECCR, FLASH_ECCR_ECCCIE); }\ + if(((__INTERRUPT__) & (~FLASH_IT_ECCC)) != 0U) { CLEAR_BIT(FLASH->CR, ((__INTERRUPT__) & (~FLASH_IT_ECCC))); }\ + } while(0) + +/** + * @brief Check whether the specified FLASH flag is set or not. + * @param __FLAG__ specifies the FLASH flag to check. + * This parameter can be one of the following values: + * @arg @ref FLASH_FLAG_EOP FLASH End of Operation flag + * @arg @ref FLASH_FLAG_OPERR FLASH Operation error flag + * @arg @ref FLASH_FLAG_PROGERR FLASH Programming error flag + * @arg @ref FLASH_FLAG_WRPERR FLASH Write protection error flag + * @arg @ref FLASH_FLAG_PGAERR FLASH Programming alignment error flag + * @arg @ref FLASH_FLAG_SIZERR FLASH Size error flag + * @arg @ref FLASH_FLAG_PGSERR FLASH Programming sequence error flag + * @arg @ref FLASH_FLAG_MISERR FLASH Fast programming data miss error flag + * @arg @ref FLASH_FLAG_FASTERR FLASH Fast programming error flag + * @arg @ref FLASH_FLAG_OPTNV FLASH User Option OPTVAL indication + * @arg @ref FLASH_FLAG_RDERR FLASH PCROP read error flag + * @arg @ref FLASH_FLAG_OPTVERR FLASH Option validity error flag + * @arg @ref FLASH_FLAG_BSY FLASH write/erase operations in progress flag + * @arg @ref FLASH_FLAG_CFGBSY Programming/erase configuration busy + * @arg @ref FLASH_FLAG_PESD FLASH Programming/erase operation suspended + * @arg @ref FLASH_FLAG_ECCC FLASH one ECC error has been detected and corrected + * @arg @ref FLASH_FLAG_ECCD FLASH two ECC errors have been detected + * @retval The new state of FLASH_FLAG (SET or RESET). + */ +#define __HAL_FLASH_GET_FLAG(__FLAG__) ((((__FLAG__) & (FLASH_FLAG_ECCR_ERRORS)) != 0U) ? \ + (READ_BIT(FLASH->ECCR, (__FLAG__)) == (__FLAG__)) : \ + (READ_BIT(FLASH->SR, (__FLAG__)) == (__FLAG__))) + +/** + * @brief Clear the FLASH's pending flags. + * @param __FLAG__ specifies the FLASH flags to clear. + * This parameter can be any combination of the following values: + * @arg @ref FLASH_FLAG_EOP FLASH End of Operation flag + * @arg @ref FLASH_FLAG_OPERR FLASH Operation error flag + * @arg @ref FLASH_FLAG_PROGERR FLASH Programming error flag + * @arg @ref FLASH_FLAG_WRPERR FLASH Write protection error flag + * @arg @ref FLASH_FLAG_PGAERR FLASH Programming alignment error flag + * @arg @ref FLASH_FLAG_SIZERR FLASH Size error flag + * @arg @ref FLASH_FLAG_PGSERR FLASH Programming sequence error flag + * @arg @ref FLASH_FLAG_MISERR FLASH Fast programming data miss error flag + * @arg @ref FLASH_FLAG_FASTERR FLASH Fast programming error flag + * @arg @ref FLASH_FLAG_RDERR FLASH PCROP read error flag + * @arg @ref FLASH_FLAG_OPTVERR FLASH Option validity error flag + * @arg @ref FLASH_FLAG_ECCC FLASH one ECC error has been detected and corrected + * @arg @ref FLASH_FLAG_ECCD FLASH two ECC errors have been detected + * @arg @ref FLASH_FLAG_SR_ERRORS FLASH All SR errors flags + * @arg @ref FLASH_FLAG_ECCR_ERRORS FLASH All ECCR errors flags + * @arg @ref FLASH_FLAG_ALL_ERRORS FLASH All errors flags + * @retval None + */ +#define __HAL_FLASH_CLEAR_FLAG(__FLAG__) do { if(((__FLAG__) & (FLASH_FLAG_ECCR_ERRORS)) != 0U) { SET_BIT(FLASH->ECCR, ((__FLAG__) & (FLASH_FLAG_ECCR_ERRORS))); }\ + if(((__FLAG__) & ~(FLASH_FLAG_ECCR_ERRORS)) != 0U) { WRITE_REG(FLASH->SR, ((__FLAG__) & ~(FLASH_FLAG_ECCR_ERRORS))); }\ + } while(0) + +/** + * @} + */ + +/* Include FLASH HAL Extended module */ +#include "stm32wbxx_hal_flash_ex.h" +/* Exported variables --------------------------------------------------------*/ +/** @defgroup FLASH_Exported_Variables FLASH Exported Variables + * @{ + */ +extern FLASH_ProcessTypeDef pFlash; +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup FLASH_Exported_Functions + * @{ + */ + +/* Program operation functions ***********************************************/ +/** @addtogroup FLASH_Exported_Functions_Group1 + * @{ + */ +HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data); +HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data); +/* FLASH IRQ handler method */ +void HAL_FLASH_IRQHandler(void); +/* Callbacks in non blocking modes */ +void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue); +void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue); +/** + * @} + */ + +/* Peripheral Control functions **********************************************/ +/** @addtogroup FLASH_Exported_Functions_Group2 + * @{ + */ +HAL_StatusTypeDef HAL_FLASH_Unlock(void); +HAL_StatusTypeDef HAL_FLASH_Lock(void); +/* Option bytes control */ +HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void); +HAL_StatusTypeDef HAL_FLASH_OB_Lock(void); +HAL_StatusTypeDef HAL_FLASH_OB_Launch(void); +/** + * @} + */ + +/* Peripheral State functions ************************************************/ +/** @addtogroup FLASH_Exported_Functions_Group3 + * @{ + */ +uint32_t HAL_FLASH_GetError(void); +/** + * @} + */ + +/** + * @} + */ + +/* Private types --------------------------------------------------------*/ +/** @defgroup FLASH_Private_types FLASH Private Types + * @{ + */ +HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout); +/** + * @} + */ + +/* Private constants --------------------------------------------------------*/ +/** @defgroup FLASH_Private_Constants FLASH Private Constants + * @{ + */ +#define FLASH_END_ADDR (FLASH_BASE + FLASH_SIZE - 1U) + +#define FLASH_BANK_SIZE FLASH_SIZE /*!< FLASH Bank Size */ +#if defined(STM32WB10xx) || defined(STM32WB15xx) || defined(STM32WB1Mxx) +#define FLASH_PAGE_SIZE 0x00000800U /*!< FLASH Page Size, 2 KBytes */ +#else +#define FLASH_PAGE_SIZE 0x00001000U /*!< FLASH Page Size, 4 KBytes */ +#endif /* STM32WB10xx || STM32WB15xx || STM32WB1Mxx */ +#define FLASH_PAGE_NB (FLASH_SIZE / FLASH_PAGE_SIZE) +#define FLASH_TIMEOUT_VALUE 1000U /*!< FLASH Execution Timeout, 1 s */ + +#if defined(STM32WB10xx) || defined(STM32WB15xx) || defined(STM32WB1Mxx) +#define FLASH_PCROP_GRANULARITY_OFFSET 10U /*!< FLASH Code Readout Protection granularity offset */ +#define FLASH_PCROP_GRANULARITY (1UL << FLASH_PCROP_GRANULARITY_OFFSET) /*!< FLASH Code Readout Protection granularity, 1 KBytes */ +#else +#define FLASH_PCROP_GRANULARITY_OFFSET 11U /*!< FLASH Code Readout Protection granularity offset */ +#define FLASH_PCROP_GRANULARITY (1UL << FLASH_PCROP_GRANULARITY_OFFSET) /*!< FLASH Code Readout Protection granularity, 2 KBytes */ +#endif /* STM32WB10xx || STM32WB15xx || STM32WB1Mxx */ + +#define FLASH_TYPENONE 0x00000000U /*!< No Programmation Procedure On Going */ +/** + * @} + */ + +/** @defgroup SRAM_MEMORY_SIZE SRAM memory size + * @{ + */ +#define SRAM_SECURE_PAGE_GRANULARITY_OFFSET 10U /*!< Secure SRAM2A and SRAM2B Protection granularity offset */ +#define SRAM_SECURE_PAGE_GRANULARITY (1UL << SRAM_SECURE_PAGE_GRANULARITY_OFFSET) /*!< Secure SRAM2A and SRAM2B Protection granularity, 1KBytes */ +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup FLASH_Private_Macros FLASH Private Macros + * @{ + */ +#define IS_FLASH_MAIN_MEM_ADDRESS(__VALUE__) (((__VALUE__) >= FLASH_BASE) &&\ + ((__VALUE__) <= (FLASH_BASE + FLASH_SIZE - 1UL))) + +#define IS_FLASH_FAST_PROGRAM_ADDRESS(__VALUE__) (((__VALUE__) >= FLASH_BASE) &&\ + ((__VALUE__) <= (FLASH_BASE + FLASH_SIZE - 256UL)) && (((__VALUE__) % 256UL) == 0UL)) + +#define IS_FLASH_PROGRAM_MAIN_MEM_ADDRESS(__VALUE__) (((__VALUE__) >= FLASH_BASE) &&\ + ((__VALUE__) <= (FLASH_BASE + FLASH_SIZE - 8UL)) && (((__VALUE__) % 8UL) == 0UL)) + +#define IS_FLASH_PROGRAM_OTP_ADDRESS(__VALUE__) (((__VALUE__) >= OTP_AREA_BASE) &&\ + ((__VALUE__) <= (OTP_AREA_END_ADDR + 1UL - 8UL)) && (((__VALUE__) % 8UL) == 0UL)) + +#define IS_FLASH_PROGRAM_ADDRESS(__VALUE__) (IS_FLASH_PROGRAM_MAIN_MEM_ADDRESS(__VALUE__) ||\ + IS_FLASH_PROGRAM_OTP_ADDRESS(__VALUE__)) + +#define IS_FLASH_PAGE(__VALUE__) ((__VALUE__) < FLASH_PAGE_NB) + +#define IS_ADDR_ALIGNED_64BITS(__VALUE__) (((__VALUE__) & 0x7U) == (0x00UL)) + +#define IS_FLASH_TYPEERASE(__VALUE__) ((__VALUE__) == FLASH_TYPEERASE_PAGES) + +#define IS_FLASH_TYPEPROGRAM(__VALUE__) (((__VALUE__) == FLASH_TYPEPROGRAM_DOUBLEWORD) || \ + ((__VALUE__) == FLASH_TYPEPROGRAM_FAST)) + +#define IS_OB_SFSA_START_ADDR(__VALUE__) (((__VALUE__) >= FLASH_BASE) &&\ + ((__VALUE__) <= FLASH_END_ADDR) && (((__VALUE__) & ~(uint32_t)(FLASH_PAGE_SIZE - 1U)) == (__VALUE__))) +#define IS_OB_SBRSA_START_ADDR(__VALUE__) (((__VALUE__) >= SRAM2A_BASE) &&\ + ((__VALUE__) <= (SRAM2A_BASE + SRAM2A_SIZE - 1U)) && (((__VALUE__) & ~0x3FFU) == (__VALUE__))) +#define IS_OB_SNBRSA_START_ADDR(__VALUE__) (((__VALUE__) >= SRAM2B_BASE) &&\ + ((__VALUE__) <= (SRAM2B_BASE + SRAM2B_SIZE - 1U)) && (((__VALUE__) & ~0x3FFU) == (__VALUE__))) +#define IS_OB_SECURE_MODE(__VALUE__) (((__VALUE__) == SYSTEM_IN_SECURE_MODE) ||\ + ((__VALUE__) == SYSTEM_NOT_IN_SECURE_MODE)) + +#define IS_OPTIONBYTE(__VALUE__) (((__VALUE__) <= (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_PCROP | \ + OPTIONBYTE_IPCC_BUF_ADDR | OPTIONBYTE_C2_BOOT_VECT | OPTIONBYTE_SECURE_MODE))) + +#define IS_OB_WRPAREA(__VALUE__) (((__VALUE__) == OB_WRPAREA_BANK1_AREAA) ||\ + ((__VALUE__) == OB_WRPAREA_BANK1_AREAB)) + +#define IS_OB_RDP_LEVEL(__VALUE__) (((__VALUE__) == OB_RDP_LEVEL_0) ||\ + ((__VALUE__) == OB_RDP_LEVEL_1) ||\ + ((__VALUE__) == OB_RDP_LEVEL_2)) + +#define IS_OB_USER_TYPE(__VALUE__) ((((__VALUE__) & OB_USER_ALL) != 0U) && \ + (((__VALUE__) & ~OB_USER_ALL) == 0U)) + +#define IS_OB_USER_CONFIG(__TYPE__, __VALUE__) ((((__TYPE__) & OB_USER_BOR_LEV) == OB_USER_BOR_LEV) \ + ? ((((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_BOR_LEV)) == OB_BOR_LEVEL_0) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_BOR_LEV)) == OB_BOR_LEVEL_1) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_BOR_LEV)) == OB_BOR_LEVEL_2) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_BOR_LEV)) == OB_BOR_LEVEL_3) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_BOR_LEV)) == OB_BOR_LEVEL_4)) \ + : ((((__TYPE__) & OB_USER_AGC_TRIM) == OB_USER_AGC_TRIM) \ + ? ((((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_AGC_TRIM)) == OB_AGC_TRIM_0) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_AGC_TRIM)) == OB_AGC_TRIM_1) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_AGC_TRIM)) == OB_AGC_TRIM_2) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_AGC_TRIM)) == OB_AGC_TRIM_3) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_AGC_TRIM)) == OB_AGC_TRIM_4) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_AGC_TRIM)) == OB_AGC_TRIM_5) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_AGC_TRIM)) == OB_AGC_TRIM_6) || \ + (((__VALUE__) & ~(OB_USER_ALL & ~OB_USER_AGC_TRIM)) == OB_AGC_TRIM_7)) \ + : ((~(__TYPE__) & (__VALUE__)) == 0U))) + +#define IS_OB_USER_AGC_TRIMMING(__VALUE__) (((__VALUE__) == OB_AGC_TRIM_0) || ((__VALUE__) == OB_AGC_TRIM_1) || \ + ((__VALUE__) == OB_AGC_TRIM_2) || ((__VALUE__) == OB_AGC_TRIM_3) || \ + ((__VALUE__) == OB_AGC_TRIM_4) || ((__VALUE__) == OB_AGC_TRIM_5) || \ + ((__VALUE__) == OB_AGC_TRIM_6) || ((__VALUE__) == OB_AGC_TRIM_7)) + +#define IS_OB_USER_BOR_LEVEL(__VALUE__) (((__VALUE__) == OB_BOR_LEVEL_0) || ((__VALUE__) == OB_BOR_LEVEL_1) || \ + ((__VALUE__) == OB_BOR_LEVEL_2) || ((__VALUE__) == OB_BOR_LEVEL_3) || \ + ((__VALUE__) == OB_BOR_LEVEL_4)) + +#define IS_OB_PCROP_CONFIG(__VALUE__) (((__VALUE__) &\ + ~(OB_PCROP_ZONE_A | OB_PCROP_ZONE_B | OB_PCROP_RDP_ERASE)) == 0U) + +#define IS_OB_IPCC_BUF_ADDR(__VALUE__) (IS_OB_SBRSA_START_ADDR(__VALUE__) ||\ + IS_OB_SNBRSA_START_ADDR(__VALUE__)) + +#define IS_OB_BOOT_VECTOR_ADDR(__VALUE__) ((((__VALUE__) >= FLASH_BASE) && ((__VALUE__) <= (FLASH_BASE + FLASH_SIZE - 1U))) || \ + (((__VALUE__) >= SRAM1_BASE) && ((__VALUE__) <= (SRAM1_BASE + SRAM1_SIZE - 1U))) || \ + (((__VALUE__) >= SRAM2A_BASE) && ((__VALUE__) <= (SRAM2A_BASE + SRAM2A_SIZE - 1U))) || \ + (((__VALUE__) >= SRAM2B_BASE) && ((__VALUE__) <= (SRAM2B_BASE + SRAM2B_SIZE - 1U)))) + +#define IS_OB_BOOT_REGION(__VALUE__) (((__VALUE__) == OB_C2_BOOT_FROM_FLASH) ||\ + ((__VALUE__) == OB_C2_BOOT_FROM_SRAM)) + +#define IS_OB_SECURE_CONFIG(__VALUE__) (((__VALUE__) &\ + ~(OB_SECURE_CONFIG_MEMORY | OB_SECURE_CONFIG_BOOT_RESET)) == 0U) + +#define IS_FLASH_LATENCY(__VALUE__) (((__VALUE__) == FLASH_LATENCY_0) || \ + ((__VALUE__) == FLASH_LATENCY_1) || \ + ((__VALUE__) == FLASH_LATENCY_2) || \ + ((__VALUE__) == FLASH_LATENCY_3)) +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_FLASH_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h new file mode 100644 index 0000000..90eb35c --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_flash_ex.h @@ -0,0 +1,137 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_flash_ex.h + * @author MCD Application Team + * @brief Header file of FLASH HAL Extended module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_FLASH_EX_H +#define STM32WBxx_HAL_FLASH_EX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup FLASHEx + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup FLASHEx_Exported_Constants FLASH Exported Constants + * @{ + */ +/** @defgroup FLASHEx_EMPTY_CHECK FLASHEx Empty Check + * @{ + */ +#define FLASH_PROG_NOT_EMPTY 0x00000000U /*!< 1st location in Flash is programmed */ +#define FLASH_PROG_EMPTY FLASH_ACR_EMPTY /*!< 1st location in Flash is empty */ +/** + * @} + */ + +/** @defgroup FLASHEx_ECC_CPUID FLASHEx ECC CPU Identification + * @{ + */ +#define FLASH_ECC_CPUID_1 0x00000000U /*!< Bus-ID of the CPU1 access causing the ECC failure. */ +#define FLASH_ECC_CPUID_2 FLASH_ECCR_CPUID_0 /*!< Bus-ID of the CPU2 access causing the ECC failure. */ + +/** + * @} + */ +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup FLASHEx_ECC FLASH ECC Macros + * @brief macros to get Error Code Correction information + * @{ + */ + +/** + * @brief Get the Bus-ID of the CPU access causing the ECC failure + * @retval CPUID + */ +#define __HAL_FLASH_ECC_CPUID() READ_BIT(FLASH->ECCR, FLASH_ECCR_CPUID) + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup FLASHEx_Exported_Functions + * @{ + */ + +/* Extended Program operation functions *************************************/ +/** @addtogroup FLASHEx_Exported_Functions_Group1 + * @{ + */ +HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError); +HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit); +uint32_t HAL_FLASHEx_FlashEmptyCheck(void); +void HAL_FLASHEx_ForceFlashEmpty(uint32_t FlashEmpty); +HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit); +void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit); +void HAL_FLASHEx_SuspendOperation(void); +void HAL_FLASHEx_AllowOperation(void); +uint32_t HAL_FLASHEx_IsOperationSuspended(void); +/** + * @} + */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup FLASHEx_Private_Macros FLASHEx Private Macros + * @{ + */ +#define IS_FLASH_EMPTY_CHECK(__VALUE__) (((__VALUE__) == FLASH_PROG_EMPTY) || ((__VALUE__) == FLASH_PROG_NOT_EMPTY)) +/** + * @} + */ + +/* Private Functions ---------------------------------------------------------*/ +/** @defgroup FLASHEx_Private_Functions FLASHEx Private Functions + * @{ + */ +void FLASH_PageErase(uint32_t Page); +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_FLASH_EX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h new file mode 100644 index 0000000..74f461f --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio.h @@ -0,0 +1,329 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_gpio.h + * @author MCD Application Team + * @brief Header file of GPIO HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_GPIO_H +#define STM32WBxx_HAL_GPIO_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup GPIO GPIO + * @brief GPIO HAL module driver + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ + +/** @defgroup GPIO_Exported_Types GPIO Exported Types + * @{ + */ +/** + * @brief GPIO Init structure definition + */ +typedef struct +{ + uint32_t Pin; /*!< Specifies the GPIO pins to be configured. + This parameter can be any value of @ref GPIO_pins */ + + uint32_t Mode; /*!< Specifies the operating mode for the selected pins. + This parameter can be a value of @ref GPIO_mode */ + + uint32_t Pull; /*!< Specifies the Pull-up or Pull-Down activation for the selected pins. + This parameter can be a value of @ref GPIO_pull */ + + uint32_t Speed; /*!< Specifies the speed for the selected pins. + This parameter can be a value of @ref GPIO_speed */ + + uint32_t Alternate; /*!< Peripheral to be connected to the selected pins + This parameter can be a value of @ref GPIOEx_Alternate_function_selection */ +} GPIO_InitTypeDef; + +/** + * @brief GPIO Bit SET and Bit RESET enumeration + */ +typedef enum +{ + GPIO_PIN_RESET = 0U, + GPIO_PIN_SET +} GPIO_PinState; +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup GPIO_Exported_Constants GPIO Exported Constants + * @{ + */ +/** @defgroup GPIO_pins GPIO pins + * @{ + */ +#define GPIO_PIN_0 ((uint16_t)0x0001) /* Pin 0 selected */ +#define GPIO_PIN_1 ((uint16_t)0x0002) /* Pin 1 selected */ +#define GPIO_PIN_2 ((uint16_t)0x0004) /* Pin 2 selected */ +#define GPIO_PIN_3 ((uint16_t)0x0008) /* Pin 3 selected */ +#define GPIO_PIN_4 ((uint16_t)0x0010) /* Pin 4 selected */ +#define GPIO_PIN_5 ((uint16_t)0x0020) /* Pin 5 selected */ +#define GPIO_PIN_6 ((uint16_t)0x0040) /* Pin 6 selected */ +#define GPIO_PIN_7 ((uint16_t)0x0080) /* Pin 7 selected */ +#define GPIO_PIN_8 ((uint16_t)0x0100) /* Pin 8 selected */ +#define GPIO_PIN_9 ((uint16_t)0x0200) /* Pin 9 selected */ +#define GPIO_PIN_10 ((uint16_t)0x0400) /* Pin 10 selected */ +#define GPIO_PIN_11 ((uint16_t)0x0800) /* Pin 11 selected */ +#define GPIO_PIN_12 ((uint16_t)0x1000) /* Pin 12 selected */ +#define GPIO_PIN_13 ((uint16_t)0x2000) /* Pin 13 selected */ +#define GPIO_PIN_14 ((uint16_t)0x4000) /* Pin 14 selected */ +#define GPIO_PIN_15 ((uint16_t)0x8000) /* Pin 15 selected */ +#define GPIO_PIN_All ((uint16_t)0xFFFF) /* All pins selected */ + +#define GPIO_PIN_MASK ((uint32_t)0x0000FFFF) /* PIN mask for assert test */ +/** + * @} + */ + +/** @defgroup GPIO_mode GPIO mode + * @brief GPIO Configuration Mode + * Elements values convention: 0x00WX00YZ + * - W : EXTI trigger detection on 3 bits + * - X : EXTI mode (IT or Event) on 2 bits + * - Y : Output type (Push Pull or Open Drain) on 1 bit + * - Z : GPIO mode (Input, Output, Alternate or Analog) on 2 bits + * @{ + */ +#define GPIO_MODE_INPUT MODE_INPUT /*!< Input Floating Mode */ +#define GPIO_MODE_OUTPUT_PP (MODE_OUTPUT | OUTPUT_PP) /*!< Output Push Pull Mode */ +#define GPIO_MODE_OUTPUT_OD (MODE_OUTPUT | OUTPUT_OD) /*!< Output Open Drain Mode */ +#define GPIO_MODE_AF_PP (MODE_AF | OUTPUT_PP) /*!< Alternate Function Push Pull Mode */ +#define GPIO_MODE_AF_OD (MODE_AF | OUTPUT_OD) /*!< Alternate Function Open Drain Mode */ +#define GPIO_MODE_ANALOG MODE_ANALOG /*!< Analog Mode */ +#define GPIO_MODE_IT_RISING (MODE_INPUT | EXTI_IT | TRIGGER_RISING) /*!< External Interrupt Mode with Rising edge trigger detection */ +#define GPIO_MODE_IT_FALLING (MODE_INPUT | EXTI_IT | TRIGGER_FALLING) /*!< External Interrupt Mode with Falling edge trigger detection */ +#define GPIO_MODE_IT_RISING_FALLING (MODE_INPUT | EXTI_IT | TRIGGER_RISING | TRIGGER_FALLING) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */ +#define GPIO_MODE_EVT_RISING (MODE_INPUT | EXTI_EVT | TRIGGER_RISING) /*!< External Event Mode with Rising edge trigger detection */ +#define GPIO_MODE_EVT_FALLING (MODE_INPUT | EXTI_EVT | TRIGGER_FALLING) /*!< External Event Mode with Falling edge trigger detection */ +#define GPIO_MODE_EVT_RISING_FALLING (MODE_INPUT | EXTI_EVT | TRIGGER_RISING | TRIGGER_FALLING) /*!< External Event Mode with Rising/Falling edge trigger detection */ + +/** + * @} + */ + +/** @defgroup GPIO_speed GPIO speed + * @brief GPIO Output Maximum frequency + * @{ + */ +#define GPIO_SPEED_FREQ_LOW 0x00000000u /*!< Low speed */ +#define GPIO_SPEED_FREQ_MEDIUM 0x00000001u /*!< Medium speed */ +#define GPIO_SPEED_FREQ_HIGH 0x00000002u /*!< High speed */ +#define GPIO_SPEED_FREQ_VERY_HIGH 0x00000003u /*!< Very high speed */ +/** + * @} + */ + +/** @defgroup GPIO_pull GPIO pull + * @brief GPIO Pull-Up or Pull-Down Activation + * @{ + */ +#define GPIO_NOPULL 0x00000000u /*!< No Pull-up or Pull-down activation */ +#define GPIO_PULLUP 0x00000001u /*!< Pull-up activation */ +#define GPIO_PULLDOWN 0x00000002u /*!< Pull-down activation */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup GPIO_Exported_Macros GPIO Exported Macros + * @{ + */ + +/** + * @brief Check whether the specified EXTI line flag is set or not. + * @param __EXTI_LINE__ specifies the EXTI line flag to check. + * This parameter can be GPIO_PIN_x where x can be(0..15) + * @retval The new state of __EXTI_LINE__ (SET or RESET). + */ +#define __HAL_GPIO_EXTI_GET_FLAG(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__)) + +/** + * @brief Clear the EXTI's line pending flags. + * @param __EXTI_LINE__ specifies the EXTI lines flags to clear. + * This parameter can be any combination of GPIO_PIN_x where x can be (0..15) + * @retval None + */ +#define __HAL_GPIO_EXTI_CLEAR_FLAG(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__)) + +/** + * @brief Check whether the specified EXTI line is asserted or not. + * @param __EXTI_LINE__ specifies the EXTI line to check. + * This parameter can be GPIO_PIN_x where x can be(0..15) + * @retval The new state of __EXTI_LINE__ (SET or RESET). + */ +#define __HAL_GPIO_EXTI_GET_IT(__EXTI_LINE__) (EXTI->PR1 & (__EXTI_LINE__)) + +/** + * @brief Clear the EXTI's line pending bits. + * @param __EXTI_LINE__ specifies the EXTI lines to clear. + * This parameter can be any combination of GPIO_PIN_x where x can be (0..15) + * @retval None + */ +#define __HAL_GPIO_EXTI_CLEAR_IT(__EXTI_LINE__) (EXTI->PR1 = (__EXTI_LINE__)) + +/** + * @brief Generate a Software interrupt on selected EXTI line. + * @param __EXTI_LINE__ specifies the EXTI line to check. + * This parameter can be GPIO_PIN_x where x can be(0..15) + * @retval None + */ +#define __HAL_GPIO_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER1 |= (__EXTI_LINE__)) + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup GPIO_Private_Constants GPIO Private Constants + * @{ + */ +#define GPIO_MODE_Pos 0u +#define GPIO_MODE (0x3uL << GPIO_MODE_Pos) +#define MODE_INPUT (0x0uL << GPIO_MODE_Pos) +#define MODE_OUTPUT (0x1uL << GPIO_MODE_Pos) +#define MODE_AF (0x2uL << GPIO_MODE_Pos) +#define MODE_ANALOG (0x3uL << GPIO_MODE_Pos) +#define OUTPUT_TYPE_Pos 4u +#define OUTPUT_TYPE (0x1uL << OUTPUT_TYPE_Pos) +#define OUTPUT_PP (0x0uL << OUTPUT_TYPE_Pos) +#define OUTPUT_OD (0x1uL << OUTPUT_TYPE_Pos) +#define EXTI_MODE_Pos 16u +#define EXTI_MODE (0x3uL << EXTI_MODE_Pos) +#define EXTI_IT (0x1uL << EXTI_MODE_Pos) +#define EXTI_EVT (0x2uL << EXTI_MODE_Pos) +#define TRIGGER_MODE_Pos 20u +#define TRIGGER_MODE (0x7uL << TRIGGER_MODE_Pos) +#define TRIGGER_RISING (0x1uL << TRIGGER_MODE_Pos) +#define TRIGGER_FALLING (0x2uL << TRIGGER_MODE_Pos) + +/** + * @} + */ + +/** @defgroup GPIO_Private_Macros GPIO Private Macros + * @{ + */ +#define IS_GPIO_PIN_ACTION(ACTION) (((ACTION) == GPIO_PIN_RESET) || ((ACTION) == GPIO_PIN_SET)) + +#define IS_GPIO_PIN(__PIN__) ((((uint32_t)(__PIN__) & GPIO_PIN_MASK) != 0x00u) &&\ + (((uint32_t)(__PIN__) & ~GPIO_PIN_MASK) == 0x00u)) + +#define IS_GPIO_COMMON_PIN(__RESETMASK__, __SETMASK__) \ + (((uint32_t)(__RESETMASK__) & (uint32_t)(__SETMASK__)) == 0x00u) + + +#define IS_GPIO_MODE(__MODE__) (((__MODE__) == GPIO_MODE_INPUT) ||\ + ((__MODE__) == GPIO_MODE_OUTPUT_PP) ||\ + ((__MODE__) == GPIO_MODE_OUTPUT_OD) ||\ + ((__MODE__) == GPIO_MODE_AF_PP) ||\ + ((__MODE__) == GPIO_MODE_AF_OD) ||\ + ((__MODE__) == GPIO_MODE_IT_RISING) ||\ + ((__MODE__) == GPIO_MODE_IT_FALLING) ||\ + ((__MODE__) == GPIO_MODE_IT_RISING_FALLING) ||\ + ((__MODE__) == GPIO_MODE_EVT_RISING) ||\ + ((__MODE__) == GPIO_MODE_EVT_FALLING) ||\ + ((__MODE__) == GPIO_MODE_EVT_RISING_FALLING) ||\ + ((__MODE__) == GPIO_MODE_ANALOG)) + +#define IS_GPIO_SPEED(__SPEED__) (((__SPEED__) == GPIO_SPEED_FREQ_LOW) ||\ + ((__SPEED__) == GPIO_SPEED_FREQ_MEDIUM) ||\ + ((__SPEED__) == GPIO_SPEED_FREQ_HIGH) ||\ + ((__SPEED__) == GPIO_SPEED_FREQ_VERY_HIGH)) + +#define IS_GPIO_PULL(__PULL__) (((__PULL__) == GPIO_NOPULL) ||\ + ((__PULL__) == GPIO_PULLUP) || \ + ((__PULL__) == GPIO_PULLDOWN)) +/** + * @} + */ + +/* Include GPIO HAL Extended module */ +#include "stm32wbxx_hal_gpio_ex.h" + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup GPIO_Exported_Functions GPIO Exported Functions + * @brief GPIO Exported Functions + * @{ + */ + +/** @defgroup GPIO_Exported_Functions_Group1 Initialization/de-initialization functions + * @brief Initialization and Configuration functions + * @{ + */ + +/* Initialization and de-initialization functions *****************************/ +void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init); +void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin); + +/** + * @} + */ + +/** @defgroup GPIO_Exported_Functions_Group2 IO operation functions + * @brief IO operation functions + * @{ + */ + +/* IO operation functions *****************************************************/ +GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin); +void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState); +void HAL_GPIO_WriteMultipleStatePin(GPIO_TypeDef *GPIOx, uint16_t PinReset, uint16_t PinSet); +void HAL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin); +HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin); +void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin); +void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_GPIO_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h new file mode 100644 index 0000000..ff5bf63 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_gpio_ex.h @@ -0,0 +1,679 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_gpio_ex.h + * @author MCD Application Team + * @brief Header file of GPIO HAL Extended module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_GPIO_EX_H +#define STM32WBxx_HAL_GPIO_EX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup GPIOEx GPIOEx + * @brief GPIO Extended HAL module driver + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup GPIOEx_Exported_Constants GPIOEx Exported Constants + * @{ + */ + +/** @defgroup GPIOEx_Alternate_function_selection GPIOEx Alternate function selection + * @{ + */ + + +/* The table below gives an overview of the different alternate functions per port. + * For more details refer yourself to the product data sheet. + * + */ + +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) +/** + * @brief AF 0 selection + */ +#define GPIO_AF0_MCO ((uint8_t)0x00) /*!< MCO Alternate Function mapping */ +#define GPIO_AF0_LSCO ((uint8_t)0x00) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF0_JTMS_SWDIO ((uint8_t)0x00) /*!< JTMS-SWDIO Alternate Function mapping */ +#define GPIO_AF0_JTCK_SWCLK ((uint8_t)0x00) /*!< JTCK-SWCLK Alternate Function mapping */ +#define GPIO_AF0_JTDI ((uint8_t)0x00) /*!< JTDI Alternate Function mapping */ +#define GPIO_AF0_RTC_OUT ((uint8_t)0x00) /*!< RCT_OUT Alternate Function mapping */ +#define GPIO_AF0_JTD_TRACE ((uint8_t)0x00) /*!< JTDO-TRACESWO Alternate Function mapping */ +#define GPIO_AF0_NJTRST ((uint8_t)0x00) /*!< NJTRST Alternate Function mapping */ +#define GPIO_AF0_RTC_REFIN ((uint8_t)0x00) /*!< RTC_REFIN Alternate Function mapping */ +#define GPIO_AF0_TRACED0 ((uint8_t)0x00) /*!< TRACED0 Alternate Function mapping */ +#define GPIO_AF0_TRACED1 ((uint8_t)0x00) /*!< TRACED1 Alternate Function mapping */ +#define GPIO_AF0_TRACED2 ((uint8_t)0x00) /*!< TRACED2 Alternate Function mapping */ +#define GPIO_AF0_TRACED3 ((uint8_t)0x00) /*!< TRACED3 Alternate Function mapping */ +#define GPIO_AF0_TRIG_INOUT ((uint8_t)0x00) /*!< TRIG_INOUT Alternate Function mapping */ +#define GPIO_AF0_TRACECK ((uint8_t)0x00) /*!< TRACECK Alternate Function mapping */ +#define GPIO_AF0_SYS ((uint8_t)0x00) /*!< System Function mapping */ + +/** + * @brief AF 1 selection + */ +#define GPIO_AF1_TIM1 ((uint8_t)0x01) /*!< TIM1 Alternate Function mapping */ +#define GPIO_AF1_TIM2 ((uint8_t)0x01) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /*!< LPTIM1 Alternate Function mapping */ + +/** + * @brief AF 2 selection + */ +#define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 3 selection + */ +#define GPIO_AF3_SAI1 ((uint8_t)0x03) /*!< SAI1_CK1 Alternate Function mapping */ +#define GPIO_AF3_SPI2 ((uint8_t)0x03) /*!< SPI2 Alternate Function mapping */ +#define GPIO_AF3_TIM1 ((uint8_t)0x03) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 4 selection + */ +#define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< I2C1 Alternate Function mapping */ +#define GPIO_AF4_I2C3 ((uint8_t)0x04) /*!< I2C3 Alternate Function mapping */ + +/** + * @brief AF 5 selection + */ +#define GPIO_AF5_SPI1 ((uint8_t)0x05) /*!< SPI1 Alternate Function mapping */ +#define GPIO_AF5_SPI2 ((uint8_t)0x05) /*!< SPI2 Alternate Function mapping */ +/** + * @brief AF 6 selection + */ +#define GPIO_AF6_MCO ((uint8_t)0x06) /*!< MCO Alternate Function mapping */ +#define GPIO_AF6_LSCO ((uint8_t)0x06) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF6_RF_DTB0 ((uint8_t)0x06) /*!< RF_DTB0 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB1 ((uint8_t)0x06) /*!< RF_DTB1 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB2 ((uint8_t)0x06) /*!< RF_DTB2 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB3 ((uint8_t)0x06) /*!< RF_DTB3 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB4 ((uint8_t)0x06) /*!< RF_DTB4 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB5 ((uint8_t)0x06) /*!< RF_DTB5 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB6 ((uint8_t)0x06) /*!< RF_DTB6 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB7 ((uint8_t)0x06) /*!< RF_DTB7 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB8 ((uint8_t)0x06) /*!< RF_DTB8 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB9 ((uint8_t)0x06) /*!< RF_DTB9 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB10 ((uint8_t)0x06) /*!< RF_DTB10 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB11 ((uint8_t)0x06) /*!< RF_DTB11 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB12 ((uint8_t)0x06) /*!< RF_DTB12 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB13 ((uint8_t)0x06) /*!< RF_DTB13 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB14 ((uint8_t)0x06) /*!< RF_DTB14 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB15 ((uint8_t)0x06) /*!< RF_DTB15 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB16 ((uint8_t)0x06) /*!< RF_DTB16 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB17 ((uint8_t)0x06) /*!< RF_DTB17 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB18 ((uint8_t)0x06) /*!< RF_DTB18 Alternate Function mapping */ +#define GPIO_AF6_RF_MISO ((uint8_t)0x06) /*!< RF_MISO Alternate Function mapping */ +#define GPIO_AF6_RF_MOSI ((uint8_t)0x06) /*!< RF_MOSI Alternate Function mapping */ +#define GPIO_AF6_RF_SCK ((uint8_t)0x06) /*!< RF_SCK Alternate Function mapping */ +#define GPIO_AF6_RF_NSS ((uint8_t)0x06) /*!< RF_NSS Alternate Function mapping */ +/** + * @brief AF 7 selection + */ +#define GPIO_AF7_USART1 ((uint8_t)0x07) /*!< USART1 Alternate Function mapping */ + +/** + * @brief AF 8 selection + */ +#define GPIO_AF8_LPUART1 ((uint8_t)0x08) /*!< LPUART1 Alternate Function mapping */ +#define GPIO_AF8_IR ((uint8_t)0x08) /*!< IR Alternate Function mapping */ + +/** + * @brief AF 9 selection + */ +#define GPIO_AF9_TSC ((uint8_t)0x09) /*!< TSC Alternate Function mapping */ + +/** + * @brief AF 10 selection + */ +#define GPIO_AF10_QUADSPI ((uint8_t)0x0a) /*!< QUADSPI Alternate Function mapping */ +#define GPIO_AF10_USB ((uint8_t)0x0a) /*!< USB Alternate Function mapping */ + +/** + * @brief AF 11 selection + */ +#define GPIO_AF11_LCD ((uint8_t)0x0b) /*!< LCD Alternate Function mapping */ + +/** + * @brief AF 12 selection + */ +#define GPIO_AF12_COMP1 ((uint8_t)0x0c) /*!< COMP1 Alternate Function mapping */ +#define GPIO_AF12_COMP2 ((uint8_t)0x0c) /*!< COMP2 Alternate Function mapping */ +#define GPIO_AF12_TIM1 ((uint8_t)0x0c) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 13 selection + */ +#define GPIO_AF13_SAI1 ((uint8_t)0x0d) /*!< SAI1 Alternate Function mapping */ + +/** + * @brief AF 14 selection + */ +#define GPIO_AF14_TIM2 ((uint8_t)0x0e) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF14_TIM16 ((uint8_t)0x0e) /*!< TIM16 Alternate Function mapping */ +#define GPIO_AF14_TIM17 ((uint8_t)0x0e) /*!< TIM17 Alternate Function mapping */ +#define GPIO_AF14_LPTIM2 ((uint8_t)0x0e) /*!< LPTIM2 Alternate Function mapping */ + + +/** + * @brief AF 15 selection + */ +#define GPIO_AF15_EVENTOUT ((uint8_t)0x0f) /*!< EVENTOUT Alternate Function mapping */ + +#define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x0f) + +#endif /* STM32WB55xx || STM32WB5Mxx */ + + +#if defined (STM32WB50xx) +/** + * @brief AF 0 selection + */ +#define GPIO_AF0_MCO ((uint8_t)0x00) /*!< MCO Alternate Function mapping */ +#define GPIO_AF0_LSCO ((uint8_t)0x00) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF0_JTMS_SWDIO ((uint8_t)0x00) /*!< JTMS-SWDIO Alternate Function mapping */ +#define GPIO_AF0_JTCK_SWCLK ((uint8_t)0x00) /*!< JTCK-SWCLK Alternate Function mapping */ +#define GPIO_AF0_JTDI ((uint8_t)0x00) /*!< JTDI Alternate Function mapping */ +#define GPIO_AF0_RTC_OUT ((uint8_t)0x00) /*!< RCT_OUT Alternate Function mapping */ +#define GPIO_AF0_JTD_TRACE ((uint8_t)0x00) /*!< JTDO-TRACESWO Alternate Function mapping */ +#define GPIO_AF0_NJTRST ((uint8_t)0x00) /*!< NJTRST Alternate Function mapping */ + +/** + * @brief AF 1 selection + */ +#define GPIO_AF1_TIM1 ((uint8_t)0x01) /*!< TIM1 Alternate Function mapping */ +#define GPIO_AF1_TIM2 ((uint8_t)0x01) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /*!< LPTIM1 Alternate Function mapping */ + +/** + * @brief AF 2 selection + */ +#define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< TIM1 Alternate Function mapping */ +#define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< TIM2 Alternate Function mapping */ + +/** + * @brief AF 3 selection + */ +#define GPIO_AF3_TIM1 ((uint8_t)0x03) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 4 selection + */ +#define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< I2C1 Alternate Function mapping */ + +/** + * @brief AF 5 selection + */ +#define GPIO_AF5_SPI1 ((uint8_t)0x05) /*!< SPI1 Alternate Function mapping */ +/** + * @brief AF 6 selection + */ +#define GPIO_AF6_MCO ((uint8_t)0x06) /*!< MCO Alternate Function mapping */ +#define GPIO_AF6_LSCO ((uint8_t)0x06) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF6_RF_DTB0 ((uint8_t)0x06) /*!< RF_DTB0 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB1 ((uint8_t)0x06) /*!< RF_DTB1 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB2 ((uint8_t)0x06) /*!< RF_DTB2 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB3 ((uint8_t)0x06) /*!< RF_DTB3 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB4 ((uint8_t)0x06) /*!< RF_DTB4 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB5 ((uint8_t)0x06) /*!< RF_DTB5 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB6 ((uint8_t)0x06) /*!< RF_DTB6 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB7 ((uint8_t)0x06) /*!< RF_DTB7 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB8 ((uint8_t)0x06) /*!< RF_DTB8 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB9 ((uint8_t)0x06) /*!< RF_DTB9 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB10 ((uint8_t)0x06) /*!< RF_DTB10 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB11 ((uint8_t)0x06) /*!< RF_DTB11 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB12 ((uint8_t)0x06) /*!< RF_DTB12 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB13 ((uint8_t)0x06) /*!< RF_DTB13 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB14 ((uint8_t)0x06) /*!< RF_DTB14 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB15 ((uint8_t)0x06) /*!< RF_DTB15 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB16 ((uint8_t)0x06) /*!< RF_DTB16 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB17 ((uint8_t)0x06) /*!< RF_DTB17 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB18 ((uint8_t)0x06) /*!< RF_DTB18 Alternate Function mapping */ +#define GPIO_AF6_RF_MISO ((uint8_t)0x06) /*!< RF_MISO Alternate Function mapping */ +#define GPIO_AF6_RF_MOSI ((uint8_t)0x06) /*!< RF_MOSI Alternate Function mapping */ +#define GPIO_AF6_RF_SCK ((uint8_t)0x06) /*!< RF_SCK Alternate Function mapping */ +#define GPIO_AF6_RF_NSS ((uint8_t)0x06) /*!< RF_NSS Alternate Function mapping */ + +/** + * @brief AF 7 selection + */ +#define GPIO_AF7_USART1 ((uint8_t)0x07) /*!< USART1 Alternate Function mapping */ + +/** + * @brief AF 8 selection + */ +#define GPIO_AF8_IR ((uint8_t)0x08) /*!< IR Alternate Function mapping */ + +/** + * @brief AF 12 selection + */ +#define GPIO_AF12_TIM1 ((uint8_t)0x0c) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 14 selection + */ +#define GPIO_AF14_TIM2 ((uint8_t)0x0e) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF14_TIM16 ((uint8_t)0x0e) /*!< TIM16 Alternate Function mapping */ +#define GPIO_AF14_TIM17 ((uint8_t)0x0e) /*!< TIM17 Alternate Function mapping */ +#define GPIO_AF14_LPTIM2 ((uint8_t)0x0e) /*!< LPTIM2 Alternate Function mapping */ + +/** + * @brief AF 15 selection + */ +#define GPIO_AF15_EVENTOUT ((uint8_t)0x0f) /*!< EVENTOUT Alternate Function mapping */ + +#define IS_GPIO_AF(AF) (((AF) <= (uint8_t)0x0F)\ + && ((AF) != (uint8_t)0x09) && ((AF) != (uint8_t)0x0A) && ((AF) != (uint8_t)0x0B) && ((AF) != (uint8_t)0x0D)) + +#endif /* STM32WB50xx */ + + +#if defined (STM32WB35xx) +/** + * @brief AF 0 selection + */ +#define GPIO_AF0_MCO ((uint8_t)0x00) /*!< MCO Alternate Function mapping */ +#define GPIO_AF0_LSCO ((uint8_t)0x00) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF0_JTMS_SWDIO ((uint8_t)0x00) /*!< JTMS-SWDIO Alternate Function mapping */ +#define GPIO_AF0_JTCK_SWCLK ((uint8_t)0x00) /*!< JTCK-SWCLK Alternate Function mapping */ +#define GPIO_AF0_JTDI ((uint8_t)0x00) /*!< JTDI Alternate Function mapping */ +#define GPIO_AF0_RTC_OUT ((uint8_t)0x00) /*!< RCT_OUT Alternate Function mapping */ +#define GPIO_AF0_JTD_TRACE ((uint8_t)0x00) /*!< JTDO-TRACESWO Alternate Function mapping */ +#define GPIO_AF0_NJTRST ((uint8_t)0x00) /*!< NJTRST Alternate Function mapping */ +#define GPIO_AF0_TRACED0 ((uint8_t)0x00) /*!< TRACED0 Alternate Function mapping */ +#define GPIO_AF0_TRACED1 ((uint8_t)0x00) /*!< TRACED1 Alternate Function mapping */ +#define GPIO_AF0_TRACED2 ((uint8_t)0x00) /*!< TRACED2 Alternate Function mapping */ +#define GPIO_AF0_TRACED3 ((uint8_t)0x00) /*!< TRACED3 Alternate Function mapping */ + +/** + * @brief AF 1 selection + */ +#define GPIO_AF1_TIM1 ((uint8_t)0x01) /*!< TIM1 Alternate Function mapping */ +#define GPIO_AF1_TIM2 ((uint8_t)0x01) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /*!< LPTIM1 Alternate Function mapping */ + +/** + * @brief AF 2 selection + */ +#define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< TIM1 Alternate Function mapping */ +#define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< TIM2 Alternate Function mapping */ + +/** + * @brief AF 3 selection + */ +#define GPIO_AF3_SAI1 ((uint8_t)0x03) /*!< SAI1_CK1 Alternate Function mapping */ +#define GPIO_AF3_TIM1 ((uint8_t)0x03) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 4 selection + */ +#define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< I2C1 Alternate Function mapping */ +#define GPIO_AF4_I2C3 ((uint8_t)0x04) /*!< I2C3 Alternate Function mapping */ + +/** + * @brief AF 5 selection + */ +#define GPIO_AF5_SPI1 ((uint8_t)0x05) /*!< SPI1 Alternate Function mapping */ + +/** + * @brief AF 6 selection + */ +#define GPIO_AF6_MCO ((uint8_t)0x06) /*!< MCO Alternate Function mapping */ +#define GPIO_AF6_LSCO ((uint8_t)0x06) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF6_RF_DTB0 ((uint8_t)0x06) /*!< RF_DTB0 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB1 ((uint8_t)0x06) /*!< RF_DTB1 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB2 ((uint8_t)0x06) /*!< RF_DTB2 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB3 ((uint8_t)0x06) /*!< RF_DTB3 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB4 ((uint8_t)0x06) /*!< RF_DTB4 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB5 ((uint8_t)0x06) /*!< RF_DTB5 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB6 ((uint8_t)0x06) /*!< RF_DTB6 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB7 ((uint8_t)0x06) /*!< RF_DTB7 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB8 ((uint8_t)0x06) /*!< RF_DTB8 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB9 ((uint8_t)0x06) /*!< RF_DTB9 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB10 ((uint8_t)0x06) /*!< RF_DTB10 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB11 ((uint8_t)0x06) /*!< RF_DTB11 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB12 ((uint8_t)0x06) /*!< RF_DTB12 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB13 ((uint8_t)0x06) /*!< RF_DTB13 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB14 ((uint8_t)0x06) /*!< RF_DTB14 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB15 ((uint8_t)0x06) /*!< RF_DTB15 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB16 ((uint8_t)0x06) /*!< RF_DTB16 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB17 ((uint8_t)0x06) /*!< RF_DTB17 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB18 ((uint8_t)0x06) /*!< RF_DTB18 Alternate Function mapping */ +#define GPIO_AF6_RF_MISO ((uint8_t)0x06) /*!< RF_MISO Alternate Function mapping */ +#define GPIO_AF6_RF_MOSI ((uint8_t)0x06) /*!< RF_MOSI Alternate Function mapping */ +#define GPIO_AF6_RF_SCK ((uint8_t)0x06) /*!< RF_SCK Alternate Function mapping */ +#define GPIO_AF6_RF_NSS ((uint8_t)0x06) /*!< RF_NSS Alternate Function mapping */ + +/** + * @brief AF 7 selection + */ +#define GPIO_AF7_USART1 ((uint8_t)0x07) /*!< USART1 Alternate Function mapping */ + +/** + * @brief AF 8 selection + */ +#define GPIO_AF8_IR ((uint8_t)0x08) /*!< IR Alternate Function mapping */ +#define GPIO_AF8_LPUART1 ((uint8_t)0x08) /*!< LPUART1 Alternate Function mapping */ + +/** + * @brief AF 10 selection + */ +#define GPIO_AF10_QUADSPI ((uint8_t)0x0A) /*!< QUADSPI Alternate Function mapping */ +#define GPIO_AF10_USB ((uint8_t)0x0A) /*!< USB Alternate Function mapping */ + +/** + * @brief AF 12 selection + */ +#define GPIO_AF12_COMP1 ((uint8_t)0x0C) /*!< COMP1 Alternate Function mapping */ +#define GPIO_AF12_COMP2 ((uint8_t)0x0C) /*!< COMP2 Alternate Function mapping */ +#define GPIO_AF12_TIM1 ((uint8_t)0x0C) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 13 selection + */ +#define GPIO_AF13_SAI1 ((uint8_t)0x0d) /*!< SAI1 Alternate Function mapping */ + +/** + * @brief AF 14 selection + */ +#define GPIO_AF14_LPTIM2 ((uint8_t)0x0E) /*!< LPTIM2 Alternate Function mapping */ +#define GPIO_AF14_TIM2 ((uint8_t)0x0E) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF14_TIM16 ((uint8_t)0x0E) /*!< TIM16 Alternate Function mapping */ +#define GPIO_AF14_TIM17 ((uint8_t)0x0E) /*!< TIM17 Alternate Function mapping */ + +/** + * @brief AF 15 selection + */ +#define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /*!< EVENTOUT Alternate Function mapping */ + +#define IS_GPIO_AF(AF) (((AF) <= (uint8_t)0x0F) && ((AF) != (uint8_t)0x0B) && ((AF) != (uint8_t)0x0D)) + +#endif /* STM32WB35xx */ + +#if defined (STM32WB30xx) +/** + * @brief AF 0 selection + */ +#define GPIO_AF0_MCO ((uint8_t)0x00) /*!< MCO Alternate Function mapping */ +#define GPIO_AF0_LSCO ((uint8_t)0x00) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF0_JTMS_SWDIO ((uint8_t)0x00) /*!< JTMS-SWDIO Alternate Function mapping */ +#define GPIO_AF0_JTCK_SWCLK ((uint8_t)0x00) /*!< JTCK-SWCLK Alternate Function mapping */ +#define GPIO_AF0_JTDI ((uint8_t)0x00) /*!< JTDI Alternate Function mapping */ +#define GPIO_AF0_RTC_OUT ((uint8_t)0x00) /*!< RCT_OUT Alternate Function mapping */ +#define GPIO_AF0_JTD_TRACE ((uint8_t)0x00) /*!< JTDO-TRACESWO Alternate Function mapping */ +#define GPIO_AF0_NJTRST ((uint8_t)0x00) /*!< NJTRST Alternate Function mapping */ +#define GPIO_AF0_TRACED0 ((uint8_t)0x00) /*!< TRACED0 Alternate Function mapping */ +#define GPIO_AF0_TRACED1 ((uint8_t)0x00) /*!< TRACED1 Alternate Function mapping */ +#define GPIO_AF0_TRACED2 ((uint8_t)0x00) /*!< TRACED2 Alternate Function mapping */ +#define GPIO_AF0_TRACED3 ((uint8_t)0x00) /*!< TRACED3 Alternate Function mapping */ + +/** + * @brief AF 1 selection + */ +#define GPIO_AF1_TIM1 ((uint8_t)0x01) /*!< TIM1 Alternate Function mapping */ +#define GPIO_AF1_TIM2 ((uint8_t)0x01) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /*!< LPTIM1 Alternate Function mapping */ + +/** + * @brief AF 2 selection + */ +#define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< TIM1 Alternate Function mapping */ +#define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< TIM2 Alternate Function mapping */ + +/** + * @brief AF 3 selection + */ +#define GPIO_AF3_TIM1 ((uint8_t)0x03) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 4 selection + */ +#define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< I2C1 Alternate Function mapping */ + +/** + * @brief AF 5 selection + */ +#define GPIO_AF5_SPI1 ((uint8_t)0x05) /*!< SPI1 Alternate Function mapping */ + +/** + * @brief AF 6 selection + */ +#define GPIO_AF6_MCO ((uint8_t)0x06) /*!< MCO Alternate Function mapping */ +#define GPIO_AF6_LSCO ((uint8_t)0x06) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF6_RF_DTB0 ((uint8_t)0x06) /*!< RF_DTB0 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB1 ((uint8_t)0x06) /*!< RF_DTB1 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB2 ((uint8_t)0x06) /*!< RF_DTB2 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB3 ((uint8_t)0x06) /*!< RF_DTB3 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB4 ((uint8_t)0x06) /*!< RF_DTB4 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB5 ((uint8_t)0x06) /*!< RF_DTB5 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB6 ((uint8_t)0x06) /*!< RF_DTB6 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB7 ((uint8_t)0x06) /*!< RF_DTB7 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB8 ((uint8_t)0x06) /*!< RF_DTB8 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB9 ((uint8_t)0x06) /*!< RF_DTB9 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB10 ((uint8_t)0x06) /*!< RF_DTB10 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB11 ((uint8_t)0x06) /*!< RF_DTB11 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB12 ((uint8_t)0x06) /*!< RF_DTB12 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB13 ((uint8_t)0x06) /*!< RF_DTB13 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB14 ((uint8_t)0x06) /*!< RF_DTB14 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB15 ((uint8_t)0x06) /*!< RF_DTB15 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB16 ((uint8_t)0x06) /*!< RF_DTB16 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB17 ((uint8_t)0x06) /*!< RF_DTB17 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB18 ((uint8_t)0x06) /*!< RF_DTB18 Alternate Function mapping */ +#define GPIO_AF6_RF_MISO ((uint8_t)0x06) /*!< RF_MISO Alternate Function mapping */ +#define GPIO_AF6_RF_MOSI ((uint8_t)0x06) /*!< RF_MOSI Alternate Function mapping */ +#define GPIO_AF6_RF_SCK ((uint8_t)0x06) /*!< RF_SCK Alternate Function mapping */ +#define GPIO_AF6_RF_NSS ((uint8_t)0x06) /*!< RF_NSS Alternate Function mapping */ + +/** + * @brief AF 7 selection + */ +#define GPIO_AF7_USART1 ((uint8_t)0x07) /*!< USART1 Alternate Function mapping */ + +/** + * @brief AF 8 selection + */ +#define GPIO_AF8_IR ((uint8_t)0x08) /*!< IR Alternate Function mapping */ + +/** + * @brief AF 12 selection + */ +#define GPIO_AF12_TIM1 ((uint8_t)0x0C) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 14 selection + */ +#define GPIO_AF14_LPTIM2 ((uint8_t)0x0E) /*!< LPTIM2 Alternate Function mapping */ +#define GPIO_AF14_TIM2 ((uint8_t)0x0E) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF14_TIM16 ((uint8_t)0x0E) /*!< TIM16 Alternate Function mapping */ +#define GPIO_AF14_TIM17 ((uint8_t)0x0E) /*!< TIM17 Alternate Function mapping */ + +/** + * @brief AF 15 selection + */ +#define GPIO_AF15_EVENTOUT ((uint8_t)0x0F) /*!< EVENTOUT Alternate Function mapping */ + +#define IS_GPIO_AF(AF) (((AF) <= (uint8_t)0x0F)\ + && ((AF) != (uint8_t)0x0A) && ((AF) != (uint8_t)0x0B) && ((AF) != (uint8_t)0x0D)) + +#endif /* STM32WB30xx */ + +#if defined (STM32WB15xx) || defined (STM32WB10xx) || defined (STM32WB1Mxx) +/** + * @brief AF 0 selection + */ +#define GPIO_AF0_MCO ((uint8_t)0x00) /*!< MCO Alternate Function mapping */ +#define GPIO_AF0_LSCO ((uint8_t)0x00) /*!< LSCO Alternate Function mapping */ +#define GPIO_AF0_JTMS_SWDIO ((uint8_t)0x00) /*!< JTMS-SWDIO Alternate Function mapping */ +#define GPIO_AF0_JTCK_SWCLK ((uint8_t)0x00) /*!< JTCK-SWCLK Alternate Function mapping */ +#define GPIO_AF0_JTDI ((uint8_t)0x00) /*!< JTDI Alternate Function mapping */ +#define GPIO_AF0_RTC_OUT ((uint8_t)0x00) /*!< RCT_OUT Alternate Function mapping */ +#define GPIO_AF0_JTD_TRACE ((uint8_t)0x00) /*!< JTDO-TRACESWO Alternate Function mapping */ +#define GPIO_AF0_NJTRST ((uint8_t)0x00) /*!< NJTRST Alternate Function mapping */ + +/** + * @brief AF 1 selection + */ +#define GPIO_AF1_TIM1 ((uint8_t)0x01) /*!< TIM1 Alternate Function mapping */ +#define GPIO_AF1_TIM2 ((uint8_t)0x01) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF1_LPTIM1 ((uint8_t)0x01) /*!< LPTIM1 Alternate Function mapping */ + +/** + * @brief AF 2 selection + */ +#define GPIO_AF2_TIM2 ((uint8_t)0x02) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF2_TIM1 ((uint8_t)0x02) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 3 selection + */ +#define GPIO_AF3_TIM1 ((uint8_t)0x03) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 4 selection + */ +#define GPIO_AF4_I2C1 ((uint8_t)0x04) /*!< I2C1 Alternate Function mapping */ +#define GPIO_AF4_SPI1 ((uint8_t)0x04) /*!< SPI1 Alternate Function mapping */ + +/** + * @brief AF 5 selection + */ +#define GPIO_AF5_SPI1 ((uint8_t)0x05) /*!< SPI1 Alternate Function mapping */ + +/** + * @brief AF 6 selection + */ +#define GPIO_AF6_MCO ((uint8_t)0x06) /*!< MCO Alternate Function mapping */ +#define GPIO_AF6_RF_DTB0 ((uint8_t)0x06) /*!< RF_DTB0 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB1 ((uint8_t)0x06) /*!< RF_DTB1 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB2 ((uint8_t)0x06) /*!< RF_DTB2 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB3 ((uint8_t)0x06) /*!< RF_DTB3 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB4 ((uint8_t)0x06) /*!< RF_DTB4 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB5 ((uint8_t)0x06) /*!< RF_DTB5 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB6 ((uint8_t)0x06) /*!< RF_DTB6 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB7 ((uint8_t)0x06) /*!< RF_DTB7 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB8 ((uint8_t)0x06) /*!< RF_DTB8 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB9 ((uint8_t)0x06) /*!< RF_DTB9 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB10 ((uint8_t)0x06) /*!< RF_DTB10 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB11 ((uint8_t)0x06) /*!< RF_DTB11 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB12 ((uint8_t)0x06) /*!< RF_DTB12 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB13 ((uint8_t)0x06) /*!< RF_DTB13 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB14 ((uint8_t)0x06) /*!< RF_DTB14 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB15 ((uint8_t)0x06) /*!< RF_DTB15 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB16 ((uint8_t)0x06) /*!< RF_DTB16 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB17 ((uint8_t)0x06) /*!< RF_DTB17 Alternate Function mapping */ +#define GPIO_AF6_RF_DTB18 ((uint8_t)0x06) /*!< RF_DTB18 Alternate Function mapping */ +#define GPIO_AF6_RF_MISO ((uint8_t)0x06) /*!< RF_MISO Alternate Function mapping */ +#define GPIO_AF6_RF_MOSI ((uint8_t)0x06) /*!< RF_MOSI Alternate Function mapping */ +#define GPIO_AF6_RF_SCK ((uint8_t)0x06) /*!< RF_SCK Alternate Function mapping */ +#define GPIO_AF6_RF_NSS ((uint8_t)0x06) /*!< RF_NSS Alternate Function mapping */ +/** + * @brief AF 7 selection + */ +#define GPIO_AF7_USART1 ((uint8_t)0x07) /*!< USART1 Alternate Function mapping */ + +/** + * @brief AF 8 selection + */ +#define GPIO_AF8_LPUART1 ((uint8_t)0x08) /*!< LPUART1 Alternate Function mapping */ + +/** + * @brief AF 9 selection + */ +#define GPIO_AF9_TSC ((uint8_t)0x09) /*!< TSC Alternate Function mapping */ + +/** + * @brief AF 12 selection + */ +#define GPIO_AF12_COMP1 ((uint8_t)0x0c) /*!< COMP1 Alternate Function mapping */ +#define GPIO_AF12_TIM1 ((uint8_t)0x0c) /*!< TIM1 Alternate Function mapping */ + +/** + * @brief AF 14 selection + */ +#define GPIO_AF14_TIM2 ((uint8_t)0x0e) /*!< TIM2 Alternate Function mapping */ +#define GPIO_AF14_LPTIM2 ((uint8_t)0x0e) /*!< LPTIM2 Alternate Function mapping */ + + +/** + * @brief AF 15 selection + */ +#define GPIO_AF15_EVENTOUT ((uint8_t)0x0f) /*!< EVENTOUT Alternate Function mapping */ + +#define IS_GPIO_AF(AF) ((AF) <= (uint8_t)0x0f) +#endif /* STM32WB15xx || STM32WB10xx || STM32WB1Mxx */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup GPIOEx_Exported_Macros GPIOEx Exported Macros + * @{ + */ + +/** @defgroup GPIOEx_Get_Port_Index GPIOEx Get Port Index + * @{ + */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) +#define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0uL :\ + ((__GPIOx__) == (GPIOB))? 1uL :\ + ((__GPIOx__) == (GPIOC))? 2uL :\ + ((__GPIOx__) == (GPIOD))? 3uL :\ + ((__GPIOx__) == (GPIOE))? 4uL : 7uL) +#else +#define GPIO_GET_INDEX(__GPIOx__) (((__GPIOx__) == (GPIOA))? 0uL :\ + ((__GPIOx__) == (GPIOB))? 1uL :\ + ((__GPIOx__) == (GPIOC))? 2uL :\ + ((__GPIOx__) == (GPIOE))? 4uL : 7uL) +#endif /* STM32WB55xx || STM32WB5Mxx */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_GPIO_EX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h new file mode 100644 index 0000000..e18361e --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_hsem.h @@ -0,0 +1,187 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_hsem.h + * @author MCD Application Team + * @brief Header file of HSEM HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_HSEM_H +#define STM32WBxx_HAL_HSEM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup HSEM + * @{ + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup HSEM_Exported_Macros HSEM Exported Macros + * @{ + */ + +/** + * @brief SemID to mask helper Macro. + * @param __SEMID__: semaphore ID from 0 to 31 + * @retval Semaphore Mask. + */ +#define __HAL_HSEM_SEMID_TO_MASK(__SEMID__) (1 << (__SEMID__)) + +/** + * @brief Enables the specified HSEM interrupts. + * @param __SEM_MASK__: semaphores Mask + * @retval None. + */ +#define __HAL_HSEM_ENABLE_IT(__SEM_MASK__) ((((SCB->CPUID & 0x000000F0) >> 4 )== 0x7) ? \ + (HSEM->C1IER |= (__SEM_MASK__)) : \ + (HSEM->C2IER |= (__SEM_MASK__))) +/** + * @brief Disables the specified HSEM interrupts. + * @param __SEM_MASK__: semaphores Mask + * @retval None. + */ +#define __HAL_HSEM_DISABLE_IT(__SEM_MASK__) ((((SCB->CPUID & 0x000000F0) >> 4 )== 0x7) ? \ + (HSEM->C1IER &= ~(__SEM_MASK__)) : \ + (HSEM->C2IER &= ~(__SEM_MASK__))) + +/** + * @brief Checks whether interrupt has occurred or not for semaphores specified by a mask. + * @param __SEM_MASK__: semaphores Mask + * @retval semaphores Mask : Semaphores where an interrupt occurred. + */ +#define __HAL_HSEM_GET_IT(__SEM_MASK__) ((((SCB->CPUID & 0x000000F0) >> 4 )== 0x7) ? \ + ((__SEM_MASK__) & HSEM->C1MISR) : \ + ((__SEM_MASK__) & HSEM->C2MISR)) + +/** + * @brief Get the semaphores release status flags. + * @param __SEM_MASK__: semaphores Mask + * @retval semaphores Mask : Semaphores where Release flags rise. + */ +#define __HAL_HSEM_GET_FLAG(__SEM_MASK__) ((((SCB->CPUID & 0x000000F0) >> 4 )== 0x7) ? \ + (__SEM_MASK__) & HSEM->C1ISR : \ + (__SEM_MASK__) & HSEM->C2ISR) + +/** + * @brief Clears the HSEM Interrupt flags. + * @param __SEM_MASK__: semaphores Mask + * @retval None. + */ +#define __HAL_HSEM_CLEAR_FLAG(__SEM_MASK__) ((((SCB->CPUID & 0x000000F0) >> 4 )== 0x7) ? \ + (HSEM->C1ICR |= (__SEM_MASK__)) : \ + (HSEM->C2ICR |= (__SEM_MASK__))) + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup HSEM_Exported_Functions HSEM Exported Functions + * @{ + */ + +/** @addtogroup HSEM_Exported_Functions_Group1 Take and Release functions + * @brief HSEM Take and Release functions + * @{ + */ + +/* HSEM semaphore take (lock) using 2-Step method ****************************/ +HAL_StatusTypeDef HAL_HSEM_Take(uint32_t SemID, uint32_t ProcessID); +/* HSEM semaphore fast take (lock) using 1-Step method ***********************/ +HAL_StatusTypeDef HAL_HSEM_FastTake(uint32_t SemID); +/* HSEM Release **************************************************************/ +void HAL_HSEM_Release(uint32_t SemID, uint32_t ProcessID); +/* HSEM Release All************************************************************/ +void HAL_HSEM_ReleaseAll(uint32_t Key, uint32_t CoreID); +/* HSEM Check semaphore state Taken or not **********************************/ +uint32_t HAL_HSEM_IsSemTaken(uint32_t SemID); + +/** + * @} + */ + +/** @addtogroup HSEM_Exported_Functions_Group2 HSEM Set and Get Key functions + * @brief HSEM Set and Get Key functions. + * @{ + */ +/* HSEM Set Clear Key *********************************************************/ +void HAL_HSEM_SetClearKey(uint32_t Key); +/* HSEM Get Clear Key *********************************************************/ +uint32_t HAL_HSEM_GetClearKey(void); +/** + * @} + */ + +/** @addtogroup HSEM_Exported_Functions_Group3 + * @brief HSEM Notification functions + * @{ + */ +/* HSEM Activate HSEM Notification (When a semaphore is released) ) *****************/ +void HAL_HSEM_ActivateNotification(uint32_t SemMask); +/* HSEM Deactivate HSEM Notification (When a semaphore is released) ****************/ +void HAL_HSEM_DeactivateNotification(uint32_t SemMask); +/* HSEM Free Callback (When a semaphore is released) *******************************/ +void HAL_HSEM_FreeCallback(uint32_t SemMask); +/* HSEM IRQ Handler **********************************************************/ +void HAL_HSEM_IRQHandler(void); + +/** + * @} + */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup HSEM_Private_Macros HSEM Private Macros + * @{ + */ + +#define IS_HSEM_SEMID(__SEMID__) ((__SEMID__) <= HSEM_SEMID_MAX ) + +#define IS_HSEM_PROCESSID(__PROCESSID__) ((__PROCESSID__) <= HSEM_PROCESSID_MAX ) + +#define IS_HSEM_KEY(__KEY__) ((__KEY__) <= HSEM_CLEAR_KEY_MAX ) + +#define IS_HSEM_COREID(__COREID__) (((__COREID__) == HSEM_CPU1_COREID) || \ + ((__COREID__) == HSEM_CPU2_COREID)) + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_HSEM_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h new file mode 100644 index 0000000..0c95999 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c.h @@ -0,0 +1,842 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_i2c.h + * @author MCD Application Team + * @brief Header file of I2C HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_I2C_H +#define STM32WBxx_HAL_I2C_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup I2C + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup I2C_Exported_Types I2C Exported Types + * @{ + */ + +/** @defgroup I2C_Configuration_Structure_definition I2C Configuration Structure definition + * @brief I2C Configuration Structure definition + * @{ + */ +typedef struct +{ + uint32_t Timing; /*!< Specifies the I2C_TIMINGR_register value. + This parameter calculated by referring to I2C initialization section + in Reference manual */ + + uint32_t OwnAddress1; /*!< Specifies the first device own address. + This parameter can be a 7-bit or 10-bit address. */ + + uint32_t AddressingMode; /*!< Specifies if 7-bit or 10-bit addressing mode is selected. + This parameter can be a value of @ref I2C_ADDRESSING_MODE */ + + uint32_t DualAddressMode; /*!< Specifies if dual addressing mode is selected. + This parameter can be a value of @ref I2C_DUAL_ADDRESSING_MODE */ + + uint32_t OwnAddress2; /*!< Specifies the second device own address if dual addressing mode is selected + This parameter can be a 7-bit address. */ + + uint32_t OwnAddress2Masks; /*!< Specifies the acknowledge mask address second device own address if dual addressing + mode is selected. + This parameter can be a value of @ref I2C_OWN_ADDRESS2_MASKS */ + + uint32_t GeneralCallMode; /*!< Specifies if general call mode is selected. + This parameter can be a value of @ref I2C_GENERAL_CALL_ADDRESSING_MODE */ + + uint32_t NoStretchMode; /*!< Specifies if nostretch mode is selected. + This parameter can be a value of @ref I2C_NOSTRETCH_MODE */ + +} I2C_InitTypeDef; + +/** + * @} + */ + +/** @defgroup HAL_state_structure_definition HAL state structure definition + * @brief HAL State structure definition + * @note HAL I2C State value coding follow below described bitmap :\n + * b7-b6 Error information\n + * 00 : No Error\n + * 01 : Abort (Abort user request on going)\n + * 10 : Timeout\n + * 11 : Error\n + * b5 Peripheral initialization status\n + * 0 : Reset (peripheral not initialized)\n + * 1 : Init done (peripheral initialized and ready to use. HAL I2C Init function called)\n + * b4 (not used)\n + * x : Should be set to 0\n + * b3\n + * 0 : Ready or Busy (No Listen mode ongoing)\n + * 1 : Listen (peripheral in Address Listen Mode)\n + * b2 Intrinsic process state\n + * 0 : Ready\n + * 1 : Busy (peripheral busy with some configuration or internal operations)\n + * b1 Rx state\n + * 0 : Ready (no Rx operation ongoing)\n + * 1 : Busy (Rx operation ongoing)\n + * b0 Tx state\n + * 0 : Ready (no Tx operation ongoing)\n + * 1 : Busy (Tx operation ongoing) + * @{ + */ +typedef enum +{ + HAL_I2C_STATE_RESET = 0x00U, /*!< Peripheral is not yet Initialized */ + HAL_I2C_STATE_READY = 0x20U, /*!< Peripheral Initialized and ready for use */ + HAL_I2C_STATE_BUSY = 0x24U, /*!< An internal process is ongoing */ + HAL_I2C_STATE_BUSY_TX = 0x21U, /*!< Data Transmission process is ongoing */ + HAL_I2C_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing */ + HAL_I2C_STATE_LISTEN = 0x28U, /*!< Address Listen Mode is ongoing */ + HAL_I2C_STATE_BUSY_TX_LISTEN = 0x29U, /*!< Address Listen Mode and Data Transmission + process is ongoing */ + HAL_I2C_STATE_BUSY_RX_LISTEN = 0x2AU, /*!< Address Listen Mode and Data Reception + process is ongoing */ + HAL_I2C_STATE_ABORT = 0x60U, /*!< Abort user request ongoing */ + +} HAL_I2C_StateTypeDef; + +/** + * @} + */ + +/** @defgroup HAL_mode_structure_definition HAL mode structure definition + * @brief HAL Mode structure definition + * @note HAL I2C Mode value coding follow below described bitmap :\n + * b7 (not used)\n + * x : Should be set to 0\n + * b6\n + * 0 : None\n + * 1 : Memory (HAL I2C communication is in Memory Mode)\n + * b5\n + * 0 : None\n + * 1 : Slave (HAL I2C communication is in Slave Mode)\n + * b4\n + * 0 : None\n + * 1 : Master (HAL I2C communication is in Master Mode)\n + * b3-b2-b1-b0 (not used)\n + * xxxx : Should be set to 0000 + * @{ + */ +typedef enum +{ + HAL_I2C_MODE_NONE = 0x00U, /*!< No I2C communication on going */ + HAL_I2C_MODE_MASTER = 0x10U, /*!< I2C communication is in Master Mode */ + HAL_I2C_MODE_SLAVE = 0x20U, /*!< I2C communication is in Slave Mode */ + HAL_I2C_MODE_MEM = 0x40U /*!< I2C communication is in Memory Mode */ + +} HAL_I2C_ModeTypeDef; + +/** + * @} + */ + +/** @defgroup I2C_Error_Code_definition I2C Error Code definition + * @brief I2C Error Code definition + * @{ + */ +#define HAL_I2C_ERROR_NONE (0x00000000U) /*!< No error */ +#define HAL_I2C_ERROR_BERR (0x00000001U) /*!< BERR error */ +#define HAL_I2C_ERROR_ARLO (0x00000002U) /*!< ARLO error */ +#define HAL_I2C_ERROR_AF (0x00000004U) /*!< ACKF error */ +#define HAL_I2C_ERROR_OVR (0x00000008U) /*!< OVR error */ +#define HAL_I2C_ERROR_DMA (0x00000010U) /*!< DMA transfer error */ +#define HAL_I2C_ERROR_TIMEOUT (0x00000020U) /*!< Timeout error */ +#define HAL_I2C_ERROR_SIZE (0x00000040U) /*!< Size Management error */ +#define HAL_I2C_ERROR_DMA_PARAM (0x00000080U) /*!< DMA Parameter Error */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) +#define HAL_I2C_ERROR_INVALID_CALLBACK (0x00000100U) /*!< Invalid Callback error */ +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ +#define HAL_I2C_ERROR_INVALID_PARAM (0x00000200U) /*!< Invalid Parameters error */ +/** + * @} + */ + +/** @defgroup I2C_handle_Structure_definition I2C handle Structure definition + * @brief I2C handle Structure definition + * @{ + */ +typedef struct __I2C_HandleTypeDef +{ + I2C_TypeDef *Instance; /*!< I2C registers base address */ + + I2C_InitTypeDef Init; /*!< I2C communication parameters */ + + uint8_t *pBuffPtr; /*!< Pointer to I2C transfer buffer */ + + uint16_t XferSize; /*!< I2C transfer size */ + + __IO uint16_t XferCount; /*!< I2C transfer counter */ + + __IO uint32_t XferOptions; /*!< I2C sequantial transfer options, this parameter can + be a value of @ref I2C_XFEROPTIONS */ + + __IO uint32_t PreviousState; /*!< I2C communication Previous state */ + + HAL_StatusTypeDef(*XferISR)(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, uint32_t ITSources); + /*!< I2C transfer IRQ handler function pointer */ + +#if defined(HAL_DMA_MODULE_ENABLED) + DMA_HandleTypeDef *hdmatx; /*!< I2C Tx DMA handle parameters */ + + DMA_HandleTypeDef *hdmarx; /*!< I2C Rx DMA handle parameters */ + +#endif /*HAL_DMA_MODULE_ENABLED*/ + + HAL_LockTypeDef Lock; /*!< I2C locking object */ + + __IO HAL_I2C_StateTypeDef State; /*!< I2C communication state */ + + __IO HAL_I2C_ModeTypeDef Mode; /*!< I2C communication mode */ + + __IO uint32_t ErrorCode; /*!< I2C Error code */ + + __IO uint32_t AddrEventCount; /*!< I2C Address Event counter */ + + __IO uint32_t Devaddress; /*!< I2C Target device address */ + + __IO uint32_t Memaddress; /*!< I2C Target memory address */ + +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + void (* MasterTxCpltCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Master Tx Transfer completed callback */ + void (* MasterRxCpltCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Master Rx Transfer completed callback */ + void (* SlaveTxCpltCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Slave Tx Transfer completed callback */ + void (* SlaveRxCpltCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Slave Rx Transfer completed callback */ + void (* ListenCpltCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Listen Complete callback */ + void (* MemTxCpltCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Memory Tx Transfer completed callback */ + void (* MemRxCpltCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Memory Rx Transfer completed callback */ + void (* ErrorCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Error callback */ + void (* AbortCpltCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Abort callback */ + + void (* AddrCallback)(struct __I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode); + /*!< I2C Slave Address Match callback */ + + void (* MspInitCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Msp Init callback */ + void (* MspDeInitCallback)(struct __I2C_HandleTypeDef *hi2c); + /*!< I2C Msp DeInit callback */ + +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ +} I2C_HandleTypeDef; + +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) +/** + * @brief HAL I2C Callback ID enumeration definition + */ +typedef enum +{ + HAL_I2C_MASTER_TX_COMPLETE_CB_ID = 0x00U, /*!< I2C Master Tx Transfer completed callback ID */ + HAL_I2C_MASTER_RX_COMPLETE_CB_ID = 0x01U, /*!< I2C Master Rx Transfer completed callback ID */ + HAL_I2C_SLAVE_TX_COMPLETE_CB_ID = 0x02U, /*!< I2C Slave Tx Transfer completed callback ID */ + HAL_I2C_SLAVE_RX_COMPLETE_CB_ID = 0x03U, /*!< I2C Slave Rx Transfer completed callback ID */ + HAL_I2C_LISTEN_COMPLETE_CB_ID = 0x04U, /*!< I2C Listen Complete callback ID */ + HAL_I2C_MEM_TX_COMPLETE_CB_ID = 0x05U, /*!< I2C Memory Tx Transfer callback ID */ + HAL_I2C_MEM_RX_COMPLETE_CB_ID = 0x06U, /*!< I2C Memory Rx Transfer completed callback ID */ + HAL_I2C_ERROR_CB_ID = 0x07U, /*!< I2C Error callback ID */ + HAL_I2C_ABORT_CB_ID = 0x08U, /*!< I2C Abort callback ID */ + + HAL_I2C_MSPINIT_CB_ID = 0x09U, /*!< I2C Msp Init callback ID */ + HAL_I2C_MSPDEINIT_CB_ID = 0x0AU /*!< I2C Msp DeInit callback ID */ + +} HAL_I2C_CallbackIDTypeDef; + +/** + * @brief HAL I2C Callback pointer definition + */ +typedef void (*pI2C_CallbackTypeDef)(I2C_HandleTypeDef *hi2c); +/*!< pointer to an I2C callback function */ +typedef void (*pI2C_AddrCallbackTypeDef)(I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, + uint16_t AddrMatchCode); +/*!< pointer to an I2C Address Match callback function */ + +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ +/** + * @} + */ + +/** + * @} + */ +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup I2C_Exported_Constants I2C Exported Constants + * @{ + */ + +/** @defgroup I2C_XFEROPTIONS I2C Sequential Transfer Options + * @{ + */ +#define I2C_FIRST_FRAME ((uint32_t)I2C_SOFTEND_MODE) +#define I2C_FIRST_AND_NEXT_FRAME ((uint32_t)(I2C_RELOAD_MODE | I2C_SOFTEND_MODE)) +#define I2C_NEXT_FRAME ((uint32_t)(I2C_RELOAD_MODE | I2C_SOFTEND_MODE)) +#define I2C_FIRST_AND_LAST_FRAME ((uint32_t)I2C_AUTOEND_MODE) +#define I2C_LAST_FRAME ((uint32_t)I2C_AUTOEND_MODE) +#define I2C_LAST_FRAME_NO_STOP ((uint32_t)I2C_SOFTEND_MODE) + +/* List of XferOptions in usage of : + * 1- Restart condition in all use cases (direction change or not) + */ +#define I2C_OTHER_FRAME (0x000000AAU) +#define I2C_OTHER_AND_LAST_FRAME (0x0000AA00U) +/** + * @} + */ + +/** @defgroup I2C_ADDRESSING_MODE I2C Addressing Mode + * @{ + */ +#define I2C_ADDRESSINGMODE_7BIT (0x00000001U) +#define I2C_ADDRESSINGMODE_10BIT (0x00000002U) +/** + * @} + */ + +/** @defgroup I2C_DUAL_ADDRESSING_MODE I2C Dual Addressing Mode + * @{ + */ +#define I2C_DUALADDRESS_DISABLE (0x00000000U) +#define I2C_DUALADDRESS_ENABLE I2C_OAR2_OA2EN +/** + * @} + */ + +/** @defgroup I2C_OWN_ADDRESS2_MASKS I2C Own Address2 Masks + * @{ + */ +#define I2C_OA2_NOMASK ((uint8_t)0x00U) +#define I2C_OA2_MASK01 ((uint8_t)0x01U) +#define I2C_OA2_MASK02 ((uint8_t)0x02U) +#define I2C_OA2_MASK03 ((uint8_t)0x03U) +#define I2C_OA2_MASK04 ((uint8_t)0x04U) +#define I2C_OA2_MASK05 ((uint8_t)0x05U) +#define I2C_OA2_MASK06 ((uint8_t)0x06U) +#define I2C_OA2_MASK07 ((uint8_t)0x07U) +/** + * @} + */ + +/** @defgroup I2C_GENERAL_CALL_ADDRESSING_MODE I2C General Call Addressing Mode + * @{ + */ +#define I2C_GENERALCALL_DISABLE (0x00000000U) +#define I2C_GENERALCALL_ENABLE I2C_CR1_GCEN +/** + * @} + */ + +/** @defgroup I2C_NOSTRETCH_MODE I2C No-Stretch Mode + * @{ + */ +#define I2C_NOSTRETCH_DISABLE (0x00000000U) +#define I2C_NOSTRETCH_ENABLE I2C_CR1_NOSTRETCH +/** + * @} + */ + +/** @defgroup I2C_MEMORY_ADDRESS_SIZE I2C Memory Address Size + * @{ + */ +#define I2C_MEMADD_SIZE_8BIT (0x00000001U) +#define I2C_MEMADD_SIZE_16BIT (0x00000002U) +/** + * @} + */ + +/** @defgroup I2C_XFERDIRECTION I2C Transfer Direction Master Point of View + * @{ + */ +#define I2C_DIRECTION_TRANSMIT (0x00000000U) +#define I2C_DIRECTION_RECEIVE (0x00000001U) +/** + * @} + */ + +/** @defgroup I2C_RELOAD_END_MODE I2C Reload End Mode + * @{ + */ +#define I2C_RELOAD_MODE I2C_CR2_RELOAD +#define I2C_AUTOEND_MODE I2C_CR2_AUTOEND +#define I2C_SOFTEND_MODE (0x00000000U) +/** + * @} + */ + +/** @defgroup I2C_START_STOP_MODE I2C Start or Stop Mode + * @{ + */ +#define I2C_NO_STARTSTOP (0x00000000U) +#define I2C_GENERATE_STOP (uint32_t)(0x80000000U | I2C_CR2_STOP) +#define I2C_GENERATE_START_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN) +#define I2C_GENERATE_START_WRITE (uint32_t)(0x80000000U | I2C_CR2_START) +/** + * @} + */ + +/** @defgroup I2C_Interrupt_configuration_definition I2C Interrupt configuration definition + * @brief I2C Interrupt definition + * Elements values convention: 0xXXXXXXXX + * - XXXXXXXX : Interrupt control mask + * @{ + */ +#define I2C_IT_ERRI I2C_CR1_ERRIE +#define I2C_IT_TCI I2C_CR1_TCIE +#define I2C_IT_STOPI I2C_CR1_STOPIE +#define I2C_IT_NACKI I2C_CR1_NACKIE +#define I2C_IT_ADDRI I2C_CR1_ADDRIE +#define I2C_IT_RXI I2C_CR1_RXIE +#define I2C_IT_TXI I2C_CR1_TXIE +/** + * @} + */ + +/** @defgroup I2C_Flag_definition I2C Flag definition + * @{ + */ +#define I2C_FLAG_TXE I2C_ISR_TXE +#define I2C_FLAG_TXIS I2C_ISR_TXIS +#define I2C_FLAG_RXNE I2C_ISR_RXNE +#define I2C_FLAG_ADDR I2C_ISR_ADDR +#define I2C_FLAG_AF I2C_ISR_NACKF +#define I2C_FLAG_STOPF I2C_ISR_STOPF +#define I2C_FLAG_TC I2C_ISR_TC +#define I2C_FLAG_TCR I2C_ISR_TCR +#define I2C_FLAG_BERR I2C_ISR_BERR +#define I2C_FLAG_ARLO I2C_ISR_ARLO +#define I2C_FLAG_OVR I2C_ISR_OVR +#define I2C_FLAG_PECERR I2C_ISR_PECERR +#define I2C_FLAG_TIMEOUT I2C_ISR_TIMEOUT +#define I2C_FLAG_ALERT I2C_ISR_ALERT +#define I2C_FLAG_BUSY I2C_ISR_BUSY +#define I2C_FLAG_DIR I2C_ISR_DIR +/** + * @} + */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ + +/** @defgroup I2C_Exported_Macros I2C Exported Macros + * @{ + */ + +/** @brief Reset I2C handle state. + * @param __HANDLE__ specifies the I2C Handle. + * @retval None + */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) +#define __HAL_I2C_RESET_HANDLE_STATE(__HANDLE__) do{ \ + (__HANDLE__)->State = HAL_I2C_STATE_RESET; \ + (__HANDLE__)->MspInitCallback = NULL; \ + (__HANDLE__)->MspDeInitCallback = NULL; \ + } while(0) +#else +#define __HAL_I2C_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_I2C_STATE_RESET) +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + +/** @brief Enable the specified I2C interrupt. + * @param __HANDLE__ specifies the I2C Handle. + * @param __INTERRUPT__ specifies the interrupt source to enable. + * This parameter can be one of the following values: + * @arg @ref I2C_IT_ERRI Errors interrupt enable + * @arg @ref I2C_IT_TCI Transfer complete interrupt enable + * @arg @ref I2C_IT_STOPI STOP detection interrupt enable + * @arg @ref I2C_IT_NACKI NACK received interrupt enable + * @arg @ref I2C_IT_ADDRI Address match interrupt enable + * @arg @ref I2C_IT_RXI RX interrupt enable + * @arg @ref I2C_IT_TXI TX interrupt enable + * + * @retval None + */ +#define __HAL_I2C_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR1 |= (__INTERRUPT__)) + +/** @brief Disable the specified I2C interrupt. + * @param __HANDLE__ specifies the I2C Handle. + * @param __INTERRUPT__ specifies the interrupt source to disable. + * This parameter can be one of the following values: + * @arg @ref I2C_IT_ERRI Errors interrupt enable + * @arg @ref I2C_IT_TCI Transfer complete interrupt enable + * @arg @ref I2C_IT_STOPI STOP detection interrupt enable + * @arg @ref I2C_IT_NACKI NACK received interrupt enable + * @arg @ref I2C_IT_ADDRI Address match interrupt enable + * @arg @ref I2C_IT_RXI RX interrupt enable + * @arg @ref I2C_IT_TXI TX interrupt enable + * + * @retval None + */ +#define __HAL_I2C_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR1 &= (~(__INTERRUPT__))) + +/** @brief Check whether the specified I2C interrupt source is enabled or not. + * @param __HANDLE__ specifies the I2C Handle. + * @param __INTERRUPT__ specifies the I2C interrupt source to check. + * This parameter can be one of the following values: + * @arg @ref I2C_IT_ERRI Errors interrupt enable + * @arg @ref I2C_IT_TCI Transfer complete interrupt enable + * @arg @ref I2C_IT_STOPI STOP detection interrupt enable + * @arg @ref I2C_IT_NACKI NACK received interrupt enable + * @arg @ref I2C_IT_ADDRI Address match interrupt enable + * @arg @ref I2C_IT_RXI RX interrupt enable + * @arg @ref I2C_IT_TXI TX interrupt enable + * + * @retval The new state of __INTERRUPT__ (SET or RESET). + */ +#define __HAL_I2C_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR1 & \ + (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) + +/** @brief Check whether the specified I2C flag is set or not. + * @param __HANDLE__ specifies the I2C Handle. + * @param __FLAG__ specifies the flag to check. + * This parameter can be one of the following values: + * @arg @ref I2C_FLAG_TXE Transmit data register empty + * @arg @ref I2C_FLAG_TXIS Transmit interrupt status + * @arg @ref I2C_FLAG_RXNE Receive data register not empty + * @arg @ref I2C_FLAG_ADDR Address matched (slave mode) + * @arg @ref I2C_FLAG_AF Acknowledge failure received flag + * @arg @ref I2C_FLAG_STOPF STOP detection flag + * @arg @ref I2C_FLAG_TC Transfer complete (master mode) + * @arg @ref I2C_FLAG_TCR Transfer complete reload + * @arg @ref I2C_FLAG_BERR Bus error + * @arg @ref I2C_FLAG_ARLO Arbitration lost + * @arg @ref I2C_FLAG_OVR Overrun/Underrun + * @arg @ref I2C_FLAG_PECERR PEC error in reception + * @arg @ref I2C_FLAG_TIMEOUT Timeout or Tlow detection flag + * @arg @ref I2C_FLAG_ALERT SMBus alert + * @arg @ref I2C_FLAG_BUSY Bus busy + * @arg @ref I2C_FLAG_DIR Transfer direction (slave mode) + * + * @retval The new state of __FLAG__ (SET or RESET). + */ +#define I2C_FLAG_MASK (0x0001FFFFU) +#define __HAL_I2C_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & \ + (__FLAG__)) == (__FLAG__)) ? SET : RESET) + +/** @brief Clear the I2C pending flags which are cleared by writing 1 in a specific bit. + * @param __HANDLE__ specifies the I2C Handle. + * @param __FLAG__ specifies the flag to clear. + * This parameter can be any combination of the following values: + * @arg @ref I2C_FLAG_TXE Transmit data register empty + * @arg @ref I2C_FLAG_ADDR Address matched (slave mode) + * @arg @ref I2C_FLAG_AF Acknowledge failure received flag + * @arg @ref I2C_FLAG_STOPF STOP detection flag + * @arg @ref I2C_FLAG_BERR Bus error + * @arg @ref I2C_FLAG_ARLO Arbitration lost + * @arg @ref I2C_FLAG_OVR Overrun/Underrun + * @arg @ref I2C_FLAG_PECERR PEC error in reception + * @arg @ref I2C_FLAG_TIMEOUT Timeout or Tlow detection flag + * @arg @ref I2C_FLAG_ALERT SMBus alert + * + * @retval None + */ +#define __HAL_I2C_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__FLAG__) == I2C_FLAG_TXE) ? \ + ((__HANDLE__)->Instance->ISR |= (__FLAG__)) : \ + ((__HANDLE__)->Instance->ICR = (__FLAG__))) + +/** @brief Enable the specified I2C peripheral. + * @param __HANDLE__ specifies the I2C Handle. + * @retval None + */ +#define __HAL_I2C_ENABLE(__HANDLE__) (SET_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE)) + +/** @brief Disable the specified I2C peripheral. + * @param __HANDLE__ specifies the I2C Handle. + * @retval None + */ +#define __HAL_I2C_DISABLE(__HANDLE__) (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE)) + +/** @brief Generate a Non-Acknowledge I2C peripheral in Slave mode. + * @param __HANDLE__ specifies the I2C Handle. + * @retval None + */ +#define __HAL_I2C_GENERATE_NACK(__HANDLE__) (SET_BIT((__HANDLE__)->Instance->CR2, I2C_CR2_NACK)) +/** + * @} + */ + +/* Include I2C HAL Extended module */ +#include "stm32wbxx_hal_i2c_ex.h" + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup I2C_Exported_Functions + * @{ + */ + +/** @addtogroup I2C_Exported_Functions_Group1 Initialization and de-initialization functions + * @{ + */ +/* Initialization and de-initialization functions******************************/ +HAL_StatusTypeDef HAL_I2C_Init(I2C_HandleTypeDef *hi2c); +HAL_StatusTypeDef HAL_I2C_DeInit(I2C_HandleTypeDef *hi2c); +void HAL_I2C_MspInit(I2C_HandleTypeDef *hi2c); +void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c); + +/* Callbacks Register/UnRegister functions ***********************************/ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) +HAL_StatusTypeDef HAL_I2C_RegisterCallback(I2C_HandleTypeDef *hi2c, HAL_I2C_CallbackIDTypeDef CallbackID, + pI2C_CallbackTypeDef pCallback); +HAL_StatusTypeDef HAL_I2C_UnRegisterCallback(I2C_HandleTypeDef *hi2c, HAL_I2C_CallbackIDTypeDef CallbackID); + +HAL_StatusTypeDef HAL_I2C_RegisterAddrCallback(I2C_HandleTypeDef *hi2c, pI2C_AddrCallbackTypeDef pCallback); +HAL_StatusTypeDef HAL_I2C_UnRegisterAddrCallback(I2C_HandleTypeDef *hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ +/** + * @} + */ + +/** @addtogroup I2C_Exported_Functions_Group2 Input and Output operation functions + * @{ + */ +/* IO operation functions ****************************************************/ +/******* Blocking mode: Polling */ +HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t Timeout); +HAL_StatusTypeDef HAL_I2C_Master_Receive(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t Timeout); +HAL_StatusTypeDef HAL_I2C_Slave_Transmit(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t Timeout); +HAL_StatusTypeDef HAL_I2C_Slave_Receive(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t Timeout); +HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout); +HAL_StatusTypeDef HAL_I2C_Mem_Read(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout); +HAL_StatusTypeDef HAL_I2C_IsDeviceReady(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint32_t Trials, + uint32_t Timeout); + +/******* Non-Blocking mode: Interrupt */ +HAL_StatusTypeDef HAL_I2C_Master_Transmit_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Master_Receive_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Slave_Transmit_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Slave_Receive_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Mem_Write_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Mem_Read_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size); + +HAL_StatusTypeDef HAL_I2C_Master_Seq_Transmit_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t XferOptions); +HAL_StatusTypeDef HAL_I2C_Master_Seq_Receive_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t XferOptions); +HAL_StatusTypeDef HAL_I2C_Slave_Seq_Transmit_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t XferOptions); +HAL_StatusTypeDef HAL_I2C_Slave_Seq_Receive_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t XferOptions); +HAL_StatusTypeDef HAL_I2C_EnableListen_IT(I2C_HandleTypeDef *hi2c); +HAL_StatusTypeDef HAL_I2C_DisableListen_IT(I2C_HandleTypeDef *hi2c); +HAL_StatusTypeDef HAL_I2C_Master_Abort_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress); + +#if defined(HAL_DMA_MODULE_ENABLED) +/******* Non-Blocking mode: DMA */ +HAL_StatusTypeDef HAL_I2C_Master_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Master_Receive_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Slave_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Slave_Receive_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Mem_Write_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size); +HAL_StatusTypeDef HAL_I2C_Mem_Read_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size); + +HAL_StatusTypeDef HAL_I2C_Master_Seq_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t XferOptions); +HAL_StatusTypeDef HAL_I2C_Master_Seq_Receive_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t XferOptions); +HAL_StatusTypeDef HAL_I2C_Slave_Seq_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t XferOptions); +HAL_StatusTypeDef HAL_I2C_Slave_Seq_Receive_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t XferOptions); +#endif /*HAL_DMA_MODULE_ENABLED*/ +/** + * @} + */ + +/** @addtogroup I2C_IRQ_Handler_and_Callbacks IRQ Handler and Callbacks + * @{ + */ +/******* I2C IRQHandler and Callbacks used in non blocking modes (Interrupt and DMA) */ +void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c); +void HAL_I2C_ER_IRQHandler(I2C_HandleTypeDef *hi2c); +void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c); +void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c); +void HAL_I2C_SlaveTxCpltCallback(I2C_HandleTypeDef *hi2c); +void HAL_I2C_SlaveRxCpltCallback(I2C_HandleTypeDef *hi2c); +void HAL_I2C_AddrCallback(I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode); +void HAL_I2C_ListenCpltCallback(I2C_HandleTypeDef *hi2c); +void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c); +void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c); +void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c); +void HAL_I2C_AbortCpltCallback(I2C_HandleTypeDef *hi2c); +/** + * @} + */ + +/** @addtogroup I2C_Exported_Functions_Group3 Peripheral State, Mode and Error functions + * @{ + */ +/* Peripheral State, Mode and Error functions *********************************/ +HAL_I2C_StateTypeDef HAL_I2C_GetState(const I2C_HandleTypeDef *hi2c); +HAL_I2C_ModeTypeDef HAL_I2C_GetMode(const I2C_HandleTypeDef *hi2c); +uint32_t HAL_I2C_GetError(const I2C_HandleTypeDef *hi2c); + +/** + * @} + */ + +/** + * @} + */ + +/* Private constants ---------------------------------------------------------*/ +/** @defgroup I2C_Private_Constants I2C Private Constants + * @{ + */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup I2C_Private_Macro I2C Private Macros + * @{ + */ + +#define IS_I2C_ADDRESSING_MODE(MODE) (((MODE) == I2C_ADDRESSINGMODE_7BIT) || \ + ((MODE) == I2C_ADDRESSINGMODE_10BIT)) + +#define IS_I2C_DUAL_ADDRESS(ADDRESS) (((ADDRESS) == I2C_DUALADDRESS_DISABLE) || \ + ((ADDRESS) == I2C_DUALADDRESS_ENABLE)) + +#define IS_I2C_OWN_ADDRESS2_MASK(MASK) (((MASK) == I2C_OA2_NOMASK) || \ + ((MASK) == I2C_OA2_MASK01) || \ + ((MASK) == I2C_OA2_MASK02) || \ + ((MASK) == I2C_OA2_MASK03) || \ + ((MASK) == I2C_OA2_MASK04) || \ + ((MASK) == I2C_OA2_MASK05) || \ + ((MASK) == I2C_OA2_MASK06) || \ + ((MASK) == I2C_OA2_MASK07)) + +#define IS_I2C_GENERAL_CALL(CALL) (((CALL) == I2C_GENERALCALL_DISABLE) || \ + ((CALL) == I2C_GENERALCALL_ENABLE)) + +#define IS_I2C_NO_STRETCH(STRETCH) (((STRETCH) == I2C_NOSTRETCH_DISABLE) || \ + ((STRETCH) == I2C_NOSTRETCH_ENABLE)) + +#define IS_I2C_MEMADD_SIZE(SIZE) (((SIZE) == I2C_MEMADD_SIZE_8BIT) || \ + ((SIZE) == I2C_MEMADD_SIZE_16BIT)) + +#define IS_TRANSFER_MODE(MODE) (((MODE) == I2C_RELOAD_MODE) || \ + ((MODE) == I2C_AUTOEND_MODE) || \ + ((MODE) == I2C_SOFTEND_MODE)) + +#define IS_TRANSFER_REQUEST(REQUEST) (((REQUEST) == I2C_GENERATE_STOP) || \ + ((REQUEST) == I2C_GENERATE_START_READ) || \ + ((REQUEST) == I2C_GENERATE_START_WRITE) || \ + ((REQUEST) == I2C_NO_STARTSTOP)) + +#define IS_I2C_TRANSFER_OPTIONS_REQUEST(REQUEST) (((REQUEST) == I2C_FIRST_FRAME) || \ + ((REQUEST) == I2C_FIRST_AND_NEXT_FRAME) || \ + ((REQUEST) == I2C_NEXT_FRAME) || \ + ((REQUEST) == I2C_FIRST_AND_LAST_FRAME) || \ + ((REQUEST) == I2C_LAST_FRAME) || \ + ((REQUEST) == I2C_LAST_FRAME_NO_STOP) || \ + IS_I2C_TRANSFER_OTHER_OPTIONS_REQUEST(REQUEST)) + +#define IS_I2C_TRANSFER_OTHER_OPTIONS_REQUEST(REQUEST) (((REQUEST) == I2C_OTHER_FRAME) || \ + ((REQUEST) == I2C_OTHER_AND_LAST_FRAME)) + +#define I2C_RESET_CR2(__HANDLE__) ((__HANDLE__)->Instance->CR2 &= \ + (uint32_t)~((uint32_t)(I2C_CR2_SADD | I2C_CR2_HEAD10R | \ + I2C_CR2_NBYTES | I2C_CR2_RELOAD | \ + I2C_CR2_RD_WRN))) + +#define I2C_GET_ADDR_MATCH(__HANDLE__) ((uint16_t)(((__HANDLE__)->Instance->ISR & I2C_ISR_ADDCODE) \ + >> 16U)) +#define I2C_GET_DIR(__HANDLE__) ((uint8_t)(((__HANDLE__)->Instance->ISR & I2C_ISR_DIR) \ + >> 16U)) +#define I2C_GET_STOP_MODE(__HANDLE__) ((__HANDLE__)->Instance->CR2 & I2C_CR2_AUTOEND) +#define I2C_GET_OWN_ADDRESS1(__HANDLE__) ((uint16_t)((__HANDLE__)->Instance->OAR1 & I2C_OAR1_OA1)) +#define I2C_GET_OWN_ADDRESS2(__HANDLE__) ((uint16_t)((__HANDLE__)->Instance->OAR2 & I2C_OAR2_OA2)) + +#define IS_I2C_OWN_ADDRESS1(ADDRESS1) ((ADDRESS1) <= 0x000003FFU) +#define IS_I2C_OWN_ADDRESS2(ADDRESS2) ((ADDRESS2) <= (uint16_t)0x00FFU) + +#define I2C_MEM_ADD_MSB(__ADDRESS__) ((uint8_t)((uint16_t)(((uint16_t)((__ADDRESS__) & \ + (uint16_t)(0xFF00U))) >> 8U))) +#define I2C_MEM_ADD_LSB(__ADDRESS__) ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)(0x00FFU)))) + +#define I2C_GENERATE_START(__ADDMODE__,__ADDRESS__) (((__ADDMODE__) == I2C_ADDRESSINGMODE_7BIT) ? \ + (uint32_t)((((uint32_t)(__ADDRESS__) & (I2C_CR2_SADD)) | \ + (I2C_CR2_START) | (I2C_CR2_AUTOEND)) & \ + (~I2C_CR2_RD_WRN)) : \ + (uint32_t)((((uint32_t)(__ADDRESS__) & (I2C_CR2_SADD)) | \ + (I2C_CR2_ADD10) | (I2C_CR2_START) | \ + (I2C_CR2_AUTOEND)) & (~I2C_CR2_RD_WRN))) + +#define I2C_CHECK_FLAG(__ISR__, __FLAG__) ((((__ISR__) & ((__FLAG__) & I2C_FLAG_MASK)) == \ + ((__FLAG__) & I2C_FLAG_MASK)) ? SET : RESET) +#define I2C_CHECK_IT_SOURCE(__CR1__, __IT__) ((((__CR1__) & (__IT__)) == (__IT__)) ? SET : RESET) +/** + * @} + */ + +/* Private Functions ---------------------------------------------------------*/ +/** @defgroup I2C_Private_Functions I2C Private Functions + * @{ + */ +/* Private functions are defined in stm32wbxx_hal_i2c.c file */ +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + + +#endif /* STM32WBxx_HAL_I2C_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h new file mode 100644 index 0000000..4121483 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_i2c_ex.h @@ -0,0 +1,170 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_i2c_ex.h + * @author MCD Application Team + * @brief Header file of I2C HAL Extended module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_I2C_EX_H +#define STM32WBxx_HAL_I2C_EX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup I2CEx + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup I2CEx_Exported_Constants I2C Extended Exported Constants + * @{ + */ + +/** @defgroup I2CEx_Analog_Filter I2C Extended Analog Filter + * @{ + */ +#define I2C_ANALOGFILTER_ENABLE 0x00000000U +#define I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF +/** + * @} + */ + +/** @defgroup I2CEx_FastModePlus I2C Extended Fast Mode Plus + * @{ + */ +#define I2C_FMP_NOT_SUPPORTED 0xAAAA0000U /*!< Fast Mode Plus not supported */ +#define I2C_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_PB6_FMP /*!< Enable Fast Mode Plus on PB6 */ +#define I2C_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_PB7_FMP /*!< Enable Fast Mode Plus on PB7 */ +#define I2C_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_PB8_FMP /*!< Enable Fast Mode Plus on PB8 */ +#define I2C_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_PB9_FMP /*!< Enable Fast Mode Plus on PB9 */ +#define I2C_FASTMODEPLUS_I2C1 SYSCFG_CFGR1_I2C1_FMP /*!< Enable Fast Mode Plus on I2C1 pins */ +#if defined(SYSCFG_CFGR1_I2C3_FMP) +#define I2C_FASTMODEPLUS_I2C3 SYSCFG_CFGR1_I2C3_FMP /*!< Enable Fast Mode Plus on I2C3 pins */ +#else +#define I2C_FASTMODEPLUS_I2C3 (uint32_t)(0x00000400U | I2C_FMP_NOT_SUPPORTED) /*!< Fast Mode Plus I2C3 not supported */ +#endif /* SYSCFG_CFGR1_I2C3_FMP */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup I2CEx_Exported_Macros I2C Extended Exported Macros + * @{ + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup I2CEx_Exported_Functions I2C Extended Exported Functions + * @{ + */ + +/** @addtogroup I2CEx_Exported_Functions_Group1 Filter Mode Functions + * @{ + */ +/* Peripheral Control functions ************************************************/ +HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter); +HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter); +/** + * @} + */ + +/** @addtogroup I2CEx_Exported_Functions_Group2 WakeUp Mode Functions + * @{ + */ +HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp(I2C_HandleTypeDef *hi2c); +HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c); +/** + * @} + */ + +/** @addtogroup I2CEx_Exported_Functions_Group3 Fast Mode Plus Functions + * @{ + */ +void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus); +void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus); +/** + * @} + */ + +/** + * @} + */ + +/* Private constants ---------------------------------------------------------*/ +/** @defgroup I2CEx_Private_Constants I2C Extended Private Constants + * @{ + */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup I2CEx_Private_Macro I2C Extended Private Macros + * @{ + */ +#define IS_I2C_ANALOG_FILTER(FILTER) (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \ + ((FILTER) == I2C_ANALOGFILTER_DISABLE)) + +#define IS_I2C_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU) + +#define IS_I2C_FASTMODEPLUS(__CONFIG__) ((((__CONFIG__) & (I2C_FASTMODEPLUS_PB6)) == I2C_FASTMODEPLUS_PB6) || \ + (((__CONFIG__) & (I2C_FASTMODEPLUS_PB7)) == I2C_FASTMODEPLUS_PB7) || \ + (((__CONFIG__) & (I2C_FASTMODEPLUS_PB8)) == I2C_FASTMODEPLUS_PB8) || \ + (((__CONFIG__) & (I2C_FASTMODEPLUS_PB9)) == I2C_FASTMODEPLUS_PB9) || \ + (((__CONFIG__) & (I2C_FASTMODEPLUS_I2C1)) == I2C_FASTMODEPLUS_I2C1) || \ + (((__CONFIG__) & (I2C_FASTMODEPLUS_I2C3)) == I2C_FASTMODEPLUS_I2C3)) +/** + * @} + */ + +/* Private Functions ---------------------------------------------------------*/ +/** @defgroup I2CEx_Private_Functions I2C Extended Private Functions + * @{ + */ +/* Private functions are defined in stm32wbxx_hal_i2c_ex.c file */ +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_I2C_EX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h new file mode 100644 index 0000000..ea9606a --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_ipcc.h @@ -0,0 +1,267 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_ipcc.h + * @author MCD Application Team + * @brief Header file of Mailbox HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_IPCC_H +#define STM32WBxx_HAL_IPCC_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +#if defined(IPCC) + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup IPCC IPCC + * @brief IPCC HAL module driver + * @{ + */ + +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup IPCC_Exported_Constants IPCC Exported Constants + * @{ + */ + +/** @defgroup IPCC_Channel IPCC Channel + * @{ + */ +#define IPCC_CHANNEL_1 0x00000000U +#define IPCC_CHANNEL_2 0x00000001U +#define IPCC_CHANNEL_3 0x00000002U +#define IPCC_CHANNEL_4 0x00000003U +#define IPCC_CHANNEL_5 0x00000004U +#define IPCC_CHANNEL_6 0x00000005U +/** + * @} + */ + +/** + * @} + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup IPCC_Exported_Types IPCC Exported Types + * @{ + */ + +/** + * @brief HAL IPCC State structures definition + */ +typedef enum +{ + HAL_IPCC_STATE_RESET = 0x00U, /*!< IPCC not yet initialized or disabled */ + HAL_IPCC_STATE_READY = 0x01U, /*!< IPCC initialized and ready for use */ + HAL_IPCC_STATE_BUSY = 0x02U /*!< IPCC internal processing is ongoing */ +} HAL_IPCC_StateTypeDef; + +/** + * @brief IPCC channel direction structure definition + */ +typedef enum +{ + IPCC_CHANNEL_DIR_TX = 0x00U, /*!< Channel direction Tx is used by an MCU to transmit */ + IPCC_CHANNEL_DIR_RX = 0x01U /*!< Channel direction Rx is used by an MCU to receive */ +} IPCC_CHANNELDirTypeDef; + +/** + * @brief IPCC channel status structure definition + */ +typedef enum +{ + IPCC_CHANNEL_STATUS_FREE = 0x00U, /*!< Means that a new msg can be posted on that channel */ + IPCC_CHANNEL_STATUS_OCCUPIED = 0x01U /*!< An MCU has posted a msg the other MCU hasn't retrieved */ +} IPCC_CHANNELStatusTypeDef; + +/** + * @brief IPCC handle structure definition + */ +typedef struct __IPCC_HandleTypeDef +{ + IPCC_TypeDef *Instance; /*!< IPCC registers base address */ + void (* ChannelCallbackRx[IPCC_CHANNEL_NUMBER])(struct __IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); /*!< Rx Callback registration table */ + void (* ChannelCallbackTx[IPCC_CHANNEL_NUMBER])(struct __IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); /*!< Tx Callback registration table */ + uint32_t callbackRequest; /*!< Store information about callback notification by channel */ + __IO HAL_IPCC_StateTypeDef State; /*!< IPCC State: initialized or not */ +} IPCC_HandleTypeDef; + +/** + * @brief IPCC callback typedef + */ +typedef void ChannelCb(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ +/** @defgroup IPCC_Exported_Macros IPCC Exported Macros + * @{ + */ + +/** + * @brief Enable the specified interrupt. + * @param __HANDLE__ specifies the IPCC Handle + * @param __CHDIRECTION__ specifies the channels Direction + * This parameter can be one of the following values: + * @arg @ref IPCC_CHANNEL_DIR_TX Transmit channel free interrupt enable + * @arg @ref IPCC_CHANNEL_DIR_RX Receive channel occupied interrupt enable + */ +#define __HAL_IPCC_ENABLE_IT(__HANDLE__, __CHDIRECTION__) \ + (((__CHDIRECTION__) == IPCC_CHANNEL_DIR_RX) ? \ + ((__HANDLE__)->Instance->C1CR |= IPCC_C1CR_RXOIE) : \ + ((__HANDLE__)->Instance->C1CR |= IPCC_C1CR_TXFIE)) + +/** + * @brief Disable the specified interrupt. + * @param __HANDLE__ specifies the IPCC Handle + * @param __CHDIRECTION__ specifies the channels Direction + * This parameter can be one of the following values: + * @arg @ref IPCC_CHANNEL_DIR_TX Transmit channel free interrupt enable + * @arg @ref IPCC_CHANNEL_DIR_RX Receive channel occupied interrupt enable + */ +#define __HAL_IPCC_DISABLE_IT(__HANDLE__, __CHDIRECTION__) \ + (((__CHDIRECTION__) == IPCC_CHANNEL_DIR_RX) ? \ + ((__HANDLE__)->Instance->C1CR &= ~IPCC_C1CR_RXOIE) : \ + ((__HANDLE__)->Instance->C1CR &= ~IPCC_C1CR_TXFIE)) + +/** + * @brief Mask the specified interrupt. + * @param __HANDLE__ specifies the IPCC Handle + * @param __CHDIRECTION__ specifies the channels Direction + * This parameter can be one of the following values: + * @arg @ref IPCC_CHANNEL_DIR_TX Transmit channel free interrupt enable + * @arg @ref IPCC_CHANNEL_DIR_RX Receive channel occupied interrupt enable + * @param __CHINDEX__ specifies the channels number: + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + */ +#define __HAL_IPCC_MASK_CHANNEL_IT(__HANDLE__, __CHDIRECTION__, __CHINDEX__) \ + (((__CHDIRECTION__) == IPCC_CHANNEL_DIR_RX) ? \ + ((__HANDLE__)->Instance->C1MR |= (IPCC_C1MR_CH1OM_Msk << (__CHINDEX__))) : \ + ((__HANDLE__)->Instance->C1MR |= (IPCC_C1MR_CH1FM_Msk << (__CHINDEX__)))) + +/** + * @brief Unmask the specified interrupt. + * @param __HANDLE__ specifies the IPCC Handle + * @param __CHDIRECTION__ specifies the channels Direction + * This parameter can be one of the following values: + * @arg @ref IPCC_CHANNEL_DIR_TX Transmit channel free interrupt enable + * @arg @ref IPCC_CHANNEL_DIR_RX Receive channel occupied interrupt enable + * @param __CHINDEX__ specifies the channels number: + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + */ +#define __HAL_IPCC_UNMASK_CHANNEL_IT(__HANDLE__, __CHDIRECTION__, __CHINDEX__) \ + (((__CHDIRECTION__) == IPCC_CHANNEL_DIR_RX) ? \ + ((__HANDLE__)->Instance->C1MR &= ~(IPCC_C1MR_CH1OM_Msk << (__CHINDEX__))) : \ + ((__HANDLE__)->Instance->C1MR &= ~(IPCC_C1MR_CH1FM_Msk << (__CHINDEX__)))) + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup IPCC_Exported_Functions IPCC Exported Functions + * @{ + */ + +/* Initialization and de-initialization functions *******************************/ +/** @defgroup IPCC_Exported_Functions_Group1 Initialization and deinitialization functions + * @{ + */ +HAL_StatusTypeDef HAL_IPCC_Init(IPCC_HandleTypeDef *hipcc); +HAL_StatusTypeDef HAL_IPCC_DeInit(IPCC_HandleTypeDef *hipcc); +void HAL_IPCC_MspInit(IPCC_HandleTypeDef *hipcc); +void HAL_IPCC_MspDeInit(IPCC_HandleTypeDef *hipcc); +/** + * @} + */ + +/** @defgroup IPCC_Exported_Functions_Group2 Communication functions + * @{ + */ +/* IO operation functions *****************************************************/ +HAL_StatusTypeDef HAL_IPCC_ActivateNotification(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, + IPCC_CHANNELDirTypeDef ChannelDir, ChannelCb cb); +HAL_StatusTypeDef HAL_IPCC_DeActivateNotification(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, + IPCC_CHANNELDirTypeDef ChannelDir); +IPCC_CHANNELStatusTypeDef HAL_IPCC_GetChannelStatus(IPCC_HandleTypeDef const *const hipcc, + uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); +HAL_StatusTypeDef HAL_IPCC_NotifyCPU(IPCC_HandleTypeDef const *const hipcc, uint32_t ChannelIndex, + IPCC_CHANNELDirTypeDef ChannelDir); +/** + * @} + */ + +/** @defgroup IPCC_Exported_Functions_Group3 Peripheral State and Error functions + * @{ + */ +/* Peripheral State and Error functions ****************************************/ +HAL_IPCC_StateTypeDef HAL_IPCC_GetState(IPCC_HandleTypeDef const *const hipcc); +/** + * @} + */ + +/** @defgroup IPCC_IRQ_Handler_and_Callbacks Peripheral IRQ Handler and Callbacks + * @{ + */ +/* IRQHandler and Callbacks used in non blocking modes ************************/ +void HAL_IPCC_TX_IRQHandler(IPCC_HandleTypeDef *const hipcc); +void HAL_IPCC_RX_IRQHandler(IPCC_HandleTypeDef *const hipcc); +void HAL_IPCC_TxCallback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); +void HAL_IPCC_RxCallback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +#endif /* IPCC */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* STM32WBxx_HAL_IPCC_H */ + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h new file mode 100644 index 0000000..2c794e3 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr.h @@ -0,0 +1,513 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_pwr.h + * @author MCD Application Team + * @brief Header file of PWR HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_PWR_H +#define STM32WBxx_HAL_PWR_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/* Include low level driver */ +#include "stm32wbxx_ll_pwr.h" +#include "stm32wbxx_ll_exti.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup PWR PWR + * @brief PWR HAL module driver + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup PWR_Exported_Types PWR Exported Types + * @{ + */ + +/** + * @brief PWR PVD configuration structure definition + */ +typedef struct +{ + uint32_t PVDLevel; /*!< PVDLevel: Specifies the PVD detection level. + This parameter can be a value of @ref PWR_PVD_detection_level. */ + + uint32_t Mode; /*!< Mode: Specifies the operating mode for the selected pins. + This parameter can be a value of @ref PWR_PVD_Mode. */ +} PWR_PVDTypeDef; + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup PWR_Exported_Constants PWR Exported Constants + * @{ + */ + +/** @defgroup PWR_PVD_detection_level Power Voltage Detector Level selection + * @note Refer datasheet for selection voltage value + * @{ + */ +#define PWR_PVDLEVEL_0 (0x00000000U) /*!< PVD threshold around 2.0 V */ +#define PWR_PVDLEVEL_1 ( PWR_CR2_PLS_0) /*!< PVD threshold around 2.2 V */ +#define PWR_PVDLEVEL_2 ( PWR_CR2_PLS_1 ) /*!< PVD threshold around 2.4 V */ +#define PWR_PVDLEVEL_3 ( PWR_CR2_PLS_1 | PWR_CR2_PLS_0) /*!< PVD threshold around 2.5 V */ +#define PWR_PVDLEVEL_4 (PWR_CR2_PLS_2 ) /*!< PVD threshold around 2.6 V */ +#define PWR_PVDLEVEL_5 (PWR_CR2_PLS_2 | PWR_CR2_PLS_0) /*!< PVD threshold around 2.8 V */ +#define PWR_PVDLEVEL_6 (PWR_CR2_PLS_2 | PWR_CR2_PLS_1 ) /*!< PVD threshold around 2.9 V */ +#define PWR_PVDLEVEL_7 (PWR_CR2_PLS_2 | PWR_CR2_PLS_1 | PWR_CR2_PLS_0) /*!< External input analog voltage (compared internally to VREFINT) */ +/** + * @} + */ + +/** @defgroup PWR_PVD_Mode PWR PVD interrupt and event mode + * @{ + */ +/* Note: On STM32WB series, power PVD event is not available on AIEC lines */ +/* (only interruption is available through AIEC line 16). */ +#define PWR_PVD_MODE_NORMAL (0x00000000U) /*!< Basic mode is used */ + +#define PWR_PVD_MODE_IT_RISING (PVD_MODE_IT | PVD_RISING_EDGE) /*!< External Interrupt Mode with Rising edge trigger detection */ +#define PWR_PVD_MODE_IT_FALLING (PVD_MODE_IT | PVD_FALLING_EDGE) /*!< External Interrupt Mode with Falling edge trigger detection */ +#define PWR_PVD_MODE_IT_RISING_FALLING (PVD_MODE_IT | PVD_RISING_FALLING_EDGE) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */ +/** + * @} + */ + +/* Note: On STM32WB series, power PVD event is not available on AIEC lines */ +/* (only interruption is available through AIEC line 16). */ + +/** @defgroup PWR_Low_Power_Mode_Selection PWR Low Power Mode Selection + * @{ + */ +#define PWR_LOWPOWERMODE_STOP0 (0x00000000u) /*!< Stop 0: stop mode with main regulator */ +#define PWR_LOWPOWERMODE_STOP1 (PWR_CR1_LPMS_0) /*!< Stop 1: stop mode with low power regulator */ +#if defined(PWR_SUPPORT_STOP2) +#define PWR_LOWPOWERMODE_STOP2 (PWR_CR1_LPMS_1) /*!< Stop 2: stop mode with low power regulator and VDD12I interruptible digital core domain supply OFF (less peripherals activated than low power mode stop 1 to reduce power consumption)*/ +#endif /* PWR_SUPPORT_STOP2 */ +#define PWR_LOWPOWERMODE_STANDBY (PWR_CR1_LPMS_0 | PWR_CR1_LPMS_1) /*!< Standby mode */ +#define PWR_LOWPOWERMODE_SHUTDOWN (PWR_CR1_LPMS_2) /*!< Shutdown mode */ +/** + * @} + */ + +/** @defgroup PWR_Regulator_state_in_SLEEP_STOP_mode PWR regulator mode + * @{ + */ +#define PWR_MAINREGULATOR_ON (0x00000000U) /*!< Regulator in main mode */ +#define PWR_LOWPOWERREGULATOR_ON (PWR_CR1_LPR) /*!< Regulator in low-power mode */ +/** + * @} + */ + +/** @defgroup PWR_SLEEP_mode_entry PWR SLEEP mode entry + * @{ + */ +#define PWR_SLEEPENTRY_WFI ((uint8_t)0x01) /*!< Wait For Interruption instruction to enter Sleep mode */ +#define PWR_SLEEPENTRY_WFE ((uint8_t)0x02) /*!< Wait For Event instruction to enter Sleep mode */ +/** + * @} + */ + +/** @defgroup PWR_STOP_mode_entry PWR STOP mode entry + * @{ + */ +#define PWR_STOPENTRY_WFI ((uint8_t)0x01) /*!< Wait For Interruption instruction to enter Stop mode */ +#define PWR_STOPENTRY_WFE ((uint8_t)0x02) /*!< Wait For Event instruction to enter Stop mode */ +/** + * @} + */ + +/** + * @} + */ + +/* Private define ------------------------------------------------------------*/ +/** @defgroup PWR_Private_Defines PWR Private Defines + * @{ + */ + +/** @defgroup PWR_PVD_EXTI_LINE PWR PVD external interrupt line + * @{ + */ +#define PWR_EXTI_LINE_PVD (LL_EXTI_LINE_16) /*!< External interrupt line 16 Connected to the PWR PVD */ +/** + * @} + */ + +/** @defgroup PWR_PVD_Mode_Mask PWR PVD Mode Mask + * @{ + */ +/* Note: On STM32WB series, power PVD event is not available on AIEC lines */ +/* (only interruption is available through AIEC line 16). */ +#define PVD_MODE_IT (0x00010000U) /*!< Mask for interruption yielded by PVD threshold crossing */ +#define PVD_RISING_EDGE (0x00000001U) /*!< Mask for rising edge set as PVD trigger */ +#define PVD_FALLING_EDGE (0x00000002U) /*!< Mask for falling edge set as PVD trigger */ +#define PVD_RISING_FALLING_EDGE (0x00000003U) /*!< Mask for rising and falling edges set as PVD trigger */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ +/** @defgroup PWR_Exported_Macros PWR Exported Macros + * @{ + */ +/** @brief Check whether or not a specific PWR flag is set. + * @param __FLAG__ specifies the flag to check. + * This parameter can be one of the following values: + * + * /--------------------------------SR1-------------------------------/ + * @arg @ref PWR_FLAG_WUF1 Wake Up Flag 1. Indicates that a wakeup event + * was received from the WKUP pin 1. + * @arg @ref PWR_FLAG_WUF2 Wake Up Flag 2. Indicates that a wakeup event + * was received from the WKUP pin 2. + * @arg @ref PWR_FLAG_WUF3 Wake Up Flag 3. Indicates that a wakeup event + * was received from the WKUP pin 3. + * @arg @ref PWR_FLAG_WUF4 Wake Up Flag 4. Indicates that a wakeup event + * was received from the WKUP pin 4. + * @arg @ref PWR_FLAG_WUF5 Wake Up Flag 5. Indicates that a wakeup event + * was received from the WKUP pin 5. + * + * @arg @ref PWR_FLAG_BHWF BLE_Host WakeUp Flag + * @arg @ref PWR_FLAG_FRCBYPI SMPS Forced in Bypass Interrupt Flag + * @arg @ref PWR_FLAG_RFPHASEI Radio Phase Interrupt Flag + * @arg @ref PWR_FLAG_BLEACTI BLE Activity Interrupt Flag + * @arg @ref PWR_FLAG_802ACTI 802.15.4 Activity Interrupt Flag + * @arg @ref PWR_FLAG_HOLDC2I CPU2 on-Hold Interrupt Flag + * @arg @ref PWR_FLAG_WUFI Wake-Up Flag Internal. Set when a wakeup is detected on + * the internal wakeup line. + * + * @arg @ref PWR_FLAG_SMPSRDYF SMPS Ready Flag + * @arg @ref PWR_FLAG_SMPSBYPF SMPS Bypass Flag + * + * /--------------------------------SR2-------------------------------/ + * @arg @ref PWR_FLAG_REGLPS Low Power Regulator Started. Indicates whether or not the + * low-power regulator is ready. + * @arg @ref PWR_FLAG_REGLPF Low Power Regulator Flag. Indicates whether the + * regulator is ready in main mode or is in low-power mode. + * + * @arg @ref PWR_FLAG_VOSF Voltage Scaling Flag. Indicates whether the regulator is ready + * in the selected voltage range or is still changing to the required voltage level. + * @arg @ref PWR_FLAG_PVDO Power Voltage Detector Output. Indicates whether VDD voltage is + * below or above the selected PVD threshold. + * + * @arg @ref PWR_FLAG_PVMO1 Peripheral Voltage Monitoring Output 1. Indicates whether VDDUSB voltage is + * is below or above PVM1 threshold (applicable when USB feature is supported). + * @arg @ref PWR_FLAG_PVMO3 Peripheral Voltage Monitoring Output 3. Indicates whether VDDA voltage is + * is below or above PVM3 threshold. + * + * /----------------------------EXTSCR--------------------------/ + * @arg @ref PWR_FLAG_STOP System Stop Flag for CPU1. + * @arg @ref PWR_FLAG_SB System Standby Flag for CPU1. + * + * @arg @ref PWR_FLAG_C2STOP System Stop Flag for CPU2. + * @arg @ref PWR_FLAG_C2SB System Standby Flag for CPU2. + * + * @arg @ref PWR_FLAG_CRITICAL_RF_PHASE Critical radio system phase flag. + * + * @arg @ref PWR_FLAG_C1DEEPSLEEP CPU1 DeepSleep Flag. + * @arg @ref PWR_FLAG_C2DEEPSLEEP CPU2 DeepSleep Flag. + * + * @retval The new state of __FLAG__ (TRUE or FALSE). + */ +#define __HAL_PWR_GET_FLAG(__FLAG__) ((((__FLAG__) & PWR_FLAG_REG_MASK) == PWR_FLAG_REG_SR1) ? \ + ( \ + PWR->SR1 & (1UL << ((__FLAG__) & 31UL)) \ + ) \ + : \ + ( \ + (((__FLAG__) & PWR_FLAG_REG_MASK) == PWR_FLAG_REG_SR2) ? \ + ( \ + PWR->SR2 & (1UL << ((__FLAG__) & 31UL)) \ + ) \ + : \ + ( \ + PWR->EXTSCR & (1UL << ((__FLAG__) & 31UL)) \ + ) \ + ) \ + ) + +/** @brief Clear a specific PWR flag. + * @note Clearing of flags {PWR_FLAG_STOP, PWR_FLAG_SB} + * and flags {PWR_FLAG_C2STOP, PWR_FLAG_C2SB} are grouped: + * clearing of one flag also clears the other one. + * @param __FLAG__ specifies the flag to clear. + * This parameter can be one of the following values: + * + * /--------------------------------SCR (SRR)------------------------------/ + * @arg @ref PWR_FLAG_WUF1 Wake Up Flag 1. Indicates that a wakeup event + * was received from the WKUP pin 1. + * @arg @ref PWR_FLAG_WUF2 Wake Up Flag 2. Indicates that a wakeup event + * was received from the WKUP pin 2. + * @arg @ref PWR_FLAG_WUF3 Wake Up Flag 3. Indicates that a wakeup event + * was received from the WKUP pin 3. + * @arg @ref PWR_FLAG_WUF4 Wake Up Flag 4. Indicates that a wakeup event + * was received from the WKUP pin 4. + * @arg @ref PWR_FLAG_WUF5 Wake Up Flag 5. Indicates that a wakeup event + * was received from the WKUP pin 5. + * @arg @ref PWR_FLAG_WU Encompasses all five Wake Up Flags. + * + * @arg @ref PWR_FLAG_BHWF Clear BLE_Host Wakeup Flag. + * @arg @ref PWR_FLAG_FRCBYPI Clear SMPS Forced in Bypass Interrupt Flag. + * @arg @ref PWR_FLAG_RFPHASEI RF Phase Interrupt Clear. + * @arg @ref PWR_FLAG_BLEACTI BLE Activity Interrupt Clear. + * @arg @ref PWR_FLAG_802ACTI 802.15.4. Activity Interrupt Clear. + * @arg @ref PWR_FLAG_HOLDC2I CPU2 on-Hold Interrupt Clear. + * + * /----------------------------EXTSCR--------------------------/ + * @arg @ref PWR_FLAG_STOP System Stop Flag for CPU1. + * @arg @ref PWR_FLAG_SB System Standby Flag for CPU1. + * + * @arg @ref PWR_FLAG_C2STOP System Stop Flag for CPU2. + * @arg @ref PWR_FLAG_C2SB System Standby Flag for CPU2. + * + * @arg @ref PWR_FLAG_CRITICAL_RF_PHASE RF phase Flag. + * + * @retval None + */ +#define __HAL_PWR_CLEAR_FLAG(__FLAG__) ((((__FLAG__) & PWR_FLAG_REG_MASK) == PWR_FLAG_REG_EXTSCR) ? \ + ( \ + PWR->EXTSCR = (1UL << (((__FLAG__) & PWR_FLAG_EXTSCR_CLR_MASK) >> PWR_FLAG_EXTSCR_CLR_POS)) \ + ) \ + : \ + ( \ + (((__FLAG__)) == PWR_FLAG_WU) ? \ + (PWR->SCR = PWR_SCR_CWUF) : \ + (PWR->SCR = (1UL << ((__FLAG__) & 31UL))) \ + ) \ + ) + +/** + * @brief Enable the PVD Extended Interrupt C1 Line. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_ENABLE_IT() LL_EXTI_EnableIT_0_31(PWR_EXTI_LINE_PVD) + +/** + * @brief Enable the PVD Extended Interrupt C2 Line. + * @retval None + */ +#define __HAL_PWR_PVD_EXTIC2_ENABLE_IT() LL_C2_EXTI_EnableIT_0_31(PWR_EXTI_LINE_PVD) + + +/** + * @brief Disable the PVD Extended Interrupt C1 Line. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_DISABLE_IT() LL_EXTI_DisableIT_0_31(PWR_EXTI_LINE_PVD) + +/** + * @brief Disable the PVD Extended Interrupt C2 Line. + * @retval None + */ +#define __HAL_PWR_PVD_EXTIC2_DISABLE_IT() LL_C2_EXTI_DisableIT_0_31(PWR_EXTI_LINE_PVD) + +/* Note: On STM32WB series, power PVD event is not available on AIEC lines */ +/* (only interruption is available through AIEC line 16). */ + +/** + * @brief Enable the PVD Extended Interrupt Rising Trigger. + * @note PVD flag polarity is inverted compared to EXTI line, therefore + * EXTI rising and falling logic edges are inverted versus PVD voltage edges. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE() LL_EXTI_EnableRisingTrig_0_31(PWR_EXTI_LINE_PVD) + +/** + * @brief Disable the PVD Extended Interrupt Rising Trigger. + * @note PVD flag polarity is inverted compared to EXTI line, therefore + * EXTI rising and falling logic edges are inverted versus PVD voltage edges. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE() LL_EXTI_DisableFallingTrig_0_31(PWR_EXTI_LINE_PVD) + +/** + * @brief Enable the PVD Extended Interrupt Falling Trigger. + * @note PVD flag polarity is inverted compared to EXTI line, therefore + * EXTI rising and falling logic edges are inverted versus PVD voltage edges. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE() LL_EXTI_EnableFallingTrig_0_31(PWR_EXTI_LINE_PVD) + + +/** + * @brief Disable the PVD Extended Interrupt Falling Trigger. + * @note PVD flag polarity is inverted compared to EXTI line, therefore + * EXTI rising and falling logic edges are inverted versus PVD voltage edges. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE() LL_EXTI_DisableRisingTrig_0_31(PWR_EXTI_LINE_PVD) + + +/** + * @brief Enable the PVD Extended Interrupt Rising & Falling Trigger. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE() \ + do { \ + __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE(); \ + __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE(); \ + } while(0) + +/** + * @brief Disable the PVD Extended Interrupt Rising & Falling Trigger. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE() \ + do { \ + __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE(); \ + __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE(); \ + } while(0) + +/** + * @brief Generate a Software interrupt on selected EXTI line. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT() LL_EXTI_GenerateSWI_0_31(PWR_EXTI_LINE_PVD) + +/** + * @brief Check whether or not the PVD EXTI interrupt flag is set. + * @retval EXTI PVD Line Status. + */ +#define __HAL_PWR_PVD_EXTI_GET_FLAG() LL_EXTI_ReadFlag_0_31(PWR_EXTI_LINE_PVD) + +/** + * @brief Clear the PVD EXTI interrupt flag. + * @retval None + */ +#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG() LL_EXTI_ClearFlag_0_31(PWR_EXTI_LINE_PVD) + +/** + * @} + */ + + +/* Private macros --------------------------------------------------------*/ +/** @defgroup PWR_Private_Macros PWR Private Macros + * @{ + */ + +#define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLEVEL_0) || ((LEVEL) == PWR_PVDLEVEL_1)|| \ + ((LEVEL) == PWR_PVDLEVEL_2) || ((LEVEL) == PWR_PVDLEVEL_3)|| \ + ((LEVEL) == PWR_PVDLEVEL_4) || ((LEVEL) == PWR_PVDLEVEL_5)|| \ + ((LEVEL) == PWR_PVDLEVEL_6) || ((LEVEL) == PWR_PVDLEVEL_7)) + +#define IS_PWR_PVD_MODE(MODE) (((MODE) == PWR_PVD_MODE_NORMAL) ||\ + ((MODE) == PWR_PVD_MODE_IT_RISING) ||\ + ((MODE) == PWR_PVD_MODE_IT_FALLING) ||\ + ((MODE) == PWR_PVD_MODE_IT_RISING_FALLING)) + + + +#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \ + ((REGULATOR) == PWR_LOWPOWERREGULATOR_ON)) + + +#define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || \ + ((ENTRY) == PWR_SLEEPENTRY_WFE)) + +#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || \ + ((ENTRY) == PWR_STOPENTRY_WFE)) +/** + * @} + */ + +/* Include PWR HAL Extended module */ +#include "stm32wbxx_hal_pwr_ex.h" + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup PWR_Exported_Functions PWR Exported Functions + * @{ + */ + +/** @defgroup PWR_Exported_Functions_Group1 Initialization and de-initialization functions + * @{ + */ + +/* Initialization and de-initialization functions *******************************/ +void HAL_PWR_DeInit(void); + +void HAL_PWR_EnableBkUpAccess(void); +void HAL_PWR_DisableBkUpAccess(void); +/** + * @} + */ + +/** @defgroup PWR_Exported_Functions_Group2 Peripheral Control functions + * @{ + */ +/* Peripheral Control functions ************************************************/ +HAL_StatusTypeDef HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD); +void HAL_PWR_EnablePVD(void); +void HAL_PWR_DisablePVD(void); + +/* WakeUp pins configuration functions ****************************************/ +void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity); +void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx); + +/* Low Power modes configuration functions ************************************/ +void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry); +void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry); +void HAL_PWR_EnterSTANDBYMode(void); + +void HAL_PWR_PVDCallback(void); +void HAL_PWR_EnableSleepOnExit(void); +void HAL_PWR_DisableSleepOnExit(void); + +void HAL_PWR_EnableSEVOnPend(void); +void HAL_PWR_DisableSEVOnPend(void); + + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + + +#endif /* STM32WBxx_HAL_PWR_H */ + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h new file mode 100644 index 0000000..413adc5 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_pwr_ex.h @@ -0,0 +1,976 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_pwr_ex.h + * @author MCD Application Team + * @brief Header file of PWR HAL Extended module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_PWR_EX_H +#define STM32WBxx_HAL_PWR_EX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup PWREx PWREx + * @brief PWR Extended HAL module driver + * @{ + */ + + +/* Exported types ------------------------------------------------------------*/ + +/** @defgroup PWREx_Exported_Types PWR Extended Exported Types + * @{ + */ + +/** + * @brief PWR PVM configuration structure definition + */ +typedef struct +{ + uint32_t PVMType; /*!< PVMType: Specifies which voltage is monitored and against which threshold. + This parameter can be a value of @ref PWREx_PVM_Type. + @arg @ref PWR_PVM_1 Peripheral Voltage Monitoring 1 enable: VDDUSB versus 1.2 V (applicable when USB feature is supported). + @arg @ref PWR_PVM_3 Peripheral Voltage Monitoring 3 enable: VDDA versus 1.62 V. + */ + + uint32_t Mode; /*!< Mode: Specifies the operating mode for the selected pins. + This parameter can be a value of @ref PWREx_PVM_Mode. */ + uint32_t WakeupTarget; /*!< Specifies the Wakeup Target + This parameter can be a value of @ref PWREx_WakeUpTarget_Definition */ +} PWR_PVMTypeDef; + +#if defined(PWR_CR5_SMPSEN) +/** + * @brief PWR SMPS step down configuration structure definition + */ +typedef struct +{ + uint32_t StartupCurrent; /*!< SMPS step down converter supply startup current selection. + This parameter can be a value of @ref PWREx_SMPS_STARTUP_CURRENT. */ + + uint32_t OutputVoltage; /*!< SMPS step down converter output voltage scaling voltage level. + This parameter can be a value of @ref PWREx_SMPS_OUTPUT_VOLTAGE_LEVEL */ +} PWR_SMPSTypeDef; +#endif /* PWR_CR5_SMPSEN */ + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup PWREx_Exported_Constants PWR Extended Exported Constants + * @{ + */ + +/** @defgroup PWREx_WUP_Polarity Shift to apply to retrieve polarity information from PWR_WAKEUP_PINy_xxx constants + * @{ + */ +#define PWR_WUP_POLARITY_SHIFT 0x05U /*!< Internal constant used to retrieve wakeup pin polarity */ +/** + * @} + */ + + +/** @defgroup PWREx_WakeUp_Pins PWR wake-up pins + * @{ + */ +#define PWR_WAKEUP_PIN1_HIGH PWR_CR3_EWUP1 /*!< Wakeup pin 1 (with high level polarity) */ +#if defined(PWR_CR3_EWUP2) +#define PWR_WAKEUP_PIN2_HIGH PWR_CR3_EWUP2 /*!< Wakeup pin 2 (with high level polarity) */ +#endif /* PWR_CR3_EWUP2 */ +#if defined(PWR_CR3_EWUP3) +#define PWR_WAKEUP_PIN3_HIGH PWR_CR3_EWUP3 /*!< Wakeup pin 3 (with high level polarity) */ +#endif /* PWR_CR3_EWUP3 */ +#define PWR_WAKEUP_PIN4_HIGH PWR_CR3_EWUP4 /*!< Wakeup pin 4 (with high level polarity) */ +#if defined(PWR_CR3_EWUP5) +#define PWR_WAKEUP_PIN5_HIGH PWR_CR3_EWUP5 /*!< Wakeup pin 5 (with high level polarity) */ +#endif /* PWR_CR3_EWUP5 */ + +#define PWR_WAKEUP_PIN1_LOW ((PWR_CR4_WP1<CR1, PWR_CR1_VOS, (__REGULATOR__)); \ + /* Delay after an RCC peripheral clock enabling */ \ + tmpreg = READ_BIT(PWR->CR1, PWR_CR1_VOS); \ + UNUSED(tmpreg); \ + } while(0) +#endif /* PWR_CR1_VOS */ + +/** + * @brief Wakeup BLE controller from its sleep mode + * @note This bit is automatically reset when 802.15.4 controller + * exit its sleep mode. + * @retval None + */ +#define __HAL_C2_PWR_WAKEUP_BLE() LL_C2_PWR_WakeUp_BLE() + +/** + * @brief Wakeup 802.15.4 controller from its sleep mode + * @note This bit is automatically reset when 802.15.4 controller + * exit its sleep mode. + * @retval None + */ +#define __HAL_C2_PWR_WAKEUP_802_15_4() LL_C2_PWR_WakeUp_802_15_4() + +/** + * @} + */ + +/* Private macros --------------------------------------------------------*/ +/** @addtogroup PWREx_Private_Macros PWR Extended Private Macros + * @{ + */ +#if defined(PWR_CR3_EWUP2) +#define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1_HIGH) || \ + ((PIN) == PWR_WAKEUP_PIN2_HIGH) || \ + ((PIN) == PWR_WAKEUP_PIN3_HIGH) || \ + ((PIN) == PWR_WAKEUP_PIN4_HIGH) || \ + ((PIN) == PWR_WAKEUP_PIN5_HIGH) || \ + ((PIN) == PWR_WAKEUP_PIN1_LOW) || \ + ((PIN) == PWR_WAKEUP_PIN2_LOW) || \ + ((PIN) == PWR_WAKEUP_PIN3_LOW) || \ + ((PIN) == PWR_WAKEUP_PIN4_LOW) || \ + ((PIN) == PWR_WAKEUP_PIN5_LOW)) +#else +#define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1_HIGH) || \ + ((PIN) == PWR_WAKEUP_PIN4_HIGH) || \ + ((PIN) == PWR_WAKEUP_PIN1_LOW) || \ + ((PIN) == PWR_WAKEUP_PIN4_LOW)) +#endif /* PWR_CR3_EWUP2 */ + +#define IS_PWR_WAKEUP_PIN_POLARITY(POLARITY) (((POLARITY) == PWR_PIN_POLARITY_HIGH) || \ + ((POLARITY) == PWR_PIN_POLARITY_LOW)) + +#if defined(PWR_CR2_PVME1) +#define IS_PWR_PVM_TYPE(TYPE) (((TYPE) == PWR_PVM_1) ||\ + ((TYPE) == PWR_PVM_3)) +#else +#define IS_PWR_PVM_TYPE(TYPE) ((TYPE) == PWR_PVM_3) +#endif /* PWR_CR2_PVME1 */ + +#define IS_PWR_PVM_MODE(MODE) (((MODE) == PWR_PVM_MODE_NORMAL) ||\ + ((MODE) == PWR_PVM_MODE_IT_RISING) ||\ + ((MODE) == PWR_PVM_MODE_IT_FALLING) ||\ + ((MODE) == PWR_PVM_MODE_IT_RISING_FALLING) ||\ + ((MODE) == PWR_PVM_MODE_EVENT_RISING) ||\ + ((MODE) == PWR_PVM_MODE_EVENT_FALLING) ||\ + ((MODE) == PWR_PVM_MODE_EVENT_RISING_FALLING)) + +#define IS_PWR_FLASH_POWERDOWN(__MODE__) ((((__MODE__) & (PWR_FLASHPD_LPRUN | PWR_FLASHPD_LPSLEEP)) != 0x00u) && \ + (((__MODE__) & ~(PWR_FLASHPD_LPRUN | PWR_FLASHPD_LPSLEEP)) == 0x00u)) + +#if defined(PWR_CR1_VOS) +#define IS_PWR_VOLTAGE_SCALING_RANGE(RANGE) (((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE1) || \ + ((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE2)) +#endif /* PWR_CR1_VOS */ + +#define IS_PWR_BATTERY_RESISTOR_SELECT(RESISTOR) (((RESISTOR) == PWR_BATTERY_CHARGING_RESISTOR_5) ||\ + ((RESISTOR) == PWR_BATTERY_CHARGING_RESISTOR_1_5)) + +#define IS_PWR_BATTERY_CHARGING(CHARGING) (((CHARGING) == PWR_BATTERY_CHARGING_DISABLE) ||\ + ((CHARGING) == PWR_BATTERY_CHARGING_ENABLE)) + + +#define IS_PWR_GPIO_BIT_NUMBER(BIT_NUMBER) (((BIT_NUMBER) & GPIO_PIN_MASK) != (uint32_t)0x00) + +#if defined(GPIOD) +#define IS_PWR_GPIO(GPIO) (((GPIO) == PWR_GPIO_A) ||\ + ((GPIO) == PWR_GPIO_B) ||\ + ((GPIO) == PWR_GPIO_C) ||\ + ((GPIO) == PWR_GPIO_D) ||\ + ((GPIO) == PWR_GPIO_E) ||\ + ((GPIO) == PWR_GPIO_H)) +#else +#define IS_PWR_GPIO(GPIO) (((GPIO) == PWR_GPIO_A) ||\ + ((GPIO) == PWR_GPIO_B) ||\ + ((GPIO) == PWR_GPIO_C) ||\ + ((GPIO) == PWR_GPIO_E) ||\ + ((GPIO) == PWR_GPIO_H)) +#endif /* GPIOD */ + +#if defined(PWR_CR5_SMPSEN) +#define IS_PWR_SMPS_MODE(SMPS_MODE) (((SMPS_MODE) == PWR_SMPS_BYPASS) ||\ + ((SMPS_MODE) == PWR_SMPS_STEP_DOWN)) + +#define IS_PWR_SMPS_STARTUP_CURRENT(SMPS_STARTUP_CURRENT) (((SMPS_STARTUP_CURRENT) == PWR_SMPS_STARTUP_CURRENT_80MA) ||\ + ((SMPS_STARTUP_CURRENT) == PWR_SMPS_STARTUP_CURRENT_100MA) ||\ + ((SMPS_STARTUP_CURRENT) == PWR_SMPS_STARTUP_CURRENT_120MA) ||\ + ((SMPS_STARTUP_CURRENT) == PWR_SMPS_STARTUP_CURRENT_140MA) ||\ + ((SMPS_STARTUP_CURRENT) == PWR_SMPS_STARTUP_CURRENT_160MA) ||\ + ((SMPS_STARTUP_CURRENT) == PWR_SMPS_STARTUP_CURRENT_180MA) ||\ + ((SMPS_STARTUP_CURRENT) == PWR_SMPS_STARTUP_CURRENT_200MA) ||\ + ((SMPS_STARTUP_CURRENT) == PWR_SMPS_STARTUP_CURRENT_220MA)) + +#define IS_PWR_SMPS_OUTPUT_VOLTAGE(SMPS_OUTPUT_VOLTAGE) (((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V20) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V25) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V30) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V35) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V40) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V45) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V50) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V55) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V60) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V65) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V70) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V75) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V80) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V85) ||\ + ((SMPS_OUTPUT_VOLTAGE) == PWR_SMPS_OUTPUT_VOLTAGE_1V90)) +#endif /* PWR_CR5_SMPSEN */ + +#define IS_PWR_CORE(CPU) (((CPU) == PWR_CORE_CPU1) || ((CPU) == PWR_CORE_CPU2)) + +#define IS_PWR_CORE_HOLD_RELEASE(CPU) ((CPU) == PWR_CORE_CPU2) + +/** + * @} + */ + + +/** @addtogroup PWREx_Exported_Functions PWR Extended Exported Functions + * @{ + */ + +/** @addtogroup PWREx_Exported_Functions_Group1 Extended Peripheral Control functions + * @{ + */ + +/* Peripheral Control functions **********************************************/ +uint32_t HAL_PWREx_GetVoltageRange(void); +HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling); + +void HAL_PWREx_EnableBatteryCharging(uint32_t ResistorSelection); +void HAL_PWREx_DisableBatteryCharging(void); + +void HAL_PWREx_EnableVddUSB(void); +void HAL_PWREx_DisableVddUSB(void); + +void HAL_PWREx_EnableInternalWakeUpLine(void); +void HAL_PWREx_DisableInternalWakeUpLine(void); + +#if defined(PWR_CR5_SMPSEN) +void HAL_PWREx_EnableBORH_SMPSBypassIT(void); +void HAL_PWREx_DisableBORH_SMPSBypassIT(void); +#endif /* PWR_CR5_SMPSEN */ +void HAL_PWREx_EnableRFPhaseIT(void); +void HAL_PWREx_DisableRFPhaseIT(void); +void HAL_PWREx_EnableBLEActivityIT(void); +void HAL_PWREx_DisableBLEActivityIT(void); +void HAL_PWREx_Enable802ActivityIT(void); +void HAL_PWREx_Disable802ActivityIT(void); +void HAL_PWREx_EnableHOLDC2IT(void); +void HAL_PWREx_DisableHOLDC2IT(void); + +void HAL_PWREx_HoldCore(uint32_t CPU); +void HAL_PWREx_ReleaseCore(uint32_t CPU); + +HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber); +HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber); +HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber); +HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber); +void HAL_PWREx_EnablePullUpPullDownConfig(void); +void HAL_PWREx_DisablePullUpPullDownConfig(void); + +#if defined(PWR_CR5_SMPSEN) +void HAL_PWREx_SetBORConfig(uint32_t BORConfiguration); +uint32_t HAL_PWREx_GetBORConfig(void); +#endif /* PWR_CR5_SMPSEN */ + +void HAL_PWREx_EnableSRAMRetention(void); +void HAL_PWREx_DisableSRAMRetention(void); + +void HAL_PWREx_EnableFlashPowerDown(uint32_t PowerMode); +void HAL_PWREx_DisableFlashPowerDown(uint32_t PowerMode); + +#if defined(PWR_CR2_PVME1) +void HAL_PWREx_EnablePVM1(void); +void HAL_PWREx_DisablePVM1(void); +#endif /* PWR_CR2_PVME1 */ + +void HAL_PWREx_EnablePVM3(void); +void HAL_PWREx_DisablePVM3(void); + +HAL_StatusTypeDef HAL_PWREx_ConfigPVM(PWR_PVMTypeDef *sConfigPVM); + +#if defined(PWR_CR5_SMPSEN) +HAL_StatusTypeDef HAL_PWREx_ConfigSMPS(PWR_SMPSTypeDef *sConfigSMPS); +void HAL_PWREx_SMPS_SetMode(uint32_t OperatingMode); +uint32_t HAL_PWREx_SMPS_GetEffectiveMode(void); +#endif /* PWR_CR5_SMPSEN */ + +/* WakeUp pins configuration functions ****************************************/ +void HAL_PWREx_EnableWakeUpPin(uint32_t WakeUpPinPolarity, uint32_t wakeupTarget); +uint32_t HAL_PWREx_GetWakeupFlag(uint32_t WakeUpFlag); +HAL_StatusTypeDef HAL_PWREx_ClearWakeupFlag(uint32_t WakeUpFlag); + +/* Low Power modes configuration functions ************************************/ +void HAL_PWREx_EnableLowPowerRunMode(void); +HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void); + +void HAL_PWREx_EnterSTOP0Mode(uint8_t STOPEntry); +void HAL_PWREx_EnterSTOP1Mode(uint8_t STOPEntry); +#if defined(PWR_SUPPORT_STOP2) +void HAL_PWREx_EnterSTOP2Mode(uint8_t STOPEntry); +#endif /* PWR_SUPPORT_STOP2 */ +void HAL_PWREx_EnterSHUTDOWNMode(void); + +void HAL_PWREx_PVD_PVM_IRQHandler(void); + +#if defined(PWR_CR2_PVME1) +void HAL_PWREx_PVM1Callback(void); +#endif /* PWR_CR2_PVME1 */ +void HAL_PWREx_PVM3Callback(void); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + + +#endif /* STM32WBxx_HAL_PWR_EX_H */ + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h new file mode 100644 index 0000000..50b7509 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc.h @@ -0,0 +1,3443 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_rcc.h + * @author MCD Application Team + * @brief Header file of RCC HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_RCC_H +#define STM32WBxx_HAL_RCC_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" +#include "stm32wbxx_ll_rcc.h" +#include "stm32wbxx_ll_bus.h" + + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup RCC + * @{ + */ + +/* Private constants ---------------------------------------------------------*/ +/** @addtogroup RCC_Private_Constants + * @{ + */ +/* Defines used for Flags */ +#define CR_REG_INDEX 1U +#define BDCR_REG_INDEX 2U +#define CSR_REG_INDEX 3U +#define CRRCR_REG_INDEX 4U + +#define RCC_FLAG_MASK 0x1FU + +/* Defines Oscillator Masks */ +#if defined(RCC_HSI48_SUPPORT) +#define RCC_OSCILLATORTYPE_ALL (RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_HSI | \ + RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_MSI | \ + RCC_OSCILLATORTYPE_LSI1 | RCC_OSCILLATORTYPE_LSI2 | \ + RCC_OSCILLATORTYPE_LSE) /*!< All Oscillator to configure */ +#else +#define RCC_OSCILLATORTYPE_ALL (RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_HSI | \ + RCC_OSCILLATORTYPE_MSI | RCC_OSCILLATORTYPE_LSI1 | \ + RCC_OSCILLATORTYPE_LSI2 | RCC_OSCILLATORTYPE_LSE) /*!< All Oscillator to configure */ +#endif /* RCC_HSI48_SUPPORT */ + +/** @defgroup RCC_Reset_Flag Reset Flag + * @{ + */ +#define RCC_RESET_FLAG_OBL RCC_CSR_OBLRSTF /*!< Option Byte Loader reset flag */ +#define RCC_RESET_FLAG_PIN RCC_CSR_PINRSTF /*!< PIN reset flag */ +#define RCC_RESET_FLAG_PWR RCC_CSR_BORRSTF /*!< BOR or POR/PDR reset flag */ +#define RCC_RESET_FLAG_SW RCC_CSR_SFTRSTF /*!< Software Reset flag */ +#define RCC_RESET_FLAG_IWDG RCC_CSR_IWDGRSTF /*!< Independent Watchdog reset flag */ +#define RCC_RESET_FLAG_WWDG RCC_CSR_WWDGRSTF /*!< Window watchdog reset flag */ +#define RCC_RESET_FLAG_LPWR RCC_CSR_LPWRRSTF /*!< Low power reset flag */ +#define RCC_RESET_FLAG_ALL (RCC_RESET_FLAG_OBL | RCC_RESET_FLAG_PIN | RCC_RESET_FLAG_PWR | \ + RCC_RESET_FLAG_SW | RCC_RESET_FLAG_IWDG | RCC_RESET_FLAG_WWDG | \ + RCC_RESET_FLAG_LPWR) +/** + * @} + */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @addtogroup RCC_Private_Macros + * @{ + */ + +#define IS_RCC_OSCILLATORTYPE(__OSCILLATOR__) (((__OSCILLATOR__) == RCC_OSCILLATORTYPE_NONE) || \ + (((__OSCILLATOR__) & ~RCC_OSCILLATORTYPE_ALL) == 0x00U)) + +#define IS_RCC_HSE(__HSE__) (((__HSE__) == RCC_HSE_OFF) || ((__HSE__) == RCC_HSE_ON)) + +#define IS_RCC_LSE(__LSE__) (((__LSE__) == RCC_LSE_OFF) || ((__LSE__) == RCC_LSE_ON) || \ + ((__LSE__) == RCC_LSE_BYPASS)) + +#define IS_RCC_HSI(__HSI__) (((__HSI__) == RCC_HSI_OFF) || ((__HSI__) == RCC_HSI_ON)) + +#define IS_RCC_HSI_CALIBRATION_VALUE(__VALUE__) ((__VALUE__) <= (uint32_t)127U) + +#define IS_RCC_LSI(__LSI__) (((__LSI__) == RCC_LSI_OFF) || ((__LSI__) == RCC_LSI_ON)) + +#define IS_RCC_LSI2_CALIBRATION_VALUE(__VALUE__) ((__VALUE__) <= (uint32_t)15U) + + +#define IS_RCC_MSI(__MSI__) (((__MSI__) == RCC_MSI_OFF) || ((__MSI__) == RCC_MSI_ON)) + + +#define IS_RCC_MSICALIBRATION_VALUE(__VALUE__) ((__VALUE__) <= (uint32_t)255U) + +#if defined(RCC_HSI48_SUPPORT) +#define IS_RCC_HSI48(__HSI48__) (((__HSI48__) == RCC_HSI48_OFF) || ((__HSI48__) == RCC_HSI48_ON)) +#endif /* RCC_HSI48_SUPPORT */ + +#define IS_RCC_PLL(__PLL__) (((__PLL__) == RCC_PLL_NONE) ||((__PLL__) == RCC_PLL_OFF) || \ + ((__PLL__) == RCC_PLL_ON)) + +#define IS_RCC_PLLSOURCE(__SOURCE__) (((__SOURCE__) == RCC_PLLSOURCE_MSI) || \ + ((__SOURCE__) == RCC_PLLSOURCE_HSI) || \ + ((__SOURCE__) == RCC_PLLSOURCE_HSE)) + +#define IS_RCC_PLLM_VALUE(__VALUE__) (((__VALUE__) == RCC_PLLM_DIV1) || \ + ((__VALUE__) == RCC_PLLM_DIV2) || \ + ((__VALUE__) == RCC_PLLM_DIV3) || \ + ((__VALUE__) == RCC_PLLM_DIV4) || \ + ((__VALUE__) == RCC_PLLM_DIV5) || \ + ((__VALUE__) == RCC_PLLM_DIV6) || \ + ((__VALUE__) == RCC_PLLM_DIV7) || \ + ((__VALUE__) == RCC_PLLM_DIV8)) + +#define IS_RCC_PLLN_VALUE(__VALUE__) ((6U <= (__VALUE__)) && ((__VALUE__) <= 127U)) + +#define IS_RCC_PLLP_VALUE(__VALUE__) ((RCC_PLLP_DIV2 <= (__VALUE__)) && ((__VALUE__) <= RCC_PLLP_DIV32)) + +#define IS_RCC_PLLQ_VALUE(__VALUE__) ((RCC_PLLQ_DIV2 <= (__VALUE__)) && ((__VALUE__) <= RCC_PLLQ_DIV8)) + +#define IS_RCC_PLLR_VALUE(__VALUE__) ((RCC_PLLR_DIV2 <= (__VALUE__)) && ((__VALUE__) <= RCC_PLLR_DIV8)) + +#if defined(SAI1) +#define IS_RCC_PLLSAI1CLOCKOUT_VALUE(__VALUE__) (((((__VALUE__) & RCC_PLLSAI1_ADCCLK) == RCC_PLLSAI1_ADCCLK) || \ + (((__VALUE__) & RCC_PLLSAI1_SAI1CLK) == RCC_PLLSAI1_SAI1CLK) || \ + (((__VALUE__) & RCC_PLLSAI1_USBCLK) == RCC_PLLSAI1_USBCLK)) && \ + (((__VALUE__) & ~(RCC_PLLSAI1_ADCCLK | RCC_PLLSAI1_SAI1CLK | \ + RCC_PLLSAI1_USBCLK)) == 0U)) +#endif /* SAI1 */ +#define IS_RCC_MSI_CLOCK_RANGE(__RANGE__) (((__RANGE__) == RCC_MSIRANGE_0) || \ + ((__RANGE__) == RCC_MSIRANGE_1) || \ + ((__RANGE__) == RCC_MSIRANGE_2) || \ + ((__RANGE__) == RCC_MSIRANGE_3) || \ + ((__RANGE__) == RCC_MSIRANGE_4) || \ + ((__RANGE__) == RCC_MSIRANGE_5) || \ + ((__RANGE__) == RCC_MSIRANGE_6) || \ + ((__RANGE__) == RCC_MSIRANGE_7) || \ + ((__RANGE__) == RCC_MSIRANGE_8) || \ + ((__RANGE__) == RCC_MSIRANGE_9) || \ + ((__RANGE__) == RCC_MSIRANGE_10) || \ + ((__RANGE__) == RCC_MSIRANGE_11)) + +#define IS_RCC_CLOCKTYPE(__CLK__) ((1U <= (__CLK__)) && ((__CLK__) <= (RCC_CLOCKTYPE_SYSCLK | \ + RCC_CLOCKTYPE_HCLK | \ + RCC_CLOCKTYPE_PCLK1 | \ + RCC_CLOCKTYPE_PCLK2 | \ + RCC_CLOCKTYPE_HCLK2 | \ + RCC_CLOCKTYPE_HCLK4))) + +#define IS_RCC_SYSCLKSOURCE(__SOURCE__) (((__SOURCE__) == RCC_SYSCLKSOURCE_MSI) || \ + ((__SOURCE__) == RCC_SYSCLKSOURCE_HSI) || \ + ((__SOURCE__) == RCC_SYSCLKSOURCE_HSE) || \ + ((__SOURCE__) == RCC_SYSCLKSOURCE_PLLCLK)) + +#define IS_RCC_HCLKx(__HCLK__) (((__HCLK__) == RCC_SYSCLK_DIV1) || ((__HCLK__) == RCC_SYSCLK_DIV2) || ((__HCLK__) == RCC_SYSCLK_DIV3) || \ + ((__HCLK__) == RCC_SYSCLK_DIV4) || ((__HCLK__) == RCC_SYSCLK_DIV5) || ((__HCLK__) == RCC_SYSCLK_DIV6) || \ + ((__HCLK__) == RCC_SYSCLK_DIV8) || ((__HCLK__) == RCC_SYSCLK_DIV10) || ((__HCLK__) == RCC_SYSCLK_DIV16) || \ + ((__HCLK__) == RCC_SYSCLK_DIV32) || ((__HCLK__) == RCC_SYSCLK_DIV64) || ((__HCLK__) == RCC_SYSCLK_DIV128) || \ + ((__HCLK__) == RCC_SYSCLK_DIV256) || ((__HCLK__) == RCC_SYSCLK_DIV512)) + +#define IS_RCC_PCLKx(__PCLK__) (((__PCLK__) == RCC_HCLK_DIV1) || ((__PCLK__) == RCC_HCLK_DIV2) || \ + ((__PCLK__) == RCC_HCLK_DIV4) || ((__PCLK__) == RCC_HCLK_DIV8) || \ + ((__PCLK__) == RCC_HCLK_DIV16)) + +#define IS_RCC_RTCCLKSOURCE(__SOURCE__) (((__SOURCE__) == RCC_RTCCLKSOURCE_NONE) || \ + ((__SOURCE__) == RCC_RTCCLKSOURCE_LSE) || \ + ((__SOURCE__) == RCC_RTCCLKSOURCE_LSI) || \ + ((__SOURCE__) == RCC_RTCCLKSOURCE_HSE_DIV32)) + +#if defined(RCC_MCO3_SUPPORT) +#define IS_RCC_MCO(__MCOX__) (((__MCOX__) == RCC_MCO1_PA8) || \ + ((__MCOX__) == RCC_MCO2_PB6) || \ + ((__MCOX__) == RCC_MCO3_PA15)) +#else +#define IS_RCC_MCO(__MCOX__) (((__MCOX__) == RCC_MCO1_PA8) || \ + ((__MCOX__) == RCC_MCO2_PB6)) +#endif /* RCC_MCO3_SUPPORT */ + +#if defined(RCC_HSI48_SUPPORT) +#define IS_RCC_MCO1SOURCE(__SOURCE__) (((__SOURCE__) == RCC_MCO1SOURCE_NOCLOCK) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_SYSCLK) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_MSI) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_HSI) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_HSE) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_PLLCLK) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_LSI1) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_LSI2) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_LSE) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_HSI48)) +#else +#define IS_RCC_MCO1SOURCE(__SOURCE__) (((__SOURCE__) == RCC_MCO1SOURCE_NOCLOCK) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_SYSCLK) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_MSI) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_HSI) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_HSE) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_PLLCLK) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_LSI1) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_LSI2) || \ + ((__SOURCE__) == RCC_MCO1SOURCE_LSE)) +#endif /* RCC_HSI48_SUPPORT */ + +#define IS_RCC_MCO2SOURCE(__SOURCE__) IS_RCC_MCO1SOURCE((__SOURCE__)) +#define IS_RCC_MCO3SOURCE(__SOURCE__) IS_RCC_MCO1SOURCE((__SOURCE__)) + + +#define IS_RCC_MCODIV(__DIV__) (((__DIV__) == RCC_MCODIV_1) || ((__DIV__) == RCC_MCODIV_2) || \ + ((__DIV__) == RCC_MCODIV_4) || ((__DIV__) == RCC_MCODIV_8) || \ + ((__DIV__) == RCC_MCODIV_16)) + + + + +#define IS_RCC_LSE_DRIVE(__DRIVE__) (((__DRIVE__) == RCC_LSEDRIVE_LOW) || \ + ((__DRIVE__) == RCC_LSEDRIVE_MEDIUMLOW) || \ + ((__DRIVE__) == RCC_LSEDRIVE_MEDIUMHIGH) || \ + ((__DRIVE__) == RCC_LSEDRIVE_HIGH)) + +#define IS_RCC_STOP_WAKEUPCLOCK(__SOURCE__) (((__SOURCE__) == RCC_STOP_WAKEUPCLOCK_MSI) || \ + ((__SOURCE__) == RCC_STOP_WAKEUPCLOCK_HSI)) +/** + * @} + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup RCC_Exported_Types RCC Exported Types + * @{ + */ + + +/** + * @brief RCC PLL configuration structure definition + */ +typedef struct +{ + uint32_t PLLState; /*!< The new state of the PLL. + This parameter must be a value of @ref RCC_PLL_Config */ + + uint32_t PLLSource; /*!< RCC_PLLSource: PLL entry clock source. + This parameter must be a value of @ref RCC_PLL_Clock_Source */ + + uint32_t PLLM; /*!< PLLM: Division factor for PLL VCO input clock. + This parameter must be a value of @ref RCC_PLLM_Clock_Divider */ + + uint32_t PLLN; /*!< PLLN: Multiplication factor for PLL VCO output clock. + This parameter must be a number between Min_Data = 6 and Max_Data = 127 */ + + uint32_t PLLP; /*!< PLLP: Division factor for SAI & ADC clock. + This parameter must be a value of @ref RCC_PLLP_Clock_Divider */ + + uint32_t PLLQ; /*!< PLLQ: Division factor for RNG and USB clocks. + This parameter must be a value of @ref RCC_PLLQ_Clock_Divider */ + + uint32_t PLLR; /*!< PLLR: Division for the main system clock. + User have to set the PLLR parameter correctly to not exceed max frequency 64MHZ. + This parameter must be a value of @ref RCC_PLLR_Clock_Divider */ + +} RCC_PLLInitTypeDef; + +/** + * @brief RCC Internal/External Oscillator (HSE, HSI, HSI48, MSI, LSE and LSI) configuration structure definition + */ +typedef struct +{ + uint32_t OscillatorType; /*!< The oscillators to be configured. + This parameter can be a combination of @ref RCC_Oscillator_Type */ + + uint32_t HSEState; /*!< The new state of the HSE. + This parameter can be a value of @ref RCC_HSE_Config */ + + uint32_t LSEState; /*!< The new state of the LSE. + This parameter can be a value of @ref RCC_LSE_Config */ + + uint32_t HSIState; /*!< The new state of the HSI. + This parameter can be a value of @ref RCC_HSI_Config */ + + uint32_t HSICalibrationValue; /*!< The calibration trimming value (default is @ref RCC_HSICALIBRATION_DEFAULT).*/ + + uint32_t LSIState; /*!< The new state of the LSI. + This parameter can be a value of @ref RCC_LSI_Config */ + + uint32_t LSI2CalibrationValue; /*!< The LSI2 calibration trimming value . + This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xF */ + + uint32_t MSIState; /*!< The new state of the MSI. + This parameter can be a value of @ref RCC_MSI_Config */ + + uint32_t MSICalibrationValue; /*!< The calibration trimming value (default is @ref RCC_MSICALIBRATION_DEFAULT). + This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF */ + + uint32_t MSIClockRange; /*!< The MSI frequency range. + This parameter can be a value of @ref RCC_MSI_Clock_Range */ + +#if defined(RCC_HSI48_SUPPORT) + uint32_t HSI48State; /*!< The new state of the HSI48 . + This parameter can be a value of @ref RCC_HSI48_Config */ +#endif /* RCC_HSI48_SUPPORT */ + + RCC_PLLInitTypeDef PLL; /*!< Main PLL structure parameters */ + +} RCC_OscInitTypeDef; + +/** + * @brief RCC System, AHB and APB buses clock configuration structure definition + */ +typedef struct +{ + uint32_t ClockType; /*!< The clock to be configured. + This parameter can be a combination of @ref RCC_System_Clock_Type */ + + uint32_t SYSCLKSource; /*!< The clock source used as system clock (SYSCLK). + This parameter can be a value of @ref RCC_System_Clock_Source */ + + uint32_t AHBCLKDivider; /*!< The AHBx clock (HCLK1) divider. This clock is derived from the system clock (SYSCLK). + This parameter can be a value of @ref RCC_AHBx_Clock_Source */ + + uint32_t APB1CLKDivider; /*!< The APB1 clock (PCLK1) divider. This clock is derived from the AHB clock (HCLK). + This parameter can be a value of @ref RCC_APBx_Clock_Source */ + + uint32_t APB2CLKDivider; /*!< The APB2 clock (PCLK2) divider. This clock is derived from the AHB clock (HCLK). + This parameter can be a value of @ref RCC_APBx_Clock_Source */ + + uint32_t AHBCLK2Divider; /*!< The AHB clock (HCLK2) divider. This clock is derived from the system clock (SYSCLK). + This parameter can be a value of @ref RCC_AHBx_Clock_Source */ + + uint32_t AHBCLK4Divider; /*!< The AHB shared clock (HCLK4) divider. This clock is derived from the system clock (SYSCLK). + This parameter can be a value of @ref RCC_AHBx_Clock_Source */ + +} RCC_ClkInitTypeDef; + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup RCC_Exported_Constants RCC Exported Constants + * @{ + */ + +/** @defgroup RCC_Timeout_Value Timeout Values + * @{ + */ +#define RCC_DBP_TIMEOUT_VALUE 2U /* 2 ms (minimum Tick + 1) */ +#define RCC_LSE_TIMEOUT_VALUE LSE_STARTUP_TIMEOUT /* LSE timeout in ms */ +/** + * @} + */ + +/** @defgroup RCC_Oscillator_Type Oscillator Type + * @{ + */ +#define RCC_OSCILLATORTYPE_NONE 0x00000000U /*!< Oscillator configuration unchanged */ +#define RCC_OSCILLATORTYPE_HSE 0x00000001U /*!< HSE to configure */ +#define RCC_OSCILLATORTYPE_HSI 0x00000002U /*!< HSI to configure */ +#define RCC_OSCILLATORTYPE_LSE 0x00000004U /*!< LSE to configure */ +#define RCC_OSCILLATORTYPE_LSI1 0x00000008U /*!< LSI1 to configure */ +#define RCC_OSCILLATORTYPE_LSI2 0x00000010U /*!< LSI2 to configure */ +#define RCC_OSCILLATORTYPE_MSI 0x00000020U /*!< MSI to configure */ +#if defined(RCC_HSI48_SUPPORT) +#define RCC_OSCILLATORTYPE_HSI48 0x00000040U /*!< HSI48 to configure */ +#endif /* RCC_HSI48_SUPPORT */ +/** + * @} + */ + +/** @defgroup RCC_HSE_Config HSE Config + * @{ + */ +#define RCC_HSE_OFF 0x00000000U /*!< HSE clock deactivation */ +#define RCC_HSE_ON RCC_CR_HSEON /*!< HSE clock activation */ +/** + * @} + */ + +/** @defgroup RCC_LSE_Config LSE Config + * @{ + */ +#define RCC_LSE_OFF 0x00000000U /*!< LSE clock deactivation */ +#define RCC_LSE_ON RCC_BDCR_LSEON /*!< LSE clock activation */ +#define RCC_LSE_BYPASS ((uint32_t)(RCC_BDCR_LSEBYP | RCC_BDCR_LSEON)) /*!< External clock source for LSE clock */ +/** + * @} + */ + +/** @defgroup RCC_HSI_Config HSI Config + * @{ + */ +#define RCC_HSI_OFF 0x00000000U /*!< HSI clock deactivation */ +#define RCC_HSI_ON RCC_CR_HSION /*!< HSI clock activation */ + +#define RCC_HSICALIBRATION_DEFAULT 64U /*!< Default HSI calibration trimming value */ +/** + * @} + */ + +/** @defgroup RCC_LSI_Config LSI Config + * @{ + */ +#define RCC_LSI_OFF 0x00000000U /*!< LSI clock deactivation */ +#define RCC_LSI_ON (RCC_CSR_LSI1ON | RCC_CSR_LSI2ON) /*!< LSI1 or LSI2 clock activation */ +/** + * @} + */ + +/** @defgroup RCC_MSI_Config MSI Config + * @{ + */ +#define RCC_MSI_OFF 0x00000000U /*!< MSI clock deactivation */ +#define RCC_MSI_ON RCC_CR_MSION /*!< MSI clock activation */ + +#define RCC_MSICALIBRATION_DEFAULT 0U /*!< Default MSI calibration trimming value */ +/** + * @} + */ + +#if defined(RCC_HSI48_SUPPORT) +/** @defgroup RCC_HSI48_Config HSI48 Config + * @{ + */ +#define RCC_HSI48_OFF 0x00000000U /*!< HSI48 clock deactivation */ +#define RCC_HSI48_ON RCC_CRRCR_HSI48ON /*!< HSI48 clock activation */ +/** + * @} + */ +#endif /* RCC_HSI48_SUPPORT */ + +/** @defgroup RCC_PLL_Config PLL Config + * @{ + */ +#define RCC_PLL_NONE 0x00000000U /*!< PLL configuration unchanged */ +#define RCC_PLL_OFF 0x00000001U /*!< PLL deactivation */ +#define RCC_PLL_ON 0x00000002U /*!< PLL activation */ +/** + * @} + */ + +/** @defgroup RCC_PLLM_Clock_Divider PLLM Clock Divider + * @{ + */ +#define RCC_PLLM_DIV1 LL_RCC_PLLM_DIV_1 /*!< PLLM division factor = 1 */ +#define RCC_PLLM_DIV2 LL_RCC_PLLM_DIV_2 /*!< PLLM division factor = 2 */ +#define RCC_PLLM_DIV3 LL_RCC_PLLM_DIV_3 /*!< PLLM division factor = 3 */ +#define RCC_PLLM_DIV4 LL_RCC_PLLM_DIV_4 /*!< PLLM division factor = 4 */ +#define RCC_PLLM_DIV5 LL_RCC_PLLM_DIV_5 /*!< PLLM division factor = 5 */ +#define RCC_PLLM_DIV6 LL_RCC_PLLM_DIV_6 /*!< PLLM division factor = 6 */ +#define RCC_PLLM_DIV7 LL_RCC_PLLM_DIV_7 /*!< PLLM division factor = 7 */ +#define RCC_PLLM_DIV8 LL_RCC_PLLM_DIV_8 /*!< PLLM division factor = 8 */ +/** + * @} + */ + +/** @defgroup RCC_PLLP_Clock_Divider PLLP Clock Divider + * @{ + */ +#define RCC_PLLP_DIV2 LL_RCC_PLLP_DIV_2 /*!< PLLP division factor = 2 */ +#define RCC_PLLP_DIV3 LL_RCC_PLLP_DIV_3 /*!< PLLP division factor = 3 */ +#define RCC_PLLP_DIV4 LL_RCC_PLLP_DIV_4 /*!< PLLP division factor = 4 */ +#define RCC_PLLP_DIV5 LL_RCC_PLLP_DIV_5 /*!< PLLP division factor = 5 */ +#define RCC_PLLP_DIV6 LL_RCC_PLLP_DIV_6 /*!< PLLP division factor = 6 */ +#define RCC_PLLP_DIV7 LL_RCC_PLLP_DIV_7 /*!< PLLP division factor = 7 */ +#define RCC_PLLP_DIV8 LL_RCC_PLLP_DIV_8 /*!< PLLP division factor = 8 */ +#define RCC_PLLP_DIV9 LL_RCC_PLLP_DIV_9 /*!< PLLP division factor = 9 */ +#define RCC_PLLP_DIV10 LL_RCC_PLLP_DIV_10 /*!< PLLP division factor = 10 */ +#define RCC_PLLP_DIV11 LL_RCC_PLLP_DIV_11 /*!< PLLP division factor = 11 */ +#define RCC_PLLP_DIV12 LL_RCC_PLLP_DIV_12 /*!< PLLP division factor = 12 */ +#define RCC_PLLP_DIV13 LL_RCC_PLLP_DIV_13 /*!< PLLP division factor = 13 */ +#define RCC_PLLP_DIV14 LL_RCC_PLLP_DIV_14 /*!< PLLP division factor = 14 */ +#define RCC_PLLP_DIV15 LL_RCC_PLLP_DIV_15 /*!< PLLP division factor = 15 */ +#define RCC_PLLP_DIV16 LL_RCC_PLLP_DIV_16 /*!< PLLP division factor = 16 */ +#define RCC_PLLP_DIV17 LL_RCC_PLLP_DIV_17 /*!< PLLP division factor = 17 */ +#define RCC_PLLP_DIV18 LL_RCC_PLLP_DIV_18 /*!< PLLP division factor = 18 */ +#define RCC_PLLP_DIV19 LL_RCC_PLLP_DIV_19 /*!< PLLP division factor = 19 */ +#define RCC_PLLP_DIV20 LL_RCC_PLLP_DIV_20 /*!< PLLP division factor = 20 */ +#define RCC_PLLP_DIV21 LL_RCC_PLLP_DIV_21 /*!< PLLP division factor = 21 */ +#define RCC_PLLP_DIV22 LL_RCC_PLLP_DIV_22 /*!< PLLP division factor = 22 */ +#define RCC_PLLP_DIV23 LL_RCC_PLLP_DIV_23 /*!< PLLP division factor = 23 */ +#define RCC_PLLP_DIV24 LL_RCC_PLLP_DIV_24 /*!< PLLP division factor = 24 */ +#define RCC_PLLP_DIV25 LL_RCC_PLLP_DIV_25 /*!< PLLP division factor = 25 */ +#define RCC_PLLP_DIV26 LL_RCC_PLLP_DIV_26 /*!< PLLP division factor = 26 */ +#define RCC_PLLP_DIV27 LL_RCC_PLLP_DIV_27 /*!< PLLP division factor = 27 */ +#define RCC_PLLP_DIV28 LL_RCC_PLLP_DIV_28 /*!< PLLP division factor = 28 */ +#define RCC_PLLP_DIV29 LL_RCC_PLLP_DIV_29 /*!< PLLP division factor = 29 */ +#define RCC_PLLP_DIV30 LL_RCC_PLLP_DIV_30 /*!< PLLP division factor = 30 */ +#define RCC_PLLP_DIV31 LL_RCC_PLLP_DIV_31 /*!< PLLP division factor = 31 */ +#define RCC_PLLP_DIV32 LL_RCC_PLLP_DIV_32 /*!< PLLP division factor = 32 */ +/** + * @} + */ + +/** @defgroup RCC_PLLQ_Clock_Divider PLLQ Clock Divider + * @{ + */ +#define RCC_PLLQ_DIV2 LL_RCC_PLLQ_DIV_2 /*!< PLLQ division factor = 2 */ +#define RCC_PLLQ_DIV3 LL_RCC_PLLQ_DIV_3 /*!< PLLQ division factor = 3 */ +#define RCC_PLLQ_DIV4 LL_RCC_PLLQ_DIV_4 /*!< PLLQ division factor = 4 */ +#define RCC_PLLQ_DIV5 LL_RCC_PLLQ_DIV_5 /*!< PLLQ division factor = 5 */ +#define RCC_PLLQ_DIV6 LL_RCC_PLLQ_DIV_6 /*!< PLLQ division factor = 6 */ +#define RCC_PLLQ_DIV7 LL_RCC_PLLQ_DIV_7 /*!< PLLQ division factor = 7 */ +#define RCC_PLLQ_DIV8 LL_RCC_PLLQ_DIV_8 /*!< PLLQ division factor = 8 */ +/** + * @} + */ + +/** @defgroup RCC_PLLR_Clock_Divider PLLR Clock Divider + * @{ + */ +#define RCC_PLLR_DIV2 LL_RCC_PLLR_DIV_2 /*!< PLLR division factor = 2 */ +#define RCC_PLLR_DIV3 LL_RCC_PLLR_DIV_3 /*!< PLLR division factor = 3 */ +#define RCC_PLLR_DIV4 LL_RCC_PLLR_DIV_4 /*!< PLLR division factor = 4 */ +#define RCC_PLLR_DIV5 LL_RCC_PLLR_DIV_5 /*!< PLLR division factor = 5 */ +#define RCC_PLLR_DIV6 LL_RCC_PLLR_DIV_6 /*!< PLLR division factor = 6 */ +#define RCC_PLLR_DIV7 LL_RCC_PLLR_DIV_7 /*!< PLLR division factor = 7 */ +#define RCC_PLLR_DIV8 LL_RCC_PLLR_DIV_8 /*!< PLLR division factor = 8 */ +/** + * @} + */ + +/** @defgroup RCC_PLL_Clock_Source PLL Clock Source + * @{ + */ +#define RCC_PLLSOURCE_NONE LL_RCC_PLLSOURCE_NONE /*!< No clock selected as PLL entry clock source */ +#define RCC_PLLSOURCE_MSI LL_RCC_PLLSOURCE_MSI /*!< MSI clock selected as PLL entry clock source */ +#define RCC_PLLSOURCE_HSI LL_RCC_PLLSOURCE_HSI /*!< HSI clock selected as PLL entry clock source */ +#define RCC_PLLSOURCE_HSE LL_RCC_PLLSOURCE_HSE /*!< HSE clock selected as PLL entry clock source */ +/** + * @} + */ + +/** @defgroup RCC_PLL_Clock_Output PLL Clock Output + * @{ + */ +#define RCC_PLL_SYSCLK RCC_PLLCFGR_PLLREN /*!< PLLCLK selection from main PLL */ +#define RCC_PLL_USBCLK RCC_PLLCFGR_PLLQEN /*!< PLLUSBCLK selection from main PLL */ +#define RCC_PLL_RNGCLK RCC_PLLCFGR_PLLQEN /*!< PLLRNGCLK selection from main PLL */ +#if defined(SAI1) +#define RCC_PLL_SAI1CLK RCC_PLLCFGR_PLLPEN /*!< PLLSAI1CLK selection from main PLL */ +#endif /* SAI1 */ +#define RCC_PLL_ADCCLK RCC_PLLCFGR_PLLPEN /*!< PLLADCCLK selection from main PLL */ +/** + * @} + */ + +#if defined(SAI1) +/** @defgroup RCC_PLLSAI1_Clock_Output PLLSAI1 Clock Output + * @{ + */ +#define RCC_PLLSAI1_ADCCLK RCC_PLLSAI1CFGR_PLLREN /*!< PLLADCCLK selection from PLLSAI1 */ +#define RCC_PLLSAI1_USBCLK RCC_PLLSAI1CFGR_PLLQEN /*!< USBCLK selection from PLLSAI1 */ +#define RCC_PLLSAI1_SAI1CLK RCC_PLLSAI1CFGR_PLLPEN /*!< PLLSAI1CLK selection from PLLSAI1 */ +/** + * @} + */ +#endif /* SAI1 */ + +/** @defgroup RCC_MSI_Clock_Range MSI Clock Range + * @{ + */ +#define RCC_MSIRANGE_0 LL_RCC_MSIRANGE_0 /*!< MSI = 100 KHz */ +#define RCC_MSIRANGE_1 LL_RCC_MSIRANGE_1 /*!< MSI = 200 KHz */ +#define RCC_MSIRANGE_2 LL_RCC_MSIRANGE_2 /*!< MSI = 400 KHz */ +#define RCC_MSIRANGE_3 LL_RCC_MSIRANGE_3 /*!< MSI = 800 KHz */ +#define RCC_MSIRANGE_4 LL_RCC_MSIRANGE_4 /*!< MSI = 1 MHz */ +#define RCC_MSIRANGE_5 LL_RCC_MSIRANGE_5 /*!< MSI = 2 MHz */ +#define RCC_MSIRANGE_6 LL_RCC_MSIRANGE_6 /*!< MSI = 4 MHz */ +#define RCC_MSIRANGE_7 LL_RCC_MSIRANGE_7 /*!< MSI = 8 MHz */ +#define RCC_MSIRANGE_8 LL_RCC_MSIRANGE_8 /*!< MSI = 16 MHz */ +#define RCC_MSIRANGE_9 LL_RCC_MSIRANGE_9 /*!< MSI = 24 MHz */ +#define RCC_MSIRANGE_10 LL_RCC_MSIRANGE_10 /*!< MSI = 32 MHz */ +#define RCC_MSIRANGE_11 LL_RCC_MSIRANGE_11 /*!< MSI = 48 MHz */ +/** + * @} + */ + +/** @defgroup RCC_System_Clock_Type System Clock Type + * @{ + */ +#define RCC_CLOCKTYPE_SYSCLK 0x00000001U /*!< SYSCLK to configure */ +#define RCC_CLOCKTYPE_HCLK 0x00000002U /*!< HCLK to configure */ +#define RCC_CLOCKTYPE_PCLK1 0x00000004U /*!< PCLK1 to configure */ +#define RCC_CLOCKTYPE_PCLK2 0x00000008U /*!< PCLK2 to configure */ +#define RCC_CLOCKTYPE_HCLK2 0x00000020U /*!< HCLK2 to configure */ +#define RCC_CLOCKTYPE_HCLK4 0x00000040U /*!< HCLK4 to configure */ +/** + * @} + */ + +/** @defgroup RCC_System_Clock_Source System Clock Source + * @{ + */ +#define RCC_SYSCLKSOURCE_MSI LL_RCC_SYS_CLKSOURCE_MSI /*!< MSI selection as system clock */ +#define RCC_SYSCLKSOURCE_HSI LL_RCC_SYS_CLKSOURCE_HSI /*!< HSI selection as system clock */ +#define RCC_SYSCLKSOURCE_HSE LL_RCC_SYS_CLKSOURCE_HSE /*!< HSE selection as system clock */ +#define RCC_SYSCLKSOURCE_PLLCLK LL_RCC_SYS_CLKSOURCE_PLL /*!< PLL selection as system clock */ +/** + * @} + */ + +/** @defgroup RCC_System_Clock_Source_Status System Clock Source Status + * @{ + */ +#define RCC_SYSCLKSOURCE_STATUS_MSI LL_RCC_SYS_CLKSOURCE_STATUS_MSI /*!< MSI used as system clock */ +#define RCC_SYSCLKSOURCE_STATUS_HSI LL_RCC_SYS_CLKSOURCE_STATUS_HSI /*!< HSI used as system clock */ +#define RCC_SYSCLKSOURCE_STATUS_HSE LL_RCC_SYS_CLKSOURCE_STATUS_HSE /*!< HSE used as system clock */ +#define RCC_SYSCLKSOURCE_STATUS_PLLCLK LL_RCC_SYS_CLKSOURCE_STATUS_PLL /*!< PLL used as system clock */ +/** + * @} + */ + +/** @defgroup RCC_AHBx_Clock_Source AHB Clock Source + * @{ + */ +#define RCC_SYSCLK_DIV1 LL_RCC_SYSCLK_DIV_1 /*!< SYSCLK not divided */ +#define RCC_SYSCLK_DIV2 LL_RCC_SYSCLK_DIV_2 /*!< SYSCLK divided by 2 */ +#define RCC_SYSCLK_DIV3 LL_RCC_SYSCLK_DIV_3 /*!< SYSCLK divided by 3 */ +#define RCC_SYSCLK_DIV4 LL_RCC_SYSCLK_DIV_4 /*!< SYSCLK divided by 4 */ +#define RCC_SYSCLK_DIV5 LL_RCC_SYSCLK_DIV_5 /*!< SYSCLK divided by 5 */ +#define RCC_SYSCLK_DIV6 LL_RCC_SYSCLK_DIV_6 /*!< SYSCLK divided by 6 */ +#define RCC_SYSCLK_DIV8 LL_RCC_SYSCLK_DIV_8 /*!< SYSCLK divided by 8 */ +#define RCC_SYSCLK_DIV10 LL_RCC_SYSCLK_DIV_10 /*!< SYSCLK divided by 10 */ +#define RCC_SYSCLK_DIV16 LL_RCC_SYSCLK_DIV_16 /*!< SYSCLK divided by 16 */ +#define RCC_SYSCLK_DIV32 LL_RCC_SYSCLK_DIV_32 /*!< SYSCLK divided by 32 */ +#define RCC_SYSCLK_DIV64 LL_RCC_SYSCLK_DIV_64 /*!< SYSCLK divided by 64 */ +#define RCC_SYSCLK_DIV128 LL_RCC_SYSCLK_DIV_128 /*!< SYSCLK divided by 128 */ +#define RCC_SYSCLK_DIV256 LL_RCC_SYSCLK_DIV_256 /*!< SYSCLK divided by 256 */ +#define RCC_SYSCLK_DIV512 LL_RCC_SYSCLK_DIV_512 /*!< SYSCLK divided by 512 */ +/** + * @} + */ + +/** @defgroup RCC_APBx_Clock_Source APB1 Clock Source + * @{ + */ +#define RCC_HCLK_DIV1 LL_RCC_APB1_DIV_1 /*!< HCLK not divided */ +#define RCC_HCLK_DIV2 LL_RCC_APB1_DIV_2 /*!< HCLK divided by 2 */ +#define RCC_HCLK_DIV4 LL_RCC_APB1_DIV_4 /*!< HCLK divided by 4 */ +#define RCC_HCLK_DIV8 LL_RCC_APB1_DIV_8 /*!< HCLK divided by 8 */ +#define RCC_HCLK_DIV16 LL_RCC_APB1_DIV_16 /*!< HCLK divided by 16 */ +/** + * @} + */ + +/** @defgroup RCC_RTC_Clock_Source RTC Clock Source + * @{ + */ +#define RCC_RTCCLKSOURCE_NONE LL_RCC_RTC_CLKSOURCE_NONE /*!< No clock used as RTC clock */ +#define RCC_RTCCLKSOURCE_LSE LL_RCC_RTC_CLKSOURCE_LSE /*!< LSE oscillator clock used as RTC clock */ +#define RCC_RTCCLKSOURCE_LSI LL_RCC_RTC_CLKSOURCE_LSI /*!< LSI oscillator clock used as RTC clock */ +#define RCC_RTCCLKSOURCE_HSE_DIV32 LL_RCC_RTC_CLKSOURCE_HSE_DIV32 /*!< HSE oscillator clock divided by 32 used as RTC clock */ +/** + * @} + */ + +/** @defgroup RCC_MCO_Index MCO Index + * @{ + */ + +/* @cond */ +/* 32 28 20 16 0 + -------------------------------- + | MCO | GPIO | GPIO | GPIO | + | Index | AF | Port | Pin | + -------------------------------*/ + +#define RCC_MCO_GPIOPORT_POS 16U +#define RCC_MCO_GPIOPORT_MASK (0xFUL << RCC_MCO_GPIOPORT_POS) +#define RCC_MCO_GPIOAF_POS 20U +#define RCC_MCO_GPIOAF_MASK (0xFFUL << RCC_MCO_GPIOAF_POS) +#define RCC_MCO_INDEX_POS 28U +#define RCC_MCO_INDEX_MASK (0x1UL << RCC_MCO_INDEX_POS) + +#define RCC_MCO1_INDEX (0x0UL << RCC_MCO_INDEX_POS) /*!< MCO1 index */ +#define RCC_MCO2_INDEX (0x1UL << RCC_MCO_INDEX_POS) /*!< MCO2 index */ +/* @endcond */ + +#define RCC_MCO1_PA8 (RCC_MCO1_INDEX | \ + (GPIO_AF0_MCO << RCC_MCO_GPIOAF_POS) | (GPIO_GET_INDEX(GPIOA) << RCC_MCO_GPIOPORT_POS) | GPIO_PIN_8) +#define RCC_MCO1 RCC_MCO1_PA8 /*!< Alias for compatibility */ + +#define RCC_MCO2_PB6 (RCC_MCO2_INDEX | \ + (GPIO_AF0_MCO << RCC_MCO_GPIOAF_POS) | (GPIO_GET_INDEX(GPIOB) << RCC_MCO_GPIOPORT_POS) | GPIO_PIN_6) +#define RCC_MCO2 RCC_MCO2_PB6 /*!< Alias for compatibility */ + +#if defined(RCC_MCO3_SUPPORT) +/* @cond */ +#define RCC_MCO3_INDEX (0x2UL << RCC_MCO_INDEX_POS) /*!< MCO3 index */ +/* @endcond */ + +#define RCC_MCO3_PA15 (RCC_MCO3_INDEX | \ + (GPIO_AF6_MCO << RCC_MCO_GPIOAF_POS) | (GPIO_GET_INDEX(GPIOA) << RCC_MCO_GPIOPORT_POS) | GPIO_PIN_15) +#define RCC_MCO3 RCC_MCO3_PA15 /*!< Alias for compatibility */ +#endif /* RCC_MCO3_SUPPORT */ + +#define RCC_MCO RCC_MCO1 /*!< MCO1 to be compliant with other families with 1 MCO*/ +/** + * @} + */ + +/** @defgroup RCC_MCO1_Clock_Source MCO1 Clock Source + * @{ + */ +#define RCC_MCO1SOURCE_NOCLOCK LL_RCC_MCO1SOURCE_NOCLOCK /*!< MCO1 output disabled, no clock on MCO1 */ +#define RCC_MCO1SOURCE_SYSCLK LL_RCC_MCO1SOURCE_SYSCLK /*!< SYSCLK selection as MCO1 source */ +#define RCC_MCO1SOURCE_MSI LL_RCC_MCO1SOURCE_MSI /*!< MSI selection as MCO1 source */ +#define RCC_MCO1SOURCE_HSI LL_RCC_MCO1SOURCE_HSI /*!< HSI selection as MCO1 source */ +#define RCC_MCO1SOURCE_HSE LL_RCC_MCO1SOURCE_HSE /*!< HSE after stabilization selection as MCO1 source */ +#define RCC_MCO1SOURCE_PLLCLK LL_RCC_MCO1SOURCE_PLLCLK /*!< PLLCLK selection as MCO1 source */ +#define RCC_MCO1SOURCE_LSI1 LL_RCC_MCO1SOURCE_LSI1 /*!< LSI1 selection as MCO1 source */ +#define RCC_MCO1SOURCE_LSI2 LL_RCC_MCO1SOURCE_LSI2 /*!< LSI2 selection as MCO1 source */ +#define RCC_MCO1SOURCE_LSE LL_RCC_MCO1SOURCE_LSE /*!< LSE selection as MCO1 source */ +#if defined(RCC_HSI48_SUPPORT) +#define RCC_MCO1SOURCE_HSI48 LL_RCC_MCO1SOURCE_HSI48 /*!< HSI48 selection as MCO1 source */ +#endif /* RCC_HSI48_SUPPORT */ +#define RCC_MCO1SOURCE_HSE_BEFORE_STAB LL_RCC_MCO1SOURCE_HSE_BEFORE_STAB /*!< HSE before stabilization selection as MCO1 source */ + +/** + * @} + */ + +/** @defgroup RCC_MCOx_Clock_Prescaler MCO Clock Prescaler + * @{ + */ +#define RCC_MCODIV_1 LL_RCC_MCO1_DIV_1 /*!< MCO not divided */ +#define RCC_MCODIV_2 LL_RCC_MCO1_DIV_2 /*!< MCO divided by 2 */ +#define RCC_MCODIV_4 LL_RCC_MCO1_DIV_4 /*!< MCO divided by 4 */ +#define RCC_MCODIV_8 LL_RCC_MCO1_DIV_8 /*!< MCO divided by 8 */ +#define RCC_MCODIV_16 LL_RCC_MCO1_DIV_16 /*!< MCO divided by 16 */ +/** + * @} + */ + +/** @defgroup RCC_HSEAMPTHRESHOLD HSE bias current factor + * @{ + */ +#define RCC_HSEAMPTHRESHOLD_1_2 LL_RCC_HSEAMPTHRESHOLD_1_2 /*!< HSE bias current factor 1/2 */ +#define RCC_HSEAMPTHRESHOLD_3_4 LL_RCC_HSEAMPTHRESHOLD_3_4 /*!< HSE bias current factor 3/4 */ + +/** + * @} + */ + +/** @defgroup RCC_HSE_CURRENTMAX HSE current max limit + * @{ + */ +#define RCC_HSE_CURRENTMAX_0 LL_RCC_HSE_CURRENTMAX_0 /*!< HSE current max limit 0.18 mA/V */ +#define RCC_HSE_CURRENTMAX_1 LL_RCC_HSE_CURRENTMAX_1 /*!< HSE current max limit 0.57 mA/V */ +#define RCC_HSE_CURRENTMAX_2 LL_RCC_HSE_CURRENTMAX_2 /*!< HSE current max limit 0.78 mA/V */ +#define RCC_HSE_CURRENTMAX_3 LL_RCC_HSE_CURRENTMAX_3 /*!< HSE current max limit 1.13 mA/V */ +#define RCC_HSE_CURRENTMAX_4 LL_RCC_HSE_CURRENTMAX_4 /*!< HSE current max limit 0.61 mA/V */ +#define RCC_HSE_CURRENTMAX_5 LL_RCC_HSE_CURRENTMAX_5 /*!< HSE current max limit 1.65 mA/V */ +#define RCC_HSE_CURRENTMAX_6 LL_RCC_HSE_CURRENTMAX_6 /*!< HSE current max limit 2.12 mA/V */ +#define RCC_HSE_CURRENTMAX_7 LL_RCC_HSE_CURRENTMAX_7 /*!< HSE current max limit 2.84 mA/V */ + +/** + * @} + */ + +/** @defgroup RCC_Interrupt Interrupts + * @{ + */ +#define RCC_IT_LSI1RDY LL_RCC_CIFR_LSI1RDYF /*!< LSI1 Ready Interrupt flag */ +#define RCC_IT_LSI2RDY LL_RCC_CIFR_LSI2RDYF /*!< LSI2 Ready Interrupt flag */ +#define RCC_IT_LSERDY LL_RCC_CIFR_LSERDYF /*!< LSE Ready Interrupt flag */ +#define RCC_IT_MSIRDY LL_RCC_CIFR_MSIRDYF /*!< MSI Ready Interrupt flag */ +#define RCC_IT_HSIRDY LL_RCC_CIFR_HSIRDYF /*!< HSI Ready Interrupt flag */ +#define RCC_IT_HSERDY LL_RCC_CIFR_HSERDYF /*!< HSE Ready Interrupt flag */ +#define RCC_IT_PLLRDY LL_RCC_CIFR_PLLRDYF /*!< PLL Ready Interrupt flag */ +#if defined(SAI1) +#define RCC_IT_PLLSAI1RDY LL_RCC_CIFR_PLLSAI1RDYF /*!< PLLSAI1 Ready Interrupt flag */ +#endif /* SAI1 */ +#define RCC_IT_HSECSS LL_RCC_CIFR_CSSF /*!< HSE Clock Security System Interrupt flag */ +#define RCC_IT_LSECSS LL_RCC_CIFR_LSECSSF /*!< LSE Clock Security System Interrupt flag */ +#if defined(RCC_HSI48_SUPPORT) +#define RCC_IT_HSI48RDY LL_RCC_CIFR_HSI48RDYF /*!< HSI48 Ready Interrupt flag */ +#endif /* RCC_HSI48_SUPPORT */ +/** + * @} + */ + + +/** @defgroup RCC_Flag Flags + * Elements values convention: XXXYYYYYb + * - YYYYY : Flag position in the register + * - XXX : Register index + * - 001: CR register + * - 010: BDCR register + * - 011: CSR register + * - 100: CRRCR register + * @{ + */ +/* Flags in the CR register */ +#define RCC_FLAG_MSIRDY ((CR_REG_INDEX << 5U) | RCC_CR_MSIRDY_Pos) /*!< MSI Ready flag */ +#define RCC_FLAG_HSIRDY ((CR_REG_INDEX << 5U) | RCC_CR_HSIRDY_Pos) /*!< HSI Ready flag */ +#define RCC_FLAG_HSERDY ((CR_REG_INDEX << 5U) | RCC_CR_HSERDY_Pos) /*!< HSE Ready flag */ +#define RCC_FLAG_PLLRDY ((CR_REG_INDEX << 5U) | RCC_CR_PLLRDY_Pos) /*!< PLL Ready flag */ +#if defined(SAI1) +#define RCC_FLAG_PLLSAI1RDY ((CR_REG_INDEX << 5U) | RCC_CR_PLLSAI1RDY_Pos) /*!< PLLSAI1 Ready flag */ +#endif /* SAI1 */ + +/* Flags in the BDCR register */ +#define RCC_FLAG_LSERDY ((BDCR_REG_INDEX << 5U) | RCC_BDCR_LSERDY_Pos) /*!< LSE Ready flag */ +#define RCC_FLAG_LSECSSD ((BDCR_REG_INDEX << 5U) | RCC_BDCR_LSECSSD_Pos) /*!< LSE Clock Security System failure detection flag */ + +/* Flags in the CSR register */ +#define RCC_FLAG_LSI1RDY ((CSR_REG_INDEX << 5U) | RCC_CSR_LSI1RDY_Pos) /*!< LSI1 Ready flag */ +#define RCC_FLAG_LSI2RDY ((CSR_REG_INDEX << 5U) | RCC_CSR_LSI2RDY_Pos) /*!< LSI2 Ready flag */ +#define RCC_FLAG_OBLRST ((CSR_REG_INDEX << 5U) | RCC_CSR_OBLRSTF_Pos) /*!< Option Byte Loader reset flag */ +#define RCC_FLAG_PINRST ((CSR_REG_INDEX << 5U) | RCC_CSR_PINRSTF_Pos) /*!< Pin reset flag (NRST pin) */ +#define RCC_FLAG_BORRST ((CSR_REG_INDEX << 5U) | RCC_CSR_BORRSTF_Pos) /*!< BOR reset flag */ +#define RCC_FLAG_SFTRST ((CSR_REG_INDEX << 5U) | RCC_CSR_SFTRSTF_Pos) /*!< Software Reset flag */ +#define RCC_FLAG_IWDGRST ((CSR_REG_INDEX << 5U) | RCC_CSR_IWDGRSTF_Pos) /*!< Watchdog reset flag */ +#define RCC_FLAG_WWDGRST ((CSR_REG_INDEX << 5U) | RCC_CSR_WWDGRSTF_Pos) /*!< Window watchdog reset flag */ +#define RCC_FLAG_LPWRRST ((CSR_REG_INDEX << 5U) | RCC_CSR_LPWRRSTF_Pos) /*!< Low-Power reset flag */ + +/* Flags in the CRRCR register */ +#if defined(RCC_HSI48_SUPPORT) +#define RCC_FLAG_HSI48RDY ((CRRCR_REG_INDEX << 5U) | RCC_CRRCR_HSI48RDY_Pos) /*!< HSI48 Ready flag */ +#endif /* RCC_HSI48_SUPPORT */ +/** + * @} + */ + +/** @defgroup RCC_LSEDrive_Config LSE Drive Configuration + * @{ + */ +#define RCC_LSEDRIVE_LOW LL_RCC_LSEDRIVE_LOW /*!< LSE low drive capability */ +#define RCC_LSEDRIVE_MEDIUMLOW LL_RCC_LSEDRIVE_MEDIUMLOW /*!< LSE medium low drive capability */ +#define RCC_LSEDRIVE_MEDIUMHIGH LL_RCC_LSEDRIVE_MEDIUMHIGH /*!< LSE medium high drive capability */ +#define RCC_LSEDRIVE_HIGH LL_RCC_LSEDRIVE_HIGH /*!< LSE high drive capability */ +/** + * @} + */ + +/** @defgroup RCC_Stop_WakeUpClock Wake-Up from STOP Clock + * @{ + */ +#define RCC_STOP_WAKEUPCLOCK_MSI LL_RCC_STOP_WAKEUPCLOCK_MSI /*!< MSI selection after wake-up from STOP */ +#define RCC_STOP_WAKEUPCLOCK_HSI LL_RCC_STOP_WAKEUPCLOCK_HSI /*!< HSI selection after wake-up from STOP */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ + +/** @defgroup RCC_Exported_Macros RCC Exported Macros + * @{ + */ + +/** @defgroup RCC_AHB1_Peripheral_Clock_Enable_Disable AHB1 Peripheral Clock Enable Disable + * @brief Enable or disable the AHB1 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_DMA1_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_DMA2_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_CRC_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_TSC_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +#define __HAL_RCC_DMA1_CLK_DISABLE() LL_AHB1_GRP1_DisableClock(LL_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_DMA2_CLK_DISABLE() LL_AHB1_GRP1_DisableClock(LL_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_CLK_DISABLE() LL_AHB1_GRP1_DisableClock(LL_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_CRC_CLK_DISABLE() LL_AHB1_GRP1_DisableClock(LL_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_TSC_CLK_DISABLE() LL_AHB1_GRP1_DisableClock(LL_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ +/** + * @} + */ + +/** @defgroup RCC_AHB2_Peripheral_Clock_Enable_Disable AHB2 Peripheral Clock Enable Disable + * @brief Enable or disable the AHB2 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_GPIOA_CLK_ENABLE() LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_GPIOB_CLK_ENABLE() LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_GPIOC_CLK_ENABLE() LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_CLK_ENABLE() LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_CLK_ENABLE() LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_GPIOH_CLK_ENABLE() LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_CLK_ENABLE() LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_CLK_ENABLE() LL_AHB2_GRP1_EnableClock(LL_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ +#define __HAL_RCC_GPIOA_CLK_DISABLE() LL_AHB2_GRP1_DisableClock(LL_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_GPIOB_CLK_DISABLE() LL_AHB2_GRP1_DisableClock(LL_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_GPIOC_CLK_DISABLE() LL_AHB2_GRP1_DisableClock(LL_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_CLK_DISABLE() LL_AHB2_GRP1_DisableClock(LL_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_CLK_DISABLE() LL_AHB2_GRP1_DisableClock(LL_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_GPIOH_CLK_DISABLE() LL_AHB2_GRP1_DisableClock(LL_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_CLK_DISABLE() LL_AHB2_GRP1_DisableClock(LL_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_CLK_DISABLE() LL_AHB2_GRP1_DisableClock(LL_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB3_Clock_Enable_Disable AHB3 Peripheral Clock Enable Disable + * @brief Enable or disable the AHB3 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_CLK_ENABLE() LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_QUADSPI) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_CLK_ENABLE() LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_AES2_CLK_ENABLE() LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_RNG_CLK_ENABLE() LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_HSEM_CLK_ENABLE() LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_HSEM) +#define __HAL_RCC_IPCC_CLK_ENABLE() LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_IPCC) +#define __HAL_RCC_FLASH_CLK_ENABLE() LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_FLASH) + +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_CLK_DISABLE() LL_AHB3_GRP1_DisableClock(LL_AHB3_GRP1_PERIPH_QUADSPI) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_CLK_DISABLE() LL_AHB3_GRP1_DisableClock(LL_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_AES2_CLK_DISABLE() LL_AHB3_GRP1_DisableClock(LL_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_RNG_CLK_DISABLE() LL_AHB3_GRP1_DisableClock(LL_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_HSEM_CLK_DISABLE() LL_AHB3_GRP1_DisableClock(LL_AHB3_GRP1_PERIPH_HSEM) +#define __HAL_RCC_IPCC_CLK_DISABLE() LL_AHB3_GRP1_DisableClock(LL_AHB3_GRP1_PERIPH_IPCC) +#define __HAL_RCC_FLASH_CLK_DISABLE() LL_AHB3_GRP1_DisableClock(LL_AHB3_GRP1_PERIPH_FLASH) + +/** + * @} + */ + +/** @defgroup RCC_APB1_Clock_Enable_Disable APB1 Peripheral Clock Enable Disable + * @brief Enable or disable the APB1 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_RTCAPB_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_RTCAPB) +#define __HAL_RCC_WWDG_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_WWDG) +#define __HAL_RCC_TIM2_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_LCD_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_SPI2_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_I2C3_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_CLK_ENABLE() LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_LPTIM1) +#define __HAL_RCC_LPTIM2_CLK_ENABLE() LL_APB1_GRP2_EnableClock(LL_APB1_GRP2_PERIPH_LPTIM2) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_CLK_ENABLE() LL_APB1_GRP2_EnableClock(LL_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ + +#define __HAL_RCC_RTCAPB_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_RTCAPB) +#define __HAL_RCC_TIM2_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_LCD_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_SPI2_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_I2C3_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_CLK_DISABLE() LL_APB1_GRP1_DisableClock(LL_APB1_GRP1_PERIPH_LPTIM1) + +#define __HAL_RCC_LPTIM2_CLK_DISABLE() LL_APB1_GRP2_DisableClock(LL_APB1_GRP2_PERIPH_LPTIM2) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_CLK_DISABLE() LL_APB1_GRP2_DisableClock(LL_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ + +/** + * @} + */ + +/** @defgroup RCC_APB2_Clock_Enable_Disable APB2 Peripheral Clock Enable Disable + * @brief Enable or disable the APB2 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_CLK_ENABLE() LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_CLK_ENABLE() LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_SPI1_CLK_ENABLE() LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_USART1_CLK_ENABLE() LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_TIM16_CLK_ENABLE() LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_TIM17_CLK_ENABLE() LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_SAI1_CLK_ENABLE() LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_CLK_DISABLE() LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_CLK_DISABLE() LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_SPI1_CLK_DISABLE() LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_USART1_CLK_DISABLE() LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_TIM16_CLK_DISABLE() LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_TIM17_CLK_DISABLE() LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_SAI1_CLK_DISABLE() LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB1_Peripheral_Clock_Enable_Disable_Status AHB1 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the AHB1 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_DMA1_IS_CLK_ENABLED() LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_DMA2_IS_CLK_ENABLED() LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_IS_CLK_ENABLED() LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_CRC_IS_CLK_ENABLED() LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_TSC_IS_CLK_ENABLED() LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +#define __HAL_RCC_DMA1_IS_CLK_DISABLED() !(LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_DMA1)) +#if defined(DMA2) +#define __HAL_RCC_DMA2_IS_CLK_DISABLED() !(LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_DMA2)) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_IS_CLK_DISABLED() !(LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_DMAMUX1)) +#define __HAL_RCC_CRC_IS_CLK_DISABLED() !(LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_CRC)) +#if defined(TSC) +#define __HAL_RCC_TSC_IS_CLK_DISABLED() !(LL_AHB1_GRP1_IsEnabledClock(LL_AHB1_GRP1_PERIPH_TSC)) +#endif /* TSC */ + +/** + * @} + */ + +/** @defgroup RCC_AHB2_Clock_Enable_Disable_Status AHB2 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the AHB2 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_GPIOA_IS_CLK_ENABLED() LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_GPIOB_IS_CLK_ENABLED() LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_GPIOC_IS_CLK_ENABLED() LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_IS_CLK_ENABLED() LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_IS_CLK_ENABLED() LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_GPIOH_IS_CLK_ENABLED() LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_IS_CLK_ENABLED() LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_IS_CLK_ENABLED() LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +#define __HAL_RCC_GPIOA_IS_CLK_DISABLED() !(LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOA)) +#define __HAL_RCC_GPIOB_IS_CLK_DISABLED() !(LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOB)) +#define __HAL_RCC_GPIOC_IS_CLK_DISABLED() !(LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOC)) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_IS_CLK_DISABLED() !(LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOD)) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_IS_CLK_DISABLED() !(LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOE)) +#define __HAL_RCC_GPIOH_IS_CLK_DISABLED() !(LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_GPIOH)) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_IS_CLK_DISABLED() !(LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_ADC)) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_IS_CLK_DISABLED() !(LL_AHB2_GRP1_IsEnabledClock(LL_AHB2_GRP1_PERIPH_AES1)) +#endif /* AES1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB3_Clock_Enable_Disable_Status AHB3 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the AHB3 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_IS_CLK_ENABLED() LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_QUADSPI) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_IS_CLK_ENABLED() LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_AES2_IS_CLK_ENABLED() LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_RNG_IS_CLK_ENABLED() LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_HSEM_IS_CLK_ENABLED() LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_HSEM) +#define __HAL_RCC_IPCC_IS_CLK_ENABLED() LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_IPCC) +#define __HAL_RCC_FLASH_IS_CLK_ENABLED() LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_FLASH) + +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_IS_CLK_DISABLED() !(LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_QUADSPI)) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_IS_CLK_DISABLED() !(LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_PKA)) +#define __HAL_RCC_AES2_IS_CLK_DISABLED() !(LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_AES2)) +#define __HAL_RCC_RNG_IS_CLK_DISABLED() !(LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_RNG)) +#define __HAL_RCC_HSEM_IS_CLK_DISABLED() !(LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_HSEM)) +#define __HAL_RCC_IPCC_IS_CLK_DISABLED() !(LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_IPCC)) +#define __HAL_RCC_FLASH_IS_CLK_DISABLED() !(LL_AHB3_GRP1_IsEnabledClock(LL_AHB3_GRP1_PERIPH_FLASH)) + +/** + * @} + */ + +/** @defgroup RCC_APB1_Clock_Enable_Disable_Status APB1 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the APB1 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_RTCAPB_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_RTCAPB) +#define __HAL_RCC_WWDG_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_WWDG) +#define __HAL_RCC_TIM2_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_LCD_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_SPI2_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_I2C3_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_IS_CLK_ENABLED() LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_LPTIM1) + +#define __HAL_RCC_LPTIM2_IS_CLK_ENABLED() LL_APB1_GRP2_IsEnabledClock(LL_APB1_GRP2_PERIPH_LPTIM2) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_IS_CLK_ENABLED() LL_APB1_GRP2_IsEnabledClock(LL_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ + +#define __HAL_RCC_RTCAPB_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_RTCAPB)) +#define __HAL_RCC_WWDG_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_WWDG)) +#define __HAL_RCC_TIM2_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_TIM2)) +#if defined(LCD) +#define __HAL_RCC_LCD_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_LCD)) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_SPI2_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_SPI2)) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_I2C1)) +#if defined(I2C3) +#define __HAL_RCC_I2C3_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_I2C3)) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_CRS)) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_USB)) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_IS_CLK_DISABLED() !(LL_APB1_GRP1_IsEnabledClock(LL_APB1_GRP1_PERIPH_LPTIM1)) + +#define __HAL_RCC_LPTIM2_IS_CLK_DISABLED() !(LL_APB1_GRP2_IsEnabledClock(LL_APB1_GRP2_PERIPH_LPTIM2)) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_IS_CLK_DISABLED() !(LL_APB1_GRP2_IsEnabledClock(LL_APB1_GRP2_PERIPH_LPUART1)) +#endif /* LPUART1 */ + +/** + * @} + */ + +/** @defgroup RCC_APB2_Clock_Enable_Disable_Status APB2 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the APB2 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_IS_CLK_ENABLED() LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_IS_CLK_ENABLED() LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_SPI1_IS_CLK_ENABLED() LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_USART1_IS_CLK_ENABLED() LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_TIM16_IS_CLK_ENABLED() LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_TIM17_IS_CLK_ENABLED() LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_SAI1_IS_CLK_ENABLED() LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_IS_CLK_DISABLED() !(LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_ADC)) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_IS_CLK_DISABLED() !(LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_TIM1)) +#define __HAL_RCC_SPI1_IS_CLK_DISABLED() !(LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_SPI1)) +#define __HAL_RCC_USART1_IS_CLK_DISABLED() !(LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_USART1)) +#define __HAL_RCC_TIM16_IS_CLK_DISABLED() !(LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_TIM16)) +#define __HAL_RCC_TIM17_IS_CLK_DISABLED() !(LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_TIM17)) +#if defined(SAI1) +#define __HAL_RCC_SAI1_IS_CLK_DISABLED() !(LL_APB2_GRP1_IsEnabledClock(LL_APB2_GRP1_PERIPH_SAI1)) +#endif /* SAI1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB1_Peripheral_Clock_Enable_Disable AHB1 Peripheral Clock Enable Disable + * @brief Enable or disable the AHB1 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2DMA1_CLK_ENABLE() LL_C2_AHB1_GRP1_EnableClock(LL_C2_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_C2DMA2_CLK_ENABLE() LL_C2_AHB1_GRP1_EnableClock(LL_C2_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_C2DMAMUX1_CLK_ENABLE() LL_C2_AHB1_GRP1_EnableClock(LL_C2_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_C2SRAM1_CLK_ENABLE() LL_C2_AHB1_GRP1_EnableClock(LL_C2_AHB1_GRP1_PERIPH_SRAM1) +#define __HAL_RCC_C2CRC_CLK_ENABLE() LL_C2_AHB1_GRP1_EnableClock(LL_C2_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_C2TSC_CLK_ENABLE() LL_C2_AHB1_GRP1_EnableClock(LL_C2_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +#define __HAL_RCC_C2DMA1_CLK_DISABLE() LL_C2_AHB1_GRP1_DisableClock(LL_C2_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_C2DMA2_CLK_DISABLE() LL_C2_AHB1_GRP1_DisableClock(LL_C2_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_C2DMAMUX1_CLK_DISABLE() LL_C2_AHB1_GRP1_DisableClock(LL_C2_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_C2SRAM1_CLK_DISABLE() LL_C2_AHB1_GRP1_DisableClock(LL_C2_AHB1_GRP1_PERIPH_SRAM1) +#define __HAL_RCC_C2CRC_CLK_DISABLE() LL_C2_AHB1_GRP1_DisableClock(LL_C2_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_C2TSC_CLK_DISABLE() LL_C2_AHB1_GRP1_DisableClock(LL_C2_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +/** + * @} + */ + +/** @defgroup RCC_AHB2_Peripheral_Clock_Enable_Disable AHB2 Peripheral Clock Enable Disable + * @brief Enable or disable the AHB2 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2GPIOA_CLK_ENABLE() LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_C2GPIOB_CLK_ENABLE() LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_C2GPIOC_CLK_ENABLE() LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_C2GPIOD_CLK_ENABLE() LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_C2GPIOE_CLK_ENABLE() LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_C2GPIOH_CLK_ENABLE() LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_C2ADC_CLK_ENABLE() LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_C2AES1_CLK_ENABLE() LL_C2_AHB2_GRP1_EnableClock(LL_C2_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +#define __HAL_RCC_C2GPIOA_CLK_DISABLE() LL_C2_AHB2_GRP1_DisableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_C2GPIOB_CLK_DISABLE() LL_C2_AHB2_GRP1_DisableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_C2GPIOC_CLK_DISABLE() LL_C2_AHB2_GRP1_DisableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_C2GPIOD_CLK_DISABLE() LL_C2_AHB2_GRP1_DisableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_C2GPIOE_CLK_DISABLE() LL_C2_AHB2_GRP1_DisableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_C2GPIOH_CLK_DISABLE() LL_C2_AHB2_GRP1_DisableClock(LL_C2_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_C2ADC_CLK_DISABLE() LL_C2_AHB2_GRP1_DisableClock(LL_C2_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_C2AES1_CLK_DISABLE() LL_C2_AHB2_GRP1_DisableClock(LL_C2_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB3_Clock_Enable_Disable AHB3 Peripheral Clock Enable Disable + * @brief Enable or disable the AHB3 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2PKA_CLK_ENABLE() LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_C2AES2_CLK_ENABLE() LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_C2RNG_CLK_ENABLE() LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_C2HSEM_CLK_ENABLE() LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_HSEM) +#define __HAL_RCC_C2IPCC_CLK_ENABLE() LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_IPCC) +#define __HAL_RCC_C2FLASH_CLK_ENABLE() LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_FLASH) + +#define __HAL_RCC_C2PKA_CLK_DISABLE() LL_C2_AHB3_GRP1_DisableClock(LL_C2_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_C2AES2_CLK_DISABLE() LL_C2_AHB3_GRP1_DisableClock(LL_C2_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_C2RNG_CLK_DISABLE() LL_C2_AHB3_GRP1_DisableClock(LL_C2_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_C2HSEM_CLK_DISABLE() LL_C2_AHB3_GRP1_DisableClock(LL_C2_AHB3_GRP1_PERIPH_HSEM) +#define __HAL_RCC_C2IPCC_CLK_DISABLE() LL_C2_AHB3_GRP1_DisableClock(LL_C2_AHB3_GRP1_PERIPH_IPCC) +#define __HAL_RCC_C2FLASH_CLK_DISABLE() LL_C2_AHB3_GRP1_DisableClock(LL_C2_AHB3_GRP1_PERIPH_FLASH) + +/** + * @} + */ + +/** @defgroup RCC_APB1_Clock_Enable_Disable APB1 Peripheral Clock Enable Disable + * @brief Enable or disable the APB1 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2RTCAPB_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_RTCAPB) +#define __HAL_RCC_C2TIM2_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_C2LCD_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_C2SPI2_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_C2I2C1_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_C2I2C3_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_C2CRS_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_C2USB_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_C2LPTIM1_CLK_ENABLE() LL_C2_APB1_GRP1_EnableClock(LL_C2_APB1_GRP1_PERIPH_LPTIM1) + +#define __HAL_RCC_C2LPTIM2_CLK_ENABLE() LL_C2_APB1_GRP2_EnableClock(LL_C2_APB1_GRP2_PERIPH_LPTIM2) +#if defined(LPUART1) +#define __HAL_RCC_C2LPUART1_CLK_ENABLE() LL_C2_APB1_GRP2_EnableClock(LL_C2_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ + +#define __HAL_RCC_C2RTCAPB_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_RTCAPB) +#define __HAL_RCC_C2TIM2_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_C2LCD_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_C2SPI2_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_C2I2C1_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_C2I2C3_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_C2CRS_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_C2USB_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_C2LPTIM1_CLK_DISABLE() LL_C2_APB1_GRP1_DisableClock(LL_C2_APB1_GRP1_PERIPH_LPTIM1) + +#define __HAL_RCC_C2LPTIM2_CLK_DISABLE() LL_C2_APB1_GRP2_DisableClock(LL_C2_APB1_GRP2_PERIPH_LPTIM2) +#if defined(LPUART1) +#define __HAL_RCC_C2LPUART1_CLK_DISABLE() LL_C2_APB1_GRP2_DisableClock(LL_C2_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ + +/** + * @} + */ + +/** @defgroup RCC_APB2_Clock_Enable_Disable APB2 Peripheral Clock Enable Disable + * @brief Enable or disable the APB2 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_C2ADC_CLK_ENABLE() LL_C2_APB2_GRP1_EnableClock(LL_C2_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_C2TIM1_CLK_ENABLE() LL_C2_APB2_GRP1_EnableClock(LL_C2_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_C2SPI1_CLK_ENABLE() LL_C2_APB2_GRP1_EnableClock(LL_C2_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_C2USART1_CLK_ENABLE() LL_C2_APB2_GRP1_EnableClock(LL_C2_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_C2TIM16_CLK_ENABLE() LL_C2_APB2_GRP1_EnableClock(LL_C2_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_C2TIM17_CLK_ENABLE() LL_C2_APB2_GRP1_EnableClock(LL_C2_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_C2SAI1_CLK_ENABLE() LL_C2_APB2_GRP1_EnableClock(LL_C2_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_C2ADC_CLK_DISABLE() LL_C2_APB2_GRP1_DisableClock(LL_C2_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_C2TIM1_CLK_DISABLE() LL_C2_APB2_GRP1_DisableClock(LL_C2_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_C2SPI1_CLK_DISABLE() LL_C2_APB2_GRP1_DisableClock(LL_C2_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_C2USART1_CLK_DISABLE() LL_C2_APB2_GRP1_DisableClock(LL_C2_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_C2TIM16_CLK_DISABLE() LL_C2_APB2_GRP1_DisableClock(LL_C2_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_C2TIM17_CLK_DISABLE() LL_C2_APB2_GRP1_DisableClock(LL_C2_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_C2SAI1_CLK_DISABLE() LL_C2_APB2_GRP1_DisableClock(LL_C2_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +/** + * @} + */ + +/** @defgroup RCC_APB3_Clock_Enable_Disable APB3 Peripheral Clock Enable Disable + * @brief Enable or disable the APB3 peripheral clock. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2BLE_CLK_ENABLE() LL_C2_APB3_GRP1_EnableClock(LL_C2_APB3_GRP1_PERIPH_BLE) +#if defined(RCC_802_SUPPORT) +#define __HAL_RCC_C2802_CLK_ENABLE() LL_C2_APB3_GRP1_EnableClock(LL_C2_APB3_GRP1_PERIPH_802) +#endif /* RCC_802_SUPPORT */ + +#define __HAL_RCC_C2BLE_CLK_DISABLE() LL_C2_APB3_GRP1_DisableClock(LL_C2_APB3_GRP1_PERIPH_BLE) +#if defined(RCC_802_SUPPORT) +#define __HAL_RCC_C2802_CLK_DISABLE() LL_C2_APB3_GRP1_DisableClock(LL_C2_APB3_GRP1_PERIPH_802) +#endif /* RCC_802_SUPPORT */ + +/** + * @} + */ + +/** @defgroup RCC_AHB1_Peripheral_Clock_Enable_Disable_Status AHB1 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the AHB1 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2DMA1_IS_CLK_ENABLED() LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_C2DMA2_IS_CLK_ENABLED() LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_C2DMAMUX1_IS_CLK_ENABLED() LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_C2SRAM1_IS_CLK_ENABLED() LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_SRAM1) +#define __HAL_RCC_C2CRC_IS_CLK_ENABLED() LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_C2TSC_IS_CLK_ENABLED() LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +#define __HAL_RCC_C2DMA1_IS_CLK_DISABLED() !(LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_DMA1)) +#if defined(DMA2) +#define __HAL_RCC_C2DMA2_IS_CLK_DISABLED() !(LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_DMA2)) +#endif /* DMA2 */ +#define __HAL_RCC_C2DMAMUX1_IS_CLK_DISABLED() !(LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_DMAMUX1)) +#define __HAL_RCC_C2SRAM1_IS_CLK_DISABLED() !(LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_SRAM1)) +#define __HAL_RCC_C2CRC_IS_CLK_DISABLED() !(LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_CRC)) +#if defined(TSC) +#define __HAL_RCC_C2TSC_IS_CLK_DISABLED() !(LL_C2_AHB1_GRP1_IsEnabledClock(LL_C2_AHB1_GRP1_PERIPH_TSC)) +#endif /* TSC */ + +/** + * @} + */ + +/** @defgroup RCC_AHB2_Clock_Enable_Disable_Status AHB2 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the AHB2 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2GPIOA_IS_CLK_ENABLED() LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_C2GPIOB_IS_CLK_ENABLED() LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_C2GPIOC_IS_CLK_ENABLED() LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_C2GPIOD_IS_CLK_ENABLED() LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_C2GPIOE_IS_CLK_ENABLED() LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_C2GPIOH_IS_CLK_ENABLED() LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_C2ADC_IS_CLK_ENABLED() LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_C2AES1_IS_CLK_ENABLED() LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +#define __HAL_RCC_C2GPIOA_IS_CLK_DISABLED() !(LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOA)) +#define __HAL_RCC_C2GPIOB_IS_CLK_DISABLED() !(LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOB)) +#define __HAL_RCC_C2GPIOC_IS_CLK_DISABLED() !(LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOC)) +#if defined(GPIOD) +#define __HAL_RCC_C2GPIOD_IS_CLK_DISABLED() !(LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOD)) +#endif /* GPIOD */ +#define __HAL_RCC_C2GPIOE_IS_CLK_DISABLED() !(LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOE)) +#define __HAL_RCC_C2GPIOH_IS_CLK_DISABLED() !(LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_GPIOH)) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_C2ADC_IS_CLK_DISABLED() !(LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_ADC)) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_C2AES1_IS_CLK_DISABLED() !(LL_C2_AHB2_GRP1_IsEnabledClock(LL_C2_AHB2_GRP1_PERIPH_AES1)) +#endif /* AES1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB3_Clock_Enable_Disable_Status AHB3 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the AHB3 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2PKA_IS_CLK_ENABLED() LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_C2AES2_IS_CLK_ENABLED() LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_C2RNG_IS_CLK_ENABLED() LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_C2HSEM_IS_CLK_ENABLED() LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_HSEM) +#define __HAL_RCC_C2IPCC_IS_CLK_ENABLED() LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_IPCC) +#define __HAL_RCC_C2FLASH_IS_CLK_ENABLED() LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_FLASH) + +#define __HAL_RCC_C2PKA_IS_CLK_DISABLED() !(LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_PKA)) +#define __HAL_RCC_C2AES2_IS_CLK_DISABLED() !(LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_AES2)) +#define __HAL_RCC_C2RNG_IS_CLK_DISABLED() !(LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_RNG)) +#define __HAL_RCC_C2HSEM_IS_CLK_DISABLED() !(LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_HSEM)) +#define __HAL_RCC_C2IPCC_IS_CLK_DISABLED() !(LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_IPCC)) +#define __HAL_RCC_C2FLASH_IS_CLK_DISABLED() !(LL_C2_AHB3_GRP1_IsEnabledClock(LL_C2_AHB3_GRP1_PERIPH_FLASH)) + +/** + * @} + */ + +/** @defgroup RCC_APB1_Clock_Enable_Disable_Status APB1 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the APB1 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2RTCAPB_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_RTCAPB) +#define __HAL_RCC_C2TIM2_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_C2LCD_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_C2SPI2_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_C2I2C1_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_C2I2C3_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_C2CRS_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_C2USB_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_C2LPTIM1_IS_CLK_ENABLED() LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_LPTIM1) + +#define __HAL_RCC_C2LPTIM2_IS_CLK_ENABLED() LL_C2_APB1_GRP2_IsEnabledClock(LL_C2_APB1_GRP2_PERIPH_LPTIM2) +#if defined(LPUART1) +#define __HAL_RCC_C2LPUART1_IS_CLK_ENABLED() LL_C2_APB1_GRP2_IsEnabledClock(LL_C2_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ + +#define __HAL_RCC_C2RTCAPB_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_RTCAPB)) +#define __HAL_RCC_C2TIM2_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_TIM2)) +#if defined(LCD) +#define __HAL_RCC_C2LCD_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_LCD)) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_C2SPI2_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_SPI2)) +#endif /* SPI2 */ +#define __HAL_RCC_C2I2C1_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_I2C1)) +#if defined(I2C3) +#define __HAL_RCC_C2I2C3_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_I2C3)) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_C2CRS_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_CRS)) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_C2USB_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_USB)) +#endif /* USB */ +#define __HAL_RCC_C2LPTIM1_IS_CLK_DISABLED() !(LL_C2_APB1_GRP1_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_LPTIM1)) + +#define __HAL_RCC_C2LPTIM2_IS_CLK_DISABLED() !(LL_C2_APB1_GRP2_IsEnabledClock(LL_C2_APB1_GRP2_PERIPH_LPTIM2)) +#if defined(LPUART1) +#define __HAL_RCC_C2LPUART1_IS_CLK_DISABLED() !(LL_C2_APB1_GRP2_IsEnabledClock(LL_C2_APB1_GRP1_PERIPH_LPTIM1)) +#endif /* LPUART1*/ + +/** + * @} + */ + +/** @defgroup RCC_APB2_Clock_Enable_Disable_Status APB2 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the APB2 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_C2ADC_IS_CLK_ENABLED() LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_C2TIM1_IS_CLK_ENABLED() LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_C2SPI1_IS_CLK_ENABLED() LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_C2USART1_IS_CLK_ENABLED() LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_C2TIM16_IS_CLK_ENABLED() LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_C2TIM17_IS_CLK_ENABLED() LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_C2SAI1_IS_CLK_ENABLED() LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_C2ADC_IS_CLK_DISABLED() !( LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_ADC)) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_C2TIM1_IS_CLK_DISABLED() !( LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_TIM1)) +#define __HAL_RCC_C2SPI1_IS_CLK_DISABLED() !( LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_SPI1)) +#define __HAL_RCC_C2USART1_IS_CLK_DISABLED() !( LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_USART1)) +#define __HAL_RCC_C2TIM16_IS_CLK_DISABLED() !( LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_TIM16)) +#define __HAL_RCC_C2TIM17_IS_CLK_DISABLED() !( LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_TIM17)) +#if defined(SAI1) +#define __HAL_RCC_C2SAI1_IS_CLK_DISABLED() !( LL_C2_APB2_GRP1_IsEnabledClock(LL_C2_APB2_GRP1_PERIPH_SAI1)) +#endif /* SAI1 */ + +/** + * @} + */ + + +/** @defgroup RCC_APB3_Clock_Enable_Disable_Status APB3 Peripheral Clock Enabled or Disabled Status + * @brief Check whether the APB3 peripheral clock is enabled or not. + * @note After reset, the peripheral clock (used for registers read/write access) + * is disabled and the application software has to enable this clock before + * using it. + * @{ + */ + +#define __HAL_RCC_C2BLE_IS_CLK_ENABLED() LL_C2_APB3_GRP1_IsEnabledClock(LL_C2_APB3_GRP1_PERIPH_BLE) +#if defined(RCC_802_SUPPORT) +#define __HAL_RCC_C2802_IS_CLK_ENABLED() LL_C2_APB3_GRP1_IsEnabledClock(LL_C2_APB3_GRP1_PERIPH_802) +#endif /* RCC_802_SUPPORT */ + +#define __HAL_RCC_C2BLE_IS_CLK_DISABLED() !(LL_C2_APB3_GRP1_IsEnabledClock(LL_C2_APB3_GRP1_PERIPH_BLE)) +#if defined(RCC_802_SUPPORT) +#define __HAL_RCC_C2802_IS_CLK_DISABLED() !(LL_C2_APB3_GRP1_IsEnabledClock(LL_C2_APB3_GRP1_PERIPH_802)) +#endif /* RCC_802_SUPPORT */ + +/** + * @} + */ + + +/** @defgroup RCC_AHB1_Force_Release_Reset AHB1 Peripheral Force Release Reset + * @brief Force or release AHB1 peripheral reset. + * @{ + */ +#define __HAL_RCC_AHB1_FORCE_RESET() LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_ALL) +#define __HAL_RCC_DMA1_FORCE_RESET() LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_DMA2_FORCE_RESET() LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_FORCE_RESET() LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_CRC_FORCE_RESET() LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_TSC_FORCE_RESET() LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + + +#define __HAL_RCC_AHB1_RELEASE_RESET() LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_ALL) +#define __HAL_RCC_DMA1_RELEASE_RESET() LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_DMA2_RELEASE_RESET() LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_RELEASE_RESET() LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_CRC_RELEASE_RESET() LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_TSC_RELEASE_RESET() LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + + +/** + * @} + */ + +/** @defgroup RCC_AHB2_Force_Release_Reset AHB2 Peripheral Force Release Reset + * @brief Force or release AHB2 peripheral reset. + * @{ + */ +#define __HAL_RCC_AHB2_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_ALL) +#define __HAL_RCC_GPIOA_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_GPIOB_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_GPIOC_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_GPIOH_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_FORCE_RESET() LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +#define __HAL_RCC_AHB2_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_ALL) +#define __HAL_RCC_GPIOA_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_GPIOB_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_GPIOC_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_GPIOH_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_RELEASE_RESET() LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB3_Force_Release_Reset AHB3 Peripheral Force Release Reset + * @brief Force or release AHB3 peripheral reset. + * @{ + */ +#define __HAL_RCC_AHB3_FORCE_RESET() LL_AHB3_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_ALL) +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_FORCE_RESET() LL_AHB3_GRP1_ForceReset(LL_AHB3_GRP1_PERIPH_QUADSPI) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_FORCE_RESET() LL_AHB3_GRP1_ForceReset(LL_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_AES2_FORCE_RESET() LL_AHB3_GRP1_ForceReset(LL_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_RNG_FORCE_RESET() LL_AHB3_GRP1_ForceReset(LL_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_HSEM_FORCE_RESET() LL_AHB3_GRP1_ForceReset(LL_AHB3_GRP1_PERIPH_HSEM) +#define __HAL_RCC_IPCC_FORCE_RESET() LL_AHB3_GRP1_ForceReset(LL_AHB3_GRP1_PERIPH_IPCC) +#define __HAL_RCC_FLASH_FORCE_RESET() LL_AHB3_GRP1_ForceReset(LL_AHB3_GRP1_PERIPH_FLASH) + +#define __HAL_RCC_AHB3_RELEASE_RESET() LL_AHB3_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_ALL) +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_RELEASE_RESET() LL_AHB3_GRP1_ReleaseReset(LL_AHB3_GRP1_PERIPH_QUADSPI) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_RELEASE_RESET() LL_AHB3_GRP1_ReleaseReset(LL_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_AES2_RELEASE_RESET() LL_AHB3_GRP1_ReleaseReset(LL_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_RNG_RELEASE_RESET() LL_AHB3_GRP1_ReleaseReset(LL_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_HSEM_RELEASE_RESET() LL_AHB3_GRP1_ReleaseReset(LL_AHB3_GRP1_PERIPH_HSEM) +#define __HAL_RCC_IPCC_RELEASE_RESET() LL_AHB3_GRP1_ReleaseReset(LL_AHB3_GRP1_PERIPH_IPCC) +#define __HAL_RCC_FLASH_RELEASE_RESET() LL_AHB3_GRP1_ReleaseReset(LL_AHB3_GRP1_PERIPH_FLASH) +/** + * @} + */ + +/** @defgroup RCC_APB1_Force_Release_Reset APB1 Peripheral Force Release Reset + * @brief Force or release APB1 peripheral reset. + * @{ + */ + +#define __HAL_RCC_APB1L_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_ALL) +#define __HAL_RCC_TIM2_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_LCD_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_SPI2_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_I2C3_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_FORCE_RESET() LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_LPTIM1) + +#define __HAL_RCC_APB1H_FORCE_RESET() LL_APB1_GRP2_ForceReset(LL_APB1_GRP2_PERIPH_ALL) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_FORCE_RESET() LL_APB1_GRP2_ForceReset(LL_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ +#define __HAL_RCC_LPTIM2_FORCE_RESET() LL_APB1_GRP2_ForceReset(LL_APB1_GRP2_PERIPH_LPTIM2) + +#define __HAL_RCC_APB1_FORCE_RESET() do { \ + __HAL_RCC_APB1L_FORCE_RESET();\ + __HAL_RCC_APB1H_FORCE_RESET();\ + } while(0U) + +#define __HAL_RCC_APB1L_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_ALL) +#define __HAL_RCC_TIM2_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_LCD_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#if defined(SPI2) +#define __HAL_RCC_SPI2_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_I2C3_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_RELEASE_RESET() LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_LPTIM1) + +#define __HAL_RCC_APB1H_RELEASE_RESET() LL_APB1_GRP2_ReleaseReset(LL_APB1_GRP2_PERIPH_ALL) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_RELEASE_RESET() LL_APB1_GRP2_ReleaseReset(LL_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ +#define __HAL_RCC_LPTIM2_RELEASE_RESET() LL_APB1_GRP2_ReleaseReset(LL_APB1_GRP2_PERIPH_LPTIM2) + +#define __HAL_RCC_APB1_RELEASE_RESET() do { \ + __HAL_RCC_APB1L_RELEASE_RESET();\ + __HAL_RCC_APB1H_RELEASE_RESET();\ + } while(0U) +/** + * @} + */ + +/** @defgroup RCC_APB2_Force_Release_Reset APB2 Peripheral Force Release Reset + * @brief Force or release APB2 peripheral reset. + * @{ + */ +#define __HAL_RCC_APB2_FORCE_RESET() LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_ALL) +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_FORCE_RESET() LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_FORCE_RESET() LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_SPI1_FORCE_RESET() LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_USART1_FORCE_RESET() LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_TIM16_FORCE_RESET() LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_TIM17_FORCE_RESET() LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_SAI1_FORCE_RESET() LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +#define __HAL_RCC_APB2_RELEASE_RESET() LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_ALL) +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_RELEASE_RESET() LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_RELEASE_RESET() LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_SPI1_RELEASE_RESET() LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_USART1_RELEASE_RESET() LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_TIM16_RELEASE_RESET() LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_TIM17_RELEASE_RESET() LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_SAI1_RELEASE_RESET() LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ +/** + * @} + */ + +/** @defgroup RCC_APB3_Force_Release_Reset APB3 Peripheral Force Release Reset + * @brief Force or release APB3 peripheral reset. + * @{ + */ +#define __HAL_RCC_APB3_FORCE_RESET() LL_APB3_GRP1_ForceReset(LL_APB3_GRP1_PERIPH_ALL) +#define __HAL_RCC_RF_FORCE_RESET() LL_APB3_GRP1_ForceReset(LL_APB3_GRP1_PERIPH_RF) + +#define __HAL_RCC_APB3_RELEASE_RESET() LL_APB3_GRP1_ReleaseReset(LL_APB3_GRP1_PERIPH_ALL) +#define __HAL_RCC_RF_RELEASE_RESET() LL_APB3_GRP1_ReleaseReset(LL_APB3_GRP1_PERIPH_RF) + +/** + * @} + */ + +/** @defgroup RCC_AHB1_Clock_Sleep_Enable_Disable AHB1 Peripheral Clock Sleep Enable Disable + * @brief Enable or disable the AHB1 peripheral clock during Low Power (Sleep) mode. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#define __HAL_RCC_DMA1_CLK_SLEEP_ENABLE() LL_AHB1_GRP1_EnableClockSleep(LL_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_DMA2_CLK_SLEEP_ENABLE() LL_AHB1_GRP1_EnableClockSleep(LL_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_CLK_SLEEP_ENABLE() LL_AHB1_GRP1_EnableClockSleep(LL_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_SRAM1_CLK_SLEEP_ENABLE() LL_AHB1_GRP1_EnableClockSleep(LL_AHB1_GRP1_PERIPH_SRAM1) +#define __HAL_RCC_CRC_CLK_SLEEP_ENABLE() LL_AHB1_GRP1_EnableClockSleep(LL_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_TSC_CLK_SLEEP_ENABLE() LL_AHB1_GRP1_EnableClockSleep(LL_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +#define __HAL_RCC_DMA1_CLK_SLEEP_DISABLE() LL_AHB1_GRP1_DisableClockSleep(LL_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_DMA2_CLK_SLEEP_DISABLE() LL_AHB1_GRP1_DisableClockSleep(LL_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_CLK_SLEEP_DISABLE() LL_AHB1_GRP1_DisableClockSleep(LL_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_SRAM1_CLK_SLEEP_DISABLE() LL_AHB1_GRP1_DisableClockSleep(LL_AHB1_GRP1_PERIPH_SRAM1) +#define __HAL_RCC_CRC_CLK_SLEEP_DISABLE() LL_AHB1_GRP1_DisableClockSleep(LL_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_TSC_CLK_SLEEP_DISABLE() LL_AHB1_GRP1_DisableClockSleep(LL_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +#define __HAL_RCC_C2DMA1_CLK_SLEEP_ENABLE() LL_C2_AHB1_GRP1_EnableClockSleep(LL_C2_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_C2DMA2_CLK_SLEEP_ENABLE() LL_C2_AHB1_GRP1_EnableClockSleep(LL_C2_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_C2DMAMUX1_CLK_SLEEP_ENABLE() LL_C2_AHB1_GRP1_EnableClockSleep(LL_C2_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_C2SRAM1_CLK_SLEEP_ENABLE() LL_C2_AHB1_GRP1_EnableClockSleep(LL_C2_AHB1_GRP1_PERIPH_SRAM1) +#define __HAL_RCC_C2CRC_CLK_SLEEP_ENABLE() LL_C2_AHB1_GRP1_EnableClockSleep(LL_C2_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_C2TSC_CLK_SLEEP_ENABLE() LL_C2_AHB1_GRP1_EnableClockSleep(LL_C2_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +#define __HAL_RCC_C2DMA1_CLK_SLEEP_DISABLE() LL_C2_AHB1_GRP1_DisableClockSleep(LL_C2_AHB1_GRP1_PERIPH_DMA1) +#if defined(DMA2) +#define __HAL_RCC_C2DMA2_CLK_SLEEP_DISABLE() LL_C2_AHB1_GRP1_DisableClockSleep(LL_C2_AHB1_GRP1_PERIPH_DMA2) +#endif /* DMA2 */ +#define __HAL_RCC_C2DMAMUX1_CLK_SLEEP_DISABLE() LL_C2_AHB1_GRP1_DisableClockSleep(LL_C2_AHB1_GRP1_PERIPH_DMAMUX1) +#define __HAL_RCC_C2SRAM1_CLK_SLEEP_DISABLE() LL_C2_AHB1_GRP1_DisableClockSleep(LL_C2_AHB1_GRP1_PERIPH_SRAM1) + +#define __HAL_RCC_C2CRC_CLK_SLEEP_DISABLE() LL_C2_AHB1_GRP1_DisableClockSleep(LL_C2_AHB1_GRP1_PERIPH_CRC) +#if defined(TSC) +#define __HAL_RCC_C2TSC_CLK_SLEEP_DISABLE() LL_C2_AHB1_GRP1_DisableClockSleep(LL_C2_AHB1_GRP1_PERIPH_TSC) +#endif /* TSC */ + +/** + * @} + */ + +/** @defgroup RCC_AHB2_Clock_Sleep_Enable_Disable AHB2 Peripheral Clock Sleep Enable Disable + * @brief Enable or disable the AHB2 peripheral clock during Low Power (Sleep) mode. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#define __HAL_RCC_GPIOA_CLK_SLEEP_ENABLE() LL_AHB2_GRP1_EnableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_GPIOB_CLK_SLEEP_ENABLE() LL_AHB2_GRP1_EnableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_GPIOC_CLK_SLEEP_ENABLE() LL_AHB2_GRP1_EnableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_CLK_SLEEP_ENABLE() LL_AHB2_GRP1_EnableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_CLK_SLEEP_ENABLE() LL_AHB2_GRP1_EnableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_GPIOH_CLK_SLEEP_ENABLE() LL_AHB2_GRP1_EnableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_CLK_SLEEP_ENABLE() LL_AHB2_GRP1_EnableClockSleep(LL_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_CLK_SLEEP_ENABLE() LL_AHB2_GRP1_EnableClockSleep(LL_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +#define __HAL_RCC_GPIOA_CLK_SLEEP_DISABLE() LL_AHB2_GRP1_DisableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_GPIOB_CLK_SLEEP_DISABLE() LL_AHB2_GRP1_DisableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_GPIOC_CLK_SLEEP_DISABLE() LL_AHB2_GRP1_DisableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_CLK_SLEEP_DISABLE() LL_AHB2_GRP1_DisableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_CLK_SLEEP_DISABLE() LL_AHB2_GRP1_DisableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_GPIOH_CLK_SLEEP_DISABLE() LL_AHB2_GRP1_DisableClockSleep(LL_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_CLK_SLEEP_DISABLE() LL_AHB2_GRP1_DisableClockSleep(LL_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_CLK_SLEEP_DISABLE() LL_AHB2_GRP1_DisableClockSleep(LL_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +#define __HAL_RCC_C2GPIOA_CLK_SLEEP_ENABLE() LL_C2_AHB2_GRP1_EnableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_C2GPIOB_CLK_SLEEP_ENABLE() LL_C2_AHB2_GRP1_EnableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_C2GPIOC_CLK_SLEEP_ENABLE() LL_C2_AHB2_GRP1_EnableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_C2GPIOD_CLK_SLEEP_ENABLE() LL_C2_AHB2_GRP1_EnableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_C2GPIOE_CLK_SLEEP_ENABLE() LL_C2_AHB2_GRP1_EnableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_C2GPIOH_CLK_SLEEP_ENABLE() LL_C2_AHB2_GRP1_EnableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_C2ADC_CLK_SLEEP_ENABLE() LL_C2_AHB2_GRP1_EnableClockSleep(LL_C2_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_C2AES1_CLK_SLEEP_ENABLE() LL_C2_AHB2_GRP1_EnableClockSleep(LL_C2_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +#define __HAL_RCC_C2GPIOA_CLK_SLEEP_DISABLE() LL_C2_AHB2_GRP1_DisableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOA) +#define __HAL_RCC_C2GPIOB_CLK_SLEEP_DISABLE() LL_C2_AHB2_GRP1_DisableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOB) +#define __HAL_RCC_C2GPIOC_CLK_SLEEP_DISABLE() LL_C2_AHB2_GRP1_DisableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOC) +#if defined(GPIOD) +#define __HAL_RCC_C2GPIOD_CLK_SLEEP_DISABLE() LL_C2_AHB2_GRP1_DisableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOD) +#endif /* GPIOD */ +#define __HAL_RCC_C2GPIOE_CLK_SLEEP_DISABLE() LL_C2_AHB2_GRP1_DisableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOE) +#define __HAL_RCC_C2GPIOH_CLK_SLEEP_DISABLE() LL_C2_AHB2_GRP1_DisableClockSleep(LL_C2_AHB2_GRP1_PERIPH_GPIOH) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_C2ADC_CLK_SLEEP_DISABLE() LL_C2_AHB2_GRP1_DisableClockSleep(LL_C2_AHB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_C2AES1_CLK_SLEEP_DISABLE() LL_C2_AHB2_GRP1_DisableClockSleep(LL_C2_AHB2_GRP1_PERIPH_AES1) +#endif /* AES1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB3_Clock_Sleep_Enable_Disable AHB3 Peripheral Clock Sleep Enable Disable + * @brief Enable or disable the AHB3 peripheral clock during Low Power (Sleep) mode. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_CLK_SLEEP_ENABLE() LL_AHB3_GRP1_EnableClockSleep(LL_AHB3_GRP1_PERIPH_QUADSPI) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_CLK_SLEEP_ENABLE() LL_AHB3_GRP1_EnableClockSleep(LL_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_AES2_CLK_SLEEP_ENABLE() LL_AHB3_GRP1_EnableClockSleep(LL_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_RNG_CLK_SLEEP_ENABLE() LL_AHB3_GRP1_EnableClockSleep(LL_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_SRAM2_CLK_SLEEP_ENABLE() LL_AHB3_GRP1_EnableClockSleep(LL_AHB3_GRP1_PERIPH_SRAM2) +#define __HAL_RCC_FLASH_CLK_SLEEP_ENABLE() LL_AHB3_GRP1_EnableClockSleep(LL_AHB3_GRP1_PERIPH_FLASH) + +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_CLK_SLEEP_DISABLE() LL_AHB3_GRP1_DisableClockSleep(LL_AHB3_GRP1_PERIPH_QUADSPI) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_CLK_SLEEP_DISABLE() LL_AHB3_GRP1_DisableClockSleep(LL_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_AES2_CLK_SLEEP_DISABLE() LL_AHB3_GRP1_DisableClockSleep(LL_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_RNG_CLK_SLEEP_DISABLE() LL_AHB3_GRP1_DisableClockSleep(LL_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_SRAM2_CLK_SLEEP_DISABLE() LL_AHB3_GRP1_DisableClockSleep(LL_AHB3_GRP1_PERIPH_SRAM2) +#define __HAL_RCC_FLASH_CLK_SLEEP_DISABLE() LL_AHB3_GRP1_DisableClockSleep(LL_AHB3_GRP1_PERIPH_FLASH) + +#define __HAL_RCC_C2PKA_CLK_SLEEP_ENABLE() LL_C2_AHB3_GRP1_EnableClockSleep(LL_C2_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_C2AES2_CLK_SLEEP_ENABLE() LL_C2_AHB3_GRP1_EnableClockSleep(LL_C2_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_C2RNG_CLK_SLEEP_ENABLE() LL_C2_AHB3_GRP1_EnableClockSleep(LL_C2_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_C2SRAM2_CLK_SLEEP_ENABLE() LL_C2_AHB3_GRP1_EnableClockSleep(LL_C2_AHB3_GRP1_PERIPH_SRAM2) +#define __HAL_RCC_C2FLASH_CLK_SLEEP_ENABLE() LL_C2_AHB3_GRP1_EnableClockSleep(LL_C2_AHB3_GRP1_PERIPH_FLASH) + +#define __HAL_RCC_C2PKA_CLK_SLEEP_DISABLE() LL_C2_AHB3_GRP1_DisableClockSleep(LL_C2_AHB3_GRP1_PERIPH_PKA) +#define __HAL_RCC_C2AES2_CLK_SLEEP_DISABLE() LL_C2_AHB3_GRP1_DisableClockSleep(LL_C2_AHB3_GRP1_PERIPH_AES2) +#define __HAL_RCC_C2RNG_CLK_SLEEP_DISABLE() LL_C2_AHB3_GRP1_DisableClockSleep(LL_C2_AHB3_GRP1_PERIPH_RNG) +#define __HAL_RCC_C2SRAM2_CLK_SLEEP_DISABLE() LL_C2_AHB3_GRP1_DisableClockSleep(LL_C2_AHB3_GRP1_PERIPH_SRAM2) +#define __HAL_RCC_C2FLASH_CLK_SLEEP_DISABLE() LL_C2_AHB3_GRP1_DisableClockSleep(LL_C2_AHB3_GRP1_PERIPH_FLASH) + +/** + * @} + */ + +/** @defgroup RCC_APB1_Clock_Sleep_Enable_Disable APB1 Peripheral Clock Sleep Enable Disable + * @brief Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#define __HAL_RCC_TIM2_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_LCD_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#define __HAL_RCC_RTCAPB_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_RTCAPB) +#define __HAL_RCC_WWDG_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_WWDG) +#if defined(SPI2) +#define __HAL_RCC_SPI2_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_I2C3_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_CLK_SLEEP_ENABLE() LL_APB1_GRP1_EnableClockSleep(LL_APB1_GRP1_PERIPH_LPTIM1) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_CLK_SLEEP_ENABLE() LL_APB1_GRP2_EnableClockSleep(LL_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ +#define __HAL_RCC_LPTIM2_CLK_SLEEP_ENABLE() LL_APB1_GRP2_EnableClockSleep(LL_APB1_GRP2_PERIPH_LPTIM2) + +#define __HAL_RCC_TIM2_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_LCD_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#define __HAL_RCC_RTCAPB_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_RTCAPB) +#define __HAL_RCC_WWDG_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_WWDG) +#if defined(SPI2) +#define __HAL_RCC_SPI2_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_I2C3_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_CLK_SLEEP_DISABLE() LL_APB1_GRP1_DisableClockSleep(LL_APB1_GRP1_PERIPH_LPTIM1) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_CLK_SLEEP_DISABLE() LL_APB1_GRP2_DisableClockSleep(LL_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ +#define __HAL_RCC_LPTIM2_CLK_SLEEP_DISABLE() LL_APB1_GRP2_DisableClockSleep(LL_APB1_GRP2_PERIPH_LPTIM2) + +#define __HAL_RCC_C2TIM2_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_C2LCD_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#define __HAL_RCC_C2RTCAPB_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_RTCAPB) +#if defined(SPI2) +#define __HAL_RCC_C2SPI2_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_C2I2C1_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_C2I2C3_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_C2CRS_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_C2USB_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_C2LPTIM1_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP1_EnableClockSleep(LL_C2_APB1_GRP1_PERIPH_LPTIM1) +#if defined(LPUART1) +#define __HAL_RCC_C2LPUART1_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP2_EnableClockSleep(LL_C2_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ +#define __HAL_RCC_C2LPTIM2_CLK_SLEEP_ENABLE() LL_C2_APB1_GRP2_EnableClockSleep(LL_C2_APB1_GRP2_PERIPH_LPTIM2) + +#define __HAL_RCC_C2TIM2_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_TIM2) +#if defined(LCD) +#define __HAL_RCC_C2LCD_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_LCD) +#endif /* LCD */ +#define __HAL_RCC_C2RTCAPB_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_RTCAPB) +#if defined(SPI2) +#define __HAL_RCC_C2SPI2_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_SPI2) +#endif /* SPI2 */ +#define __HAL_RCC_C2I2C1_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_I2C1) +#if defined(I2C3) +#define __HAL_RCC_C2I2C3_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_I2C3) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_C2CRS_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_CRS) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_C2USB_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_USB) +#endif /* USB */ +#define __HAL_RCC_C2LPTIM1_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP1_DisableClockSleep(LL_C2_APB1_GRP1_PERIPH_LPTIM1) +#if defined(LPUART1) +#define __HAL_RCC_C2LPUART1_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP2_DisableClockSleep(LL_C2_APB1_GRP2_PERIPH_LPUART1) +#endif /* LPUART1 */ +#define __HAL_RCC_C2LPTIM2_CLK_SLEEP_DISABLE() LL_C2_APB1_GRP2_DisableClockSleep(LL_C2_APB1_GRP2_PERIPH_LPTIM2) + +/** + * @} + */ + +/** @defgroup RCC_APB2_Clock_Sleep_Enable_Disable APB2 Peripheral Clock Sleep Enable Disable + * @brief Enable or disable the APB2 peripheral clock during Low Power (Sleep) mode. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_CLK_SLEEP_ENABLE() LL_APB2_GRP1_EnableClockSleep(LL_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_CLK_SLEEP_ENABLE() LL_APB2_GRP1_EnableClockSleep(LL_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_SPI1_CLK_SLEEP_ENABLE() LL_APB2_GRP1_EnableClockSleep(LL_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_USART1_CLK_SLEEP_ENABLE() LL_APB2_GRP1_EnableClockSleep(LL_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_TIM16_CLK_SLEEP_ENABLE() LL_APB2_GRP1_EnableClockSleep(LL_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_TIM17_CLK_SLEEP_ENABLE() LL_APB2_GRP1_EnableClockSleep(LL_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_SAI1_CLK_SLEEP_ENABLE() LL_APB2_GRP1_EnableClockSleep(LL_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_CLK_SLEEP_DISABLE() LL_APB2_GRP1_DisableClockSleep(LL_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_CLK_SLEEP_DISABLE() LL_APB2_GRP1_DisableClockSleep(LL_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_SPI1_CLK_SLEEP_DISABLE() LL_APB2_GRP1_DisableClockSleep(LL_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_USART1_CLK_SLEEP_DISABLE() LL_APB2_GRP1_DisableClockSleep(LL_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_TIM16_CLK_SLEEP_DISABLE() LL_APB2_GRP1_DisableClockSleep(LL_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_TIM17_CLK_SLEEP_DISABLE() LL_APB2_GRP1_DisableClockSleep(LL_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_SAI1_CLK_SLEEP_DISABLE() LL_APB2_GRP1_DisableClockSleep(LL_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_C2ADC_CLK_SLEEP_ENABLE() LL_C2_APB2_GRP1_EnableClockSleep(LL_C2_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_C2TIM1_CLK_SLEEP_ENABLE() LL_C2_APB2_GRP1_EnableClockSleep(LL_C2_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_C2SPI1_CLK_SLEEP_ENABLE() LL_C2_APB2_GRP1_EnableClockSleep(LL_C2_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_C2USART1_CLK_SLEEP_ENABLE() LL_C2_APB2_GRP1_EnableClockSleep(LL_C2_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_C2TIM16_CLK_SLEEP_ENABLE() LL_C2_APB2_GRP1_EnableClockSleep(LL_C2_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_C2TIM17_CLK_SLEEP_ENABLE() LL_C2_APB2_GRP1_EnableClockSleep(LL_C2_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_C2SAI1_CLK_SLEEP_ENABLE() LL_C2_APB2_GRP1_EnableClockSleep(LL_C2_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_C2ADC_CLK_SLEEP_DISABLE() LL_C2_APB2_GRP1_DisableClockSleep(LL_C2_APB2_GRP1_PERIPH_ADC) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_C2TIM1_CLK_SLEEP_DISABLE() LL_C2_APB2_GRP1_DisableClockSleep(LL_C2_APB2_GRP1_PERIPH_TIM1) +#define __HAL_RCC_C2SPI1_CLK_SLEEP_DISABLE() LL_C2_APB2_GRP1_DisableClockSleep(LL_C2_APB2_GRP1_PERIPH_SPI1) +#define __HAL_RCC_C2USART1_CLK_SLEEP_DISABLE() LL_C2_APB2_GRP1_DisableClockSleep(LL_C2_APB2_GRP1_PERIPH_USART1) +#define __HAL_RCC_C2TIM16_CLK_SLEEP_DISABLE() LL_C2_APB2_GRP1_DisableClockSleep(LL_C2_APB2_GRP1_PERIPH_TIM16) +#define __HAL_RCC_C2TIM17_CLK_SLEEP_DISABLE() LL_C2_APB2_GRP1_DisableClockSleep(LL_C2_APB2_GRP1_PERIPH_TIM17) +#if defined(SAI1) +#define __HAL_RCC_C2SAI1_CLK_SLEEP_DISABLE() LL_C2_APB2_GRP1_DisableClockSleep(LL_C2_APB2_GRP1_PERIPH_SAI1) +#endif /* SAI1 */ +/** + * @} + */ + +/** @defgroup RCC_AHB1_Clock_Sleep_Enable_Disable_Status AHB1 Peripheral Clock Sleep Enabled or Disabled Status + * @brief Check whether the AHB1 peripheral clock during Low Power (Sleep) mode is enabled or not. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#define __HAL_RCC_DMA1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_DMA1SMEN) != RESET) +#if defined(DMA2) +#define __HAL_RCC_DMA2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_DMA2SMEN) != RESET) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_DMAMUX1SMEN) != RESET) +#define __HAL_RCC_SRAM1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_SRAM1SMEN) != RESET) +#define __HAL_RCC_CRC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_CRCSMEN) != RESET) +#if defined(TSC) +#define __HAL_RCC_TSC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_TSCSMEN) != RESET) +#endif /* TSC */ + +#define __HAL_RCC_DMA1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_DMA1SMEN) == RESET) +#if defined(DMA2) +#define __HAL_RCC_DMA2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_DMA2SMEN) == RESET) +#endif /* DMA2 */ +#define __HAL_RCC_DMAMUX1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_DMAMUX1SMEN) == RESET) +#define __HAL_RCC_SRAM1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_SRAM1SMEN) == RESET) +#define __HAL_RCC_CRC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_CRCSMEN) == RESET) +#if defined(TSC) +#define __HAL_RCC_TSC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB1SMENR, RCC_AHB1SMENR_TSCSMEN) == RESET) +#endif /* TSC */ + +#define __HAL_RCC_C2DMA1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_DMA1SMEN) != RESET) +#if defined(DMA2) +#define __HAL_RCC_C2DMA2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_DMA2SMEN) != RESET) +#endif /* DMA2 */ +#define __HAL_RCC_C2DMAMUX1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_DMAMUX1SMEN) != RESET) +#define __HAL_RCC_C2SRAM1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_SRAM1SMEN) != RESET) +#define __HAL_RCC_C2CRC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_CRCSMEN) != RESET) +#if defined(TSC) +#define __HAL_RCC_C2TSC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_TSCSMEN) != RESET) +#endif /* TSC */ + +#define __HAL_RCC_C2DMA1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_DMA1SMEN) == RESET) +#if defined(DMA2) +#define __HAL_RCC_C2DMA2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_DMA2SMEN) == RESET) +#endif /* DMA2 */ +#define __HAL_RCC_C2DMAMUX1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_DMAMUX1SMEN) == RESET) +#define __HAL_RCC_C2SRAM1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_SRAM1SMEN) == RESET) +#define __HAL_RCC_C2CRC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_CRCSMEN) == RESET) +#if defined(TSC) +#define __HAL_RCC_C2TSC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB1SMENR, RCC_C2AHB1SMENR_TSCSMEN) == RESET) +#endif /* TSC */ +/** + * @} + */ + +/** @defgroup RCC_AHB2_Clock_Sleep_Enable_Disable_Status AHB2 Peripheral Clock Sleep Enabled or Disabled Status + * @brief Check whether the AHB2 peripheral clock during Low Power (Sleep) mode is enabled or not. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#define __HAL_RCC_GPIOA_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOASMEN) != RESET) +#define __HAL_RCC_GPIOB_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOBSMEN) != RESET) +#define __HAL_RCC_GPIOC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOCSMEN) != RESET) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIODSMEN) != RESET) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOESMEN) != RESET) +#define __HAL_RCC_GPIOH_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOHSMEN) != RESET) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_ADCSMEN) != RESET) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_AES1SMEN) != RESET) +#endif /* AES1 */ + +#define __HAL_RCC_GPIOA_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOASMEN) == RESET) +#define __HAL_RCC_GPIOB_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOBSMEN) == RESET) +#define __HAL_RCC_GPIOC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOCSMEN) == RESET) +#if defined(GPIOD) +#define __HAL_RCC_GPIOD_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIODSMEN) == RESET) +#endif /* GPIOD */ +#define __HAL_RCC_GPIOE_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOESMEN) == RESET) +#define __HAL_RCC_GPIOH_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_GPIOHSMEN) == RESET) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_ADC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_ADCSMEN) == RESET) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_AES1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB2SMENR, RCC_AHB2SMENR_AES1SMEN) == RESET) +#endif /* AES1 */ + +#define __HAL_RCC_C2GPIOA_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOASMEN) != RESET) +#define __HAL_RCC_C2GPIOB_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOBSMEN) != RESET) +#define __HAL_RCC_C2GPIOC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOCSMEN) != RESET) +#if defined(GPIOD) +#define __HAL_RCC_C2GPIOD_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIODSMEN) != RESET) +#endif /* GPIOD */ +#define __HAL_RCC_C2GPIOE_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOESMEN) != RESET) +#define __HAL_RCC_C2GPIOH_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOHSMEN) != RESET) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_C2ADC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_ADCSMEN) != RESET) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_C2AES1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_AES1SMEN) != RESET) +#endif /* AES1 */ + +#define __HAL_RCC_C2GPIOA_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOASMEN) == RESET) +#define __HAL_RCC_C2GPIOB_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOBSMEN) == RESET) +#define __HAL_RCC_C2GPIOC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOCSMEN) == RESET) +#if defined(GPIOD) +#define __HAL_RCC_C2GPIOD_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIODSMEN) == RESET) +#endif /* GPIOD */ +#define __HAL_RCC_C2GPIOE_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOESMEN) == RESET) +#define __HAL_RCC_C2GPIOH_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_GPIOHSMEN) == RESET) +#if defined(ADC_SUPPORT_5_MSPS) +#define __HAL_RCC_C2ADC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_ADCSMEN) == RESET) +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define __HAL_RCC_C2AES1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB2SMENR, RCC_C2AHB2SMENR_AES1SMEN) == RESET) +#endif /* AES1 */ + +/** + * @} + */ + +/** @defgroup RCC_AHB3_Clock_Sleep_Enable_Disable_Status AHB3 Peripheral Clock Sleep Enabled or Disabled Status + * @brief Check whether the AHB3 peripheral clock during Low Power (Sleep) mode is enabled or not. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_QUADSPISMEN) != RESET) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_PKASMEN) != RESET) +#define __HAL_RCC_AES2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_AES2SMEN) != RESET) +#define __HAL_RCC_RNG_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_RNGSMEN) != RESET) +#define __HAL_RCC_SRAM2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_SRAM2SMEN) != RESET) +#define __HAL_RCC_FLASH_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_FLASHSMEN) != RESET) + +#if defined(QUADSPI) +#define __HAL_RCC_QUADSPI_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_QUADSPISMEN) == RESET) +#endif /* QUADSPI */ +#define __HAL_RCC_PKA_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_PKASMEN) == RESET) +#define __HAL_RCC_AES2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_AES2SMEN) == RESET) +#define __HAL_RCC_RNG_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_RNGSMEN) == RESET) +#define __HAL_RCC_SRAM2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_SRAM2SMEN) == RESET) +#define __HAL_RCC_FLASH_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->AHB3SMENR, RCC_AHB3SMENR_FLASHSMEN) == RESET) + +#define __HAL_RCC_C2PKA_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_PKASMEN) != RESET) +#define __HAL_RCC_C2AES2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_AES2SMEN) != RESET) +#define __HAL_RCC_C2RNG_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_RNGSMEN) != RESET) +#define __HAL_RCC_C2SRAM2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_SRAM2SMEN) != RESET) +#define __HAL_RCC_C2FLASH_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_FLASHSMEN) != RESET) + +#define __HAL_RCC_C2PKA_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_PKASMEN) == RESET) +#define __HAL_RCC_C2AES2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_AES2SMEN) == RESET) +#define __HAL_RCC_C2RNG_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_RNGSMEN) == RESET) +#define __HAL_RCC_C2SRAM2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_SRAM2SMEN) == RESET) +#define __HAL_RCC_C2FLASH_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2AHB3SMENR, RCC_C2AHB3SMENR_FLASHSMEN) == RESET) + +/** + * @} + */ + +/** @defgroup RCC_APB1_Clock_Sleep_Enable_Disable_Status APB1 Peripheral Clock Sleep Enabled or Disabled Status + * @brief Check whether the APB1 peripheral clock during Low Power (Sleep) mode is enabled or not. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#define __HAL_RCC_TIM2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_TIM2SMEN) != RESET) +#if defined(LCD) +#define __HAL_RCC_LCD_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_LCDSMEN) != RESET) +#endif /* LCD */ +#define __HAL_RCC_RTCAPB_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_RTCAPBSMEN) != RESET) +#define __HAL_RCC_WWDG_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_WWDGSMEN) != RESET) +#if defined(SPI2) +#define __HAL_RCC_SPI2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_SPI2SMEN) != RESET) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_I2C1SMEN) != RESET) +#if defined(I2C3) +#define __HAL_RCC_I2C3_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_I2C3SMEN) != RESET) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_CRSSMEN) != RESET) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_USBSMEN) != RESET) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_LPTIM1SMEN) != RESET) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR2, RCC_APB1SMENR2_LPUART1SMEN) != RESET) +#endif /* LPUART1 */ +#define __HAL_RCC_LPTIM2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB1SMENR2, RCC_APB1SMENR2_LPTIM2SMEN) != RESET) + +#define __HAL_RCC_TIM2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_TIM2SMEN) == RESET) +#if defined(LCD) +#define __HAL_RCC_LCD_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_LCDSMEN) == RESET) +#endif /* LCD */ +#define __HAL_RCC_RTCAPB_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_RTCAPBSMEN) == RESET) +#define __HAL_RCC_WWDG_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_WWDGSMEN) == RESET) +#if defined(SPI2) +#define __HAL_RCC_SPI2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_SPI2SMEN) == RESET) +#endif /* SPI2 */ +#define __HAL_RCC_I2C1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_I2C1SMEN) == RESET) +#if defined(I2C3) +#define __HAL_RCC_I2C3_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_I2C3SMEN) == RESET) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_CRS_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_CRSSMEN) == RESET) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_USB_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_USBSMEN) == RESET) +#endif /* USB */ +#define __HAL_RCC_LPTIM1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR1, RCC_APB1SMENR1_LPTIM1SMEN) == RESET) +#if defined(LPUART1) +#define __HAL_RCC_LPUART1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR2, RCC_APB1SMENR2_LPUART1SMEN) == RESET) +#endif /* LPUART1 */ +#define __HAL_RCC_LPTIM2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB1SMENR2, RCC_APB1SMENR2_LPTIM2SMEN) == RESET) + +#define __HAL_RCC_C2TIM2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_TIM2SMEN) != RESET) +#if defined(LCD) +#define __HAL_RCC_C2LCD_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_LCDSMEN) != RESET) +#endif /* LCD */ +#define __HAL_RCC_C2RTCAPB_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_RTCAPBSMEN) \ + != RESET) +#if defined(SPI2) +#define __HAL_RCC_C2SPI2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_SPI2SMEN) != RESET) +#endif /* SPI2 */ +#define __HAL_RCC_C2I2C1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_I2C1SMEN) != RESET) +#if defined(I2C3) +#define __HAL_RCC_C2I2C3_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_I2C3SMEN) != RESET) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_C2CRS_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_CRSSMEN) != RESET) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_C2USB_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_USBSMEN) != RESET) +#endif /* USB */ +#define __HAL_RCC_C2LPTIM1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_LPTIM1SMEN) \ + != RESET) +#if defined(LPUART1) +#define __HAL_RCC_C2LPUART1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR2, RCC_C2APB1SMENR2_LPUART1SMEN) \ + != RESET) +#endif /* LPUART1 */ +#define __HAL_RCC_C2LPTIM2_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB1SMENR2, RCC_C2APB1SMENR2_LPTIM2SMEN) \ + != RESET) + +#define __HAL_RCC_C2TIM2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_TIM2SMEN) == RESET) +#if defined(LCD) +#define __HAL_RCC_C2LCD_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_LCDSMEN) == RESET) +#endif /* LCD */ +#define __HAL_RCC_C2RTCAPB_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_RTCAPBSMEN) \ + == RESET) +#if defined(SPI2) +#define __HAL_RCC_C2SPI2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_SPI2SMEN) == RESET) +#endif /* SPI2 */ +#define __HAL_RCC_C2I2C1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_I2C1SMEN) == RESET) +#if defined(I2C3) +#define __HAL_RCC_C2I2C3_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_I2C3SMEN) == RESET) +#endif /* I2C3 */ +#if defined(CRS) +#define __HAL_RCC_C2CRS_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_CRSSMEN) == RESET) +#endif /* CRS */ +#if defined(USB) +#define __HAL_RCC_C2USB_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_USBSMEN) == RESET) +#endif /* USB */ +#define __HAL_RCC_C2LPTIM1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR1, RCC_C2APB1SMENR1_LPTIM1SMEN) \ + == RESET) +#if defined(LPUART1) +#define __HAL_RCC_C2LPUART1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR2, RCC_C2APB1SMENR2_LPUART1SMEN) \ + == RESET) +#endif /* LPUART1 */ +#define __HAL_RCC_C2LPTIM2_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB1SMENR2, RCC_C2APB1SMENR2_LPTIM2SMEN) \ + == RESET) + +/** + * @} + */ + +/** @defgroup RCC_APB2_Clock_Sleep_Enable_Disable_Status APB2 Peripheral Clock Sleep Enabled or Disabled Status + * @brief Check whether the APB2 peripheral clock during Low Power (Sleep) mode is enabled or not. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_ADCSMEN) != RESET) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_TIM1SMEN) != RESET) +#define __HAL_RCC_SPI1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_SPI1SMEN) != RESET) +#define __HAL_RCC_USART1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_USART1SMEN) != RESET) +#define __HAL_RCC_TIM16_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_TIM16SMEN) != RESET) +#define __HAL_RCC_TIM17_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_TIM17SMEN) != RESET) +#if defined(SAI1) +#define __HAL_RCC_SAI1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_SAI1SMEN) != RESET) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_ADC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_ADCSMEN) == RESET) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_TIM1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_TIM1SMEN) == RESET) +#define __HAL_RCC_SPI1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_SPI1SMEN) == RESET) +#define __HAL_RCC_USART1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_USART1SMEN) == RESET) +#define __HAL_RCC_TIM16_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_TIM16SMEN) == RESET) +#define __HAL_RCC_TIM17_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_TIM17SMEN) == RESET) +#if defined(SAI1) +#define __HAL_RCC_SAI1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->APB2SMENR, RCC_APB2SMENR_SAI1SMEN) == RESET) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_C2ADC_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_ADCSMEN) != RESET) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_C2TIM1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_TIM1SMEN) != RESET) +#define __HAL_RCC_C2SPI1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_SPI1SMEN) != RESET) +#define __HAL_RCC_C2USART1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_USART1SMEN) \ + != RESET) +#define __HAL_RCC_C2TIM16_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_TIM16SMEN) != RESET) +#define __HAL_RCC_C2TIM17_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_TIM17SMEN) != RESET) +#if defined(SAI1) +#define __HAL_RCC_C2SAI1_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_SAI1SMEN) != RESET) +#endif /* SAI1 */ + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define __HAL_RCC_C2ADC_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_ADCSMEN) == RESET) +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define __HAL_RCC_C2TIM1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_TIM1SMEN) == RESET) +#define __HAL_RCC_C2SPI1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_SPI1SMEN) == RESET) +#define __HAL_RCC_C2USART1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_USART1SMEN) \ + == RESET) +#define __HAL_RCC_C2TIM16_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_TIM16SMEN) == RESET) +#define __HAL_RCC_C2TIM17_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_TIM17SMEN) == RESET) +#if defined(SAI1) +#define __HAL_RCC_C2SAI1_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB2SMENR, RCC_C2APB2SMENR_SAI1SMEN) == RESET) +#endif /* SAI1 */ + +/** + * @} + */ + +/** @defgroup RCC_C2APB3_Clock_Sleep_Enable_Disable APB3 Peripheral Clock Sleep Enable Disable + * @brief Enable or disable the APB3 peripheral clock during Low Power (Sleep) mode. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#define __HAL_RCC_C2BLE_CLK_SLEEP_ENABLE() LL_C2_APB3_GRP1_EnableClockSleep(LL_C2_APB3_GRP1_PERIPH_BLE) +#if defined(RCC_802_SUPPORT) +#define __HAL_RCC_C2802_CLK_SLEEP_ENABLE() LL_C2_APB3_GRP1_EnableClockSleep(LL_C2_APB3_GRP1_PERIPH_802) +#endif /* RCC_802_SUPPORT */ + +#define __HAL_RCC_C2BLE_CLK_SLEEP_DISABLE() LL_C2_APB3_GRP1_DisableClockSleep(LL_C2_APB3_GRP1_PERIPH_BLE) +#if defined(RCC_802_SUPPORT) +#define __HAL_RCC_C2802_CLK_SLEEP_DISABLE() LL_C2_APB3_GRP1_DisableClockSleep(LL_C2_APB3_GRP1_PERIPH_802) +#endif /* RCC_802_SUPPORT */ +/** + * @} + */ + +/** @defgroup RCC_C2APB3_Clock_Sleep_Enable_Disable_Status APB3 Peripheral Clock Sleep Enabled or Disabled Status + * @brief Check whether the APB3 peripheral clock during Low Power (Sleep) mode is enabled or not. + * @note Peripheral clock gating in SLEEP mode can be used to further reduce + * power consumption. + * @note After wakeup from SLEEP mode, the peripheral clock is enabled again. + * @note By default, all peripheral clocks are enabled during SLEEP mode. + * @{ + */ +#define __HAL_RCC_C2BLE_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB3SMENR, RCC_C2APB3SMENR_BLESMEN) != RESET) +#if defined(RCC_802_SUPPORT) +#define __HAL_RCC_C2802_IS_CLK_SLEEP_ENABLED() (READ_BIT(RCC->C2APB3SMENR, RCC_C2APB3SMENR_802SMEN) != RESET) +#endif /* RCC_802_SUPPORT */ + +#define __HAL_RCC_C2BLE_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB3SMENR, RCC_C2APB3SMENR_BLESMEN) == RESET) +#if defined(RCC_802_SUPPORT) +#define __HAL_RCC_C2802_IS_CLK_SLEEP_DISABLED() (READ_BIT(RCC->C2APB3SMENR, RCC_C2APB3SMENR_802SMEN) == RESET) +#endif /* RCC_802_SUPPORT */ +/** + * @} + */ + +/** @defgroup RCC_Backup_Domain_Reset RCC Backup Domain Reset + * @{ + */ + +/** @brief Macros to force or release the Backup domain reset. + * @note This function resets the RTC peripheral (including the backup registers) + * and the RTC clock source selection in RCC_CSR register. + * @note The BKPSRAM is not affected by this reset. + * @retval None + */ +#define __HAL_RCC_BACKUPRESET_FORCE() LL_RCC_ForceBackupDomainReset() +#define __HAL_RCC_BACKUPRESET_RELEASE() LL_RCC_ReleaseBackupDomainReset() + +/** + * @} + */ + +/** @defgroup RCC_RTC_Clock_Configuration RCC RTC Clock Configuration + * @{ + */ + +/** @brief Macros to enable or disable the RTC clock. + * @note As the RTC is in the Backup domain and write access is denied to + * this domain after reset, you have to enable write access using + * HAL_PWR_EnableBkUpAccess() function before to configure the RTC + * (to be done once after reset). + * @note These macros must be used after the RTC clock source was selected. + * @retval None + */ +#define __HAL_RCC_RTC_ENABLE() LL_RCC_EnableRTC() +#define __HAL_RCC_RTC_DISABLE() LL_RCC_DisableRTC() + +/** + * @} + */ + +/** @brief Macros to enable the Internal High Speed oscillator (HSI). + * @note The HSI is stopped by hardware when entering STOP, STANDBY or SHUTDOWN modes. + * It is enabled by hardware to force the HSI oscillator ON when STOPWUCK=1 + * or HSIASFS = 1 when leaving Stop modes, or in case of failure of the HSE + * crystal oscillator and Security System CSS is enabled. + * @note After enabling the HSI, the application software should wait on HSIRDY + * flag to be set indicating that HSI clock is stable and can be used as + * system clock source. + * @retval None + */ +#define __HAL_RCC_HSI_ENABLE() LL_RCC_HSI_Enable() + +/** @brief Macro to disable the Internal High Speed oscillator (HSI). + * @note HSI can not be stopped if it is used as system clock source. In this case, + * you have to select another source of the system clock then stop the HSI. + * @note When the HSI is stopped, HSIRDY flag goes low after 6 HSI oscillator + * clock cycles. + * @retval None + */ +#define __HAL_RCC_HSI_DISABLE() LL_RCC_HSI_Disable() + +/** @brief Macro to adjust the Internal High Speed oscillator (HSI) calibration value. + * @note The calibration is used to compensate for the variations in voltage + * and temperature that influence the frequency of the internal HSI RC. + * @param __HSICALIBRATIONVALUE__ specifies the calibration trimming value + * (default is RCC_HSICALIBRATION_DEFAULT). + * This parameter must be a number between Min_data=0 and Max_Data=127. + * @retval None + */ +#define __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(__HSICALIBRATIONVALUE__) \ + LL_RCC_HSI_SetCalibTrimming(__HSICALIBRATIONVALUE__) + +/** + * @brief Macros to enable or disable the wakeup the Internal High Speed oscillator (HSI) + * in parallel to the Internal Multi Speed oscillator (MSI) used at system wakeup. + * @note The enable of this function has not effect on the HSION bit. + * This parameter can be: ENABLE or DISABLE. + * @retval None + */ +#define __HAL_RCC_HSIAUTOMATIC_START_ENABLE() LL_RCC_HSI_EnableAutoFromStop() +#define __HAL_RCC_HSIAUTOMATIC_START_DISABLE() LL_RCC_HSI_DisableAutoFromStop() + +/** + * @brief Macros to enable or disable the force of the Internal High Speed oscillator (HSI) + * in STOP mode to be quickly available as kernel clock for USARTs and I2Cs. + * @note Keeping the HSI ON in STOP mode allows to avoid slowing down the communication + * speed because of the HSI startup time. + * @note The enable of this function has not effect on the HSION bit. + * @retval None + */ +#define __HAL_RCC_HSISTOP_ENABLE() LL_RCC_HSI_EnableInStopMode() +#define __HAL_RCC_HSISTOP_DISABLE() LL_RCC_HSI_DisableInStopMode() + +/** + * @brief Macros to enable or disable the Internal Multi Speed oscillator (MSI). + * @note The MSI is stopped by hardware when entering STOP and STANDBY modes. + * It is used (enabled by hardware) as system clock source after + * startup from Reset, wakeup from STOP and STANDBY mode, or in case + * of failure of the HSE used directly or indirectly as system clock + * (if the Clock Security System CSS is enabled). + * @note MSI can not be stopped if it is used as system clock source. + * In this case, you have to select another source of the system + * clock then stop the MSI. + * @note After enabling the MSI, the application software should wait on + * MSIRDY flag to be set indicating that MSI clock is stable and can + * be used as system clock source. + * @note When the MSI is stopped, MSIRDY flag goes low after 6 MSI oscillator + * clock cycles. + * @retval None + */ +#define __HAL_RCC_MSI_ENABLE() LL_RCC_MSI_Enable() +#define __HAL_RCC_MSI_DISABLE() LL_RCC_MSI_Disable() + +/** @brief Macro to adjust the Internal Multi Speed oscillator (MSI) calibration value. + * @note The calibration is used to compensate for the variations in voltage + * and temperature that influence the frequency of the internal MSI RC. + * Refer to the Application Note AN3300 for more details on how to + * calibrate the MSI. + * @param __MSICALIBRATIONVALUE__ specifies the calibration trimming value + * (default is @ref RCC_MSICALIBRATION_DEFAULT). + * This parameter must be a number between 0 and 255. + * @retval None + */ +#define __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(__MSICALIBRATIONVALUE__) \ + LL_RCC_MSI_SetCalibTrimming(__MSICALIBRATIONVALUE__) + +/** + * @brief Macro configures the Internal Multi Speed oscillator (MSI) clock range in run mode + * @note After restart from Reset , the MSI clock is around 4 MHz. + * After stop the startup clock can be MSI (at any of its possible + * frequencies, the one that was used before entering stop mode) or HSI. + * After Standby its frequency can be selected between 4 possible values + * (1, 2, 4 or 8 MHz). + * @note MSIRANGE can be modified when MSI is OFF (MSION=0) or when MSI is ready + * (MSIRDY=1). + * @note The MSI clock range after reset can be modified on the fly. + * @param __MSIRANGEVALUE__ specifies the MSI clock range. + * This parameter must be one of the following values: + * @arg @ref RCC_MSIRANGE_0 MSI clock is around 100 KHz + * @arg @ref RCC_MSIRANGE_1 MSI clock is around 200 KHz + * @arg @ref RCC_MSIRANGE_2 MSI clock is around 400 KHz + * @arg @ref RCC_MSIRANGE_3 MSI clock is around 800 KHz + * @arg @ref RCC_MSIRANGE_4 MSI clock is around 1 MHz + * @arg @ref RCC_MSIRANGE_5 MSI clock is around 2MHz + * @arg @ref RCC_MSIRANGE_6 MSI clock is around 4MHz (default after Reset) + * @arg @ref RCC_MSIRANGE_7 MSI clock is around 8 MHz + * @arg @ref RCC_MSIRANGE_8 MSI clock is around 16 MHz + * @arg @ref RCC_MSIRANGE_9 MSI clock is around 24 MHz + * @arg @ref RCC_MSIRANGE_10 MSI clock is around 32 MHz + * @arg @ref RCC_MSIRANGE_11 MSI clock is around 48 MHz + * @retval None + */ +#define __HAL_RCC_MSI_RANGE_CONFIG(__MSIRANGEVALUE__) LL_RCC_MSI_SetRange(__MSIRANGEVALUE__) + + +/** @brief Macro to get the Internal Multi Speed oscillator (MSI) clock range in run mode + * @retval MSI clock range. + * This parameter must be one of the following values: + * @arg @ref RCC_MSIRANGE_0 MSI clock is around 100 KHz + * @arg @ref RCC_MSIRANGE_1 MSI clock is around 200 KHz + * @arg @ref RCC_MSIRANGE_2 MSI clock is around 400 KHz + * @arg @ref RCC_MSIRANGE_3 MSI clock is around 800 KHz + * @arg @ref RCC_MSIRANGE_4 MSI clock is around 1 MHz + * @arg @ref RCC_MSIRANGE_5 MSI clock is around 2 MHz + * @arg @ref RCC_MSIRANGE_6 MSI clock is around 4 MHz (default after Reset) + * @arg @ref RCC_MSIRANGE_7 MSI clock is around 8 MHz + * @arg @ref RCC_MSIRANGE_8 MSI clock is around 16 MHz + * @arg @ref RCC_MSIRANGE_9 MSI clock is around 24 MHz + * @arg @ref RCC_MSIRANGE_10 MSI clock is around 32 MHz + * @arg @ref RCC_MSIRANGE_11 MSI clock is around 48 MHz + */ +#define __HAL_RCC_GET_MSI_RANGE() LL_RCC_MSI_GetRange() + + +/** @brief Macros to enable or disable the Internal Low Speed oscillator (LSI1). + * @note After enabling the LSI1, the application software should wait on + * LSI1RDY flag to be set indicating that LSI1 clock is stable and can + * be used to clock the IWDG and/or the RTC. + * @retval None + */ +#define __HAL_RCC_LSI1_ENABLE() LL_RCC_LSI1_Enable() +#define __HAL_RCC_LSI1_DISABLE() LL_RCC_LSI1_Disable() + +/** @brief Macros to enable or disable the Internal Low Speed oscillator (LSI2). + * @note After enabling the LSI2, the application software should wait on + * LSI2RDY flag to be set indicating that LSI2 clock is stable and can + * be used to clock the IWDG and/or the RTC. + * @retval None + */ +#define __HAL_RCC_LSI2_ENABLE() LL_RCC_LSI2_Enable() +#define __HAL_RCC_LSI2_DISABLE() LL_RCC_LSI2_Disable() + +/** @brief Macro to adjust the Internal Low Speed oscillator (LSI2) calibration value. + * @note The calibration is used to compensate for the variations in voltage + * and temperature that influence the frequency of the internal HSI RC. + * @param __LSI2TRIMMINGVALUE__ specifies the calibration trimming value + * This parameter must be a number between Min_data=0 and Max_Data=15. + * @retval None + */ +#define __HAL_RCC_LSI2_CALIBRATIONVALUE_ADJUST(__LSI2TRIMMINGVALUE__) LL_RCC_LSI2_SetTrimming(__LSI2TRIMMINGVALUE__) + +/** + * @brief Macro to configure the External High Speed oscillator (HSE). + * @note After enabling the HSE (RCC_HSE_ON), the application + * software should wait on HSERDY flag to be set indicating that HSE clock + * is stable and can be used to clock the PLL and/or system clock. + * @note HSE state can not be changed if it is used directly or through the + * PLL as system clock. In this case, you have to select another source + * of the system clock then change the HSE state (ex. disable it). + * @note The HSE is stopped by hardware when entering STOP and STANDBY modes. + * @note This function reset the CSSON bit, so if the clock security system(CSS) + * was previously enabled you have to enable it again after calling this + * function. + * @param __STATE__ specifies the new state of the HSE. + * This parameter can be one of the following values: + * @arg @ref RCC_HSE_OFF Turn OFF the HSE oscillator, HSERDY flag goes low after + * 6 HSE oscillator clock cycles. + * @arg @ref RCC_HSE_ON Turn ON the HSE oscillator. + * @note (*) Value not defined for all devices + * @retval None + */ +#define __HAL_RCC_HSE_CONFIG(__STATE__) \ + do { \ + if((__STATE__) == RCC_HSE_ON) \ + { \ + LL_RCC_HSE_Enable(); \ + } \ + else \ + { \ + LL_RCC_HSE_Disable(); \ + } \ + } while(0U) + +/** @brief Macros to enable or disable the HSE Prescaler + * @note HSE div2 could be used as Sysclk or PLL entry in Range2 + * @retval None + */ +#define __HAL_RCC_HSE_DIV2_ENABLE() LL_RCC_HSE_EnableDiv2() +#define __HAL_RCC_HSE_DIV2_DISABLE() LL_RCC_HSE_DisableDiv2() + +/** + * @brief Macro to configure the External Low Speed oscillator (LSE). + * @note Transitions LSE Bypass to LSE On and LSE On to LSE Bypass are not + * supported by this macro. User should request a transition to LSE Off + * first and then LSE On or LSE Bypass. + * @note As the LSE is in the Backup domain and write access is denied to + * this domain after reset, you have to enable write access using + * HAL_PWR_EnableBkUpAccess() function before to configure the LSE + * (to be done once after reset). + * @note After enabling the LSE (RCC_LSE_ON or RCC_LSE_BYPASS), the application + * software should wait on LSERDY flag to be set indicating that LSE clock + * is stable and can be used to clock the RTC. + * @param __STATE__ specifies the new state of the LSE. + * This parameter can be one of the following values: + * @arg @ref RCC_LSE_OFF Turn OFF the LSE oscillator, LSERDY flag goes low after + * 6 LSE oscillator clock cycles. + * @arg @ref RCC_LSE_ON Turn ON the LSE oscillator. + * @arg @ref RCC_LSE_BYPASS LSE oscillator bypassed with external clock. + * @retval None + */ +#define __HAL_RCC_LSE_CONFIG(__STATE__) \ + do { \ + if((__STATE__) == RCC_LSE_ON) \ + { \ + LL_RCC_LSE_Enable(); \ + } \ + else if((__STATE__) == RCC_LSE_BYPASS) \ + { \ + LL_RCC_LSE_EnableBypass(); \ + LL_RCC_LSE_Enable(); \ + } \ + else \ + { \ + LL_RCC_LSE_Disable(); \ + LL_RCC_LSE_DisableBypass(); \ + } \ + } while(0U) + + +#if defined(RCC_HSI48_SUPPORT) +/** @brief Macros to enable or disable the Internal High Speed 48MHz oscillator (HSI48). + * @note The HSI48 is stopped by hardware when entering STOP and STANDBY modes. + * @note After enabling the HSI48, the application software should wait on HSI48RDY + * flag to be set indicating that HSI48 clock is stable. + * This parameter can be: ENABLE or DISABLE. + * @retval None + */ +#define __HAL_RCC_HSI48_ENABLE() LL_RCC_HSI48_Enable() +#define __HAL_RCC_HSI48_DISABLE() LL_RCC_HSI48_Disable() +#endif + +/** @brief Macros to configure HSE sense amplifier threshold. + * @note to configure HSE sense amplifier, first disable HSE + * using @ref __HAL_RCC_HSE_CONFIG(RCC_HSE_OFF) macro. + * + * @param __HSE_AMPTHRES__ specifies the HSE sense amplifier threshold. + * This parameter can be one of the following values: + * @arg @ref RCC_HSEAMPTHRESHOLD_1_2 HSE bias current factor 1/2. + * @arg @ref RCC_HSEAMPTHRESHOLD_3_4 HSE bias current factor 3/4. + * @retval None + */ +#define __HAL_RCC_HSE_AMPCONFIG(__HSE_AMPTHRES__) LL_RCC_HSE_SetSenseAmplifier(__HSE_AMPTHRES__) + +/** @brief Macros to configure HSE current control. + * @note to configure HSE current control, first disable HSE + * using @ref __HAL_RCC_HSE_CONFIG(RCC_HSE_OFF) macro. + * + * @param __HSE_CURRENTMAX__ specifies the HSE current max limit. + * This parameter can be one of the following values: + * @arg @ref RCC_HSE_CURRENTMAX_0 HSE current max limit 0.18 mA/V. + * @arg @ref RCC_HSE_CURRENTMAX_1 HSE current max limit 0.57 mA/V. + * @arg @ref RCC_HSE_CURRENTMAX_2 HSE current max limit 0.78 mA/V. + * @arg @ref RCC_HSE_CURRENTMAX_3 HSE current max limit 1.13 mA/V. + * @arg @ref RCC_HSE_CURRENTMAX_4 HSE current max limit 0.61 mA/V. + * @arg @ref RCC_HSE_CURRENTMAX_5 HSE current max limit 1.65 mA/V. + * @arg @ref RCC_HSE_CURRENTMAX_6 HSE current max limit 2.12 mA/V. + * @arg @ref RCC_HSE_CURRENTMAX_7 HSE current max limit 2.84 mA/V. + * @retval None + */ +#define __HAL_RCC_HSE_CURRENTCONFIG(__HSE_CURRENTMAX__) LL_RCC_HSE_SetCurrentControl(__HSE_CURRENTMAX__) + +/** @brief Macros to configure HSE capacitor tuning. + * @note to configure HSE current control, first disable HSE + * using __HAL_RCC_HSE_CONFIG(RCC_HSE_OFF) macro. + * + * @param __HSE_LOAD_CAPACITANCE__ specifies the HSE capacitor value. + * This Value Between Min_Data = 0 and Max_Data = 63 + * @retval None + */ +#define __HAL_RCC_HSE_CAPACITORTUNING(__HSE_LOAD_CAPACITANCE__) LL_RCC_HSE_SetCapacitorTuning(__HSE_LOAD_CAPACITANCE__) + + +/** @brief Macros to configure the RTC clock (RTCCLK). + * @param __RTC_CLKSOURCE__ specifies the RTC clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_RTCCLKSOURCE_NONE none clock selected as RTC clock. + * @arg @ref RCC_RTCCLKSOURCE_LSE LSE selected as RTC clock. + * @arg @ref RCC_RTCCLKSOURCE_LSI LSI selected as RTC clock. + * @arg @ref RCC_RTCCLKSOURCE_HSE_DIV32 HSE clock divided by 32 selected + * @note As the RTC clock configuration bits are in the Backup domain and write + * access is denied to this domain after reset, you have to enable write + * access using the Power Backup Access macro before to configure + * the RTC clock source (to be done once after reset). + * @note Once the RTC clock is configured it cannot be changed unless the + * Backup domain is reset using @ref __HAL_RCC_BACKUPRESET_FORCE() macro, or by + * a Power On Reset (POR). + * @note If the LSE or LSI is used as RTC clock source, the RTC continues to + * work in STOP and STANDBY modes, and can be used as wakeup source. + * However, when the HSE clock is used as RTC clock source, the RTC + * cannot be used in STOP and STANDBY modes. + * @note The maximum input clock frequency for RTC is 1MHz (when using HSE as + * RTC clock source). + * @retval None + */ +#define __HAL_RCC_RTC_CONFIG(__RTC_CLKSOURCE__) LL_RCC_SetRTCClockSource(__RTC_CLKSOURCE__) + +/** @brief Macro to get the RTC clock source. + * @retval The returned value can be one of the following: + * @arg @ref RCC_RTCCLKSOURCE_NONE none clock selected as RTC clock. + * @arg @ref RCC_RTCCLKSOURCE_LSE LSE selected as RTC clock. + * @arg @ref RCC_RTCCLKSOURCE_LSI LSI selected as RTC clock. + * @arg @ref RCC_RTCCLKSOURCE_HSE_DIV32 HSE clock divided by 32 selected + */ +#define __HAL_RCC_GET_RTC_SOURCE() LL_RCC_GetRTCClockSource() + +/** @brief Macros to enable or disable the main PLL. + * @note After enabling the main PLL, the application software should wait on + * PLLRDY flag to be set indicating that PLL clock is stable and can + * be used as system clock source. + * @note The main PLL can not be disabled if it is used as system clock source + * @note The main PLL is disabled by hardware when entering STOP and STANDBY modes. + * @retval None + */ +#define __HAL_RCC_PLL_ENABLE() LL_RCC_PLL_Enable() +#define __HAL_RCC_PLL_DISABLE() LL_RCC_PLL_Disable() + +/** @brief Macro to configure the PLL clock source. + * @param __PLLSOURCE__ specifies the PLL entry clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_PLLSOURCE_NONE No clock selected as PLL clock entry + * @arg @ref RCC_PLLSOURCE_MSI MSI oscillator clock selected as PLL clock entry + * @arg @ref RCC_PLLSOURCE_HSI HSI oscillator clock selected as PLL clock entry + * @arg @ref RCC_PLLSOURCE_HSE HSE oscillator clock selected as PLL clock entry + * @note This function must be used only when the main PLL is disabled. + * @note This clock source is common for the main PLL and audio PLL (PLL and PLLSAI1). + * @retval None + * + */ +#define __HAL_RCC_PLL_PLLSOURCE_CONFIG(__PLLSOURCE__) \ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, (__PLLSOURCE__)) + +/** @brief Macro to configure the PLL multiplication factor. + * @note This function must be used only when the main PLL is disabled. + * @param __PLLM__ specifies the division factor for PLL VCO input clock + * This parameter must be a value of @ref RCC_PLLM_Clock_Divider. + * @note You have to set the PLLM parameter correctly to ensure that the VCO input + * frequency ranges from 4 to 16 MHz. It is recommended to select a frequency + * of 16 MHz to limit PLL jitter. + * @retval None + * + */ +#define __HAL_RCC_PLL_PLLM_CONFIG(__PLLM__) \ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLM, (__PLLM__)) + +/** + * @brief Macro to configure the main PLL clock source, multiplication and division factors. + * @note This function must be used only when the main PLL is disabled. + * + * @param __PLLSOURCE__ specifies the PLL entry clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_PLLSOURCE_NONE No clock selected as PLL clock entry + * @arg @ref RCC_PLLSOURCE_MSI MSI oscillator clock selected as PLL clock entry + * @arg @ref RCC_PLLSOURCE_HSI HSI oscillator clock selected as PLL clock entry + * @arg @ref RCC_PLLSOURCE_HSE HSE oscillator clock selected as PLL clock entry + * @note This clock source is common for the main PLL and audio PLL (PLL and PLLSAI1). + * + * @param __PLLM__ specifies the division factor for PLL VCO input clock. + * This parameter must be a value of @ref RCC_PLLM_Clock_Divider. + * @note You have to set the PLLM parameter correctly to ensure that the VCO input + * frequency ranges from 2.66 to 16 MHz. It is recommended to select a frequency + * of 16 MHz to limit PLL jitter. + * + * @param __PLLN__ specifies the multiplication factor for PLL VCO output clock. + * This parameter must be a number between 6 and 127. + * @note You have to set the PLLN parameter correctly to ensure that the VCO + * output frequency is between 96 and 344 MHz. + * + * @param __PLLP__ specifies the division factor for ADC and SAI1 clock. + * This parameter must be a value of @ref RCC_PLLP_Clock_Divider. + * + * @param __PLLQ__ specifies the division factor for USB and RNG clocks. + * This parameter must be a value of @ref RCC_PLLQ_Clock_Divider + * @note If the USB FS is used in your application, you have to set the + * PLLQ parameter correctly to have 48 MHz clock for the USB. However, + * the RNG need a frequency lower than or equal to 48 MHz to work + * correctly. + * + * @param __PLLR__ specifies the division factor for the main system clock. + * This parameter must be a value of @ref RCC_PLLR_Clock_Divider + * @note You have to set the PLLR parameter correctly to not exceed 48 MHZ. + * @retval None + */ +#define __HAL_RCC_PLL_CONFIG(__PLLSOURCE__, __PLLM__, __PLLN__, __PLLP__, __PLLQ__,__PLLR__ ) \ + MODIFY_REG( RCC->PLLCFGR, \ + (RCC_PLLCFGR_PLLSRC | \ + RCC_PLLCFGR_PLLM | \ + RCC_PLLCFGR_PLLN | \ + RCC_PLLCFGR_PLLP | \ + RCC_PLLCFGR_PLLQ | \ + RCC_PLLCFGR_PLLR), \ + ((uint32_t) (__PLLSOURCE__) | \ + (uint32_t) (__PLLM__) | \ + (uint32_t) ((__PLLN__) << RCC_PLLCFGR_PLLN_Pos) | \ + (uint32_t) (__PLLP__) | \ + (uint32_t) (__PLLQ__) | \ + (uint32_t) (__PLLR__))) + +/** @brief Macro to get the oscillator used as PLL clock source. + * @retval The oscillator used as PLL clock source. The returned value can be one + * of the following: + * @arg @ref RCC_PLLSOURCE_NONE No oscillator is used as PLL clock source. + * @arg @ref RCC_PLLSOURCE_MSI MSI oscillator is used as PLL clock source. + * @arg @ref RCC_PLLSOURCE_HSI HSI oscillator is used as PLL clock source. + * @arg @ref RCC_PLLSOURCE_HSE HSE oscillator is used as PLL clock source. + */ +#define __HAL_RCC_GET_PLL_OSCSOURCE() LL_RCC_PLL_GetMainSource() + +/** + * @brief Enable or disable each clock output (RCC_PLL_SYSCLK, RCC_PLL_USBCLK, RCC_PLL_SAI1CLK) + * @note Enabling/disabling clock outputs RCC_PLL_SAI1CLK and RCC_PLL_USBCLK can be done at anytime + * without the need to stop the PLL in order to save power. But RCC_PLL_SYSCLK cannot + * be stopped if used as System Clock. + * @param __PLLCLOCKOUT__ specifies the PLL clock to be output. + * This parameter can be one or a combination of the following values: + * @arg @ref RCC_PLL_SAI1CLK This clock is used to generate the clock for SAI + * @arg @ref RCC_PLL_ADCCLK This clock is used to generate the clock for ADC + * @arg @ref RCC_PLL_USBCLK This Clock is used to generate the clock for the USB FS (48 MHz) + * @arg @ref RCC_PLL_RNGCLK This clock is used to generate the clock for RNG + * @arg @ref RCC_PLL_SYSCLK This Clock is used to generate the high speed system clock (up to 64MHz) + * @retval None + */ +#define __HAL_RCC_PLLCLKOUT_ENABLE(__PLLCLOCKOUT__) SET_BIT(RCC->PLLCFGR, (__PLLCLOCKOUT__)) + +#define __HAL_RCC_PLLCLKOUT_DISABLE(__PLLCLOCKOUT__) CLEAR_BIT(RCC->PLLCFGR, (__PLLCLOCKOUT__)) + +/** + * @brief Get clock output enable status (RCC_PLL_SYSCLK, RCC_PLL_USBCLK, RCC_PLL_SAI1CLK) + * @param __PLLCLOCKOUT__ specifies the output PLL clock to be checked. + * This parameter can be one of the following values: + * @arg @ref RCC_PLL_SAI1CLK This clock is used to generate an accurate clock to achieve high-quality + * audio performance on SAI interface + * @arg @ref RCC_PLL_ADCCLK same + * @arg @ref RCC_PLL_USBCLK This Clock is used to generate the clock for the USB FS (48 MHz) + * @arg @ref RCC_PLL_RNGCLK same + * @arg @ref RCC_PLL_SYSCLK This Clock is used to generate the high speed system clock (up to 64MHz) + * @retval SET / RESET + */ +#define __HAL_RCC_GET_PLLCLKOUT_CONFIG(__PLLCLOCKOUT__) READ_BIT(RCC->PLLCFGR, (__PLLCLOCKOUT__)) + +/** + * @brief Macro to configure the system clock source. + * @param __SYSCLKSOURCE__ specifies the system clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_SYSCLKSOURCE_MSI MSI oscillator is used as system clock source. + * @arg @ref RCC_SYSCLKSOURCE_HSI HSI oscillator is used as system clock source. + * @arg @ref RCC_SYSCLKSOURCE_HSE HSE oscillator is used as system clock source. + * @arg @ref RCC_SYSCLKSOURCE_PLLCLK PLL output is used as system clock source. + * @retval None + */ +#define __HAL_RCC_SYSCLK_CONFIG(__SYSCLKSOURCE__) LL_RCC_SetSysClkSource(__SYSCLKSOURCE__) + +/** @brief Macro to get the clock source used as system clock. + * @retval The clock source used as system clock. The returned value can be one + * of the following: + * @arg @ref RCC_SYSCLKSOURCE_STATUS_MSI MSI used as system clock. + * @arg @ref RCC_SYSCLKSOURCE_STATUS_HSI HSI used as system clock. + * @arg @ref RCC_SYSCLKSOURCE_STATUS_HSE HSE used as system clock. + * @arg @ref RCC_SYSCLKSOURCE_STATUS_PLLCLK PLL used as system clock. + */ +#define __HAL_RCC_GET_SYSCLK_SOURCE() LL_RCC_GetSysClkSource() + +/** + * @brief Macro to configure the External Low Speed oscillator (LSE) drive capability. + * @note As the LSE is in the Backup domain and write access is denied to + * this domain after reset, you have to enable write access using + * HAL_PWR_EnableBkUpAccess() function before to configure the LSE + * (to be done once after reset). + * @param __LSEDRIVE__ specifies the new state of the LSE drive capability. + * This parameter can be one of the following values: + * @arg @ref RCC_LSEDRIVE_LOW LSE oscillator low drive capability. + * @arg @ref RCC_LSEDRIVE_MEDIUMLOW LSE oscillator medium low drive capability. + * @arg @ref RCC_LSEDRIVE_MEDIUMHIGH LSE oscillator medium high drive capability. + * @arg @ref RCC_LSEDRIVE_HIGH LSE oscillator high drive capability. + * @retval None + */ +#define __HAL_RCC_LSEDRIVE_CONFIG(__LSEDRIVE__) LL_RCC_LSE_SetDriveCapability(__LSEDRIVE__) + +/** + * @brief Macro to configure the wake up from stop clock. + * @param __STOPWUCLK__ specifies the clock source used after wake up from stop. + * This parameter can be one of the following values: + * @arg @ref RCC_STOP_WAKEUPCLOCK_MSI MSI selected as system clock source + * @arg @ref RCC_STOP_WAKEUPCLOCK_HSI HSI selected as system clock source + * @retval None + */ +#define __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(__STOPWUCLK__) LL_RCC_SetClkAfterWakeFromStop(__STOPWUCLK__) + + +/** @brief Macro to configure the MCO clock. + * @param __MCOCLKSOURCE__ specifies the MCO clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_MCO1SOURCE_NOCLOCK MCO output disabled + * @arg @ref RCC_MCO1SOURCE_SYSCLK System clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_MSI MSI clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_HSI HSI clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_HSE HSE clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_PLLCLK Main PLL clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_LSI1 LSI1 clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_LSI2 LSI2 clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_LSE LSE clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_HSI48 HSI48 clock selected as MCO source (*) + * + * @param __MCODIV__ specifies the MCO clock prescaler. + * This parameter can be one of the following values: + * @arg @ref RCC_MCODIV_1 MCO clock source is divided by 1 + * @arg @ref RCC_MCODIV_2 MCO clock source is divided by 2 + * @arg @ref RCC_MCODIV_4 MCO clock source is divided by 4 + * @arg @ref RCC_MCODIV_8 MCO clock source is divided by 8 + * @arg @ref RCC_MCODIV_16 MCO clock source is divided by 16 + * + * @note (*) Value not defined for all devices + */ +#define __HAL_RCC_MCO1_CONFIG(__MCOCLKSOURCE__, __MCODIV__) LL_RCC_ConfigMCO((__MCOCLKSOURCE__), (__MCODIV__)) + + +/** @defgroup RCC_Flags_Interrupts_Management Flags Interrupts Management + * @brief macros to manage the specified RCC Flags and interrupts. + * @{ + */ + +/** @brief Enable RCC interrupt. + * @param __INTERRUPT__ specifies the RCC interrupt sources to be enabled. + * This parameter can be any combination of the following values: + * @arg @ref RCC_IT_LSI1RDY LSI1 ready interrupt enable + * @arg @ref RCC_IT_LSERDY LSE ready interrupt enable + * @arg @ref RCC_IT_MSIRDY HSI ready interrupt enable + * @arg @ref RCC_IT_HSIRDY HSI ready interrupt enable + * @arg @ref RCC_IT_HSERDY HSE ready interrupt enable + * @arg @ref RCC_IT_PLLRDY Main PLL ready interrupt enable + * @arg @ref RCC_IT_PLLSAI1RDY PLLSAI1 ready interrupt enable + * @arg @ref RCC_IT_LSECSS LSE Clock security system interrupt enable + * @arg @ref RCC_IT_HSI48RDY HSI48 ready interrupt enable (*) + * @arg @ref RCC_IT_LSI2RDY LSI2 ready interrupt enable + * + * @note (*) Value not defined for all devices + * + * @retval None + */ +#define __HAL_RCC_ENABLE_IT(__INTERRUPT__) SET_BIT(RCC->CIER, (__INTERRUPT__)) + +/** @brief Disable RCC interrupt. + * @param __INTERRUPT__ specifies the RCC interrupt sources to be disabled. + * This parameter can be any combination of the following values: + * @arg @ref RCC_IT_LSI1RDY LSI1 ready interrupt enable + * @arg @ref RCC_IT_LSERDY LSE ready interrupt enable + * @arg @ref RCC_IT_MSIRDY HSI ready interrupt enable + * @arg @ref RCC_IT_HSIRDY HSI ready interrupt enable + * @arg @ref RCC_IT_HSERDY HSE ready interrupt enable + * @arg @ref RCC_IT_PLLRDY Main PLL ready interrupt enable + * @arg @ref RCC_IT_PLLSAI1RDY PLLSAI1 ready interrupt enable + * @arg @ref RCC_IT_LSECSS LSE Clock security system interrupt enable + * @arg @ref RCC_IT_HSI48RDY HSI48 ready interrupt enable (*) + * @arg @ref RCC_IT_LSI2RDY LSI2 ready interrupt enable + * + * @note (*) Value not defined for all devices + * + * @retval None + */ +#define __HAL_RCC_DISABLE_IT(__INTERRUPT__) CLEAR_BIT(RCC->CIER, (__INTERRUPT__)) + +/** @brief Clear RCC interrupt pending bits (Perform Byte access to RCC_CICR[17:0] + * bits to clear the selected interrupt pending bits. + * @param __INTERRUPT__ specifies the interrupt pending bit to clear. + * This parameter can be any combination of the following values: + * @arg @ref RCC_IT_LSI1RDY LSI1 ready interrupt clear + * @arg @ref RCC_IT_LSERDY LSE ready interrupt clear + * @arg @ref RCC_IT_MSIRDY HSI ready interrupt clear + * @arg @ref RCC_IT_HSIRDY HSI ready interrupt clear + * @arg @ref RCC_IT_HSERDY HSE ready interrupt clear + * @arg @ref RCC_IT_PLLRDY Main PLL ready interrupt clear + * @arg @ref RCC_IT_PLLRDY PLLSAI1 ready interrupt clear + * @arg @ref RCC_IT_HSECSS HSE Clock security system interrupt clear + * @arg @ref RCC_IT_LSECSS LSE Clock security system interrupt clear + * @arg @ref RCC_IT_HSI48RDY HSI48 ready interrupt clear (*) + * @arg @ref RCC_IT_LSI2RDY LSI2 ready interrupt clear + * + * @note (*) Value not defined for all devices + */ +#define __HAL_RCC_CLEAR_IT(__INTERRUPT__) (RCC->CICR = (__INTERRUPT__)) + +/** @brief Check whether the RCC interrupt has occurred or not. + * @param __INTERRUPT__ specifies the RCC interrupt source to check. + * This parameter can be one of the following values: + * @arg @ref RCC_IT_LSI1RDY LSI1 ready interrupt flag + * @arg @ref RCC_IT_LSERDY LSE ready interrupt flag + * @arg @ref RCC_IT_MSIRDY HSI ready interrupt flag + * @arg @ref RCC_IT_HSIRDY HSI ready interrupt flag + * @arg @ref RCC_IT_HSERDY HSE ready interrupt flag + * @arg @ref RCC_IT_PLLRDY Main PLL ready interrupt flag + * @arg @ref RCC_IT_PLLRDY PLLSAI1 ready interrupt flag + * @arg @ref RCC_IT_HSECSS HSE Clock security system interrupt flag + * @arg @ref RCC_IT_LSECSS LSE Clock security system interrupt flag + * @arg @ref RCC_IT_HSI48RDY HSI48 ready interrupt flag (*) + * @arg @ref RCC_IT_LSI2RDY LSI2 ready interrupt flag + * + * @note (*) Value not defined for all devices + * + * @retval The new state of __INTERRUPT__ (TRUE or FALSE). + */ +#define __HAL_RCC_GET_IT(__INTERRUPT__) ((RCC->CIFR & (__INTERRUPT__)) == (__INTERRUPT__)) + +/** @brief Set RMVF bit to clear the reset flags. + * The reset flags are: RCC_FLAG_OBLRST, RCC_FLAG_PINRST, RCC_FLAG_BORRST, + * RCC_FLAG_SFTRST, RCC_FLAG_IWDGRST, RCC_FLAG_WWDGRST and RCC_FLAG_LPWRRST. + * @retval None + */ +#define __HAL_RCC_CLEAR_RESET_FLAGS() LL_RCC_ClearResetFlags() + +/** @brief Check whether the selected RCC flag is set or not. + * @param __FLAG__ specifies the flag to check. + * This parameter can be one of the following values: + * @arg @ref RCC_FLAG_MSIRDY MSI oscillator clock ready + * @arg @ref RCC_FLAG_HSIRDY HSI oscillator clock ready + * @arg @ref RCC_FLAG_HSERDY HSE oscillator clock ready + * @arg @ref RCC_FLAG_PLLRDY Main PLL clock ready + * @arg @ref RCC_FLAG_PLLRDY PLLSAI1 clock ready + * @arg @ref RCC_FLAG_HSI48RDY HSI48 clock ready for devices with HSI48 (*) + * @arg @ref RCC_FLAG_LSERDY LSE oscillator clock ready + * @arg @ref RCC_FLAG_LSECSSD Clock security system failure on LSE oscillator detection + * @arg @ref RCC_FLAG_LSI1RDY LSI1 oscillator clock ready + * @arg @ref RCC_FLAG_LSI2RDY LSI2 oscillator clock ready + * @arg @ref RCC_FLAG_BORRST BOR reset + * @arg @ref RCC_FLAG_OBLRST OBLRST reset + * @arg @ref RCC_FLAG_PINRST Pin reset + * @arg @ref RCC_FLAG_SFTRST Software reset + * @arg @ref RCC_FLAG_IWDGRST Independent Watchdog reset + * @arg @ref RCC_FLAG_WWDGRST Window Watchdog reset + * @arg @ref RCC_FLAG_LPWRRST Low Power reset + * + * @note (*) Value not defined for all devices + * + * @retval The new state of __FLAG__ (TRUE or FALSE). + */ +#define __HAL_RCC_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5U) == CR_REG_INDEX) ? RCC->CR : \ + ((((__FLAG__) >> 5U) == CRRCR_REG_INDEX) ? RCC->CRRCR : \ + ((((__FLAG__) >> 5U) == BDCR_REG_INDEX) ? RCC->BDCR : \ + ((((__FLAG__) >> 5U) == CSR_REG_INDEX) ? RCC->CSR : RCC->CIFR)))) & \ + (1U << ((__FLAG__) & RCC_FLAG_MASK))) != RESET) \ + ? 1U : 0U) + +/** + * @} + */ + +/** + * @} + */ + +/* Include RCC HAL Extended module */ +#include "stm32wbxx_hal_rcc_ex.h" + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup RCC_Exported_Functions + * @{ + */ + + +/** @addtogroup RCC_Exported_Functions_Group1 + * @{ + */ + +/* Initialization and de-initialization functions ******************************/ +HAL_StatusTypeDef HAL_RCC_DeInit(void); +HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct); +HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency); + +/** + * @} + */ + +/** @addtogroup RCC_Exported_Functions_Group2 + * @{ + */ + +/* Peripheral Control functions ************************************************/ +void HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv); +void HAL_RCC_EnableCSS(void); +uint32_t HAL_RCC_GetSysClockFreq(void); + +uint32_t HAL_RCC_GetHCLKFreq(void); +uint32_t HAL_RCC_GetHCLK2Freq(void); +uint32_t HAL_RCC_GetHCLK4Freq(void); + +uint32_t HAL_RCC_GetPCLK1Freq(void); +uint32_t HAL_RCC_GetPCLK2Freq(void); + +void HAL_RCC_GetOscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct); +void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency); +/* LSE & HSE CSS NMI IRQ handler */ +void HAL_RCC_NMI_IRQHandler(void); +/* User Callbacks in non blocking mode (IT mode) */ +void HAL_RCC_CSSCallback(void); + +uint32_t HAL_RCC_GetResetSource(void); +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_RCC_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h new file mode 100644 index 0000000..dab095f --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rcc_ex.h @@ -0,0 +1,1659 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_rcc_ex.h + * @author MCD Application Team + * @brief Header file of RCC HAL Extended module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_RCC_EX_H +#define STM32WBxx_HAL_RCC_EX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal_def.h" +#include "stm32wbxx_ll_crs.h" +#include "stm32wbxx_ll_exti.h" +#include "stm32wbxx_ll_pwr.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup RCCEx + * @{ + */ +/* Private constants ---------------------------------------------------------*/ +/** @addtogroup RCC_Private_Constants + * @{ + */ +/* CRS IT Error Mask */ +#define RCC_CRS_IT_ERROR_MASK ((uint32_t)(RCC_CRS_IT_TRIMOVF |\ + RCC_CRS_IT_SYNCERR | RCC_CRS_IT_SYNCMISS)) + +/* CRS Flag Error Mask */ +#define RCC_CRS_FLAG_ERROR_MASK ((uint32_t)(RCC_CRS_FLAG_TRIMOVF |\ + RCC_CRS_FLAG_SYNCERR | RCC_CRS_FLAG_SYNCMISS)) + +/* RNG closk selection CLK48 clock mask */ +#define CLK48_MASK 0x10000000U + +/* Define used for IS_RCC_* macros below */ +#if defined(LPUART1) && defined(I2C3) && defined(SAI1) && defined(USB) && defined(RCC_SMPS_SUPPORT) +#define RCC_PERIPHCLOCK_ALL (RCC_PERIPHCLK_USART1 | RCC_PERIPHCLK_LPUART1 | RCC_PERIPHCLK_I2C1 | \ + RCC_PERIPHCLK_I2C3 | RCC_PERIPHCLK_LPTIM1 | RCC_PERIPHCLK_LPTIM2 | \ + RCC_PERIPHCLK_SAI1 | RCC_PERIPHCLK_USB | RCC_PERIPHCLK_RNG | \ + RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_RTC | RCC_PERIPHCLK_RFWAKEUP | \ + RCC_PERIPHCLK_SMPS) +#elif defined(LPUART1) +#define RCC_PERIPHCLOCK_ALL (RCC_PERIPHCLK_USART1 | RCC_PERIPHCLK_LPUART1 | RCC_PERIPHCLK_I2C1 | \ + RCC_PERIPHCLK_LPTIM1 | RCC_PERIPHCLK_LPTIM2 | RCC_PERIPHCLK_RNG | \ + RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_RTC | RCC_PERIPHCLK_RFWAKEUP) +#else +#define RCC_PERIPHCLOCK_ALL (RCC_PERIPHCLK_USART1 | RCC_PERIPHCLK_I2C1 | RCC_PERIPHCLK_LPTIM1 | \ + RCC_PERIPHCLK_LPTIM2 | RCC_PERIPHCLK_RNG | RCC_PERIPHCLK_ADC | \ + RCC_PERIPHCLK_RTC | RCC_PERIPHCLK_RFWAKEUP) +#endif /* LPUART1 */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @addtogroup RCCEx_Private_Macros + * @{ + */ +#if defined(RCC_LSCO3_SUPPORT) +#define IS_RCC_LSCO(__LSCOX__) (((__LSCOX__) == RCC_LSCO1) || \ + ((__LSCOX__) == RCC_LSCO2) || \ + ((__LSCOX__) == RCC_LSCO3)) +#else +#define IS_RCC_LSCO(__LSCOX__) (((__LSCOX__) == RCC_LSCO1) || \ + ((__LSCOX__) == RCC_LSCO2)) +#endif /* RCC_LSCO3_SUPPORT */ + +#define IS_RCC_LSCOSOURCE(__SOURCE__) (((__SOURCE__) == RCC_LSCOSOURCE_LSI) || \ + ((__SOURCE__) == RCC_LSCOSOURCE_LSE)) + +#define IS_RCC_PERIPHCLOCK(__SELECTION__) ((((__SELECTION__) & RCC_PERIPHCLOCK_ALL) != 0x00u) && \ + (((__SELECTION__) & ~RCC_PERIPHCLOCK_ALL) == 0x00u)) + +#define IS_RCC_USART1CLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_USART1CLKSOURCE_PCLK2) || \ + ((__SOURCE__) == RCC_USART1CLKSOURCE_SYSCLK) || \ + ((__SOURCE__) == RCC_USART1CLKSOURCE_LSE) || \ + ((__SOURCE__) == RCC_USART1CLKSOURCE_HSI)) + +#if defined(LPUART1) +#define IS_RCC_LPUART1CLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_LPUART1CLKSOURCE_PCLK1) || \ + ((__SOURCE__) == RCC_LPUART1CLKSOURCE_SYSCLK) || \ + ((__SOURCE__) == RCC_LPUART1CLKSOURCE_LSE) || \ + ((__SOURCE__) == RCC_LPUART1CLKSOURCE_HSI)) +#endif /* LPUART1 */ + +#define IS_RCC_I2C1CLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_I2C1CLKSOURCE_PCLK1) || \ + ((__SOURCE__) == RCC_I2C1CLKSOURCE_SYSCLK)|| \ + ((__SOURCE__) == RCC_I2C1CLKSOURCE_HSI)) + +#if defined(I2C3) +#define IS_RCC_I2C3CLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_I2C3CLKSOURCE_PCLK1) || \ + ((__SOURCE__) == RCC_I2C3CLKSOURCE_SYSCLK)|| \ + ((__SOURCE__) == RCC_I2C3CLKSOURCE_HSI)) +#endif /* I2C3 */ + +#if defined(SAI1) +#define IS_RCC_SAI1CLK(__SOURCE__) \ + (((__SOURCE__) == RCC_SAI1CLKSOURCE_PLLSAI1) || \ + ((__SOURCE__) == RCC_SAI1CLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_SAI1CLKSOURCE_HSI) || \ + ((__SOURCE__) == RCC_SAI1CLKSOURCE_PIN)) +#endif /* SAI1 */ + +#define IS_RCC_LPTIM1CLK(__SOURCE__) \ + (((__SOURCE__) == RCC_LPTIM1CLKSOURCE_PCLK1) || \ + ((__SOURCE__) == RCC_LPTIM1CLKSOURCE_LSI) || \ + ((__SOURCE__) == RCC_LPTIM1CLKSOURCE_HSI) || \ + ((__SOURCE__) == RCC_LPTIM1CLKSOURCE_LSE)) + +#define IS_RCC_LPTIM2CLK(__SOURCE__) \ + (((__SOURCE__) == RCC_LPTIM2CLKSOURCE_PCLK1) || \ + ((__SOURCE__) == RCC_LPTIM2CLKSOURCE_LSI) || \ + ((__SOURCE__) == RCC_LPTIM2CLKSOURCE_HSI) || \ + ((__SOURCE__) == RCC_LPTIM2CLKSOURCE_LSE)) + +#if defined(RCC_HSI48_SUPPORT) +#if defined(SAI1) +#define IS_RCC_RNGCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_RNGCLKSOURCE_HSI48) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_MSI) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_PLLSAI1) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_CLK48) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_LSI) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_LSE)) +#else /* SAI1 */ +#define IS_RCC_RNGCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_RNGCLKSOURCE_HSI48) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_MSI) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_CLK48) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_LSI) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_LSE)) +#endif /* SAI1 */ +#else /* RCC_HSI48_SUPPORT */ +#define IS_RCC_RNGCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_RNGCLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_MSI) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_CLK48) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_LSI) || \ + ((__SOURCE__) == RCC_RNGCLKSOURCE_LSE)) +#endif /* RCC_HSI48_SUPPORT */ + +#if defined(USB) +#if defined(SAI1) +#define IS_RCC_USBCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_USBCLKSOURCE_HSI48) || \ + ((__SOURCE__) == RCC_USBCLKSOURCE_PLLSAI1) || \ + ((__SOURCE__) == RCC_USBCLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_USBCLKSOURCE_MSI)) +#else +#define IS_RCC_USBCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_USBCLKSOURCE_HSI48) || \ + ((__SOURCE__) == RCC_USBCLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_USBCLKSOURCE_MSI)) +#endif /* SAI1 */ +#endif /* USB */ + +#if defined(STM32WB55xx) || defined (STM32WB5Mxx) || defined(STM32WB35xx) +#define IS_RCC_ADCCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_ADCCLKSOURCE_NONE) || \ + ((__SOURCE__) == RCC_ADCCLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_ADCCLKSOURCE_PLLSAI1) || \ + ((__SOURCE__) == RCC_ADCCLKSOURCE_SYSCLK)) +#elif defined(STM32WB15xx) || defined(STM32WB1Mxx) +#define IS_RCC_ADCCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_ADCCLKSOURCE_NONE) || \ + ((__SOURCE__) == RCC_ADCCLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_ADCCLKSOURCE_HSI) || \ + ((__SOURCE__) == RCC_ADCCLKSOURCE_SYSCLK)) +#else +#define IS_RCC_ADCCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_ADCCLKSOURCE_NONE) || \ + ((__SOURCE__) == RCC_ADCCLKSOURCE_PLL) || \ + ((__SOURCE__) == RCC_ADCCLKSOURCE_SYSCLK)) +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ + +#define IS_RCC_RFWKPCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_RFWKPCLKSOURCE_NONE) || \ + ((__SOURCE__) == RCC_RFWKPCLKSOURCE_LSE) || \ + ((__SOURCE__) == RCC_RFWKPCLKSOURCE_HSE_DIV1024)) + +#if defined(RCC_SMPS_SUPPORT) +#define IS_RCC_SMPSCLKDIV(__DIV__) \ + (((__DIV__) == RCC_SMPSCLKDIV_RANGE0) || \ + ((__DIV__) == RCC_SMPSCLKDIV_RANGE1) || \ + ((__DIV__) == RCC_SMPSCLKDIV_RANGE2) || \ + ((__DIV__) == RCC_SMPSCLKDIV_RANGE3)) + +#define IS_RCC_SMPSCLKSOURCE(__SOURCE__) \ + (((__SOURCE__) == RCC_SMPSCLKSOURCE_HSI) || \ + ((__SOURCE__) == RCC_SMPSCLKSOURCE_MSI) || \ + ((__SOURCE__) == RCC_SMPSCLKSOURCE_HSE)) +#endif /* RCC_SMPS_SUPPORT */ + + +#if defined(SAI1) +#define IS_RCC_PLLSAI1N_VALUE(__VALUE__) ((6U <= (__VALUE__)) && ((__VALUE__) <= 127U)) + +#define IS_RCC_PLLSAI1P_VALUE(__VALUE__) ((RCC_PLLP_DIV2 <= (__VALUE__)) && ((__VALUE__) <= RCC_PLLP_DIV32)) + +#define IS_RCC_PLLSAI1Q_VALUE(__VALUE__) ((RCC_PLLQ_DIV2 <= (__VALUE__)) && ((__VALUE__) <= RCC_PLLQ_DIV8)) + +#define IS_RCC_PLLSAI1R_VALUE(__VALUE__) ((RCC_PLLR_DIV2 <= (__VALUE__)) && ((__VALUE__) <= RCC_PLLR_DIV8)) +#endif /* SAI1 */ + +#define IS_RCC_TRIMOSC(__VALUE__) ((__VALUE__) == RCC_OSCILLATORTYPE_LSI2) + +#if defined(CRS) +#define IS_RCC_CRS_SYNC_SOURCE(__SOURCE__) (((__SOURCE__) == RCC_CRS_SYNC_SOURCE_GPIO) || \ + ((__SOURCE__) == RCC_CRS_SYNC_SOURCE_LSE) || \ + ((__SOURCE__) == RCC_CRS_SYNC_SOURCE_USB)) + +#define IS_RCC_CRS_SYNC_DIV(__DIV__) (((__DIV__) == RCC_CRS_SYNC_DIV1) || ((__DIV__) == RCC_CRS_SYNC_DIV2) || \ + ((__DIV__) == RCC_CRS_SYNC_DIV4) || ((__DIV__) == RCC_CRS_SYNC_DIV8) || \ + ((__DIV__) == RCC_CRS_SYNC_DIV16) || ((__DIV__) == RCC_CRS_SYNC_DIV32) || \ + ((__DIV__) == RCC_CRS_SYNC_DIV64) || ((__DIV__) == RCC_CRS_SYNC_DIV128)) + +#define IS_RCC_CRS_SYNC_POLARITY(__POLARITY__) (((__POLARITY__) == RCC_CRS_SYNC_POLARITY_RISING) || \ + ((__POLARITY__) == RCC_CRS_SYNC_POLARITY_FALLING)) + +#define IS_RCC_CRS_RELOADVALUE(__VALUE__) (((__VALUE__) <= 0xFFFFU)) + +#define IS_RCC_CRS_ERRORLIMIT(__VALUE__) (((__VALUE__) <= 0xFFU)) + +#define IS_RCC_CRS_HSI48CALIBRATION(__VALUE__) (((__VALUE__) <= 0x3FU)) + +#define IS_RCC_CRS_FREQERRORDIR(__DIR__) (((__DIR__) == RCC_CRS_FREQERRORDIR_UP) || \ + ((__DIR__) == RCC_CRS_FREQERRORDIR_DOWN)) +#endif /* CRS */ +/** + * @} + */ + +/* Exported types ------------------------------------------------------------*/ + +/** @defgroup RCCEx_Exported_Types RCCEx Exported Types + * @{ + */ + +#if defined(SAI1) +/** + * @brief PLLSAI1 Clock structure definition + */ +typedef struct +{ + + uint32_t PLLN; /*!< PLLN: specifies the multiplication factor for PLLSAI1 VCO output clock. + This parameter must be a number between Min_Data=6 and Max_Data=127. */ + + uint32_t PLLP; /*!< PLLP: specifies the division factor for SAI clock. + This parameter must be a value of @ref RCC_PLLP_Clock_Divider */ + + uint32_t PLLQ; /*!< PLLQ: specifies the division factor for USB/RNG clock. + This parameter must be a value of @ref RCC_PLLQ_Clock_Divider */ + + uint32_t PLLR; /*!< PLLR: specifies the division factor for ADC clock. + This parameter must be a value of @ref RCC_PLLR_Clock_Divider */ + + uint32_t PLLSAI1ClockOut; /*!< PLLSAI1ClockOut: specifies PLLSAI1 output clock to be enabled. + This parameter must be a value of @ref RCC_PLLSAI1_Clock_Output */ +} RCC_PLLSAI1InitTypeDef; +#endif /* SAI1 */ + +/** + * @brief RCC extended clocks structure definition + */ +typedef struct +{ + uint32_t PeriphClockSelection; /*!< The Extended Clock to be configured. + This parameter can be a value of @ref RCCEx_Periph_Clock_Selection */ + +#if defined(SAI1) + RCC_PLLSAI1InitTypeDef PLLSAI1; /*!< PLLSAI1 structure parameters. + This parameter will be used only when PLLSAI1 is selected as Clock + Source for SAI, USB/RNG or ADC */ +#endif /* SAI1 */ + + uint32_t Usart1ClockSelection; /*!< Specifies USART1 clock source. + This parameter can be a value of @ref RCCEx_USART1_Clock_Source */ + +#if defined(LPUART1) + uint32_t Lpuart1ClockSelection; /*!< Specifies LPUART1 clock source. + This parameter can be a value of @ref RCCEx_LPUART1_Clock_Source */ +#endif /* LPUART1 */ + + uint32_t I2c1ClockSelection; /*!< Specifies I2C1 clock source. + This parameter can be a value of @ref RCCEx_I2C1_Clock_Source */ + +#if defined(I2C3) + uint32_t I2c3ClockSelection; /*!< Specifies I2C3 clock source. + This parameter can be a value of @ref RCCEx_I2C3_Clock_Source */ +#endif /* I2C3 */ + + uint32_t Lptim1ClockSelection; /*!< Specifies LPTIM1 clock source. + This parameter can be a value of @ref RCCEx_LPTIM1_Clock_Source */ + + uint32_t Lptim2ClockSelection; /*!< Specifies LPTIM2 clock source. + This parameter can be a value of @ref RCCEx_LPTIM2_Clock_Source */ + +#if defined(SAI1) + uint32_t Sai1ClockSelection; /*!< Specifies SAI1 clock source. + This parameter can be a value of @ref RCCEx_SAI1_Clock_Source */ +#endif /* SAI1 */ + +#if defined(USB) + uint32_t UsbClockSelection; /*!< Specifies USB clock source (warning: same source for RNG). + This parameter can be a value of @ref RCCEx_USB_Clock_Source */ +#endif /* USB */ + + uint32_t RngClockSelection; /*!< Specifies RNG clock source (warning: same source for USB). + This parameter can be a value of @ref RCCEx_RNG_Clock_Source */ + + + uint32_t AdcClockSelection; /*!< Specifies ADC interface clock source. + This parameter can be a value of @ref RCCEx_ADC_Clock_Source */ + + uint32_t RTCClockSelection; /*!< Specifies RTC clock source (also used for LCD). + This parameter can be a value of @ref RCC_RTC_Clock_Source */ + + uint32_t RFWakeUpClockSelection; /*!< Specifies RF Wake-up clock source. + This parameter can be a value of @ref RCCEx_RFWKP_Clock_Source */ + +#if defined(RCC_SMPS_SUPPORT) + uint32_t SmpsClockSelection; /*!< Specifies SMPS clock source. + This parameter can be a value of @ref RCCEx_SMPS_Clock_Source */ + + uint32_t SmpsDivSelection; /*!< Specifies SMPS clock division factor. + This parameter can be a value of @ref RCCEx_SMPS_Clock_Divider */ +#endif /* RCC_SMPS_SUPPORT */ + +} RCC_PeriphCLKInitTypeDef; + + +#if defined(CRS) +/** + * @brief RCC_CRS Init structure definition + */ +typedef struct +{ + uint32_t Prescaler; /*!< Specifies the division factor of the SYNC signal. + This parameter can be a value of @ref RCCEx_CRS_SynchroDivider */ + + uint32_t Source; /*!< Specifies the SYNC signal source. + This parameter can be a value of @ref RCCEx_CRS_SynchroSource */ + + uint32_t Polarity; /*!< Specifies the input polarity for the SYNC signal source. + This parameter can be a value of @ref RCCEx_CRS_SynchroPolarity */ + + uint32_t ReloadValue; /*!< Specifies the value to be loaded in the frequency error counter with each SYNC event. + It can be calculated in using macro __HAL_RCC_CRS_RELOADVALUE_CALCULATE(__FTARGET__, __FSYNC__) + This parameter must be a number between Min_Data=0 and Max_Data=0xFFFF or a value of @ref RCCEx_CRS_ReloadValueDefault .*/ + + uint32_t ErrorLimitValue; /*!< Specifies the value to be used to evaluate the captured frequency error value. + This parameter must be a number between Min_Data=0 and Max_Data=0xFF or a value of @ref RCCEx_CRS_ErrorLimitDefault */ + + uint32_t HSI48CalibrationValue; /*!< Specifies a user-programmable trimming value to the HSI48 oscillator. + This parameter must be a number between Min_Data=0 and Max_Data=0x3F or a value of @ref RCCEx_CRS_HSI48CalibrationDefault */ + +} RCC_CRSInitTypeDef; + +/** + * @brief RCC_CRS Synchronization structure definition + */ +typedef struct +{ + uint32_t ReloadValue; /*!< Specifies the value loaded in the Counter reload value. + This parameter must be a number between Min_Data=0 and Max_Data=0xFFFF */ + + uint32_t HSI48CalibrationValue; /*!< Specifies value loaded in HSI48 oscillator smooth trimming. + This parameter must be a number between Min_Data=0 and Max_Data=0x3F */ + + uint32_t FreqErrorCapture; /*!< Specifies the value loaded in the .FECAP, the frequency error counter + value latched in the time of the last SYNC event. + This parameter must be a number between Min_Data=0 and Max_Data=0xFFFF */ + + uint32_t FreqErrorDirection; /*!< Specifies the value loaded in the .FEDIR, the counting direction of the + frequency error counter latched in the time of the last SYNC event. + It shows whether the actual frequency is below or above the target. + This parameter must be a value of @ref RCCEx_CRS_FreqErrorDirection*/ + +} RCC_CRSSynchroInfoTypeDef; +#endif /* CRS */ + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup RCCEx_Exported_Constants RCCEx Exported Constants + * @{ + */ + +/** @defgroup RCC_LSCO_Index LSCO Index + * @{ + */ +#define RCC_LSCO1 0x00000000U /*!< LSCO1 index */ +#define RCC_LSCO2 0x00000001U /*!< LSCO2 index */ +#if defined(RCC_LSCO3_SUPPORT) +#define RCC_LSCO3 0x00000002U /*!< LSCO3 index */ +#endif /* RCC_LSCO3_SUPPORT */ +/** + * @} + */ + + +/** @defgroup RCCEx_LSCO_Clock_Source Low Speed Clock Source + * @{ + */ +#define RCC_LSCOSOURCE_LSI LL_RCC_LSCO_CLKSOURCE_LSI /*!< LSI selection for low speed clock output */ +#define RCC_LSCOSOURCE_LSE LL_RCC_LSCO_CLKSOURCE_LSE /*!< LSE selection for low speed clock output */ +/** + * @} + */ + +/** @defgroup RCCEx_Periph_Clock_Selection Periph Clock Selection + * @{ + */ +#define RCC_PERIPHCLK_USART1 0x00000001U /*!< USART1 Peripheral Clock Selection */ +#if defined(LPUART1) +#define RCC_PERIPHCLK_LPUART1 0x00000002U /*!< LPUART1 Peripheral Clock Selection */ +#endif /* LPUART1 */ +#define RCC_PERIPHCLK_I2C1 0x00000004U /*!< I2C1 Peripheral Clock Selection */ +#if defined(I2C3) +#define RCC_PERIPHCLK_I2C3 0x00000008U /*!< I2C3 Peripheral Clock Selection */ +#endif /* I2C3 */ +#define RCC_PERIPHCLK_LPTIM1 0x00000010U /*!< LPTIM1 Peripheral Clock Selection */ +#define RCC_PERIPHCLK_LPTIM2 0x00000020U /*!< LPTIM2 Peripheral Clock Selection */ +#if defined(SAI1) +#define RCC_PERIPHCLK_SAI1 0x00000040U /*!< SAI1 Peripheral Clock Selection */ +#endif /* SAI1 */ +#define RCC_PERIPHCLK_CLK48SEL 0x00000100U /*!< 48 MHz clock source selection */ +#if defined(USB) +#define RCC_PERIPHCLK_USB RCC_PERIPHCLK_CLK48SEL /*!< USB Peripheral Clock Selection */ +#endif /* USB */ +#define RCC_PERIPHCLK_RNG 0x00000200U /*!< RNG Peripheral Clock Selection */ +#define RCC_PERIPHCLK_ADC 0x00000400U /*!< ADC Peripheral Clock Selection */ +#define RCC_PERIPHCLK_RTC 0x00000800U /*!< RTC Peripheral Clock Selection */ +#define RCC_PERIPHCLK_RFWAKEUP 0x00001000U /*!< RF Wakeup Peripheral Clock Selection */ +#if defined(RCC_SMPS_SUPPORT) +#define RCC_PERIPHCLK_SMPS 0x00002000U /*!< SMPS Peripheral Clock Selection */ +#endif /* RCC_SMPS_SUPPORT */ +/** + * @} + */ + +/** @defgroup RCCEx_USART1_Clock_Source USART1 Clock Source + * @{ + */ +#define RCC_USART1CLKSOURCE_PCLK2 LL_RCC_USART1_CLKSOURCE_PCLK2 /*!< APB2 clock selected as USART 1 clock*/ +#define RCC_USART1CLKSOURCE_SYSCLK LL_RCC_USART1_CLKSOURCE_SYSCLK /*!< SYSCLK clock selected as USART 1 clock*/ +#define RCC_USART1CLKSOURCE_HSI LL_RCC_USART1_CLKSOURCE_HSI /*!< HSI clock selected as USART 1 clock*/ +#define RCC_USART1CLKSOURCE_LSE LL_RCC_USART1_CLKSOURCE_LSE /*!< LSE clock selected as USART 1 clock*/ +/** + * @} + */ + +#if defined(LPUART1) +/** @defgroup RCCEx_LPUART1_Clock_Source LPUART1 Clock Source + * @{ + */ +#define RCC_LPUART1CLKSOURCE_PCLK1 LL_RCC_LPUART1_CLKSOURCE_PCLK1 /*!< APB1 clock selected as LPUART 1 clock*/ +#define RCC_LPUART1CLKSOURCE_SYSCLK LL_RCC_LPUART1_CLKSOURCE_SYSCLK /*!< SYSCLK clock selected as LPUART 1 clock*/ +#define RCC_LPUART1CLKSOURCE_HSI LL_RCC_LPUART1_CLKSOURCE_HSI /*!< HSI clock selected as LPUART 1 clock*/ +#define RCC_LPUART1CLKSOURCE_LSE LL_RCC_LPUART1_CLKSOURCE_LSE /*!< LSE clock selected as LPUART 1 clock*/ +/** + * @} + */ +#endif /* LPUART1 */ + +/** @defgroup RCCEx_I2C1_Clock_Source I2C1 Clock Source + * @{ + */ +#define RCC_I2C1CLKSOURCE_PCLK1 LL_RCC_I2C1_CLKSOURCE_PCLK1 /*!< APB1 clock selected as I2C1 clock */ +#define RCC_I2C1CLKSOURCE_SYSCLK LL_RCC_I2C1_CLKSOURCE_SYSCLK /*!< SYSCLK clock selected as I2C1 clock */ +#define RCC_I2C1CLKSOURCE_HSI LL_RCC_I2C1_CLKSOURCE_HSI /*!< HSI clock selected as I2C1 clock */ +/** + * @} + */ + +#if defined(I2C3) +/** @defgroup RCCEx_I2C3_Clock_Source I2C3 Clock Source + * @{ + */ +#define RCC_I2C3CLKSOURCE_PCLK1 LL_RCC_I2C3_CLKSOURCE_PCLK1 /*!< APB1 clock selected as I2C3 clock */ +#define RCC_I2C3CLKSOURCE_SYSCLK LL_RCC_I2C3_CLKSOURCE_SYSCLK /*!< SYSCLK clock selected as I2C3 clock */ +#define RCC_I2C3CLKSOURCE_HSI LL_RCC_I2C3_CLKSOURCE_HSI /*!< HSI clock selected as I2C3 clock */ +/** + * @} + */ +#endif /* I2C3 */ + +#if defined(SAI1) +/** @defgroup RCCEx_SAI1_Clock_Source SAI1 Clock Source + * @{ + */ +#define RCC_SAI1CLKSOURCE_PLLSAI1 LL_RCC_SAI1_CLKSOURCE_PLLSAI1 /*!< PLLSAI "P" clock selected as SAI1 clock */ +#define RCC_SAI1CLKSOURCE_PLL LL_RCC_SAI1_CLKSOURCE_PLL /*!< PLL "P" clock selected as SAI1 clock */ +#define RCC_SAI1CLKSOURCE_HSI LL_RCC_SAI1_CLKSOURCE_HSI /*!< HSI clock selected as SAI1 clock */ +#define RCC_SAI1CLKSOURCE_PIN LL_RCC_SAI1_CLKSOURCE_PIN /*!< External PIN clock selected as SAI1 clock */ +/** + * @} + */ +#endif /* SAI1 */ + +/** @defgroup RCCEx_LPTIM1_Clock_Source LPTIM1 Clock Source + * @{ + */ +#define RCC_LPTIM1CLKSOURCE_PCLK1 LL_RCC_LPTIM1_CLKSOURCE_PCLK1 /*!< APB1 clock selected as LPTIM1 clock */ +#define RCC_LPTIM1CLKSOURCE_LSI LL_RCC_LPTIM1_CLKSOURCE_LSI /*!< LSI clock selected as LPTIM1 clock */ +#define RCC_LPTIM1CLKSOURCE_HSI LL_RCC_LPTIM1_CLKSOURCE_HSI /*!< HSI clock selected as LPTIM1 clock */ +#define RCC_LPTIM1CLKSOURCE_LSE LL_RCC_LPTIM1_CLKSOURCE_LSE /*!< LSE clock selected as LPTIM1 clock */ +/** + * @} + */ + +/** @defgroup RCCEx_LPTIM2_Clock_Source LPTIM2 Clock Source + * @{ + */ +#define RCC_LPTIM2CLKSOURCE_PCLK1 LL_RCC_LPTIM2_CLKSOURCE_PCLK1 /*!< APB1 clock selected as LPTIM2 clock */ +#define RCC_LPTIM2CLKSOURCE_LSI LL_RCC_LPTIM2_CLKSOURCE_LSI /*!< LSI clock selected as LPTIM2 clock */ +#define RCC_LPTIM2CLKSOURCE_HSI LL_RCC_LPTIM2_CLKSOURCE_HSI /*!< HSI clock selected as LPTIM2 clock */ +#define RCC_LPTIM2CLKSOURCE_LSE LL_RCC_LPTIM2_CLKSOURCE_LSE /*!< LSE clock selected as LPTIM2 clock */ +/** + * @} + */ + +/** @defgroup RCCEx_RNG_Clock_Source RNG Clock Source + * @{ + */ +#define RCC_RNGCLKSOURCE_HSI48 (CLK48_MASK | LL_RCC_CLK48_CLKSOURCE_HSI48) /*!< HSI48 clock divided by 3 selected as RNG clock */ +#define RCC_RNGCLKSOURCE_PLL (CLK48_MASK | LL_RCC_CLK48_CLKSOURCE_PLL) /*!< PLL "Q" clock divided by 3 selected as RNG clock */ +#define RCC_RNGCLKSOURCE_MSI (CLK48_MASK | LL_RCC_CLK48_CLKSOURCE_MSI) /*!< MSI clock divided by 3 selected as RNG clock */ +#if defined(SAI1) +#define RCC_RNGCLKSOURCE_PLLSAI1 (CLK48_MASK | LL_RCC_CLK48_CLKSOURCE_PLLSAI1) /*!< PLLSAI1 "Q" clock selected as RNG clock */ +#endif /* SAI1 */ +#define RCC_RNGCLKSOURCE_CLK48 LL_RCC_RNG_CLKSOURCE_CLK48 /*!< CLK48 divided by 3 selected as RNG Clock */ +#define RCC_RNGCLKSOURCE_LSI LL_RCC_RNG_CLKSOURCE_LSI /*!< LSI clock selected as RNG clock */ +#define RCC_RNGCLKSOURCE_LSE LL_RCC_RNG_CLKSOURCE_LSE /*!< LSE clock selected as RNG clock */ +/** + * @} + */ + +#if defined(USB) +/** @defgroup RCCEx_USB_Clock_Source USB Clock Source + * @{ + */ +#define RCC_USBCLKSOURCE_HSI48 LL_RCC_USB_CLKSOURCE_HSI48 /*!< HSI48 clock selected as USB clock */ +#if defined(SAI1) +#define RCC_USBCLKSOURCE_PLLSAI1 LL_RCC_USB_CLKSOURCE_PLLSAI1 /*!< PLLSAI1 "Q" clock selected as USB clock */ +#endif /* SAI1 */ +#define RCC_USBCLKSOURCE_PLL LL_RCC_USB_CLKSOURCE_PLL /*!< PLL "Q" clock selected as USB clock */ +#define RCC_USBCLKSOURCE_MSI LL_RCC_USB_CLKSOURCE_MSI /*!< MSI clock selected as USB clock */ +/** + * @} + */ +#endif /* USB */ + +/** @defgroup RCCEx_ADC_Clock_Source ADC Clock Source + * @{ + */ + +#define RCC_ADCCLKSOURCE_NONE LL_RCC_ADC_CLKSOURCE_NONE /*!< None clock selected as ADC clock */ +#if defined(STM32WB55xx) || defined (STM32WB5Mxx) || defined(STM32WB35xx) +#define RCC_ADCCLKSOURCE_PLLSAI1 LL_RCC_ADC_CLKSOURCE_PLLSAI1 /*!< PLLSAI1 "R" clock selected as ADC clock */ +#elif defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define RCC_ADCCLKSOURCE_HSI LL_RCC_ADC_CLKSOURCE_HSI /*!< HSI clock selected as ADC clock */ +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ +#define RCC_ADCCLKSOURCE_PLL LL_RCC_ADC_CLKSOURCE_PLL /*!< PLL "P" clock selected as ADC clock */ +#define RCC_ADCCLKSOURCE_SYSCLK LL_RCC_ADC_CLKSOURCE_SYSCLK /*!< SYSCLK clock selected as ADC clock */ + +/** + * @} + */ + +/** @defgroup RCCEx_HCLK5_Clock_Source HCLK RF Clock Source + * @{ + */ + +#define RCC_HCLK5SOURCE_HSI 0x00000001U /*!< HSI clock not divided selected as Radio Domain clock */ +#define RCC_HCLK5SOURCE_HSE 0x00000002U /*!< HSE clock divided by 2 selected as Radio Domain clock */ + +/** + * @} + */ + +/** @defgroup RCCEx_RFWKP_Clock_Source RF WKP Clock Source + * @{ + */ + +#define RCC_RFWKPCLKSOURCE_NONE LL_RCC_RFWKP_CLKSOURCE_NONE /*!< None clock selected as RF system wakeup clock */ +#define RCC_RFWKPCLKSOURCE_LSE LL_RCC_RFWKP_CLKSOURCE_LSE /*!< LSE clock selected as RF system wakeup clock */ +#if defined(STM32WB15xx) || defined(STM32WB10xx) +#define RCC_RFWKPCLKSOURCE_LSI LL_RCC_RFWKP_CLKSOURCE_LSI /*!< LSI clock selected as RF system wakeup clock */ +#endif /* STM32WB15xx || STM32WB10xx */ +#define RCC_RFWKPCLKSOURCE_HSE_DIV1024 LL_RCC_RFWKP_CLKSOURCE_HSE_DIV1024 /*!< HSE clock divided by 1024 selected as RF system wakeup clock */ + +/** + * @} + */ + + +#if defined(RCC_SMPS_SUPPORT) +/** @defgroup RCCEx_SMPS_Clock_Source SMPS Clock Source + * @{ + */ +#define RCC_SMPSCLKSOURCE_HSI LL_RCC_SMPS_CLKSOURCE_HSI /*!< HSI selection as smps clock */ +#define RCC_SMPSCLKSOURCE_MSI LL_RCC_SMPS_CLKSOURCE_MSI /*!< MSI selection as smps clock */ +#define RCC_SMPSCLKSOURCE_HSE LL_RCC_SMPS_CLKSOURCE_HSE /*!< HSE selection as smps clock */ +/** + * @} + */ + +/** @defgroup RCC_System_Clock_Source_Status System Clock Source Status + * @{ + */ +#define RCC_SMPSCLKSOURCE_STATUS_HSI LL_RCC_SMPS_CLKSOURCE_STATUS_HSI /*!< HSI selection as smps clock */ +#define RCC_SMPSCLKSOURCE_STATUS_MSI LL_RCC_SMPS_CLKSOURCE_STATUS_MSI /*!< MSI selection as smps clock */ +#define RCC_SMPSCLKSOURCE_STATUS_HSE LL_RCC_SMPS_CLKSOURCE_STATUS_HSE /*!< HSE selection as smps clock */ +/** + * @} + */ + +/** @defgroup RCCEx_SMPS_Clock_Divider SMPS Clock Division Factor + * @{ + */ +#define RCC_SMPSCLKDIV_RANGE0 LL_RCC_SMPS_DIV_0 /*!< PLLM division factor = 0 */ +#define RCC_SMPSCLKDIV_RANGE1 LL_RCC_SMPS_DIV_1 /*!< PLLM division factor = 1 */ +#define RCC_SMPSCLKDIV_RANGE2 LL_RCC_SMPS_DIV_2 /*!< PLLM division factor = 2 */ +#define RCC_SMPSCLKDIV_RANGE3 LL_RCC_SMPS_DIV_3 /*!< PLLM division factor = 3 */ +/** + * @} + */ +#endif /* RCC_SMPS_SUPPORT */ + + +/** @defgroup RCCEx_EXTI_LINE_LSECSS RCC LSE CSS external interrupt line + * @{ + */ +#define RCC_EXTI_LINE_LSECSS EXTI_IMR1_IM18 /*!< External interrupt line 18 connected to the LSE CSS EXTI Line */ + +/** + * @} + */ + + +#if defined(CRS) +/** @defgroup RCCEx_CRS_Status RCCEx CRS Status + * @{ + */ +#define RCC_CRS_NONE 0x00000000U /*!< CRS status none */ +#define RCC_CRS_TIMEOUT 0x00000001U /*!< CRS status timeout */ +#define RCC_CRS_SYNCOK 0x00000002U /*!< CRS status synchronization success */ +#define RCC_CRS_SYNCWARN 0x00000004U /*!< CRS status synchronization warning */ +#define RCC_CRS_SYNCERR 0x00000008U /*!< CRS status synchronization error */ +#define RCC_CRS_SYNCMISS 0x00000010U /*!< CRS status synchronization missed */ +#define RCC_CRS_TRIMOVF 0x00000020U /*!< CRS status trimming overflow or underflow */ +/** + * @} + */ + +/** @defgroup RCCEx_CRS_SynchroSource RCCEx CRS SynchroSource + * @{ + */ +#define RCC_CRS_SYNC_SOURCE_GPIO LL_CRS_SYNC_SOURCE_GPIO /*!< Synchro Signal source GPIO */ +#define RCC_CRS_SYNC_SOURCE_LSE LL_CRS_SYNC_SOURCE_LSE /*!< Synchro Signal source LSE */ +#define RCC_CRS_SYNC_SOURCE_USB LL_CRS_SYNC_SOURCE_USB /*!< Synchro Signal source USB SOF (default)*/ +/** + * @} + */ + +/** @defgroup RCCEx_CRS_SynchroDivider RCCEx CRS SynchroDivider + * @{ + */ +#define RCC_CRS_SYNC_DIV1 LL_CRS_SYNC_DIV_1 /*!< Synchro Signal not divided (default) */ +#define RCC_CRS_SYNC_DIV2 LL_CRS_SYNC_DIV_2 /*!< Synchro Signal divided by 2 */ +#define RCC_CRS_SYNC_DIV4 LL_CRS_SYNC_DIV_4 /*!< Synchro Signal divided by 4 */ +#define RCC_CRS_SYNC_DIV8 LL_CRS_SYNC_DIV_8 /*!< Synchro Signal divided by 8 */ +#define RCC_CRS_SYNC_DIV16 LL_CRS_SYNC_DIV_16 /*!< Synchro Signal divided by 16 */ +#define RCC_CRS_SYNC_DIV32 LL_CRS_SYNC_DIV_32 /*!< Synchro Signal divided by 32 */ +#define RCC_CRS_SYNC_DIV64 LL_CRS_SYNC_DIV_64 /*!< Synchro Signal divided by 64 */ +#define RCC_CRS_SYNC_DIV128 LL_CRS_SYNC_DIV_128 /*!< Synchro Signal divided by 128 */ +/** + * @} + */ + +/** @defgroup RCCEx_CRS_SynchroPolarity RCCEx CRS SynchroPolarity + * @{ + */ +#define RCC_CRS_SYNC_POLARITY_RISING LL_CRS_SYNC_POLARITY_RISING /*!< Synchro Active on rising edge (default) */ +#define RCC_CRS_SYNC_POLARITY_FALLING LL_CRS_SYNC_POLARITY_FALLING /*!< Synchro Active on falling edge */ +/** + * @} + */ + +/** @defgroup RCCEx_CRS_ReloadValueDefault RCCEx CRS ReloadValueDefault + * @{ + */ +#define RCC_CRS_RELOADVALUE_DEFAULT LL_CRS_RELOADVALUE_DEFAULT /*!< The reset value of the RELOAD field corresponds + to a target frequency of 48 MHz and a synchronization signal frequency of 1 kHz (SOF signal from USB). */ +/** + * @} + */ + +/** @defgroup RCCEx_CRS_ErrorLimitDefault RCCEx CRS ErrorLimitDefault + * @{ + */ +#define RCC_CRS_ERRORLIMIT_DEFAULT LL_CRS_ERRORLIMIT_DEFAULT /*!< Default Frequency error limit */ +/** + * @} + */ + +/** @defgroup RCCEx_CRS_HSI48CalibrationDefault RCCEx CRS HSI48CalibrationDefault + * @{ + */ +#define RCC_CRS_HSI48CALIBRATION_DEFAULT LL_CRS_HSI48CALIBRATION_DEFAULT /*!< The default value is 32, which corresponds to the middle of the trimming interval. + The trimming step is around 67 kHz between two consecutive TRIM steps. A higher TRIM value + corresponds to a higher output frequency */ +/** + * @} + */ + +/** @defgroup RCCEx_CRS_FreqErrorDirection RCCEx CRS FreqErrorDirection + * @{ + */ +#define RCC_CRS_FREQERRORDIR_UP LL_CRS_FREQ_ERROR_DIR_UP /*!< Upcounting direction, the actual frequency is above the target */ +#define RCC_CRS_FREQERRORDIR_DOWN LL_CRS_FREQ_ERROR_DIR_DOWN /*!< Downcounting direction, the actual frequency is below the target */ +/** + * @} + */ + +/** @defgroup RCCEx_CRS_Interrupt_Sources RCCEx CRS Interrupt Sources + * @{ + */ +#define RCC_CRS_IT_SYNCOK LL_CRS_CR_SYNCOKIE /*!< SYNC event OK */ +#define RCC_CRS_IT_SYNCWARN LL_CRS_CR_SYNCWARNIE /*!< SYNC warning */ +#define RCC_CRS_IT_ERR LL_CRS_CR_ERRIE /*!< Error */ +#define RCC_CRS_IT_ESYNC LL_CRS_CR_ESYNCIE /*!< Expected SYNC */ +#define RCC_CRS_IT_SYNCERR LL_CRS_CR_ERRIE /*!< SYNC error */ +#define RCC_CRS_IT_SYNCMISS LL_CRS_CR_ERRIE /*!< SYNC missed */ +#define RCC_CRS_IT_TRIMOVF LL_CRS_CR_ERRIE /*!< Trimming overflow or underflow */ + +/** + * @} + */ + +/** @defgroup RCCEx_CRS_Flags RCCEx CRS Flags + * @{ + */ +#define RCC_CRS_FLAG_SYNCOK LL_CRS_ISR_SYNCOKF /*!< SYNC event OK flag */ +#define RCC_CRS_FLAG_SYNCWARN LL_CRS_ISR_SYNCWARNF /*!< SYNC warning flag */ +#define RCC_CRS_FLAG_ERR LL_CRS_ISR_ERRF /*!< Error flag */ +#define RCC_CRS_FLAG_ESYNC LL_CRS_ISR_ESYNCF /*!< Expected SYNC flag */ +#define RCC_CRS_FLAG_SYNCERR LL_CRS_ISR_SYNCERR /*!< SYNC error */ +#define RCC_CRS_FLAG_SYNCMISS LL_CRS_ISR_SYNCMISS /*!< SYNC missed*/ +#define RCC_CRS_FLAG_TRIMOVF LL_CRS_ISR_TRIMOVF /*!< Trimming overflow or underflow */ + +/** + * @} + */ +#endif /* CRS */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ +/** @defgroup RCCEx_Exported_Macros RCCEx Exported Macros + * @{ + */ + +/*================================================================================================================*/ + +#if defined(SAI1) +/** + * @brief Macro to configure the PLLSAI1 clock multiplication and division factors. + * + * @note This function must be used only when the PLLSAI1 is disabled. + * @note PLLSAI1 clock source is common with the main PLL (configured through + * @ref __HAL_RCC_PLL_CONFIG() macro) + * + * @param __PLLN__ specifies the multiplication factor for PLLSAI1 VCO output clock. + * This parameter must be a number between 6 and 127. + * @note You have to set the PLLN parameter correctly to ensure that the VCO + * output frequency is between 96 and 344 MHz. + * PLLSAI1 clock frequency = f(PLLSAI1) multiplied by PLLN + * + * @param __PLLP__ specifies the division factor for SAI clock. + * This parameter must be a number in the range (RCC_PLLP_DIV2 to RCC_PLLP_DIV32). + * SAI clock frequency = f(PLLSAI1) / PLLP + * + * @param __PLLQ__ specifies the division factor for USB/RNG clock. + * This parameter must be in the range (RCC_PLLQ_DIV2 to RCC_PLLQ_DIV8). + * USB/RNG clock frequency = f(PLLSAI1) / PLLQ + * + * @param __PLLR__ specifies the division factor for SAR ADC clock. + * This parameter must be in the range (RCC_PLLR_DIV2 to RCC_PLLR_DIV8). + * ADC clock frequency = f(PLLSAI1) / PLLR + * + * @retval None + */ +#define __HAL_RCC_PLLSAI1_CONFIG(__PLLN__, __PLLP__, __PLLQ__, __PLLR__) \ + MODIFY_REG(RCC->PLLSAI1CFGR, \ + (RCC_PLLSAI1CFGR_PLLN | RCC_PLLSAI1CFGR_PLLP | RCC_PLLSAI1CFGR_PLLQ | RCC_PLLSAI1CFGR_PLLR), \ + (((__PLLN__) << RCC_PLLCFGR_PLLN_Pos) | (__PLLP__) | (__PLLQ__) | (__PLLR__))) + +/** + * @brief Macro to configure the PLLSAI1 clock multiplication factor N. + * + * @note This function must be used only when the PLLSAI1 is disabled. + * @note PLLSAI1 clock source is common with the main PLL (configured through + * @ref __HAL_RCC_PLL_CONFIG() macro) + * + * @param __PLLN__ specifies the multiplication factor for PLLSAI1 VCO output clock. + * This parameter must be a number between Min_Data=6 and Max_Data=127. + * @note You have to set the PLLN parameter correctly to ensure that the VCO + * output frequency is between 96 and 344 MHz. + * Use to set PLLSAI1 clock frequency = f(PLLSAI1) multiplied by PLLN + * + * @retval None + */ +#define __HAL_RCC_PLLSAI1_MULN_CONFIG(__PLLN__) \ + MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLN, (__PLLN__) << RCC_PLLSAI1CFGR_PLLN_Pos) + + +/** @brief Macro to configure the PLLSAI1 clock division factor P. + * + * @note This function must be used only when the PLLSAI1 is disabled. + * @note PLLSAI1 clock source is common with the main PLL (configured through + * @ref __HAL_RCC_PLL_CONFIG() macro) + * + * @param __PLLP__ specifies the division factor for SAI clock. + * This parameter must be a number in range (RCC_PLLP_DIV2 to RCC_PLLP_DIV32). + * Use to set SAI clock frequency = f(PLLSAI1) / PLLP + * + * @retval None + */ +#define __HAL_RCC_PLLSAI1_DIVP_CONFIG(__PLLP__) \ + MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLP, (__PLLP__)) + + +/** @brief Macro to configure the PLLSAI1 clock division factor Q. + * + * @note This function must be used only when the PLLSAI1 is disabled. + * @note PLLSAI1 clock source is common with the main PLL (configured through + * @ref __HAL_RCC_PLL_CONFIG() macro) + * + * @param __PLLQ__ specifies the division factor for USB clock. + * This parameter must be in the range (RCC_PLLQ_DIV2 to RCC_PLLQ_DIV8). + * Use to set USB clock frequency = f(PLLSAI1) / PLLQ + * + * @retval None + */ +#define __HAL_RCC_PLLSAI1_DIVQ_CONFIG(__PLLQ__) \ + MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLQ, (__PLLQ__)) + +/** @brief Macro to configure the PLLSAI1 clock division factor R. + * + * @note This function must be used only when the PLLSAI1 is disabled. + * @note PLLSAI1 clock source is common with the main PLL (configured through + * @ref __HAL_RCC_PLL_CONFIG() macro) + * + * @param __PLLR__ specifies the division factor for ADC clock. + * This parameter must be in the range (RCC_PLLR_DIV2 to RCC_PLLR_DIV8). + * Use to set ADC clock frequency = f(PLLSAI1) / PLLR + * + * @retval None + */ +#define __HAL_RCC_PLLSAI1_DIVR_CONFIG(__PLLR__) \ + MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLR, (__PLLR__)) + +/** + * @brief Macros to enable the PLLSAI1. + * @note The PLLSAI1 is disabled by hardware when entering STOP and STANDBY modes. + * @retval None + */ +#define __HAL_RCC_PLLSAI1_ENABLE() LL_RCC_PLLSAI1_Enable() + +/** + * @brief Macros to disable the PLLSAI1. + * @note The PLLSAI1 is disabled by hardware when entering STOP and STANDBY modes. + * @retval None + */ +#define __HAL_RCC_PLLSAI1_DISABLE() LL_RCC_PLLSAI1_Disable() + +/** + * @brief Macros to enable each clock output (RCC_PLLSAI1_SAI1CLK, RCC_PLLSAI1_USBCLK and RCC_PLLSAI1_ADCCLK). + * @note Enabling and disabling those clocks can be done without the need to stop the PLL. + * This is mainly used to save Power. + * @param __PLLSAI1_CLOCKOUT__ specifies the PLLSAI1 clock to be output. + * This parameter can be one or a combination of the following values: + * @arg @ref RCC_PLLSAI1_SAI1CLK This clock is used to generate an accurate clock to achieve high-quality audio performance on SAI interface + * @arg @ref RCC_PLLSAI1_ADCCLK Clock used to clock ADC peripheral + * @arg @ref RCC_PLLSAI1_USBCLK This clock is used to generate the clock for the USB Device (48 MHz) + * + * @retval None + */ +#define __HAL_RCC_PLLSAI1CLKOUT_ENABLE(__PLLSAI1_CLOCKOUT__) SET_BIT(RCC->PLLSAI1CFGR, (__PLLSAI1_CLOCKOUT__)) + +/** + * @brief Macros to disable each clock output (RCC_PLLSAI1_SAI1CLK, RCC_PLLSAI1_USBCLK and RCC_PLLSAI1_ADCCLK). + * @note Enabling and disabling those clocks can be done without the need to stop the PLL. + * This is mainly used to save Power. + * @param __PLLSAI1_CLOCKOUT__ specifies the PLLSAI1 clock to be output. + * This parameter can be one or a combination of the following values: + * @arg @ref RCC_PLLSAI1_SAI1CLK This clock is used to generate an accurate clock to achieve high-quality audio performance on SAI interface + * @arg @ref RCC_PLLSAI1_ADCCLK Clock used to clock ADC peripheral + * @arg @ref RCC_PLLSAI1_USBCLK This clock is used to generate the clock for the USB Device (48 MHz) + * + * @retval None + */ +#define __HAL_RCC_PLLSAI1CLKOUT_DISABLE(__PLLSAI1_CLOCKOUT__) CLEAR_BIT(RCC->PLLSAI1CFGR, (__PLLSAI1_CLOCKOUT__)) + +/** + * @brief Macro to get clock output enable status (RCC_PLLSAI1_SAI1CLK, RCC_PLLSAI1_USBCLK and RCC_PLLSAI1_ADCCLK). + * @param __PLLSAI1_CLOCKOUT__ specifies the PLLSAI1 clock to be output. + * This parameter can be one or a combination of the following values: + * @arg @ref RCC_PLLSAI1_SAI1CLK This clock is used to generate an accurate clock to achieve high-quality audio performance on SAI interface + * @arg @ref RCC_PLLSAI1_ADCCLK Clock used to clock ADC peripheral + * @arg @ref RCC_PLLSAI1_USBCLK This clock is used to generate the clock for the USB Device (48 MHz) + * @retval SET / RESET + */ +#define __HAL_RCC_GET_PLLSAI1CLKOUT_CONFIG(__PLLSAI1_CLOCKOUT__) READ_BIT(RCC->PLLSAI1CFGR, (__PLLSAI1_CLOCKOUT__)) + + +/** + * @brief Macro to configure the SAI1 clock source. + * @param __SAI1_CLKSOURCE__ defines the SAI1 clock source. This clock is derived + * from the PLLSAI1, system PLL, HSI or external clock (through a dedicated pin). + * This parameter can be one of the following values: + * @arg @ref RCC_SAI1CLKSOURCE_PLLSAI1 SAI1 clock = PLLSAI1 "P" clock + * @arg @ref RCC_SAI1CLKSOURCE_PLL SAI1 clock = PLL "P" clock + * @arg @ref RCC_SAI1CLKSOURCE_HSI SAI1 clock = HSI clock + * @arg @ref RCC_SAI1CLKSOURCE_PIN SAI1 clock = External Clock (SAI1_EXTCLK) + * + * @retval None + */ +#define __HAL_RCC_SAI1_CONFIG(__SAI1_CLKSOURCE__) LL_RCC_SetSAIClockSource(__SAI1_CLKSOURCE__) + + +/** @brief Macro to get the SAI1 clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_SAI1CLKSOURCE_PLLSAI1 SAI1 clock = PLLSAI1 "P" clock + * @arg @ref RCC_SAI1CLKSOURCE_PLL SAI1 clock = PLL "P" clock + * @arg @ref RCC_SAI1CLKSOURCE_HSI SAI1 clock = HSI clock + * @arg @ref RCC_SAI1CLKSOURCE_PIN SAI1 clock = External Clock (SAI1_EXTCLK) + * + * @retval None + */ +#define __HAL_RCC_GET_SAI1_SOURCE() LL_RCC_GetSAIClockSource(LL_RCC_SAI1_CLKSOURCE) +#endif /* SAI1 */ + +/** @brief Macro to configure the I2C1 clock (I2C1CLK). + * + * @param __I2C1_CLKSOURCE__ specifies the I2C1 clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_I2C1CLKSOURCE_PCLK1 PCLK1 selected as I2C1 clock + * @arg @ref RCC_I2C1CLKSOURCE_HSI HSI selected as I2C1 clock + * @arg @ref RCC_I2C1CLKSOURCE_SYSCLK System Clock selected as I2C1 clock + * @retval None + */ +#define __HAL_RCC_I2C1_CONFIG(__I2C1_CLKSOURCE__) LL_RCC_SetI2CClockSource(__I2C1_CLKSOURCE__) + +/** @brief Macro to get the I2C1 clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_I2C1CLKSOURCE_PCLK1 PCLK1 selected as I2C1 clock + * @arg @ref RCC_I2C1CLKSOURCE_HSI HSI selected as I2C1 clock + * @arg @ref RCC_I2C1CLKSOURCE_SYSCLK System Clock selected as I2C1 clock + */ +#define __HAL_RCC_GET_I2C1_SOURCE() LL_RCC_GetI2CClockSource(LL_RCC_I2C1_CLKSOURCE) + +#if defined(I2C3) +/** @brief Macro to configure the I2C3 clock (I2C3CLK). + * + * @param __I2C3_CLKSOURCE__ specifies the I2C3 clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_I2C3CLKSOURCE_PCLK1 PCLK1 selected as I2C3 clock + * @arg @ref RCC_I2C3CLKSOURCE_HSI HSI selected as I2C3 clock + * @arg @ref RCC_I2C3CLKSOURCE_SYSCLK System Clock selected as I2C3 clock + * @retval None + */ +#define __HAL_RCC_I2C3_CONFIG(__I2C3_CLKSOURCE__) LL_RCC_SetI2CClockSource(__I2C3_CLKSOURCE__) + +/** @brief Macro to get the I2C3 clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_I2C3CLKSOURCE_PCLK1 PCLK1 selected as I2C3 clock + * @arg @ref RCC_I2C3CLKSOURCE_HSI HSI selected as I2C3 clock + * @arg @ref RCC_I2C3CLKSOURCE_SYSCLK System Clock selected as I2C3 clock + */ +#define __HAL_RCC_GET_I2C3_SOURCE() LL_RCC_GetI2CClockSource(LL_RCC_I2C3_CLKSOURCE) +#endif /* I2C3 */ + +/** @brief Macro to configure the USART1 clock (USART1CLK). + * + * @param __USART1_CLKSOURCE__ specifies the USART1 clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_USART1CLKSOURCE_PCLK2 PCLK2 selected as USART1 clock + * @arg @ref RCC_USART1CLKSOURCE_HSI HSI selected as USART1 clock + * @arg @ref RCC_USART1CLKSOURCE_SYSCLK System Clock selected as USART1 clock + * @arg @ref RCC_USART1CLKSOURCE_LSE LSE selected as USART1 clock + * @retval None + */ +#define __HAL_RCC_USART1_CONFIG(__USART1_CLKSOURCE__) LL_RCC_SetUSARTClockSource(__USART1_CLKSOURCE__) + +/** @brief Macro to get the USART1 clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_USART1CLKSOURCE_PCLK2 PCLK2 selected as USART1 clock + * @arg @ref RCC_USART1CLKSOURCE_HSI HSI selected as USART1 clock + * @arg @ref RCC_USART1CLKSOURCE_SYSCLK System Clock selected as USART1 clock + * @arg @ref RCC_USART1CLKSOURCE_LSE LSE selected as USART1 clock + */ +#define __HAL_RCC_GET_USART1_SOURCE() LL_RCC_GetUSARTClockSource(LL_RCC_USART1_CLKSOURCE) + +#if defined(LPUART1) +/** @brief Macro to configure the LPUART clock (LPUARTCLK). + * + * @param __LPUART_CLKSOURCE__ specifies the LPUART clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_LPUART1CLKSOURCE_PCLK1 PCLK1 selected as LPUART1 clock + * @arg @ref RCC_LPUART1CLKSOURCE_HSI HSI selected as LPUART1 clock + * @arg @ref RCC_LPUART1CLKSOURCE_SYSCLK System Clock selected as LPUART1 clock + * @arg @ref RCC_LPUART1CLKSOURCE_LSE LSE selected as LPUART1 clock + * @retval None + */ +#define __HAL_RCC_LPUART1_CONFIG(__LPUART_CLKSOURCE__) LL_RCC_SetLPUARTClockSource(__LPUART_CLKSOURCE__) + +/** @brief Macro to get the LPUART clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_LPUART1CLKSOURCE_PCLK1 PCLK1 selected as LPUART1 clock + * @arg @ref RCC_LPUART1CLKSOURCE_HSI HSI selected as LPUART1 clock + * @arg @ref RCC_LPUART1CLKSOURCE_SYSCLK System Clock selected as LPUART1 clock + * @arg @ref RCC_LPUART1CLKSOURCE_LSE LSE selected as LPUART1 clock + */ +#define __HAL_RCC_GET_LPUART1_SOURCE() LL_RCC_GetLPUARTClockSource(LL_RCC_LPUART1_CLKSOURCE) +#endif /* LPUART1 */ + +/** @brief Macro to configure the LPTIM1 clock (LPTIM1CLK). + * + * @param __LPTIM1_CLKSOURCE__ specifies the LPTIM1 clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_LPTIM1CLKSOURCE_PCLK1 PCLK selected as LPTIM1 clock + * @arg @ref RCC_LPTIM1CLKSOURCE_LSI HSI selected as LPTIM1 clock + * @arg @ref RCC_LPTIM1CLKSOURCE_HSI LSI selected as LPTIM1 clock + * @arg @ref RCC_LPTIM1CLKSOURCE_LSE LSE selected as LPTIM1 clock + * @retval None + */ +#define __HAL_RCC_LPTIM1_CONFIG(__LPTIM1_CLKSOURCE__) LL_RCC_SetLPTIMClockSource(__LPTIM1_CLKSOURCE__) + +/** @brief Macro to get the LPTIM1 clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_LPTIM1CLKSOURCE_PCLK1 PCLK selected as LPTIM1 clock + * @arg @ref RCC_LPTIM1CLKSOURCE_LSI HSI selected as LPTIM1 clock + * @arg @ref RCC_LPTIM1CLKSOURCE_HSI System Clock selected as LPTIM1 clock + * @arg @ref RCC_LPTIM1CLKSOURCE_LSE LSE selected as LPTIM1 clock + */ +#define __HAL_RCC_GET_LPTIM1_SOURCE() LL_RCC_GetLPTIMClockSource(LL_RCC_LPTIM1_CLKSOURCE) + +/** @brief Macro to configure the LPTIM2 clock (LPTIM2CLK). + * + * @param __LPTIM2_CLKSOURCE__ specifies the LPTIM2 clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_LPTIM2CLKSOURCE_PCLK1 PCLK selected as LPTIM2 clock + * @arg @ref RCC_LPTIM2CLKSOURCE_LSI HSI selected as LPTIM2 clock + * @arg @ref RCC_LPTIM2CLKSOURCE_HSI LSI selected as LPTIM2 clock + * @arg @ref RCC_LPTIM2CLKSOURCE_LSE LSE selected as LPTIM2 clock + * @retval None + */ +#define __HAL_RCC_LPTIM2_CONFIG(__LPTIM2_CLKSOURCE__) LL_RCC_SetLPTIMClockSource(__LPTIM2_CLKSOURCE__) + +/** @brief Macro to get the LPTIM2 clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_LPTIM2CLKSOURCE_PCLK1 PCLK selected as LPTIM2 clock + * @arg @ref RCC_LPTIM2CLKSOURCE_LSI HSI selected as LPTIM2 clock + * @arg @ref RCC_LPTIM2CLKSOURCE_HSI System Clock selected as LPTIM2 clock + * @arg @ref RCC_LPTIM2CLKSOURCE_LSE LSE selected as LPTIM2 clock + */ +#define __HAL_RCC_GET_LPTIM2_SOURCE() LL_RCC_GetLPTIMClockSource(LL_RCC_LPTIM2_CLKSOURCE) + + +/** @brief Macro to configure the RNG clock. + * + * @note USB and RNG peripherals share the same 48MHz clock source. + * + * @param __RNG_CLKSOURCE__ specifies the RNG clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_RNGCLKSOURCE_HSI48 HSI48 clock divided by 3 selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_PLL PLL "Q" clock divided by 3 selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_MSI MSI clock divided by 3 selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_PLLSAI1 PLLSAI1 "Q" clock selected as RNG (*) + * @arg @ref RCC_RNGCLKSOURCE_CLK48 CLK48 divided by 3 selected as RNG Clock (default HSI48) + * @arg @ref RCC_RNGCLKSOURCE_LSI LSI clock selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_LSE LSE clock selected as RNG clock + * + * (*) Value not defined in all devices. + * + * @retval None + */ +#define __HAL_RCC_RNG_CONFIG(__RNG_CLKSOURCE__) \ + do { \ + if (((__RNG_CLKSOURCE__) == RCC_RNGCLKSOURCE_LSI) \ + || ((__RNG_CLKSOURCE__) == RCC_RNGCLKSOURCE_LSE) \ + || ((__RNG_CLKSOURCE__) == RCC_RNGCLKSOURCE_CLK48)) \ + { \ + LL_RCC_SetRNGClockSource((__RNG_CLKSOURCE__)); \ + } \ + else \ + { \ + uint32_t tmp = (__RNG_CLKSOURCE__) &(~CLK48_MASK); \ + LL_RCC_SetRNGClockSource(RCC_RNGCLKSOURCE_CLK48); \ + LL_RCC_SetCLK48ClockSource(tmp); \ + } \ + } while(0U) + +/** @brief Macro to get the direct RNG clock. + * @note @ref HAL_RCCEx_GetRngCLKSource can also be called to get direct + * of indirect (48 MHz clock source) RNG clock source. + * @retval The RNG clock source can be one of the following values: + * @arg @ref RCC_RNGCLKSOURCE_CLK48 CLK48 divided by 3 selected as RNG Clock + * @arg @ref RCC_RNGCLKSOURCE_LSI LSI selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_LSE LSE selected as RNG clock + */ +#define __HAL_RCC_GET_RNG_SOURCE() LL_RCC_GetRNGClockSource(LL_RCC_RNG_CLKSOURCE) + +#if defined(USB) +/** @brief Macro to configure the USB clock (USBCLK). + * + * @note USB and RNG peripherals share the same 48MHz clock source. + * + * @param __USB_CLKSOURCE__ specifies the USB clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_USBCLKSOURCE_HSI48 HSI48 selected as 48MHz clock for devices with HSI48 + * @arg @ref RCC_USBCLKSOURCE_MSI MSI selected as USB clock + * @arg @ref RCC_USBCLKSOURCE_PLLSAI1 PLLSAI1 "Q" clock (PLL48M2CLK) selected as USB clock + * @arg @ref RCC_USBCLKSOURCE_PLL PLL "Q" clock (PLL48M1CLK) selected as USB clock + * @retval None + */ +#define __HAL_RCC_USB_CONFIG(__USB_CLKSOURCE__) LL_RCC_SetUSBClockSource(__USB_CLKSOURCE__) + +/** @brief Macro to get the USB clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_USBCLKSOURCE_HSI48 HSI48 selected as 48MHz clock for devices with HSI48 + * @arg @ref RCC_USBCLKSOURCE_MSI MSI selected as USB clock + * @arg @ref RCC_USBCLKSOURCE_PLLSAI1 PLLSAI1 "Q" clock (PLL48M2CLK) selected as USB clock + * @arg @ref RCC_USBCLKSOURCE_PLL PLL "Q" clock (PLL48M1CLK) selected as USB clock + */ +#define __HAL_RCC_GET_USB_SOURCE() LL_RCC_GetUSBClockSource(LL_RCC_USB_CLKSOURCE) +#endif /* USB */ + +/** @brief Macro to configure the ADC interface clock. + * @param __ADC_CLKSOURCE__ specifies the ADC digital interface clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_ADCCLKSOURCE_NONE No clock selected as ADC clock + * @arg @ref RCC_ADCCLKSOURCE_PLLSAI1 PLLSAI1 Clock selected as ADC clock (*) + * @arg @ref RCC_ADCCLKSOURCE_PLL PLL Clock selected as ADC clock + * @arg @ref RCC_ADCCLKSOURCE_SYSCLK System Clock selected as ADC clock + * @arg @ref RCC_ADCCLKSOURCE_HSI HSI Clock selected as ADC clock (*) + * @note (*) Value not defined for all devices + * @retval None + */ +#define __HAL_RCC_ADC_CONFIG(__ADC_CLKSOURCE__) LL_RCC_SetADCClockSource(__ADC_CLKSOURCE__) + +/** @brief Macro to get the ADC clock source. + * @retval The clock source can be one of the following values: + * @arg @ref RCC_ADCCLKSOURCE_NONE No clock selected as ADC clock + * @arg @ref RCC_ADCCLKSOURCE_PLLSAI1 PLLSAI1 Clock selected as ADC clock (*) + * @arg @ref RCC_ADCCLKSOURCE_PLL PLL Clock selected as ADC clock + * @arg @ref RCC_ADCCLKSOURCE_SYSCLK System Clock selected as ADC clock + * @arg @ref RCC_ADCCLKSOURCE_HSI HSI Clock selected as ADC clock (*) + * @note (*) Value not defined for all devices + */ +#define __HAL_RCC_GET_ADC_SOURCE() LL_RCC_GetADCClockSource(LL_RCC_ADC_CLKSOURCE) + +/** @brief Macro to configure the RFWKP interface clock. + * @param __RFWKP_CLKSOURCE__ specifies the RFWKP digital interface clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_RFWKPCLKSOURCE_NONE No clock selected as RFWKP clock + * @arg @ref RCC_RFWKPCLKSOURCE_LSE LSE Clock selected as RFWKP clock + * @arg @ref RCC_RFWKPCLKSOURCE_LSI LSI Clock selected as RFWKP clock (*) + * @arg @ref RCC_RFWKPCLKSOURCE_HSE_DIV1024 HSE div1024 Clock selected as RFWKP clock + * @note (*) Value not defined for all devices + * + * @retval None + */ +#define __HAL_RCC_RFWAKEUP_CONFIG(__RFWKP_CLKSOURCE__) LL_RCC_SetRFWKPClockSource(__RFWKP_CLKSOURCE__) + +/** @brief Macro to get the RFWKP clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_RFWKPCLKSOURCE_NONE No clock selected as RFWKP clock + * @arg @ref RCC_RFWKPCLKSOURCE_LSE LSE Clock selected as RFWKP clock + * @arg @ref RCC_RFWKPCLKSOURCE_LSI LSI Clock selected as RFWKP clock (*) + * @arg @ref RCC_RFWKPCLKSOURCE_HSE_DIV1024 HSE div1024 Clock selected as RFWKP clock + * @note (*) Value not defined for all devices + */ +#define __HAL_RCC_GET_RFWAKEUP_SOURCE() LL_RCC_GetRFWKPClockSource() + +#if defined(RCC_SMPS_SUPPORT) +/** @brief Macro to configure the SMPS clock division factor. + * + * @param __SMPSCLKDIV__ specifies the division factor for SMPS clock. + * This parameter can be one of the following values: + * @arg @ref RCC_SMPSCLKDIV_RANGE0 1st divider factor value + * @arg @ref RCC_SMPSCLKDIV_RANGE1 2nd divider factor value + * @arg @ref RCC_SMPSCLKDIV_RANGE2 3th divider factor value + * @arg @ref RCC_SMPSCLKDIV_RANGE3 4th divider factor value + * + * @note divider value predefined by HW depending of SMPS clock source + * + * @retval None + */ +#define __HAL_RCC_SMPS_DIV_CONFIG(__SMPSCLKDIV__) LL_RCC_SetSMPSPrescaler(__SMPSCLKDIV__) + +/** @brief Macro to get the SMPS clock division factor. + * + * This parameter can be one of the following values: + * @arg @ref RCC_SMPSCLKDIV_RANGE0 1st divider factor value + * @arg @ref RCC_SMPSCLKDIV_RANGE1 2nd divider factor value + * @arg @ref RCC_SMPSCLKDIV_RANGE2 3th divider factor value + * @arg @ref RCC_SMPSCLKDIV_RANGE3 4th divider factor value + * + */ +#define __HAL_RCC_GET_SMPS_DIV() LL_RCC_GetSMPSPrescaler() + +/** @brief Macro to configure the SMPS interface clock. + * @param __SMPS_CLKSOURCE__ specifies the SMPS digital interface clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_SMPSCLKSOURCE_HSI HSI clock selected as SMPS clock + * @arg @ref RCC_SMPSCLKSOURCE_MSI MSI Clock selected as SMPS clock + * @arg @ref RCC_SMPSCLKSOURCE_HSE HSE Clock selected as SMPS clock + * @retval None + */ + +#define __HAL_RCC_SMPS_CONFIG(__SMPS_CLKSOURCE__) LL_RCC_SetSMPSClockSource(__SMPS_CLKSOURCE__) + +/** @brief Macro to get the SMPS clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_SMPSCLKSOURCE_HSI HSI clock selected as SMPS clock + * @arg @ref RCC_SMPSCLKSOURCE_MSI MSI Clock selected as SMPS clock + * @arg @ref RCC_SMPSCLKSOURCE_HSE HSE Clock selected as SMPS clock + */ +#define __HAL_RCC_GET_SMPS_SOURCE() LL_RCC_GetSMPSClockSelection() + +/** @brief Macro to get the SMPS clock source. + * This parameter can be one of the following values: + * @arg @ref RCC_SMPSCLKSOURCE_STATUS_HSI HSI clock selected as SMPS clock + * @arg @ref RCC_SMPSCLKSOURCE_STATUS_MSI MSI Clock selected as SMPS clock + * @arg @ref RCC_SMPSCLKSOURCE_STATUS_HSE HSE Clock selected as SMPS clock + */ +#define __HAL_RCC_GET_SMPS_SOURCE_STATUS() LL_RCC_GetSMPSClockSource() +#endif /* RCC_SMPS_SUPPORT */ + +/** @defgroup RCCEx_Flags_Interrupts_Management Flags Interrupts Management + * @brief macros to manage the specified RCC Flags and interrupts. + * @{ + */ + + +#if defined(SAI1) +/** @brief Enable PLLSAI1RDY interrupt. + * @retval None + */ +#define __HAL_RCC_PLLSAI1_ENABLE_IT() LL_RCC_EnableIT_PLLSAI1RDY() + +/** @brief Disable PLLSAI1RDY interrupt. + * @retval None + */ +#define __HAL_RCC_PLLSAI1_DISABLE_IT() LL_RCC_DisableIT_PLLSAI1RDY() + +/** @brief Clear the PLLSAI1RDY interrupt pending bit. + * @retval None + */ +#define __HAL_RCC_PLLSAI1_CLEAR_IT() LL_RCC_ClearFlag_PLLSAI1RDY() + +/** @brief Check whether PLLSAI1RDY interrupt has occurred or not. + * @retval TRUE or FALSE. + */ +#define __HAL_RCC_PLLSAI1_GET_IT_SOURCE() LL_RCC_IsActiveFlag_PLLSAI1RDY() + +/** @brief Check whether the PLLSAI1RDY flag is set or not. + * @retval TRUE or FALSE. + */ +#define __HAL_RCC_PLLSAI1_GET_FLAG() LL_RCC_PLLSAI1_IsReady() +#endif /* SAI1 */ + +/** + * @brief Enable the RCC LSE CSS Extended Interrupt C1 Line. + * @retval None + */ +#define __HAL_RCC_LSECSS_EXTI_ENABLE_IT() LL_EXTI_EnableIT_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Enable the RCC LSE CSS Extended Interrupt C2 Line. + * @retval None + */ +#define __HAL_C2_RCC_LSECSS_EXTI_ENABLE_IT() LL_C2_EXTI_EnableIT_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Disable the RCC LSE CSS Extended Interrupt C1 Line. + * @retval None + */ +#define __HAL_RCC_LSECSS_EXTI_DISABLE_IT() LL_EXTI_DisableIT_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Disable the RCC LSE CSS Extended Interrupt C2 Line. + * @retval None + */ +#define __HAL_C2_RCC_LSECSS_EXTI_DISABLE_IT() LL_C2_EXTI_DisableIT_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Enable the RCC LSE CSS Event C1 Line. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_ENABLE_EVENT() LL_EXTI_EnableEvent_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Enable the RCC LSE CSS Event C2 Line. + * @retval None. + */ +#define __HAL_C2_RCC_LSECSS_EXTI_ENABLE_EVENT() LL_C2_EXTI_EnableEvent_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Disable the RCC LSE CSS Event C1 Line. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_DISABLE_EVENT() LL_EXTI_DisableEvent_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Disable the RCC LSE CSS Event C2 Line. + * @retval None. + */ +#define __HAL_C2_RCC_LSECSS_EXTI_DISABLE_EVENT() LL_C2_EXTI_DisableEvent_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Enable the RCC LSE CSS Extended Interrupt Falling Trigger. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_ENABLE_FALLING_EDGE() LL_EXTI_EnableFallingTrig_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Disable the RCC LSE CSS Extended Interrupt Falling Trigger. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_DISABLE_FALLING_EDGE() LL_EXTI_DisableFallingTrig_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Enable the RCC LSE CSS Extended Interrupt Rising Trigger. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_ENABLE_RISING_EDGE() LL_EXTI_EnableRisingTrig_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Disable the RCC LSE CSS Extended Interrupt Rising Trigger. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_DISABLE_RISING_EDGE() LL_EXTI_DisableRisingTrig_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Enable the RCC LSE CSS Extended Interrupt Rising & Falling Trigger. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_ENABLE_RISING_FALLING_EDGE() \ + do { \ + __HAL_RCC_LSECSS_EXTI_ENABLE_RISING_EDGE(); \ + __HAL_RCC_LSECSS_EXTI_ENABLE_FALLING_EDGE(); \ + } while(0) + +/** + * @brief Disable the RCC LSE CSS Extended Interrupt Rising & Falling Trigger. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_DISABLE_RISING_FALLING_EDGE() \ + do { \ + __HAL_RCC_LSECSS_EXTI_DISABLE_RISING_EDGE(); \ + __HAL_RCC_LSECSS_EXTI_DISABLE_FALLING_EDGE(); \ + } while(0) + +/** + * @brief Check whether the specified RCC LSE CSS EXTI interrupt flag is set or not. + * @retval EXTI RCC LSE CSS Line Status. + */ +#define __HAL_RCC_LSECSS_EXTI_GET_FLAG() LL_EXTI_IsActiveFlag_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Clear the RCC LSE CSS EXTI flag. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_CLEAR_FLAG() LL_EXTI_ClearFlag_0_31(RCC_EXTI_LINE_LSECSS) + +/** + * @brief Generate a Software interrupt on the RCC LSE CSS EXTI line. + * @retval None. + */ +#define __HAL_RCC_LSECSS_EXTI_GENERATE_SWIT() LL_EXTI_GenerateSWI_0_31(RCC_EXTI_LINE_LSECSS) + +#if defined(CRS) +/** + * @brief Enable the specified CRS interrupts. + * @param __INTERRUPT__ specifies the CRS interrupt sources to be enabled. + * This parameter can be any combination of the following values: + * @arg @ref RCC_CRS_IT_SYNCOK SYNC event OK interrupt + * @arg @ref RCC_CRS_IT_SYNCWARN SYNC warning interrupt + * @arg @ref RCC_CRS_IT_ERR Synchronization or trimming error interrupt + * @arg @ref RCC_CRS_IT_ESYNC Expected SYNC interrupt + * @retval None + */ +#define __HAL_RCC_CRS_ENABLE_IT(__INTERRUPT__) SET_BIT(CRS->CR, (__INTERRUPT__)) + +/** + * @brief Disable the specified CRS interrupts. + * @param __INTERRUPT__ specifies the CRS interrupt sources to be disabled. + * This parameter can be any combination of the following values: + * @arg @ref RCC_CRS_IT_SYNCOK SYNC event OK interrupt + * @arg @ref RCC_CRS_IT_SYNCWARN SYNC warning interrupt + * @arg @ref RCC_CRS_IT_ERR Synchronization or trimming error interrupt + * @arg @ref RCC_CRS_IT_ESYNC Expected SYNC interrupt + * @retval None + */ +#define __HAL_RCC_CRS_DISABLE_IT(__INTERRUPT__) CLEAR_BIT(CRS->CR, (__INTERRUPT__)) + +/** @brief Check whether the CRS interrupt has occurred or not. + * @param __INTERRUPT__ specifies the CRS interrupt source to check. + * This parameter can be one of the following values: + * @arg @ref RCC_CRS_IT_SYNCOK SYNC event OK interrupt + * @arg @ref RCC_CRS_IT_SYNCWARN SYNC warning interrupt + * @arg @ref RCC_CRS_IT_ERR Synchronization or trimming error interrupt + * @arg @ref RCC_CRS_IT_ESYNC Expected SYNC interrupt + * @retval The new state of __INTERRUPT__ (SET or RESET). + */ +#define __HAL_RCC_CRS_GET_IT_SOURCE(__INTERRUPT__) ((READ_BIT(CRS->CR, (__INTERRUPT__)) != RESET) ? SET : RESET) + +/** @brief Clear the CRS interrupt pending bits + * @param __INTERRUPT__ specifies the interrupt pending bit to clear. + * This parameter can be any combination of the following values: + * @arg @ref RCC_CRS_IT_SYNCOK SYNC event OK interrupt + * @arg @ref RCC_CRS_IT_SYNCWARN SYNC warning interrupt + * @arg @ref RCC_CRS_IT_ERR Synchronization or trimming error interrupt + * @arg @ref RCC_CRS_IT_ESYNC Expected SYNC interrupt + * @arg @ref RCC_CRS_IT_TRIMOVF Trimming overflow or underflow interrupt + * @arg @ref RCC_CRS_IT_SYNCERR SYNC error interrupt + * @arg @ref RCC_CRS_IT_SYNCMISS SYNC missed interrupt + */ +#define __HAL_RCC_CRS_CLEAR_IT(__INTERRUPT__) do { \ + if(((__INTERRUPT__) & RCC_CRS_IT_ERROR_MASK) != RESET) \ + { \ + WRITE_REG(CRS->ICR, CRS_ICR_ERRC | ((__INTERRUPT__) & ~RCC_CRS_IT_ERROR_MASK)); \ + } \ + else \ + { \ + WRITE_REG(CRS->ICR, (__INTERRUPT__)); \ + } \ + } while(0) + +/** + * @brief Check whether the specified CRS flag is set or not. + * @param __FLAG__ specifies the flag to check. + * This parameter can be one of the following values: + * @arg @ref RCC_CRS_FLAG_SYNCOK SYNC event OK + * @arg @ref RCC_CRS_FLAG_SYNCWARN SYNC warning + * @arg @ref RCC_CRS_FLAG_ERR Error + * @arg @ref RCC_CRS_FLAG_ESYNC Expected SYNC + * @arg @ref RCC_CRS_FLAG_TRIMOVF Trimming overflow or underflow + * @arg @ref RCC_CRS_FLAG_SYNCERR SYNC error + * @arg @ref RCC_CRS_FLAG_SYNCMISS SYNC missed + * @retval The new state of _FLAG_ (TRUE or FALSE). + */ +#define __HAL_RCC_CRS_GET_FLAG(__FLAG__) (READ_BIT(CRS->ISR, (__FLAG__)) == (__FLAG__)) + +/** + * @brief Clear the CRS specified FLAG. + * @param __FLAG__ specifies the flag to clear. + * This parameter can be one of the following values: + * @arg @ref RCC_CRS_FLAG_SYNCOK SYNC event OK + * @arg @ref RCC_CRS_FLAG_SYNCWARN SYNC warning + * @arg @ref RCC_CRS_FLAG_ERR Error + * @arg @ref RCC_CRS_FLAG_ESYNC Expected SYNC + * @arg @ref RCC_CRS_FLAG_TRIMOVF Trimming overflow or underflow + * @arg @ref RCC_CRS_FLAG_SYNCERR SYNC error + * @arg @ref RCC_CRS_FLAG_SYNCMISS SYNC missed + * @note RCC_CRS_FLAG_ERR clears RCC_CRS_FLAG_TRIMOVF, RCC_CRS_FLAG_SYNCERR, RCC_CRS_FLAG_SYNCMISS and consequently RCC_CRS_FLAG_ERR + * @retval None + */ +#define __HAL_RCC_CRS_CLEAR_FLAG(__FLAG__) do { \ + if(((__FLAG__) & RCC_CRS_FLAG_ERROR_MASK) != 0U) \ + { \ + WRITE_REG(CRS->ICR, CRS_ICR_ERRC | ((__FLAG__) & ~RCC_CRS_FLAG_ERROR_MASK)); \ + } \ + else \ + { \ + WRITE_REG(CRS->ICR, (__FLAG__)); \ + } \ + } while(0) +#endif /* CRS */ +/** + * @} + */ + + +#if defined(CRS) +/** @defgroup RCCEx_CRS_Extended_Features RCCEx CRS Extended Features + * @{ + */ +/** + * @brief Enable the oscillator clock for frequency error counter. + * @note when the CEN bit is set the CRS_CFGR register becomes write-protected. + * @retval None + */ +#define __HAL_RCC_CRS_FREQ_ERROR_COUNTER_ENABLE() LL_CRS_EnableFreqErrorCounter() + +/** + * @brief Disable the oscillator clock for frequency error counter. + * @retval None + */ +#define __HAL_RCC_CRS_FREQ_ERROR_COUNTER_DISABLE() LL_CRS_DisableFreqErrorCounter() + +/** + * @brief Enable the automatic hardware adjustment of TRIM bits. + * @note When the AUTOTRIMEN bit is set the CRS_CFGR register becomes write-protected. + * @retval None + */ +#define __HAL_RCC_CRS_AUTOMATIC_CALIB_ENABLE() LL_CRS_EnableAutoTrimming() + +/** + * @brief Enable or disable the automatic hardware adjustment of TRIM bits. + * @retval None + */ +#define __HAL_RCC_CRS_AUTOMATIC_CALIB_DISABLE() LL_CRS_DisableAutoTrimming() + +/** + * @brief Macro to calculate reload value to be set in CRS register according to target and sync frequencies + * @note The RELOAD value should be selected according to the ratio between the target frequency and the frequency + * of the synchronization source after prescaling. It is then decreased by one in order to + * reach the expected synchronization on the zero value. The formula is the following: + * RELOAD = (fTARGET / fSYNC) -1 + * @param __FTARGET__ Target frequency (value in Hz) + * @param __FSYNC__ Synchronization signal frequency (value in Hz) + * @retval None + */ +#define __HAL_RCC_CRS_RELOADVALUE_CALCULATE(__FTARGET__, __FSYNC__) __LL_CRS_CALC_CALCULATE_RELOADVALUE((__FTARGET__),(__FSYNC__)) + +/** + * @} + */ +#endif /* CRS */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup RCCEx_Exported_Functions + * @{ + */ + +/** @addtogroup RCCEx_Exported_Functions_Group1 + * @{ + */ + +HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit); +void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit); +uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk); +uint32_t HAL_RCCEx_GetRngCLKSource(void); + +/** + * @} + */ + +/** @addtogroup RCCEx_Exported_Functions_Group2 + * @{ + */ + +#if defined(SAI1) +HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI1(RCC_PLLSAI1InitTypeDef *PLLSAI1Init); +HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI1(void); +#endif /* SAI1 */ + +void HAL_RCCEx_WakeUpStopCLKConfig(uint32_t WakeUpClk); + +void HAL_RCCEx_EnableLSECSS(void); +void HAL_RCCEx_DisableLSECSS(void); +void HAL_RCCEx_EnableLSECSS_IT(void); +void HAL_RCCEx_LSECSS_IRQHandler(void); +void HAL_RCCEx_LSECSS_Callback(void); + +void HAL_RCCEx_LSCOConfig(uint32_t RCC_LSCOx, uint32_t RCC_LSCOSource); +void HAL_RCCEx_EnableLSCO(uint32_t LSCOSource); +void HAL_RCCEx_DisableLSCO(void); + +void HAL_RCCEx_EnableMSIPLLMode(void); +void HAL_RCCEx_DisableMSIPLLMode(void); + +HAL_StatusTypeDef HAL_RCCEx_TrimOsc(uint32_t OscillatorType); + +/** + * @} + */ + + +#if defined(CRS) + +/** @addtogroup RCCEx_Exported_Functions_Group3 + * @{ + */ + +void HAL_RCCEx_CRSConfig(RCC_CRSInitTypeDef *pInit); +void HAL_RCCEx_CRSSoftwareSynchronizationGenerate(void); +void HAL_RCCEx_CRSGetSynchronizationInfo(RCC_CRSSynchroInfoTypeDef *pSynchroInfo); +uint32_t HAL_RCCEx_CRSWaitSynchronization(uint32_t Timeout); +void HAL_RCCEx_CRS_IRQHandler(void); +void HAL_RCCEx_CRS_SyncOkCallback(void); +void HAL_RCCEx_CRS_SyncWarnCallback(void); +void HAL_RCCEx_CRS_ExpectedSyncCallback(void); +void HAL_RCCEx_CRS_ErrorCallback(uint32_t Error); + +/** + * @} + */ + +#endif /* CRS */ +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_RCC_EX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h new file mode 100644 index 0000000..f0a2ae9 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc.h @@ -0,0 +1,954 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_rtc.h + * @author MCD Application Team + * @brief Header file of RTC HAL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_RTC_H +#define STM32WBxx_HAL_RTC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup RTC + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ + +/** @defgroup RTC_Exported_Types RTC Exported Types + * @{ + */ + +/** + * @brief HAL State structures definition + */ +typedef enum +{ + HAL_RTC_STATE_RESET = 0x00U, /*!< RTC not yet initialized or disabled */ + HAL_RTC_STATE_READY = 0x01U, /*!< RTC initialized and ready for use */ + HAL_RTC_STATE_BUSY = 0x02U, /*!< RTC process is ongoing */ + HAL_RTC_STATE_TIMEOUT = 0x03U, /*!< RTC timeout state */ + HAL_RTC_STATE_ERROR = 0x04U /*!< RTC error state */ +} HAL_RTCStateTypeDef; + +/** + * @brief RTC Configuration Structure definition + */ +typedef struct +{ + uint32_t HourFormat; /*!< Specifies the RTC Hour Format. + This parameter can be a value of @ref RTC_Hour_Formats */ + + uint32_t AsynchPrediv; /*!< Specifies the RTC Asynchronous Predivider value. + This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F */ + + uint32_t SynchPrediv; /*!< Specifies the RTC Synchronous Predivider value. + This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x7FFF */ + + uint32_t OutPut; /*!< Specifies which signal will be routed to the RTC output. + This parameter can be a value of @ref RTC_Output_selection_Definitions */ + + uint32_t OutPutRemap; /*!< Specifies the remap for RTC output. + This parameter can be a value of @ref RTC_Output_ALARM_OUT_Remap */ + + uint32_t OutPutPolarity; /*!< Specifies the polarity of the output signal. + This parameter can be a value of @ref RTC_Output_Polarity_Definitions */ + + uint32_t OutPutType; /*!< Specifies the RTC Output Pin mode. + This parameter can be a value of @ref RTC_Output_Type_ALARM_OUT */ +} RTC_InitTypeDef; + +/** + * @brief RTC Time structure definition + */ +typedef struct +{ + uint8_t Hours; /*!< Specifies the RTC Time Hour. + This parameter must be a number between Min_Data = 0 and Max_Data = 12 if the RTC_HourFormat_12 is selected + This parameter must be a number between Min_Data = 0 and Max_Data = 23 if the RTC_HourFormat_24 is selected */ + + uint8_t Minutes; /*!< Specifies the RTC Time Minutes. + This parameter must be a number between Min_Data = 0 and Max_Data = 59 */ + + uint8_t Seconds; /*!< Specifies the RTC Time Seconds. + This parameter must be a number between Min_Data = 0 and Max_Data = 59 */ + + uint8_t TimeFormat; /*!< Specifies the RTC AM/PM Time. + This parameter can be a value of @ref RTC_AM_PM_Definitions */ + + uint32_t SubSeconds; /*!< Specifies the RTC_SSR RTC Sub Second register content. + This parameter corresponds to a time unit range between [0-1] Second + with [1 Sec / SecondFraction +1] granularity */ + + uint32_t SecondFraction; /*!< Specifies the range or granularity of Sub Second register content + corresponding to Synchronous prescaler factor value (PREDIV_S) + This parameter corresponds to a time unit range between [0-1] Second + with [1 Sec / SecondFraction +1] granularity. + This field will be used only by HAL_RTC_GetTime function */ + + uint32_t DayLightSaving; /*!< This interface is deprecated. To manage Daylight + Saving Time, please use HAL_RTC_DST_xxx functions */ + + uint32_t StoreOperation; /*!< This interface is deprecated. To manage Daylight + Saving Time, please use HAL_RTC_DST_xxx functions */ +} RTC_TimeTypeDef; + +/** + * @brief RTC Date structure definition + */ +typedef struct +{ + uint8_t WeekDay; /*!< Specifies the RTC Date WeekDay. + This parameter can be a value of @ref RTC_WeekDay_Definitions */ + + uint8_t Month; /*!< Specifies the RTC Date Month (in BCD format). + This parameter can be a value of @ref RTC_Month_Date_Definitions */ + + uint8_t Date; /*!< Specifies the RTC Date. + This parameter must be a number between Min_Data = 1 and Max_Data = 31 */ + + uint8_t Year; /*!< Specifies the RTC Date Year. + This parameter must be a number between Min_Data = 0 and Max_Data = 99 */ + +} RTC_DateTypeDef; + +/** + * @brief RTC Alarm structure definition + */ +typedef struct +{ + RTC_TimeTypeDef AlarmTime; /*!< Specifies the RTC Alarm Time members */ + + uint32_t AlarmMask; /*!< Specifies the RTC Alarm Masks. + This parameter can be a value of @ref RTC_AlarmMask_Definitions */ + + uint32_t AlarmSubSecondMask; /*!< Specifies the RTC Alarm SubSeconds Masks. + This parameter can be a value of @ref RTC_Alarm_Sub_Seconds_Masks_Definitions */ + + uint32_t AlarmDateWeekDaySel; /*!< Specifies the RTC Alarm is on Date or WeekDay. + This parameter can be a value of @ref RTC_AlarmDateWeekDay_Definitions */ + + uint8_t AlarmDateWeekDay; /*!< Specifies the RTC Alarm Date/WeekDay. + If the Alarm Date is selected, this parameter must be set to a value in the 1-31 range. + If the Alarm WeekDay is selected, this parameter can be a value of @ref RTC_WeekDay_Definitions */ + + uint32_t Alarm; /*!< Specifies the alarm . + This parameter can be a value of @ref RTC_Alarms_Definitions */ +} RTC_AlarmTypeDef; + +/** + * @brief RTC Handle Structure definition + */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) +typedef struct __RTC_HandleTypeDef +#else +typedef struct +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ +{ + RTC_TypeDef *Instance; /*!< Register base address */ + + RTC_InitTypeDef Init; /*!< RTC required parameters */ + + HAL_LockTypeDef Lock; /*!< RTC locking object */ + + __IO HAL_RTCStateTypeDef State; /*!< Time communication state */ + +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + void (* AlarmAEventCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC Alarm A Event callback */ + + void (* AlarmBEventCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC Alarm B Event callback */ + + void (* TimeStampEventCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC Timestamp Event callback */ + + void (* WakeUpTimerEventCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC WakeUpTimer Event callback */ + +#if defined(RTC_TAMPER1_SUPPORT) + void (* Tamper1EventCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC Tamper 1 Event callback */ +#endif /* RTC_TAMPER1_SUPPORT */ + + void (* Tamper2EventCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC Tamper 2 Event callback */ + +#if defined(RTC_TAMPER3_SUPPORT) + void (* Tamper3EventCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC Tamper 3 Event callback */ +#endif /* RTC_TAMPER3_SUPPORT */ + + void (* MspInitCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC Msp Init callback */ + + void (* MspDeInitCallback) (struct __RTC_HandleTypeDef *hrtc); /*!< RTC Msp DeInit callback */ + +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + +} RTC_HandleTypeDef; + +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) +/** + * @brief HAL RTC Callback ID enumeration definition + */ +typedef enum +{ + HAL_RTC_ALARM_A_EVENT_CB_ID = 0x00U, /*!< RTC Alarm A Event Callback ID */ + HAL_RTC_ALARM_B_EVENT_CB_ID = 0x01U, /*!< RTC Alarm B Event Callback ID */ + HAL_RTC_TIMESTAMP_EVENT_CB_ID = 0x02U, /*!< RTC Timestamp Event Callback ID */ + HAL_RTC_WAKEUPTIMER_EVENT_CB_ID = 0x03U, /*!< RTC Wakeup Timer Event Callback ID */ +#if defined(RTC_TAMPER1_SUPPORT) + HAL_RTC_TAMPER1_EVENT_CB_ID = 0x04U, /*!< RTC Tamper 1 Callback ID */ +#endif /* RTC_TAMPER1_SUPPORT */ + HAL_RTC_TAMPER2_EVENT_CB_ID = 0x05U, /*!< RTC Tamper 2 Callback ID */ +#if defined(RTC_TAMPER3_SUPPORT) + HAL_RTC_TAMPER3_EVENT_CB_ID = 0x06U, /*!< RTC Tamper 3 Callback ID */ +#endif /* RTC_TAMPER3_SUPPORT */ + HAL_RTC_MSPINIT_CB_ID = 0x0EU, /*!< RTC Msp Init callback ID */ + HAL_RTC_MSPDEINIT_CB_ID = 0x0FU /*!< RTC Msp DeInit callback ID */ +} HAL_RTC_CallbackIDTypeDef; + +/** + * @brief HAL RTC Callback pointer definition + */ +typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to an RTC callback function */ +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup RTC_Exported_Constants RTC Exported Constants + * @{ + */ + +/** @defgroup RTC_Hour_Formats RTC Hour Formats + * @{ + */ +#define RTC_HOURFORMAT_24 0x00000000U +#define RTC_HOURFORMAT_12 RTC_CR_FMT +/** + * @} + */ + +/** @defgroup RTC_Output_selection_Definitions RTC Output Selection Definitions + * @{ + */ +#define RTC_OUTPUT_DISABLE 0x00000000U +#define RTC_OUTPUT_ALARMA RTC_CR_OSEL_0 +#define RTC_OUTPUT_ALARMB RTC_CR_OSEL_1 +#define RTC_OUTPUT_WAKEUP RTC_CR_OSEL +/** + * @} + */ + +/** @defgroup RTC_Output_ALARM_OUT_Remap RTC Output ALARM OUT Remap + * @{ + */ +#define RTC_OUTPUT_REMAP_NONE 0x00000000U +#define RTC_OUTPUT_REMAP_POS1 RTC_OR_OUT_RMP +/** + * @} + */ + +/** @defgroup RTC_Output_Polarity_Definitions RTC Output Polarity Definitions + * @{ + */ +#define RTC_OUTPUT_POLARITY_HIGH 0x00000000U +#define RTC_OUTPUT_POLARITY_LOW RTC_CR_POL +/** + * @} + */ + +/** @defgroup RTC_Output_Type_ALARM_OUT RTC Output Type ALARM OUT + * @{ + */ +#define RTC_OUTPUT_TYPE_OPENDRAIN 0x00000000U +#if defined(RTC_OR_ALARMOUTTYPE) +#define RTC_OUTPUT_TYPE_PUSHPULL RTC_OR_ALARMOUTTYPE +#endif /* RTC_OR_ALARMOUTTYPE */ +/** + * @} + */ + +/** @defgroup RTC_AM_PM_Definitions RTC AM PM Definitions + * @{ + */ +#define RTC_HOURFORMAT12_AM ((uint8_t)0x00) +#define RTC_HOURFORMAT12_PM ((uint8_t)0x01) +/** + * @} + */ + +/** @defgroup RTC_DayLightSaving_Definitions RTC DayLight Saving Definitions + * @{ + */ +#define RTC_DAYLIGHTSAVING_SUB1H RTC_CR_SUB1H +#define RTC_DAYLIGHTSAVING_ADD1H RTC_CR_ADD1H +#define RTC_DAYLIGHTSAVING_NONE 0x00000000U +/** + * @} + */ + +/** @defgroup RTC_StoreOperation_Definitions RTC Store Operation Definitions + * @{ + */ +#define RTC_STOREOPERATION_RESET 0x00000000U +#define RTC_STOREOPERATION_SET RTC_CR_BKP +/** + * @} + */ + +/** @defgroup RTC_Input_parameter_format_definitions RTC Input Parameter Format Definitions + * @{ + */ +#define RTC_FORMAT_BIN 0x00000000U +#define RTC_FORMAT_BCD 0x00000001U +/** + * @} + */ + +/** @defgroup RTC_Month_Date_Definitions RTC Month Date Definitions (in BCD format) + * @{ + */ +#define RTC_MONTH_JANUARY ((uint8_t)0x01) +#define RTC_MONTH_FEBRUARY ((uint8_t)0x02) +#define RTC_MONTH_MARCH ((uint8_t)0x03) +#define RTC_MONTH_APRIL ((uint8_t)0x04) +#define RTC_MONTH_MAY ((uint8_t)0x05) +#define RTC_MONTH_JUNE ((uint8_t)0x06) +#define RTC_MONTH_JULY ((uint8_t)0x07) +#define RTC_MONTH_AUGUST ((uint8_t)0x08) +#define RTC_MONTH_SEPTEMBER ((uint8_t)0x09) +#define RTC_MONTH_OCTOBER ((uint8_t)0x10) +#define RTC_MONTH_NOVEMBER ((uint8_t)0x11) +#define RTC_MONTH_DECEMBER ((uint8_t)0x12) +/** + * @} + */ + +/** @defgroup RTC_WeekDay_Definitions RTC WeekDay Definitions + * @{ + */ +#define RTC_WEEKDAY_MONDAY ((uint8_t)0x01) +#define RTC_WEEKDAY_TUESDAY ((uint8_t)0x02) +#define RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03) +#define RTC_WEEKDAY_THURSDAY ((uint8_t)0x04) +#define RTC_WEEKDAY_FRIDAY ((uint8_t)0x05) +#define RTC_WEEKDAY_SATURDAY ((uint8_t)0x06) +#define RTC_WEEKDAY_SUNDAY ((uint8_t)0x07) +/** + * @} + */ + +/** @defgroup RTC_AlarmDateWeekDay_Definitions RTC Alarm Date WeekDay Definitions + * @{ + */ +#define RTC_ALARMDATEWEEKDAYSEL_DATE 0x00000000U +#define RTC_ALARMDATEWEEKDAYSEL_WEEKDAY RTC_ALRMAR_WDSEL +/** + * @} + */ + +/** @defgroup RTC_AlarmMask_Definitions RTC Alarm Mask Definitions + * @{ + */ +#define RTC_ALARMMASK_NONE 0x00000000U +#define RTC_ALARMMASK_DATEWEEKDAY RTC_ALRMAR_MSK4 +#define RTC_ALARMMASK_HOURS RTC_ALRMAR_MSK3 +#define RTC_ALARMMASK_MINUTES RTC_ALRMAR_MSK2 +#define RTC_ALARMMASK_SECONDS RTC_ALRMAR_MSK1 +#define RTC_ALARMMASK_ALL (RTC_ALARMMASK_DATEWEEKDAY | \ + RTC_ALARMMASK_HOURS | \ + RTC_ALARMMASK_MINUTES | \ + RTC_ALARMMASK_SECONDS) +/** + * @} + */ + +/** @defgroup RTC_Alarms_Definitions RTC Alarms Definitions + * @{ + */ +#define RTC_ALARM_A RTC_CR_ALRAE +#define RTC_ALARM_B RTC_CR_ALRBE +/** + * @} + */ + +/** @defgroup RTC_Alarm_Sub_Seconds_Masks_Definitions RTC Alarm Sub Seconds Masks Definitions + * @{ + */ +/*!< All Alarm SS fields are masked. There is no comparison on sub seconds for Alarm */ +#define RTC_ALARMSUBSECONDMASK_ALL 0x00000000U +/*!< SS[14:1] are don't care in Alarm comparison. Only SS[0] is compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_1 RTC_ALRMASSR_MASKSS_0 +/*!< SS[14:2] are don't care in Alarm comparison. Only SS[1:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_2 RTC_ALRMASSR_MASKSS_1 +/*!< SS[14:3] are don't care in Alarm comparison. Only SS[2:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_3 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_1) +/*!< SS[14:4] are don't care in Alarm comparison. Only SS[3:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_4 RTC_ALRMASSR_MASKSS_2 +/*!< SS[14:5] are don't care in Alarm comparison. Only SS[4:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_5 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_2) +/*!< SS[14:6] are don't care in Alarm comparison. Only SS[5:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_6 (RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_2) +/*!< SS[14:7] are don't care in Alarm comparison. Only SS[6:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_7 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_2) +/*!< SS[14:8] are don't care in Alarm comparison. Only SS[7:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_8 RTC_ALRMASSR_MASKSS_3 +/*!< SS[14:9] are don't care in Alarm comparison. Only SS[8:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_9 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_3) +/*!< SS[14:10] are don't care in Alarm comparison. Only SS[9:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_10 (RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_3) +/*!< SS[14:11] are don't care in Alarm comparison. Only SS[10:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_11 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_3) +/*!< SS[14:12] are don't care in Alarm comparison. Only SS[11:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_12 (RTC_ALRMASSR_MASKSS_2 | RTC_ALRMASSR_MASKSS_3) +/*!< SS[14:13] are don't care in Alarm comparison. Only SS[12:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14_13 (RTC_ALRMASSR_MASKSS_0 | RTC_ALRMASSR_MASKSS_2 | RTC_ALRMASSR_MASKSS_3) +/*!< SS[14] is don't care in Alarm comparison. Only SS[13:0] are compared. */ +#define RTC_ALARMSUBSECONDMASK_SS14 (RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_2 | RTC_ALRMASSR_MASKSS_3) +/*!< SS[14:0] are compared and must match to activate alarm. */ +#define RTC_ALARMSUBSECONDMASK_NONE RTC_ALRMASSR_MASKSS +/** + * @} + */ + +/** @defgroup RTC_Interrupts_Definitions RTC Interrupts Definitions + * @{ + */ +#define RTC_IT_TS RTC_CR_TSIE /*!< Enable Timestamp Interrupt */ +#define RTC_IT_WUT RTC_CR_WUTIE /*!< Enable Wakeup timer Interrupt */ +#define RTC_IT_ALRB RTC_CR_ALRBIE /*!< Enable Alarm B Interrupt */ +#define RTC_IT_ALRA RTC_CR_ALRAIE /*!< Enable Alarm A Interrupt */ +/** + * @} + */ + +/** @defgroup RTC_Flags_Definitions RTC Flags Definitions + * @{ + */ +#define RTC_FLAG_RECALPF RTC_ISR_RECALPF /*!< Recalibration pending flag */ +#if defined(RTC_TAMPER3_SUPPORT) +#define RTC_FLAG_TAMP3F RTC_ISR_TAMP3F /*!< Tamper 3 event flag */ +#endif /* RTC_TAMPER3_SUPPORT */ +#define RTC_FLAG_TAMP2F RTC_ISR_TAMP2F /*!< Tamper 2 event flag */ +#if defined(RTC_TAMPER1_SUPPORT) +#define RTC_FLAG_TAMP1F RTC_ISR_TAMP1F /*!< Tamper 1 event flag */ +#endif /* RTC_TAMPER1_SUPPORT */ +#define RTC_FLAG_TSOVF RTC_ISR_TSOVF /*!< Timestamp overflow flag */ +#define RTC_FLAG_TSF RTC_ISR_TSF /*!< Timestamp event flag */ +#define RTC_FLAG_ITSF RTC_ISR_ITSF /*!< Internal Timestamp event flag */ +#define RTC_FLAG_WUTF RTC_ISR_WUTF /*!< Wakeup timer event flag */ +#define RTC_FLAG_ALRBF RTC_ISR_ALRBF /*!< Alarm B event flag */ +#define RTC_FLAG_ALRAF RTC_ISR_ALRAF /*!< Alarm A event flag */ +#define RTC_FLAG_INITF RTC_ISR_INITF /*!< RTC in initialization mode flag */ +#define RTC_FLAG_RSF RTC_ISR_RSF /*!< Register synchronization flag */ +#define RTC_FLAG_INITS RTC_ISR_INITS /*!< RTC initialization status flag */ +#define RTC_FLAG_SHPF RTC_ISR_SHPF /*!< Shift operation pending flag */ +#define RTC_FLAG_WUTWF RTC_ISR_WUTWF /*!< WUTR register write allowance flag */ +#define RTC_FLAG_ALRBWF RTC_ISR_ALRBWF /*!< ALRMBR register write allowance flag */ +#define RTC_FLAG_ALRAWF RTC_ISR_ALRAWF /*!< ALRMAR register write allowance flag */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ + +/** @defgroup RTC_Exported_Macros RTC Exported Macros + * @{ + */ + +/** @brief Reset RTC handle state + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) +#define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__) do { \ + (__HANDLE__)->State = HAL_RTC_STATE_RESET; \ + (__HANDLE__)->MspInitCallback = NULL; \ + (__HANDLE__)->MspDeInitCallback = NULL; \ + } while(0U) +#else +#define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_RTC_STATE_RESET) +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + +/** + * @brief Disable the write protection for RTC registers. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__) do { \ + (__HANDLE__)->Instance->WPR = 0xCAU; \ + (__HANDLE__)->Instance->WPR = 0x53U; \ + } while(0U) + +/** + * @brief Enable the write protection for RTC registers. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__) do { \ + (__HANDLE__)->Instance->WPR = 0xFFU; \ + } while(0U) + +/** + * @brief Check whether the RTC Calendar is initialized. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_IS_CALENDAR_INITIALIZED(__HANDLE__) (((((__HANDLE__)->Instance->ISR) & (RTC_FLAG_INITS)) == RTC_FLAG_INITS) ? 1U : 0U) + +/** + * @brief Enable the RTC ALARMA peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_ALARMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE)) + +/** + * @brief Disable the RTC ALARMA peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_ALARMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE)) + +/** + * @brief Enable the RTC ALARMB peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_ALARMB_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRBE)) + +/** + * @brief Disable the RTC ALARMB peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_ALARMB_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRBE)) + +/** + * @brief Enable the RTC Alarm interrupt. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Alarm interrupt sources to be enabled or disabled. + * This parameter can be any combination of the following values: + * @arg RTC_IT_ALRA: Alarm A interrupt + * @arg RTC_IT_ALRB: Alarm B interrupt + * @retval None + */ +#define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__)) + +/** + * @brief Disable the RTC Alarm interrupt. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Alarm interrupt sources to be enabled or disabled. + * This parameter can be any combination of the following values: + * @arg RTC_IT_ALRA: Alarm A interrupt + * @arg RTC_IT_ALRB: Alarm B interrupt + * @retval None + */ +#define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__)) + +/** + * @brief Check whether the specified RTC Alarm interrupt has occurred or not. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Alarm interrupt to check. + * This parameter can be: + * @arg RTC_IT_ALRA: Alarm A interrupt + * @arg RTC_IT_ALRB: Alarm B interrupt + * @retval None + */ +#define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__) >> 4U)) != 0U) ? 1U : 0U) + +/** + * @brief Get the selected RTC Alarm's flag status. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Alarm Flag to check. + * This parameter can be: + * @arg RTC_FLAG_ALRAF: Alarm A interrupt flag + * @arg RTC_FLAG_ALRAWF: Alarm A 'write allowed' flag + * @arg RTC_FLAG_ALRBF: Alarm B interrupt flag + * @arg RTC_FLAG_ALRBWF: Alarm B 'write allowed' flag + * @retval None + */ +#define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U) ? 1U : 0U) + +/** + * @brief Clear the RTC Alarm's pending flags. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Alarm flag to be cleared. + * This parameter can be: + * @arg RTC_FLAG_ALRAF + * @arg RTC_FLAG_ALRBF + * @retval None + */ +#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) + +/** + * @brief Check whether the specified RTC Alarm interrupt has been enabled or not. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Alarm interrupt sources to check. + * This parameter can be: + * @arg RTC_IT_ALRA: Alarm A interrupt + * @arg RTC_IT_ALRB: Alarm B interrupt + * @retval None + */ +#define __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != 0U) ? 1U : 0U) + +/** + * @brief Enable interrupt on the RTC Alarm associated EXTI line. + * @retval None + */ +#define __HAL_RTC_ALARM_EXTI_ENABLE_IT() (EXTI->IMR1 |= RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Disable interrupt on the RTC Alarm associated EXTI line. + * @retval None + */ +#define __HAL_RTC_ALARM_EXTI_DISABLE_IT() (EXTI->IMR1 &= ~RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Enable event on the RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_ENABLE_EVENT() (EXTI->EMR1 |= RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Disable event on the RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT() (EXTI->EMR1 &= ~RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Enable falling edge trigger on the RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR1 |= RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Disable falling edge trigger on the RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR1 &= ~RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Enable rising edge trigger on the RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR1 |= RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Disable rising edge trigger on the RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR1 &= ~RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Enable rising & falling edge trigger on the RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE() do { \ + __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE(); \ + __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE(); \ + } while(0U) + +/** + * @brief Disable rising & falling edge trigger on the RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE() do { \ + __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE(); \ + __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE(); \ + } while(0U) + +/** + * @brief Check whether the RTC Alarm associated EXTI line interrupt flag is set or not. + * @retval Line Status. + */ +#define __HAL_RTC_ALARM_EXTI_GET_FLAG() (EXTI->PR1 & RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Clear the RTC Alarm associated EXTI line flag. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_CLEAR_FLAG() (EXTI->PR1 = RTC_EXTI_LINE_ALARM_EVENT) + +/** + * @brief Generate a Software interrupt on RTC Alarm associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_ALARM_EXTI_GENERATE_SWIT() (EXTI->SWIER1 |= RTC_EXTI_LINE_ALARM_EVENT) +/** + * @} + */ + +/* Include RTC HAL Extended module */ +#include "stm32wbxx_hal_rtc_ex.h" + +/* Exported functions --------------------------------------------------------*/ + +/** @addtogroup RTC_Exported_Functions + * @{ + */ + +/** @addtogroup RTC_Exported_Functions_Group1 + * @{ + */ +/* Initialization and de-initialization functions ****************************/ +HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc); +void HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc); +void HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc); + +/* Callbacks Register/UnRegister functions ***********************************/ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) +HAL_StatusTypeDef HAL_RTC_RegisterCallback(RTC_HandleTypeDef *hrtc, HAL_RTC_CallbackIDTypeDef CallbackID, pRTC_CallbackTypeDef pCallback); +HAL_StatusTypeDef HAL_RTC_UnRegisterCallback(RTC_HandleTypeDef *hrtc, HAL_RTC_CallbackIDTypeDef CallbackID); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ +/** + * @} + */ + +/** @addtogroup RTC_Exported_Functions_Group2 + * @{ + */ +/* RTC Time and Date functions ************************************************/ +HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format); +HAL_StatusTypeDef HAL_RTC_GetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format); +HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format); +HAL_StatusTypeDef HAL_RTC_GetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format); +/** + * @} + */ + +/** @addtogroup RTC_Exported_Functions_Group3 + * @{ + */ +/* RTC Alarm functions ********************************************************/ +HAL_StatusTypeDef HAL_RTC_SetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format); +HAL_StatusTypeDef HAL_RTC_SetAlarm_IT(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format); +HAL_StatusTypeDef HAL_RTC_DeactivateAlarm(RTC_HandleTypeDef *hrtc, uint32_t Alarm); +HAL_StatusTypeDef HAL_RTC_GetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format); +void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTC_PollForAlarmAEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout); +void HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc); +/** + * @} + */ + +/** @addtogroup RTC_Exported_Functions_Group4 + * @{ + */ +/* Peripheral Control functions ***********************************************/ +HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef *hrtc); + +/* RTC Daylight Saving Time functions *****************************************/ +void HAL_RTC_DST_Add1Hour(RTC_HandleTypeDef *hrtc); +void HAL_RTC_DST_Sub1Hour(RTC_HandleTypeDef *hrtc); +void HAL_RTC_DST_SetStoreOperation(RTC_HandleTypeDef *hrtc); +void HAL_RTC_DST_ClearStoreOperation(RTC_HandleTypeDef *hrtc); +uint32_t HAL_RTC_DST_ReadStoreOperation(RTC_HandleTypeDef *hrtc); +/** + * @} + */ + +/** @addtogroup RTC_Exported_Functions_Group5 + * @{ + */ +/* Peripheral State functions *************************************************/ +HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc); +/** + * @} + */ + +/** + * @} + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ + +/** @defgroup RTC_Private_Constants RTC Private Constants + * @{ + */ +/* Masks Definition */ +#define RTC_TR_RESERVED_MASK ((uint32_t)(RTC_TR_HT | RTC_TR_HU | \ + RTC_TR_MNT | RTC_TR_MNU | \ + RTC_TR_ST | RTC_TR_SU | \ + RTC_TR_PM)) +#define RTC_DR_RESERVED_MASK ((uint32_t)(RTC_DR_YT | RTC_DR_YU | \ + RTC_DR_MT | RTC_DR_MU | \ + RTC_DR_DT | RTC_DR_DU | \ + RTC_DR_WDU)) +#define RTC_ISR_RESERVED_MASK ((uint32_t)(RTC_FLAGS_MASK | RTC_ISR_INIT)) +#define RTC_INIT_MASK 0xFFFFFFFFU +#define RTC_RSF_MASK ((uint32_t)~(RTC_ISR_INIT | RTC_ISR_RSF)) +#define RTC_FLAGS_MASK ((uint32_t)(RTC_FLAG_INITF | RTC_FLAG_INITS | \ + RTC_FLAG_ALRAF | RTC_FLAG_ALRAWF | \ + RTC_FLAG_ALRBF | RTC_FLAG_ALRBWF | \ + RTC_FLAG_WUTF | RTC_FLAG_WUTWF | \ + RTC_FLAG_RECALPF | RTC_FLAG_SHPF | \ + RTC_FLAG_TSF | RTC_FLAG_TSOVF | \ + RTC_FLAG_RSF | RTC_TAMPER_FLAGS_MASK)) + +#define RTC_TIMEOUT_VALUE 1000U + +#define RTC_EXTI_LINE_ALARM_EVENT EXTI_IMR1_IM17 /*!< External interrupt line 17 connected to the RTC Alarm event */ +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ + +/** @defgroup RTC_Private_Macros RTC Private Macros + * @{ + */ + +/** @defgroup RTC_IS_RTC_Definitions RTC Private macros to check input parameters + * @{ + */ +#define IS_RTC_HOUR_FORMAT(FORMAT) (((FORMAT) == RTC_HOURFORMAT_12) || \ + ((FORMAT) == RTC_HOURFORMAT_24)) + +#define IS_RTC_OUTPUT(OUTPUT) (((OUTPUT) == RTC_OUTPUT_DISABLE) || \ + ((OUTPUT) == RTC_OUTPUT_ALARMA) || \ + ((OUTPUT) == RTC_OUTPUT_ALARMB) || \ + ((OUTPUT) == RTC_OUTPUT_WAKEUP)) + +#define IS_RTC_OUTPUT_REMAP(REMAP) (((REMAP) == RTC_OUTPUT_REMAP_NONE) || \ + ((REMAP) == RTC_OUTPUT_REMAP_POS1)) + +#define IS_RTC_OUTPUT_POL(POL) (((POL) == RTC_OUTPUT_POLARITY_HIGH) || \ + ((POL) == RTC_OUTPUT_POLARITY_LOW)) + +#if defined(RTC_OR_ALARMOUTTYPE) +#define IS_RTC_OUTPUT_TYPE(TYPE) (((TYPE) == RTC_OUTPUT_TYPE_OPENDRAIN) || \ + ((TYPE) == RTC_OUTPUT_TYPE_PUSHPULL)) +#else /* RTC_OR_ALARMOUTTYPE */ +#define IS_RTC_OUTPUT_TYPE(TYPE) ((TYPE) == RTC_OUTPUT_TYPE_OPENDRAIN) +#endif /* RTC_OR_ALARMOUTTYPE */ + +#define IS_RTC_ASYNCH_PREDIV(PREDIV) ((PREDIV) <= 0x7FU) +#define IS_RTC_SYNCH_PREDIV(PREDIV) ((PREDIV) <= 0x7FFFU) + +#define IS_RTC_HOUR12(HOUR) (((HOUR) > 0U) && ((HOUR) <= 12U)) +#define IS_RTC_HOUR24(HOUR) ((HOUR) <= 23U) +#define IS_RTC_MINUTES(MINUTES) ((MINUTES) <= 59U) +#define IS_RTC_SECONDS(SECONDS) ((SECONDS) <= 59U) + +#define IS_RTC_HOURFORMAT12(PM) (((PM) == RTC_HOURFORMAT12_AM) || \ + ((PM) == RTC_HOURFORMAT12_PM)) + +#define IS_RTC_DAYLIGHT_SAVING(SAVE) (((SAVE) == RTC_DAYLIGHTSAVING_SUB1H) || \ + ((SAVE) == RTC_DAYLIGHTSAVING_ADD1H) || \ + ((SAVE) == RTC_DAYLIGHTSAVING_NONE)) + +#define IS_RTC_STORE_OPERATION(OPERATION) (((OPERATION) == RTC_STOREOPERATION_RESET) || \ + ((OPERATION) == RTC_STOREOPERATION_SET)) + +#define IS_RTC_FORMAT(FORMAT) (((FORMAT) == RTC_FORMAT_BIN) || ((FORMAT) == RTC_FORMAT_BCD)) + +#define IS_RTC_YEAR(YEAR) ((YEAR) <= 99U) +#define IS_RTC_MONTH(MONTH) (((MONTH) >= 1U) && ((MONTH) <= 12U)) +#define IS_RTC_DATE(DATE) (((DATE) >= 1U) && ((DATE) <= 31U)) + +#define IS_RTC_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_WEEKDAY_MONDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_TUESDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_WEDNESDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_THURSDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_FRIDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_SATURDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_SUNDAY)) + +#define IS_RTC_ALARM_DATE_WEEKDAY_DATE(DATE) (((DATE) > 0U) && ((DATE) <= 31U)) + +#define IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(WEEKDAY) (((WEEKDAY) == RTC_WEEKDAY_MONDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_TUESDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_WEDNESDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_THURSDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_FRIDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_SATURDAY) || \ + ((WEEKDAY) == RTC_WEEKDAY_SUNDAY)) + +#define IS_RTC_ALARM_DATE_WEEKDAY_SEL(SEL) (((SEL) == RTC_ALARMDATEWEEKDAYSEL_DATE) || \ + ((SEL) == RTC_ALARMDATEWEEKDAYSEL_WEEKDAY)) + +#define IS_RTC_ALARM_MASK(MASK) (((MASK) & ((uint32_t)~RTC_ALARMMASK_ALL)) == 0U) + +#define IS_RTC_ALARM(ALARM) (((ALARM) == RTC_ALARM_A) || ((ALARM) == RTC_ALARM_B)) + +#define IS_RTC_ALARM_SUB_SECOND_VALUE(VALUE) ((VALUE) <= RTC_ALRMASSR_SS) + +#define IS_RTC_ALARM_SUB_SECOND_MASK(MASK) (((MASK) == RTC_ALARMSUBSECONDMASK_ALL) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_1) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_2) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_3) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_4) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_5) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_6) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_7) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_8) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_9) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_10) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_11) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_12) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14_13) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_SS14) || \ + ((MASK) == RTC_ALARMSUBSECONDMASK_NONE)) +/** + * @} + */ + +/** + * @} + */ + +/* Private functions ---------------------------------------------------------*/ + +/** @defgroup RTC_Private_Functions RTC Private Functions + * @{ + */ +HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef RTC_ExitInitMode(RTC_HandleTypeDef *hrtc); +uint8_t RTC_ByteToBcd2(uint8_t number); +uint8_t RTC_Bcd2ToByte(uint8_t number); +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_RTC_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h new file mode 100644 index 0000000..b784892 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_hal_rtc_ex.h @@ -0,0 +1,1180 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_rtc_ex.h + * @author MCD Application Team + * @brief Header file of RTC HAL Extended module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_HAL_RTC_EX_H +#define STM32WBxx_HAL_RTC_EX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +#include "stm32wbxx_hal_def.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup RTCEx + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ + +/** @defgroup RTCEx_Exported_Types RTCEx Exported Types + * @{ + */ + +/** + * @brief RTC Tamper structure definition + */ +typedef struct +{ + uint32_t Tamper; /*!< Specifies the Tamper Pin. + This parameter can be a value of @ref RTCEx_Tamper_Pin_Definitions */ + + uint32_t Interrupt; /*!< Specifies the Tamper Interrupt. + This parameter can be a value of @ref RTCEx_Tamper_Interrupt_Definitions */ + + uint32_t Trigger; /*!< Specifies the Tamper Trigger. + This parameter can be a value of @ref RTCEx_Tamper_Trigger_Definitions */ + + uint32_t NoErase; /*!< Specifies the Tamper no erase mode. + This parameter can be a value of @ref RTCEx_Tamper_EraseBackUp_Definitions */ + + uint32_t MaskFlag; /*!< Specifies the Tamper Flag masking. + This parameter can be a value of @ref RTCEx_Tamper_MaskFlag_Definitions */ + + uint32_t Filter; /*!< Specifies the RTC Filter Tamper. + This parameter can be a value of @ref RTCEx_Tamper_Filter_Definitions */ + + uint32_t SamplingFrequency; /*!< Specifies the sampling frequency. + This parameter can be a value of @ref RTCEx_Tamper_Sampling_Frequencies_Definitions */ + + uint32_t PrechargeDuration; /*!< Specifies the Precharge Duration . + This parameter can be a value of @ref RTCEx_Tamper_Pin_Precharge_Duration_Definitions */ + + uint32_t TamperPullUp; /*!< Specifies the Tamper PullUp . + This parameter can be a value of @ref RTCEx_Tamper_Pull_Up_Definitions */ + + uint32_t TimeStampOnTamperDetection; /*!< Specifies the TimeStampOnTamperDetection. + This parameter can be a value of @ref RTCEx_Tamper_TimeStampOnTamperDetection_Definitions */ +} RTC_TamperTypeDef; +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup RTCEx_Exported_Constants RTCEx Exported Constants + * @{ + */ + +/** @defgroup RTCEx_Backup_Registers_Definitions RTCEx Backup Registers Definitions + * @{ + */ +#define RTC_BKP_DR0 0x00000000U +#define RTC_BKP_DR1 0x00000001U +#define RTC_BKP_DR2 0x00000002U +#define RTC_BKP_DR3 0x00000003U +#define RTC_BKP_DR4 0x00000004U +#define RTC_BKP_DR5 0x00000005U +#define RTC_BKP_DR6 0x00000006U +#define RTC_BKP_DR7 0x00000007U +#define RTC_BKP_DR8 0x00000008U +#define RTC_BKP_DR9 0x00000009U +#define RTC_BKP_DR10 0x0000000AU +#define RTC_BKP_DR11 0x0000000BU +#define RTC_BKP_DR12 0x0000000CU +#define RTC_BKP_DR13 0x0000000DU +#define RTC_BKP_DR14 0x0000000EU +#define RTC_BKP_DR15 0x0000000FU +#define RTC_BKP_DR16 0x00000010U +#define RTC_BKP_DR17 0x00000011U +#define RTC_BKP_DR18 0x00000012U +#define RTC_BKP_DR19 0x00000013U +/** + * @} + */ + +/** @defgroup RTCEx_Timestamp_Edges_Definitions RTCEx Timestamp Edges Definitions + * @{ + */ +#define RTC_TIMESTAMPEDGE_RISING 0x00000000U +#define RTC_TIMESTAMPEDGE_FALLING RTC_CR_TSEDGE +/** + * @} + */ + +/** @defgroup RTCEx_Timestamp_Pin_Selection RTC Timestamp Pin Selection + * @{ + */ +#define RTC_TIMESTAMPPIN_DEFAULT 0x00000000U +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_Pin_Definitions RTCEx Tamper Pins Definitions + * @{ + */ +#if defined(RTC_TAMPER1_SUPPORT) +#define RTC_TAMPER_1 RTC_TAMPCR_TAMP1E +#endif /* RTC_TAMPER1_SUPPORT */ +#define RTC_TAMPER_2 RTC_TAMPCR_TAMP2E +#if defined(RTC_TAMPER3_SUPPORT) +#define RTC_TAMPER_3 RTC_TAMPCR_TAMP3E +#endif /* RTC_TAMPER3_SUPPORT */ +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_Pin_Selection RTC tamper Pins Selection + * @{ + */ +#define RTC_TAMPERPIN_DEFAULT 0x00000000U +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_Interrupt_Definitions RTCEx Tamper Interrupt Definitions + * @{ + */ +#define RTC_IT_TAMP RTC_TAMPCR_TAMPIE /*!< Enable global Tamper Interrupt */ +#if defined(RTC_TAMPER1_SUPPORT) +#define RTC_IT_TAMP1 RTC_TAMPCR_TAMP1IE /*!< Enable Tamper 1 Interrupt */ +#endif /* RTC_TAMPER1_SUPPORT */ +#define RTC_IT_TAMP2 RTC_TAMPCR_TAMP2IE /*!< Enable Tamper 2 Interrupt */ +#if defined(RTC_TAMPER3_SUPPORT) +#define RTC_IT_TAMP3 RTC_TAMPCR_TAMP3IE /*!< Enable Tamper 3 Interrupt */ +#endif /* RTC_TAMPER3_SUPPORT */ +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_Trigger_Definitions RTCEx Tamper Triggers Definitions + * @{ + */ +#define RTC_TAMPERTRIGGER_RISINGEDGE 0x00000000U +#define RTC_TAMPERTRIGGER_FALLINGEDGE 0x00000002U +#define RTC_TAMPERTRIGGER_LOWLEVEL RTC_TAMPERTRIGGER_RISINGEDGE +#define RTC_TAMPERTRIGGER_HIGHLEVEL RTC_TAMPERTRIGGER_FALLINGEDGE +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_EraseBackUp_Definitions RTCEx Tamper EraseBackUp Definitions + * @{ + */ +#define RTC_TAMPER_ERASE_BACKUP_ENABLE 0x00000000U +#define RTC_TAMPER_ERASE_BACKUP_DISABLE 0x00020000U +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_MaskFlag_Definitions RTCEx Tamper MaskFlag Definitions + * @{ + */ +#define RTC_TAMPERMASK_FLAG_DISABLE 0x00000000U +#define RTC_TAMPERMASK_FLAG_ENABLE 0x00040000U +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_Filter_Definitions RTCEx Tamper Filter Definitions + * @{ + */ +#define RTC_TAMPERFILTER_DISABLE 0x00000000U /*!< Tamper filter is disabled */ + +#define RTC_TAMPERFILTER_2SAMPLE RTC_TAMPCR_TAMPFLT_0 /*!< Tamper is activated after 2 + consecutive samples at the active level */ +#define RTC_TAMPERFILTER_4SAMPLE RTC_TAMPCR_TAMPFLT_1 /*!< Tamper is activated after 4 + consecutive samples at the active level */ +#define RTC_TAMPERFILTER_8SAMPLE RTC_TAMPCR_TAMPFLT /*!< Tamper is activated after 8 + consecutive samples at the active level */ +#define RTC_TAMPERFILTER_MASK RTC_TAMPCR_TAMPFLT /*!< Masking all bits except those of + field TAMPFLT */ +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_Sampling_Frequencies_Definitions RTCEx Tamper Sampling Frequencies Definitions + * @{ + */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768 0x00000000U /*!< Each of the tamper inputs are sampled + with a frequency = RTCCLK / 32768 */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384 RTC_TAMPCR_TAMPFREQ_0 /*!< Each of the tamper inputs are sampled + with a frequency = RTCCLK / 16384 */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192 RTC_TAMPCR_TAMPFREQ_1 /*!< Each of the tamper inputs are sampled + with a frequency = RTCCLK / 8192 */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096 (RTC_TAMPCR_TAMPFREQ_0 | RTC_TAMPCR_TAMPFREQ_1) /*!< Each of the tamper inputs are sampled + with a frequency = RTCCLK / 4096 */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048 RTC_TAMPCR_TAMPFREQ_2 /*!< Each of the tamper inputs are sampled + with a frequency = RTCCLK / 2048 */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024 (RTC_TAMPCR_TAMPFREQ_0 | RTC_TAMPCR_TAMPFREQ_2) /*!< Each of the tamper inputs are sampled + with a frequency = RTCCLK / 1024 */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512 (RTC_TAMPCR_TAMPFREQ_1 | RTC_TAMPCR_TAMPFREQ_2) /*!< Each of the tamper inputs are sampled + with a frequency = RTCCLK / 512 */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256 RTC_TAMPCR_TAMPFREQ /*!< Each of the tamper inputs are sampled + with a frequency = RTCCLK / 256 */ +#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_MASK RTC_TAMPCR_TAMPFREQ /*!< Masking all bits except those of + field TAMPFREQ */ +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_Pin_Precharge_Duration_Definitions RTCEx Tamper Pin Precharge Duration Definitions + * @{ + */ +#define RTC_TAMPERPRECHARGEDURATION_1RTCCLK 0x00000000U /*!< Tamper pins are pre-charged before + sampling during 1 RTCCLK cycle */ +#define RTC_TAMPERPRECHARGEDURATION_2RTCCLK RTC_TAMPCR_TAMPPRCH_0 /*!< Tamper pins are pre-charged before + sampling during 2 RTCCLK cycles */ +#define RTC_TAMPERPRECHARGEDURATION_4RTCCLK RTC_TAMPCR_TAMPPRCH_1 /*!< Tamper pins are pre-charged before + sampling during 4 RTCCLK cycles */ +#define RTC_TAMPERPRECHARGEDURATION_8RTCCLK RTC_TAMPCR_TAMPPRCH /*!< Tamper pins are pre-charged before + sampling during 8 RTCCLK cycles */ +#define RTC_TAMPERPRECHARGEDURATION_MASK RTC_TAMPCR_TAMPPRCH /*!< Masking all bits except those of + field TAMPPRCH */ +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_Pull_Up_Definitions RTCEx Tamper Pull Up Definitions + * @{ + */ +#define RTC_TAMPER_PULLUP_ENABLE 0x00000000U /*!< Tamper pins are pre-charged before sampling */ +#define RTC_TAMPER_PULLUP_DISABLE RTC_TAMPCR_TAMPPUDIS /*!< Tamper pins are not pre-charged before sampling */ +#define RTC_TAMPER_PULLUP_MASK RTC_TAMPCR_TAMPPUDIS /*!< Masking all bits except bit TAMPPUDIS */ +/** + * @} + */ + +/** @defgroup RTCEx_Tamper_TimeStampOnTamperDetection_Definitions RTCEx Tamper TimeStamp On Tamper Detection Definitions + * @{ + */ +#define RTC_TIMESTAMPONTAMPERDETECTION_ENABLE RTC_TAMPCR_TAMPTS /*!< TimeStamp on Tamper Detection event saved */ +#define RTC_TIMESTAMPONTAMPERDETECTION_DISABLE 0x00000000U /*!< TimeStamp on Tamper Detection event is not saved */ +#define RTC_TIMESTAMPONTAMPERDETECTION_MASK RTC_TAMPCR_TAMPTS /*!< Masking all bits except bit TAMPTS */ +/** + * @} + */ + +/** @defgroup RTCEx_Wakeup_Timer_Definitions RTCEx Wakeup Timer Definitions + * @{ + */ +#define RTC_WAKEUPCLOCK_RTCCLK_DIV16 0x00000000U +#define RTC_WAKEUPCLOCK_RTCCLK_DIV8 RTC_CR_WUCKSEL_0 +#define RTC_WAKEUPCLOCK_RTCCLK_DIV4 RTC_CR_WUCKSEL_1 +#define RTC_WAKEUPCLOCK_RTCCLK_DIV2 (RTC_CR_WUCKSEL_0 | RTC_CR_WUCKSEL_1) +#define RTC_WAKEUPCLOCK_CK_SPRE_16BITS RTC_CR_WUCKSEL_2 +#define RTC_WAKEUPCLOCK_CK_SPRE_17BITS (RTC_CR_WUCKSEL_1 | RTC_CR_WUCKSEL_2) +/** + * @} + */ + +/** @defgroup RTCEx_Smooth_calib_period_Definitions RTCEx Smooth Calib Period Definitions + * @{ + */ +#define RTC_SMOOTHCALIB_PERIOD_32SEC 0x00000000U /*!< If RTCCLK = 32768 Hz, smooth calibration + period is 32s, otherwise 2^20 RTCCLK pulses */ +#define RTC_SMOOTHCALIB_PERIOD_16SEC RTC_CALR_CALW16 /*!< If RTCCLK = 32768 Hz, smooth calibration + period is 16s, otherwise 2^19 RTCCLK pulses */ +#define RTC_SMOOTHCALIB_PERIOD_8SEC RTC_CALR_CALW8 /*!< If RTCCLK = 32768 Hz, smooth calibration + period is 8s, otherwise 2^18 RTCCLK pulses */ +/** + * @} + */ + +/** @defgroup RTCEx_Smooth_calib_Plus_pulses_Definitions RTCEx Smooth Calib Plus Pulses Definitions + * @{ + */ +#define RTC_SMOOTHCALIB_PLUSPULSES_SET RTC_CALR_CALP /*!< The number of RTCCLK pulses added + during a X -second window = Y - CALM[8:0] + with Y = 512, 256, 128 when X = 32, 16, 8 */ +#define RTC_SMOOTHCALIB_PLUSPULSES_RESET 0x00000000U /*!< The number of RTCCLK pulses subbstited + during a 32-second window = CALM[8:0] */ +/** + * @} + */ + +/** @defgroup RTCEx_Add_1_Second_Parameter_Definitions RTCEx Add 1 Second Parameter Definitions + * @{ + */ +#define RTC_SHIFTADD1S_RESET 0x00000000U +#define RTC_SHIFTADD1S_SET RTC_SHIFTR_ADD1S +/** + * @} + */ + +/** @defgroup RTCEx_Calib_Output_selection_Definitions RTCEx Calib Output Selection Definitions + * @{ + */ +#define RTC_CALIBOUTPUT_512HZ 0x00000000U +#define RTC_CALIBOUTPUT_1HZ RTC_CR_COSEL +/** + * @} + */ + +/** + * @} + */ + +/* Exported macros -----------------------------------------------------------*/ + +/** @defgroup RTCEx_Exported_Macros RTCEx Exported Macros + * @{ + */ + +/* ---------------------------------WAKEUPTIMER-------------------------------*/ + +/** @defgroup RTCEx_WakeUp_Timer RTCEx WakeUp Timer + * @{ + */ + +/** + * @brief Enable the RTC WakeUp Timer peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_WUTE)) + +/** + * @brief Disable the RTC Wakeup Timer peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_WUTE)) + +/** + * @brief Enable the RTC Wakeup Timer interrupt. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Wakeup Timer interrupt sources to be enabled or disabled. + * This parameter can be: + * @arg RTC_IT_WUT: Wakeup Timer interrupt + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__)) + +/** + * @brief Disable the RTC Wakeup Timer interrupt. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Wakeup Timer interrupt sources to be enabled or disabled. + * This parameter can be: + * @arg RTC_IT_WUT: Wakeup Timer interrupt + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__)) + +/** + * @brief Check whether the specified RTC Wakeup Timer interrupt has occurred or not. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Wakeup Timer interrupt to check. + * This parameter can be: + * @arg RTC_IT_WUT: Wakeup Timer interrupt + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__) >> 4U)) != 0U) ? 1U : 0U) + +/** + * @brief Check whether the specified RTC Wakeup timer interrupt has been enabled or not. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Wakeup timer interrupt sources to check. + * This parameter can be: + * @arg RTC_IT_WUT: WakeUpTimer interrupt + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != 0U) ? 1U : 0U) + +/** + * @brief Get the selected RTC Wakeup Timer's flag status. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Wakeup Timer flag to check. + * This parameter can be: + * @arg RTC_FLAG_WUTF: Wakeup Timer interrupt flag + * @arg RTC_FLAG_WUTWF: Wakeup Timer 'write allowed' flag + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U)? 1U : 0U) + +/** + * @brief Clear the RTC Wakeup timer's pending flags. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Wakeup Timer Flag to clear. + * This parameter can be: + * @arg RTC_FLAG_WUTF: Wakeup Timer interrupt Flag + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) + +/** + * @brief Enable interrupt on the RTC Wakeup Timer associated EXTI line. + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT() (EXTI->IMR1 |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Disable interrupt on the RTC Wakeup Timer associated EXTI line. + * @retval None + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_IT() (EXTI->IMR1 &= ~RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Enable event on the RTC Wakeup Timer associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_EVENT() (EXTI->EMR1 |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Disable event on the RTC Wakeup Timer associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_EVENT() (EXTI->EMR1 &= ~RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Enable falling edge trigger on the RTC Wakeup Timer associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR1 |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Disable falling edge trigger on the RTC Wakeup Timer associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR1 &= ~RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Enable rising edge trigger on the RTC Wakeup Timer associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR1 |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Disable rising edge trigger on the RTC Wakeup Timer associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR1 &= ~RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Enable rising & falling edge trigger on the RTC Wakeup Timer associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_FALLING_EDGE() do { \ + __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE(); \ + __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE(); \ + } while(0U) + +/** + * @brief Disable rising & falling edge trigger on the RTC Wakeup Timer associated EXTI line. + * This parameter can be: + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_FALLING_EDGE() do { \ + __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE(); \ + __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE(); \ + } while(0U) + +/** + * @brief Check whether the RTC Wakeup Timer associated EXTI line interrupt flag is set or not. + * @retval Line Status. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_GET_FLAG() (EXTI->PR1 & RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Clear the RTC Wakeup Timer associated EXTI line flag. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG() (EXTI->PR1 = RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @brief Generate a Software interrupt on the RTC Wakeup Timer associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_WAKEUPTIMER_EXTI_GENERATE_SWIT() (EXTI->SWIER1 |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT) + +/** + * @} + */ + +/* ---------------------------------TIMESTAMP---------------------------------*/ + +/** @defgroup RTCEx_Timestamp RTCEx Timestamp + * @{ + */ + +/** + * @brief Enable the RTC Timestamp peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_TIMESTAMP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_TSE)) + +/** + * @brief Disable the RTC Timestamp peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_TIMESTAMP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_TSE)) + +/** + * @brief Enable the RTC Timestamp interrupt. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Timestamp interrupt sources to be enabled or disabled. + * This parameter can be: + * @arg RTC_IT_TS: TimeStamp interrupt + * @retval None + */ +#define __HAL_RTC_TIMESTAMP_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__)) + +/** + * @brief Disable the RTC Timestamp interrupt. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Timestamp interrupt sources to be enabled or disabled. + * This parameter can be: + * @arg RTC_IT_TS: TimeStamp interrupt + * @retval None + */ +#define __HAL_RTC_TIMESTAMP_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__)) + +/** + * @brief Check whether the specified RTC Timestamp interrupt has occurred or not. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Timestamp interrupt to check. + * This parameter can be: + * @arg RTC_IT_TS: TimeStamp interrupt + * @retval None + */ +#define __HAL_RTC_TIMESTAMP_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__) >> 4U)) != 0U) ? 1U : 0U) + +/** + * @brief Check whether the specified RTC Timestamp interrupt has been enabled or not. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Timestamp interrupt source to check. + * This parameter can be: + * @arg RTC_IT_TS: TimeStamp interrupt + * @retval None + */ +#define __HAL_RTC_TIMESTAMP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != 0U) ? 1U : 0U) + +/** + * @brief Get the selected RTC Timestamp's flag status. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Timestamp flag to check. + * This parameter can be: + * @arg RTC_FLAG_TSF: Timestamp interrupt flag + * @arg RTC_FLAG_TSOVF: Timestamp overflow flag + * @retval None + */ +#define __HAL_RTC_TIMESTAMP_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U)? 1U : 0U) + +/** + * @brief Clear the RTC Timestamp's pending flags. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Timestamp flag to clear. + * This parameter can be: + * @arg RTC_FLAG_TSF: Timestamp interrupt flag + * @arg RTC_FLAG_TSOVF: Timestamp overflow flag + * @retval None + */ +#define __HAL_RTC_TIMESTAMP_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) + +/** + * @brief Enable the RTC internal TimeStamp peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_INTERNAL_TIMESTAMP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ITSE)) + +/** + * @brief Disable the RTC internal TimeStamp peripheral. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_INTERNAL_TIMESTAMP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ITSE)) + +/** + * @brief Get the selected RTC Internal Timestamp's flag status. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Internal Timestamp flag is pending or not. + * This parameter can be: + * @arg RTC_FLAG_ITSF: Internal Timestamp interrupt flag + * @retval None + */ +#define __HAL_RTC_INTERNAL_TIMESTAMP_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U) ? 1U : 0U) + +/** + * @brief Clear the RTC Internal Timestamp's pending flags. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Internal Timestamp flag to clear. + * This parameter can be: + * @arg RTC_FLAG_ITSF: Internal Timestamp interrupt flag + * @retval None + */ +#define __HAL_RTC_INTERNAL_TIMESTAMP_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0003FFFFU)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) + +/** + * @} + */ + +/* ---------------------------------TAMPER------------------------------------*/ + +/** @defgroup RTCEx_Tamper RTCEx Tamper + * @{ + */ + +#if defined(RTC_TAMPER1_SUPPORT) +/** + * @brief Enable the RTC Tamper1 input detection. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_TAMPER1_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP1E)) + +/** + * @brief Disable the RTC Tamper1 input detection. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_TAMPER1_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP1E)) +#endif /* RTC_TAMPER1_SUPPORT */ + +/** + * @brief Enable the RTC Tamper2 input detection. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_TAMPER2_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP2E)) + +/** + * @brief Disable the RTC Tamper2 input detection. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_TAMPER2_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP2E)) + +#if defined(RTC_TAMPER3_SUPPORT) +/** + * @brief Enable the RTC Tamper3 input detection. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_TAMPER3_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP3E)) + +/** + * @brief Disable the RTC Tamper3 input detection. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_TAMPER3_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP3E)) +#endif /* RTC_TAMPER3_SUPPORT */ + +/** + * @brief Enable the RTC Tamper interrupt. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Tamper interrupt sources to be enabled. + * This parameter can be any combination of the following values: + * @arg RTC_IT_TAMP: Tamper global interrupt + * @arg RTC_IT_TAMP1: Tamper 1 interrupt (*) + * @arg RTC_IT_TAMP2: Tamper 2 interrupt + * @arg RTC_IT_TAMP3: Tamper 3 interrupt (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +#define __HAL_RTC_TAMPER_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->TAMPCR |= (__INTERRUPT__)) + +/** + * @brief Disable the RTC Tamper interrupt. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Tamper interrupt sources to be disabled. + * This parameter can be any combination of the following values: + * @arg RTC_IT_TAMP: Tamper global interrupt + * @arg RTC_IT_TAMP1: Tamper 1 interrupt (*) + * @arg RTC_IT_TAMP2: Tamper 2 interrupt + * @arg RTC_IT_TAMP3: Tamper 3 interrupt (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +#define __HAL_RTC_TAMPER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->TAMPCR &= ~(__INTERRUPT__)) + +/** + * @brief Check whether the specified RTC Tamper interrupt has been enabled or not. + * @param __HANDLE__ specifies the RTC handle. + * @param __INTERRUPT__ specifies the RTC Tamper interrupt source to check. + * This parameter can be: + * @arg RTC_IT_TAMP: Tamper global interrupt + * @arg RTC_IT_TAMP1: Tamper 1 interrupt (*) + * @arg RTC_IT_TAMP2: Tamper 2 interrupt + * @arg RTC_IT_TAMP3: Tamper 3 interrupt (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +#define __HAL_RTC_TAMPER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->TAMPCR) & (__INTERRUPT__)) != 0U) ? 1U : 0U) + +/** + * @brief Get the selected RTC Tamper's flag status. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Tamper flag to be checked. + * This parameter can be: + * @arg RTC_FLAG_TAMP1F: Tamper 1 interrupt flag (*) + * @arg RTC_FLAG_TAMP2F: Tamper 2 interrupt flag + * @arg RTC_FLAG_TAMP3F: Tamper 3 interrupt flag (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +#define __HAL_RTC_TAMPER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U)? 1U : 0U) + +/** + * @brief Clear the RTC Tamper's pending flags. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC Tamper Flag to clear. + * This parameter can be: + * @arg RTC_FLAG_TAMP1F: Tamper 1 interrupt flag (*) + * @arg RTC_FLAG_TAMP2F: Tamper 2 interrupt flag + * @arg RTC_FLAG_TAMP3F: Tamper 3 interrupt flag (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +#define __HAL_RTC_TAMPER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) +/** + * @} + */ + +/* --------------------------TAMPER/TIMESTAMP---------------------------------*/ +/** @defgroup RTCEx_Tamper_Timestamp EXTI RTC Tamper Timestamp EXTI + * @{ + */ + +/** + * @brief Enable interrupt on the RTC Tamper and Timestamp associated EXTI line. + * @retval None + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT() (EXTI->IMR1 |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Disable interrupt on the RTC Tamper and Timestamp associated EXTI line. + * @retval None + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_IT() (EXTI->IMR1 &= ~RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Enable event on the RTC Tamper and Timestamp associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_EVENT() (EXTI->EMR1 |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Disable event on the RTC Tamper and Timestamp associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_EVENT() (EXTI->EMR1 &= ~RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Enable falling edge trigger on the RTC Tamper and Timestamp associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_FALLING_EDGE() (EXTI->FTSR1 |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Disable falling edge trigger on the RTC Tamper and Timestamp associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_FALLING_EDGE() (EXTI->FTSR1 &= ~RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Enable rising edge trigger on the RTC Tamper and Timestamp associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE() (EXTI->RTSR1 |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Disable rising edge trigger on the RTC Tamper and Timestamp associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_EDGE() (EXTI->RTSR1 &= ~RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Enable rising & falling edge trigger on the RTC Tamper and Timestamp associated EXTI line. + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_FALLING_EDGE() do { \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE(); \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_FALLING_EDGE(); \ + } while(0U) + +/** + * @brief Disable rising & falling edge trigger on the RTC Tamper and Timestamp associated EXTI line. + * This parameter can be: + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_FALLING_EDGE() do { \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_EDGE(); \ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_FALLING_EDGE(); \ + } while(0U) + +/** + * @brief Check whether the RTC Tamper and Timestamp associated EXTI line interrupt flag is set or not. + * @retval Line Status. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GET_FLAG() (EXTI->PR1 & RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Clear the RTC Tamper and Timestamp associated EXTI line flag. + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG() (EXTI->PR1 = RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) + +/** + * @brief Generate a Software interrupt on the RTC Tamper and Timestamp associated EXTI line + * @retval None. + */ +#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT() (EXTI->SWIER1 |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT) +/** + * @} + */ + +/* ------------------------------CALIBRATION----------------------------------*/ + +/** @defgroup RTCEx_Calibration RTCEx Calibration + * @{ + */ + +/** + * @brief Enable the RTC calibration output. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_CALIBRATION_OUTPUT_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_COE)) + +/** + * @brief Disable the calibration output. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_CALIBRATION_OUTPUT_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_COE)) + +/** + * @brief Enable the clock reference detection. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_CLOCKREF_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_REFCKON)) + +/** + * @brief Disable the clock reference detection. + * @param __HANDLE__ specifies the RTC handle. + * @retval None + */ +#define __HAL_RTC_CLOCKREF_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_REFCKON)) + +/** + * @brief Get the selected RTC shift operation's flag status. + * @param __HANDLE__ specifies the RTC handle. + * @param __FLAG__ specifies the RTC shift operation Flag is pending or not. + * This parameter can be: + * @arg RTC_FLAG_SHPF: Shift pending flag + * @retval None + */ +#define __HAL_RTC_SHIFT_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U)? 1U : 0U) +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup RTCEx_Exported_Functions RTCEx Exported Functions + * @{ + */ + +/** @addtogroup RTCEx_Exported_Functions_Group1 + * @{ + */ +/* RTC Timestamp and Tamper functions *****************************************/ +HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t RTC_TimeStampEdge, uint32_t RTC_TimeStampPin); +HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t RTC_TimeStampEdge, uint32_t RTC_TimeStampPin); +HAL_StatusTypeDef HAL_RTCEx_DeactivateTimeStamp(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_SetInternalTimeStamp(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_DeactivateInternalTimeStamp(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTimeStamp, RTC_DateTypeDef *sTimeStampDate, uint32_t Format); + +HAL_StatusTypeDef HAL_RTCEx_SetTamper(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef *sTamper); +HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef *sTamper); +HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper(RTC_HandleTypeDef *hrtc, uint32_t Tamper); +void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc); + +#if defined(RTC_TAMPER1_SUPPORT) +void HAL_RTCEx_Tamper1EventCallback(RTC_HandleTypeDef *hrtc); +#endif /* RTC_TAMPER1_SUPPORT */ +void HAL_RTCEx_Tamper2EventCallback(RTC_HandleTypeDef *hrtc); +#if defined(RTC_TAMPER3_SUPPORT) +void HAL_RTCEx_Tamper3EventCallback(RTC_HandleTypeDef *hrtc); +#endif /* RTC_TAMPER3_SUPPORT */ +void HAL_RTCEx_TimeStampEventCallback(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout); +#if defined(RTC_TAMPER1_SUPPORT) +HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout); +#endif /* RTC_TAMPER1_SUPPORT */ +HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout); +#if defined(RTC_TAMPER3_SUPPORT) +HAL_StatusTypeDef HAL_RTCEx_PollForTamper3Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout); +#endif /* RTC_TAMPER3_SUPPORT */ +/** + * @} + */ + +/** @addtogroup RTCEx_Exported_Functions_Group2 + * @{ + */ +/* RTC Wakeup functions ******************************************************/ +HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock); +HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock); +HAL_StatusTypeDef HAL_RTCEx_DeactivateWakeUpTimer(RTC_HandleTypeDef *hrtc); +uint32_t HAL_RTCEx_GetWakeUpTimer(RTC_HandleTypeDef *hrtc); +void HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc); +void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout); +/** + * @} + */ + +/** @addtogroup RTCEx_Exported_Functions_Group3 + * @{ + */ +/* Extended Control functions ************************************************/ +void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data); +uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister); + +HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib(RTC_HandleTypeDef *hrtc, uint32_t SmoothCalibPeriod, uint32_t SmoothCalibPlusPulses, uint32_t SmoothCalibMinusPulsesValue); +HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift(RTC_HandleTypeDef *hrtc, uint32_t ShiftAdd1S, uint32_t ShiftSubFS); +HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut(RTC_HandleTypeDef *hrtc, uint32_t CalibOutput); +HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef *hrtc); +/** + * @} + */ + +/** @addtogroup RTCEx_Exported_Functions_Group4 + * @{ + */ +/* Extended RTC features functions *******************************************/ +void HAL_RTCEx_AlarmBEventCallback(RTC_HandleTypeDef *hrtc); +HAL_StatusTypeDef HAL_RTCEx_PollForAlarmBEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout); +/** + * @} + */ + +/** + * @} + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ + +/** @defgroup RTCEx_Private_Constants RTCEx Private Constants + * @{ + */ +#define RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT EXTI_IMR1_IM18 /*!< External interrupt line 18 Connected to the RTC Tamper and Timestamp event */ +#define RTC_EXTI_LINE_WAKEUPTIMER_EVENT EXTI_IMR1_IM19 /*!< External interrupt line 19 Connected to the RTC Wakeup event */ +/** + * @} + */ + +/** @defgroup RTCEx_Private_Constants RTCEx Private Constants + * @{ + */ +/* Masks Definition */ +#if defined(RTC_TAMPER3_SUPPORT) +#if defined(RTC_TAMPER1_SUPPORT) +#define RTC_TAMPER_ENABLE_BITS_MASK ((uint32_t) (RTC_TAMPER_1 | \ + RTC_TAMPER_2 | \ + RTC_TAMPER_3)) + +#define RTC_TAMPER_FLAGS_MASK ((uint32_t) (RTC_FLAG_TAMP1F | \ + RTC_FLAG_TAMP2F | \ + RTC_FLAG_TAMP3F)) +#else /* RTC_TAMPER1_SUPPORT */ +#define RTC_TAMPER_ENABLE_BITS_MASK ((uint32_t) (RTC_TAMPER_2 | \ + RTC_TAMPER_3)) + +#define RTC_TAMPER_FLAGS_MASK ((uint32_t) (RTC_FLAG_TAMP2F | \ + RTC_FLAG_TAMP3F)) +#endif /* RTC_TAMPER1_SUPPORT */ +#else /* RTC_TAMPER3_SUPPORT */ +#if defined(RTC_TAMPER1_SUPPORT) +#define RTC_TAMPER_ENABLE_BITS_MASK ((uint32_t) (RTC_TAMPER_1 | \ + RTC_TAMPER_2)) + +#define RTC_TAMPER_FLAGS_MASK ((uint32_t) (RTC_FLAG_TAMP1F | \ + RTC_FLAG_TAMP2F)) +#else /* RTC_TAMPER1_SUPPORT */ +#define RTC_TAMPER_ENABLE_BITS_MASK RTC_TAMPER_2 + +#define RTC_TAMPER_FLAGS_MASK RTC_FLAG_TAMP2F +#endif /* RTC_TAMPER1_SUPPORT */ +#endif /* RTC_TAMPER3_SUPPORT */ + +#if defined(RTC_TAMPER3_SUPPORT) +#if defined(RTC_TAMPER1_SUPPORT) +#define RTC_TAMPER_IT_ENABLE_BITS_MASK ((uint32_t) (RTC_IT_TAMP1 | \ + RTC_IT_TAMP2 | \ + RTC_IT_TAMP3 | \ + RTC_IT_TAMP)) +#else /* RTC_TAMPER1_SUPPORT */ +#define RTC_TAMPER_IT_ENABLE_BITS_MASK ((uint32_t) (RTC_IT_TAMP2 | \ + RTC_IT_TAMP3 | \ + RTC_IT_TAMP)) +#endif /* RTC_TAMPER1_SUPPORT */ +#else /* RTC_TAMPER3_SUPPORT */ +#if defined(RTC_TAMPER1_SUPPORT) +#define RTC_TAMPER_IT_ENABLE_BITS_MASK ((uint32_t) (RTC_IT_TAMP1 | \ + RTC_IT_TAMP2 | \ + RTC_IT_TAMP)) +#else /* RTC_TAMPER1_SUPPORT */ +#define RTC_TAMPER_IT_ENABLE_BITS_MASK ((uint32_t) (RTC_IT_TAMP2 | \ + RTC_IT_TAMP)) +#endif /* RTC_TAMPER1_SUPPORT */ +#endif /* RTC_TAMPER3_SUPPORT */ +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ + +/** @defgroup RTCEx_Private_Macros RTCEx Private Macros + * @{ + */ + +/** @defgroup RTCEx_IS_RTC_Definitions Private macros to check input parameters + * @{ + */ +#define IS_RTC_BKP(BKP) ((BKP) < (uint32_t) RTC_BKP_NUMBER) + +#define IS_TIMESTAMP_EDGE(EDGE) (((EDGE) == RTC_TIMESTAMPEDGE_RISING) || \ + ((EDGE) == RTC_TIMESTAMPEDGE_FALLING)) + +#define IS_RTC_TAMPER(TAMPER) ((((TAMPER) & ((uint32_t)~RTC_TAMPER_ENABLE_BITS_MASK)) == 0x00U) && ((TAMPER) != 0U)) + +#define IS_RTC_TAMPER_PIN(PIN) ((PIN) == RTC_TAMPERPIN_DEFAULT) + +#define IS_RTC_TIMESTAMP_PIN(PIN) ((PIN) == RTC_TIMESTAMPPIN_DEFAULT) + +#define IS_RTC_TAMPER_INTERRUPT(INTERRUPT) ((((INTERRUPT) & ((uint32_t)~RTC_TAMPER_IT_ENABLE_BITS_MASK )) == 0x00U) && ((INTERRUPT) != 0U)) + +#define IS_RTC_TAMPER_TRIGGER(TRIGGER) (((TRIGGER) == RTC_TAMPERTRIGGER_RISINGEDGE) || \ + ((TRIGGER) == RTC_TAMPERTRIGGER_FALLINGEDGE) || \ + ((TRIGGER) == RTC_TAMPERTRIGGER_LOWLEVEL) || \ + ((TRIGGER) == RTC_TAMPERTRIGGER_HIGHLEVEL)) + +#define IS_RTC_TAMPER_ERASE_MODE(MODE) (((MODE) == RTC_TAMPER_ERASE_BACKUP_ENABLE) || \ + ((MODE) == RTC_TAMPER_ERASE_BACKUP_DISABLE)) + +#define IS_RTC_TAMPER_MASKFLAG_STATE(STATE) (((STATE) == RTC_TAMPERMASK_FLAG_ENABLE) || \ + ((STATE) == RTC_TAMPERMASK_FLAG_DISABLE)) + +#define IS_RTC_TAMPER_FILTER(FILTER) (((FILTER) == RTC_TAMPERFILTER_DISABLE) || \ + ((FILTER) == RTC_TAMPERFILTER_2SAMPLE) || \ + ((FILTER) == RTC_TAMPERFILTER_4SAMPLE) || \ + ((FILTER) == RTC_TAMPERFILTER_8SAMPLE)) + +#define IS_RTC_TAMPER_FILTER_CONFIG_CORRECT(FILTER, TRIGGER) \ + ( ( ((FILTER) != RTC_TAMPERFILTER_DISABLE) \ + && ( ((TRIGGER) == RTC_TAMPERTRIGGER_LOWLEVEL) \ + || ((TRIGGER) == RTC_TAMPERTRIGGER_HIGHLEVEL))) \ + || ( ((FILTER) == RTC_TAMPERFILTER_DISABLE) \ + && ( ((TRIGGER) == RTC_TAMPERTRIGGER_RISINGEDGE) \ + || ((TRIGGER) == RTC_TAMPERTRIGGER_FALLINGEDGE)))) + +#define IS_RTC_TAMPER_SAMPLING_FREQ(FREQ) (((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768)|| \ + ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384)|| \ + ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192) || \ + ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096) || \ + ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048) || \ + ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024) || \ + ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512) || \ + ((FREQ) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256)) + +#define IS_RTC_TAMPER_PRECHARGE_DURATION(DURATION) (((DURATION) == RTC_TAMPERPRECHARGEDURATION_1RTCCLK) || \ + ((DURATION) == RTC_TAMPERPRECHARGEDURATION_2RTCCLK) || \ + ((DURATION) == RTC_TAMPERPRECHARGEDURATION_4RTCCLK) || \ + ((DURATION) == RTC_TAMPERPRECHARGEDURATION_8RTCCLK)) + +#define IS_RTC_TAMPER_PULLUP_STATE(STATE) (((STATE) == RTC_TAMPER_PULLUP_ENABLE) || \ + ((STATE) == RTC_TAMPER_PULLUP_DISABLE)) + +#define IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION(DETECTION) (((DETECTION) == RTC_TIMESTAMPONTAMPERDETECTION_ENABLE) || \ + ((DETECTION) == RTC_TIMESTAMPONTAMPERDETECTION_DISABLE)) + +#define IS_RTC_WAKEUP_CLOCK(CLOCK) (((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV16) || \ + ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV8) || \ + ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV4) || \ + ((CLOCK) == RTC_WAKEUPCLOCK_RTCCLK_DIV2) || \ + ((CLOCK) == RTC_WAKEUPCLOCK_CK_SPRE_16BITS) || \ + ((CLOCK) == RTC_WAKEUPCLOCK_CK_SPRE_17BITS)) + +#define IS_RTC_WAKEUP_COUNTER(COUNTER) ((COUNTER) <= RTC_WUTR_WUT) + +#define IS_RTC_SMOOTH_CALIB_PERIOD(PERIOD) (((PERIOD) == RTC_SMOOTHCALIB_PERIOD_32SEC) || \ + ((PERIOD) == RTC_SMOOTHCALIB_PERIOD_16SEC) || \ + ((PERIOD) == RTC_SMOOTHCALIB_PERIOD_8SEC)) + +#define IS_RTC_SMOOTH_CALIB_PLUS(PLUS) (((PLUS) == RTC_SMOOTHCALIB_PLUSPULSES_SET) || \ + ((PLUS) == RTC_SMOOTHCALIB_PLUSPULSES_RESET)) + +#define IS_RTC_SMOOTH_CALIB_MINUS(VALUE) ((VALUE) <= RTC_CALR_CALM) + +#define IS_RTC_SHIFT_ADD1S(SEL) (((SEL) == RTC_SHIFTADD1S_RESET) || \ + ((SEL) == RTC_SHIFTADD1S_SET)) + +#define IS_RTC_SHIFT_SUBFS(FS) ((FS) <= RTC_SHIFTR_SUBFS) + +#define IS_RTC_CALIB_OUTPUT(OUTPUT) (((OUTPUT) == RTC_CALIBOUTPUT_512HZ) || \ + ((OUTPUT) == RTC_CALIBOUTPUT_1HZ)) +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_HAL_RTC_EX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h new file mode 100644 index 0000000..7bbb134 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_bus.h @@ -0,0 +1,2377 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_bus.h + * @author MCD Application Team + * @brief Header file of BUS LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ##### RCC Limitations ##### + ============================================================================== + [..] + A delay between an RCC peripheral clock enable and the effective peripheral + enabling should be taken into account in order to manage the peripheral read/write + from/to registers. + (+) This delay depends on the peripheral mapping. + (++) AHB & APB peripherals, 1 dummy read is necessary + + [..] + Workarounds: + (#) For AHB & APB peripherals, a dummy read to the peripheral register has been + inserted in each LL_{BUS}_GRP{x}_EnableClock() function. + + @endverbatim + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_BUS_H +#define STM32WBxx_LL_BUS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined(RCC) + +/** @defgroup BUS_LL BUS + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ + +/* Private macros ------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup BUS_LL_Exported_Constants BUS Exported Constants + * @{ + */ + +/** @defgroup BUS_LL_EC_AHB1_GRP1_PERIPH AHB1 GRP1 PERIPH + * @{ + */ +#define LL_AHB1_GRP1_PERIPH_ALL (0xFFFFFFFFU) + +#define LL_AHB1_GRP1_PERIPH_DMA1 RCC_AHB1ENR_DMA1EN +#if defined(DMA2) +#define LL_AHB1_GRP1_PERIPH_DMA2 RCC_AHB1ENR_DMA2EN +#endif /* DMA2 */ +#define LL_AHB1_GRP1_PERIPH_DMAMUX1 RCC_AHB1ENR_DMAMUX1EN +#define LL_AHB1_GRP1_PERIPH_SRAM1 RCC_AHB1SMENR_SRAM1SMEN +#define LL_AHB1_GRP1_PERIPH_CRC RCC_AHB1ENR_CRCEN +#if defined(TSC) +#define LL_AHB1_GRP1_PERIPH_TSC RCC_AHB1ENR_TSCEN +#endif /* TSC */ +/** + * @} + */ + +/** @defgroup BUS_LL_EC_AHB2_GRP1_PERIPH AHB2 GRP1 PERIPH + * @{ + */ +#define LL_AHB2_GRP1_PERIPH_ALL (0xFFFFFFFFU) + +#define LL_AHB2_GRP1_PERIPH_GPIOA RCC_AHB2ENR_GPIOAEN +#define LL_AHB2_GRP1_PERIPH_GPIOB RCC_AHB2ENR_GPIOBEN +#define LL_AHB2_GRP1_PERIPH_GPIOC RCC_AHB2ENR_GPIOCEN +#if defined(GPIOD) +#define LL_AHB2_GRP1_PERIPH_GPIOD RCC_AHB2ENR_GPIODEN +#endif /* GPIOD */ +#define LL_AHB2_GRP1_PERIPH_GPIOE RCC_AHB2ENR_GPIOEEN +#define LL_AHB2_GRP1_PERIPH_GPIOH RCC_AHB2ENR_GPIOHEN +#if defined(ADC_SUPPORT_5_MSPS) +#define LL_AHB2_GRP1_PERIPH_ADC RCC_AHB2ENR_ADCEN +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define LL_AHB2_GRP1_PERIPH_AES1 RCC_AHB2ENR_AES1EN +#endif /* AES1 */ +/** + * @} + */ + +/** @defgroup BUS_LL_EC_AHB3_GRP1_PERIPH AHB3 GRP1 PERIPH + * @{ + */ +#define LL_AHB3_GRP1_PERIPH_ALL (0xFFFFFFFFU) +#if defined(QUADSPI) +#define LL_AHB3_GRP1_PERIPH_QUADSPI RCC_AHB3ENR_QUADSPIEN +#endif /* QUADSPI */ +#define LL_AHB3_GRP1_PERIPH_PKA RCC_AHB3ENR_PKAEN +#define LL_AHB3_GRP1_PERIPH_AES2 RCC_AHB3ENR_AES2EN +#define LL_AHB3_GRP1_PERIPH_RNG RCC_AHB3ENR_RNGEN +#define LL_AHB3_GRP1_PERIPH_HSEM RCC_AHB3ENR_HSEMEN +#define LL_AHB3_GRP1_PERIPH_IPCC RCC_AHB3ENR_IPCCEN +#define LL_AHB3_GRP1_PERIPH_SRAM2 RCC_AHB3SMENR_SRAM2SMEN +#define LL_AHB3_GRP1_PERIPH_FLASH RCC_AHB3ENR_FLASHEN +/** + * @} + */ + +/** @defgroup BUS_LL_EC_APB1_GRP1_PERIPH APB1 GRP1 PERIPH + * @{ + */ +#define LL_APB1_GRP1_PERIPH_ALL (0xFFFFFFFFU) +#define LL_APB1_GRP1_PERIPH_TIM2 RCC_APB1ENR1_TIM2EN +#if defined(LCD) +#define LL_APB1_GRP1_PERIPH_LCD RCC_APB1ENR1_LCDEN +#endif /* LCD */ +#define LL_APB1_GRP1_PERIPH_RTCAPB RCC_APB1ENR1_RTCAPBEN +#define LL_APB1_GRP1_PERIPH_WWDG RCC_APB1ENR1_WWDGEN +#if defined(SPI2) +#define LL_APB1_GRP1_PERIPH_SPI2 RCC_APB1ENR1_SPI2EN +#endif /* SPI2 */ +#define LL_APB1_GRP1_PERIPH_I2C1 RCC_APB1ENR1_I2C1EN +#if defined(I2C3) +#define LL_APB1_GRP1_PERIPH_I2C3 RCC_APB1ENR1_I2C3EN +#endif /* I2C3 */ +#if defined(CRS) +#define LL_APB1_GRP1_PERIPH_CRS RCC_APB1ENR1_CRSEN +#endif /* CRS */ +#if defined(USB) +#define LL_APB1_GRP1_PERIPH_USB RCC_APB1ENR1_USBEN +#endif /* USB */ +#define LL_APB1_GRP1_PERIPH_LPTIM1 RCC_APB1ENR1_LPTIM1EN +/** + * @} + */ + + +/** @defgroup BUS_LL_EC_APB1_GRP2_PERIPH APB1 GRP2 PERIPH + * @{ + */ +#define LL_APB1_GRP2_PERIPH_ALL (0xFFFFFFFFU) + +#if defined(LPUART1) +#define LL_APB1_GRP2_PERIPH_LPUART1 RCC_APB1ENR2_LPUART1EN +#endif /* LPUART1 */ +#define LL_APB1_GRP2_PERIPH_LPTIM2 RCC_APB1ENR2_LPTIM2EN +/** + * @} + */ + +/** @defgroup BUS_LL_EC_APB2_GRP1_PERIPH APB2 GRP1 PERIPH + * @{ + */ +#define LL_APB2_GRP1_PERIPH_ALL (0xFFFFFFFFU) + +#if defined(ADC_SUPPORT_2_5_MSPS) +#define LL_APB2_GRP1_PERIPH_ADC RCC_APB2ENR_ADCEN +#endif /* ADC_SUPPORT_2_5_MSPS */ +#define LL_APB2_GRP1_PERIPH_TIM1 RCC_APB2ENR_TIM1EN +#define LL_APB2_GRP1_PERIPH_SPI1 RCC_APB2ENR_SPI1EN +#define LL_APB2_GRP1_PERIPH_USART1 RCC_APB2ENR_USART1EN +#if defined(TIM16) +#define LL_APB2_GRP1_PERIPH_TIM16 RCC_APB2ENR_TIM16EN +#endif /* TIM16 */ +#if defined(TIM17) +#define LL_APB2_GRP1_PERIPH_TIM17 RCC_APB2ENR_TIM17EN +#endif /* TIM17 */ +#if defined(SAI1) +#define LL_APB2_GRP1_PERIPH_SAI1 RCC_APB2ENR_SAI1EN +#endif /* SAI1 */ +/** + * @} + */ + +/** @defgroup BUS_LL_EC_APB3_GRP1_PERIPH APB3 GRP1 PERIPH + * @{ + */ +#define LL_APB3_GRP1_PERIPH_ALL (0xFFFFFFFFU) +#define LL_APB3_GRP1_PERIPH_RF RCC_APB3RSTR_RFRST +/** + * @} + */ + + +/** @defgroup BUS_LL_EC_C2_AHB1_GRP1_PERIPH C2 AHB1 GRP1 PERIPH + * @{ + */ +#define LL_C2_AHB1_GRP1_PERIPH_DMA1 RCC_C2AHB1ENR_DMA1EN +#if defined(DMA2) +#define LL_C2_AHB1_GRP1_PERIPH_DMA2 RCC_C2AHB1ENR_DMA2EN +#endif /* DMA2 */ +#define LL_C2_AHB1_GRP1_PERIPH_DMAMUX1 RCC_C2AHB1ENR_DMAMUX1EN +#define LL_C2_AHB1_GRP1_PERIPH_SRAM1 RCC_C2AHB1ENR_SRAM1EN +#define LL_C2_AHB1_GRP1_PERIPH_CRC RCC_C2AHB1ENR_CRCEN +#if defined(TSC) +#define LL_C2_AHB1_GRP1_PERIPH_TSC RCC_C2AHB1ENR_TSCEN +#endif /* TSC */ +/** + * @} + */ + + +/** @defgroup BUS_LL_EC_C2_AHB2_GRP1_PERIPH C2 AHB2 GRP1 PERIPH + * @{ + */ +#define LL_C2_AHB2_GRP1_PERIPH_GPIOA RCC_C2AHB2ENR_GPIOAEN +#define LL_C2_AHB2_GRP1_PERIPH_GPIOB RCC_C2AHB2ENR_GPIOBEN +#define LL_C2_AHB2_GRP1_PERIPH_GPIOC RCC_C2AHB2ENR_GPIOCEN +#if defined(GPIOD) +#define LL_C2_AHB2_GRP1_PERIPH_GPIOD RCC_C2AHB2ENR_GPIODEN +#endif /* GPIOD */ +#define LL_C2_AHB2_GRP1_PERIPH_GPIOE RCC_C2AHB2ENR_GPIOEEN +#define LL_C2_AHB2_GRP1_PERIPH_GPIOH RCC_C2AHB2ENR_GPIOHEN +#if defined(ADC_SUPPORT_5_MSPS) +#define LL_C2_AHB2_GRP1_PERIPH_ADC RCC_C2AHB2ENR_ADCEN +#endif /* ADC_SUPPORT_5_MSPS */ +#if defined(AES1) +#define LL_C2_AHB2_GRP1_PERIPH_AES1 RCC_C2AHB2ENR_AES1EN +#endif /* AES1 */ +/** + * @} + */ + + +/** @defgroup BUS_LL_EC_C2_AHB3_GRP1_PERIPH C2 AHB3 GRP1 PERIPH + * @{ + */ +#define LL_C2_AHB3_GRP1_PERIPH_PKA RCC_C2AHB3ENR_PKAEN +#define LL_C2_AHB3_GRP1_PERIPH_AES2 RCC_C2AHB3ENR_AES2EN +#define LL_C2_AHB3_GRP1_PERIPH_RNG RCC_C2AHB3ENR_RNGEN +#define LL_C2_AHB3_GRP1_PERIPH_HSEM RCC_C2AHB3ENR_HSEMEN +#define LL_C2_AHB3_GRP1_PERIPH_IPCC RCC_C2AHB3ENR_IPCCEN +#define LL_C2_AHB3_GRP1_PERIPH_FLASH RCC_C2AHB3ENR_FLASHEN +#define LL_C2_AHB3_GRP1_PERIPH_SRAM2 RCC_C2AHB3SMENR_SRAM2SMEN +/** + * @} + */ + + +/** @defgroup BUS_LL_EC_C2_APB1_GRP1_PERIPH C2 APB1 GRP1 PERIPH + * @{ + */ +#define LL_C2_APB1_GRP1_PERIPH_TIM2 RCC_C2APB1ENR1_TIM2EN +#if defined(LCD) +#define LL_C2_APB1_GRP1_PERIPH_LCD RCC_C2APB1ENR1_LCDEN +#endif /* LCD */ +#define LL_C2_APB1_GRP1_PERIPH_RTCAPB RCC_C2APB1ENR1_RTCAPBEN +#if defined(SPI2) +#define LL_C2_APB1_GRP1_PERIPH_SPI2 RCC_C2APB1ENR1_SPI2EN +#endif /* SPI2 */ +#define LL_C2_APB1_GRP1_PERIPH_I2C1 RCC_C2APB1ENR1_I2C1EN +#if defined(I2C3) +#define LL_C2_APB1_GRP1_PERIPH_I2C3 RCC_C2APB1ENR1_I2C3EN +#define LL_C2_APB1_GRP1_PERIPH_CRS RCC_C2APB1ENR1_CRSEN +#define LL_C2_APB1_GRP1_PERIPH_USB RCC_C2APB1ENR1_USBEN +#endif /* I2C3 */ +#define LL_C2_APB1_GRP1_PERIPH_LPTIM1 RCC_C2APB1ENR1_LPTIM1EN +/** + * @} + */ + + +/** @defgroup BUS_LL_EC_C2_APB1_GRP2_PERIPH C2 APB1 GRP2 PERIPH + * @{ + */ +#if defined(LPUART1) +#define LL_C2_APB1_GRP2_PERIPH_LPUART1 RCC_C2APB1ENR2_LPUART1EN +#endif /* LPUART1 */ +#define LL_C2_APB1_GRP2_PERIPH_LPTIM2 RCC_C2APB1ENR2_LPTIM2EN +/** + * @} + */ + + +/** @defgroup BUS_LL_EC_C2_APB2_GRP1_PERIPH C2 APB2 GRP1 PERIPH + * @{ + */ +#if defined(ADC_SUPPORT_2_5_MSPS) +#define LL_C2_APB2_GRP1_PERIPH_ADC RCC_C2APB2ENR_ADCEN +#endif /* ADC_SUPPORT_5_MSPS */ +#define LL_C2_APB2_GRP1_PERIPH_TIM1 RCC_C2APB2ENR_TIM1EN +#define LL_C2_APB2_GRP1_PERIPH_SPI1 RCC_C2APB2ENR_SPI1EN +#define LL_C2_APB2_GRP1_PERIPH_USART1 RCC_C2APB2ENR_USART1EN +#if defined(TIM16) +#define LL_C2_APB2_GRP1_PERIPH_TIM16 RCC_C2APB2ENR_TIM16EN +#endif /* TIM16 */ +#if defined(TIM17) +#define LL_C2_APB2_GRP1_PERIPH_TIM17 RCC_C2APB2ENR_TIM17EN +#endif /* TIM17 */ +#if defined(SAI1) +#define LL_C2_APB2_GRP1_PERIPH_SAI1 RCC_C2APB2ENR_SAI1EN +#endif /* SAI1 */ +/** + * @} + */ + + +/** @defgroup BUS_LL_EC_C2_APB3_GRP1_PERIPH C2 APB3 GRP1 PERIPH + * @{ + */ +#define LL_C2_APB3_GRP1_PERIPH_BLE RCC_C2APB3ENR_BLEEN +#if defined(RCC_802_SUPPORT) +#define LL_C2_APB3_GRP1_PERIPH_802 RCC_C2APB3ENR_802EN +#endif /* RCC_802_SUPPORT */ +/** + * @} + */ + + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup BUS_LL_Exported_Functions BUS Exported Functions + * @{ + */ + +/** @defgroup BUS_LL_EF_AHB1 AHB1 + * @{ + */ + +/** + * @brief Enable AHB1 peripherals clock. + * @rmtoll AHB1ENR DMA1EN LL_AHB1_GRP1_EnableClock\n + * AHB1ENR DMA2EN LL_AHB1_GRP1_EnableClock\n + * AHB1ENR DMAMUX1EN LL_AHB1_GRP1_EnableClock\n + * AHB1ENR CRCEN LL_AHB1_GRP1_EnableClock\n + * AHB1ENR TSCEN LL_AHB1_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB1_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->AHB1ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->AHB1ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if AHB1 peripheral clock is enabled or not + * @rmtoll AHB1ENR DMA1EN LL_AHB1_GRP1_IsEnabledClock\n + * AHB1ENR DMA2EN LL_AHB1_GRP1_IsEnabledClock\n + * AHB1ENR DMAMUX1EN LL_AHB1_GRP1_IsEnabledClock\n + * AHB1ENR CRCEN LL_AHB1_GRP1_IsEnabledClock\n + * AHB1ENR TSCEN LL_AHB1_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_AHB1_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->AHB1ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable AHB1 peripherals clock. + * @rmtoll AHB1ENR DMA1EN LL_AHB1_GRP1_DisableClock\n + * AHB1ENR DMA2EN LL_AHB1_GRP1_DisableClock\n + * AHB1ENR DMAMUX1EN LL_AHB1_GRP1_DisableClock\n + * AHB1ENR CRCEN LL_AHB1_GRP1_DisableClock\n + * AHB1ENR TSCEN LL_AHB1_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB1_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB1ENR, Periphs); +} + +/** + * @brief Force AHB1 peripherals reset. + * @rmtoll AHB1RSTR DMA1RST LL_AHB1_GRP1_ForceReset\n + * AHB1RSTR DMA2RST LL_AHB1_GRP1_ForceReset\n + * AHB1RSTR DMAMUX1RST LL_AHB1_GRP1_ForceReset\n + * AHB1RSTR CRCRST LL_AHB1_GRP1_ForceReset\n + * AHB1RSTR TSCRST LL_AHB1_GRP1_ForceReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB1_GRP1_PERIPH_ALL + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB1_GRP1_ForceReset(uint32_t Periphs) +{ + SET_BIT(RCC->AHB1RSTR, Periphs); +} + +/** + * @brief Release AHB1 peripherals reset. + * @rmtoll AHB1RSTR DMA1RST LL_AHB1_GRP1_ReleaseReset\n + * AHB1RSTR DMA2RST LL_AHB1_GRP1_ReleaseReset\n + * AHB1RSTR DMAMUX1RST LL_AHB1_GRP1_ReleaseReset\n + * AHB1RSTR CRCRST LL_AHB1_GRP1_ReleaseReset\n + * AHB1RSTR TSCRST LL_AHB1_GRP1_ReleaseReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB1_GRP1_PERIPH_ALL + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB1RSTR, Periphs); +} + +/** + * @brief Enable AHB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll AHB1SMENR DMA1SMEN LL_AHB1_GRP1_EnableClockSleep\n + * AHB1SMENR DMA2SMEN LL_AHB1_GRP1_EnableClockSleep\n + * AHB1SMENR DMAMUX1SMEN LL_AHB1_GRP1_EnableClockSleep\n + * AHB1SMENR SRAM1SMEN LL_AHB1_GRP1_EnableClockSleep\n + * AHB1SMENR CRCSMEN LL_AHB1_GRP1_EnableClockSleep\n + * AHB1SMENR TSCSMEN LL_AHB1_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM1 + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB1_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->AHB1SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->AHB1SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable AHB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll AHB1SMENR DMA1SMEN LL_AHB1_GRP1_DisableClockSleep\n + * AHB1SMENR DMA2SMEN LL_AHB1_GRP1_DisableClockSleep\n + * AHB1SMENR DMAMUX1SMEN LL_AHB1_GRP1_DisableClockSleep\n + * AHB1SMENR SRAM1SMEN LL_AHB1_GRP1_DisableClockSleep\n + * AHB1SMENR CRCSMEN LL_AHB1_GRP1_DisableClockSleep\n + * AHB1SMENR TSCSMEN LL_AHB1_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_AHB1_GRP1_PERIPH_SRAM1 + * @arg @ref LL_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB1_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB1SMENR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_AHB2 AHB2 + * @{ + */ + +/** + * @brief Enable AHB2 peripherals clock. + * @rmtoll AHB2ENR GPIOAEN LL_AHB2_GRP1_EnableClock\n + * AHB2ENR GPIOBEN LL_AHB2_GRP1_EnableClock\n + * AHB2ENR GPIOCEN LL_AHB2_GRP1_EnableClock\n + * AHB2ENR GPIODEN LL_AHB2_GRP1_EnableClock\n + * AHB2ENR GPIOEEN LL_AHB2_GRP1_EnableClock\n + * AHB2ENR GPIOHEN LL_AHB2_GRP1_EnableClock\n + * AHB2ENR ADCEN LL_AHB2_GRP1_EnableClock\n + * AHB2ENR AES1EN LL_AHB2_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB2_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->AHB2ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->AHB2ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if AHB2 peripheral clock is enabled or not + * @rmtoll AHB2ENR GPIOAEN LL_AHB2_GRP1_IsEnabledClock\n + * AHB2ENR GPIOBEN LL_AHB2_GRP1_IsEnabledClock\n + * AHB2ENR GPIOCEN LL_AHB2_GRP1_IsEnabledClock\n + * AHB2ENR GPIODEN LL_AHB2_GRP1_IsEnabledClock\n + * AHB2ENR GPIOEEN LL_AHB2_GRP1_IsEnabledClock\n + * AHB2ENR GPIOHEN LL_AHB2_GRP1_IsEnabledClock\n + * AHB2ENR ADCEN LL_AHB2_GRP1_IsEnabledClock\n + * AHB2ENR AES1EN LL_AHB2_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_AHB2_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->AHB2ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable AHB2 peripherals clock. + * @rmtoll AHB2ENR GPIOAEN LL_AHB2_GRP1_DisableClock\n + * AHB2ENR GPIOBEN LL_AHB2_GRP1_DisableClock\n + * AHB2ENR GPIOCEN LL_AHB2_GRP1_DisableClock\n + * AHB2ENR GPIODEN LL_AHB2_GRP1_DisableClock\n + * AHB2ENR GPIOEEN LL_AHB2_GRP1_DisableClock\n + * AHB2ENR GPIOHEN LL_AHB2_GRP1_DisableClock\n + * AHB2ENR ADCEN LL_AHB2_GRP1_DisableClock\n + * AHB2ENR AES1EN LL_AHB2_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB2_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB2ENR, Periphs); +} + +/** + * @brief Force AHB2 peripherals reset. + * @rmtoll AHB2RSTR GPIOARST LL_AHB2_GRP1_ForceReset\n + * AHB2RSTR GPIOBRST LL_AHB2_GRP1_ForceReset\n + * AHB2RSTR GPIOCRST LL_AHB2_GRP1_ForceReset\n + * AHB2RSTR GPIODRST LL_AHB2_GRP1_ForceReset\n + * AHB2RSTR GPIOERST LL_AHB2_GRP1_ForceReset\n + * AHB2RSTR GPIOHRST LL_AHB2_GRP1_ForceReset\n + * AHB2RSTR ADCRST LL_AHB2_GRP1_ForceReset\n + * AHB2RSTR AES1RST LL_AHB2_GRP1_ForceReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_ALL + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB2_GRP1_ForceReset(uint32_t Periphs) +{ + SET_BIT(RCC->AHB2RSTR, Periphs); +} + +/** + * @brief Release AHB2 peripherals reset. + * @rmtoll AHB2RSTR GPIOARST LL_AHB2_GRP1_ReleaseReset\n + * AHB2RSTR GPIOBRST LL_AHB2_GRP1_ReleaseReset\n + * AHB2RSTR GPIOCRST LL_AHB2_GRP1_ReleaseReset\n + * AHB2RSTR GPIODRST LL_AHB2_GRP1_ReleaseReset\n + * AHB2RSTR GPIOERST LL_AHB2_GRP1_ReleaseReset\n + * AHB2RSTR GPIOHRST LL_AHB2_GRP1_ReleaseReset\n + * AHB2RSTR ADCRST LL_AHB2_GRP1_ReleaseReset\n + * AHB2RSTR AES1RST LL_AHB2_GRP1_ReleaseReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_ALL + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB2_GRP1_ReleaseReset(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB2RSTR, Periphs); +} + +/** + * @brief Enable AHB2 peripherals clock during Low Power (Sleep) mode. + * @rmtoll AHB2SMENR GPIOASMEN LL_AHB2_GRP1_EnableClockSleep\n + * AHB2SMENR GPIOBSMEN LL_AHB2_GRP1_EnableClockSleep\n + * AHB2SMENR GPIOCSMEN LL_AHB2_GRP1_EnableClockSleep\n + * AHB2SMENR GPIODSMEN LL_AHB2_GRP1_EnableClockSleep\n + * AHB2SMENR GPIOESMEN LL_AHB2_GRP1_EnableClockSleep\n + * AHB2SMENR GPIOHSMEN LL_AHB2_GRP1_EnableClockSleep\n + * AHB2SMENR ADCSMEN LL_AHB2_GRP1_EnableClockSleep\n + * AHB2SMENR AES1SMEN LL_AHB2_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB2_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->AHB2SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->AHB2SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable AHB2 peripherals clock during Low Power (Sleep) mode. + * @rmtoll AHB2SMENR GPIOASMEN LL_AHB2_GRP1_DisableClockSleep\n + * AHB2SMENR GPIOBSMEN LL_AHB2_GRP1_DisableClockSleep\n + * AHB2SMENR GPIOCSMEN LL_AHB2_GRP1_DisableClockSleep\n + * AHB2SMENR GPIODSMEN LL_AHB2_GRP1_DisableClockSleep\n + * AHB2SMENR GPIOESMEN LL_AHB2_GRP1_DisableClockSleep\n + * AHB2SMENR GPIOHSMEN LL_AHB2_GRP1_DisableClockSleep\n + * AHB2SMENR ADCSMEN LL_AHB2_GRP1_DisableClockSleep\n + * AHB2SMENR AES1SMEN LL_AHB2_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB2_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB2SMENR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_AHB3 AHB3 + * @{ + */ + +/** + * @brief Enable AHB3 peripherals clock. + * @rmtoll AHB3ENR QUADSPIEN LL_AHB3_GRP1_EnableClock\n + * AHB3ENR PKAEN LL_AHB3_GRP1_EnableClock\n + * AHB3ENR AES2EN LL_AHB3_GRP1_EnableClock\n + * AHB3ENR RNGEN LL_AHB3_GRP1_EnableClock\n + * AHB3ENR HSEMEN LL_AHB3_GRP1_EnableClock\n + * AHB3ENR IPCCEN LL_AHB3_GRP1_EnableClock\n + * AHB3ENR FLASHEN LL_AHB3_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB3_GRP1_PERIPH_QUADSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_AHB3_GRP1_PERIPH_HSEM + * @arg @ref LL_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB3_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->AHB3ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->AHB3ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if AHB3 peripheral clock is enabled or not + * @rmtoll AHB3ENR QUADSPIEN LL_AHB3_GRP1_IsEnabledClock\n + * AHB3ENR PKAEN LL_AHB3_GRP1_IsEnabledClock\n + * AHB3ENR AES2EN LL_AHB3_GRP1_IsEnabledClock\n + * AHB3ENR RNGEN LL_AHB3_GRP1_IsEnabledClock\n + * AHB3ENR HSEMEN LL_AHB3_GRP1_IsEnabledClock\n + * AHB3ENR IPCCEN LL_AHB3_GRP1_IsEnabledClock\n + * AHB3ENR FLASHEN LL_AHB3_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB3_GRP1_PERIPH_QUADSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_AHB3_GRP1_PERIPH_HSEM + * @arg @ref LL_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_AHB3_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->AHB3ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable AHB3 peripherals clock. + * @rmtoll AHB3ENR QUADSPIEN LL_AHB3_GRP1_DisableClock\n + * AHB3ENR PKAEN LL_AHB3_GRP1_DisableClock\n + * AHB3ENR AES2EN LL_AHB3_GRP1_DisableClock\n + * AHB3ENR RNGEN LL_AHB3_GRP1_DisableClock\n + * AHB3ENR HSEMEN LL_AHB3_GRP1_DisableClock\n + * AHB3ENR IPCCEN LL_AHB3_GRP1_DisableClock\n + * AHB3ENR FLASHEN LL_AHB3_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB3_GRP1_PERIPH_QUADSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_AHB3_GRP1_PERIPH_HSEM + * @arg @ref LL_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB3_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB3ENR, Periphs); +} + +/** + * @brief Force AHB3 peripherals reset. + * @rmtoll AHB3RSTR QUADSPIRST LL_AHB3_GRP1_ForceReset\n + * AHB3RSTR PKARST LL_AHB3_GRP1_ForceReset\n + * AHB3RSTR AES2RST LL_AHB3_GRP1_ForceReset\n + * AHB3RSTR RNGRST LL_AHB3_GRP1_ForceReset\n + * AHB3RSTR HSEMRST LL_AHB3_GRP1_ForceReset\n + * AHB3RSTR IPCCRST LL_AHB3_GRP1_ForceReset\n + * AHB3RSTR FLASHRST LL_AHB3_GRP1_ForceReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB3_GRP1_PERIPH_ALL + * @arg @ref LL_AHB3_GRP1_PERIPH_QUADSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_AHB3_GRP1_PERIPH_HSEM + * @arg @ref LL_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB3_GRP1_ForceReset(uint32_t Periphs) +{ + SET_BIT(RCC->AHB3RSTR, Periphs); +} + +/** + * @brief Release AHB3 peripherals reset. + * @rmtoll AHB3RSTR QUADSPIRST LL_AHB3_GRP1_ReleaseReset\n + * AHB3RSTR PKARST LL_AHB3_GRP1_ReleaseReset\n + * AHB3RSTR AES2RST LL_AHB3_GRP1_ReleaseReset\n + * AHB3RSTR RNGRST LL_AHB3_GRP1_ReleaseReset\n + * AHB3RSTR HSEMRST LL_AHB3_GRP1_ReleaseReset\n + * AHB3RSTR IPCCRST LL_AHB3_GRP1_ReleaseReset\n + * AHB3RSTR FLASHRST LL_AHB3_GRP1_ReleaseReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB2_GRP1_PERIPH_ALL + * @arg @ref LL_AHB3_GRP1_PERIPH_QUADSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_AHB3_GRP1_PERIPH_HSEM + * @arg @ref LL_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB3_GRP1_ReleaseReset(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB3RSTR, Periphs); +} + +/** + * @brief Enable AHB3 peripherals clock during Low Power (Sleep) mode. + * @rmtoll AHB3SMENR QUADSPISMEN LL_AHB3_GRP1_EnableClockSleep\n + * AHB3SMENR PKASMEN LL_AHB3_GRP1_EnableClockSleep\n + * AHB3SMENR AES2SMEN LL_AHB3_GRP1_EnableClockSleep\n + * AHB3SMENR RNGSMEN LL_AHB3_GRP1_EnableClockSleep\n + * AHB3SMENR SRAM2SMEN LL_AHB3_GRP1_EnableClockSleep\n + * AHB3SMENR FLASHSMEN LL_AHB3_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB3_GRP1_PERIPH_QUADSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_AHB3_GRP1_PERIPH_SRAM2 + * @note (*) Not supported by all the devices + * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH + * @retval None + */ +__STATIC_INLINE void LL_AHB3_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->AHB3SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->AHB3SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable AHB3 peripherals clock during Low Power (Sleep) mode. + * @rmtoll AHB3SMENR QUADSPISMEN LL_AHB3_GRP1_DisableClockSleep\n + * AHB3SMENR PKASMEN LL_AHB3_GRP1_DisableClockSleep\n + * AHB3SMENR AES2SMEN LL_AHB3_GRP1_DisableClockSleep\n + * AHB3SMENR RNGSMEN LL_AHB3_GRP1_DisableClockSleep\n + * AHB3SMENR SRAM2SMEN LL_AHB3_GRP1_DisableClockSleep\n + * AHB3SMENR FLASHSMEN LL_AHB3_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_AHB3_GRP1_PERIPH_QUADSPI (*) + * @arg @ref LL_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_AHB3_GRP1_PERIPH_SRAM2 + * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_AHB3_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->AHB3SMENR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_APB1 APB1 + * @{ + */ + +/** + * @brief Enable APB1 peripherals clock. + * @rmtoll APB1ENR1 TIM2EN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 LCDEN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 RTCAPBEN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 WWDGEN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 SPI2EN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 I2C1EN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 I2C3EN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 CRSEN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 USBEN LL_APB1_GRP1_EnableClock\n + * APB1ENR1 LPTIM1EN LL_APB1_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG + * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->APB1ENR1, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->APB1ENR1, Periphs); + (void)tmpreg; +} + +/** + * @brief Enable APB1 peripherals clock. + * @rmtoll APB1ENR2 LPUART1EN LL_APB1_GRP2_EnableClock\n + * APB1ENR2 LPTIM2EN LL_APB1_GRP2_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP2_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->APB1ENR2, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->APB1ENR2, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if APB1 peripheral clock is enabled or not + * @rmtoll APB1ENR1 TIM2EN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 LCDEN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 RTCAPBEN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 WWDGEN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 SPI2EN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 I2C1EN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 I2C3EN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 CRSEN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 USBEN LL_APB1_GRP1_IsEnabledClock\n + * APB1ENR1 LPTIM1EN LL_APB1_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG + * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->APB1ENR1, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Check if APB1 peripheral clock is enabled or not + * @rmtoll APB1ENR2 LPUART1EN LL_APB1_GRP2_IsEnabledClock\n + * APB1ENR2 LPTIM2EN LL_APB1_GRP2_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_APB1_GRP2_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->APB1ENR2, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable APB1 peripherals clock. + * @rmtoll APB1ENR1 TIM2EN LL_APB1_GRP1_DisableClock\n + * APB1ENR1 LCDEN LL_APB1_GRP1_DisableClock\n + * APB1ENR1 RTCAPBEN LL_APB1_GRP1_DisableClock\n + * APB1ENR1 SPI2EN LL_APB1_GRP1_DisableClock\n + * APB1ENR1 I2C1EN LL_APB1_GRP1_DisableClock\n + * APB1ENR1 I2C3EN LL_APB1_GRP1_DisableClock\n + * APB1ENR1 CRSEN LL_APB1_GRP1_DisableClock\n + * APB1ENR1 USBEN LL_APB1_GRP1_DisableClock\n + * APB1ENR1 LPTIM1EN LL_APB1_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG + * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_ (*) + * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB1ENR1, Periphs); +} + +/** + * @brief Disable APB1 peripherals clock. + * @rmtoll APB1ENR2 LPUART1EN LL_APB1_GRP2_DisableClock\n + * APB1ENR2 LPTIM2EN LL_APB1_GRP2_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP2_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB1ENR2, Periphs); +} + +/** + * @brief Force APB1 peripherals reset. + * @rmtoll APB1RSTR1 TIM2RST LL_APB1_GRP1_ForceReset\n + * APB1RSTR1 LCDRST LL_APB1_GRP1_ForceReset\n + * APB1RSTR1 SPI2RST LL_APB1_GRP1_ForceReset\n + * APB1RSTR1 I2C1RST LL_APB1_GRP1_ForceReset\n + * APB1RSTR1 I2C3RST LL_APB1_GRP1_ForceReset\n + * APB1RSTR1 CRSRST LL_APB1_GRP1_ForceReset\n + * APB1RSTR1 USBRST LL_APB1_GRP1_ForceReset\n + * APB1RSTR1 LPTIM1RST LL_APB1_GRP1_ForceReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP1_PERIPH_ALL + * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs) +{ + SET_BIT(RCC->APB1RSTR1, Periphs); +} + +/** + * @brief Force APB1 peripherals reset. + * @rmtoll APB1RSTR2 LPUART1RST LL_APB1_GRP2_ForceReset\n + * APB1RSTR2 LPTIM2RST LL_APB1_GRP2_ForceReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP2_PERIPH_ALL + * @arg @ref LL_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP2_ForceReset(uint32_t Periphs) +{ + SET_BIT(RCC->APB1RSTR2, Periphs); +} + +/** + * @brief Release APB1 peripherals reset. + * @rmtoll APB1RSTR1 TIM2RST LL_APB1_GRP1_ReleaseReset\n + * APB1RSTR1 LCDRST LL_APB1_GRP1_ReleaseReset\n + * APB1RSTR1 SPI2RST LL_APB1_GRP1_ReleaseReset\n + * APB1RSTR1 I2C1RST LL_APB1_GRP1_ReleaseReset\n + * APB1RSTR1 I2C3RST LL_APB1_GRP1_ReleaseReset\n + * APB1RSTR1 CRSRST LL_APB1_GRP1_ReleaseReset\n + * APB1RSTR1 USBRST LL_APB1_GRP1_ReleaseReset\n + * APB1RSTR1 LPTIM1RST LL_APB1_GRP1_ReleaseReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP1_PERIPH_ALL + * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB1RSTR1, Periphs); +} + +/** + * @brief Release APB1 peripherals reset. + * @rmtoll APB1RSTR2 LPUART1RST LL_APB1_GRP2_ReleaseReset\n + * APB1RSTR2 LPTIM2RST LL_APB1_GRP2_ReleaseReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP2_PERIPH_ALL + * @arg @ref LL_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP2_ReleaseReset(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB1RSTR2, Periphs); +} + +/** + * @brief Enable APB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll APB1SMENR1 TIM2SMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 LCDSMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 RTCAPBSMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 WWDGSMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 SPI2SMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 I2C1SMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 I2C3SMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 CRSSMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 USBSMEN LL_APB1_GRP1_EnableClockSleep\n + * APB1SMENR1 LPTIM1SMEN LL_APB1_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG + * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->APB1SMENR1, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->APB1SMENR1, Periphs); + (void)tmpreg; +} + +/** + * @brief Enable APB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll APB1SMENR2 LPUART1SMEN LL_APB1_GRP2_EnableClockSleep\n + * APB1SMENR2 LPTIM2SMEN LL_APB1_GRP2_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP2_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->APB1SMENR2, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->APB1SMENR2, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable APB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll APB1SMENR1 TIM2SMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 LCDSMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 RTCAPBSMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 WWDGSMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 SPI2SMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 I2C1SMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 I2C3SMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 CRSSMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 USBSMEN LL_APB1_GRP1_DisableClockSleep\n + * APB1SMENR1 LPTIM1SMEN LL_APB1_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_APB1_GRP1_PERIPH_WWDG + * @arg @ref LL_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB1SMENR1, Periphs); +} + +/** + * @brief Disable APB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll APB1SMENR2 LPUART1SMEN LL_APB1_GRP2_DisableClockSleep\n + * APB1SMENR2 LPTIM2SMEN LL_APB1_GRP2_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB1_GRP2_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB1SMENR2, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_APB2 APB2 + * @{ + */ + +/** + * @brief Enable APB2 peripherals clock. + * @rmtoll APB2ENR ADCEN LL_APB2_GRP1_EnableClock\n + * APB2ENR TIM1EN LL_APB2_GRP1_EnableClock\n + * APB2ENR SPI1EN LL_APB2_GRP1_EnableClock\n + * APB2ENR USART1EN LL_APB2_GRP1_EnableClock\n + * APB2ENR TIM16EN LL_APB2_GRP1_EnableClock\n + * APB2ENR TIM17EN LL_APB2_GRP1_EnableClock\n + * APB2ENR SAI1EN LL_APB2_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB2_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->APB2ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->APB2ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if APB2 peripheral clock is enabled or not + * @rmtoll APB2ENR ADCEN LL_APB2_GRP1_IsEnabledClock\n + * APB2ENR TIM1EN LL_APB2_GRP1_IsEnabledClock\n + * APB2ENR SPI1EN LL_APB2_GRP1_IsEnabledClock\n + * APB2ENR USART1EN LL_APB2_GRP1_IsEnabledClock\n + * APB2ENR TIM16EN LL_APB2_GRP1_IsEnabledClock\n + * APB2ENR TIM17EN LL_APB2_GRP1_IsEnabledClock\n + * APB2ENR SAI1EN LL_APB2_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_APB2_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->APB2ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable APB2 peripherals clock. + * @rmtoll APB2ENR ADCEN LL_APB2_GRP1_DisableClock\n + * APB2ENR TIM1EN LL_APB2_GRP1_DisableClock\n + * APB2ENR SPI1EN LL_APB2_GRP1_DisableClock\n + * APB2ENR USART1EN LL_APB2_GRP1_DisableClock\n + * APB2ENR TIM16EN LL_APB2_GRP1_DisableClock\n + * APB2ENR TIM17EN LL_APB2_GRP1_DisableClock\n + * APB2ENR SAI1EN LL_APB2_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB2_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB2ENR, Periphs); +} + +/** + * @brief Force APB2 peripherals reset. + * @rmtoll APB2RSTR ADCRST LL_APB2_GRP1_ForceReset\n + * APB2RSTR TIM1RST LL_APB2_GRP1_ForceReset\n + * APB2RSTR SPI1RST LL_APB2_GRP1_ForceReset\n + * APB2RSTR USART1RST LL_APB2_GRP1_ForceReset\n + * APB2RSTR TIM16RST LL_APB2_GRP1_ForceReset\n + * APB2RSTR TIM17RST LL_APB2_GRP1_ForceReset\n + * APB2RSTR SAI1RST LL_APB2_GRP1_ForceReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB2_GRP1_PERIPH_ALL + * @arg @ref LL_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB2_GRP1_ForceReset(uint32_t Periphs) +{ + SET_BIT(RCC->APB2RSTR, Periphs); +} + +/** + * @brief Release APB2 peripherals reset. + * @rmtoll APB2RSTR ADCRST LL_APB2_GRP1_ReleaseReset\n + * APB2RSTR TIM1RST LL_APB2_GRP1_ReleaseReset\n + * APB2RSTR SPI1RST LL_APB2_GRP1_ReleaseReset\n + * APB2RSTR USART1RST LL_APB2_GRP1_ReleaseReset\n + * APB2RSTR TIM16RST LL_APB2_GRP1_ReleaseReset\n + * APB2RSTR TIM17RST LL_APB2_GRP1_ReleaseReset\n + * APB2RSTR SAI1RST LL_APB2_GRP1_ReleaseReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB2_GRP1_PERIPH_ALL + * @arg @ref LL_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB2_GRP1_ReleaseReset(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB2RSTR, Periphs); +} + +/** + * @brief Enable APB2 peripherals clock during Low Power (Sleep) mode. + * @rmtoll APB2SMENR ADCSMEN LL_APB2_GRP1_EnableClockSleep\n + * APB2SMENR TIM1SMEN LL_APB2_GRP1_EnableClockSleep\n + * APB2SMENR SPI1SMEN LL_APB2_GRP1_EnableClockSleep\n + * APB2SMENR USART1SMEN LL_APB2_GRP1_EnableClockSleep\n + * APB2SMENR TIM16SMEN LL_APB2_GRP1_EnableClockSleep\n + * APB2SMENR TIM17SMEN LL_APB2_GRP1_EnableClockSleep\n + * APB2SMENR SAI1SMEN LL_APB2_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB2_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->APB2SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->APB2SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable APB2 peripherals clock during Low Power (Sleep) mode. + * @rmtoll APB2SMENR ADCSMEN LL_APB2_GRP1_DisableClockSleep\n + * APB2SMENR TIM1SMEN LL_APB2_GRP1_DisableClockSleep\n + * APB2SMENR SPI1SMEN LL_APB2_GRP1_DisableClockSleep\n + * APB2SMENR USART1SMEN LL_APB2_GRP1_DisableClockSleep\n + * APB2SMENR TIM16SMEN LL_APB2_GRP1_DisableClockSleep\n + * APB2SMENR TIM17SMEN LL_APB2_GRP1_DisableClockSleep\n + * APB2SMENR SAI1SMEN LL_APB2_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_APB2_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB2SMENR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_APB3 APB3 + * @{ + */ + +/** + * @brief Force APB3 peripherals reset. + * @rmtoll APB3RSTR RFRST LL_APB3_GRP1_ForceReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB3_GRP1_PERIPH_RF + * @retval None + */ +__STATIC_INLINE void LL_APB3_GRP1_ForceReset(uint32_t Periphs) +{ + SET_BIT(RCC->APB3RSTR, Periphs); +} + +/** + * @brief Release APB3 peripherals reset. + * @rmtoll APB3RSTR RFRST LL_APB3_GRP1_ReleaseReset + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_APB3_GRP1_PERIPH_RF + * @retval None + */ +__STATIC_INLINE void LL_APB3_GRP1_ReleaseReset(uint32_t Periphs) +{ + CLEAR_BIT(RCC->APB3RSTR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_C2_AHB1 C2 AHB1 + * @{ + */ +/** + * @brief Enable C2AHB1 peripherals clock. + * @rmtoll C2AHB1ENR DMA1EN LL_C2_AHB1_GRP1_EnableClock\n + * C2AHB1ENR DMA2EN LL_C2_AHB1_GRP1_EnableClock\n + * C2AHB1ENR DMAMUX1EN LL_C2_AHB1_GRP1_EnableClock\n + * C2AHB1ENR SRAM1EN LL_C2_AHB1_GRP1_EnableClock\n + * C2AHB1ENR CRCEN LL_C2_AHB1_GRP1_EnableClock\n + * C2AHB1ENR TSCEN LL_C2_AHB1_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_SRAM1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ + +__STATIC_INLINE void LL_C2_AHB1_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2AHB1ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2AHB1ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if C2AHB1 peripheral clock is enabled or not + * @rmtoll C2AHB1ENR DMA1EN LL_C2_AHB1_GRP1_IsEnabledClock\n + * C2AHB1ENR DMA2EN LL_C2_AHB1_GRP1_IsEnabledClock\n + * C2AHB1ENR DMAMUX1EN LL_C2_AHB1_GRP1_IsEnabledClock\n + * C2AHB1ENR SRAM1EN LL_C2_AHB1_GRP1_IsEnabledClock\n + * C2AHB1ENR CRCEN LL_C2_AHB1_GRP1_IsEnabledClock\n + * C2AHB1ENR TSCEN LL_C2_AHB1_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_SRAM1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval uint32_t + */ + +__STATIC_INLINE uint32_t LL_C2_AHB1_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->C2AHB1ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable C2AHB1 peripherals clock. + * @rmtoll C2AHB1ENR DMA1EN LL_C2_AHB1_GRP1_DisableClock\n + * C2AHB1ENR DMA2EN LL_C2_AHB1_GRP1_DisableClock\n + * C2AHB1ENR DMAMUX1EN LL_C2_AHB1_GRP1_DisableClock\n + * C2AHB1ENR SRAM1EN LL_C2_AHB1_GRP1_DisableClock\n + * C2AHB1ENR CRCEN LL_C2_AHB1_GRP1_DisableClock\n + * C2AHB1ENR TSCEN LL_C2_AHB1_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_SRAM1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ + +__STATIC_INLINE void LL_C2_AHB1_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2AHB1ENR, Periphs); +} + +/** + * @brief Enable C2AHB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2AHB1SMENR DMA1SMEN LL_C2_AHB1_GRP1_EnableClockSleep\n + * C2AHB1SMENR DMA2SMEN LL_C2_AHB1_GRP1_EnableClockSleep\n + * C2AHB1SMENR DMAMUX1SMEN LL_C2_AHB1_GRP1_EnableClockSleep\n + * C2AHB1ENR SRAM1SMEN LL_C2_AHB1_GRP1_EnableClockSleep\n + * C2AHB1SMENR CRCSMEN LL_C2_AHB1_GRP1_EnableClockSleep\n + * C2AHB1SMENR TSCSMEN LL_C2_AHB1_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_SRAM1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ + +__STATIC_INLINE void LL_C2_AHB1_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2AHB1SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2AHB1SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable C2AHB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2AHB1SMENR DMA1SMEN LL_C2_AHB1_GRP1_DisableClockSleep\n + * C2AHB1SMENR DMA2SMEN LL_C2_AHB1_GRP1_DisableClockSleep\n + * C2AHB1SMENR DMAMUX1SMEN LL_C2_AHB1_GRP1_DisableClockSleep\n + * C2AHB1ENR SRAM1SMEN LL_C2_AHB1_GRP1_DisableClockSleep\n + * C2AHB1SMENR CRCSMEN LL_C2_AHB1_GRP1_DisableClockSleep\n + * C2AHB1SMENR TSCSMEN LL_C2_AHB1_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMA2 (*) + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_DMAMUX1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_SRAM1 + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_CRC + * @arg @ref LL_C2_AHB1_GRP1_PERIPH_TSC + * @note (*) Not supported by all the devices + * @retval None + */ + +__STATIC_INLINE void LL_C2_AHB1_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2AHB1SMENR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_C2_AHB2 C2 AHB2 + * @{ + */ + +/** + * @brief Enable C2AHB2 peripherals clock. + * @rmtoll C2AHB2ENR GPIOAEN LL_C2_AHB2_GRP1_EnableClock\n + * C2AHB2ENR GPIOBEN LL_C2_AHB2_GRP1_EnableClock\n + * C2AHB2ENR GPIOCEN LL_C2_AHB2_GRP1_EnableClock\n + * C2AHB2ENR GPIODEN LL_C2_AHB2_GRP1_EnableClock\n + * C2AHB2ENR GPIOEEN LL_C2_AHB2_GRP1_EnableClock\n + * C2AHB2ENR GPIOHEN LL_C2_AHB2_GRP1_EnableClock\n + * C2AHB2ENR ADCEN LL_C2_AHB2_GRP1_EnableClock\n + * C2AHB2ENR AES1EN LL_C2_AHB2_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB2_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2AHB2ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2AHB2ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if C2AHB2 peripheral clock is enabled or not + * @rmtoll C2AHB2ENR GPIOAEN LL_C2_AHB2_GRP1_IsEnabledClock\n + * C2AHB2ENR GPIOBEN LL_C2_AHB2_GRP1_IsEnabledClock\n + * C2AHB2ENR GPIOCEN LL_C2_AHB2_GRP1_IsEnabledClock\n + * C2AHB2ENR GPIODEN LL_C2_AHB2_GRP1_IsEnabledClock\n + * C2AHB2ENR GPIOEEN LL_C2_AHB2_GRP1_IsEnabledClock\n + * C2AHB2ENR GPIOHEN LL_C2_AHB2_GRP1_IsEnabledClock\n + * C2AHB2ENR ADCEN LL_C2_AHB2_GRP1_IsEnabledClock\n + * C2AHB2ENR AES1EN LL_C2_AHB2_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_C2_AHB2_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->C2AHB2ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable C2AHB2 peripherals clock. + * @rmtoll C2AHB2ENR GPIOAEN LL_C2_AHB2_GRP1_DisableClock\n + * C2AHB2ENR GPIOBEN LL_C2_AHB2_GRP1_DisableClock\n + * C2AHB2ENR GPIOCEN LL_C2_AHB2_GRP1_DisableClock\n + * C2AHB2ENR GPIODEN LL_C2_AHB2_GRP1_DisableClock\n + * C2AHB2ENR GPIOEEN LL_C2_AHB2_GRP1_DisableClock\n + * C2AHB2ENR GPIOHEN LL_C2_AHB2_GRP1_DisableClock\n + * C2AHB2ENR ADCEN LL_C2_AHB2_GRP1_DisableClock\n + * C2AHB2ENR AES1EN LL_C2_AHB2_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB2_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2AHB2ENR, Periphs); +} + +/** + * @brief Enable C2AHB2 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2AHB2SMENR GPIOASMEN LL_C2_AHB2_GRP1_EnableClockSleep\n + * C2AHB2SMENR GPIOBSMEN LL_C2_AHB2_GRP1_EnableClockSleep\n + * C2AHB2SMENR GPIOCSMEN LL_C2_AHB2_GRP1_EnableClockSleep\n + * C2AHB2SMENR GPIODSMEN LL_C2_AHB2_GRP1_EnableClockSleep\n + * C2AHB2SMENR GPIOESMEN LL_C2_AHB2_GRP1_EnableClockSleep\n + * C2AHB2SMENR GPIOHSMEN LL_C2_AHB2_GRP1_EnableClockSleep\n + * C2AHB2SMENR ADCSMEN LL_C2_AHB2_GRP1_EnableClockSleep\n + * C2AHB2SMENR AES1SMEN LL_C2_AHB2_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB2_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2AHB2SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2AHB2SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable C2AHB2 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2AHB2SMENR GPIOASMEN LL_C2_AHB2_GRP1_DisableClockSleep\n + * C2AHB2SMENR GPIOBSMEN LL_C2_AHB2_GRP1_DisableClockSleep\n + * C2AHB2SMENR GPIOCSMEN LL_C2_AHB2_GRP1_DisableClockSleep\n + * C2AHB2SMENR GPIODSMEN LL_C2_AHB2_GRP1_DisableClockSleep\n + * C2AHB2SMENR GPIOESMEN LL_C2_AHB2_GRP1_DisableClockSleep\n + * C2AHB2SMENR GPIOHSMEN LL_C2_AHB2_GRP1_DisableClockSleep\n + * C2AHB2SMENR ADCSMEN LL_C2_AHB2_GRP1_DisableClockSleep\n + * C2AHB2SMENR AES1SMEN LL_C2_AHB2_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOA + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOB + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOC + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOD (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOE + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_GPIOH + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_AHB2_GRP1_PERIPH_AES1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB2_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2AHB2SMENR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_C2_AHB3 C2 AHB3 + * @{ + */ + +/** + * @brief Enable C2AHB3 peripherals clock. + * @rmtoll C2AHB3ENR PKAEN LL_C2_AHB3_GRP1_EnableClock\n + * C2AHB3ENR AES2EN LL_C2_AHB3_GRP1_EnableClock\n + * C2AHB3ENR RNGEN LL_C2_AHB3_GRP1_EnableClock\n + * C2AHB3ENR HSEMEN LL_C2_AHB3_GRP1_EnableClock\n + * C2AHB3ENR IPCCEN LL_C2_AHB3_GRP1_EnableClock\n + * C2AHB3ENR FLASHEN LL_C2_AHB3_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_HSEM + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_FLASH + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB3_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2AHB3ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2AHB3ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if C2AHB3 peripheral clock is enabled or not + * @rmtoll C2AHB3ENR PKAEN LL_C2_AHB3_GRP1_IsEnabledClock\n + * C2AHB3ENR AES2EN LL_C2_AHB3_GRP1_IsEnabledClock\n + * C2AHB3ENR RNGEN LL_C2_AHB3_GRP1_IsEnabledClock\n + * C2AHB3ENR HSEMEN LL_C2_AHB3_GRP1_IsEnabledClock\n + * C2AHB3ENR IPCCEN LL_C2_AHB3_GRP1_IsEnabledClock\n + * C2AHB3ENR FLASHEN LL_C2_AHB3_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_HSEM + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_FLASH + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_C2_AHB3_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->C2AHB3ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable C2AHB3 peripherals clock. + * @rmtoll C2AHB3ENR PKAEN LL_C2_AHB3_GRP1_DisableClock\n + * C2AHB3ENR AES2EN LL_C2_AHB3_GRP1_DisableClock\n + * C2AHB3ENR RNGEN LL_C2_AHB3_GRP1_DisableClock\n + * C2AHB3ENR HSEMEN LL_C2_AHB3_GRP1_DisableClock\n + * C2AHB3ENR IPCCEN LL_C2_AHB3_GRP1_DisableClock\n + * C2AHB3ENR FLASHEN LL_C2_AHB3_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_HSEM + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_IPCC + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_FLASH + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB3_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2AHB3ENR, Periphs); +} + +/** + * @brief Enable C2AHB3 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2AHB3SMENR PKASMEN LL_C2_AHB3_GRP1_EnableClockSleep\n + * C2AHB3SMENR AES2SMEN LL_C2_AHB3_GRP1_EnableClockSleep\n + * C2AHB3SMENR RNGSMEN LL_C2_AHB3_GRP1_EnableClockSleep\n + * C2AHB3SMENR SRAM2SMEN LL_C2_AHB3_GRP1_EnableClockSleep\n + * C2AHB3SMENR FLASHSMEN LL_C2_AHB3_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_SRAM2 + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_FLASH + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB3_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2AHB3SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2AHB3SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable C2AHB3 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2AHB3SMENR PKASMEN LL_C2_AHB3_GRP1_DisableClockSleep\n + * C2AHB3SMENR AES2SMEN LL_C2_AHB3_GRP1_DisableClockSleep\n + * C2AHB3SMENR RNGSMEN LL_C2_AHB3_GRP1_DisableClockSleep\n + * C2AHB3SMENR SRAM2SMEN LL_C2_AHB3_GRP1_DisableClockSleep\n + * C2AHB3SMENR FLASHSMEN LL_C2_AHB3_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_PKA + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_AES2 + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_RNG + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_SRAM2 + * @arg @ref LL_C2_AHB3_GRP1_PERIPH_FLASH + * @retval None + */ +__STATIC_INLINE void LL_C2_AHB3_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2AHB3SMENR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_C2_APB1 C2 APB1 + * @{ + */ + +/** + * @brief Enable C2APB1 peripherals clock. + * @rmtoll C2APB1ENR1 TIM2EN LL_C2_APB1_GRP1_EnableClock\n + * C2APB1ENR1 LCDEN LL_C2_APB1_GRP1_EnableClock\n + * C2APB1ENR1 RTCAPBEN LL_C2_APB1_GRP1_EnableClock\n + * C2APB1ENR1 SPI2EN LL_C2_APB1_GRP1_EnableClock\n + * C2APB1ENR1 I2C1EN LL_C2_APB1_GRP1_EnableClock\n + * C2APB1ENR1 I2C3EN LL_C2_APB1_GRP1_EnableClock\n + * C2APB1ENR1 CRSEN LL_C2_APB1_GRP1_EnableClock\n + * C2APB1ENR1 USBEN LL_C2_APB1_GRP1_EnableClock\n + * C2APB1ENR1 LPTIM1EN LL_C2_APB1_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_C2_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB1_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2APB1ENR1, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2APB1ENR1, Periphs); + (void)tmpreg; +} + +/** + * @brief Enable C2APB1 peripherals clock. + * @rmtoll C2APB1ENR2 LPUART1EN LL_C2_APB1_GRP2_EnableClock\n + * C2APB1ENR2 LPTIM2EN LL_C2_APB1_GRP2_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB1_GRP2_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2APB1ENR2, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2APB1ENR2, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if C2APB1 peripheral clock is enabled or not + * @rmtoll C2APB1ENR1 TIM2EN LL_C2_APB1_GRP1_IsEnabledClock\n + * C2APB1ENR1 LCDEN LL_C2_APB1_GRP1_IsEnabledClock\n + * C2APB1ENR1 RTCAPBEN LL_C2_APB1_GRP1_IsEnabledClock\n + * C2APB1ENR1 SPI2EN LL_C2_APB1_GRP1_IsEnabledClock\n + * C2APB1ENR1 I2C1EN LL_C2_APB1_GRP1_IsEnabledClock\n + * C2APB1ENR1 I2C3EN LL_C2_APB1_GRP1_IsEnabledClock\n + * C2APB1ENR1 CRSEN LL_C2_APB1_GRP1_IsEnabledClock\n + * C2APB1ENR1 USBEN LL_C2_APB1_GRP1_IsEnabledClock\n + * C2APB1ENR1 LPTIM1EN LL_C2_APB1_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_C2_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_C2_APB1_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->C2APB1ENR1, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Check if C2APB1 peripheral clock is enabled or not + * @rmtoll C2APB1ENR2 LPUART1EN LL_C2_APB1_GRP2_IsEnabledClock\n + * C2APB1ENR2 LPTIM2EN LL_C2_APB1_GRP2_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_C2_APB1_GRP2_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->C2APB1ENR2, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable C2APB1 peripherals clock. + * @rmtoll C2APB1ENR1 TIM2EN LL_C2_APB1_GRP1_DisableClock\n + * C2APB1ENR1 LCDEN LL_C2_APB1_GRP1_DisableClock\n + * C2APB1ENR1 RTCAPBEN LL_C2_APB1_GRP1_DisableClock\n + * C2APB1ENR1 SPI2EN LL_C2_APB1_GRP1_DisableClock\n + * C2APB1ENR1 I2C1EN LL_C2_APB1_GRP1_DisableClock\n + * C2APB1ENR1 I2C3EN LL_C2_APB1_GRP1_DisableClock\n + * C2APB1ENR1 CRSEN LL_C2_APB1_GRP1_DisableClock\n + * C2APB1ENR1 USBEN LL_C2_APB1_GRP1_DisableClock\n + * C2APB1ENR1 LPTIM1EN LL_C2_APB1_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_C2_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB1_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2APB1ENR1, Periphs); +} + +/** + * @brief Disable C2APB1 peripherals clock. + * @rmtoll C2APB1ENR2 LPUART1EN LL_C2_APB1_GRP2_DisableClock\n + * C2APB1ENR2 LPTIM2EN LL_C2_APB1_GRP2_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB1_GRP2_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2APB1ENR2, Periphs); +} + +/** + * @brief Enable C2APB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2APB1SMENR1 TIM2SMEN LL_C2_APB1_GRP1_EnableClockSleep\n + * C2APB1SMENR1 LCDSMEN LL_C2_APB1_GRP1_EnableClockSleep\n + * C2APB1SMENR1 RTCAPBSMEN LL_C2_APB1_GRP1_EnableClockSleep\n + * C2APB1SMENR1 SPI2SMEN LL_C2_APB1_GRP1_EnableClockSleep\n + * C2APB1SMENR1 I2C1SMEN LL_C2_APB1_GRP1_EnableClockSleep\n + * C2APB1SMENR1 I2C3SMEN LL_C2_APB1_GRP1_EnableClockSleep\n + * C2APB1SMENR1 CRSSMEN LL_C2_APB1_GRP1_EnableClockSleep\n + * C2APB1SMENR1 USBSMEN LL_C2_APB1_GRP1_EnableClockSleep\n + * C2APB1SMENR1 LPTIM1SMEN LL_C2_APB1_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_C2_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB1_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2APB1SMENR1, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2APB1SMENR1, Periphs); + (void)tmpreg; +} + +/** + * @brief Enable C2APB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2APB1SMENR2 LPUART1SMEN LL_C2_APB1_GRP2_EnableClockSleep\n + * C2APB1SMENR2 LPTIM2SMEN LL_C2_APB1_GRP2_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB1_GRP2_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2APB1SMENR2, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2APB1SMENR2, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable C2APB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2APB1SMENR1 TIM2SMEN LL_C2_APB1_GRP1_DisableClockSleep\n + * C2APB1SMENR1 LCDSMEN LL_C2_APB1_GRP1_DisableClockSleep\n + * C2APB1SMENR1 RTCAPBSMEN LL_C2_APB1_GRP1_DisableClockSleep\n + * C2APB1SMENR1 SPI2SMEN LL_C2_APB1_GRP1_DisableClockSleep\n + * C2APB1SMENR1 I2C1SMEN LL_C2_APB1_GRP1_DisableClockSleep\n + * C2APB1SMENR1 I2C3SMEN LL_C2_APB1_GRP1_DisableClockSleep\n + * C2APB1SMENR1 CRSSMEN LL_C2_APB1_GRP1_DisableClockSleep\n + * C2APB1SMENR1 USBSMEN LL_C2_APB1_GRP1_DisableClockSleep\n + * C2APB1SMENR1 LPTIM1SMEN LL_C2_APB1_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP1_PERIPH_TIM2 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LCD (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_RTCAPB + * @arg @ref LL_C2_APB1_GRP1_PERIPH_SPI2 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C1 + * @arg @ref LL_C2_APB1_GRP1_PERIPH_I2C3 (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_CRS (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_USB (*) + * @arg @ref LL_C2_APB1_GRP1_PERIPH_LPTIM1 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB1_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2APB1SMENR1, Periphs); +} + +/** + * @brief Disable C2APB1 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2APB1SMENR2 LPUART1SMEN LL_C2_APB1_GRP2_DisableClockSleep\n + * C2APB1SMENR2 LPTIM2SMEN LL_C2_APB1_GRP2_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPUART1 (*) + * @arg @ref LL_C2_APB1_GRP2_PERIPH_LPTIM2 + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB1_GRP2_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2APB1SMENR2, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_C2_APB2 C2 APB2 + * @{ + */ + +/** + * @brief Enable C2APB2 peripherals clock. + * @rmtoll C2APB2ENR ADCEN LL_C2_APB2_GRP1_EnableClock\n + * C2APB2ENR TIM1EN LL_C2_APB2_GRP1_EnableClock\n + * C2APB2ENR SPI1EN LL_C2_APB2_GRP1_EnableClock\n + * C2APB2ENR USART1EN LL_C2_APB2_GRP1_EnableClock\n + * C2APB2ENR TIM16EN LL_C2_APB2_GRP1_EnableClock\n + * C2APB2ENR TIM17EN LL_C2_APB2_GRP1_EnableClock\n + * C2APB2ENR SAI1EN LL_C2_APB2_GRP1_EnableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB2_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2APB2ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2APB2ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if C2APB2 peripheral clock is enabled or not + * @rmtoll C2APB2ENR ADCEN LL_C2_APB2_GRP1_IsEnabledClock\n + * C2APB2ENR TIM1EN LL_C2_APB2_GRP1_IsEnabledClock\n + * C2APB2ENR SPI1EN LL_C2_APB2_GRP1_IsEnabledClock\n + * C2APB2ENR USART1EN LL_C2_APB2_GRP1_IsEnabledClock\n + * C2APB2ENR TIM16EN LL_C2_APB2_GRP1_IsEnabledClock\n + * C2APB2ENR TIM17EN LL_C2_APB2_GRP1_IsEnabledClock\n + * C2APB2ENR SAI1EN LL_C2_APB2_GRP1_IsEnabledClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_C2_APB2_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->C2APB2ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable C2APB2 peripherals clock. + * @rmtoll C2APB2ENR ADCEN LL_C2_APB2_GRP1_DisableClock\n + * C2APB2ENR TIM1EN LL_C2_APB2_GRP1_DisableClock\n + * C2APB2ENR SPI1EN LL_C2_APB2_GRP1_DisableClock\n + * C2APB2ENR USART1EN LL_C2_APB2_GRP1_DisableClock\n + * C2APB2ENR TIM16EN LL_C2_APB2_GRP1_DisableClock\n + * C2APB2ENR TIM17EN LL_C2_APB2_GRP1_DisableClock\n + * C2APB2ENR SAI1EN LL_C2_APB2_GRP1_DisableClock + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB2_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2APB2ENR, Periphs); +} + +/** + * @brief Enable C2APB2 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2APB2SMENR ADCSMEN LL_C2_APB2_GRP1_EnableClockSleep\n + * C2APB2SMENR TIM1SMEN LL_C2_APB2_GRP1_EnableClockSleep\n + * C2APB2SMENR SPI1SMEN LL_C2_APB2_GRP1_EnableClockSleep\n + * C2APB2SMENR USART1SMEN LL_C2_APB2_GRP1_EnableClockSleep\n + * C2APB2SMENR TIM16SMEN LL_C2_APB2_GRP1_EnableClockSleep\n + * C2APB2SMENR TIM17SMEN LL_C2_APB2_GRP1_EnableClockSleep\n + * C2APB2SMENR SAI1SMEN LL_C2_APB2_GRP1_EnableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB2_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2APB2SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2APB2SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable C2APB2 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2APB2SMENR ADCSMEN LL_C2_APB2_GRP1_DisableClockSleep\n + * C2APB2SMENR TIM1SMEN LL_C2_APB2_GRP1_DisableClockSleep\n + * C2APB2SMENR SPI1SMEN LL_C2_APB2_GRP1_DisableClockSleep\n + * C2APB2SMENR USART1SMEN LL_C2_APB2_GRP1_DisableClockSleep\n + * C2APB2SMENR TIM16SMEN LL_C2_APB2_GRP1_DisableClockSleep\n + * C2APB2SMENR TIM17SMEN LL_C2_APB2_GRP1_DisableClockSleep\n + * C2APB2SMENR SAI1SMEN LL_C2_APB2_GRP1_DisableClockSleep + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB2_GRP1_PERIPH_ADC (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SPI1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_USART1 + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM16 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_TIM17 (*) + * @arg @ref LL_C2_APB2_GRP1_PERIPH_SAI1 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB2_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2APB2SMENR, Periphs); +} + +/** + * @} + */ + +/** @defgroup BUS_LL_EF_C2_APB3 C2 APB3 + * @{ + */ + +/** + * @brief Enable C2APB3 peripherals clock. + * @rmtoll C2APB3ENR BLEEN LL_C2_APB3_GRP1_EnableClock\n + * C2APB3ENR 802EN LL_C2_APB3_GRP1_EnableClock (*) + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB3_GRP1_PERIPH_BLE + * @arg @ref LL_C2_APB3_GRP1_PERIPH_802 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB3_GRP1_EnableClock(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2APB3ENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2APB3ENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Check if C2APB3 peripheral clock is enabled or not + * @rmtoll C2APB3ENR BLEEN LL_C2_APB3_GRP1_IsEnabledClock\n + * C2APB3ENR 802EN LL_C2_APB3_GRP1_IsEnabledClock (*) + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB3_GRP1_PERIPH_BLE + * @arg @ref LL_C2_APB3_GRP1_PERIPH_802 (*) + * @note (*) Not supported by all the devices + * @retval uint32_t + */ +__STATIC_INLINE uint32_t LL_C2_APB3_GRP1_IsEnabledClock(uint32_t Periphs) +{ + return ((READ_BIT(RCC->C2APB3ENR, Periphs) == (Periphs)) ? 1UL : 0UL); +} + +/** + * @brief Disable C2APB3 peripherals clock. + * @rmtoll C2APB3ENR BLEEN LL_C2_APB3_GRP1_DisableClock\n + * C2APB3ENR 802EN LL_C2_APB3_GRP1_DisableClock (*) + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB3_GRP1_PERIPH_BLE + * @arg @ref LL_C2_APB3_GRP1_PERIPH_802 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB3_GRP1_DisableClock(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2APB3ENR, Periphs); +} + +/** + * @brief Enable C2APB3 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2APB3SMENR BLESMEN LL_C2_APB3_GRP1_EnableClockSleep\n + * C2APB3SMENR 802SMEN LL_C2_APB3_GRP1_EnableClockSleep (*) + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB3_GRP1_PERIPH_BLE + * @arg @ref LL_C2_APB3_GRP1_PERIPH_802 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB3_GRP1_EnableClockSleep(uint32_t Periphs) +{ + __IO uint32_t tmpreg; + SET_BIT(RCC->C2APB3SMENR, Periphs); + /* Delay after an RCC peripheral clock enabling */ + tmpreg = READ_BIT(RCC->C2APB3SMENR, Periphs); + (void)tmpreg; +} + +/** + * @brief Disable C2APB3 peripherals clock during Low Power (Sleep) mode. + * @rmtoll C2APB3SMENR BLESMEN LL_C2_APB3_GRP1_DisableClockSleep\n + * C2APB3SMENR 802SMEN LL_C2_APB3_GRP1_DisableClockSleep (*) + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_APB3_GRP1_PERIPH_BLE + * @arg @ref LL_C2_APB3_GRP1_PERIPH_802 (*) + * @note (*) Not supported by all the devices + * @retval None + */ +__STATIC_INLINE void LL_C2_APB3_GRP1_DisableClockSleep(uint32_t Periphs) +{ + CLEAR_BIT(RCC->C2APB3SMENR, Periphs); +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined(RCC) */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_BUS_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h new file mode 100644 index 0000000..4101f2f --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_cortex.h @@ -0,0 +1,644 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_cortex.h + * @author MCD Application Team + * @brief Header file of CORTEX LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + The LL CORTEX driver contains a set of generic APIs that can be + used by user: + (+) SYSTICK configuration used by LL_mDelay and LL_Init1msTick + functions + (+) Low power mode configuration (SCB register of Cortex-MCU) + (+) MPU API to configure and enable regions + (+) API to access to MCU info (CPUID register) + (+) API to enable fault handler (SHCSR accesses) + + @endverbatim + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_CORTEX_H +#define STM32WBxx_LL_CORTEX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +/** @defgroup CORTEX_LL CORTEX + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ + +/* Private macros ------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup CORTEX_LL_Exported_Constants CORTEX Exported Constants + * @{ + */ + +/** @defgroup CORTEX_LL_EC_CLKSOURCE_HCLK SYSTICK Clock Source + * @{ + */ +#define LL_SYSTICK_CLKSOURCE_HCLK_DIV8 0x00000000U /*!< AHB clock divided by 8 selected as SysTick clock source.*/ +#define LL_SYSTICK_CLKSOURCE_HCLK SysTick_CTRL_CLKSOURCE_Msk /*!< AHB clock selected as SysTick clock source. */ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_FAULT Handler Fault type + * @{ + */ +#define LL_HANDLER_FAULT_USG SCB_SHCSR_USGFAULTENA_Msk /*!< Usage fault */ +#define LL_HANDLER_FAULT_BUS SCB_SHCSR_BUSFAULTENA_Msk /*!< Bus fault */ +#define LL_HANDLER_FAULT_MEM SCB_SHCSR_MEMFAULTENA_Msk /*!< Memory management fault */ +/** + * @} + */ + + +#if __MPU_PRESENT + +/** @defgroup CORTEX_LL_EC_CTRL_HFNMI_PRIVDEF MPU Control + * @{ + */ +#define LL_MPU_CTRL_HFNMI_PRIVDEF_NONE 0x00000000U /*!< Disable NMI and privileged SW access */ +#define LL_MPU_CTRL_HARDFAULT_NMI MPU_CTRL_HFNMIENA_Msk /*!< Enables the operation of MPU during hard fault, NMI, and FAULTMASK handlers */ +#define LL_MPU_CTRL_PRIVILEGED_DEFAULT MPU_CTRL_PRIVDEFENA_Msk /*!< Enable privileged software access to default memory map */ +#define LL_MPU_CTRL_HFNMI_PRIVDEF (MPU_CTRL_HFNMIENA_Msk | MPU_CTRL_PRIVDEFENA_Msk) /*!< Enable NMI and privileged SW access */ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_REGION MPU Region Number + * @{ + */ +#define LL_MPU_REGION_NUMBER0 0x00U /*!< REGION Number 0 */ +#define LL_MPU_REGION_NUMBER1 0x01U /*!< REGION Number 1 */ +#define LL_MPU_REGION_NUMBER2 0x02U /*!< REGION Number 2 */ +#define LL_MPU_REGION_NUMBER3 0x03U /*!< REGION Number 3 */ +#define LL_MPU_REGION_NUMBER4 0x04U /*!< REGION Number 4 */ +#define LL_MPU_REGION_NUMBER5 0x05U /*!< REGION Number 5 */ +#define LL_MPU_REGION_NUMBER6 0x06U /*!< REGION Number 6 */ +#define LL_MPU_REGION_NUMBER7 0x07U /*!< REGION Number 7 */ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_REGION_SIZE MPU Region Size + * @{ + */ +#define LL_MPU_REGION_SIZE_32B (0x04U << MPU_RASR_SIZE_Pos) /*!< 32B Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_64B (0x05U << MPU_RASR_SIZE_Pos) /*!< 64B Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_128B (0x06U << MPU_RASR_SIZE_Pos) /*!< 128B Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_256B (0x07U << MPU_RASR_SIZE_Pos) /*!< 256B Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_512B (0x08U << MPU_RASR_SIZE_Pos) /*!< 512B Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_1KB (0x09U << MPU_RASR_SIZE_Pos) /*!< 1KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_2KB (0x0AU << MPU_RASR_SIZE_Pos) /*!< 2KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_4KB (0x0BU << MPU_RASR_SIZE_Pos) /*!< 4KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_8KB (0x0CU << MPU_RASR_SIZE_Pos) /*!< 8KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_16KB (0x0DU << MPU_RASR_SIZE_Pos) /*!< 16KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_32KB (0x0EU << MPU_RASR_SIZE_Pos) /*!< 32KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_64KB (0x0FU << MPU_RASR_SIZE_Pos) /*!< 64KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_128KB (0x10U << MPU_RASR_SIZE_Pos) /*!< 128KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_256KB (0x11U << MPU_RASR_SIZE_Pos) /*!< 256KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_512KB (0x12U << MPU_RASR_SIZE_Pos) /*!< 512KB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_1MB (0x13U << MPU_RASR_SIZE_Pos) /*!< 1MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_2MB (0x14U << MPU_RASR_SIZE_Pos) /*!< 2MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_4MB (0x15U << MPU_RASR_SIZE_Pos) /*!< 4MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_8MB (0x16U << MPU_RASR_SIZE_Pos) /*!< 8MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_16MB (0x17U << MPU_RASR_SIZE_Pos) /*!< 16MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_32MB (0x18U << MPU_RASR_SIZE_Pos) /*!< 32MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_64MB (0x19U << MPU_RASR_SIZE_Pos) /*!< 64MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_128MB (0x1AU << MPU_RASR_SIZE_Pos) /*!< 128MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_256MB (0x1BU << MPU_RASR_SIZE_Pos) /*!< 256MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_512MB (0x1CU << MPU_RASR_SIZE_Pos) /*!< 512MB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_1GB (0x1DU << MPU_RASR_SIZE_Pos) /*!< 1GB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_2GB (0x1EU << MPU_RASR_SIZE_Pos) /*!< 2GB Size of the MPU protection region */ +#define LL_MPU_REGION_SIZE_4GB (0x1FU << MPU_RASR_SIZE_Pos) /*!< 4GB Size of the MPU protection region */ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_REGION_PRIVILEDGES MPU Region Privileges + * @{ + */ +#define LL_MPU_REGION_NO_ACCESS (0x00U << MPU_RASR_AP_Pos) /*!< No access*/ +#define LL_MPU_REGION_PRIV_RW (0x01U << MPU_RASR_AP_Pos) /*!< RW privileged (privileged access only)*/ +#define LL_MPU_REGION_PRIV_RW_URO (0x02U << MPU_RASR_AP_Pos) /*!< RW privileged - RO user (Write in a user program generates a fault) */ +#define LL_MPU_REGION_FULL_ACCESS (0x03U << MPU_RASR_AP_Pos) /*!< RW privileged & user (Full access) */ +#define LL_MPU_REGION_PRIV_RO (0x05U << MPU_RASR_AP_Pos) /*!< RO privileged (privileged read only)*/ +#define LL_MPU_REGION_PRIV_RO_URO (0x06U << MPU_RASR_AP_Pos) /*!< RO privileged & user (read only) */ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_TEX MPU TEX Level + * @{ + */ +#define LL_MPU_TEX_LEVEL0 (0x00U << MPU_RASR_TEX_Pos) /*!< b000 for TEX bits */ +#define LL_MPU_TEX_LEVEL1 (0x01U << MPU_RASR_TEX_Pos) /*!< b001 for TEX bits */ +#define LL_MPU_TEX_LEVEL2 (0x02U << MPU_RASR_TEX_Pos) /*!< b010 for TEX bits */ +#define LL_MPU_TEX_LEVEL4 (0x04U << MPU_RASR_TEX_Pos) /*!< b100 for TEX bits */ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_INSTRUCTION_ACCESS MPU Instruction Access + * @{ + */ +#define LL_MPU_INSTRUCTION_ACCESS_ENABLE 0x00U /*!< Instruction fetches enabled */ +#define LL_MPU_INSTRUCTION_ACCESS_DISABLE MPU_RASR_XN_Msk /*!< Instruction fetches disabled*/ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_SHAREABLE_ACCESS MPU Shareable Access + * @{ + */ +#define LL_MPU_ACCESS_SHAREABLE MPU_RASR_S_Msk /*!< Shareable memory attribute */ +#define LL_MPU_ACCESS_NOT_SHAREABLE 0x00U /*!< Not Shareable memory attribute */ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_CACHEABLE_ACCESS MPU Cacheable Access + * @{ + */ +#define LL_MPU_ACCESS_CACHEABLE MPU_RASR_C_Msk /*!< Cacheable memory attribute */ +#define LL_MPU_ACCESS_NOT_CACHEABLE 0x00U /*!< Not Cacheable memory attribute */ +/** + * @} + */ + +/** @defgroup CORTEX_LL_EC_BUFFERABLE_ACCESS MPU Bufferable Access + * @{ + */ +#define LL_MPU_ACCESS_BUFFERABLE MPU_RASR_B_Msk /*!< Bufferable memory attribute */ +#define LL_MPU_ACCESS_NOT_BUFFERABLE 0x00U /*!< Not Bufferable memory attribute */ +/** + * @} + */ +#endif /* __MPU_PRESENT */ +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup CORTEX_LL_Exported_Functions CORTEX Exported Functions + * @{ + */ + +/** @defgroup CORTEX_LL_EF_SYSTICK SYSTICK + * @{ + */ + +/** + * @brief This function checks if the Systick counter flag is active or not. + * @note It can be used in timeout function on application side. + * @rmtoll STK_CTRL COUNTFLAG LL_SYSTICK_IsActiveCounterFlag + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSTICK_IsActiveCounterFlag(void) +{ + return (((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == (SysTick_CTRL_COUNTFLAG_Msk)) ? 1UL : 0UL); +} + +/** + * @brief Configures the SysTick clock source + * @rmtoll STK_CTRL CLKSOURCE LL_SYSTICK_SetClkSource + * @param Source This parameter can be one of the following values: + * @arg @ref LL_SYSTICK_CLKSOURCE_HCLK_DIV8 + * @arg @ref LL_SYSTICK_CLKSOURCE_HCLK + * @retval None + */ +__STATIC_INLINE void LL_SYSTICK_SetClkSource(uint32_t Source) +{ + if (Source == LL_SYSTICK_CLKSOURCE_HCLK) + { + SET_BIT(SysTick->CTRL, LL_SYSTICK_CLKSOURCE_HCLK); + } + else + { + CLEAR_BIT(SysTick->CTRL, LL_SYSTICK_CLKSOURCE_HCLK); + } +} + +/** + * @brief Get the SysTick clock source + * @rmtoll STK_CTRL CLKSOURCE LL_SYSTICK_GetClkSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_SYSTICK_CLKSOURCE_HCLK_DIV8 + * @arg @ref LL_SYSTICK_CLKSOURCE_HCLK + */ +__STATIC_INLINE uint32_t LL_SYSTICK_GetClkSource(void) +{ + return READ_BIT(SysTick->CTRL, LL_SYSTICK_CLKSOURCE_HCLK); +} + +/** + * @brief Enable SysTick exception request + * @rmtoll STK_CTRL TICKINT LL_SYSTICK_EnableIT + * @retval None + */ +__STATIC_INLINE void LL_SYSTICK_EnableIT(void) +{ + SET_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk); +} + +/** + * @brief Disable SysTick exception request + * @rmtoll STK_CTRL TICKINT LL_SYSTICK_DisableIT + * @retval None + */ +__STATIC_INLINE void LL_SYSTICK_DisableIT(void) +{ + CLEAR_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk); +} + +/** + * @brief Checks if the SYSTICK interrupt is enabled or disabled. + * @rmtoll STK_CTRL TICKINT LL_SYSTICK_IsEnabledIT + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSTICK_IsEnabledIT(void) +{ + return ((READ_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk) == (SysTick_CTRL_TICKINT_Msk)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup CORTEX_LL_EF_LOW_POWER_MODE LOW POWER MODE + * @{ + */ + +/** + * @brief Processor uses sleep as its low power mode + * @rmtoll SCB_SCR SLEEPDEEP LL_LPM_EnableSleep + * @retval None + */ +__STATIC_INLINE void LL_LPM_EnableSleep(void) +{ + /* Clear SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); +} + +/** + * @brief Processor uses deep sleep as its low power mode + * @rmtoll SCB_SCR SLEEPDEEP LL_LPM_EnableDeepSleep + * @retval None + */ +__STATIC_INLINE void LL_LPM_EnableDeepSleep(void) +{ + /* Set SLEEPDEEP bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); +} + +/** + * @brief Configures sleep-on-exit when returning from Handler mode to Thread mode. + * @note Setting this bit to 1 enables an interrupt-driven application to avoid returning to an + * empty main application. + * @rmtoll SCB_SCR SLEEPONEXIT LL_LPM_EnableSleepOnExit + * @retval None + */ +__STATIC_INLINE void LL_LPM_EnableSleepOnExit(void) +{ + /* Set SLEEPONEXIT bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPONEXIT_Msk)); +} + +/** + * @brief Do not sleep when returning to Thread mode. + * @rmtoll SCB_SCR SLEEPONEXIT LL_LPM_DisableSleepOnExit + * @retval None + */ +__STATIC_INLINE void LL_LPM_DisableSleepOnExit(void) +{ + /* Clear SLEEPONEXIT bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPONEXIT_Msk)); +} + +/** + * @brief Enabled events and all interrupts, including disabled interrupts, can wakeup the + * processor. + * @rmtoll SCB_SCR SEVEONPEND LL_LPM_EnableEventOnPend + * @retval None + */ +__STATIC_INLINE void LL_LPM_EnableEventOnPend(void) +{ + /* Set SEVEONPEND bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SEVONPEND_Msk)); +} + +/** + * @brief Only enabled interrupts or events can wakeup the processor, disabled interrupts are + * excluded + * @rmtoll SCB_SCR SEVEONPEND LL_LPM_DisableEventOnPend + * @retval None + */ +__STATIC_INLINE void LL_LPM_DisableEventOnPend(void) +{ + /* Clear SEVEONPEND bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SEVONPEND_Msk)); +} + +/** + * @} + */ + +/** @defgroup CORTEX_LL_EF_HANDLER HANDLER + * @{ + */ + +/** + * @brief Enable a fault in System handler control register (SHCSR) + * @rmtoll SCB_SHCSR MEMFAULTENA LL_HANDLER_EnableFault + * @param Fault This parameter can be a combination of the following values: + * @arg @ref LL_HANDLER_FAULT_USG + * @arg @ref LL_HANDLER_FAULT_BUS + * @arg @ref LL_HANDLER_FAULT_MEM + * @retval None + */ +__STATIC_INLINE void LL_HANDLER_EnableFault(uint32_t Fault) +{ + /* Enable the system handler fault */ + SET_BIT(SCB->SHCSR, Fault); +} + +/** + * @brief Disable a fault in System handler control register (SHCSR) + * @rmtoll SCB_SHCSR MEMFAULTENA LL_HANDLER_DisableFault + * @param Fault This parameter can be a combination of the following values: + * @arg @ref LL_HANDLER_FAULT_USG + * @arg @ref LL_HANDLER_FAULT_BUS + * @arg @ref LL_HANDLER_FAULT_MEM + * @retval None + */ +__STATIC_INLINE void LL_HANDLER_DisableFault(uint32_t Fault) +{ + /* Disable the system handler fault */ + CLEAR_BIT(SCB->SHCSR, Fault); +} + +/** + * @} + */ + +/** @defgroup CORTEX_LL_EF_MCU_INFO MCU INFO + * @{ + */ + +/** + * @brief Get Implementer code + * @rmtoll SCB_CPUID IMPLEMENTER LL_CPUID_GetImplementer + * @retval Value should be equal to 0x41 for ARM + */ +__STATIC_INLINE uint32_t LL_CPUID_GetImplementer(void) +{ + return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_IMPLEMENTER_Msk) >> SCB_CPUID_IMPLEMENTER_Pos); +} + +/** + * @brief Get Variant number (The r value in the rnpn product revision identifier) + * @rmtoll SCB_CPUID VARIANT LL_CPUID_GetVariant + * @retval Value between 0 and 255 (0x0: revision 0) + */ +__STATIC_INLINE uint32_t LL_CPUID_GetVariant(void) +{ + return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_VARIANT_Msk) >> SCB_CPUID_VARIANT_Pos); +} + +/** + * @brief Get Constant number + * @rmtoll SCB_CPUID ARCHITECTURE LL_CPUID_GetConstant + * @retval Value should be equal to 0xF for Cortex-M4 devices + */ +__STATIC_INLINE uint32_t LL_CPUID_GetConstant(void) +{ + return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_ARCHITECTURE_Msk) >> SCB_CPUID_ARCHITECTURE_Pos); +} + +/** + * @brief Get Part number + * @rmtoll SCB_CPUID PARTNO LL_CPUID_GetParNo + * @retval Value should be equal to 0xC24 for Cortex-M4 + */ +__STATIC_INLINE uint32_t LL_CPUID_GetParNo(void) +{ + return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_PARTNO_Msk) >> SCB_CPUID_PARTNO_Pos); +} + +/** + * @brief Get Revision number (The p value in the rnpn product revision identifier, indicates patch release) + * @rmtoll SCB_CPUID REVISION LL_CPUID_GetRevision + * @retval Value between 0 and 255 (0x1: patch 1) + */ +__STATIC_INLINE uint32_t LL_CPUID_GetRevision(void) +{ + return (uint32_t)(READ_BIT(SCB->CPUID, SCB_CPUID_REVISION_Msk) >> SCB_CPUID_REVISION_Pos); +} + +/** + * @} + */ + +#if __MPU_PRESENT +/** @defgroup CORTEX_LL_EF_MPU MPU + * @{ + */ + +/** + * @brief Enable MPU with input options + * @rmtoll MPU_CTRL ENABLE LL_MPU_Enable + * @param Options This parameter can be one of the following values: + * @arg @ref LL_MPU_CTRL_HFNMI_PRIVDEF_NONE + * @arg @ref LL_MPU_CTRL_HARDFAULT_NMI + * @arg @ref LL_MPU_CTRL_PRIVILEGED_DEFAULT + * @arg @ref LL_MPU_CTRL_HFNMI_PRIVDEF + * @retval None + */ +__STATIC_INLINE void LL_MPU_Enable(uint32_t Options) +{ + /* Enable the MPU*/ + WRITE_REG(MPU->CTRL, (MPU_CTRL_ENABLE_Msk | Options)); + /* Ensure MPU settings take effects */ + __DSB(); + /* Sequence instruction fetches using update settings */ + __ISB(); +} + +/** + * @brief Disable MPU + * @rmtoll MPU_CTRL ENABLE LL_MPU_Disable + * @retval None + */ +__STATIC_INLINE void LL_MPU_Disable(void) +{ + /* Make sure outstanding transfers are done */ + __DMB(); + /* Disable MPU*/ + WRITE_REG(MPU->CTRL, 0U); +} + +/** + * @brief Check if MPU is enabled or not + * @rmtoll MPU_CTRL ENABLE LL_MPU_IsEnabled + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_MPU_IsEnabled(void) +{ + return ((READ_BIT(MPU->CTRL, MPU_CTRL_ENABLE_Msk) == (MPU_CTRL_ENABLE_Msk)) ? 1UL : 0UL); +} + +/** + * @brief Enable a MPU region + * @rmtoll MPU_RASR ENABLE LL_MPU_EnableRegion + * @param Region This parameter can be one of the following values: + * @arg @ref LL_MPU_REGION_NUMBER0 + * @arg @ref LL_MPU_REGION_NUMBER1 + * @arg @ref LL_MPU_REGION_NUMBER2 + * @arg @ref LL_MPU_REGION_NUMBER3 + * @arg @ref LL_MPU_REGION_NUMBER4 + * @arg @ref LL_MPU_REGION_NUMBER5 + * @arg @ref LL_MPU_REGION_NUMBER6 + * @arg @ref LL_MPU_REGION_NUMBER7 + * @retval None + */ +__STATIC_INLINE void LL_MPU_EnableRegion(uint32_t Region) +{ + /* Set Region number */ + WRITE_REG(MPU->RNR, Region); + /* Enable the MPU region */ + SET_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk); +} + +/** + * @brief Configure and enable a region + * @rmtoll MPU_RNR REGION LL_MPU_ConfigRegion\n + * MPU_RBAR REGION LL_MPU_ConfigRegion\n + * MPU_RBAR ADDR LL_MPU_ConfigRegion\n + * MPU_RASR XN LL_MPU_ConfigRegion\n + * MPU_RASR AP LL_MPU_ConfigRegion\n + * MPU_RASR S LL_MPU_ConfigRegion\n + * MPU_RASR C LL_MPU_ConfigRegion\n + * MPU_RASR B LL_MPU_ConfigRegion\n + * MPU_RASR SIZE LL_MPU_ConfigRegion + * @param Region This parameter can be one of the following values: + * @arg @ref LL_MPU_REGION_NUMBER0 + * @arg @ref LL_MPU_REGION_NUMBER1 + * @arg @ref LL_MPU_REGION_NUMBER2 + * @arg @ref LL_MPU_REGION_NUMBER3 + * @arg @ref LL_MPU_REGION_NUMBER4 + * @arg @ref LL_MPU_REGION_NUMBER5 + * @arg @ref LL_MPU_REGION_NUMBER6 + * @arg @ref LL_MPU_REGION_NUMBER7 + * @param Address Value of region base address + * @param SubRegionDisable Sub-region disable value between Min_Data = 0x00 and Max_Data = 0xFF + * @param Attributes This parameter can be a combination of the following values: + * @arg @ref LL_MPU_REGION_SIZE_32B (*) or @ref LL_MPU_REGION_SIZE_64B (*) or @ref LL_MPU_REGION_SIZE_128B (*) + * or @ref LL_MPU_REGION_SIZE_256B or @ref LL_MPU_REGION_SIZE_512B or @ref LL_MPU_REGION_SIZE_1KB + * or @ref LL_MPU_REGION_SIZE_2KB or @ref LL_MPU_REGION_SIZE_4KB or @ref LL_MPU_REGION_SIZE_8KB + * or @ref LL_MPU_REGION_SIZE_16KB or @ref LL_MPU_REGION_SIZE_32KB or @ref LL_MPU_REGION_SIZE_64KB + * or @ref LL_MPU_REGION_SIZE_128KB or @ref LL_MPU_REGION_SIZE_256KB or @ref LL_MPU_REGION_SIZE_512KB + * or @ref LL_MPU_REGION_SIZE_1MB or @ref LL_MPU_REGION_SIZE_2MB or @ref LL_MPU_REGION_SIZE_4MB + * or @ref LL_MPU_REGION_SIZE_8MB or @ref LL_MPU_REGION_SIZE_16MB or @ref LL_MPU_REGION_SIZE_32MB + * or @ref LL_MPU_REGION_SIZE_64MB or @ref LL_MPU_REGION_SIZE_128MB or @ref LL_MPU_REGION_SIZE_256MB + * or @ref LL_MPU_REGION_SIZE_512MB or @ref LL_MPU_REGION_SIZE_1GB or @ref LL_MPU_REGION_SIZE_2GB + * or @ref LL_MPU_REGION_SIZE_4GB + * @arg @ref LL_MPU_REGION_NO_ACCESS or @ref LL_MPU_REGION_PRIV_RW or @ref LL_MPU_REGION_PRIV_RW_URO + * or @ref LL_MPU_REGION_FULL_ACCESS or @ref LL_MPU_REGION_PRIV_RO or @ref LL_MPU_REGION_PRIV_RO_URO + * @arg @ref LL_MPU_TEX_LEVEL0 or @ref LL_MPU_TEX_LEVEL1 or @ref LL_MPU_TEX_LEVEL2 or @ref LL_MPU_TEX_LEVEL4 + * @arg @ref LL_MPU_INSTRUCTION_ACCESS_ENABLE or @ref LL_MPU_INSTRUCTION_ACCESS_DISABLE + * @arg @ref LL_MPU_ACCESS_SHAREABLE or @ref LL_MPU_ACCESS_NOT_SHAREABLE + * @arg @ref LL_MPU_ACCESS_CACHEABLE or @ref LL_MPU_ACCESS_NOT_CACHEABLE + * @arg @ref LL_MPU_ACCESS_BUFFERABLE or @ref LL_MPU_ACCESS_NOT_BUFFERABLE + * (*) value not defined for CM0+ core. + * @retval None + */ +__STATIC_INLINE void LL_MPU_ConfigRegion(uint32_t Region, uint32_t SubRegionDisable, uint32_t Address, + uint32_t Attributes) +{ + /* Set Region number */ + WRITE_REG(MPU->RNR, Region); + /* Set base address */ + WRITE_REG(MPU->RBAR, (Address & 0xFFFFFFE0U)); + /* Configure MPU */ + WRITE_REG(MPU->RASR, (MPU_RASR_ENABLE_Msk | Attributes | (SubRegionDisable << MPU_RASR_SRD_Pos))); +} + +/** + * @brief Disable a region + * @rmtoll MPU_RNR REGION LL_MPU_DisableRegion\n + * MPU_RASR ENABLE LL_MPU_DisableRegion + * @param Region This parameter can be one of the following values: + * @arg @ref LL_MPU_REGION_NUMBER0 + * @arg @ref LL_MPU_REGION_NUMBER1 + * @arg @ref LL_MPU_REGION_NUMBER2 + * @arg @ref LL_MPU_REGION_NUMBER3 + * @arg @ref LL_MPU_REGION_NUMBER4 + * @arg @ref LL_MPU_REGION_NUMBER5 + * @arg @ref LL_MPU_REGION_NUMBER6 + * @arg @ref LL_MPU_REGION_NUMBER7 + * @retval None + */ +__STATIC_INLINE void LL_MPU_DisableRegion(uint32_t Region) +{ + /* Set Region number */ + WRITE_REG(MPU->RNR, Region); + /* Disable the MPU region */ + CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk); +} + +/** + * @} + */ + +#endif /* __MPU_PRESENT */ +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_CORTEX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h new file mode 100644 index 0000000..619ab90 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_crs.h @@ -0,0 +1,795 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_crs.h + * @author MCD Application Team + * @brief Header file of CRS LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_CRS_H +#define STM32WBxx_LL_CRS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined(CRS) + +/** @defgroup CRS_LL CRS + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ +/** @defgroup CRS_LL_Private_Constants CRS Private Constants + * @{ + */ + +/* Defines used for the bit position in the register and perform offsets*/ +#define CRS_POSITION_TRIM (CRS_CR_TRIM_Pos) /* bit position in CR reg */ +#define CRS_POSITION_FECAP (CRS_ISR_FECAP_Pos) /* bit position in ISR reg */ +#define CRS_POSITION_FELIM (CRS_CFGR_FELIM_Pos) /* bit position in CFGR reg */ + + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup CRS_LL_Exported_Constants CRS Exported Constants + * @{ + */ + +/** @defgroup CRS_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_CRS_ReadReg function + * @{ + */ +#define LL_CRS_ISR_SYNCOKF CRS_ISR_SYNCOKF +#define LL_CRS_ISR_SYNCWARNF CRS_ISR_SYNCWARNF +#define LL_CRS_ISR_ERRF CRS_ISR_ERRF +#define LL_CRS_ISR_ESYNCF CRS_ISR_ESYNCF +#define LL_CRS_ISR_SYNCERR CRS_ISR_SYNCERR +#define LL_CRS_ISR_SYNCMISS CRS_ISR_SYNCMISS +#define LL_CRS_ISR_TRIMOVF CRS_ISR_TRIMOVF +/** + * @} + */ + +/** @defgroup CRS_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_CRS_ReadReg and LL_CRS_WriteReg functions + * @{ + */ +#define LL_CRS_CR_SYNCOKIE CRS_CR_SYNCOKIE +#define LL_CRS_CR_SYNCWARNIE CRS_CR_SYNCWARNIE +#define LL_CRS_CR_ERRIE CRS_CR_ERRIE +#define LL_CRS_CR_ESYNCIE CRS_CR_ESYNCIE +/** + * @} + */ + +/** @defgroup CRS_LL_EC_SYNC_DIV Synchronization Signal Divider + * @{ + */ +#define LL_CRS_SYNC_DIV_1 0x00000000U /*!< Synchro Signal not divided (default) */ +#define LL_CRS_SYNC_DIV_2 CRS_CFGR_SYNCDIV_0 /*!< Synchro Signal divided by 2 */ +#define LL_CRS_SYNC_DIV_4 CRS_CFGR_SYNCDIV_1 /*!< Synchro Signal divided by 4 */ +#define LL_CRS_SYNC_DIV_8 (CRS_CFGR_SYNCDIV_1 | CRS_CFGR_SYNCDIV_0) /*!< Synchro Signal divided by 8 */ +#define LL_CRS_SYNC_DIV_16 CRS_CFGR_SYNCDIV_2 /*!< Synchro Signal divided by 16 */ +#define LL_CRS_SYNC_DIV_32 (CRS_CFGR_SYNCDIV_2 | CRS_CFGR_SYNCDIV_0) /*!< Synchro Signal divided by 32 */ +#define LL_CRS_SYNC_DIV_64 (CRS_CFGR_SYNCDIV_2 | CRS_CFGR_SYNCDIV_1) /*!< Synchro Signal divided by 64 */ +#define LL_CRS_SYNC_DIV_128 CRS_CFGR_SYNCDIV /*!< Synchro Signal divided by 128 */ +/** + * @} + */ + +/** @defgroup CRS_LL_EC_SYNC_SOURCE Synchronization Signal Source + * @{ + */ +#define LL_CRS_SYNC_SOURCE_GPIO 0x00000000U /*!< Synchro Signal source GPIO */ +#define LL_CRS_SYNC_SOURCE_LSE CRS_CFGR_SYNCSRC_0 /*!< Synchro Signal source LSE */ +#define LL_CRS_SYNC_SOURCE_USB CRS_CFGR_SYNCSRC_1 /*!< Synchro Signal source USB SOF (default)*/ +/** + * @} + */ + +/** @defgroup CRS_LL_EC_SYNC_POLARITY Synchronization Signal Polarity + * @{ + */ +#define LL_CRS_SYNC_POLARITY_RISING 0x00000000U /*!< Synchro Active on rising edge (default) */ +#define LL_CRS_SYNC_POLARITY_FALLING CRS_CFGR_SYNCPOL /*!< Synchro Active on falling edge */ +/** + * @} + */ + +/** @defgroup CRS_LL_EC_FREQERRORDIR Frequency Error Direction + * @{ + */ +#define LL_CRS_FREQ_ERROR_DIR_UP 0x00000000U /*!< Upcounting direction, the actual frequency is above the target */ +#define LL_CRS_FREQ_ERROR_DIR_DOWN CRS_ISR_FEDIR /*!< Downcounting direction, the actual frequency is below the target */ +/** + * @} + */ + +/** @defgroup CRS_LL_EC_DEFAULTVALUES Default Values + * @{ + */ +/** + * @brief Reset value of the RELOAD field + * @note The reset value of the RELOAD field corresponds to a target frequency of 48 MHz + * and a synchronization signal frequency of 1 kHz (SOF signal from USB) + */ +#define LL_CRS_RELOADVALUE_DEFAULT 0x0000BB7FU + +/** + * @brief Reset value of Frequency error limit. + */ +#define LL_CRS_ERRORLIMIT_DEFAULT 0x00000022U + +/** + * @brief Reset value of the HSI48 Calibration field + * @note The default value is 32, which corresponds to the middle of the trimming interval. + * The trimming step is around 67 kHz between two consecutive TRIM steps. + * A higher TRIM value corresponds to a higher output frequency + */ +#define LL_CRS_HSI48CALIBRATION_DEFAULT 0x00000020U +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup CRS_LL_Exported_Macros CRS Exported Macros + * @{ + */ + +/** @defgroup CRS_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in CRS register + * @param __INSTANCE__ CRS Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_CRS_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in CRS register + * @param __INSTANCE__ CRS Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_CRS_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** @defgroup CRS_LL_EM_Exported_Macros_Calculate_Reload Exported_Macros_Calculate_Reload + * @{ + */ + +/** + * @brief Macro to calculate reload value to be set in CRS register according to target and sync frequencies + * @note The RELOAD value should be selected according to the ratio between + * the target frequency and the frequency of the synchronization source after + * prescaling. It is then decreased by one in order to reach the expected + * synchronization on the zero value. The formula is the following: + * RELOAD = (fTARGET / fSYNC) -1 + * @param __FTARGET__ Target frequency (value in Hz) + * @param __FSYNC__ Synchronization signal frequency (value in Hz) + * @retval Reload value (in Hz) + */ +#define __LL_CRS_CALC_CALCULATE_RELOADVALUE(__FTARGET__, __FSYNC__) (((__FTARGET__) / (__FSYNC__)) - 1U) + +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup CRS_LL_Exported_Functions CRS Exported Functions + * @{ + */ + +/** @defgroup CRS_LL_EF_Configuration Configuration + * @{ + */ + +/** + * @brief Enable Frequency error counter + * @note When this bit is set, the CRS_CFGR register is write-protected and cannot be modified + * @rmtoll CR CEN LL_CRS_EnableFreqErrorCounter + * @retval None + */ +__STATIC_INLINE void LL_CRS_EnableFreqErrorCounter(void) +{ + SET_BIT(CRS->CR, CRS_CR_CEN); +} + +/** + * @brief Disable Frequency error counter + * @rmtoll CR CEN LL_CRS_DisableFreqErrorCounter + * @retval None + */ +__STATIC_INLINE void LL_CRS_DisableFreqErrorCounter(void) +{ + CLEAR_BIT(CRS->CR, CRS_CR_CEN); +} + +/** + * @brief Check if Frequency error counter is enabled or not + * @rmtoll CR CEN LL_CRS_IsEnabledFreqErrorCounter + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsEnabledFreqErrorCounter(void) +{ + return ((READ_BIT(CRS->CR, CRS_CR_CEN) == (CRS_CR_CEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable Automatic trimming counter + * @rmtoll CR AUTOTRIMEN LL_CRS_EnableAutoTrimming + * @retval None + */ +__STATIC_INLINE void LL_CRS_EnableAutoTrimming(void) +{ + SET_BIT(CRS->CR, CRS_CR_AUTOTRIMEN); +} + +/** + * @brief Disable Automatic trimming counter + * @rmtoll CR AUTOTRIMEN LL_CRS_DisableAutoTrimming + * @retval None + */ +__STATIC_INLINE void LL_CRS_DisableAutoTrimming(void) +{ + CLEAR_BIT(CRS->CR, CRS_CR_AUTOTRIMEN); +} + +/** + * @brief Check if Automatic trimming is enabled or not + * @rmtoll CR AUTOTRIMEN LL_CRS_IsEnabledAutoTrimming + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsEnabledAutoTrimming(void) +{ + return ((READ_BIT(CRS->CR, CRS_CR_AUTOTRIMEN) == (CRS_CR_AUTOTRIMEN)) ? 1UL : 0UL); +} + +/** + * @brief Set HSI48 oscillator smooth trimming + * @note When the AUTOTRIMEN bit is set, this field is controlled by hardware and is read-only + * @rmtoll CR TRIM LL_CRS_SetHSI48SmoothTrimming + * @param Value a number between Min_Data = 0 and Max_Data = 63 + * @note Default value can be set thanks to @ref LL_CRS_HSI48CALIBRATION_DEFAULT + * @retval None + */ +__STATIC_INLINE void LL_CRS_SetHSI48SmoothTrimming(uint32_t Value) +{ + MODIFY_REG(CRS->CR, CRS_CR_TRIM, Value << CRS_POSITION_TRIM); +} + +/** + * @brief Get HSI48 oscillator smooth trimming + * @rmtoll CR TRIM LL_CRS_GetHSI48SmoothTrimming + * @retval a number between Min_Data = 0 and Max_Data = 63 + */ +__STATIC_INLINE uint32_t LL_CRS_GetHSI48SmoothTrimming(void) +{ + return (uint32_t)(READ_BIT(CRS->CR, CRS_CR_TRIM) >> CRS_POSITION_TRIM); +} + +/** + * @brief Set counter reload value + * @rmtoll CFGR RELOAD LL_CRS_SetReloadCounter + * @param Value a number between Min_Data = 0 and Max_Data = 0xFFFF + * @note Default value can be set thanks to @ref LL_CRS_RELOADVALUE_DEFAULT + * Otherwise it can be calculated in using macro @ref __LL_CRS_CALC_CALCULATE_RELOADVALUE (_FTARGET_, _FSYNC_) + * @retval None + */ +__STATIC_INLINE void LL_CRS_SetReloadCounter(uint32_t Value) +{ + MODIFY_REG(CRS->CFGR, CRS_CFGR_RELOAD, Value); +} + +/** + * @brief Get counter reload value + * @rmtoll CFGR RELOAD LL_CRS_GetReloadCounter + * @retval a number between Min_Data = 0 and Max_Data = 0xFFFF + */ +__STATIC_INLINE uint32_t LL_CRS_GetReloadCounter(void) +{ + return (uint32_t)(READ_BIT(CRS->CFGR, CRS_CFGR_RELOAD)); +} + +/** + * @brief Set frequency error limit + * @rmtoll CFGR FELIM LL_CRS_SetFreqErrorLimit + * @param Value a number between Min_Data = 0 and Max_Data = 255 + * @note Default value can be set thanks to @ref LL_CRS_ERRORLIMIT_DEFAULT + * @retval None + */ +__STATIC_INLINE void LL_CRS_SetFreqErrorLimit(uint32_t Value) +{ + MODIFY_REG(CRS->CFGR, CRS_CFGR_FELIM, Value << CRS_POSITION_FELIM); +} + +/** + * @brief Get frequency error limit + * @rmtoll CFGR FELIM LL_CRS_GetFreqErrorLimit + * @retval A number between Min_Data = 0 and Max_Data = 255 + */ +__STATIC_INLINE uint32_t LL_CRS_GetFreqErrorLimit(void) +{ + return (uint32_t)(READ_BIT(CRS->CFGR, CRS_CFGR_FELIM) >> CRS_POSITION_FELIM); +} + +/** + * @brief Set division factor for SYNC signal + * @rmtoll CFGR SYNCDIV LL_CRS_SetSyncDivider + * @param Divider This parameter can be one of the following values: + * @arg @ref LL_CRS_SYNC_DIV_1 + * @arg @ref LL_CRS_SYNC_DIV_2 + * @arg @ref LL_CRS_SYNC_DIV_4 + * @arg @ref LL_CRS_SYNC_DIV_8 + * @arg @ref LL_CRS_SYNC_DIV_16 + * @arg @ref LL_CRS_SYNC_DIV_32 + * @arg @ref LL_CRS_SYNC_DIV_64 + * @arg @ref LL_CRS_SYNC_DIV_128 + * @retval None + */ +__STATIC_INLINE void LL_CRS_SetSyncDivider(uint32_t Divider) +{ + MODIFY_REG(CRS->CFGR, CRS_CFGR_SYNCDIV, Divider); +} + +/** + * @brief Get division factor for SYNC signal + * @rmtoll CFGR SYNCDIV LL_CRS_GetSyncDivider + * @retval Returned value can be one of the following values: + * @arg @ref LL_CRS_SYNC_DIV_1 + * @arg @ref LL_CRS_SYNC_DIV_2 + * @arg @ref LL_CRS_SYNC_DIV_4 + * @arg @ref LL_CRS_SYNC_DIV_8 + * @arg @ref LL_CRS_SYNC_DIV_16 + * @arg @ref LL_CRS_SYNC_DIV_32 + * @arg @ref LL_CRS_SYNC_DIV_64 + * @arg @ref LL_CRS_SYNC_DIV_128 + */ +__STATIC_INLINE uint32_t LL_CRS_GetSyncDivider(void) +{ + return (uint32_t)(READ_BIT(CRS->CFGR, CRS_CFGR_SYNCDIV)); +} + +/** + * @brief Set SYNC signal source + * @rmtoll CFGR SYNCSRC LL_CRS_SetSyncSignalSource + * @param Source This parameter can be one of the following values: + * @arg @ref LL_CRS_SYNC_SOURCE_GPIO + * @arg @ref LL_CRS_SYNC_SOURCE_LSE + * @arg @ref LL_CRS_SYNC_SOURCE_USB + * @retval None + */ +__STATIC_INLINE void LL_CRS_SetSyncSignalSource(uint32_t Source) +{ + MODIFY_REG(CRS->CFGR, CRS_CFGR_SYNCSRC, Source); +} + +/** + * @brief Get SYNC signal source + * @rmtoll CFGR SYNCSRC LL_CRS_GetSyncSignalSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_CRS_SYNC_SOURCE_GPIO + * @arg @ref LL_CRS_SYNC_SOURCE_LSE + * @arg @ref LL_CRS_SYNC_SOURCE_USB + */ +__STATIC_INLINE uint32_t LL_CRS_GetSyncSignalSource(void) +{ + return (uint32_t)(READ_BIT(CRS->CFGR, CRS_CFGR_SYNCSRC)); +} + +/** + * @brief Set input polarity for the SYNC signal source + * @rmtoll CFGR SYNCPOL LL_CRS_SetSyncPolarity + * @param Polarity This parameter can be one of the following values: + * @arg @ref LL_CRS_SYNC_POLARITY_RISING + * @arg @ref LL_CRS_SYNC_POLARITY_FALLING + * @retval None + */ +__STATIC_INLINE void LL_CRS_SetSyncPolarity(uint32_t Polarity) +{ + MODIFY_REG(CRS->CFGR, CRS_CFGR_SYNCPOL, Polarity); +} + +/** + * @brief Get input polarity for the SYNC signal source + * @rmtoll CFGR SYNCPOL LL_CRS_GetSyncPolarity + * @retval Returned value can be one of the following values: + * @arg @ref LL_CRS_SYNC_POLARITY_RISING + * @arg @ref LL_CRS_SYNC_POLARITY_FALLING + */ +__STATIC_INLINE uint32_t LL_CRS_GetSyncPolarity(void) +{ + return (uint32_t)(READ_BIT(CRS->CFGR, CRS_CFGR_SYNCPOL)); +} + +/** + * @brief Configure CRS for the synchronization + * @rmtoll CR TRIM LL_CRS_ConfigSynchronization\n + * CFGR RELOAD LL_CRS_ConfigSynchronization\n + * CFGR FELIM LL_CRS_ConfigSynchronization\n + * CFGR SYNCDIV LL_CRS_ConfigSynchronization\n + * CFGR SYNCSRC LL_CRS_ConfigSynchronization\n + * CFGR SYNCPOL LL_CRS_ConfigSynchronization + * @param HSI48CalibrationValue a number between Min_Data = 0 and Max_Data = 63 + * @param ErrorLimitValue a number between Min_Data = 0 and Max_Data = 0xFFFF + * @param ReloadValue a number between Min_Data = 0 and Max_Data = 255 + * @param Settings This parameter can be a combination of the following values: + * @arg @ref LL_CRS_SYNC_DIV_1 or @ref LL_CRS_SYNC_DIV_2 or @ref LL_CRS_SYNC_DIV_4 or @ref LL_CRS_SYNC_DIV_8 + * or @ref LL_CRS_SYNC_DIV_16 or @ref LL_CRS_SYNC_DIV_32 or @ref LL_CRS_SYNC_DIV_64 or @ref LL_CRS_SYNC_DIV_128 + * @arg @ref LL_CRS_SYNC_SOURCE_GPIO or @ref LL_CRS_SYNC_SOURCE_LSE or @ref LL_CRS_SYNC_SOURCE_USB + * @arg @ref LL_CRS_SYNC_POLARITY_RISING or @ref LL_CRS_SYNC_POLARITY_FALLING + * @retval None + */ +__STATIC_INLINE void LL_CRS_ConfigSynchronization(uint32_t HSI48CalibrationValue, uint32_t ErrorLimitValue, uint32_t ReloadValue, uint32_t Settings) +{ + MODIFY_REG(CRS->CR, CRS_CR_TRIM, HSI48CalibrationValue); + MODIFY_REG(CRS->CFGR, + CRS_CFGR_RELOAD | CRS_CFGR_FELIM | CRS_CFGR_SYNCDIV | CRS_CFGR_SYNCSRC | CRS_CFGR_SYNCPOL, + ReloadValue | (ErrorLimitValue << CRS_POSITION_FELIM) | Settings); +} + +/** + * @} + */ + +/** @defgroup CRS_LL_EF_CRS_Management CRS_Management + * @{ + */ + +/** + * @brief Generate software SYNC event + * @rmtoll CR SWSYNC LL_CRS_GenerateEvent_SWSYNC + * @retval None + */ +__STATIC_INLINE void LL_CRS_GenerateEvent_SWSYNC(void) +{ + SET_BIT(CRS->CR, CRS_CR_SWSYNC); +} + +/** + * @brief Get the frequency error direction latched in the time of the last + * SYNC event + * @rmtoll ISR FEDIR LL_CRS_GetFreqErrorDirection + * @retval Returned value can be one of the following values: + * @arg @ref LL_CRS_FREQ_ERROR_DIR_UP + * @arg @ref LL_CRS_FREQ_ERROR_DIR_DOWN + */ +__STATIC_INLINE uint32_t LL_CRS_GetFreqErrorDirection(void) +{ + return (uint32_t)(READ_BIT(CRS->ISR, CRS_ISR_FEDIR)); +} + +/** + * @brief Get the frequency error counter value latched in the time of the last SYNC event + * @rmtoll ISR FECAP LL_CRS_GetFreqErrorCapture + * @retval A number between Min_Data = 0x0000 and Max_Data = 0xFFFF + */ +__STATIC_INLINE uint32_t LL_CRS_GetFreqErrorCapture(void) +{ + return (uint32_t)(READ_BIT(CRS->ISR, CRS_ISR_FECAP) >> CRS_POSITION_FECAP); +} + +/** + * @} + */ + +/** @defgroup CRS_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Check if SYNC event OK signal occurred or not + * @rmtoll ISR SYNCOKF LL_CRS_IsActiveFlag_SYNCOK + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_SYNCOK(void) +{ + return ((READ_BIT(CRS->ISR, CRS_ISR_SYNCOKF) == (CRS_ISR_SYNCOKF)) ? 1UL : 0UL); +} + +/** + * @brief Check if SYNC warning signal occurred or not + * @rmtoll ISR SYNCWARNF LL_CRS_IsActiveFlag_SYNCWARN + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_SYNCWARN(void) +{ + return ((READ_BIT(CRS->ISR, CRS_ISR_SYNCWARNF) == (CRS_ISR_SYNCWARNF)) ? 1UL : 0UL); +} + +/** + * @brief Check if Synchronization or trimming error signal occurred or not + * @rmtoll ISR ERRF LL_CRS_IsActiveFlag_ERR + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_ERR(void) +{ + return ((READ_BIT(CRS->ISR, CRS_ISR_ERRF) == (CRS_ISR_ERRF)) ? 1UL : 0UL); +} + +/** + * @brief Check if Expected SYNC signal occurred or not + * @rmtoll ISR ESYNCF LL_CRS_IsActiveFlag_ESYNC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_ESYNC(void) +{ + return ((READ_BIT(CRS->ISR, CRS_ISR_ESYNCF) == (CRS_ISR_ESYNCF)) ? 1UL : 0UL); +} + +/** + * @brief Check if SYNC error signal occurred or not + * @rmtoll ISR SYNCERR LL_CRS_IsActiveFlag_SYNCERR + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_SYNCERR(void) +{ + return ((READ_BIT(CRS->ISR, CRS_ISR_SYNCERR) == (CRS_ISR_SYNCERR)) ? 1UL : 0UL); +} + +/** + * @brief Check if SYNC missed error signal occurred or not + * @rmtoll ISR SYNCMISS LL_CRS_IsActiveFlag_SYNCMISS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_SYNCMISS(void) +{ + return ((READ_BIT(CRS->ISR, CRS_ISR_SYNCMISS) == (CRS_ISR_SYNCMISS)) ? 1UL : 0UL); +} + +/** + * @brief Check if Trimming overflow or underflow occurred or not + * @rmtoll ISR TRIMOVF LL_CRS_IsActiveFlag_TRIMOVF + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsActiveFlag_TRIMOVF(void) +{ + return ((READ_BIT(CRS->ISR, CRS_ISR_TRIMOVF) == (CRS_ISR_TRIMOVF)) ? 1UL : 0UL); +} + +/** + * @brief Clear the SYNC event OK flag + * @rmtoll ICR SYNCOKC LL_CRS_ClearFlag_SYNCOK + * @retval None + */ +__STATIC_INLINE void LL_CRS_ClearFlag_SYNCOK(void) +{ + WRITE_REG(CRS->ICR, CRS_ICR_SYNCOKC); +} + +/** + * @brief Clear the SYNC warning flag + * @rmtoll ICR SYNCWARNC LL_CRS_ClearFlag_SYNCWARN + * @retval None + */ +__STATIC_INLINE void LL_CRS_ClearFlag_SYNCWARN(void) +{ + WRITE_REG(CRS->ICR, CRS_ICR_SYNCWARNC); +} + +/** + * @brief Clear TRIMOVF, SYNCMISS and SYNCERR bits and consequently also + * the ERR flag + * @rmtoll ICR ERRC LL_CRS_ClearFlag_ERR + * @retval None + */ +__STATIC_INLINE void LL_CRS_ClearFlag_ERR(void) +{ + WRITE_REG(CRS->ICR, CRS_ICR_ERRC); +} + +/** + * @brief Clear Expected SYNC flag + * @rmtoll ICR ESYNCC LL_CRS_ClearFlag_ESYNC + * @retval None + */ +__STATIC_INLINE void LL_CRS_ClearFlag_ESYNC(void) +{ + WRITE_REG(CRS->ICR, CRS_ICR_ESYNCC); +} + +/** + * @} + */ + +/** @defgroup CRS_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable SYNC event OK interrupt + * @rmtoll CR SYNCOKIE LL_CRS_EnableIT_SYNCOK + * @retval None + */ +__STATIC_INLINE void LL_CRS_EnableIT_SYNCOK(void) +{ + SET_BIT(CRS->CR, CRS_CR_SYNCOKIE); +} + +/** + * @brief Disable SYNC event OK interrupt + * @rmtoll CR SYNCOKIE LL_CRS_DisableIT_SYNCOK + * @retval None + */ +__STATIC_INLINE void LL_CRS_DisableIT_SYNCOK(void) +{ + CLEAR_BIT(CRS->CR, CRS_CR_SYNCOKIE); +} + +/** + * @brief Check if SYNC event OK interrupt is enabled or not + * @rmtoll CR SYNCOKIE LL_CRS_IsEnabledIT_SYNCOK + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsEnabledIT_SYNCOK(void) +{ + return ((READ_BIT(CRS->CR, CRS_CR_SYNCOKIE) == (CRS_CR_SYNCOKIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable SYNC warning interrupt + * @rmtoll CR SYNCWARNIE LL_CRS_EnableIT_SYNCWARN + * @retval None + */ +__STATIC_INLINE void LL_CRS_EnableIT_SYNCWARN(void) +{ + SET_BIT(CRS->CR, CRS_CR_SYNCWARNIE); +} + +/** + * @brief Disable SYNC warning interrupt + * @rmtoll CR SYNCWARNIE LL_CRS_DisableIT_SYNCWARN + * @retval None + */ +__STATIC_INLINE void LL_CRS_DisableIT_SYNCWARN(void) +{ + CLEAR_BIT(CRS->CR, CRS_CR_SYNCWARNIE); +} + +/** + * @brief Check if SYNC warning interrupt is enabled or not + * @rmtoll CR SYNCWARNIE LL_CRS_IsEnabledIT_SYNCWARN + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsEnabledIT_SYNCWARN(void) +{ + return ((READ_BIT(CRS->CR, CRS_CR_SYNCWARNIE) == (CRS_CR_SYNCWARNIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Synchronization or trimming error interrupt + * @rmtoll CR ERRIE LL_CRS_EnableIT_ERR + * @retval None + */ +__STATIC_INLINE void LL_CRS_EnableIT_ERR(void) +{ + SET_BIT(CRS->CR, CRS_CR_ERRIE); +} + +/** + * @brief Disable Synchronization or trimming error interrupt + * @rmtoll CR ERRIE LL_CRS_DisableIT_ERR + * @retval None + */ +__STATIC_INLINE void LL_CRS_DisableIT_ERR(void) +{ + CLEAR_BIT(CRS->CR, CRS_CR_ERRIE); +} + +/** + * @brief Check if Synchronization or trimming error interrupt is enabled or not + * @rmtoll CR ERRIE LL_CRS_IsEnabledIT_ERR + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsEnabledIT_ERR(void) +{ + return ((READ_BIT(CRS->CR, CRS_CR_ERRIE) == (CRS_CR_ERRIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Expected SYNC interrupt + * @rmtoll CR ESYNCIE LL_CRS_EnableIT_ESYNC + * @retval None + */ +__STATIC_INLINE void LL_CRS_EnableIT_ESYNC(void) +{ + SET_BIT(CRS->CR, CRS_CR_ESYNCIE); +} + +/** + * @brief Disable Expected SYNC interrupt + * @rmtoll CR ESYNCIE LL_CRS_DisableIT_ESYNC + * @retval None + */ +__STATIC_INLINE void LL_CRS_DisableIT_ESYNC(void) +{ + CLEAR_BIT(CRS->CR, CRS_CR_ESYNCIE); +} + +/** + * @brief Check if Expected SYNC interrupt is enabled or not + * @rmtoll CR ESYNCIE LL_CRS_IsEnabledIT_ESYNC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_CRS_IsEnabledIT_ESYNC(void) +{ + return ((READ_BIT(CRS->CR, CRS_CR_ESYNCIE) == (CRS_CR_ESYNCIE)) ? 1UL : 0UL); +} + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup CRS_LL_EF_Init Initialization and de-initialization functions + * @{ + */ + +ErrorStatus LL_CRS_DeInit(void); + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined(CRS) */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_CRS_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h new file mode 100644 index 0000000..b764388 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dma.h @@ -0,0 +1,2159 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_dma.h + * @author MCD Application Team + * @brief Header file of DMA LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_DMA_H +#define STM32WBxx_LL_DMA_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" +#include "stm32wbxx_ll_dmamux.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined (DMA1) || defined (DMA2) + +/** @defgroup DMA_LL DMA + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/** @defgroup DMA_LL_Private_Macros DMA Private Macros + * @{ + */ + +/** + * @brief Helper macro to convert DMA Instance and index into DMA channel + * @param __DMA_INSTANCE__ DMAx + * @param __CHANNEL_INDEX__ 0 to 6 to map DMAx_Channel1 to DMAx_Channel7 + * @retval Pointer to the DMA channel + */ +#if defined (DMA2) +#define __LL_DMA_INSTANCE_TO_CHANNEL(__DMA_INSTANCE__, __CHANNEL_INDEX__) \ + (((__DMA_INSTANCE__) == DMA1) ? (DMA1_Channel1 + (__CHANNEL_INDEX__)) : (DMA2_Channel1 + (__CHANNEL_INDEX__))) +#else +#define __LL_DMA_INSTANCE_TO_CHANNEL(__DMA_INSTANCE__, __CHANNEL_INDEX__) \ + (DMA1_Channel1 + (__CHANNEL_INDEX__)) +#endif /* DMA2 */ + +/** + * @brief Helper macro to convert DMA Instance and index into DMAMUX channel + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @param __DMA_INSTANCE__ DMAx + * @param __CHANNEL_INDEX__ 0 to 6 to map DMAx_Channel1 to DMAx_Channel7 + * @retval Pointer to the DMA channel + */ +#if defined (DMA2) +#define __LL_DMA_INSTANCE_TO_DMAMUX_CCR(__DMA_INSTANCE__, __CHANNEL_INDEX__)\ + (((__DMA_INSTANCE__) == DMA1) ? (DMAMUX1_Channel0 + (__CHANNEL_INDEX__)) : (DMAMUX1_Channel7 + (__CHANNEL_INDEX__))) +#else +#define __LL_DMA_INSTANCE_TO_DMAMUX_CCR(__DMA_INSTANCE__, __CHANNEL_INDEX__)\ + (DMAMUX1_Channel0 + (__CHANNEL_INDEX__)) +#endif /* DMA2 */ +/** + * @} + */ + +/* Exported types ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup DMA_LL_ES_INIT DMA Exported Init structure + * @{ + */ +typedef struct +{ + uint32_t PeriphOrM2MSrcAddress; /*!< Specifies the peripheral base address for DMA transfer + or as Source base address in case of memory to memory transfer direction. + + This parameter must be a value between Min_Data = 0 and Max_Data = 0xFFFFFFFF. */ + + uint32_t MemoryOrM2MDstAddress; /*!< Specifies the memory base address for DMA transfer + or as Destination base address in case of memory to memory transfer direction. + + This parameter must be a value between Min_Data = 0 and Max_Data = 0xFFFFFFFF. */ + + uint32_t Direction; /*!< Specifies if the data will be transferred from memory to peripheral, + from memory to memory or from peripheral to memory. + This parameter can be a value of @ref DMA_LL_EC_DIRECTION + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetDataTransferDirection(). */ + + uint32_t Mode; /*!< Specifies the normal or circular operation mode. + This parameter can be a value of @ref DMA_LL_EC_MODE + @note: The circular buffer mode cannot be used if the memory to memory + data transfer direction is configured on the selected Channel + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetMode(). */ + + uint32_t PeriphOrM2MSrcIncMode; /*!< Specifies whether the Peripheral address or Source address in case of memory to memory transfer direction + is incremented or not. + This parameter can be a value of @ref DMA_LL_EC_PERIPH + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetPeriphIncMode(). */ + + uint32_t MemoryOrM2MDstIncMode; /*!< Specifies whether the Memory address or Destination address in case of memory to memory transfer direction + is incremented or not. + This parameter can be a value of @ref DMA_LL_EC_MEMORY + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetMemoryIncMode(). */ + + uint32_t PeriphOrM2MSrcDataSize; /*!< Specifies the Peripheral data size alignment or Source data size alignment (byte, half word, word) + in case of memory to memory transfer direction. + This parameter can be a value of @ref DMA_LL_EC_PDATAALIGN + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetPeriphSize(). */ + + uint32_t MemoryOrM2MDstDataSize; /*!< Specifies the Memory data size alignment or Destination data size alignment (byte, half word, word) + in case of memory to memory transfer direction. + This parameter can be a value of @ref DMA_LL_EC_MDATAALIGN + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetMemorySize(). */ + + uint32_t NbData; /*!< Specifies the number of data to transfer, in data unit. + The data unit is equal to the source buffer configuration set in PeripheralSize + or MemorySize parameters depending in the transfer direction. + This parameter must be a value between Min_Data = 0 and Max_Data = 0x0000FFFF + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetDataLength(). */ + + uint32_t PeriphRequest; /*!< Specifies the peripheral request. + This parameter can be a value of @ref DMAMUX_LL_EC_REQUEST + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetPeriphRequest(). */ + + uint32_t Priority; /*!< Specifies the channel priority level. + This parameter can be a value of @ref DMA_LL_EC_PRIORITY + + This feature can be modified afterwards using unitary function @ref LL_DMA_SetChannelPriorityLevel(). */ + +} LL_DMA_InitTypeDef; +/** + * @} + */ +#endif /*USE_FULL_LL_DRIVER*/ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup DMA_LL_Exported_Constants DMA Exported Constants + * @{ + */ +/** @defgroup DMA_LL_EC_CLEAR_FLAG Clear Flags Defines + * @brief Flags defines which can be used with LL_DMA_WriteReg function + * @{ + */ +#define LL_DMA_IFCR_CGIF1 DMA_IFCR_CGIF1 /*!< Channel 1 global flag */ +#define LL_DMA_IFCR_CTCIF1 DMA_IFCR_CTCIF1 /*!< Channel 1 transfer complete flag */ +#define LL_DMA_IFCR_CHTIF1 DMA_IFCR_CHTIF1 /*!< Channel 1 half transfer flag */ +#define LL_DMA_IFCR_CTEIF1 DMA_IFCR_CTEIF1 /*!< Channel 1 transfer error flag */ +#define LL_DMA_IFCR_CGIF2 DMA_IFCR_CGIF2 /*!< Channel 2 global flag */ +#define LL_DMA_IFCR_CTCIF2 DMA_IFCR_CTCIF2 /*!< Channel 2 transfer complete flag */ +#define LL_DMA_IFCR_CHTIF2 DMA_IFCR_CHTIF2 /*!< Channel 2 half transfer flag */ +#define LL_DMA_IFCR_CTEIF2 DMA_IFCR_CTEIF2 /*!< Channel 2 transfer error flag */ +#define LL_DMA_IFCR_CGIF3 DMA_IFCR_CGIF3 /*!< Channel 3 global flag */ +#define LL_DMA_IFCR_CTCIF3 DMA_IFCR_CTCIF3 /*!< Channel 3 transfer complete flag */ +#define LL_DMA_IFCR_CHTIF3 DMA_IFCR_CHTIF3 /*!< Channel 3 half transfer flag */ +#define LL_DMA_IFCR_CTEIF3 DMA_IFCR_CTEIF3 /*!< Channel 3 transfer error flag */ +#define LL_DMA_IFCR_CGIF4 DMA_IFCR_CGIF4 /*!< Channel 4 global flag */ +#define LL_DMA_IFCR_CTCIF4 DMA_IFCR_CTCIF4 /*!< Channel 4 transfer complete flag */ +#define LL_DMA_IFCR_CHTIF4 DMA_IFCR_CHTIF4 /*!< Channel 4 half transfer flag */ +#define LL_DMA_IFCR_CTEIF4 DMA_IFCR_CTEIF4 /*!< Channel 4 transfer error flag */ +#define LL_DMA_IFCR_CGIF5 DMA_IFCR_CGIF5 /*!< Channel 5 global flag */ +#define LL_DMA_IFCR_CTCIF5 DMA_IFCR_CTCIF5 /*!< Channel 5 transfer complete flag */ +#define LL_DMA_IFCR_CHTIF5 DMA_IFCR_CHTIF5 /*!< Channel 5 half transfer flag */ +#define LL_DMA_IFCR_CTEIF5 DMA_IFCR_CTEIF5 /*!< Channel 5 transfer error flag */ +#define LL_DMA_IFCR_CGIF6 DMA_IFCR_CGIF6 /*!< Channel 6 global flag */ +#define LL_DMA_IFCR_CTCIF6 DMA_IFCR_CTCIF6 /*!< Channel 6 transfer complete flag */ +#define LL_DMA_IFCR_CHTIF6 DMA_IFCR_CHTIF6 /*!< Channel 6 half transfer flag */ +#define LL_DMA_IFCR_CTEIF6 DMA_IFCR_CTEIF6 /*!< Channel 6 transfer error flag */ +#define LL_DMA_IFCR_CGIF7 DMA_IFCR_CGIF7 /*!< Channel 7 global flag */ +#define LL_DMA_IFCR_CTCIF7 DMA_IFCR_CTCIF7 /*!< Channel 7 transfer complete flag */ +#define LL_DMA_IFCR_CHTIF7 DMA_IFCR_CHTIF7 /*!< Channel 7 half transfer flag */ +#define LL_DMA_IFCR_CTEIF7 DMA_IFCR_CTEIF7 /*!< Channel 7 transfer error flag */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_DMA_ReadReg function + * @{ + */ +#define LL_DMA_ISR_GIF1 DMA_ISR_GIF1 /*!< Channel 1 global flag */ +#define LL_DMA_ISR_TCIF1 DMA_ISR_TCIF1 /*!< Channel 1 transfer complete flag */ +#define LL_DMA_ISR_HTIF1 DMA_ISR_HTIF1 /*!< Channel 1 half transfer flag */ +#define LL_DMA_ISR_TEIF1 DMA_ISR_TEIF1 /*!< Channel 1 transfer error flag */ +#define LL_DMA_ISR_GIF2 DMA_ISR_GIF2 /*!< Channel 2 global flag */ +#define LL_DMA_ISR_TCIF2 DMA_ISR_TCIF2 /*!< Channel 2 transfer complete flag */ +#define LL_DMA_ISR_HTIF2 DMA_ISR_HTIF2 /*!< Channel 2 half transfer flag */ +#define LL_DMA_ISR_TEIF2 DMA_ISR_TEIF2 /*!< Channel 2 transfer error flag */ +#define LL_DMA_ISR_GIF3 DMA_ISR_GIF3 /*!< Channel 3 global flag */ +#define LL_DMA_ISR_TCIF3 DMA_ISR_TCIF3 /*!< Channel 3 transfer complete flag */ +#define LL_DMA_ISR_HTIF3 DMA_ISR_HTIF3 /*!< Channel 3 half transfer flag */ +#define LL_DMA_ISR_TEIF3 DMA_ISR_TEIF3 /*!< Channel 3 transfer error flag */ +#define LL_DMA_ISR_GIF4 DMA_ISR_GIF4 /*!< Channel 4 global flag */ +#define LL_DMA_ISR_TCIF4 DMA_ISR_TCIF4 /*!< Channel 4 transfer complete flag */ +#define LL_DMA_ISR_HTIF4 DMA_ISR_HTIF4 /*!< Channel 4 half transfer flag */ +#define LL_DMA_ISR_TEIF4 DMA_ISR_TEIF4 /*!< Channel 4 transfer error flag */ +#define LL_DMA_ISR_GIF5 DMA_ISR_GIF5 /*!< Channel 5 global flag */ +#define LL_DMA_ISR_TCIF5 DMA_ISR_TCIF5 /*!< Channel 5 transfer complete flag */ +#define LL_DMA_ISR_HTIF5 DMA_ISR_HTIF5 /*!< Channel 5 half transfer flag */ +#define LL_DMA_ISR_TEIF5 DMA_ISR_TEIF5 /*!< Channel 5 transfer error flag */ +#define LL_DMA_ISR_GIF6 DMA_ISR_GIF6 /*!< Channel 6 global flag */ +#define LL_DMA_ISR_TCIF6 DMA_ISR_TCIF6 /*!< Channel 6 transfer complete flag */ +#define LL_DMA_ISR_HTIF6 DMA_ISR_HTIF6 /*!< Channel 6 half transfer flag */ +#define LL_DMA_ISR_TEIF6 DMA_ISR_TEIF6 /*!< Channel 6 transfer error flag */ +#define LL_DMA_ISR_GIF7 DMA_ISR_GIF7 /*!< Channel 7 global flag */ +#define LL_DMA_ISR_TCIF7 DMA_ISR_TCIF7 /*!< Channel 7 transfer complete flag */ +#define LL_DMA_ISR_HTIF7 DMA_ISR_HTIF7 /*!< Channel 7 half transfer flag */ +#define LL_DMA_ISR_TEIF7 DMA_ISR_TEIF7 /*!< Channel 7 transfer error flag */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_DMA_ReadReg and LL_DMA_WriteReg functions + * @{ + */ +#define LL_DMA_CCR_TCIE DMA_CCR_TCIE /*!< Transfer complete interrupt */ +#define LL_DMA_CCR_HTIE DMA_CCR_HTIE /*!< Half Transfer interrupt */ +#define LL_DMA_CCR_TEIE DMA_CCR_TEIE /*!< Transfer error interrupt */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_CHANNEL CHANNEL + * @{ + */ +#define LL_DMA_CHANNEL_1 0x00000001U /*!< DMA Channel 1 */ +#define LL_DMA_CHANNEL_2 0x00000002U /*!< DMA Channel 2 */ +#define LL_DMA_CHANNEL_3 0x00000003U /*!< DMA Channel 3 */ +#define LL_DMA_CHANNEL_4 0x00000004U /*!< DMA Channel 4 */ +#define LL_DMA_CHANNEL_5 0x00000005U /*!< DMA Channel 5 */ +#define LL_DMA_CHANNEL_6 0x00000006U /*!< DMA Channel 6 */ +#define LL_DMA_CHANNEL_7 0x00000007U /*!< DMA Channel 7 */ +#if defined(USE_FULL_LL_DRIVER) +#define LL_DMA_CHANNEL_ALL 0xFFFF0000U /*!< DMA Channel all (used only for function @ref LL_DMA_DeInit(). */ +#endif /* USE_FULL_LL_DRIVER */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_DIRECTION Transfer Direction + * @{ + */ +#define LL_DMA_DIRECTION_PERIPH_TO_MEMORY 0x00000000U /*!< Peripheral to memory direction */ +#define LL_DMA_DIRECTION_MEMORY_TO_PERIPH DMA_CCR_DIR /*!< Memory to peripheral direction */ +#define LL_DMA_DIRECTION_MEMORY_TO_MEMORY DMA_CCR_MEM2MEM /*!< Memory to memory direction */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_MODE Transfer mode + * @{ + */ +#define LL_DMA_MODE_NORMAL 0x00000000U /*!< Normal Mode */ +#define LL_DMA_MODE_CIRCULAR DMA_CCR_CIRC /*!< Circular Mode */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_PERIPH Peripheral increment mode + * @{ + */ +#define LL_DMA_PERIPH_INCREMENT DMA_CCR_PINC /*!< Peripheral increment mode Enable */ +#define LL_DMA_PERIPH_NOINCREMENT 0x00000000U /*!< Peripheral increment mode Disable */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_MEMORY Memory increment mode + * @{ + */ +#define LL_DMA_MEMORY_INCREMENT DMA_CCR_MINC /*!< Memory increment mode Enable */ +#define LL_DMA_MEMORY_NOINCREMENT 0x00000000U /*!< Memory increment mode Disable */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_PDATAALIGN Peripheral data alignment + * @{ + */ +#define LL_DMA_PDATAALIGN_BYTE 0x00000000U /*!< Peripheral data alignment : Byte */ +#define LL_DMA_PDATAALIGN_HALFWORD DMA_CCR_PSIZE_0 /*!< Peripheral data alignment : HalfWord */ +#define LL_DMA_PDATAALIGN_WORD DMA_CCR_PSIZE_1 /*!< Peripheral data alignment : Word */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_MDATAALIGN Memory data alignment + * @{ + */ +#define LL_DMA_MDATAALIGN_BYTE 0x00000000U /*!< Memory data alignment : Byte */ +#define LL_DMA_MDATAALIGN_HALFWORD DMA_CCR_MSIZE_0 /*!< Memory data alignment : HalfWord */ +#define LL_DMA_MDATAALIGN_WORD DMA_CCR_MSIZE_1 /*!< Memory data alignment : Word */ +/** + * @} + */ + +/** @defgroup DMA_LL_EC_PRIORITY Transfer Priority level + * @{ + */ +#define LL_DMA_PRIORITY_LOW 0x00000000U /*!< Priority level : Low */ +#define LL_DMA_PRIORITY_MEDIUM DMA_CCR_PL_0 /*!< Priority level : Medium */ +#define LL_DMA_PRIORITY_HIGH DMA_CCR_PL_1 /*!< Priority level : High */ +#define LL_DMA_PRIORITY_VERYHIGH DMA_CCR_PL /*!< Priority level : Very_High */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup DMA_LL_Exported_Macros DMA Exported Macros + * @{ + */ + +/** @defgroup DMA_LL_EM_WRITE_READ Common Write and read registers macros + * @{ + */ +/** + * @brief Write a value in DMA register + * @param __INSTANCE__ DMA Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_DMA_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in DMA register + * @param __INSTANCE__ DMA Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_DMA_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** @defgroup DMA_LL_EM_CONVERT_DMAxCHANNELy Convert DMAxChannely + * @{ + */ +/** + * @brief Convert DMAx_Channely into DMAx + * @param __CHANNEL_INSTANCE__ DMAx_Channely + * @retval DMAx + */ +#if defined(DMA2) +#define __LL_DMA_GET_INSTANCE(__CHANNEL_INSTANCE__) \ + (((uint32_t)(__CHANNEL_INSTANCE__) > ((uint32_t)DMA1_Channel7)) ? DMA2 : DMA1) +#else +#define __LL_DMA_GET_INSTANCE(__CHANNEL_INSTANCE__) (DMA1) +#endif /* DMA2 */ + +/** + * @brief Convert DMAx_Channely into LL_DMA_CHANNEL_y + * @param __CHANNEL_INSTANCE__ DMAx_Channely + * @retval LL_DMA_CHANNEL_y + */ +#if defined (DMA2) +#if defined (DMA2_Channel6) && defined (DMA2_Channel7) +#define __LL_DMA_GET_CHANNEL(__CHANNEL_INSTANCE__) \ + (((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel1)) ? LL_DMA_CHANNEL_1 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel1)) ? LL_DMA_CHANNEL_1 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel2)) ? LL_DMA_CHANNEL_2 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel2)) ? LL_DMA_CHANNEL_2 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel3)) ? LL_DMA_CHANNEL_3 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel3)) ? LL_DMA_CHANNEL_3 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel4)) ? LL_DMA_CHANNEL_4 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel4)) ? LL_DMA_CHANNEL_4 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel5)) ? LL_DMA_CHANNEL_5 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel5)) ? LL_DMA_CHANNEL_5 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel6)) ? LL_DMA_CHANNEL_6 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel6)) ? LL_DMA_CHANNEL_6 : \ + LL_DMA_CHANNEL_7) +#else +#define __LL_DMA_GET_CHANNEL(__CHANNEL_INSTANCE__) \ + (((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel1)) ? LL_DMA_CHANNEL_1 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel1)) ? LL_DMA_CHANNEL_1 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel2)) ? LL_DMA_CHANNEL_2 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel2)) ? LL_DMA_CHANNEL_2 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel3)) ? LL_DMA_CHANNEL_3 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel3)) ? LL_DMA_CHANNEL_3 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel4)) ? LL_DMA_CHANNEL_4 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel4)) ? LL_DMA_CHANNEL_4 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel5)) ? LL_DMA_CHANNEL_5 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA2_Channel5)) ? LL_DMA_CHANNEL_5 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel6)) ? LL_DMA_CHANNEL_6 : \ + LL_DMA_CHANNEL_7) +#endif /* DMA2_Channel6 && DMA2_Channel7 */ +#else +#define __LL_DMA_GET_CHANNEL(__CHANNEL_INSTANCE__) \ + (((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel1)) ? LL_DMA_CHANNEL_1 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel2)) ? LL_DMA_CHANNEL_2 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel3)) ? LL_DMA_CHANNEL_3 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel4)) ? LL_DMA_CHANNEL_4 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel5)) ? LL_DMA_CHANNEL_5 : \ + ((uint32_t)(__CHANNEL_INSTANCE__) == ((uint32_t)DMA1_Channel6)) ? LL_DMA_CHANNEL_6 : \ + LL_DMA_CHANNEL_7) +#endif /* DMA2 */ + +/** + * @brief Convert DMA Instance DMAx and LL_DMA_CHANNEL_y into DMAx_Channely + * @param __DMA_INSTANCE__ DMAx + * @param __CHANNEL__ LL_DMA_CHANNEL_y + * @retval DMAx_Channely + */ +#if defined (DMA2) +#if defined (DMA2_Channel6) && defined (DMA2_Channel7) +#define __LL_DMA_GET_CHANNEL_INSTANCE(__DMA_INSTANCE__, __CHANNEL__) \ + ((((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_1))) ? DMA1_Channel1 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_1))) ? DMA2_Channel1 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_2))) ? DMA1_Channel2 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_2))) ? DMA2_Channel2 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_3))) ? DMA1_Channel3 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_3))) ? DMA2_Channel3 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_4))) ? DMA1_Channel4 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_4))) ? DMA2_Channel4 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_5))) ? DMA1_Channel5 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_5))) ? DMA2_Channel5 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_6))) ? DMA1_Channel6 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_6))) ? DMA2_Channel6 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_7))) ? DMA1_Channel7 : \ + DMA2_Channel7) +#else +#define __LL_DMA_GET_CHANNEL_INSTANCE(__DMA_INSTANCE__, __CHANNEL__) \ + ((((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_1))) ? DMA1_Channel1 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_1))) ? DMA2_Channel1 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_2))) ? DMA1_Channel2 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_2))) ? DMA2_Channel2 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_3))) ? DMA1_Channel3 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_3))) ? DMA2_Channel3 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_4))) ? DMA1_Channel4 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_4))) ? DMA2_Channel4 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_5))) ? DMA1_Channel5 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA2)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_5))) ? DMA2_Channel5 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_6))) ? DMA1_Channel6 : \ + DMA1_Channel7) +#endif /* DMA2_Channel6 && DMA2_Channel7 */ +#else +#define __LL_DMA_GET_CHANNEL_INSTANCE(__DMA_INSTANCE__, __CHANNEL__) \ + ((((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_1))) ? DMA1_Channel1 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_2))) ? DMA1_Channel2 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_3))) ? DMA1_Channel3 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_4))) ? DMA1_Channel4 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_5))) ? DMA1_Channel5 : \ + (((uint32_t)(__DMA_INSTANCE__) == ((uint32_t)DMA1)) && ((uint32_t)(__CHANNEL__) == ((uint32_t)LL_DMA_CHANNEL_6))) ? DMA1_Channel6 : \ + DMA1_Channel7) +#endif /* DMA2 */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup DMA_LL_Exported_Functions DMA Exported Functions + * @{ + */ + +/** @defgroup DMA_LL_EF_Configuration Configuration + * @{ + */ +/** + * @brief Enable DMA channel. + * @rmtoll CCR EN LL_DMA_EnableChannel + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval None + */ +__STATIC_INLINE void LL_DMA_EnableChannel(DMA_TypeDef *DMAx, uint32_t Channel) +{ + SET_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_EN); +} + +/** + * @brief Disable DMA channel. + * @rmtoll CCR EN LL_DMA_DisableChannel + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval None + */ +__STATIC_INLINE void LL_DMA_DisableChannel(DMA_TypeDef *DMAx, uint32_t Channel) +{ + CLEAR_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_EN); +} + +/** + * @brief Check if DMA channel is enabled or disabled. + * @rmtoll CCR EN LL_DMA_IsEnabledChannel + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsEnabledChannel(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return ((READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_EN) == (DMA_CCR_EN)) ? 1UL : 0UL); +} + +/** + * @brief Configure all parameters link to DMA transfer. + * @rmtoll CCR DIR LL_DMA_ConfigTransfer\n + * CCR MEM2MEM LL_DMA_ConfigTransfer\n + * CCR CIRC LL_DMA_ConfigTransfer\n + * CCR PINC LL_DMA_ConfigTransfer\n + * CCR MINC LL_DMA_ConfigTransfer\n + * CCR PSIZE LL_DMA_ConfigTransfer\n + * CCR MSIZE LL_DMA_ConfigTransfer\n + * CCR PL LL_DMA_ConfigTransfer + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param Configuration This parameter must be a combination of all the following values: + * @arg @ref LL_DMA_DIRECTION_PERIPH_TO_MEMORY or @ref LL_DMA_DIRECTION_MEMORY_TO_PERIPH or @ref LL_DMA_DIRECTION_MEMORY_TO_MEMORY + * @arg @ref LL_DMA_MODE_NORMAL or @ref LL_DMA_MODE_CIRCULAR + * @arg @ref LL_DMA_PERIPH_INCREMENT or @ref LL_DMA_PERIPH_NOINCREMENT + * @arg @ref LL_DMA_MEMORY_INCREMENT or @ref LL_DMA_MEMORY_NOINCREMENT + * @arg @ref LL_DMA_PDATAALIGN_BYTE or @ref LL_DMA_PDATAALIGN_HALFWORD or @ref LL_DMA_PDATAALIGN_WORD + * @arg @ref LL_DMA_MDATAALIGN_BYTE or @ref LL_DMA_MDATAALIGN_HALFWORD or @ref LL_DMA_MDATAALIGN_WORD + * @arg @ref LL_DMA_PRIORITY_LOW or @ref LL_DMA_PRIORITY_MEDIUM or @ref LL_DMA_PRIORITY_HIGH or @ref LL_DMA_PRIORITY_VERYHIGH + * @retval None + */ +__STATIC_INLINE void LL_DMA_ConfigTransfer(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Configuration) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_DIR | DMA_CCR_MEM2MEM | DMA_CCR_CIRC | DMA_CCR_PINC | DMA_CCR_MINC | DMA_CCR_PSIZE | DMA_CCR_MSIZE | DMA_CCR_PL, + Configuration); +} + +/** + * @brief Set Data transfer direction (read from peripheral or from memory). + * @rmtoll CCR DIR LL_DMA_SetDataTransferDirection\n + * CCR MEM2MEM LL_DMA_SetDataTransferDirection + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param Direction This parameter can be one of the following values: + * @arg @ref LL_DMA_DIRECTION_PERIPH_TO_MEMORY + * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_PERIPH + * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_MEMORY + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetDataTransferDirection(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Direction) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_DIR | DMA_CCR_MEM2MEM, Direction); +} + +/** + * @brief Get Data transfer direction (read from peripheral or from memory). + * @rmtoll CCR DIR LL_DMA_GetDataTransferDirection\n + * CCR MEM2MEM LL_DMA_GetDataTransferDirection + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMA_DIRECTION_PERIPH_TO_MEMORY + * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_PERIPH + * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_MEMORY + */ +__STATIC_INLINE uint32_t LL_DMA_GetDataTransferDirection(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_DIR | DMA_CCR_MEM2MEM)); +} + +/** + * @brief Set DMA mode circular or normal. + * @note The circular buffer mode cannot be used if the memory-to-memory + * data transfer is configured on the selected Channel. + * @rmtoll CCR CIRC LL_DMA_SetMode + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param Mode This parameter can be one of the following values: + * @arg @ref LL_DMA_MODE_NORMAL + * @arg @ref LL_DMA_MODE_CIRCULAR + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetMode(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Mode) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_CIRC, + Mode); +} + +/** + * @brief Get DMA mode circular or normal. + * @rmtoll CCR CIRC LL_DMA_GetMode + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMA_MODE_NORMAL + * @arg @ref LL_DMA_MODE_CIRCULAR + */ +__STATIC_INLINE uint32_t LL_DMA_GetMode(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_CIRC)); +} + +/** + * @brief Set Peripheral increment mode. + * @rmtoll CCR PINC LL_DMA_SetPeriphIncMode + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param PeriphOrM2MSrcIncMode This parameter can be one of the following values: + * @arg @ref LL_DMA_PERIPH_INCREMENT + * @arg @ref LL_DMA_PERIPH_NOINCREMENT + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetPeriphIncMode(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcIncMode) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_PINC, + PeriphOrM2MSrcIncMode); +} + +/** + * @brief Get Peripheral increment mode. + * @rmtoll CCR PINC LL_DMA_GetPeriphIncMode + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMA_PERIPH_INCREMENT + * @arg @ref LL_DMA_PERIPH_NOINCREMENT + */ +__STATIC_INLINE uint32_t LL_DMA_GetPeriphIncMode(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_PINC)); +} + +/** + * @brief Set Memory increment mode. + * @rmtoll CCR MINC LL_DMA_SetMemoryIncMode + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param MemoryOrM2MDstIncMode This parameter can be one of the following values: + * @arg @ref LL_DMA_MEMORY_INCREMENT + * @arg @ref LL_DMA_MEMORY_NOINCREMENT + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetMemoryIncMode(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryOrM2MDstIncMode) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_MINC, + MemoryOrM2MDstIncMode); +} + +/** + * @brief Get Memory increment mode. + * @rmtoll CCR MINC LL_DMA_GetMemoryIncMode + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMA_MEMORY_INCREMENT + * @arg @ref LL_DMA_MEMORY_NOINCREMENT + */ +__STATIC_INLINE uint32_t LL_DMA_GetMemoryIncMode(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_MINC)); +} + +/** + * @brief Set Peripheral size. + * @rmtoll CCR PSIZE LL_DMA_SetPeriphSize + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param PeriphOrM2MSrcDataSize This parameter can be one of the following values: + * @arg @ref LL_DMA_PDATAALIGN_BYTE + * @arg @ref LL_DMA_PDATAALIGN_HALFWORD + * @arg @ref LL_DMA_PDATAALIGN_WORD + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetPeriphSize(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphOrM2MSrcDataSize) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_PSIZE, + PeriphOrM2MSrcDataSize); +} + +/** + * @brief Get Peripheral size. + * @rmtoll CCR PSIZE LL_DMA_GetPeriphSize + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMA_PDATAALIGN_BYTE + * @arg @ref LL_DMA_PDATAALIGN_HALFWORD + * @arg @ref LL_DMA_PDATAALIGN_WORD + */ +__STATIC_INLINE uint32_t LL_DMA_GetPeriphSize(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_PSIZE)); +} + +/** + * @brief Set Memory size. + * @rmtoll CCR MSIZE LL_DMA_SetMemorySize + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param MemoryOrM2MDstDataSize This parameter can be one of the following values: + * @arg @ref LL_DMA_MDATAALIGN_BYTE + * @arg @ref LL_DMA_MDATAALIGN_HALFWORD + * @arg @ref LL_DMA_MDATAALIGN_WORD + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetMemorySize(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryOrM2MDstDataSize) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_MSIZE, + MemoryOrM2MDstDataSize); +} + +/** + * @brief Get Memory size. + * @rmtoll CCR MSIZE LL_DMA_GetMemorySize + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMA_MDATAALIGN_BYTE + * @arg @ref LL_DMA_MDATAALIGN_HALFWORD + * @arg @ref LL_DMA_MDATAALIGN_WORD + */ +__STATIC_INLINE uint32_t LL_DMA_GetMemorySize(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_MSIZE)); +} + +/** + * @brief Set Channel priority level. + * @rmtoll CCR PL LL_DMA_SetChannelPriorityLevel + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param Priority This parameter can be one of the following values: + * @arg @ref LL_DMA_PRIORITY_LOW + * @arg @ref LL_DMA_PRIORITY_MEDIUM + * @arg @ref LL_DMA_PRIORITY_HIGH + * @arg @ref LL_DMA_PRIORITY_VERYHIGH + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetChannelPriorityLevel(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Priority) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_PL, + Priority); +} + +/** + * @brief Get Channel priority level. + * @rmtoll CCR PL LL_DMA_GetChannelPriorityLevel + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMA_PRIORITY_LOW + * @arg @ref LL_DMA_PRIORITY_MEDIUM + * @arg @ref LL_DMA_PRIORITY_HIGH + * @arg @ref LL_DMA_PRIORITY_VERYHIGH + */ +__STATIC_INLINE uint32_t LL_DMA_GetChannelPriorityLevel(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_PL)); +} + +/** + * @brief Set Number of data to transfer. + * @note This action has no effect if + * channel is enabled. + * @rmtoll CNDTR NDT LL_DMA_SetDataLength + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param NbData Between Min_Data = 0 and Max_Data = 0x0000FFFF + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetDataLength(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t NbData) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CNDTR, + DMA_CNDTR_NDT, NbData); +} + +/** + * @brief Get Number of data to transfer. + * @note Once the channel is enabled, the return value indicate the + * remaining bytes to be transmitted. + * @rmtoll CNDTR NDT LL_DMA_GetDataLength + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + */ +__STATIC_INLINE uint32_t LL_DMA_GetDataLength(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CNDTR, + DMA_CNDTR_NDT)); +} + +/** + * @brief Configure the Source and Destination addresses. + * @note This API must not be called when the DMA channel is enabled. + * @note Each peripheral using DMA provides an API to get directly the register address (LL_PPP_DMA_GetRegAddr). + * @rmtoll CPAR PA LL_DMA_ConfigAddresses\n + * CMAR MA LL_DMA_ConfigAddresses + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param SrcAddress Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + * @param DstAddress Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + * @param Direction This parameter can be one of the following values: + * @arg @ref LL_DMA_DIRECTION_PERIPH_TO_MEMORY + * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_PERIPH + * @arg @ref LL_DMA_DIRECTION_MEMORY_TO_MEMORY + * @retval None + */ +__STATIC_INLINE void LL_DMA_ConfigAddresses(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t SrcAddress, + uint32_t DstAddress, uint32_t Direction) +{ + /* Direction Memory to Periph */ + if (Direction == LL_DMA_DIRECTION_MEMORY_TO_PERIPH) + { + WRITE_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CMAR, SrcAddress); + WRITE_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CPAR, DstAddress); + } + /* Direction Periph to Memory and Memory to Memory */ + else + { + WRITE_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CPAR, SrcAddress); + WRITE_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CMAR, DstAddress); + } +} + +/** + * @brief Set the Memory address. + * @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only. + * @note This API must not be called when the DMA channel is enabled. + * @rmtoll CMAR MA LL_DMA_SetMemoryAddress + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param MemoryAddress Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress) +{ + WRITE_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CMAR, MemoryAddress); +} + +/** + * @brief Set the Peripheral address. + * @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only. + * @note This API must not be called when the DMA channel is enabled. + * @rmtoll CPAR PA LL_DMA_SetPeriphAddress + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param PeriphAddress Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphAddress) +{ + WRITE_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CPAR, PeriphAddress); +} + +/** + * @brief Get Memory address. + * @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only. + * @rmtoll CMAR MA LL_DMA_GetMemoryAddress + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + */ +__STATIC_INLINE uint32_t LL_DMA_GetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CMAR)); +} + +/** + * @brief Get Peripheral address. + * @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only. + * @rmtoll CPAR PA LL_DMA_GetPeriphAddress + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + */ +__STATIC_INLINE uint32_t LL_DMA_GetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CPAR)); +} + +/** + * @brief Set the Memory to Memory Source address. + * @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only. + * @note This API must not be called when the DMA channel is enabled. + * @rmtoll CPAR PA LL_DMA_SetM2MSrcAddress + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param MemoryAddress Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress) +{ + WRITE_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CPAR, MemoryAddress); +} + +/** + * @brief Set the Memory to Memory Destination address. + * @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only. + * @note This API must not be called when the DMA channel is enabled. + * @rmtoll CMAR MA LL_DMA_SetM2MDstAddress + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param MemoryAddress Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress) +{ + WRITE_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CMAR, MemoryAddress); +} + +/** + * @brief Get the Memory to Memory Source address. + * @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only. + * @rmtoll CPAR PA LL_DMA_GetM2MSrcAddress + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + */ +__STATIC_INLINE uint32_t LL_DMA_GetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CPAR)); +} + +/** + * @brief Get the Memory to Memory Destination address. + * @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only. + * @rmtoll CMAR MA LL_DMA_GetM2MDstAddress + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Between Min_Data = 0 and Max_Data = 0xFFFFFFFF + */ +__STATIC_INLINE uint32_t LL_DMA_GetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_REG(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CMAR)); +} + +/** + * @brief Set DMA request for DMA Channels on DMAMUX Channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR DMAREQ_ID LL_DMA_SetPeriphRequest + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @param Request This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_MEM2MEM + * @arg @ref LL_DMAMUX_REQ_GENERATOR0 + * @arg @ref LL_DMAMUX_REQ_GENERATOR1 + * @arg @ref LL_DMAMUX_REQ_GENERATOR2 + * @arg @ref LL_DMAMUX_REQ_GENERATOR3 + * @arg @ref LL_DMAMUX_REQ_ADC1 + * @arg @ref LL_DMAMUX_REQ_SPI1_RX + * @arg @ref LL_DMAMUX_REQ_SPI1_TX + * @arg @ref LL_DMAMUX_REQ_SPI2_RX + * @arg @ref LL_DMAMUX_REQ_SPI2_TX + * @arg @ref LL_DMAMUX_REQ_I2C1_RX + * @arg @ref LL_DMAMUX_REQ_I2C1_TX + * @arg @ref LL_DMAMUX_REQ_I2C3_RX + * @arg @ref LL_DMAMUX_REQ_I2C3_TX + * @arg @ref LL_DMAMUX_REQ_USART1_RX + * @arg @ref LL_DMAMUX_REQ_USART1_TX + * @arg @ref LL_DMAMUX_REQ_LPUART1_RX + * @arg @ref LL_DMAMUX_REQ_LPUART1_TX + * @arg @ref LL_DMAMUX_REQ_SAI1_A + * @arg @ref LL_DMAMUX_REQ_SAI1_B + * @arg @ref LL_DMAMUX_REQ_QUADSPI + * @arg @ref LL_DMAMUX_REQ_TIM1_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH2 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH3 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH4 + * @arg @ref LL_DMAMUX_REQ_TIM1_UP + * @arg @ref LL_DMAMUX_REQ_TIM1_TRIG + * @arg @ref LL_DMAMUX_REQ_TIM1_COM + * @arg @ref LL_DMAMUX_REQ_TIM2_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH2 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH3 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH4 + * @arg @ref LL_DMAMUX_REQ_TIM2_UP + * @arg @ref LL_DMAMUX_REQ_TIM16_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM16_UP + * @arg @ref LL_DMAMUX_REQ_TIM17_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM17_UP + * @arg @ref LL_DMAMUX_REQ_AES1_IN + * @arg @ref LL_DMAMUX_REQ_AES1_OUT + * @arg @ref LL_DMAMUX_REQ_AES2_IN + * @arg @ref LL_DMAMUX_REQ_AES2_OUT + * @retval None + */ +__STATIC_INLINE void LL_DMA_SetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t Request) +{ + MODIFY_REG(__LL_DMA_INSTANCE_TO_DMAMUX_CCR(DMAx, Channel - 1U)->CCR, DMAMUX_CxCR_DMAREQ_ID, Request); +} + +/** + * @brief Get DMA request for DMA Channels on DMAMUX Channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR DMAREQ_ID LL_DMA_GetPeriphRequest + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_MEM2MEM + * @arg @ref LL_DMAMUX_REQ_GENERATOR0 + * @arg @ref LL_DMAMUX_REQ_GENERATOR1 + * @arg @ref LL_DMAMUX_REQ_GENERATOR2 + * @arg @ref LL_DMAMUX_REQ_GENERATOR3 + * @arg @ref LL_DMAMUX_REQ_ADC1 + * @arg @ref LL_DMAMUX_REQ_SPI1_RX + * @arg @ref LL_DMAMUX_REQ_SPI1_TX + * @arg @ref LL_DMAMUX_REQ_SPI2_RX + * @arg @ref LL_DMAMUX_REQ_SPI2_TX + * @arg @ref LL_DMAMUX_REQ_I2C1_RX + * @arg @ref LL_DMAMUX_REQ_I2C1_TX + * @arg @ref LL_DMAMUX_REQ_I2C3_RX + * @arg @ref LL_DMAMUX_REQ_I2C3_TX + * @arg @ref LL_DMAMUX_REQ_USART1_RX + * @arg @ref LL_DMAMUX_REQ_USART1_TX + * @arg @ref LL_DMAMUX_REQ_LPUART1_RX + * @arg @ref LL_DMAMUX_REQ_LPUART1_TX + * @arg @ref LL_DMAMUX_REQ_SAI1_A + * @arg @ref LL_DMAMUX_REQ_SAI1_B + * @arg @ref LL_DMAMUX_REQ_QUADSPI + * @arg @ref LL_DMAMUX_REQ_TIM1_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH2 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH3 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH4 + * @arg @ref LL_DMAMUX_REQ_TIM1_UP + * @arg @ref LL_DMAMUX_REQ_TIM1_TRIG + * @arg @ref LL_DMAMUX_REQ_TIM1_COM + * @arg @ref LL_DMAMUX_REQ_TIM2_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH2 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH3 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH4 + * @arg @ref LL_DMAMUX_REQ_TIM2_UP + * @arg @ref LL_DMAMUX_REQ_TIM16_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM16_UP + * @arg @ref LL_DMAMUX_REQ_TIM17_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM17_UP + * @arg @ref LL_DMAMUX_REQ_AES1_IN + * @arg @ref LL_DMAMUX_REQ_AES1_OUT + * @arg @ref LL_DMAMUX_REQ_AES2_IN + * @arg @ref LL_DMAMUX_REQ_AES2_OUT + */ +__STATIC_INLINE uint32_t LL_DMA_GetPeriphRequest(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return (READ_BIT(__LL_DMA_INSTANCE_TO_DMAMUX_CCR(DMAx, Channel - 1U)->CCR, DMAMUX_CxCR_DMAREQ_ID)); +} + +/** + * @} + */ + +/** @defgroup DMA_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Get Channel 1 global interrupt flag. + * @rmtoll ISR GIF1 LL_DMA_IsActiveFlag_GI1 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI1(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_GIF1) == (DMA_ISR_GIF1)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 2 global interrupt flag. + * @rmtoll ISR GIF2 LL_DMA_IsActiveFlag_GI2 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI2(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_GIF2) == (DMA_ISR_GIF2)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 3 global interrupt flag. + * @rmtoll ISR GIF3 LL_DMA_IsActiveFlag_GI3 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI3(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_GIF3) == (DMA_ISR_GIF3)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 4 global interrupt flag. + * @rmtoll ISR GIF4 LL_DMA_IsActiveFlag_GI4 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI4(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_GIF4) == (DMA_ISR_GIF4)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 5 global interrupt flag. + * @rmtoll ISR GIF5 LL_DMA_IsActiveFlag_GI5 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI5(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_GIF5) == (DMA_ISR_GIF5)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 6 global interrupt flag. + * @rmtoll ISR GIF6 LL_DMA_IsActiveFlag_GI6 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI6(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_GIF6) == (DMA_ISR_GIF6)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 7 global interrupt flag. + * @rmtoll ISR GIF7 LL_DMA_IsActiveFlag_GI7 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_GI7(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_GIF7) == (DMA_ISR_GIF7)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 1 transfer complete flag. + * @rmtoll ISR TCIF1 LL_DMA_IsActiveFlag_TC1 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC1(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TCIF1) == (DMA_ISR_TCIF1)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 2 transfer complete flag. + * @rmtoll ISR TCIF2 LL_DMA_IsActiveFlag_TC2 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC2(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TCIF2) == (DMA_ISR_TCIF2)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 3 transfer complete flag. + * @rmtoll ISR TCIF3 LL_DMA_IsActiveFlag_TC3 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC3(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TCIF3) == (DMA_ISR_TCIF3)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 4 transfer complete flag. + * @rmtoll ISR TCIF4 LL_DMA_IsActiveFlag_TC4 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC4(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TCIF4) == (DMA_ISR_TCIF4)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 5 transfer complete flag. + * @rmtoll ISR TCIF5 LL_DMA_IsActiveFlag_TC5 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC5(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TCIF5) == (DMA_ISR_TCIF5)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 6 transfer complete flag. + * @rmtoll ISR TCIF6 LL_DMA_IsActiveFlag_TC6 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC6(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TCIF6) == (DMA_ISR_TCIF6)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 7 transfer complete flag. + * @rmtoll ISR TCIF7 LL_DMA_IsActiveFlag_TC7 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TC7(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TCIF7) == (DMA_ISR_TCIF7)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 1 half transfer flag. + * @rmtoll ISR HTIF1 LL_DMA_IsActiveFlag_HT1 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT1(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_HTIF1) == (DMA_ISR_HTIF1)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 2 half transfer flag. + * @rmtoll ISR HTIF2 LL_DMA_IsActiveFlag_HT2 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT2(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_HTIF2) == (DMA_ISR_HTIF2)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 3 half transfer flag. + * @rmtoll ISR HTIF3 LL_DMA_IsActiveFlag_HT3 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT3(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_HTIF3) == (DMA_ISR_HTIF3)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 4 half transfer flag. + * @rmtoll ISR HTIF4 LL_DMA_IsActiveFlag_HT4 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT4(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_HTIF4) == (DMA_ISR_HTIF4)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 5 half transfer flag. + * @rmtoll ISR HTIF5 LL_DMA_IsActiveFlag_HT5 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT5(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_HTIF5) == (DMA_ISR_HTIF5)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 6 half transfer flag. + * @rmtoll ISR HTIF6 LL_DMA_IsActiveFlag_HT6 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT6(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_HTIF6) == (DMA_ISR_HTIF6)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 7 half transfer flag. + * @rmtoll ISR HTIF7 LL_DMA_IsActiveFlag_HT7 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_HT7(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_HTIF7) == (DMA_ISR_HTIF7)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 1 transfer error flag. + * @rmtoll ISR TEIF1 LL_DMA_IsActiveFlag_TE1 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE1(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TEIF1) == (DMA_ISR_TEIF1)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 2 transfer error flag. + * @rmtoll ISR TEIF2 LL_DMA_IsActiveFlag_TE2 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE2(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TEIF2) == (DMA_ISR_TEIF2)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 3 transfer error flag. + * @rmtoll ISR TEIF3 LL_DMA_IsActiveFlag_TE3 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE3(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TEIF3) == (DMA_ISR_TEIF3)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 4 transfer error flag. + * @rmtoll ISR TEIF4 LL_DMA_IsActiveFlag_TE4 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE4(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TEIF4) == (DMA_ISR_TEIF4)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 5 transfer error flag. + * @rmtoll ISR TEIF5 LL_DMA_IsActiveFlag_TE5 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE5(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TEIF5) == (DMA_ISR_TEIF5)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 6 transfer error flag. + * @rmtoll ISR TEIF6 LL_DMA_IsActiveFlag_TE6 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE6(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TEIF6) == (DMA_ISR_TEIF6)) ? 1UL : 0UL); +} + +/** + * @brief Get Channel 7 transfer error flag. + * @rmtoll ISR TEIF7 LL_DMA_IsActiveFlag_TE7 + * @param DMAx DMAx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE7(DMA_TypeDef *DMAx) +{ + return ((READ_BIT(DMAx->ISR, DMA_ISR_TEIF7) == (DMA_ISR_TEIF7)) ? 1UL : 0UL); +} + +/** + * @brief Clear Channel 1 global interrupt flag. + * @note Do not Clear Channel 1 global interrupt flag when the channel in ON. + Instead clear specific flags transfer complete, half transfer & transfer + error flag with LL_DMA_ClearFlag_TC1, LL_DMA_ClearFlag_HT1, + LL_DMA_ClearFlag_TE1. bug id 2.4.1 in Product Errata Sheet. + * @rmtoll IFCR CGIF1 LL_DMA_ClearFlag_GI1 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_GI1(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF1); +} + +/** + * @brief Clear Channel 2 global interrupt flag. + * @note Do not Clear Channel 2 global interrupt flag when the channel in ON. + Instead clear specific flags transfer complete, half transfer & transfer + error flag with LL_DMA_ClearFlag_TC2, LL_DMA_ClearFlag_HT2, + LL_DMA_ClearFlag_TE2. bug id 2.4.1 in Product Errata Sheet. + * @rmtoll IFCR CGIF2 LL_DMA_ClearFlag_GI2 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_GI2(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF2); +} + +/** + * @brief Clear Channel 3 global interrupt flag. + * @note Do not Clear Channel 3 global interrupt flag when the channel in ON. + Instead clear specific flags transfer complete, half transfer & transfer + error flag with LL_DMA_ClearFlag_TC3, LL_DMA_ClearFlag_HT3, + LL_DMA_ClearFlag_TE3. bug id 2.4.1 in Product Errata Sheet. + * @rmtoll IFCR CGIF3 LL_DMA_ClearFlag_GI3 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_GI3(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF3); +} + +/** + * @brief Clear Channel 4 global interrupt flag. + * @note Do not Clear Channel 4 global interrupt flag when the channel in ON. + Instead clear specific flags transfer complete, half transfer & transfer + error flag with LL_DMA_ClearFlag_TC4, LL_DMA_ClearFlag_HT4, + LL_DMA_ClearFlag_TE4. bug id 2.4.1 in Product Errata Sheet. + * @rmtoll IFCR CGIF4 LL_DMA_ClearFlag_GI4 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_GI4(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF4); +} + +/** + * @brief Clear Channel 5 global interrupt flag. + * @note Do not Clear Channel 5 global interrupt flag when the channel in ON. + Instead clear specific flags transfer complete, half transfer & transfer + error flag with LL_DMA_ClearFlag_TC5, LL_DMA_ClearFlag_HT5, + LL_DMA_ClearFlag_TE5. bug id 2.4.1 in Product Errata Sheet. + * @rmtoll IFCR CGIF5 LL_DMA_ClearFlag_GI5 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_GI5(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF5); +} + +/** + * @brief Clear Channel 6 global interrupt flag. + * @note Do not Clear Channel 6 global interrupt flag when the channel in ON. + Instead clear specific flags transfer complete, half transfer & transfer + error flag with LL_DMA_ClearFlag_TC6, LL_DMA_ClearFlag_HT6, + LL_DMA_ClearFlag_TE6. bug id 2.4.1 in Product Errata Sheet. + * @rmtoll IFCR CGIF6 LL_DMA_ClearFlag_GI6 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_GI6(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF6); +} + +/** + * @brief Clear Channel 7 global interrupt flag. + * @note Do not Clear Channel 7 global interrupt flag when the channel in ON. + Instead clear specific flags transfer complete, half transfer & transfer + error flag with LL_DMA_ClearFlag_TC7, LL_DMA_ClearFlag_HT7, + LL_DMA_ClearFlag_TE7. bug id 2.4.1 in Product Errata Sheet. + * @rmtoll IFCR CGIF7 LL_DMA_ClearFlag_GI7 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_GI7(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF7); +} + +/** + * @brief Clear Channel 1 transfer complete flag. + * @rmtoll IFCR CTCIF1 LL_DMA_ClearFlag_TC1 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TC1(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF1); +} + +/** + * @brief Clear Channel 2 transfer complete flag. + * @rmtoll IFCR CTCIF2 LL_DMA_ClearFlag_TC2 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TC2(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF2); +} + +/** + * @brief Clear Channel 3 transfer complete flag. + * @rmtoll IFCR CTCIF3 LL_DMA_ClearFlag_TC3 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TC3(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF3); +} + +/** + * @brief Clear Channel 4 transfer complete flag. + * @rmtoll IFCR CTCIF4 LL_DMA_ClearFlag_TC4 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TC4(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF4); +} + +/** + * @brief Clear Channel 5 transfer complete flag. + * @rmtoll IFCR CTCIF5 LL_DMA_ClearFlag_TC5 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TC5(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF5); +} + +/** + * @brief Clear Channel 6 transfer complete flag. + * @rmtoll IFCR CTCIF6 LL_DMA_ClearFlag_TC6 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TC6(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF6); +} + +/** + * @brief Clear Channel 7 transfer complete flag. + * @rmtoll IFCR CTCIF7 LL_DMA_ClearFlag_TC7 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TC7(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF7); +} + +/** + * @brief Clear Channel 1 half transfer flag. + * @rmtoll IFCR CHTIF1 LL_DMA_ClearFlag_HT1 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_HT1(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF1); +} + +/** + * @brief Clear Channel 2 half transfer flag. + * @rmtoll IFCR CHTIF2 LL_DMA_ClearFlag_HT2 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_HT2(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF2); +} + +/** + * @brief Clear Channel 3 half transfer flag. + * @rmtoll IFCR CHTIF3 LL_DMA_ClearFlag_HT3 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_HT3(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF3); +} + +/** + * @brief Clear Channel 4 half transfer flag. + * @rmtoll IFCR CHTIF4 LL_DMA_ClearFlag_HT4 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_HT4(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF4); +} + +/** + * @brief Clear Channel 5 half transfer flag. + * @rmtoll IFCR CHTIF5 LL_DMA_ClearFlag_HT5 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_HT5(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF5); +} + +/** + * @brief Clear Channel 6 half transfer flag. + * @rmtoll IFCR CHTIF6 LL_DMA_ClearFlag_HT6 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_HT6(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF6); +} + +/** + * @brief Clear Channel 7 half transfer flag. + * @rmtoll IFCR CHTIF7 LL_DMA_ClearFlag_HT7 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_HT7(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF7); +} + +/** + * @brief Clear Channel 1 transfer error flag. + * @rmtoll IFCR CTEIF1 LL_DMA_ClearFlag_TE1 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TE1(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF1); +} + +/** + * @brief Clear Channel 2 transfer error flag. + * @rmtoll IFCR CTEIF2 LL_DMA_ClearFlag_TE2 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TE2(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF2); +} + +/** + * @brief Clear Channel 3 transfer error flag. + * @rmtoll IFCR CTEIF3 LL_DMA_ClearFlag_TE3 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TE3(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF3); +} + +/** + * @brief Clear Channel 4 transfer error flag. + * @rmtoll IFCR CTEIF4 LL_DMA_ClearFlag_TE4 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TE4(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF4); +} + +/** + * @brief Clear Channel 5 transfer error flag. + * @rmtoll IFCR CTEIF5 LL_DMA_ClearFlag_TE5 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TE5(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF5); +} + +/** + * @brief Clear Channel 6 transfer error flag. + * @rmtoll IFCR CTEIF6 LL_DMA_ClearFlag_TE6 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TE6(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF6); +} + +/** + * @brief Clear Channel 7 transfer error flag. + * @rmtoll IFCR CTEIF7 LL_DMA_ClearFlag_TE7 + * @param DMAx DMAx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMA_ClearFlag_TE7(DMA_TypeDef *DMAx) +{ + WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF7); +} + +/** + * @} + */ + +/** @defgroup DMA_LL_EF_IT_Management IT_Management + * @{ + */ +/** + * @brief Enable Transfer complete interrupt. + * @rmtoll CCR TCIE LL_DMA_EnableIT_TC + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval None + */ +__STATIC_INLINE void LL_DMA_EnableIT_TC(DMA_TypeDef *DMAx, uint32_t Channel) +{ + SET_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_TCIE); +} + +/** + * @brief Enable Half transfer interrupt. + * @rmtoll CCR HTIE LL_DMA_EnableIT_HT + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval None + */ +__STATIC_INLINE void LL_DMA_EnableIT_HT(DMA_TypeDef *DMAx, uint32_t Channel) +{ + SET_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_HTIE); +} + +/** + * @brief Enable Transfer error interrupt. + * @rmtoll CCR TEIE LL_DMA_EnableIT_TE + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval None + */ +__STATIC_INLINE void LL_DMA_EnableIT_TE(DMA_TypeDef *DMAx, uint32_t Channel) +{ + SET_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_TEIE); +} + +/** + * @brief Disable Transfer complete interrupt. + * @rmtoll CCR TCIE LL_DMA_DisableIT_TC + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval None + */ +__STATIC_INLINE void LL_DMA_DisableIT_TC(DMA_TypeDef *DMAx, uint32_t Channel) +{ + CLEAR_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_TCIE); +} + +/** + * @brief Disable Half transfer interrupt. + * @rmtoll CCR HTIE LL_DMA_DisableIT_HT + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval None + */ +__STATIC_INLINE void LL_DMA_DisableIT_HT(DMA_TypeDef *DMAx, uint32_t Channel) +{ + CLEAR_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_HTIE); +} + +/** + * @brief Disable Transfer error interrupt. + * @rmtoll CCR TEIE LL_DMA_DisableIT_TE + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval None + */ +__STATIC_INLINE void LL_DMA_DisableIT_TE(DMA_TypeDef *DMAx, uint32_t Channel) +{ + CLEAR_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, DMA_CCR_TEIE); +} + +/** + * @brief Check if Transfer complete Interrupt is enabled. + * @rmtoll CCR TCIE LL_DMA_IsEnabledIT_TC + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TC(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return ((READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_TCIE) == (DMA_CCR_TCIE)) ? 1UL : 0UL); +} + +/** + * @brief Check if Half transfer Interrupt is enabled. + * @rmtoll CCR HTIE LL_DMA_IsEnabledIT_HT + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_HT(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return ((READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_HTIE) == (DMA_CCR_HTIE)) ? 1UL : 0UL); +} + +/** + * @brief Check if Transfer error Interrupt is enabled. + * @rmtoll CCR TEIE LL_DMA_IsEnabledIT_TE + * @param DMAx DMAx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMA_CHANNEL_1 + * @arg @ref LL_DMA_CHANNEL_2 + * @arg @ref LL_DMA_CHANNEL_3 + * @arg @ref LL_DMA_CHANNEL_4 + * @arg @ref LL_DMA_CHANNEL_5 + * @arg @ref LL_DMA_CHANNEL_6 + * @arg @ref LL_DMA_CHANNEL_7 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMA_IsEnabledIT_TE(DMA_TypeDef *DMAx, uint32_t Channel) +{ + return ((READ_BIT(__LL_DMA_INSTANCE_TO_CHANNEL(DMAx, Channel - 1U)->CCR, + DMA_CCR_TEIE) == (DMA_CCR_TEIE)) ? 1UL : 0UL); +} + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup DMA_LL_EF_Init Initialization and de-initialization functions + * @{ + */ +ErrorStatus LL_DMA_Init(DMA_TypeDef *DMAx, uint32_t Channel, LL_DMA_InitTypeDef *DMA_InitStruct); +ErrorStatus LL_DMA_DeInit(DMA_TypeDef *DMAx, uint32_t Channel); +void LL_DMA_StructInit(LL_DMA_InitTypeDef *DMA_InitStruct); + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* DMA1 || DMA2 */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_DMA_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h new file mode 100644 index 0000000..606b8f7 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_dmamux.h @@ -0,0 +1,1768 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_dmamux.h + * @author MCD Application Team + * @brief Header file of DMAMUX LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_DMAMUX_H +#define STM32WBxx_LL_DMAMUX_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined (DMAMUX1) + +/** @defgroup DMAMUX_LL DMAMUX + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/** @defgroup DMAMUX_LL_Private_Constants DMAMUX Private Constants + * @{ + */ +/* Define used to get DMAMUX CCR register size */ +#define DMAMUX_CCR_SIZE 0x00000004UL + +/* Define used to get DMAMUX RGCR register size */ +#define DMAMUX_RGCR_SIZE 0x00000004UL +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup DMAMUX_LL_Exported_Constants DMAMUX Exported Constants + * @{ + */ +/** @defgroup DMAMUX_LL_EC_CLEAR_FLAG Clear Flags Defines + * @brief Flags defines which can be used with LL_DMAMUX_WriteReg function + * @{ + */ +#define LL_DMAMUX_CFR_CSOF0 DMAMUX_CFR_CSOF0 /*!< Synchronization Event Overrun Flag Channel 0 */ +#define LL_DMAMUX_CFR_CSOF1 DMAMUX_CFR_CSOF1 /*!< Synchronization Event Overrun Flag Channel 1 */ +#define LL_DMAMUX_CFR_CSOF2 DMAMUX_CFR_CSOF2 /*!< Synchronization Event Overrun Flag Channel 2 */ +#define LL_DMAMUX_CFR_CSOF3 DMAMUX_CFR_CSOF3 /*!< Synchronization Event Overrun Flag Channel 3 */ +#define LL_DMAMUX_CFR_CSOF4 DMAMUX_CFR_CSOF4 /*!< Synchronization Event Overrun Flag Channel 4 */ +#define LL_DMAMUX_CFR_CSOF5 DMAMUX_CFR_CSOF5 /*!< Synchronization Event Overrun Flag Channel 5 */ +#define LL_DMAMUX_CFR_CSOF6 DMAMUX_CFR_CSOF6 /*!< Synchronization Event Overrun Flag Channel 6 */ +#if defined(DMA2) +#define LL_DMAMUX_CFR_CSOF7 DMAMUX_CFR_CSOF7 /*!< Synchronization Event Overrun Flag Channel 7 */ +#define LL_DMAMUX_CFR_CSOF8 DMAMUX_CFR_CSOF8 /*!< Synchronization Event Overrun Flag Channel 8 */ +#define LL_DMAMUX_CFR_CSOF9 DMAMUX_CFR_CSOF9 /*!< Synchronization Event Overrun Flag Channel 9 */ +#define LL_DMAMUX_CFR_CSOF10 DMAMUX_CFR_CSOF10 /*!< Synchronization Event Overrun Flag Channel 10 */ +#define LL_DMAMUX_CFR_CSOF11 DMAMUX_CFR_CSOF11 /*!< Synchronization Event Overrun Flag Channel 11 */ +#define LL_DMAMUX_CFR_CSOF12 DMAMUX_CFR_CSOF12 /*!< Synchronization Event Overrun Flag Channel 12 */ +#define LL_DMAMUX_CFR_CSOF13 DMAMUX_CFR_CSOF13 /*!< Synchronization Event Overrun Flag Channel 13 */ +#endif /* DMA2 */ +#define LL_DMAMUX_RGCFR_RGCOF0 DMAMUX_RGCFR_COF0 /*!< Request Generator 0 Trigger Event Overrun Flag */ +#define LL_DMAMUX_RGCFR_RGCOF1 DMAMUX_RGCFR_COF1 /*!< Request Generator 1 Trigger Event Overrun Flag */ +#define LL_DMAMUX_RGCFR_RGCOF2 DMAMUX_RGCFR_COF2 /*!< Request Generator 2 Trigger Event Overrun Flag */ +#define LL_DMAMUX_RGCFR_RGCOF3 DMAMUX_RGCFR_COF3 /*!< Request Generator 3 Trigger Event Overrun Flag */ +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_DMAMUX_ReadReg function + * @{ + */ +#define LL_DMAMUX_CSR_SOF0 DMAMUX_CSR_SOF0 /*!< Synchronization Event Overrun Flag Channel 0 */ +#define LL_DMAMUX_CSR_SOF1 DMAMUX_CSR_SOF1 /*!< Synchronization Event Overrun Flag Channel 1 */ +#define LL_DMAMUX_CSR_SOF2 DMAMUX_CSR_SOF2 /*!< Synchronization Event Overrun Flag Channel 2 */ +#define LL_DMAMUX_CSR_SOF3 DMAMUX_CSR_SOF3 /*!< Synchronization Event Overrun Flag Channel 3 */ +#define LL_DMAMUX_CSR_SOF4 DMAMUX_CSR_SOF4 /*!< Synchronization Event Overrun Flag Channel 4 */ +#define LL_DMAMUX_CSR_SOF5 DMAMUX_CSR_SOF5 /*!< Synchronization Event Overrun Flag Channel 5 */ +#define LL_DMAMUX_CSR_SOF6 DMAMUX_CSR_SOF6 /*!< Synchronization Event Overrun Flag Channel 6 */ +#if defined(DMA2) +#define LL_DMAMUX_CSR_SOF7 DMAMUX_CSR_SOF7 /*!< Synchronization Event Overrun Flag Channel 7 */ +#define LL_DMAMUX_CSR_SOF8 DMAMUX_CSR_SOF8 /*!< Synchronization Event Overrun Flag Channel 8 */ +#define LL_DMAMUX_CSR_SOF9 DMAMUX_CSR_SOF9 /*!< Synchronization Event Overrun Flag Channel 9 */ +#define LL_DMAMUX_CSR_SOF10 DMAMUX_CSR_SOF10 /*!< Synchronization Event Overrun Flag Channel 10 */ +#define LL_DMAMUX_CSR_SOF11 DMAMUX_CSR_SOF11 /*!< Synchronization Event Overrun Flag Channel 11 */ +#define LL_DMAMUX_CSR_SOF12 DMAMUX_CSR_SOF12 /*!< Synchronization Event Overrun Flag Channel 12 */ +#define LL_DMAMUX_CSR_SOF13 DMAMUX_CSR_SOF13 /*!< Synchronization Event Overrun Flag Channel 13 */ +#endif /* DMA2 */ +#define LL_DMAMUX_RGSR_RGOF0 DMAMUX_RGSR_OF0 /*!< Request Generator 0 Trigger Event Overrun Flag */ +#define LL_DMAMUX_RGSR_RGOF1 DMAMUX_RGSR_OF1 /*!< Request Generator 1 Trigger Event Overrun Flag */ +#define LL_DMAMUX_RGSR_RGOF2 DMAMUX_RGSR_OF2 /*!< Request Generator 2 Trigger Event Overrun Flag */ +#define LL_DMAMUX_RGSR_RGOF3 DMAMUX_RGSR_OF3 /*!< Request Generator 3 Trigger Event Overrun Flag */ +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_DMA_ReadReg and LL_DMAMUX_WriteReg functions + * @{ + */ +#define LL_DMAMUX_CCR_SOIE DMAMUX_CxCR_SOIE /*!< Synchronization Event Overrun Interrupt */ +#define LL_DMAMUX_RGCR_RGOIE DMAMUX_RGxCR_OIE /*!< Request Generation Trigger Event Overrun Interrupt */ +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_REQUEST Transfer request + * @{ + */ +#define LL_DMAMUX_REQ_MEM2MEM 0x00000000U /*!< memory to memory transfer */ +#define LL_DMAMUX_REQ_GENERATOR0 0x00000001U /*!< DMAMUX request generator 0 */ +#define LL_DMAMUX_REQ_GENERATOR1 0x00000002U /*!< DMAMUX request generator 1 */ +#define LL_DMAMUX_REQ_GENERATOR2 0x00000003U /*!< DMAMUX request generator 2 */ +#define LL_DMAMUX_REQ_GENERATOR3 0x00000004U /*!< DMAMUX request generator 3 */ +#define LL_DMAMUX_REQ_ADC1 0x00000005U /*!< DMAMUX ADC1 request */ +#define LL_DMAMUX_REQ_SPI1_RX 0x00000006U /*!< DMAMUX SPI1 RX request */ +#define LL_DMAMUX_REQ_SPI1_TX 0x00000007U /*!< DMAMUX SPI1 TX request */ +#if defined(SPI2) +#define LL_DMAMUX_REQ_SPI2_RX 0x00000008U /*!< DMAMUX SPI2 RX request */ +#define LL_DMAMUX_REQ_SPI2_TX 0x00000009U /*!< DMAMUX SPI2 TX request */ +#endif /* SPI2 */ +#define LL_DMAMUX_REQ_I2C1_RX 0x0000000AU /*!< DMAMUX I2C1 RX request */ +#define LL_DMAMUX_REQ_I2C1_TX 0x0000000BU /*!< DMAMUX I2C1 TX request */ +#if defined(I2C3) +#define LL_DMAMUX_REQ_I2C3_RX 0x0000000CU /*!< DMAMUX I2C3 RX request */ +#define LL_DMAMUX_REQ_I2C3_TX 0x0000000DU /*!< DMAMUX I2C3 TX request */ +#endif /* I2C3 */ +#define LL_DMAMUX_REQ_USART1_RX 0x0000000EU /*!< DMAMUX USART1 RX request */ +#define LL_DMAMUX_REQ_USART1_TX 0x0000000FU /*!< DMAMUX USART1 TX request */ +#if defined(LPUART1) +#define LL_DMAMUX_REQ_LPUART1_RX 0x00000010U /*!< DMAMUX LPUART1 RX request */ +#define LL_DMAMUX_REQ_LPUART1_TX 0x00000011U /*!< DMAMUX LPUART1 TX request */ +#endif /* LPUART1 */ +#if defined(SAI1) +#define LL_DMAMUX_REQ_SAI1_A 0x00000012U /*!< DMAMUX SAI1 A request */ +#define LL_DMAMUX_REQ_SAI1_B 0x00000013U /*!< DMAMUX SAI1 B request */ +#endif /* SAI1 */ +#if defined(QUADSPI) +#define LL_DMAMUX_REQ_QUADSPI 0x00000014U /*!< DMAMUX QUADSPI request */ +#endif /* QUADSPI */ +#define LL_DMAMUX_REQ_TIM1_CH1 0x00000015U /*!< DMAMUX TIM1 CH1 request */ +#define LL_DMAMUX_REQ_TIM1_CH2 0x00000016U /*!< DMAMUX TIM1 CH2 request */ +#define LL_DMAMUX_REQ_TIM1_CH3 0x00000017U /*!< DMAMUX TIM1 CH3 request */ +#define LL_DMAMUX_REQ_TIM1_CH4 0x00000018U /*!< DMAMUX TIM1 CH4 request */ +#define LL_DMAMUX_REQ_TIM1_UP 0x00000019U /*!< DMAMUX TIM1 UP request */ +#define LL_DMAMUX_REQ_TIM1_TRIG 0x0000001AU /*!< DMAMUX TIM1 TRIG request */ +#define LL_DMAMUX_REQ_TIM1_COM 0x0000001BU /*!< DMAMUX TIM1 COM request */ +#define LL_DMAMUX_REQ_TIM2_CH1 0x0000001CU /*!< DMAMUX TIM2 CH1 request */ +#define LL_DMAMUX_REQ_TIM2_CH2 0x0000001DU /*!< DMAMUX TIM2 CH2 request */ +#define LL_DMAMUX_REQ_TIM2_CH3 0x0000001EU /*!< DMAMUX TIM2 CH3 request */ +#define LL_DMAMUX_REQ_TIM2_CH4 0x0000001FU /*!< DMAMUX TIM2 CH4 request */ +#define LL_DMAMUX_REQ_TIM2_UP 0x00000020U /*!< DMAMUX TIM2 UP request */ +#define LL_DMAMUX_REQ_TIM16_CH1 0x00000021U /*!< DMAMUX TIM16 CH1 request */ +#define LL_DMAMUX_REQ_TIM16_UP 0x00000022U /*!< DMAMUX TIM16 UP request */ +#define LL_DMAMUX_REQ_TIM17_CH1 0x00000023U /*!< DMAMUX TIM17 CH1 request */ +#define LL_DMAMUX_REQ_TIM17_UP 0x00000024U /*!< DMAMUX TIM17 UP request */ +#if defined(AES1) +#define LL_DMAMUX_REQ_AES1_IN 0x00000025U /*!< DMAMUX AES1_IN request */ +#define LL_DMAMUX_REQ_AES1_OUT 0x00000026U /*!< DMAMUX AES1_OUT request */ +#endif /* AES1 */ +#define LL_DMAMUX_REQ_AES2_IN 0x00000027U /*!< DMAMUX AES2_IN request */ +#define LL_DMAMUX_REQ_AES2_OUT 0x00000028U /*!< DMAMUX AES2_OUT request */ +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_CHANNEL DMAMUX Channel + * @{ + */ +#define LL_DMAMUX_CHANNEL_0 0x00000000U /*!< DMAMUX Channel 0 connected to DMA1 Channel 1 */ +#define LL_DMAMUX_CHANNEL_1 0x00000001U /*!< DMAMUX Channel 1 connected to DMA1 Channel 2 */ +#define LL_DMAMUX_CHANNEL_2 0x00000002U /*!< DMAMUX Channel 2 connected to DMA1 Channel 3 */ +#define LL_DMAMUX_CHANNEL_3 0x00000003U /*!< DMAMUX Channel 3 connected to DMA1 Channel 4 */ +#define LL_DMAMUX_CHANNEL_4 0x00000004U /*!< DMAMUX Channel 4 connected to DMA1 Channel 5 */ +#define LL_DMAMUX_CHANNEL_5 0x00000005U /*!< DMAMUX Channel 5 connected to DMA1 Channel 6 */ +#define LL_DMAMUX_CHANNEL_6 0x00000006U /*!< DMAMUX Channel 6 connected to DMA1 Channel 7 */ +#if defined(DMA2) +#define LL_DMAMUX_CHANNEL_7 0x00000007U /*!< DMAMUX Channel 7 connected to DMA2 Channel 1 */ +#define LL_DMAMUX_CHANNEL_8 0x00000008U /*!< DMAMUX Channel 8 connected to DMA2 Channel 2 */ +#define LL_DMAMUX_CHANNEL_9 0x00000009U /*!< DMAMUX Channel 9 connected to DMA2 Channel 3 */ +#define LL_DMAMUX_CHANNEL_10 0x0000000AU /*!< DMAMUX Channel 10 connected to DMA2 Channel 4 */ +#define LL_DMAMUX_CHANNEL_11 0x0000000BU /*!< DMAMUX Channel 11 connected to DMA2 Channel 5 */ +#define LL_DMAMUX_CHANNEL_12 0x0000000CU /*!< DMAMUX Channel 12 connected to DMA2 Channel 6 */ +#define LL_DMAMUX_CHANNEL_13 0x0000000DU /*!< DMAMUX Channel 13 connected to DMA2 Channel 7 */ +#endif /* DMA2 */ +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_SYNC_NO Synchronization Signal Polarity + * @{ + */ +#define LL_DMAMUX_SYNC_NO_EVENT 0x00000000U /*!< All requests are blocked */ +#define LL_DMAMUX_SYNC_POL_RISING DMAMUX_CxCR_SPOL_0 /*!< Synchronization on event on rising edge */ +#define LL_DMAMUX_SYNC_POL_FALLING DMAMUX_CxCR_SPOL_1 /*!< Synchronization on event on falling edge */ +#define LL_DMAMUX_SYNC_POL_RISING_FALLING (DMAMUX_CxCR_SPOL_0 | DMAMUX_CxCR_SPOL_1) /*!< Synchronization on event on rising and falling edge */ +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_SYNC_EVT Synchronization Signal Event + * @{ + */ +#define LL_DMAMUX_SYNC_EXTI_LINE0 0x00000000U /*!< Synchronization signal from EXTI Line0 */ +#define LL_DMAMUX_SYNC_EXTI_LINE1 DMAMUX_CxCR_SYNC_ID_0 /*!< Synchronization signal from EXTI Line1 */ +#define LL_DMAMUX_SYNC_EXTI_LINE2 DMAMUX_CxCR_SYNC_ID_1 /*!< Synchronization signal from EXTI Line2 */ +#define LL_DMAMUX_SYNC_EXTI_LINE3 (DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from EXTI Line3 */ +#define LL_DMAMUX_SYNC_EXTI_LINE4 DMAMUX_CxCR_SYNC_ID_2 /*!< Synchronization signal from EXTI Line4 */ +#define LL_DMAMUX_SYNC_EXTI_LINE5 (DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from EXTI Line5 */ +#define LL_DMAMUX_SYNC_EXTI_LINE6 (DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_1) /*!< Synchronization signal from EXTI Line6 */ +#define LL_DMAMUX_SYNC_EXTI_LINE7 (DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from EXTI Line7 */ +#define LL_DMAMUX_SYNC_EXTI_LINE8 DMAMUX_CxCR_SYNC_ID_3 /*!< Synchronization signal from EXTI Line8 */ +#define LL_DMAMUX_SYNC_EXTI_LINE9 (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from EXTI Line9 */ +#define LL_DMAMUX_SYNC_EXTI_LINE10 (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_1) /*!< Synchronization signal from EXTI Line10 */ +#define LL_DMAMUX_SYNC_EXTI_LINE11 (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from EXTI Line11 */ +#define LL_DMAMUX_SYNC_EXTI_LINE12 (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_2) /*!< Synchronization signal from EXTI Line12 */ +#define LL_DMAMUX_SYNC_EXTI_LINE13 (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from EXTI Line13 */ +#define LL_DMAMUX_SYNC_EXTI_LINE14 (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_1) /*!< Synchronization signal from EXTI Line14 */ +#define LL_DMAMUX_SYNC_EXTI_LINE15 (DMAMUX_CxCR_SYNC_ID_3 | DMAMUX_CxCR_SYNC_ID_2 | DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from EXTI Line15 */ +#define LL_DMAMUX_SYNC_DMAMUX_CH0 DMAMUX_CxCR_SYNC_ID_4 /*!< Synchronization signal from DMAMUX channel0 Event */ +#define LL_DMAMUX_SYNC_DMAMUX_CH1 (DMAMUX_CxCR_SYNC_ID_4 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from DMAMUX channel1 Event */ +#define LL_DMAMUX_SYNC_LPTIM1_OUT (DMAMUX_CxCR_SYNC_ID_4 | DMAMUX_CxCR_SYNC_ID_1) /*!< Synchronization signal from LPTIM1 Output */ +#define LL_DMAMUX_SYNC_LPTIM2_OUT (DMAMUX_CxCR_SYNC_ID_4 | DMAMUX_CxCR_SYNC_ID_1 | DMAMUX_CxCR_SYNC_ID_0) /*!< Synchronization signal from LPTIM2 Output */ +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_REQUEST_GENERATOR Request Generator Channel + * @{ + */ +#define LL_DMAMUX_REQ_GEN_0 0x00000000U +#define LL_DMAMUX_REQ_GEN_1 0x00000001U +#define LL_DMAMUX_REQ_GEN_2 0x00000002U +#define LL_DMAMUX_REQ_GEN_3 0x00000003U +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_REQUEST_GEN_POLARITY External Request Signal Generation Polarity + * @{ + */ +#define LL_DMAMUX_REQ_GEN_NO_EVENT 0x00000000U /*!< No external DMA request generation */ +#define LL_DMAMUX_REQ_GEN_POL_RISING DMAMUX_RGxCR_GPOL_0 /*!< External DMA request generation on event on rising edge */ +#define LL_DMAMUX_REQ_GEN_POL_FALLING DMAMUX_RGxCR_GPOL_1 /*!< External DMA request generation on event on falling edge */ +#define LL_DMAMUX_REQ_GEN_POL_RISING_FALLING (DMAMUX_RGxCR_GPOL_0 | DMAMUX_RGxCR_GPOL_1) /*!< External DMA request generation on rising and falling edge */ +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EC_REQUEST_GEN External Request Signal Generation + * @{ + */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE0 0x00000000U /*!< Request signal generation from EXTI Line0 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE1 DMAMUX_RGxCR_SIG_ID_0 /*!< Request signal generation from EXTI Line1 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE2 DMAMUX_RGxCR_SIG_ID_1 /*!< Request signal generation from EXTI Line2 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE3 (DMAMUX_RGxCR_SIG_ID_1 |DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from EXTI Line3 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE4 DMAMUX_RGxCR_SIG_ID_2 /*!< Request signal generation from EXTI Line4 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE5 (DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from EXTI Line5 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE6 (DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_1) /*!< Request signal generation from EXTI Line6 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE7 (DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_1 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from EXTI Line7 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE8 DMAMUX_RGxCR_SIG_ID_3 /*!< Request signal generation from EXTI Line8 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE9 (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from EXTI Line9 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE10 (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_1) /*!< Request signal generation from EXTI Line10 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE11 (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_1 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from EXTI Line11 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE12 (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_2) /*!< Request signal generation from EXTI Line12 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE13 (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from EXTI Line13 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE14 (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_1) /*!< Request signal generation from EXTI Line14 */ +#define LL_DMAMUX_REQ_GEN_EXTI_LINE15 (DMAMUX_RGxCR_SIG_ID_3 | DMAMUX_RGxCR_SIG_ID_2 | DMAMUX_RGxCR_SIG_ID_1 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from EXTI Line15 */ +#define LL_DMAMUX_REQ_GEN_DMAMUX_CH0 DMAMUX_RGxCR_SIG_ID_4 /*!< Request signal generation from DMAMUX channel0 Event */ +#define LL_DMAMUX_REQ_GEN_DMAMUX_CH1 (DMAMUX_RGxCR_SIG_ID_4 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from DMAMUX channel1 Event */ +#define LL_DMAMUX_REQ_GEN_LPTIM1_OUT (DMAMUX_RGxCR_SIG_ID_4 | DMAMUX_RGxCR_SIG_ID_1) /*!< Request signal generation from LPTIM1 Output */ +#define LL_DMAMUX_REQ_GEN_LPTIM2_OUT (DMAMUX_RGxCR_SIG_ID_4 | DMAMUX_RGxCR_SIG_ID_1 | DMAMUX_RGxCR_SIG_ID_0) /*!< Request signal generation from LPTIM2 Output */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup DMAMUX_LL_Exported_Macros DMAMUX Exported Macros + * @{ + */ + +/** @defgroup DMAMUX_LL_EM_WRITE_READ Common Write and read registers macros + * @{ + */ +/** + * @brief Write a value in DMAMUX register + * @param __INSTANCE__ DMAMUX Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_DMAMUX_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in DMAMUX register + * @param __INSTANCE__ DMAMUX Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_DMAMUX_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup DMAMUX_LL_Exported_Functions DMAMUX Exported Functions + * @{ + */ + +/** @defgroup DMAMUX_LL_EF_Configuration Configuration + * @{ + */ +/** + * @brief Set DMAMUX request ID for DMAMUX Channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR DMAREQ_ID LL_DMAMUX_SetRequestID + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @param Request This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_MEM2MEM + * @arg @ref LL_DMAMUX_REQ_GENERATOR0 + * @arg @ref LL_DMAMUX_REQ_GENERATOR1 + * @arg @ref LL_DMAMUX_REQ_GENERATOR2 + * @arg @ref LL_DMAMUX_REQ_GENERATOR3 + * @arg @ref LL_DMAMUX_REQ_ADC1 + * @arg @ref LL_DMAMUX_REQ_SPI1_RX + * @arg @ref LL_DMAMUX_REQ_SPI1_TX + * @arg @ref LL_DMAMUX_REQ_SPI2_RX + * @arg @ref LL_DMAMUX_REQ_SPI2_TX + * @arg @ref LL_DMAMUX_REQ_I2C1_RX + * @arg @ref LL_DMAMUX_REQ_I2C1_TX + * @arg @ref LL_DMAMUX_REQ_I2C3_RX + * @arg @ref LL_DMAMUX_REQ_I2C3_TX + * @arg @ref LL_DMAMUX_REQ_USART1_RX + * @arg @ref LL_DMAMUX_REQ_USART1_TX + * @arg @ref LL_DMAMUX_REQ_LPUART1_RX + * @arg @ref LL_DMAMUX_REQ_LPUART1_TX + * @arg @ref LL_DMAMUX_REQ_SAI1_A + * @arg @ref LL_DMAMUX_REQ_SAI1_B + * @arg @ref LL_DMAMUX_REQ_QUADSPI + * @arg @ref LL_DMAMUX_REQ_TIM1_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH2 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH3 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH4 + * @arg @ref LL_DMAMUX_REQ_TIM1_UP + * @arg @ref LL_DMAMUX_REQ_TIM1_TRIG + * @arg @ref LL_DMAMUX_REQ_TIM1_COM + * @arg @ref LL_DMAMUX_REQ_TIM2_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH2 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH3 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH4 + * @arg @ref LL_DMAMUX_REQ_TIM2_UP + * @arg @ref LL_DMAMUX_REQ_TIM16_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM16_UP + * @arg @ref LL_DMAMUX_REQ_TIM17_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM17_UP + * @arg @ref LL_DMAMUX_REQ_AES1_IN + * @arg @ref LL_DMAMUX_REQ_AES1_OUT + * @arg @ref LL_DMAMUX_REQ_AES2_IN + * @arg @ref LL_DMAMUX_REQ_AES2_OUT + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_SetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t Request) +{ + (void)(DMAMUXx); + MODIFY_REG((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_DMAREQ_ID, Request); +} + +/** + * @brief Get DMAMUX request ID for DMAMUX Channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR DMAREQ_ID LL_DMAMUX_GetRequestID + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_MEM2MEM + * @arg @ref LL_DMAMUX_REQ_GENERATOR0 + * @arg @ref LL_DMAMUX_REQ_GENERATOR1 + * @arg @ref LL_DMAMUX_REQ_GENERATOR2 + * @arg @ref LL_DMAMUX_REQ_GENERATOR3 + * @arg @ref LL_DMAMUX_REQ_ADC1 + * @arg @ref LL_DMAMUX_REQ_SPI1_RX + * @arg @ref LL_DMAMUX_REQ_SPI1_TX + * @arg @ref LL_DMAMUX_REQ_SPI2_RX + * @arg @ref LL_DMAMUX_REQ_SPI2_TX + * @arg @ref LL_DMAMUX_REQ_I2C1_RX + * @arg @ref LL_DMAMUX_REQ_I2C1_TX + * @arg @ref LL_DMAMUX_REQ_I2C3_RX + * @arg @ref LL_DMAMUX_REQ_I2C3_TX + * @arg @ref LL_DMAMUX_REQ_USART1_RX + * @arg @ref LL_DMAMUX_REQ_USART1_TX + * @arg @ref LL_DMAMUX_REQ_LPUART1_RX + * @arg @ref LL_DMAMUX_REQ_LPUART1_TX + * @arg @ref LL_DMAMUX_REQ_SAI1_A + * @arg @ref LL_DMAMUX_REQ_SAI1_B + * @arg @ref LL_DMAMUX_REQ_QUADSPI + * @arg @ref LL_DMAMUX_REQ_TIM1_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH2 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH3 + * @arg @ref LL_DMAMUX_REQ_TIM1_CH4 + * @arg @ref LL_DMAMUX_REQ_TIM1_UP + * @arg @ref LL_DMAMUX_REQ_TIM1_TRIG + * @arg @ref LL_DMAMUX_REQ_TIM1_COM + * @arg @ref LL_DMAMUX_REQ_TIM2_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH2 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH3 + * @arg @ref LL_DMAMUX_REQ_TIM2_CH4 + * @arg @ref LL_DMAMUX_REQ_TIM2_UP + * @arg @ref LL_DMAMUX_REQ_TIM16_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM16_UP + * @arg @ref LL_DMAMUX_REQ_TIM17_CH1 + * @arg @ref LL_DMAMUX_REQ_TIM17_UP + * @arg @ref LL_DMAMUX_REQ_AES1_IN + * @arg @ref LL_DMAMUX_REQ_AES1_OUT + * @arg @ref LL_DMAMUX_REQ_AES2_IN + * @arg @ref LL_DMAMUX_REQ_AES2_OUT + */ +__STATIC_INLINE uint32_t LL_DMAMUX_GetRequestID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + return (uint32_t)(READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_DMAREQ_ID)); +} + +/** + * @brief Set the number of DMA request that will be autorized after a synchronization event and/or the number of DMA request needed to generate an event. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR NBREQ LL_DMAMUX_SetSyncRequestNb + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @param RequestNb This parameter must be a value between Min_Data = 1 and Max_Data = 32. + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_SetSyncRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t RequestNb) +{ + (void)(DMAMUXx); + MODIFY_REG((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_NBREQ, ((RequestNb - 1U) << DMAMUX_CxCR_NBREQ_Pos)); +} + +/** + * @brief Get the number of DMA request that will be autorized after a synchronization event and/or the number of DMA request needed to generate an event. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR NBREQ LL_DMAMUX_GetSyncRequestNb + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval Between Min_Data = 1 and Max_Data = 32 + */ +__STATIC_INLINE uint32_t LL_DMAMUX_GetSyncRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + return (uint32_t)(((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_NBREQ)) >> DMAMUX_CxCR_NBREQ_Pos) + 1U); +} + +/** + * @brief Set the polarity of the signal on which the DMA request is synchronized. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SPOL LL_DMAMUX_SetSyncPolarity + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @param Polarity This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_SYNC_NO_EVENT + * @arg @ref LL_DMAMUX_SYNC_POL_RISING + * @arg @ref LL_DMAMUX_SYNC_POL_FALLING + * @arg @ref LL_DMAMUX_SYNC_POL_RISING_FALLING + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_SetSyncPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t Polarity) +{ + (void)(DMAMUXx); + MODIFY_REG((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SPOL, Polarity); +} + +/** + * @brief Get the polarity of the signal on which the DMA request is synchronized. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SPOL LL_DMAMUX_GetSyncPolarity + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMAMUX_SYNC_NO_EVENT + * @arg @ref LL_DMAMUX_SYNC_POL_RISING + * @arg @ref LL_DMAMUX_SYNC_POL_FALLING + * @arg @ref LL_DMAMUX_SYNC_POL_RISING_FALLING + */ +__STATIC_INLINE uint32_t LL_DMAMUX_GetSyncPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + return (uint32_t)(READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SPOL)); +} + +/** + * @brief Enable the Event Generation on DMAMUX channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR EGE LL_DMAMUX_EnableEventGeneration + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_EnableEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + SET_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_EGE); +} + +/** + * @brief Disable the Event Generation on DMAMUX channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR EGE LL_DMAMUX_DisableEventGeneration + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_DisableEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + CLEAR_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_EGE); +} + +/** + * @brief Check if the Event Generation on DMAMUX channel x is enabled or disabled. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR EGE LL_DMAMUX_IsEnabledEventGeneration + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledEventGeneration(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + return ((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_EGE) == (DMAMUX_CxCR_EGE)) ? 1UL : 0UL); +} + +/** + * @brief Enable the synchronization mode. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SE LL_DMAMUX_EnableSync + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_EnableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + SET_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SE); +} + +/** + * @brief Disable the synchronization mode. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SE LL_DMAMUX_DisableSync + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_DisableSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + CLEAR_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SE); +} + +/** + * @brief Check if the synchronization mode is enabled or disabled. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SE LL_DMAMUX_IsEnabledSync + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledSync(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + return ((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SE) == (DMAMUX_CxCR_SE)) ? 1UL : 0UL); +} + +/** + * @brief Set DMAMUX synchronization ID on DMAMUX Channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SYNC_ID LL_DMAMUX_SetSyncID + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @param SyncID This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE0 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE1 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE2 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE3 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE4 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE5 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE6 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE7 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE8 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE9 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE10 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE11 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE12 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE13 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE14 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE15 + * @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH0 + * @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH1 + * @arg @ref LL_DMAMUX_SYNC_LPTIM1_OUT + * @arg @ref LL_DMAMUX_SYNC_LPTIM2_OUT + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_SetSyncID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel, uint32_t SyncID) +{ + (void)(DMAMUXx); + MODIFY_REG((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SYNC_ID, SyncID); +} + +/** + * @brief Get DMAMUX synchronization ID on DMAMUX Channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SYNC_ID LL_DMAMUX_GetSyncID + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE0 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE1 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE2 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE3 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE4 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE5 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE6 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE7 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE8 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE9 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE10 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE11 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE12 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE13 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE14 + * @arg @ref LL_DMAMUX_SYNC_EXTI_LINE15 + * @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH0 + * @arg @ref LL_DMAMUX_SYNC_DMAMUX_CH1 + * @arg @ref LL_DMAMUX_SYNC_LPTIM1_OUT + * @arg @ref LL_DMAMUX_SYNC_LPTIM2_OUT + */ +__STATIC_INLINE uint32_t LL_DMAMUX_GetSyncID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + return (uint32_t)(READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SYNC_ID)); +} + +/** + * @brief Enable the Request Generator. + * @rmtoll RGxCR GE LL_DMAMUX_EnableRequestGen + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_EnableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + SET_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * + (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GE); +} + +/** + * @brief Disable the Request Generator. + * @rmtoll RGxCR GE LL_DMAMUX_DisableRequestGen + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_DisableRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + CLEAR_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * + (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GE); +} + +/** + * @brief Check if the Request Generator is enabled or disabled. + * @rmtoll RGxCR GE LL_DMAMUX_IsEnabledRequestGen + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledRequestGen(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + return ((READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * + (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GE) == (DMAMUX_RGxCR_GE)) ? 1UL : 0UL); +} + +/** + * @brief Set the polarity of the signal on which the DMA request is generated. + * @rmtoll RGxCR GPOL LL_DMAMUX_SetRequestGenPolarity + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @param Polarity This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_NO_EVENT + * @arg @ref LL_DMAMUX_REQ_GEN_POL_RISING + * @arg @ref LL_DMAMUX_REQ_GEN_POL_FALLING + * @arg @ref LL_DMAMUX_REQ_GEN_POL_RISING_FALLING + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_SetRequestGenPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel, + uint32_t Polarity) +{ + (void)(DMAMUXx); + MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * + (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GPOL, Polarity); +} + +/** + * @brief Get the polarity of the signal on which the DMA request is generated. + * @rmtoll RGxCR GPOL LL_DMAMUX_GetRequestGenPolarity + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_NO_EVENT + * @arg @ref LL_DMAMUX_REQ_GEN_POL_RISING + * @arg @ref LL_DMAMUX_REQ_GEN_POL_FALLING + * @arg @ref LL_DMAMUX_REQ_GEN_POL_RISING_FALLING + */ +__STATIC_INLINE uint32_t LL_DMAMUX_GetRequestGenPolarity(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + return (uint32_t)(READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + + (DMAMUX_RGCR_SIZE * (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GPOL)); +} + +/** + * @brief Set the number of DMA request that will be autorized after a generation event. + * @note This field can only be written when Generator is disabled. + * @rmtoll RGxCR GNBREQ LL_DMAMUX_SetGenRequestNb + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @param RequestNb This parameter must be a value between Min_Data = 1 and Max_Data = 32. + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_SetGenRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel, + uint32_t RequestNb) +{ + (void)(DMAMUXx); + MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * + (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GNBREQ, (RequestNb - 1U) << DMAMUX_RGxCR_GNBREQ_Pos); +} + +/** + * @brief Get the number of DMA request that will be autorized after a generation event. + * @rmtoll RGxCR GNBREQ LL_DMAMUX_GetGenRequestNb + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval Between Min_Data = 1 and Max_Data = 32 + */ +__STATIC_INLINE uint32_t LL_DMAMUX_GetGenRequestNb(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + return (uint32_t)((READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + + (DMAMUX_RGCR_SIZE * (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_GNBREQ) >> DMAMUX_RGxCR_GNBREQ_Pos) + 1U); +} + +/** + * @brief Set DMAMUX external Request Signal ID on DMAMUX Request Generation Trigger Event Channel x. + * @rmtoll RGxCR SIG_ID LL_DMAMUX_SetRequestSignalID + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @param RequestSignalID This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE0 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE1 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE2 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE3 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE4 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE5 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE6 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE7 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE8 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE9 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE10 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE11 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE12 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE13 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE14 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE15 + * @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH0 + * @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH1 + * @arg @ref LL_DMAMUX_REQ_GEN_LPTIM1_OUT + * @arg @ref LL_DMAMUX_REQ_GEN_LPTIM2_OUT + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_SetRequestSignalID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel, + uint32_t RequestSignalID) +{ + (void)(DMAMUXx); + MODIFY_REG(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + (DMAMUX_RGCR_SIZE * + (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_SIG_ID, RequestSignalID); +} + +/** + * @brief Get DMAMUX external Request Signal ID set on DMAMUX Channel x. + * @rmtoll RGxCR SIG_ID LL_DMAMUX_GetRequestSignalID + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval Returned value can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE0 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE1 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE2 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE3 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE4 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE5 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE6 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE7 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE8 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE9 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE10 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE11 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE12 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE13 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE14 + * @arg @ref LL_DMAMUX_REQ_GEN_EXTI_LINE15 + * @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH0 + * @arg @ref LL_DMAMUX_REQ_GEN_DMAMUX_CH1 + * @arg @ref LL_DMAMUX_REQ_GEN_LPTIM1_OUT + * @arg @ref LL_DMAMUX_REQ_GEN_LPTIM2_OUT + */ +__STATIC_INLINE uint32_t LL_DMAMUX_GetRequestSignalID(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + return (uint32_t)(READ_BIT(((DMAMUX_RequestGen_TypeDef *)((uint32_t)((uint32_t)DMAMUX1_RequestGenerator0 + + (DMAMUX_RGCR_SIZE * (RequestGenChannel)))))->RGCR, DMAMUX_RGxCR_SIG_ID)); +} + +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Get Synchronization Event Overrun Flag Channel 0. + * @rmtoll CSR SOF0 LL_DMAMUX_IsActiveFlag_SO0 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO0(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF0) == (DMAMUX_CSR_SOF0)) ? 1UL : 0UL); +} + +/** + * @brief Get Synchronization Event Overrun Flag Channel 1. + * @rmtoll CSR SOF1 LL_DMAMUX_IsActiveFlag_SO1 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO1(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF1) == (DMAMUX_CSR_SOF1)) ? 1UL : 0UL); +} + +/** + * @brief Get Synchronization Event Overrun Flag Channel 2. + * @rmtoll CSR SOF2 LL_DMAMUX_IsActiveFlag_SO2 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO2(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF2) == (DMAMUX_CSR_SOF2)) ? 1UL : 0UL); +} + +/** + * @brief Get Synchronization Event Overrun Flag Channel 3. + * @rmtoll CSR SOF3 LL_DMAMUX_IsActiveFlag_SO3 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO3(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF3) == (DMAMUX_CSR_SOF3)) ? 1UL : 0UL); +} + +/** + * @brief Get Synchronization Event Overrun Flag Channel 4. + * @rmtoll CSR SOF4 LL_DMAMUX_IsActiveFlag_SO4 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO4(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF4) == (DMAMUX_CSR_SOF4)) ? 1UL : 0UL); +} + +/** + * @brief Get Synchronization Event Overrun Flag Channel 5. + * @rmtoll CSR SOF5 LL_DMAMUX_IsActiveFlag_SO5 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO5(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF5) == (DMAMUX_CSR_SOF5)) ? 1UL : 0UL); +} + +/** + * @brief Get Synchronization Event Overrun Flag Channel 6. + * @rmtoll CSR SOF6 LL_DMAMUX_IsActiveFlag_SO6 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO6(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF6) == (DMAMUX_CSR_SOF6)) ? 1UL : 0UL); +} + +#if defined(DMAMUX1_Channel7) +/** + * @brief Get Synchronization Event Overrun Flag Channel 7. + * @rmtoll CSR SOF7 LL_DMAMUX_IsActiveFlag_SO7 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO7(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF7) == (DMAMUX_CSR_SOF7)) ? 1UL : 0UL); +} + +#endif /* DMAMUX1_Channel7 */ +#if defined(DMAMUX1_Channel8) +/** + * @brief Get Synchronization Event Overrun Flag Channel 8. + * @rmtoll CSR SOF8 LL_DMAMUX_IsActiveFlag_SO8 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO8(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF8) == (DMAMUX_CSR_SOF8)) ? 1UL : 0UL); +} + +#endif /* DMAMUX1_Channel8 */ +#if defined(DMAMUX1_Channel9) +/** + * @brief Get Synchronization Event Overrun Flag Channel 9. + * @rmtoll CSR SOF9 LL_DMAMUX_IsActiveFlag_SO9 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO9(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF9) == (DMAMUX_CSR_SOF9)) ? 1UL : 0UL); +} + +#endif /* DMAMUX1_Channel9 */ +#if defined(DMAMUX1_Channel10) +/** + * @brief Get Synchronization Event Overrun Flag Channel 10. + * @rmtoll CSR SOF10 LL_DMAMUX_IsActiveFlag_SO10 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO10(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF10) == (DMAMUX_CSR_SOF10)) ? 1UL : 0UL); +} + +#endif /* DMAMUX1_Channel10 */ +#if defined(DMAMUX1_Channel11) +/** + * @brief Get Synchronization Event Overrun Flag Channel 11. + * @rmtoll CSR SOF11 LL_DMAMUX_IsActiveFlag_SO11 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO11(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF11) == (DMAMUX_CSR_SOF11)) ? 1UL : 0UL); +} + +#endif /* DMAMUX1_Channel11 */ +#if defined(DMAMUX1_Channel12) +/** + * @brief Get Synchronization Event Overrun Flag Channel 12. + * @rmtoll CSR SOF12 LL_DMAMUX_IsActiveFlag_SO12 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO12(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF12) == (DMAMUX_CSR_SOF12)) ? 1UL : 0UL); +} + +#endif /* DMAMUX1_Channel12 */ +#if defined(DMAMUX1_Channel13) +/** + * @brief Get Synchronization Event Overrun Flag Channel 13. + * @rmtoll CSR SOF13 LL_DMAMUX_IsActiveFlag_SO13 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_SO13(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_ChannelStatus->CSR, DMAMUX_CSR_SOF13) == (DMAMUX_CSR_SOF13)) ? 1UL : 0UL); +} + +#endif /* DMAMUX1_Channel13 */ +/** + * @brief Get Request Generator 0 Trigger Event Overrun Flag. + * @rmtoll RGSR OF0 LL_DMAMUX_IsActiveFlag_RGO0 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO0(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_RequestGenStatus->RGSR, DMAMUX_RGSR_OF0) == (DMAMUX_RGSR_OF0)) ? 1UL : 0UL); +} + +/** + * @brief Get Request Generator 1 Trigger Event Overrun Flag. + * @rmtoll RGSR OF1 LL_DMAMUX_IsActiveFlag_RGO1 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO1(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_RequestGenStatus->RGSR, DMAMUX_RGSR_OF1) == (DMAMUX_RGSR_OF1)) ? 1UL : 0UL); +} + +/** + * @brief Get Request Generator 2 Trigger Event Overrun Flag. + * @rmtoll RGSR OF2 LL_DMAMUX_IsActiveFlag_RGO2 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO2(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_RequestGenStatus->RGSR, DMAMUX_RGSR_OF2) == (DMAMUX_RGSR_OF2)) ? 1UL : 0UL); +} + +/** + * @brief Get Request Generator 3 Trigger Event Overrun Flag. + * @rmtoll RGSR OF3 LL_DMAMUX_IsActiveFlag_RGO3 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsActiveFlag_RGO3(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + return ((READ_BIT(DMAMUX1_RequestGenStatus->RGSR, DMAMUX_RGSR_OF3) == (DMAMUX_RGSR_OF3)) ? 1UL : 0UL); +} + +/** + * @brief Clear Synchronization Event Overrun Flag Channel 0. + * @rmtoll CFR CSOF0 LL_DMAMUX_ClearFlag_SO0 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO0(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF0); +} + +/** + * @brief Clear Synchronization Event Overrun Flag Channel 1. + * @rmtoll CFR CSOF1 LL_DMAMUX_ClearFlag_SO1 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO1(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF1); +} + +/** + * @brief Clear Synchronization Event Overrun Flag Channel 2. + * @rmtoll CFR CSOF2 LL_DMAMUX_ClearFlag_SO2 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO2(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF2); +} + +/** + * @brief Clear Synchronization Event Overrun Flag Channel 3. + * @rmtoll CFR CSOF3 LL_DMAMUX_ClearFlag_SO3 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO3(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF3); +} + +/** + * @brief Clear Synchronization Event Overrun Flag Channel 4. + * @rmtoll CFR CSOF4 LL_DMAMUX_ClearFlag_SO4 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO4(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF4); +} + +/** + * @brief Clear Synchronization Event Overrun Flag Channel 5. + * @rmtoll CFR CSOF5 LL_DMAMUX_ClearFlag_SO5 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO5(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF5); +} + +/** + * @brief Clear Synchronization Event Overrun Flag Channel 6. + * @rmtoll CFR CSOF6 LL_DMAMUX_ClearFlag_SO6 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO6(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF6); +} + +#if defined(DMAMUX1_Channel7) +/** + * @brief Clear Synchronization Event Overrun Flag Channel 7. + * @rmtoll CFR CSOF7 LL_DMAMUX_ClearFlag_SO7 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO7(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF7); +} + +#endif /* DMAMUX1_Channel7 */ +#if defined(DMAMUX1_Channel8) +/** + * @brief Clear Synchronization Event Overrun Flag Channel 8. + * @rmtoll CFR CSOF8 LL_DMAMUX_ClearFlag_SO8 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO8(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF8); +} + +#endif /* DMAMUX1_Channel8 */ +#if defined(DMAMUX1_Channel9) +/** + * @brief Clear Synchronization Event Overrun Flag Channel 9. + * @rmtoll CFR CSOF9 LL_DMAMUX_ClearFlag_SO9 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO9(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF9); +} + +#endif /* DMAMUX1_Channel9 */ +#if defined(DMAMUX1_Channel10) +/** + * @brief Clear Synchronization Event Overrun Flag Channel 10. + * @rmtoll CFR CSOF10 LL_DMAMUX_ClearFlag_SO10 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO10(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF10); +} + +#endif /* DMAMUX1_Channel10 */ +#if defined(DMAMUX1_Channel11) +/** + * @brief Clear Synchronization Event Overrun Flag Channel 11. + * @rmtoll CFR CSOF11 LL_DMAMUX_ClearFlag_SO11 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO11(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF11); +} + +#endif /* DMAMUX1_Channel11 */ +#if defined(DMAMUX1_Channel12) +/** + * @brief Clear Synchronization Event Overrun Flag Channel 12. + * @rmtoll CFR CSOF12 LL_DMAMUX_ClearFlag_SO12 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO12(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF12); +} + +#endif /* DMAMUX1_Channel12 */ +#if defined(DMAMUX1_Channel13) +/** + * @brief Clear Synchronization Event Overrun Flag Channel 13. + * @rmtoll CFR CSOF13 LL_DMAMUX_ClearFlag_SO13 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_SO13(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_ChannelStatus->CFR, DMAMUX_CFR_CSOF13); +} + +#endif /* DMAMUX1_Channel13 */ +/** + * @brief Clear Request Generator 0 Trigger Event Overrun Flag. + * @rmtoll RGCFR COF0 LL_DMAMUX_ClearFlag_RGO0 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO0(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_RequestGenStatus->RGCFR, DMAMUX_RGCFR_COF0); +} + +/** + * @brief Clear Request Generator 1 Trigger Event Overrun Flag. + * @rmtoll RGCFR COF1 LL_DMAMUX_ClearFlag_RGO1 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO1(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_RequestGenStatus->RGCFR, DMAMUX_RGCFR_COF1); +} + +/** + * @brief Clear Request Generator 2 Trigger Event Overrun Flag. + * @rmtoll RGCFR COF2 LL_DMAMUX_ClearFlag_RGO2 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO2(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_RequestGenStatus->RGCFR, DMAMUX_RGCFR_COF2); +} + +/** + * @brief Clear Request Generator 3 Trigger Event Overrun Flag. + * @rmtoll RGCFR COF3 LL_DMAMUX_ClearFlag_RGO3 + * @param DMAMUXx DMAMUXx DMAMUXx Instance + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_ClearFlag_RGO3(DMAMUX_Channel_TypeDef *DMAMUXx) +{ + (void)(DMAMUXx); + SET_BIT(DMAMUX1_RequestGenStatus->RGCFR, DMAMUX_RGCFR_COF3); +} + +/** + * @} + */ + +/** @defgroup DMAMUX_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable the Synchronization Event Overrun Interrupt on DMAMUX channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SOIE LL_DMAMUX_EnableIT_SO + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_EnableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + SET_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SOIE); +} + +/** + * @brief Disable the Synchronization Event Overrun Interrupt on DMAMUX channel x. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SOIE LL_DMAMUX_DisableIT_SO + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_DisableIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + CLEAR_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SOIE); +} + +/** + * @brief Check if the Synchronization Event Overrun Interrupt on DMAMUX channel x is enabled or disabled. + * @note DMAMUX channel 0 to 6 are mapped to DMA1 channel 1 to 7. + * DMAMUX channel 7 to 13 are mapped to DMA2 channel 1 to 7 (**** only available on chip which support DMA2 ****). + * @rmtoll CxCR SOIE LL_DMAMUX_IsEnabledIT_SO + * @param DMAMUXx DMAMUXx Instance + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_CHANNEL_0 + * @arg @ref LL_DMAMUX_CHANNEL_1 + * @arg @ref LL_DMAMUX_CHANNEL_2 + * @arg @ref LL_DMAMUX_CHANNEL_3 + * @arg @ref LL_DMAMUX_CHANNEL_4 + * @arg @ref LL_DMAMUX_CHANNEL_5 + * @arg @ref LL_DMAMUX_CHANNEL_6 + * + * @arg All the next values are only available on chip which support DMA2: + * @arg @ref LL_DMAMUX_CHANNEL_7 + * @arg @ref LL_DMAMUX_CHANNEL_8 + * @arg @ref LL_DMAMUX_CHANNEL_9 + * @arg @ref LL_DMAMUX_CHANNEL_10 + * @arg @ref LL_DMAMUX_CHANNEL_11 + * @arg @ref LL_DMAMUX_CHANNEL_12 + * @arg @ref LL_DMAMUX_CHANNEL_13 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_SO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t Channel) +{ + (void)(DMAMUXx); + return (((READ_BIT((DMAMUX1_Channel0 + Channel)->CCR, DMAMUX_CxCR_SOIE)) == (DMAMUX_CxCR_SOIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable the Request Generation Trigger Event Overrun Interrupt on DMAMUX channel x. + * @rmtoll RGxCR OIE LL_DMAMUX_EnableIT_RGO + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_EnableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + SET_BIT((DMAMUX1_RequestGenerator0 + RequestGenChannel)->RGCR, DMAMUX_RGxCR_OIE); +} + +/** + * @brief Disable the Request Generation Trigger Event Overrun Interrupt on DMAMUX channel x. + * @rmtoll RGxCR OIE LL_DMAMUX_DisableIT_RGO + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval None + */ +__STATIC_INLINE void LL_DMAMUX_DisableIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + CLEAR_BIT((DMAMUX1_RequestGenerator0 + RequestGenChannel)->RGCR, DMAMUX_RGxCR_OIE); +} + +/** + * @brief Check if the Request Generation Trigger Event Overrun Interrupt on DMAMUX channel x is enabled or disabled. + * @rmtoll RGxCR OIE LL_DMAMUX_IsEnabledIT_RGO + * @param DMAMUXx DMAMUXx Instance + * @param RequestGenChannel This parameter can be one of the following values: + * @arg @ref LL_DMAMUX_REQ_GEN_0 + * @arg @ref LL_DMAMUX_REQ_GEN_1 + * @arg @ref LL_DMAMUX_REQ_GEN_2 + * @arg @ref LL_DMAMUX_REQ_GEN_3 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DMAMUX_IsEnabledIT_RGO(DMAMUX_Channel_TypeDef *DMAMUXx, uint32_t RequestGenChannel) +{ + (void)(DMAMUXx); + return ((READ_BIT((DMAMUX1_RequestGenerator0 + RequestGenChannel)->RGCR, DMAMUX_RGxCR_OIE) == (DMAMUX_RGxCR_OIE)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* DMAMUX1 */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_DMAMUX_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h new file mode 100644 index 0000000..9bb9d70 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_exti.h @@ -0,0 +1,1633 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_exti.h + * @author MCD Application Team + * @brief Header file of EXTI LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_EXTI_H +#define STM32WBxx_LL_EXTI_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined (EXTI) + +/** @defgroup EXTI_LL EXTI + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private Macros ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup EXTI_LL_Private_Macros EXTI Private Macros + * @{ + */ +/** + * @} + */ +#endif /*USE_FULL_LL_DRIVER*/ +/* Exported types ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup EXTI_LL_ES_INIT EXTI Exported Init structure + * @{ + */ +typedef struct +{ + + uint32_t Line_0_31; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 0 to 31 + This parameter can be any combination of @ref EXTI_LL_EC_LINE */ + + uint32_t Line_32_63; /*!< Specifies the EXTI lines to be enabled or disabled for Lines in range 32 to 63 + This parameter can be any combination of @ref EXTI_LL_EC_LINE */ + + FunctionalState LineCommand; /*!< Specifies the new state of the selected EXTI lines. + This parameter can be set either to ENABLE or DISABLE */ + + uint8_t Mode; /*!< Specifies the mode for the EXTI lines. + This parameter can be a value of @ref EXTI_LL_EC_MODE. */ + + uint8_t Trigger; /*!< Specifies the trigger signal active edge for the EXTI lines. + This parameter can be a value of @ref EXTI_LL_EC_TRIGGER. */ +} LL_EXTI_InitTypeDef; + +/** + * @} + */ +#endif /*USE_FULL_LL_DRIVER*/ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup EXTI_LL_Exported_Constants EXTI Exported Constants + * @{ + */ + +/** @defgroup EXTI_LL_EC_LINE LINE + * @{ + */ +#define LL_EXTI_LINE_0 EXTI_IMR1_IM0 /*!< Extended line 0 */ +#define LL_EXTI_LINE_1 EXTI_IMR1_IM1 /*!< Extended line 1 */ +#define LL_EXTI_LINE_2 EXTI_IMR1_IM2 /*!< Extended line 2 */ +#define LL_EXTI_LINE_3 EXTI_IMR1_IM3 /*!< Extended line 3 */ +#define LL_EXTI_LINE_4 EXTI_IMR1_IM4 /*!< Extended line 4 */ +#define LL_EXTI_LINE_5 EXTI_IMR1_IM5 /*!< Extended line 5 */ +#define LL_EXTI_LINE_6 EXTI_IMR1_IM6 /*!< Extended line 6 */ +#define LL_EXTI_LINE_7 EXTI_IMR1_IM7 /*!< Extended line 7 */ +#define LL_EXTI_LINE_8 EXTI_IMR1_IM8 /*!< Extended line 8 */ +#define LL_EXTI_LINE_9 EXTI_IMR1_IM9 /*!< Extended line 9 */ +#define LL_EXTI_LINE_10 EXTI_IMR1_IM10 /*!< Extended line 10 */ +#define LL_EXTI_LINE_11 EXTI_IMR1_IM11 /*!< Extended line 11 */ +#define LL_EXTI_LINE_12 EXTI_IMR1_IM12 /*!< Extended line 12 */ +#define LL_EXTI_LINE_13 EXTI_IMR1_IM13 /*!< Extended line 13 */ +#define LL_EXTI_LINE_14 EXTI_IMR1_IM14 /*!< Extended line 14 */ +#define LL_EXTI_LINE_15 EXTI_IMR1_IM15 /*!< Extended line 15 */ +#define LL_EXTI_LINE_16 EXTI_IMR1_IM16 /*!< Extended line 16 */ +#define LL_EXTI_LINE_17 EXTI_IMR1_IM17 /*!< Extended line 17 */ +#define LL_EXTI_LINE_18 EXTI_IMR1_IM18 /*!< Extended line 18 */ +#define LL_EXTI_LINE_19 EXTI_IMR1_IM19 /*!< Extended line 19 */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) || defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define LL_EXTI_LINE_20 EXTI_IMR1_IM20 /*!< Extended line 20 */ +#endif /* STM32WB55xx || STM32WB5Mxx || ... */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) +#define LL_EXTI_LINE_21 EXTI_IMR1_IM21 /*!< Extended line 21 */ +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ +#define LL_EXTI_LINE_22 EXTI_IMR1_IM22 /*!< Extended line 22 */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) +#define LL_EXTI_LINE_23 EXTI_IMR1_IM23 /*!< Extended line 23 */ +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ +#define LL_EXTI_LINE_24 EXTI_IMR1_IM24 /*!< Extended line 24 */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) || defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define LL_EXTI_LINE_25 EXTI_IMR1_IM25 /*!< Extended line 25 */ +#endif /* STM32WB55xx || STM32WB5Mxx || ... */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) +#define LL_EXTI_LINE_28 EXTI_IMR1_IM28 /*!< Extended line 28 */ +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ +#define LL_EXTI_LINE_29 EXTI_IMR1_IM29 /*!< Extended line 29 */ +#define LL_EXTI_LINE_30 EXTI_IMR1_IM30 /*!< Extended line 30 */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) || defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define LL_EXTI_LINE_31 EXTI_IMR1_IM31 /*!< Extended line 31 */ +#endif /* STM32WB55xx || STM32WB5Mxx || ... */ + +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) +#define LL_EXTI_LINE_ALL_0_31 (LL_EXTI_LINE_0 | LL_EXTI_LINE_1 | LL_EXTI_LINE_2 | \ + LL_EXTI_LINE_3 | LL_EXTI_LINE_4 | LL_EXTI_LINE_5 | \ + LL_EXTI_LINE_6 | LL_EXTI_LINE_7 | LL_EXTI_LINE_8 | \ + LL_EXTI_LINE_9 | LL_EXTI_LINE_10 | LL_EXTI_LINE_11 | \ + LL_EXTI_LINE_12 | LL_EXTI_LINE_13 | LL_EXTI_LINE_14 | \ + LL_EXTI_LINE_15 | LL_EXTI_LINE_16 | LL_EXTI_LINE_17 | \ + LL_EXTI_LINE_18 | LL_EXTI_LINE_19 | LL_EXTI_LINE_20 | \ + LL_EXTI_LINE_21 | LL_EXTI_LINE_22 | LL_EXTI_LINE_23 | \ + LL_EXTI_LINE_24 | LL_EXTI_LINE_25 | LL_EXTI_LINE_28 | \ + LL_EXTI_LINE_29 | LL_EXTI_LINE_30 | LL_EXTI_LINE_31) /*!< All Extended line not reserved*/ +#elif defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define LL_EXTI_LINE_ALL_0_31 (LL_EXTI_LINE_0 | LL_EXTI_LINE_1 | LL_EXTI_LINE_2 | \ + LL_EXTI_LINE_3 | LL_EXTI_LINE_4 | LL_EXTI_LINE_5 | \ + LL_EXTI_LINE_6 | LL_EXTI_LINE_7 | LL_EXTI_LINE_8 | \ + LL_EXTI_LINE_9 | LL_EXTI_LINE_10 | LL_EXTI_LINE_11 | \ + LL_EXTI_LINE_12 | LL_EXTI_LINE_13 | LL_EXTI_LINE_14 | \ + LL_EXTI_LINE_15 | LL_EXTI_LINE_16 | LL_EXTI_LINE_17 | \ + LL_EXTI_LINE_18 | LL_EXTI_LINE_19 | LL_EXTI_LINE_20 | \ + LL_EXTI_LINE_22 | LL_EXTI_LINE_24 | LL_EXTI_LINE_25 | \ + LL_EXTI_LINE_29 | LL_EXTI_LINE_30 | LL_EXTI_LINE_31) /*!< All Extended line not reserved*/ +#else +#define LL_EXTI_LINE_ALL_0_31 (LL_EXTI_LINE_0 | LL_EXTI_LINE_1 | LL_EXTI_LINE_2 | \ + LL_EXTI_LINE_3 | LL_EXTI_LINE_4 | LL_EXTI_LINE_5 | \ + LL_EXTI_LINE_6 | LL_EXTI_LINE_7 | LL_EXTI_LINE_8 | \ + LL_EXTI_LINE_9 | LL_EXTI_LINE_10 | LL_EXTI_LINE_11 | \ + LL_EXTI_LINE_12 | LL_EXTI_LINE_13 | LL_EXTI_LINE_14 | \ + LL_EXTI_LINE_15 | LL_EXTI_LINE_16 | LL_EXTI_LINE_17 | \ + LL_EXTI_LINE_18 | LL_EXTI_LINE_19 | LL_EXTI_LINE_22 | \ + LL_EXTI_LINE_24 | LL_EXTI_LINE_29 | LL_EXTI_LINE_30) /*!< All Extended line not reserved*/ +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ + +#define LL_EXTI_LINE_33 EXTI_IMR2_IM33 /*!< Extended line 33 */ +#define LL_EXTI_LINE_36 EXTI_IMR2_IM36 /*!< Extended line 36 */ +#define LL_EXTI_LINE_37 EXTI_IMR2_IM37 /*!< Extended line 37 */ +#define LL_EXTI_LINE_38 EXTI_IMR2_IM38 /*!< Extended line 38 */ +#define LL_EXTI_LINE_39 EXTI_IMR2_IM39 /*!< Extended line 39 */ +#define LL_EXTI_LINE_40 EXTI_IMR2_IM40 /*!< Extended line 40 */ +#define LL_EXTI_LINE_41 EXTI_IMR2_IM41 /*!< Extended line 41 */ +#define LL_EXTI_LINE_42 EXTI_IMR2_IM42 /*!< Extended line 42 */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) +#define LL_EXTI_LINE_43 EXTI_IMR2_IM43 /*!< Extended line 43 */ +#endif /* STM32WB55xx || STM32WB5Mxx */ +#define LL_EXTI_LINE_44 EXTI_IMR2_IM44 /*!< Extended line 44 */ +#define LL_EXTI_LINE_45 EXTI_IMR2_IM45 /*!< Extended line 45 */ +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB50xx) || defined (STM32WB35xx) || defined (STM32WB30xx) +#define LL_EXTI_LINE_46 EXTI_IMR2_IM46 /*!< Extended line 46 */ +#endif /* STM32WB55xx || STM32WB5Mxx || ... */ +#define LL_EXTI_LINE_48 EXTI_IMR2_IM48 /*!< Extended line 48 */ + +#if defined (STM32WB55xx) || defined (STM32WB5Mxx) +#define LL_EXTI_LINE_ALL_32_63 (LL_EXTI_LINE_33 | LL_EXTI_LINE_36 | LL_EXTI_LINE_37 | \ + LL_EXTI_LINE_38 | LL_EXTI_LINE_39 | LL_EXTI_LINE_40 | \ + LL_EXTI_LINE_41 | LL_EXTI_LINE_42 | LL_EXTI_LINE_43 | \ + LL_EXTI_LINE_44 | LL_EXTI_LINE_45 | LL_EXTI_LINE_46 | \ + LL_EXTI_LINE_48) /*!< All Extended line not reserved*/ +#elif defined (STM32WB50xx) || defined (STM32WB35xx) || defined (STM32WB30xx) +#define LL_EXTI_LINE_ALL_32_63 (LL_EXTI_LINE_33 | LL_EXTI_LINE_36 | LL_EXTI_LINE_37 | \ + LL_EXTI_LINE_38 | LL_EXTI_LINE_39 | LL_EXTI_LINE_40 | \ + LL_EXTI_LINE_41 | LL_EXTI_LINE_42 | LL_EXTI_LINE_44 | \ + LL_EXTI_LINE_45 | LL_EXTI_LINE_46 | LL_EXTI_LINE_48) /*!< All Extended line not reserved*/ +#else +#define LL_EXTI_LINE_ALL_32_63 (LL_EXTI_LINE_33 | LL_EXTI_LINE_36 | LL_EXTI_LINE_37 | \ + LL_EXTI_LINE_38 | LL_EXTI_LINE_39 | LL_EXTI_LINE_40 | \ + LL_EXTI_LINE_41 | LL_EXTI_LINE_42 | LL_EXTI_LINE_44 | \ + LL_EXTI_LINE_45 | LL_EXTI_LINE_48) /*!< All Extended line not reserved*/ +#endif /* STM32WB55xx || STM32WB5Mxx */ + + +#define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */ + +#if defined(USE_FULL_LL_DRIVER) +#define LL_EXTI_LINE_NONE (0x00000000U) /*!< None Extended line */ +#endif /*USE_FULL_LL_DRIVER*/ + +/** + * @} + */ +#if defined(USE_FULL_LL_DRIVER) + +/** @defgroup EXTI_LL_EC_MODE Mode + * @{ + */ +#define LL_EXTI_MODE_IT ((uint8_t)0x00U) /*!< Interrupt Mode */ +#define LL_EXTI_MODE_EVENT ((uint8_t)0x01U) /*!< Event Mode */ +#define LL_EXTI_MODE_IT_EVENT ((uint8_t)0x02U) /*!< Interrupt & Event Mode */ +/** + * @} + */ + +/** @defgroup EXTI_LL_EC_TRIGGER Edge Trigger + * @{ + */ +#define LL_EXTI_TRIGGER_NONE ((uint8_t)0x00U) /*!< No Trigger Mode */ +#define LL_EXTI_TRIGGER_RISING ((uint8_t)0x01U) /*!< Trigger Rising Mode */ +#define LL_EXTI_TRIGGER_FALLING ((uint8_t)0x02U) /*!< Trigger Falling Mode */ +#define LL_EXTI_TRIGGER_RISING_FALLING ((uint8_t)0x03U) /*!< Trigger Rising & Falling Mode */ + +/** + * @} + */ + + +#endif /*USE_FULL_LL_DRIVER*/ + + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup EXTI_LL_Exported_Macros EXTI Exported Macros + * @{ + */ + +/** @defgroup EXTI_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in EXTI register + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_EXTI_WriteReg(__REG__, __VALUE__) WRITE_REG(EXTI->__REG__, (__VALUE__)) + +/** + * @brief Read a value in EXTI register + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_EXTI_ReadReg(__REG__) READ_REG(EXTI->__REG__) +/** + * @} + */ + + +/** + * @} + */ + + + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup EXTI_LL_Exported_Functions EXTI Exported Functions + * @{ + */ +/** @defgroup EXTI_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31 + * @rmtoll IMR1 IMx LL_EXTI_EnableIT_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_22 + * @arg @ref LL_EXTI_LINE_23 (*) + * @arg @ref LL_EXTI_LINE_24 + * @arg @ref LL_EXTI_LINE_25 (*) + * @arg @ref LL_EXTI_LINE_28 (*) + * @arg @ref LL_EXTI_LINE_29 + * @arg @ref LL_EXTI_LINE_30 + * @arg @ref LL_EXTI_LINE_31 (*) + * @arg @ref LL_EXTI_LINE_ALL_0_31 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableIT_0_31(uint32_t ExtiLine) +{ + SET_BIT(EXTI->IMR1, ExtiLine); +} + +/** + * @brief Enable ExtiLine Interrupt request for Lines in range 0 to 31 for cpu2 + * @rmtoll C2IMR1 IMx LL_C2_EXTI_EnableIT_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_22 + * @arg @ref LL_EXTI_LINE_23 (*) + * @arg @ref LL_EXTI_LINE_24 + * @arg @ref LL_EXTI_LINE_25 (*) + * @arg @ref LL_EXTI_LINE_28 (*) + * @arg @ref LL_EXTI_LINE_29 + * @arg @ref LL_EXTI_LINE_30 + * @arg @ref LL_EXTI_LINE_31 (*) + * @arg @ref LL_EXTI_LINE_ALL_0_31 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_C2_EXTI_EnableIT_0_31(uint32_t ExtiLine) +{ + SET_BIT(EXTI->C2IMR1, ExtiLine); +} + +/** + * @brief Enable ExtiLine Interrupt request for Lines in range 32 to 63 + * @rmtoll IMR2 IMx LL_EXTI_EnableIT_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 + * @arg @ref LL_EXTI_LINE_36 + * @arg @ref LL_EXTI_LINE_37 + * @arg @ref LL_EXTI_LINE_38 + * @arg @ref LL_EXTI_LINE_39 + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @arg @ref LL_EXTI_LINE_42 + * @arg @ref LL_EXTI_LINE_43 (*) + * @arg @ref LL_EXTI_LINE_44 + * @arg @ref LL_EXTI_LINE_45 + * @arg @ref LL_EXTI_LINE_46 (*) + * @arg @ref LL_EXTI_LINE_48 + * @arg @ref LL_EXTI_LINE_ALL_32_63 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableIT_32_63(uint32_t ExtiLine) +{ + SET_BIT(EXTI->IMR2, ExtiLine); +} + +/** + * @brief Enable ExtiLine Interrupt request for Lines in range 32 to 63 for cpu2 + * @rmtoll C2IMR2 IMx LL_C2_EXTI_EnableIT_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 + * @arg @ref LL_EXTI_LINE_36 + * @arg @ref LL_EXTI_LINE_37 + * @arg @ref LL_EXTI_LINE_38 + * @arg @ref LL_EXTI_LINE_39 + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @arg @ref LL_EXTI_LINE_42 + * @arg @ref LL_EXTI_LINE_43 (*) + * @arg @ref LL_EXTI_LINE_44 + * @arg @ref LL_EXTI_LINE_45 + * @arg @ref LL_EXTI_LINE_46 (*) + * @arg @ref LL_EXTI_LINE_48 + * @arg @ref LL_EXTI_LINE_ALL_32_63 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_C2_EXTI_EnableIT_32_63(uint32_t ExtiLine) +{ + SET_BIT(EXTI->C2IMR2, ExtiLine); +} + +/** + * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31 + * @rmtoll IMR1 IMx LL_EXTI_DisableIT_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_22 + * @arg @ref LL_EXTI_LINE_23 (*) + * @arg @ref LL_EXTI_LINE_24 + * @arg @ref LL_EXTI_LINE_25 (*) + * @arg @ref LL_EXTI_LINE_28 (*) + * @arg @ref LL_EXTI_LINE_29 + * @arg @ref LL_EXTI_LINE_30 + * @arg @ref LL_EXTI_LINE_31 (*) + * @arg @ref LL_EXTI_LINE_ALL_0_31 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_DisableIT_0_31(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->IMR1, ExtiLine); +} + +/** + * @brief Disable ExtiLine Interrupt request for Lines in range 0 to 31 for cpu2 + * @rmtoll C2IMR1 IMx LL_C2_EXTI_DisableIT_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_22 + * @arg @ref LL_EXTI_LINE_23 (*) + * @arg @ref LL_EXTI_LINE_24 + * @arg @ref LL_EXTI_LINE_25 (*) + * @arg @ref LL_EXTI_LINE_28 (*) + * @arg @ref LL_EXTI_LINE_29 + * @arg @ref LL_EXTI_LINE_30 + * @arg @ref LL_EXTI_LINE_31 (*) + * @arg @ref LL_EXTI_LINE_ALL_0_31 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_C2_EXTI_DisableIT_0_31(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->C2IMR1, ExtiLine); +} + +/** + * @brief Disable ExtiLine Interrupt request for Lines in range 32 to 63 + * @rmtoll IMR2 IMx LL_EXTI_DisableIT_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 + * @arg @ref LL_EXTI_LINE_36 + * @arg @ref LL_EXTI_LINE_37 + * @arg @ref LL_EXTI_LINE_38 + * @arg @ref LL_EXTI_LINE_39 + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @arg @ref LL_EXTI_LINE_42 + * @arg @ref LL_EXTI_LINE_43 (*) + * @arg @ref LL_EXTI_LINE_44 + * @arg @ref LL_EXTI_LINE_45 + * @arg @ref LL_EXTI_LINE_46 (*) + * @arg @ref LL_EXTI_LINE_48 + * @arg @ref LL_EXTI_LINE_ALL_32_63 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_DisableIT_32_63(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->IMR2, ExtiLine); +} + +/** + * @brief Disable ExtiLine Interrupt request for Lines in range 32 to 63 for cpu2 + * @rmtoll C2IMR2 IMx LL_C2_EXTI_DisableIT_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 + * @arg @ref LL_EXTI_LINE_36 + * @arg @ref LL_EXTI_LINE_37 + * @arg @ref LL_EXTI_LINE_38 + * @arg @ref LL_EXTI_LINE_39 + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @arg @ref LL_EXTI_LINE_42 + * @arg @ref LL_EXTI_LINE_43 (*) + * @arg @ref LL_EXTI_LINE_44 + * @arg @ref LL_EXTI_LINE_45 + * @arg @ref LL_EXTI_LINE_46 (*) + * @arg @ref LL_EXTI_LINE_48 + * @arg @ref LL_EXTI_LINE_ALL_32_63 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_C2_EXTI_DisableIT_32_63(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->C2IMR2, ExtiLine); +} + +/** + * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31 + * @rmtoll IMR1 IMx LL_EXTI_IsEnabledIT_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_22 + * @arg @ref LL_EXTI_LINE_23 (*) + * @arg @ref LL_EXTI_LINE_24 + * @arg @ref LL_EXTI_LINE_25 (*) + * @arg @ref LL_EXTI_LINE_28 (*) + * @arg @ref LL_EXTI_LINE_29 + * @arg @ref LL_EXTI_LINE_30 + * @arg @ref LL_EXTI_LINE_31 (*) + * @arg @ref LL_EXTI_LINE_ALL_0_31 + * (*) value not defined in all devices + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->IMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 0 to 31 for cpu2 + * @rmtoll C2IMR1 IMx LL_C2_EXTI_IsEnabledIT_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_22 + * @arg @ref LL_EXTI_LINE_23 (*) + * @arg @ref LL_EXTI_LINE_24 + * @arg @ref LL_EXTI_LINE_25 (*) + * @arg @ref LL_EXTI_LINE_28 (*) + * @arg @ref LL_EXTI_LINE_29 + * @arg @ref LL_EXTI_LINE_30 + * @arg @ref LL_EXTI_LINE_31 (*) + * @arg @ref LL_EXTI_LINE_ALL_0_31 + * (*) value not defined in all devices + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_EXTI_IsEnabledIT_0_31(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->C2IMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 32 to 63 + * @rmtoll IMR2 IMx LL_EXTI_IsEnabledIT_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 + * @arg @ref LL_EXTI_LINE_36 + * @arg @ref LL_EXTI_LINE_37 + * @arg @ref LL_EXTI_LINE_38 + * @arg @ref LL_EXTI_LINE_39 + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @arg @ref LL_EXTI_LINE_42 + * @arg @ref LL_EXTI_LINE_43 (*) + * @arg @ref LL_EXTI_LINE_44 + * @arg @ref LL_EXTI_LINE_45 + * @arg @ref LL_EXTI_LINE_46 (*) + * @arg @ref LL_EXTI_LINE_48 + * @arg @ref LL_EXTI_LINE_ALL_32_63 + * (*) value not defined in all devices + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->IMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Indicate if ExtiLine Interrupt request is enabled for Lines in range 32 to 63 for cpu2 + * @rmtoll C2IMR2 IMx LL_C2_EXTI_IsEnabledIT_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 + * @arg @ref LL_EXTI_LINE_36 + * @arg @ref LL_EXTI_LINE_37 + * @arg @ref LL_EXTI_LINE_38 + * @arg @ref LL_EXTI_LINE_39 + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @arg @ref LL_EXTI_LINE_42 + * @arg @ref LL_EXTI_LINE_43 (*) + * @arg @ref LL_EXTI_LINE_44 + * @arg @ref LL_EXTI_LINE_45 + * @arg @ref LL_EXTI_LINE_46 (*) + * @arg @ref LL_EXTI_LINE_48 + * @arg @ref LL_EXTI_LINE_ALL_32_63 + * (*) value not defined in all devices + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_EXTI_IsEnabledIT_32_63(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->C2IMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup EXTI_LL_EF_Event_Management Event_Management + * @{ + */ + +/** + * @brief Enable ExtiLine Event request for Lines in range 0 to 31 + * @rmtoll EMR1 EMx LL_EXTI_EnableEvent_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableEvent_0_31(uint32_t ExtiLine) +{ + SET_BIT(EXTI->EMR1, ExtiLine); +} + +/** + * @brief Enable ExtiLine Event request for Lines in range 0 to 31 for cpu2 + * @rmtoll C2EMR1 EMx LL_C2_EXTI_EnableEvent_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_C2_EXTI_EnableEvent_0_31(uint32_t ExtiLine) +{ + SET_BIT(EXTI->C2EMR1, ExtiLine); +} + +/** + * @brief Enable ExtiLine Event request for Lines in range 32 to 63 + * @rmtoll EMR2 EMx LL_EXTI_EnableEvent_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableEvent_32_63(uint32_t ExtiLine) +{ + SET_BIT(EXTI->EMR2, ExtiLine); +} + +/** + * @brief Enable ExtiLine Event request for Lines in range 32 to 63 for cpu2 + * @rmtoll C2EMR2 EMx LL_C2_EXTI_EnableEvent_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @retval None + */ +__STATIC_INLINE void LL_C2_EXTI_EnableEvent_32_63(uint32_t ExtiLine) +{ + SET_BIT(EXTI->C2EMR2, ExtiLine); +} + +/** + * @brief Disable ExtiLine Event request for Lines in range 0 to 31 + * @rmtoll EMR1 EMx LL_EXTI_DisableEvent_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @retval None + */ +__STATIC_INLINE void LL_EXTI_DisableEvent_0_31(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->EMR1, ExtiLine); +} + +/** + * @brief Disable ExtiLine Event request for Lines in range 0 to 31 for cpu2 + * @rmtoll C2EMR1 EMx LL_C2_EXTI_DisableEvent_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_C2_EXTI_DisableEvent_0_31(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->C2EMR1, ExtiLine); +} + +/** + * @brief Disable ExtiLine Event request for Lines in range 32 to 63 + * @rmtoll EMR2 EMx LL_EXTI_DisableEvent_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_DisableEvent_32_63(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->EMR2, ExtiLine); +} + +/** + * @brief Disable ExtiLine Event request for Lines in range 32 to 63 for cpu2 + * @rmtoll C2EMR2 EMx LL_C2_EXTI_DisableEvent_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @retval None + */ +__STATIC_INLINE void LL_C2_EXTI_DisableEvent_32_63(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->C2EMR2, ExtiLine); +} + +/** + * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31 + * @rmtoll EMR1 EMx LL_EXTI_IsEnabledEvent_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * (*) value not defined in all devices + * @note Please check each device line mapping for EXTI Line availability + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->EMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Indicate if ExtiLine Event request is enabled for Lines in range 0 to 31 for cpu2 + * @rmtoll C2EMR1 EMx LL_C2_EXTI_IsEnabledEvent_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * (*) value not defined in all devices + * @note Please check each device line mapping for EXTI Line availability + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_EXTI_IsEnabledEvent_0_31(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->C2EMR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Indicate if ExtiLine Event request is enabled for Lines in range 32 to 63 + * @rmtoll EMR2 EMx LL_EXTI_IsEnabledEvent_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->EMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Indicate if ExtiLine Event request is enabled for Lines in range 32 to 63 for cpu2 + * @rmtoll EMR2 EMx LL_C2_EXTI_IsEnabledEvent_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_EXTI_IsEnabledEvent_32_63(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->C2EMR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup EXTI_LL_EF_Rising_Trigger_Management Rising_Trigger_Management + * @{ + */ + +/** + * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 0 to 31 + * @note The configurable wakeup lines are edge-triggered. No glitch must be + * generated on these lines. If a rising edge on a configurable interrupt + * line occurs during a write operation in the EXTI_RTSR register, the + * pending bit is not set. + * Rising and falling edge triggers can be set for + * the same interrupt line. In this case, both generate a trigger + * condition. + * @rmtoll RTSR1 RTx LL_EXTI_EnableRisingTrig_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableRisingTrig_0_31(uint32_t ExtiLine) +{ + SET_BIT(EXTI->RTSR1, ExtiLine); + +} + +/** + * @brief Enable ExtiLine Rising Edge Trigger for Lines in range 32 to 63 + * @note The configurable wakeup lines are edge-triggered. No glitch must be + * generated on these lines. If a rising edge on a configurable interrupt + * line occurs during a write operation in the EXTI_RTSR register, the + * pending bit is not set.Rising and falling edge triggers can be set for + * the same interrupt line. In this case, both generate a trigger + * condition. + * @rmtoll RTSR2 RTx LL_EXTI_EnableRisingTrig_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableRisingTrig_32_63(uint32_t ExtiLine) +{ + SET_BIT(EXTI->RTSR2, ExtiLine); +} + +/** + * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 0 to 31 + * @note The configurable wakeup lines are edge-triggered. No glitch must be + * generated on these lines. If a rising edge on a configurable interrupt + * line occurs during a write operation in the EXTI_RTSR register, the + * pending bit is not set. + * Rising and falling edge triggers can be set for + * the same interrupt line. In this case, both generate a trigger + * condition. + * @rmtoll RTSR1 RTx LL_EXTI_DisableRisingTrig_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_DisableRisingTrig_0_31(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->RTSR1, ExtiLine); + +} + +/** + * @brief Disable ExtiLine Rising Edge Trigger for Lines in range 32 to 63 + * @note The configurable wakeup lines are edge-triggered. No glitch must be + * generated on these lines. If a rising edge on a configurable interrupt + * line occurs during a write operation in the EXTI_RTSR register, the + * pending bit is not set. + * Rising and falling edge triggers can be set for + * the same interrupt line. In this case, both generate a trigger + * condition. + * @rmtoll RTSR2 RTx LL_EXTI_DisableRisingTrig_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_DisableRisingTrig_32_63(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->RTSR2, ExtiLine); +} + +/** + * @brief Check if rising edge trigger is enabled for Lines in range 0 to 31 + * @rmtoll RTSR1 RTx LL_EXTI_IsEnabledRisingTrig_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_0_31(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->RTSR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Check if rising edge trigger is enabled for Lines in range 32 to 63 + * @rmtoll RTSR2 RTx LL_EXTI_IsEnabledRisingTrig_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsEnabledRisingTrig_32_63(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->RTSR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup EXTI_LL_EF_Falling_Trigger_Management Falling_Trigger_Management + * @{ + */ + +/** + * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 0 to 31 + * @note The configurable wakeup lines are edge-triggered. No glitch must be + * generated on these lines. If a falling edge on a configurable interrupt + * line occurs during a write operation in the EXTI_FTSR register, the + * pending bit is not set. + * Rising and falling edge triggers can be set for + * the same interrupt line. In this case, both generate a trigger + * condition. + * @rmtoll FTSR1 FTx LL_EXTI_EnableFallingTrig_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @note Please check each device line mapping for EXTI Line availability + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableFallingTrig_0_31(uint32_t ExtiLine) +{ + SET_BIT(EXTI->FTSR1, ExtiLine); +} + +/** + * @brief Enable ExtiLine Falling Edge Trigger for Lines in range 32 to 63 + * @note The configurable wakeup lines are edge-triggered. No glitch must be + * generated on these lines. If a Falling edge on a configurable interrupt + * line occurs during a write operation in the EXTI_FTSR register, the + * pending bit is not set. + * Rising and falling edge triggers can be set for + * the same interrupt line. In this case, both generate a trigger + * condition. + * @rmtoll FTSR2 FTx LL_EXTI_EnableFallingTrig_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_EnableFallingTrig_32_63(uint32_t ExtiLine) +{ + SET_BIT(EXTI->FTSR2, ExtiLine); +} + +/** + * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 0 to 31 + * @note The configurable wakeup lines are edge-triggered. No glitch must be + * generated on these lines. If a Falling edge on a configurable interrupt + * line occurs during a write operation in the EXTI_FTSR register, the + * pending bit is not set. + * Rising and falling edge triggers can be set for the same interrupt line. + * In this case, both generate a trigger condition. + * @rmtoll FTSR1 FTx LL_EXTI_DisableFallingTrig_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @note Please check each device line mapping for EXTI Line availability + * @retval None + */ +__STATIC_INLINE void LL_EXTI_DisableFallingTrig_0_31(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->FTSR1, ExtiLine); +} + +/** + * @brief Disable ExtiLine Falling Edge Trigger for Lines in range 32 to 63 + * @note The configurable wakeup lines are edge-triggered. No glitch must be + * generated on these lines. If a Falling edge on a configurable interrupt + * line occurs during a write operation in the EXTI_FTSR register, the + * pending bit is not set. + * Rising and falling edge triggers can be set for the same interrupt line. + * In this case, both generate a trigger condition. + * @rmtoll FTSR2 FTx LL_EXTI_DisableFallingTrig_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_DisableFallingTrig_32_63(uint32_t ExtiLine) +{ + CLEAR_BIT(EXTI->FTSR2, ExtiLine); +} + +/** + * @brief Check if falling edge trigger is enabled for Lines in range 0 to 31 + * @rmtoll FTSR1 FTx LL_EXTI_IsEnabledFallingTrig_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @note Please check each device line mapping for EXTI Line availability + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_0_31(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->FTSR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Check if falling edge trigger is enabled for Lines in range 32 to 63 + * @rmtoll FTSR2 FTx LL_EXTI_IsEnabledFallingTrig_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsEnabledFallingTrig_32_63(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->FTSR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup EXTI_LL_EF_Software_Interrupt_Management Software_Interrupt_Management + * @{ + */ + +/** + * @brief Generate a software Interrupt Event for Lines in range 0 to 31 + * @note If the interrupt is enabled on this line in the EXTI_IMR1, writing a 1 to + * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR1 + * resulting in an interrupt request generation. + * This bit is cleared by clearing the corresponding bit in the EXTI_PR1 + * register (by writing a 1 into the bit) + * @rmtoll SWIER1 SWIx LL_EXTI_GenerateSWI_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @note Please check each device line mapping for EXTI Line availability + * @retval None + */ +__STATIC_INLINE void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine) +{ + SET_BIT(EXTI->SWIER1, ExtiLine); +} + +/** + * @brief Generate a software Interrupt Event for Lines in range 32 to 63 + * @note If the interrupt is enabled on this line in the EXTI_IMR2, writing a 1 to + * this bit when it is at '0' sets the corresponding pending bit in EXTI_PR2 + * resulting in an interrupt request generation. + * This bit is cleared by clearing the corresponding bit in the EXTI_PR2 + * register (by writing a 1 into the bit) + * @rmtoll SWIER2 SWIx LL_EXTI_GenerateSWI_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_GenerateSWI_32_63(uint32_t ExtiLine) +{ + SET_BIT(EXTI->SWIER2, ExtiLine); +} + +/** + * @} + */ + +/** @defgroup EXTI_LL_EF_Flag_Management Flag_Management + * @{ + */ + +/** + * @brief Check if the ExtLine Flag is set or not for Lines in range 0 to 31 + * @note This bit is set when the selected edge event arrives on the interrupt + * line. This bit is cleared by writing a 1 to the bit. + * @rmtoll PR1 PIFx LL_EXTI_IsActiveFlag_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_0_31(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->PR1, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Check if the ExtLine Flag is set or not for Lines in range 32 to 63 + * @note This bit is set when the selected edge event arrives on the interrupt + * line. This bit is cleared by writing a 1 to the bit. + * @rmtoll PR2 PIFx LL_EXTI_IsActiveFlag_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_EXTI_IsActiveFlag_32_63(uint32_t ExtiLine) +{ + return ((READ_BIT(EXTI->PR2, ExtiLine) == (ExtiLine)) ? 1UL : 0UL); +} + +/** + * @brief Read ExtLine Combination Flag for Lines in range 0 to 31 + * @note This bit is set when the selected edge event arrives on the interrupt + * line. This bit is cleared by writing a 1 to the bit. + * @rmtoll PR1 PIFx LL_EXTI_ReadFlag_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @retval @note This bit is set when the selected edge event arrives on the interrupt + */ +__STATIC_INLINE uint32_t LL_EXTI_ReadFlag_0_31(uint32_t ExtiLine) +{ + return (uint32_t)(READ_BIT(EXTI->PR1, ExtiLine)); +} + +/** + * @brief Read ExtLine Combination Flag for Lines in range 32 to 63 + * @note This bit is set when the selected edge event arrives on the interrupt + * line. This bit is cleared by writing a 1 to the bit. + * @rmtoll PR2 PIFx LL_EXTI_ReadFlag_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval @note This bit is set when the selected edge event arrives on the interrupt + */ +__STATIC_INLINE uint32_t LL_EXTI_ReadFlag_32_63(uint32_t ExtiLine) +{ + return (uint32_t)(READ_BIT(EXTI->PR2, ExtiLine)); +} + +/** + * @brief Clear ExtLine Flags for Lines in range 0 to 31 + * @note This bit is set when the selected edge event arrives on the interrupt + * line. This bit is cleared by writing a 1 to the bit. + * @rmtoll PR1 PIFx LL_EXTI_ClearFlag_0_31 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_0 + * @arg @ref LL_EXTI_LINE_1 + * @arg @ref LL_EXTI_LINE_2 + * @arg @ref LL_EXTI_LINE_3 + * @arg @ref LL_EXTI_LINE_4 + * @arg @ref LL_EXTI_LINE_5 + * @arg @ref LL_EXTI_LINE_6 + * @arg @ref LL_EXTI_LINE_7 + * @arg @ref LL_EXTI_LINE_8 + * @arg @ref LL_EXTI_LINE_9 + * @arg @ref LL_EXTI_LINE_10 + * @arg @ref LL_EXTI_LINE_11 + * @arg @ref LL_EXTI_LINE_12 + * @arg @ref LL_EXTI_LINE_13 + * @arg @ref LL_EXTI_LINE_14 + * @arg @ref LL_EXTI_LINE_15 + * @arg @ref LL_EXTI_LINE_16 + * @arg @ref LL_EXTI_LINE_17 + * @arg @ref LL_EXTI_LINE_18 + * @arg @ref LL_EXTI_LINE_19 + * @arg @ref LL_EXTI_LINE_20 (*) + * @arg @ref LL_EXTI_LINE_21 (*) + * @arg @ref LL_EXTI_LINE_31 (*) + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_ClearFlag_0_31(uint32_t ExtiLine) +{ + WRITE_REG(EXTI->PR1, ExtiLine); +} + +/** + * @brief Clear ExtLine Flags for Lines in range 32 to 63 + * @note This bit is set when the selected edge event arrives on the interrupt + * line. This bit is cleared by writing a 1 to the bit. + * @rmtoll PR2 PIFx LL_EXTI_ClearFlag_32_63 + * @param ExtiLine This parameter can be a combination of the following values: + * @arg @ref LL_EXTI_LINE_33 (*) + * @arg @ref LL_EXTI_LINE_40 + * @arg @ref LL_EXTI_LINE_41 + * (*) value not defined in all devices + * @retval None + */ +__STATIC_INLINE void LL_EXTI_ClearFlag_32_63(uint32_t ExtiLine) +{ + WRITE_REG(EXTI->PR2, ExtiLine); +} + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup EXTI_LL_EF_Init Initialization and de-initialization functions + * @{ + */ + +ErrorStatus LL_EXTI_Init(LL_EXTI_InitTypeDef *EXTI_InitStruct); +ErrorStatus LL_EXTI_DeInit(void); +void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct); + + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* EXTI */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_EXTI_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h new file mode 100644 index 0000000..2c3c205 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_gpio.h @@ -0,0 +1,989 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_gpio.h + * @author MCD Application Team + * @brief Header file of GPIO LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_GPIO_H +#define STM32WBxx_LL_GPIO_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined (GPIOA) || defined (GPIOB) || defined (GPIOC) || defined (GPIOD) || defined (GPIOE) || defined (GPIOH) + +/** @defgroup GPIO_LL GPIO + * @{ + */ +/** MISRA C:2012 deviation rule has been granted for following rules: + * Rule-18.1_d - Medium: Array pointer `GPIOx' is accessed with index [..,..] + * which may be out of array bounds [..,UNKNOWN] in following APIs: + * LL_GPIO_GetAFPin_0_7 + * LL_GPIO_SetAFPin_0_7 + * LL_GPIO_SetAFPin_8_15 + * LL_GPIO_GetAFPin_8_15 + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup GPIO_LL_Private_Macros GPIO Private Macros + * @{ + */ + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/* Exported types ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup GPIO_LL_ES_INIT GPIO Exported Init structures + * @{ + */ + +/** + * @brief LL GPIO Init Structure definition + */ +typedef struct +{ + uint32_t Pin; /*!< Specifies the GPIO pins to be configured. + This parameter can be any value of @ref GPIO_LL_EC_PIN */ + + uint32_t Mode; /*!< Specifies the operating mode for the selected pins. + This parameter can be a value of @ref GPIO_LL_EC_MODE. + + GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetPinMode().*/ + + uint32_t Speed; /*!< Specifies the speed for the selected pins. + This parameter can be a value of @ref GPIO_LL_EC_SPEED. + + GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetPinSpeed().*/ + + uint32_t OutputType; /*!< Specifies the operating output type for the selected pins. + This parameter can be a value of @ref GPIO_LL_EC_OUTPUT. + + GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetPinOutputType().*/ + + uint32_t Pull; /*!< Specifies the operating Pull-up/Pull down for the selected pins. + This parameter can be a value of @ref GPIO_LL_EC_PULL. + + GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetPinPull().*/ + + uint32_t Alternate; /*!< Specifies the Peripheral to be connected to the selected pins. + This parameter can be a value of @ref GPIO_LL_EC_AF. + + GPIO HW configuration can be modified afterwards using unitary function @ref LL_GPIO_SetAFPin_0_7() and LL_GPIO_SetAFPin_8_15().*/ +} LL_GPIO_InitTypeDef; + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup GPIO_LL_Exported_Constants GPIO Exported Constants + * @{ + */ + +/** @defgroup GPIO_LL_EC_PIN PIN + * @{ + */ +#define LL_GPIO_PIN_0 GPIO_BSRR_BS0 /*!< Select pin 0 */ +#define LL_GPIO_PIN_1 GPIO_BSRR_BS1 /*!< Select pin 1 */ +#define LL_GPIO_PIN_2 GPIO_BSRR_BS2 /*!< Select pin 2 */ +#define LL_GPIO_PIN_3 GPIO_BSRR_BS3 /*!< Select pin 3 */ +#define LL_GPIO_PIN_4 GPIO_BSRR_BS4 /*!< Select pin 4 */ +#define LL_GPIO_PIN_5 GPIO_BSRR_BS5 /*!< Select pin 5 */ +#define LL_GPIO_PIN_6 GPIO_BSRR_BS6 /*!< Select pin 6 */ +#define LL_GPIO_PIN_7 GPIO_BSRR_BS7 /*!< Select pin 7 */ +#define LL_GPIO_PIN_8 GPIO_BSRR_BS8 /*!< Select pin 8 */ +#define LL_GPIO_PIN_9 GPIO_BSRR_BS9 /*!< Select pin 9 */ +#define LL_GPIO_PIN_10 GPIO_BSRR_BS10 /*!< Select pin 10 */ +#define LL_GPIO_PIN_11 GPIO_BSRR_BS11 /*!< Select pin 11 */ +#define LL_GPIO_PIN_12 GPIO_BSRR_BS12 /*!< Select pin 12 */ +#define LL_GPIO_PIN_13 GPIO_BSRR_BS13 /*!< Select pin 13 */ +#define LL_GPIO_PIN_14 GPIO_BSRR_BS14 /*!< Select pin 14 */ +#define LL_GPIO_PIN_15 GPIO_BSRR_BS15 /*!< Select pin 15 */ +#define LL_GPIO_PIN_ALL (GPIO_BSRR_BS0 | GPIO_BSRR_BS1 | GPIO_BSRR_BS2 | \ + GPIO_BSRR_BS3 | GPIO_BSRR_BS4 | GPIO_BSRR_BS5 | \ + GPIO_BSRR_BS6 | GPIO_BSRR_BS7 | GPIO_BSRR_BS8 | \ + GPIO_BSRR_BS9 | GPIO_BSRR_BS10 | GPIO_BSRR_BS11 | \ + GPIO_BSRR_BS12 | GPIO_BSRR_BS13 | GPIO_BSRR_BS14 | \ + GPIO_BSRR_BS15) /*!< Select all pins */ +/** + * @} + */ + +/** @defgroup GPIO_LL_EC_MODE Mode + * @{ + */ +#define LL_GPIO_MODE_INPUT (0x00000000U) /*!< Select input mode */ +#define LL_GPIO_MODE_OUTPUT GPIO_MODER_MODE0_0 /*!< Select output mode */ +#define LL_GPIO_MODE_ALTERNATE GPIO_MODER_MODE0_1 /*!< Select alternate function mode */ +#define LL_GPIO_MODE_ANALOG GPIO_MODER_MODE0 /*!< Select analog mode */ +/** + * @} + */ + +/** @defgroup GPIO_LL_EC_OUTPUT Output Type + * @{ + */ +#define LL_GPIO_OUTPUT_PUSHPULL (0x00000000U) /*!< Select push-pull as output type */ +#define LL_GPIO_OUTPUT_OPENDRAIN GPIO_OTYPER_OT0 /*!< Select open-drain as output type */ +/** + * @} + */ + +/** @defgroup GPIO_LL_EC_SPEED Output Speed + * @{ + */ +#define LL_GPIO_SPEED_FREQ_LOW (0x00000000U) /*!< Select I/O low output speed */ +#define LL_GPIO_SPEED_FREQ_MEDIUM GPIO_OSPEEDR_OSPEED0_0 /*!< Select I/O medium output speed */ +#define LL_GPIO_SPEED_FREQ_HIGH GPIO_OSPEEDR_OSPEED0_1 /*!< Select I/O fast output speed */ +#define LL_GPIO_SPEED_FREQ_VERY_HIGH GPIO_OSPEEDR_OSPEED0 /*!< Select I/O high output speed */ +/** + * @} + */ + +/** @defgroup GPIO_LL_EC_PULL Pull Up Pull Down + * @{ + */ +#define LL_GPIO_PULL_NO (0x00000000U) /*!< Select I/O no pull */ +#define LL_GPIO_PULL_UP GPIO_PUPDR_PUPD0_0 /*!< Select I/O pull up */ +#define LL_GPIO_PULL_DOWN GPIO_PUPDR_PUPD0_1 /*!< Select I/O pull down */ +/** + * @} + */ + +/** @defgroup GPIO_LL_EC_AF Alternate Function + * @{ + */ +#define LL_GPIO_AF_0 (0x0000000U) /*!< Select alternate function 0 */ +#define LL_GPIO_AF_1 (0x0000001U) /*!< Select alternate function 1 */ +#define LL_GPIO_AF_2 (0x0000002U) /*!< Select alternate function 2 */ +#define LL_GPIO_AF_3 (0x0000003U) /*!< Select alternate function 3 */ +#define LL_GPIO_AF_4 (0x0000004U) /*!< Select alternate function 4 */ +#define LL_GPIO_AF_5 (0x0000005U) /*!< Select alternate function 5 */ +#define LL_GPIO_AF_6 (0x0000006U) /*!< Select alternate function 6 */ +#define LL_GPIO_AF_7 (0x0000007U) /*!< Select alternate function 7 */ +#define LL_GPIO_AF_8 (0x0000008U) /*!< Select alternate function 8 */ +#define LL_GPIO_AF_9 (0x0000009U) /*!< Select alternate function 9 */ +#define LL_GPIO_AF_10 (0x000000AU) /*!< Select alternate function 10 */ +#define LL_GPIO_AF_11 (0x000000BU) /*!< Select alternate function 11 */ +#define LL_GPIO_AF_12 (0x000000CU) /*!< Select alternate function 12 */ +#define LL_GPIO_AF_13 (0x000000DU) /*!< Select alternate function 13 */ +#define LL_GPIO_AF_14 (0x000000EU) /*!< Select alternate function 14 */ +#define LL_GPIO_AF_15 (0x000000FU) /*!< Select alternate function 15 */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup GPIO_LL_Exported_Macros GPIO Exported Macros + * @{ + */ + +/** @defgroup GPIO_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in GPIO register + * @param __INSTANCE__ GPIO Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_GPIO_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in GPIO register + * @param __INSTANCE__ GPIO Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_GPIO_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup GPIO_LL_Exported_Functions GPIO Exported Functions + * @{ + */ + +/** @defgroup GPIO_LL_EF_Port_Configuration Port Configuration + * @{ + */ + +/** + * @brief Configure gpio mode for a dedicated pin on dedicated port. + * @note I/O mode can be Input mode, General purpose output, Alternate function mode or Analog. + * @note Warning: only one pin can be passed as parameter. + * @rmtoll MODER MODEy LL_GPIO_SetPinMode + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @param Mode This parameter can be one of the following values: + * @arg @ref LL_GPIO_MODE_INPUT + * @arg @ref LL_GPIO_MODE_OUTPUT + * @arg @ref LL_GPIO_MODE_ALTERNATE + * @arg @ref LL_GPIO_MODE_ANALOG + * @retval None + */ +__STATIC_INLINE void LL_GPIO_SetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Mode) +{ + MODIFY_REG(GPIOx->MODER, (GPIO_MODER_MODE0 << (POSITION_VAL(Pin) * 2U)), (Mode << (POSITION_VAL(Pin) * 2U))); +} + +/** + * @brief Return gpio mode for a dedicated pin on dedicated port. + * @note I/O mode can be Input mode, General purpose output, Alternate function mode or Analog. + * @note Warning: only one pin can be passed as parameter. + * @rmtoll MODER MODEy LL_GPIO_GetPinMode + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @retval Returned value can be one of the following values: + * @arg @ref LL_GPIO_MODE_INPUT + * @arg @ref LL_GPIO_MODE_OUTPUT + * @arg @ref LL_GPIO_MODE_ALTERNATE + * @arg @ref LL_GPIO_MODE_ANALOG + */ +__STATIC_INLINE uint32_t LL_GPIO_GetPinMode(GPIO_TypeDef *GPIOx, uint32_t Pin) +{ + return (uint32_t)(READ_BIT(GPIOx->MODER, + (GPIO_MODER_MODE0 << (POSITION_VAL(Pin) * 2U))) >> (POSITION_VAL(Pin) * 2U)); +} + +/** + * @brief Configure gpio output type for several pins on dedicated port. + * @note Output type as to be set when gpio pin is in output or + * alternate modes. Possible type are Push-pull or Open-drain. + * @rmtoll OTYPER OTy LL_GPIO_SetPinOutputType + * @param GPIOx GPIO Port + * @param PinMask This parameter can be a combination of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @param OutputType This parameter can be one of the following values: + * @arg @ref LL_GPIO_OUTPUT_PUSHPULL + * @arg @ref LL_GPIO_OUTPUT_OPENDRAIN + * @retval None + */ +__STATIC_INLINE void LL_GPIO_SetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t PinMask, uint32_t OutputType) +{ + MODIFY_REG(GPIOx->OTYPER, PinMask, (PinMask * OutputType)); +} + +/** + * @brief Return gpio output type for several pins on dedicated port. + * @note Output type as to be set when gpio pin is in output or + * alternate modes. Possible type are Push-pull or Open-drain. + * @note Warning: only one pin can be passed as parameter. + * @rmtoll OTYPER OTy LL_GPIO_GetPinOutputType + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @retval Returned value can be one of the following values: + * @arg @ref LL_GPIO_OUTPUT_PUSHPULL + * @arg @ref LL_GPIO_OUTPUT_OPENDRAIN + */ +__STATIC_INLINE uint32_t LL_GPIO_GetPinOutputType(GPIO_TypeDef *GPIOx, uint32_t Pin) +{ + return (uint32_t)(READ_BIT(GPIOx->OTYPER, Pin) >> POSITION_VAL(Pin)); +} + +/** + * @brief Configure gpio speed for a dedicated pin on dedicated port. + * @note I/O speed can be Low, Medium, Fast or High speed. + * @note Warning: only one pin can be passed as parameter. + * @note Refer to datasheet for frequency specifications and the power + * supply and load conditions for each speed. + * @rmtoll OSPEEDR OSPEEDy LL_GPIO_SetPinSpeed + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @param Speed This parameter can be one of the following values: + * @arg @ref LL_GPIO_SPEED_FREQ_LOW + * @arg @ref LL_GPIO_SPEED_FREQ_MEDIUM + * @arg @ref LL_GPIO_SPEED_FREQ_HIGH + * @arg @ref LL_GPIO_SPEED_FREQ_VERY_HIGH + * @retval None + */ +__STATIC_INLINE void LL_GPIO_SetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Speed) +{ + MODIFY_REG(GPIOx->OSPEEDR, (GPIO_OSPEEDR_OSPEED0 << (POSITION_VAL(Pin) * 2U)), + (Speed << (POSITION_VAL(Pin) * 2U))); +} + +/** + * @brief Return gpio speed for a dedicated pin on dedicated port. + * @note I/O speed can be Low, Medium, Fast or High speed. + * @note Warning: only one pin can be passed as parameter. + * @note Refer to datasheet for frequency specifications and the power + * supply and load conditions for each speed. + * @rmtoll OSPEEDR OSPEEDy LL_GPIO_GetPinSpeed + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @retval Returned value can be one of the following values: + * @arg @ref LL_GPIO_SPEED_FREQ_LOW + * @arg @ref LL_GPIO_SPEED_FREQ_MEDIUM + * @arg @ref LL_GPIO_SPEED_FREQ_HIGH + * @arg @ref LL_GPIO_SPEED_FREQ_VERY_HIGH + */ +__STATIC_INLINE uint32_t LL_GPIO_GetPinSpeed(GPIO_TypeDef *GPIOx, uint32_t Pin) +{ + return (uint32_t)(READ_BIT(GPIOx->OSPEEDR, + (GPIO_OSPEEDR_OSPEED0 << (POSITION_VAL(Pin) * 2U))) >> (POSITION_VAL(Pin) * 2U)); +} + +/** + * @brief Configure gpio pull-up or pull-down for a dedicated pin on a dedicated port. + * @note Warning: only one pin can be passed as parameter. + * @rmtoll PUPDR PUPDy LL_GPIO_SetPinPull + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @param Pull This parameter can be one of the following values: + * @arg @ref LL_GPIO_PULL_NO + * @arg @ref LL_GPIO_PULL_UP + * @arg @ref LL_GPIO_PULL_DOWN + * @retval None + */ +__STATIC_INLINE void LL_GPIO_SetPinPull(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Pull) +{ + MODIFY_REG(GPIOx->PUPDR, (GPIO_PUPDR_PUPD0 << (POSITION_VAL(Pin) * 2U)), (Pull << (POSITION_VAL(Pin) * 2U))); +} + +/** + * @brief Return gpio pull-up or pull-down for a dedicated pin on a dedicated port + * @note Warning: only one pin can be passed as parameter. + * @rmtoll PUPDR PUPDy LL_GPIO_GetPinPull + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @retval Returned value can be one of the following values: + * @arg @ref LL_GPIO_PULL_NO + * @arg @ref LL_GPIO_PULL_UP + * @arg @ref LL_GPIO_PULL_DOWN + */ +__STATIC_INLINE uint32_t LL_GPIO_GetPinPull(GPIO_TypeDef *GPIOx, uint32_t Pin) +{ + return (uint32_t)(READ_BIT(GPIOx->PUPDR, + (GPIO_PUPDR_PUPD0 << (POSITION_VAL(Pin) * 2U))) >> (POSITION_VAL(Pin) * 2U)); +} + +/** + * @brief Configure gpio alternate function of a dedicated pin from 0 to 7 for a dedicated port. + * @note Possible values are from AF0 to AF15 depending on target. + * @note Warning: only one pin can be passed as parameter. + * @rmtoll AFRL AFSELy LL_GPIO_SetAFPin_0_7 + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @param Alternate This parameter can be one of the following values: + * @arg @ref LL_GPIO_AF_0 + * @arg @ref LL_GPIO_AF_1 + * @arg @ref LL_GPIO_AF_2 + * @arg @ref LL_GPIO_AF_3 + * @arg @ref LL_GPIO_AF_4 + * @arg @ref LL_GPIO_AF_5 + * @arg @ref LL_GPIO_AF_6 + * @arg @ref LL_GPIO_AF_7 + * @arg @ref LL_GPIO_AF_8 + * @arg @ref LL_GPIO_AF_9 + * @arg @ref LL_GPIO_AF_10 + * @arg @ref LL_GPIO_AF_11 + * @arg @ref LL_GPIO_AF_12 + * @arg @ref LL_GPIO_AF_13 + * @arg @ref LL_GPIO_AF_14 + * @arg @ref LL_GPIO_AF_15 + * @retval None + */ +__STATIC_INLINE void LL_GPIO_SetAFPin_0_7(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Alternate) +{ + MODIFY_REG(GPIOx->AFR[0], (GPIO_AFRL_AFSEL0 << (POSITION_VAL(Pin) * 4U)), + (Alternate << (POSITION_VAL(Pin) * 4U))); +} + +/** + * @brief Return gpio alternate function of a dedicated pin from 0 to 7 for a dedicated port. + * @rmtoll AFRL AFSELy LL_GPIO_GetAFPin_0_7 + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @retval Returned value can be one of the following values: + * @arg @ref LL_GPIO_AF_0 + * @arg @ref LL_GPIO_AF_1 + * @arg @ref LL_GPIO_AF_2 + * @arg @ref LL_GPIO_AF_3 + * @arg @ref LL_GPIO_AF_4 + * @arg @ref LL_GPIO_AF_5 + * @arg @ref LL_GPIO_AF_6 + * @arg @ref LL_GPIO_AF_7 + * @arg @ref LL_GPIO_AF_8 + * @arg @ref LL_GPIO_AF_9 + * @arg @ref LL_GPIO_AF_10 + * @arg @ref LL_GPIO_AF_11 + * @arg @ref LL_GPIO_AF_12 + * @arg @ref LL_GPIO_AF_13 + * @arg @ref LL_GPIO_AF_14 + * @arg @ref LL_GPIO_AF_15 + */ +__STATIC_INLINE uint32_t LL_GPIO_GetAFPin_0_7(GPIO_TypeDef *GPIOx, uint32_t Pin) +{ + return (uint32_t)(READ_BIT(GPIOx->AFR[0], + (GPIO_AFRL_AFSEL0 << (POSITION_VAL(Pin) * 4U))) >> (POSITION_VAL(Pin) * 4U)); +} + +/** + * @brief Configure gpio alternate function of a dedicated pin from 8 to 15 for a dedicated port. + * @note Possible values are from AF0 to AF15 depending on target. + * @note Warning: only one pin can be passed as parameter. + * @rmtoll AFRH AFSELy LL_GPIO_SetAFPin_8_15 + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @param Alternate This parameter can be one of the following values: + * @arg @ref LL_GPIO_AF_0 + * @arg @ref LL_GPIO_AF_1 + * @arg @ref LL_GPIO_AF_2 + * @arg @ref LL_GPIO_AF_3 + * @arg @ref LL_GPIO_AF_4 + * @arg @ref LL_GPIO_AF_5 + * @arg @ref LL_GPIO_AF_6 + * @arg @ref LL_GPIO_AF_7 + * @arg @ref LL_GPIO_AF_8 + * @arg @ref LL_GPIO_AF_9 + * @arg @ref LL_GPIO_AF_10 + * @arg @ref LL_GPIO_AF_11 + * @arg @ref LL_GPIO_AF_12 + * @arg @ref LL_GPIO_AF_13 + * @arg @ref LL_GPIO_AF_14 + * @arg @ref LL_GPIO_AF_15 + * @retval None + */ +__STATIC_INLINE void LL_GPIO_SetAFPin_8_15(GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Alternate) +{ + MODIFY_REG(GPIOx->AFR[1], (GPIO_AFRH_AFSEL8 << (POSITION_VAL(Pin >> 8U) * 4U)), + (Alternate << (POSITION_VAL(Pin >> 8U) * 4U))); +} + +/** + * @brief Return gpio alternate function of a dedicated pin from 8 to 15 for a dedicated port. + * @note Possible values are from AF0 to AF15 depending on target. + * @rmtoll AFRH AFSELy LL_GPIO_GetAFPin_8_15 + * @param GPIOx GPIO Port + * @param Pin This parameter can be one of the following values: + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @retval Returned value can be one of the following values: + * @arg @ref LL_GPIO_AF_0 + * @arg @ref LL_GPIO_AF_1 + * @arg @ref LL_GPIO_AF_2 + * @arg @ref LL_GPIO_AF_3 + * @arg @ref LL_GPIO_AF_4 + * @arg @ref LL_GPIO_AF_5 + * @arg @ref LL_GPIO_AF_6 + * @arg @ref LL_GPIO_AF_7 + * @arg @ref LL_GPIO_AF_8 + * @arg @ref LL_GPIO_AF_9 + * @arg @ref LL_GPIO_AF_10 + * @arg @ref LL_GPIO_AF_11 + * @arg @ref LL_GPIO_AF_12 + * @arg @ref LL_GPIO_AF_13 + * @arg @ref LL_GPIO_AF_14 + * @arg @ref LL_GPIO_AF_15 + */ +__STATIC_INLINE uint32_t LL_GPIO_GetAFPin_8_15(GPIO_TypeDef *GPIOx, uint32_t Pin) +{ + return (uint32_t)(READ_BIT(GPIOx->AFR[1], + (GPIO_AFRH_AFSEL8 << (POSITION_VAL(Pin >> 8U) * 4U))) >> (POSITION_VAL(Pin >> 8U) * 4U)); +} + + +/** + * @brief Lock configuration of several pins for a dedicated port. + * @note When the lock sequence has been applied on a port bit, the + * value of this port bit can no longer be modified until the + * next reset. + * @note Each lock bit freezes a specific configuration register + * (control and alternate function registers). + * @rmtoll LCKR LCKK LL_GPIO_LockPin + * @param GPIOx GPIO Port + * @param PinMask This parameter can be a combination of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @retval None + */ +__STATIC_INLINE void LL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint32_t PinMask) +{ + __IO uint32_t temp; + WRITE_REG(GPIOx->LCKR, GPIO_LCKR_LCKK | PinMask); + WRITE_REG(GPIOx->LCKR, PinMask); + WRITE_REG(GPIOx->LCKR, GPIO_LCKR_LCKK | PinMask); + /* Read LCKK register. This read is mandatory to complete key lock sequence */ + temp = READ_REG(GPIOx->LCKR); + (void) temp; +} + +/** + * @brief Return 1 if all pins passed as parameter, of a dedicated port, are locked. else Return 0. + * @rmtoll LCKR LCKy LL_GPIO_IsPinLocked + * @param GPIOx GPIO Port + * @param PinMask This parameter can be a combination of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_GPIO_IsPinLocked(GPIO_TypeDef *GPIOx, uint32_t PinMask) +{ + return ((READ_BIT(GPIOx->LCKR, PinMask) == (PinMask)) ? 1UL : 0UL); +} + +/** + * @brief Return 1 if one of the pin of a dedicated port is locked. else return 0. + * @rmtoll LCKR LCKK LL_GPIO_IsAnyPinLocked + * @param GPIOx GPIO Port + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_GPIO_IsAnyPinLocked(GPIO_TypeDef *GPIOx) +{ + return ((READ_BIT(GPIOx->LCKR, GPIO_LCKR_LCKK) == (GPIO_LCKR_LCKK)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup GPIO_LL_EF_Data_Access Data Access + * @{ + */ + +/** + * @brief Return full input data register value for a dedicated port. + * @rmtoll IDR IDy LL_GPIO_ReadInputPort + * @param GPIOx GPIO Port + * @retval Input data register value of port + */ +__STATIC_INLINE uint32_t LL_GPIO_ReadInputPort(GPIO_TypeDef *GPIOx) +{ + return (uint32_t)(READ_REG(GPIOx->IDR)); +} + +/** + * @brief Return if input data level for several pins of dedicated port is high or low. + * @rmtoll IDR IDy LL_GPIO_IsInputPinSet + * @param GPIOx GPIO Port + * @param PinMask This parameter can be a combination of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_GPIO_IsInputPinSet(GPIO_TypeDef *GPIOx, uint32_t PinMask) +{ + return ((READ_BIT(GPIOx->IDR, PinMask) == (PinMask)) ? 1UL : 0UL); +} + +/** + * @brief Write output data register for the port. + * @rmtoll ODR ODy LL_GPIO_WriteOutputPort + * @param GPIOx GPIO Port + * @param PortValue Level value for each pin of the port + * @retval None + */ +__STATIC_INLINE void LL_GPIO_WriteOutputPort(GPIO_TypeDef *GPIOx, uint32_t PortValue) +{ + WRITE_REG(GPIOx->ODR, PortValue); +} + +/** + * @brief Return full output data register value for a dedicated port. + * @rmtoll ODR ODy LL_GPIO_ReadOutputPort + * @param GPIOx GPIO Port + * @retval Output data register value of port + */ +__STATIC_INLINE uint32_t LL_GPIO_ReadOutputPort(GPIO_TypeDef *GPIOx) +{ + return (uint32_t)(READ_REG(GPIOx->ODR)); +} + +/** + * @brief Return if input data level for several pins of dedicated port is high or low. + * @rmtoll ODR ODy LL_GPIO_IsOutputPinSet + * @param GPIOx GPIO Port + * @param PinMask This parameter can be a combination of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_GPIO_IsOutputPinSet(GPIO_TypeDef *GPIOx, uint32_t PinMask) +{ + return ((READ_BIT(GPIOx->ODR, PinMask) == (PinMask)) ? 1UL : 0UL); +} + +/** + * @brief Set several pins to high level on dedicated gpio port. + * @rmtoll BSRR BSy LL_GPIO_SetOutputPin + * @param GPIOx GPIO Port + * @param PinMask This parameter can be a combination of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @retval None + */ +__STATIC_INLINE void LL_GPIO_SetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMask) +{ + WRITE_REG(GPIOx->BSRR, PinMask); +} + +/** + * @brief Set several pins to low level on dedicated gpio port. + * @rmtoll BRR BRy LL_GPIO_ResetOutputPin + * @param GPIOx GPIO Port + * @param PinMask This parameter can be a combination of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @retval None + */ +__STATIC_INLINE void LL_GPIO_ResetOutputPin(GPIO_TypeDef *GPIOx, uint32_t PinMask) +{ + WRITE_REG(GPIOx->BRR, PinMask); +} + +/** + * @brief Toggle data value for several pin of dedicated port. + * @rmtoll ODR ODy LL_GPIO_TogglePin + * @param GPIOx GPIO Port + * @param PinMask This parameter can be a combination of the following values: + * @arg @ref LL_GPIO_PIN_0 + * @arg @ref LL_GPIO_PIN_1 + * @arg @ref LL_GPIO_PIN_2 + * @arg @ref LL_GPIO_PIN_3 + * @arg @ref LL_GPIO_PIN_4 + * @arg @ref LL_GPIO_PIN_5 + * @arg @ref LL_GPIO_PIN_6 + * @arg @ref LL_GPIO_PIN_7 + * @arg @ref LL_GPIO_PIN_8 + * @arg @ref LL_GPIO_PIN_9 + * @arg @ref LL_GPIO_PIN_10 + * @arg @ref LL_GPIO_PIN_11 + * @arg @ref LL_GPIO_PIN_12 + * @arg @ref LL_GPIO_PIN_13 + * @arg @ref LL_GPIO_PIN_14 + * @arg @ref LL_GPIO_PIN_15 + * @arg @ref LL_GPIO_PIN_ALL + * @retval None + */ +__STATIC_INLINE void LL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint32_t PinMask) +{ + uint32_t odr = READ_REG(GPIOx->ODR); + WRITE_REG(GPIOx->BSRR, ((odr & PinMask) << 16u) | (~odr & PinMask)); +} + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup GPIO_LL_EF_Init Initialization and de-initialization functions + * @{ + */ + +ErrorStatus LL_GPIO_DeInit(GPIO_TypeDef *GPIOx); +ErrorStatus LL_GPIO_Init(GPIO_TypeDef *GPIOx, LL_GPIO_InitTypeDef *GPIO_InitStruct); +void LL_GPIO_StructInit(LL_GPIO_InitTypeDef *GPIO_InitStruct); + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined (GPIOA) || defined (GPIOB) || defined (GPIOC) || defined (GPIOD) || defined (GPIOE) || defined (GPIOH) */ +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_GPIO_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h new file mode 100644 index 0000000..5d21b93 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_hsem.h @@ -0,0 +1,880 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_hsem.h + * @author MCD Application Team + * @brief Header file of HSEM LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_HSEM_H +#define STM32WBxx_LL_HSEM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined(HSEM) + +/** @defgroup HSEM_LL HSEM + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup HSEM_LL_Exported_Constants HSEM Exported Constants + * @{ + */ + +/** @defgroup HSEM_LL_EC_COREID COREID Defines + * @{ + */ +#define LL_HSEM_COREID_NONE 0U +#define LL_HSEM_COREID_CPU1 HSEM_CR_COREID_CPU1 +#define LL_HSEM_COREID_CPU2 HSEM_CR_COREID_CPU2 +#define LL_HSEM_COREID HSEM_CR_COREID_CURRENT +/** + * @} + */ + + +/** @defgroup HSEM_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_HSEM_ReadReg function + * @{ + */ + +#define LL_HSEM_SEMAPHORE_0 HSEM_C1IER_ISE0 +#define LL_HSEM_SEMAPHORE_1 HSEM_C1IER_ISE1 +#define LL_HSEM_SEMAPHORE_2 HSEM_C1IER_ISE2 +#define LL_HSEM_SEMAPHORE_3 HSEM_C1IER_ISE3 +#define LL_HSEM_SEMAPHORE_4 HSEM_C1IER_ISE4 +#define LL_HSEM_SEMAPHORE_5 HSEM_C1IER_ISE5 +#define LL_HSEM_SEMAPHORE_6 HSEM_C1IER_ISE6 +#define LL_HSEM_SEMAPHORE_7 HSEM_C1IER_ISE7 +#define LL_HSEM_SEMAPHORE_8 HSEM_C1IER_ISE8 +#define LL_HSEM_SEMAPHORE_9 HSEM_C1IER_ISE9 +#define LL_HSEM_SEMAPHORE_10 HSEM_C1IER_ISE10 +#define LL_HSEM_SEMAPHORE_11 HSEM_C1IER_ISE11 +#define LL_HSEM_SEMAPHORE_12 HSEM_C1IER_ISE12 +#define LL_HSEM_SEMAPHORE_13 HSEM_C1IER_ISE13 +#define LL_HSEM_SEMAPHORE_14 HSEM_C1IER_ISE14 +#define LL_HSEM_SEMAPHORE_15 HSEM_C1IER_ISE15 +#define LL_HSEM_SEMAPHORE_16 HSEM_C1IER_ISE16 +#define LL_HSEM_SEMAPHORE_17 HSEM_C1IER_ISE17 +#define LL_HSEM_SEMAPHORE_18 HSEM_C1IER_ISE18 +#define LL_HSEM_SEMAPHORE_19 HSEM_C1IER_ISE19 +#define LL_HSEM_SEMAPHORE_20 HSEM_C1IER_ISE20 +#define LL_HSEM_SEMAPHORE_21 HSEM_C1IER_ISE21 +#define LL_HSEM_SEMAPHORE_22 HSEM_C1IER_ISE22 +#define LL_HSEM_SEMAPHORE_23 HSEM_C1IER_ISE23 +#define LL_HSEM_SEMAPHORE_24 HSEM_C1IER_ISE24 +#define LL_HSEM_SEMAPHORE_25 HSEM_C1IER_ISE25 +#define LL_HSEM_SEMAPHORE_26 HSEM_C1IER_ISE26 +#define LL_HSEM_SEMAPHORE_27 HSEM_C1IER_ISE27 +#define LL_HSEM_SEMAPHORE_28 HSEM_C1IER_ISE28 +#define LL_HSEM_SEMAPHORE_29 HSEM_C1IER_ISE29 +#define LL_HSEM_SEMAPHORE_30 HSEM_C1IER_ISE30 +#define LL_HSEM_SEMAPHORE_31 HSEM_C1IER_ISE31 +#define LL_HSEM_SEMAPHORE_ALL 0xFFFFFFFFU +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup HSEM_LL_Exported_Macros HSEM Exported Macros + * @{ + */ + +/** @defgroup HSEM_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in HSEM register + * @param __INSTANCE__ HSEM Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_HSEM_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in HSEM register + * @param __INSTANCE__ HSEM Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_HSEM_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup HSEM_LL_Exported_Functions HSEM Exported Functions + * @{ + */ + +/** @defgroup HSEM_LL_EF_Data_Management Data_Management + * @{ + */ + + +/** + * @brief Return 1 if the semaphore is locked, else return 0. + * @rmtoll R LOCK LL_HSEM_IsSemaphoreLocked + * @param HSEMx HSEM Instance. + * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_HSEM_IsSemaphoreLocked(const HSEM_TypeDef *HSEMx, uint32_t Semaphore) +{ + return ((READ_BIT(HSEMx->R[Semaphore], HSEM_R_LOCK) == (HSEM_R_LOCK_Msk)) ? 1UL : 0UL); +} + +/** + * @brief Get core id. + * @rmtoll R COREID LL_HSEM_GetCoreId + * @param HSEMx HSEM Instance. + * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31 + * @retval Returned value can be one of the following values: + * @arg @ref LL_HSEM_COREID_NONE + * @arg @ref LL_HSEM_COREID_CPU1 + * @arg @ref LL_HSEM_COREID_CPU2 + */ +__STATIC_INLINE uint32_t LL_HSEM_GetCoreId(const HSEM_TypeDef *HSEMx, uint32_t Semaphore) +{ + return (uint32_t)(READ_BIT(HSEMx->R[Semaphore], HSEM_R_COREID_Msk)); +} + +/** + * @brief Get process id. + * @rmtoll R PROCID LL_HSEM_GetProcessId + * @param HSEMx HSEM Instance. + * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31 + * @retval Process number. Value between Min_Data=0 and Max_Data=255 + */ +__STATIC_INLINE uint32_t LL_HSEM_GetProcessId(const HSEM_TypeDef *HSEMx, uint32_t Semaphore) +{ + return (uint32_t)(READ_BIT(HSEMx->R[Semaphore], HSEM_R_PROCID_Msk)); +} + +/** + * @brief Get the lock by writing in R register. + * @note The R register has to be read to determined if the lock is taken. + * @rmtoll R LOCK LL_HSEM_SetLock + * @rmtoll R COREID LL_HSEM_SetLock + * @rmtoll R PROCID LL_HSEM_SetLock + * @param HSEMx HSEM Instance. + * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31 + * @param process Process id. Value between Min_Data=0 and Max_Data=255 + * @retval None + */ +__STATIC_INLINE void LL_HSEM_SetLock(HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process) +{ + WRITE_REG(HSEMx->R[Semaphore], (HSEM_R_LOCK | LL_HSEM_COREID | process)); +} + +/** + * @brief Get the lock with 2-step lock. + * @rmtoll R LOCK LL_HSEM_2StepLock + * @rmtoll R COREID LL_HSEM_2StepLock + * @rmtoll R PROCID LL_HSEM_2StepLock + * @param HSEMx HSEM Instance. + * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31 + * @param process Process id. Value between Min_Data=0 and Max_Data=255 + * @retval 1 lock fail, 0 lock successful or already locked by same process and core + */ +__STATIC_INLINE uint32_t LL_HSEM_2StepLock(HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process) +{ + WRITE_REG(HSEMx->R[Semaphore], (HSEM_R_LOCK | LL_HSEM_COREID | process)); + return ((HSEMx->R[Semaphore] != (HSEM_R_LOCK | LL_HSEM_COREID | process)) ? 1UL : 0UL); +} + +/** + * @brief Get the lock with 1-step lock. + * @rmtoll RLR LOCK LL_HSEM_1StepLock + * @rmtoll RLR COREID LL_HSEM_1StepLock + * @rmtoll RLR PROCID LL_HSEM_1StepLock + * @param HSEMx HSEM Instance. + * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31 + * @retval 1 lock fail, 0 lock successful or already locked by same core + */ +__STATIC_INLINE uint32_t LL_HSEM_1StepLock(const HSEM_TypeDef *HSEMx, uint32_t Semaphore) +{ + return ((HSEMx->RLR[Semaphore] != (HSEM_RLR_LOCK | LL_HSEM_COREID)) ? 1UL : 0UL); +} + +/** + * @brief Release the lock of the semaphore. + * @note In case of LL_HSEM_1StepLock usage to lock a semaphore, the process is 0. + * @rmtoll R LOCK LL_HSEM_ReleaseLock + * @param HSEMx HSEM Instance. + * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31 + * @param process Process number. Value between Min_Data=0 and Max_Data=255 + * @retval None + */ +__STATIC_INLINE void LL_HSEM_ReleaseLock(HSEM_TypeDef *HSEMx, uint32_t Semaphore, uint32_t process) +{ + WRITE_REG(HSEMx->R[Semaphore], (LL_HSEM_COREID | process)); +} + +/** + * @brief Get the lock status of the semaphore. + * @rmtoll R LOCK LL_HSEM_GetStatus + * @param HSEMx HSEM Instance. + * @param Semaphore Semaphore number. Value between Min_Data=0 and Max_Data=31 + * @retval 0 semaphore is free, 1 semaphore is locked */ +__STATIC_INLINE uint32_t LL_HSEM_GetStatus(const HSEM_TypeDef *HSEMx, uint32_t Semaphore) +{ + return ((HSEMx->R[Semaphore] != 0U) ? 1UL : 0UL); +} + +/** + * @brief Set the key. + * @rmtoll KEYR KEY LL_HSEM_SetKey + * @param HSEMx HSEM Instance. + * @param key Key value. + * @retval None + */ +__STATIC_INLINE void LL_HSEM_SetKey(HSEM_TypeDef *HSEMx, uint32_t key) +{ + WRITE_REG(HSEMx->KEYR, key << HSEM_KEYR_KEY_Pos); +} + +/** + * @brief Get the key. + * @rmtoll KEYR KEY LL_HSEM_GetKey + * @param HSEMx HSEM Instance. + * @retval key to unlock all semaphore from the same core + */ +__STATIC_INLINE uint32_t LL_HSEM_GetKey(const HSEM_TypeDef *HSEMx) +{ + return (uint32_t)(READ_BIT(HSEMx->KEYR, HSEM_KEYR_KEY) >> HSEM_KEYR_KEY_Pos); +} + +/** + * @brief Release all semaphore with the same core id. + * @rmtoll CR KEY LL_HSEM_ResetAllLock + * @rmtoll CR SEC LL_HSEM_ResetAllLock + * @rmtoll CR PRIV LL_HSEM_ResetAllLock + * @param HSEMx HSEM Instance. + * @param key Key value. + * @param core This parameter can be one of the following values: + * @arg @ref LL_HSEM_COREID_CPU1 + * @arg @ref LL_HSEM_COREID_CPU2 + * @retval None + */ +__STATIC_INLINE void LL_HSEM_ResetAllLock(HSEM_TypeDef *HSEMx, uint32_t key, uint32_t core) +{ + WRITE_REG(HSEMx->CR, (key << HSEM_CR_KEY_Pos) | core); +} + +/** + * @} + */ + +/** @defgroup HSEM_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable interrupt. + * @rmtoll C1IER ISEM LL_HSEM_EnableIT_C1IER + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval None + */ +__STATIC_INLINE void LL_HSEM_EnableIT_C1IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + SET_BIT(HSEMx->C1IER, SemaphoreMask); +} + +/** + * @brief Disable interrupt. + * @rmtoll C1IER ISEM LL_HSEM_DisableIT_C1IER + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval None + */ +__STATIC_INLINE void LL_HSEM_DisableIT_C1IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + CLEAR_BIT(HSEMx->C1IER, SemaphoreMask); +} + +/** + * @brief Check if interrupt is enabled. + * @rmtoll C1IER ISEM LL_HSEM_IsEnabledIT_C1IER + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_HSEM_IsEnabledIT_C1IER(const HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + return ((READ_BIT(HSEMx->C1IER, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL); +} + +/** + * @brief Enable interrupt. + * @rmtoll C2IER ISEM LL_HSEM_EnableIT_C2IER + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval None + */ +__STATIC_INLINE void LL_HSEM_EnableIT_C2IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + SET_BIT(HSEMx->C2IER, SemaphoreMask); +} + +/** + * @brief Disable interrupt. + * @rmtoll C2IER ISEM LL_HSEM_DisableIT_C2IER + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval None + */ +__STATIC_INLINE void LL_HSEM_DisableIT_C2IER(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + CLEAR_BIT(HSEMx->C2IER, SemaphoreMask); +} + +/** + * @brief Check if interrupt is enabled. + * @rmtoll C2IER ISEM LL_HSEM_IsEnabledIT_C2IER + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_HSEM_IsEnabledIT_C2IER(const HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + return ((READ_BIT(HSEMx->C2IER, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup HSEM_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Clear interrupt status. + * @rmtoll C1ICR ISEM LL_HSEM_ClearFlag_C1ICR + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval None + */ +__STATIC_INLINE void LL_HSEM_ClearFlag_C1ICR(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + WRITE_REG(HSEMx->C1ICR, SemaphoreMask); +} + +/** + * @brief Get interrupt status from ISR register. + * @rmtoll C1ISR ISEM LL_HSEM_IsActiveFlag_C1ISR + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_HSEM_IsActiveFlag_C1ISR(const HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + return ((READ_BIT(HSEMx->C1ISR, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL); +} + +/** + * @brief Get interrupt status from MISR register. + * @rmtoll C1MISR ISEM LL_HSEM_IsActiveFlag_C1MISR + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_HSEM_IsActiveFlag_C1MISR(const HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + return ((READ_BIT(HSEMx->C1MISR, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL); +} + +/** + * @brief Clear interrupt status. + * @rmtoll C2ICR ISEM LL_HSEM_ClearFlag_C2ICR + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval None + */ +__STATIC_INLINE void LL_HSEM_ClearFlag_C2ICR(HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + WRITE_REG(HSEMx->C2ICR, SemaphoreMask); +} + +/** + * @brief Get interrupt status from ISR register. + * @rmtoll C2ISR ISEM LL_HSEM_IsActiveFlag_C2ISR + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_HSEM_IsActiveFlag_C2ISR(const HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + return ((READ_BIT(HSEMx->C2ISR, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL); +} + +/** + * @brief Get interrupt status from MISR register. + * @rmtoll C2MISR ISEM LL_HSEM_IsActiveFlag_C2MISR + * @param HSEMx HSEM Instance. + * @param SemaphoreMask This parameter can be a combination of the following values: + * @arg @ref LL_HSEM_SEMAPHORE_0 + * @arg @ref LL_HSEM_SEMAPHORE_1 + * @arg @ref LL_HSEM_SEMAPHORE_2 + * @arg @ref LL_HSEM_SEMAPHORE_3 + * @arg @ref LL_HSEM_SEMAPHORE_4 + * @arg @ref LL_HSEM_SEMAPHORE_5 + * @arg @ref LL_HSEM_SEMAPHORE_6 + * @arg @ref LL_HSEM_SEMAPHORE_7 + * @arg @ref LL_HSEM_SEMAPHORE_8 + * @arg @ref LL_HSEM_SEMAPHORE_9 + * @arg @ref LL_HSEM_SEMAPHORE_10 + * @arg @ref LL_HSEM_SEMAPHORE_11 + * @arg @ref LL_HSEM_SEMAPHORE_12 + * @arg @ref LL_HSEM_SEMAPHORE_13 + * @arg @ref LL_HSEM_SEMAPHORE_14 + * @arg @ref LL_HSEM_SEMAPHORE_15 + * @arg @ref LL_HSEM_SEMAPHORE_16 + * @arg @ref LL_HSEM_SEMAPHORE_17 + * @arg @ref LL_HSEM_SEMAPHORE_18 + * @arg @ref LL_HSEM_SEMAPHORE_19 + * @arg @ref LL_HSEM_SEMAPHORE_20 + * @arg @ref LL_HSEM_SEMAPHORE_21 + * @arg @ref LL_HSEM_SEMAPHORE_22 + * @arg @ref LL_HSEM_SEMAPHORE_23 + * @arg @ref LL_HSEM_SEMAPHORE_24 + * @arg @ref LL_HSEM_SEMAPHORE_25 + * @arg @ref LL_HSEM_SEMAPHORE_26 + * @arg @ref LL_HSEM_SEMAPHORE_27 + * @arg @ref LL_HSEM_SEMAPHORE_28 + * @arg @ref LL_HSEM_SEMAPHORE_29 + * @arg @ref LL_HSEM_SEMAPHORE_30 + * @arg @ref LL_HSEM_SEMAPHORE_31 + * @arg @ref LL_HSEM_SEMAPHORE_ALL + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_HSEM_IsActiveFlag_C2MISR(const HSEM_TypeDef *HSEMx, uint32_t SemaphoreMask) +{ + return ((READ_BIT(HSEMx->C2MISR, SemaphoreMask) == (SemaphoreMask)) ? 1UL : 0UL); +} +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined(HSEM) */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32WBxx_LL_HSEM_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_i2c.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_i2c.h new file mode 100644 index 0000000..0f5f380 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_i2c.h @@ -0,0 +1,2279 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_i2c.h + * @author MCD Application Team + * @brief Header file of I2C LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_I2C_H +#define STM32WBxx_LL_I2C_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined (I2C1) || defined (I2C3) + +/** @defgroup I2C_LL I2C + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ +/** @defgroup I2C_LL_Private_Constants I2C Private Constants + * @{ + */ +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup I2C_LL_Private_Macros I2C Private Macros + * @{ + */ +/** + * @} + */ +#endif /*USE_FULL_LL_DRIVER*/ + +/* Exported types ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup I2C_LL_ES_INIT I2C Exported Init structure + * @{ + */ +typedef struct +{ + uint32_t PeripheralMode; /*!< Specifies the peripheral mode. + This parameter can be a value of @ref I2C_LL_EC_PERIPHERAL_MODE. + + This feature can be modified afterwards using unitary function + @ref LL_I2C_SetMode(). */ + + uint32_t Timing; /*!< Specifies the SDA setup, hold time and the SCL high, low period values. + This parameter must be set by referring to the STM32CubeMX Tool and + the helper macro @ref __LL_I2C_CONVERT_TIMINGS(). + + This feature can be modified afterwards using unitary function + @ref LL_I2C_SetTiming(). */ + + uint32_t AnalogFilter; /*!< Enables or disables analog noise filter. + This parameter can be a value of @ref I2C_LL_EC_ANALOGFILTER_SELECTION. + + This feature can be modified afterwards using unitary functions + @ref LL_I2C_EnableAnalogFilter() or LL_I2C_DisableAnalogFilter(). */ + + uint32_t DigitalFilter; /*!< Configures the digital noise filter. + This parameter can be a number between Min_Data = 0x00 and Max_Data = 0x0F. + + This feature can be modified afterwards using unitary function + @ref LL_I2C_SetDigitalFilter(). */ + + uint32_t OwnAddress1; /*!< Specifies the device own address 1. + This parameter must be a value between Min_Data = 0x00 and Max_Data = 0x3FF. + + This feature can be modified afterwards using unitary function + @ref LL_I2C_SetOwnAddress1(). */ + + uint32_t TypeAcknowledge; /*!< Specifies the ACKnowledge or Non ACKnowledge condition after the address receive + match code or next received byte. + This parameter can be a value of @ref I2C_LL_EC_I2C_ACKNOWLEDGE. + + This feature can be modified afterwards using unitary function + @ref LL_I2C_AcknowledgeNextData(). */ + + uint32_t OwnAddrSize; /*!< Specifies the device own address 1 size (7-bit or 10-bit). + This parameter can be a value of @ref I2C_LL_EC_OWNADDRESS1. + + This feature can be modified afterwards using unitary function + @ref LL_I2C_SetOwnAddress1(). */ +} LL_I2C_InitTypeDef; +/** + * @} + */ +#endif /*USE_FULL_LL_DRIVER*/ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup I2C_LL_Exported_Constants I2C Exported Constants + * @{ + */ + +/** @defgroup I2C_LL_EC_CLEAR_FLAG Clear Flags Defines + * @brief Flags defines which can be used with LL_I2C_WriteReg function + * @{ + */ +#define LL_I2C_ICR_ADDRCF I2C_ICR_ADDRCF /*!< Address Matched flag */ +#define LL_I2C_ICR_NACKCF I2C_ICR_NACKCF /*!< Not Acknowledge flag */ +#define LL_I2C_ICR_STOPCF I2C_ICR_STOPCF /*!< Stop detection flag */ +#define LL_I2C_ICR_BERRCF I2C_ICR_BERRCF /*!< Bus error flag */ +#define LL_I2C_ICR_ARLOCF I2C_ICR_ARLOCF /*!< Arbitration Lost flag */ +#define LL_I2C_ICR_OVRCF I2C_ICR_OVRCF /*!< Overrun/Underrun flag */ +#define LL_I2C_ICR_PECCF I2C_ICR_PECCF /*!< PEC error flag */ +#define LL_I2C_ICR_TIMOUTCF I2C_ICR_TIMOUTCF /*!< Timeout detection flag */ +#define LL_I2C_ICR_ALERTCF I2C_ICR_ALERTCF /*!< Alert flag */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_I2C_ReadReg function + * @{ + */ +#define LL_I2C_ISR_TXE I2C_ISR_TXE /*!< Transmit data register empty */ +#define LL_I2C_ISR_TXIS I2C_ISR_TXIS /*!< Transmit interrupt status */ +#define LL_I2C_ISR_RXNE I2C_ISR_RXNE /*!< Receive data register not empty */ +#define LL_I2C_ISR_ADDR I2C_ISR_ADDR /*!< Address matched (slave mode) */ +#define LL_I2C_ISR_NACKF I2C_ISR_NACKF /*!< Not Acknowledge received flag */ +#define LL_I2C_ISR_STOPF I2C_ISR_STOPF /*!< Stop detection flag */ +#define LL_I2C_ISR_TC I2C_ISR_TC /*!< Transfer Complete (master mode) */ +#define LL_I2C_ISR_TCR I2C_ISR_TCR /*!< Transfer Complete Reload */ +#define LL_I2C_ISR_BERR I2C_ISR_BERR /*!< Bus error */ +#define LL_I2C_ISR_ARLO I2C_ISR_ARLO /*!< Arbitration lost */ +#define LL_I2C_ISR_OVR I2C_ISR_OVR /*!< Overrun/Underrun (slave mode) */ +#define LL_I2C_ISR_PECERR I2C_ISR_PECERR /*!< PEC Error in reception (SMBus mode) */ +#define LL_I2C_ISR_TIMEOUT I2C_ISR_TIMEOUT /*!< Timeout detection flag (SMBus mode) */ +#define LL_I2C_ISR_ALERT I2C_ISR_ALERT /*!< SMBus alert (SMBus mode) */ +#define LL_I2C_ISR_BUSY I2C_ISR_BUSY /*!< Bus busy */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_I2C_ReadReg and LL_I2C_WriteReg functions + * @{ + */ +#define LL_I2C_CR1_TXIE I2C_CR1_TXIE /*!< TX Interrupt enable */ +#define LL_I2C_CR1_RXIE I2C_CR1_RXIE /*!< RX Interrupt enable */ +#define LL_I2C_CR1_ADDRIE I2C_CR1_ADDRIE /*!< Address match Interrupt enable (slave only) */ +#define LL_I2C_CR1_NACKIE I2C_CR1_NACKIE /*!< Not acknowledge received Interrupt enable */ +#define LL_I2C_CR1_STOPIE I2C_CR1_STOPIE /*!< STOP detection Interrupt enable */ +#define LL_I2C_CR1_TCIE I2C_CR1_TCIE /*!< Transfer Complete interrupt enable */ +#define LL_I2C_CR1_ERRIE I2C_CR1_ERRIE /*!< Error interrupts enable */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_PERIPHERAL_MODE Peripheral Mode + * @{ + */ +#define LL_I2C_MODE_I2C 0x00000000U /*!< I2C Master or Slave mode */ +#define LL_I2C_MODE_SMBUS_HOST I2C_CR1_SMBHEN /*!< SMBus Host address acknowledge */ +#define LL_I2C_MODE_SMBUS_DEVICE 0x00000000U /*!< SMBus Device default mode + (Default address not acknowledge) */ +#define LL_I2C_MODE_SMBUS_DEVICE_ARP I2C_CR1_SMBDEN /*!< SMBus Device Default address acknowledge */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_ANALOGFILTER_SELECTION Analog Filter Selection + * @{ + */ +#define LL_I2C_ANALOGFILTER_ENABLE 0x00000000U /*!< Analog filter is enabled. */ +#define LL_I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF /*!< Analog filter is disabled. */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_ADDRESSING_MODE Master Addressing Mode + * @{ + */ +#define LL_I2C_ADDRESSING_MODE_7BIT 0x00000000U /*!< Master operates in 7-bit addressing mode. */ +#define LL_I2C_ADDRESSING_MODE_10BIT I2C_CR2_ADD10 /*!< Master operates in 10-bit addressing mode.*/ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_OWNADDRESS1 Own Address 1 Length + * @{ + */ +#define LL_I2C_OWNADDRESS1_7BIT 0x00000000U /*!< Own address 1 is a 7-bit address. */ +#define LL_I2C_OWNADDRESS1_10BIT I2C_OAR1_OA1MODE /*!< Own address 1 is a 10-bit address.*/ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_OWNADDRESS2 Own Address 2 Masks + * @{ + */ +#define LL_I2C_OWNADDRESS2_NOMASK I2C_OAR2_OA2NOMASK /*!< Own Address2 No mask. */ +#define LL_I2C_OWNADDRESS2_MASK01 I2C_OAR2_OA2MASK01 /*!< Only Address2 bits[7:2] are compared. */ +#define LL_I2C_OWNADDRESS2_MASK02 I2C_OAR2_OA2MASK02 /*!< Only Address2 bits[7:3] are compared. */ +#define LL_I2C_OWNADDRESS2_MASK03 I2C_OAR2_OA2MASK03 /*!< Only Address2 bits[7:4] are compared. */ +#define LL_I2C_OWNADDRESS2_MASK04 I2C_OAR2_OA2MASK04 /*!< Only Address2 bits[7:5] are compared. */ +#define LL_I2C_OWNADDRESS2_MASK05 I2C_OAR2_OA2MASK05 /*!< Only Address2 bits[7:6] are compared. */ +#define LL_I2C_OWNADDRESS2_MASK06 I2C_OAR2_OA2MASK06 /*!< Only Address2 bits[7] are compared. */ +#define LL_I2C_OWNADDRESS2_MASK07 I2C_OAR2_OA2MASK07 /*!< No comparison is done. + All Address2 are acknowledged. */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_I2C_ACKNOWLEDGE Acknowledge Generation + * @{ + */ +#define LL_I2C_ACK 0x00000000U /*!< ACK is sent after current received byte. */ +#define LL_I2C_NACK I2C_CR2_NACK /*!< NACK is sent after current received byte.*/ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_ADDRSLAVE Slave Address Length + * @{ + */ +#define LL_I2C_ADDRSLAVE_7BIT 0x00000000U /*!< Slave Address in 7-bit. */ +#define LL_I2C_ADDRSLAVE_10BIT I2C_CR2_ADD10 /*!< Slave Address in 10-bit.*/ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_REQUEST Transfer Request Direction + * @{ + */ +#define LL_I2C_REQUEST_WRITE 0x00000000U /*!< Master request a write transfer. */ +#define LL_I2C_REQUEST_READ I2C_CR2_RD_WRN /*!< Master request a read transfer. */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_MODE Transfer End Mode + * @{ + */ +#define LL_I2C_MODE_RELOAD I2C_CR2_RELOAD /*!< Enable I2C Reload mode. */ +#define LL_I2C_MODE_AUTOEND I2C_CR2_AUTOEND /*!< Enable I2C Automatic end mode + with no HW PEC comparison. */ +#define LL_I2C_MODE_SOFTEND 0x00000000U /*!< Enable I2C Software end mode + with no HW PEC comparison. */ +#define LL_I2C_MODE_SMBUS_RELOAD LL_I2C_MODE_RELOAD /*!< Enable SMBUS Automatic end mode + with HW PEC comparison. */ +#define LL_I2C_MODE_SMBUS_AUTOEND_NO_PEC LL_I2C_MODE_AUTOEND /*!< Enable SMBUS Automatic end mode + with HW PEC comparison. */ +#define LL_I2C_MODE_SMBUS_SOFTEND_NO_PEC LL_I2C_MODE_SOFTEND /*!< Enable SMBUS Software end mode + with HW PEC comparison. */ +#define LL_I2C_MODE_SMBUS_AUTOEND_WITH_PEC (uint32_t)(LL_I2C_MODE_AUTOEND | I2C_CR2_PECBYTE) +/*!< Enable SMBUS Automatic end mode with HW PEC comparison. */ +#define LL_I2C_MODE_SMBUS_SOFTEND_WITH_PEC (uint32_t)(LL_I2C_MODE_SOFTEND | I2C_CR2_PECBYTE) +/*!< Enable SMBUS Software end mode with HW PEC comparison. */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_GENERATE Start And Stop Generation + * @{ + */ +#define LL_I2C_GENERATE_NOSTARTSTOP 0x00000000U +/*!< Don't Generate Stop and Start condition. */ +#define LL_I2C_GENERATE_STOP (uint32_t)(0x80000000U | I2C_CR2_STOP) +/*!< Generate Stop condition (Size should be set to 0). */ +#define LL_I2C_GENERATE_START_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN) +/*!< Generate Start for read request. */ +#define LL_I2C_GENERATE_START_WRITE (uint32_t)(0x80000000U | I2C_CR2_START) +/*!< Generate Start for write request. */ +#define LL_I2C_GENERATE_RESTART_7BIT_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN) +/*!< Generate Restart for read request, slave 7Bit address. */ +#define LL_I2C_GENERATE_RESTART_7BIT_WRITE (uint32_t)(0x80000000U | I2C_CR2_START) +/*!< Generate Restart for write request, slave 7Bit address. */ +#define LL_I2C_GENERATE_RESTART_10BIT_READ (uint32_t)(0x80000000U | I2C_CR2_START | \ + I2C_CR2_RD_WRN | I2C_CR2_HEAD10R) +/*!< Generate Restart for read request, slave 10Bit address. */ +#define LL_I2C_GENERATE_RESTART_10BIT_WRITE (uint32_t)(0x80000000U | I2C_CR2_START) +/*!< Generate Restart for write request, slave 10Bit address.*/ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_DIRECTION Read Write Direction + * @{ + */ +#define LL_I2C_DIRECTION_WRITE 0x00000000U /*!< Write transfer request by master, + slave enters receiver mode. */ +#define LL_I2C_DIRECTION_READ I2C_ISR_DIR /*!< Read transfer request by master, + slave enters transmitter mode.*/ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_DMA_REG_DATA DMA Register Data + * @{ + */ +#define LL_I2C_DMA_REG_DATA_TRANSMIT 0x00000000U /*!< Get address of data register used for + transmission */ +#define LL_I2C_DMA_REG_DATA_RECEIVE 0x00000001U /*!< Get address of data register used for + reception */ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_SMBUS_TIMEOUTA_MODE SMBus TimeoutA Mode SCL SDA Timeout + * @{ + */ +#define LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW 0x00000000U /*!< TimeoutA is used to detect + SCL low level timeout. */ +#define LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH I2C_TIMEOUTR_TIDLE /*!< TimeoutA is used to detect + both SCL and SDA high level timeout.*/ +/** + * @} + */ + +/** @defgroup I2C_LL_EC_SMBUS_TIMEOUT_SELECTION SMBus Timeout Selection + * @{ + */ +#define LL_I2C_SMBUS_TIMEOUTA I2C_TIMEOUTR_TIMOUTEN /*!< TimeoutA enable bit */ +#define LL_I2C_SMBUS_TIMEOUTB I2C_TIMEOUTR_TEXTEN /*!< TimeoutB (extended clock) + enable bit */ +#define LL_I2C_SMBUS_ALL_TIMEOUT (uint32_t)(I2C_TIMEOUTR_TIMOUTEN | \ + I2C_TIMEOUTR_TEXTEN) /*!< TimeoutA and TimeoutB +(extended clock) enable bits */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup I2C_LL_Exported_Macros I2C Exported Macros + * @{ + */ + +/** @defgroup I2C_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in I2C register + * @param __INSTANCE__ I2C Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_I2C_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in I2C register + * @param __INSTANCE__ I2C Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_I2C_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** @defgroup I2C_LL_EM_CONVERT_TIMINGS Convert SDA SCL timings + * @{ + */ +/** + * @brief Configure the SDA setup, hold time and the SCL high, low period. + * @param __PRESCALER__ This parameter must be a value between Min_Data=0 and Max_Data=0xF. + * @param __SETUP_TIME__ This parameter must be a value between Min_Data=0 and Max_Data=0xF. + (tscldel = (SCLDEL+1)xtpresc) + * @param __HOLD_TIME__ This parameter must be a value between Min_Data=0 and Max_Data=0xF. + (tsdadel = SDADELxtpresc) + * @param __SCLH_PERIOD__ This parameter must be a value between Min_Data=0 and Max_Data=0xFF. + (tsclh = (SCLH+1)xtpresc) + * @param __SCLL_PERIOD__ This parameter must be a value between Min_Data=0 and Max_Data=0xFF. + (tscll = (SCLL+1)xtpresc) + * @retval Value between Min_Data=0 and Max_Data=0xFFFFFFFF + */ +#define __LL_I2C_CONVERT_TIMINGS(__PRESCALER__, __SETUP_TIME__, __HOLD_TIME__, __SCLH_PERIOD__, __SCLL_PERIOD__) \ + ((((uint32_t)(__PRESCALER__) << I2C_TIMINGR_PRESC_Pos) & I2C_TIMINGR_PRESC) | \ + (((uint32_t)(__SETUP_TIME__) << I2C_TIMINGR_SCLDEL_Pos) & I2C_TIMINGR_SCLDEL) | \ + (((uint32_t)(__HOLD_TIME__) << I2C_TIMINGR_SDADEL_Pos) & I2C_TIMINGR_SDADEL) | \ + (((uint32_t)(__SCLH_PERIOD__) << I2C_TIMINGR_SCLH_Pos) & I2C_TIMINGR_SCLH) | \ + (((uint32_t)(__SCLL_PERIOD__) << I2C_TIMINGR_SCLL_Pos) & I2C_TIMINGR_SCLL)) +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup I2C_LL_Exported_Functions I2C Exported Functions + * @{ + */ + +/** @defgroup I2C_LL_EF_Configuration Configuration + * @{ + */ + +/** + * @brief Enable I2C peripheral (PE = 1). + * @rmtoll CR1 PE LL_I2C_Enable + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_Enable(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_PE); +} + +/** + * @brief Disable I2C peripheral (PE = 0). + * @note When PE = 0, the I2C SCL and SDA lines are released. + * Internal state machines and status bits are put back to their reset value. + * When cleared, PE must be kept low for at least 3 APB clock cycles. + * @rmtoll CR1 PE LL_I2C_Disable + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_Disable(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_PE); +} + +/** + * @brief Check if the I2C peripheral is enabled or disabled. + * @rmtoll CR1 PE LL_I2C_IsEnabled + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabled(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_PE) == (I2C_CR1_PE)) ? 1UL : 0UL); +} + +/** + * @brief Configure Noise Filters (Analog and Digital). + * @note If the analog filter is also enabled, the digital filter is added to analog filter. + * The filters can only be programmed when the I2C is disabled (PE = 0). + * @rmtoll CR1 ANFOFF LL_I2C_ConfigFilters\n + * CR1 DNF LL_I2C_ConfigFilters + * @param I2Cx I2C Instance. + * @param AnalogFilter This parameter can be one of the following values: + * @arg @ref LL_I2C_ANALOGFILTER_ENABLE + * @arg @ref LL_I2C_ANALOGFILTER_DISABLE + * @param DigitalFilter This parameter must be a value between Min_Data=0x00 (Digital filter disabled) + and Max_Data=0x0F (Digital filter enabled and filtering capability up to 15*ti2cclk). + * This parameter is used to configure the digital noise filter on SDA and SCL input. + * The digital filter will filter spikes with a length of up to DNF[3:0]*ti2cclk. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ConfigFilters(I2C_TypeDef *I2Cx, uint32_t AnalogFilter, uint32_t DigitalFilter) +{ + MODIFY_REG(I2Cx->CR1, I2C_CR1_ANFOFF | I2C_CR1_DNF, AnalogFilter | (DigitalFilter << I2C_CR1_DNF_Pos)); +} + +/** + * @brief Configure Digital Noise Filter. + * @note If the analog filter is also enabled, the digital filter is added to analog filter. + * This filter can only be programmed when the I2C is disabled (PE = 0). + * @rmtoll CR1 DNF LL_I2C_SetDigitalFilter + * @param I2Cx I2C Instance. + * @param DigitalFilter This parameter must be a value between Min_Data=0x00 (Digital filter disabled) + and Max_Data=0x0F (Digital filter enabled and filtering capability up to 15*ti2cclk). + * This parameter is used to configure the digital noise filter on SDA and SCL input. + * The digital filter will filter spikes with a length of up to DNF[3:0]*ti2cclk. + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetDigitalFilter(I2C_TypeDef *I2Cx, uint32_t DigitalFilter) +{ + MODIFY_REG(I2Cx->CR1, I2C_CR1_DNF, DigitalFilter << I2C_CR1_DNF_Pos); +} + +/** + * @brief Get the current Digital Noise Filter configuration. + * @rmtoll CR1 DNF LL_I2C_GetDigitalFilter + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x0 and Max_Data=0xF + */ +__STATIC_INLINE uint32_t LL_I2C_GetDigitalFilter(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_DNF) >> I2C_CR1_DNF_Pos); +} + +/** + * @brief Enable Analog Noise Filter. + * @note This filter can only be programmed when the I2C is disabled (PE = 0). + * @rmtoll CR1 ANFOFF LL_I2C_EnableAnalogFilter + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableAnalogFilter(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_ANFOFF); +} + +/** + * @brief Disable Analog Noise Filter. + * @note This filter can only be programmed when the I2C is disabled (PE = 0). + * @rmtoll CR1 ANFOFF LL_I2C_DisableAnalogFilter + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableAnalogFilter(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_ANFOFF); +} + +/** + * @brief Check if Analog Noise Filter is enabled or disabled. + * @rmtoll CR1 ANFOFF LL_I2C_IsEnabledAnalogFilter + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledAnalogFilter(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_ANFOFF) != (I2C_CR1_ANFOFF)) ? 1UL : 0UL); +} + +/** + * @brief Enable DMA transmission requests. + * @rmtoll CR1 TXDMAEN LL_I2C_EnableDMAReq_TX + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableDMAReq_TX(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN); +} + +/** + * @brief Disable DMA transmission requests. + * @rmtoll CR1 TXDMAEN LL_I2C_DisableDMAReq_TX + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableDMAReq_TX(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN); +} + +/** + * @brief Check if DMA transmission requests are enabled or disabled. + * @rmtoll CR1 TXDMAEN LL_I2C_IsEnabledDMAReq_TX + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_TX(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXDMAEN) == (I2C_CR1_TXDMAEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable DMA reception requests. + * @rmtoll CR1 RXDMAEN LL_I2C_EnableDMAReq_RX + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableDMAReq_RX(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN); +} + +/** + * @brief Disable DMA reception requests. + * @rmtoll CR1 RXDMAEN LL_I2C_DisableDMAReq_RX + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableDMAReq_RX(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN); +} + +/** + * @brief Check if DMA reception requests are enabled or disabled. + * @rmtoll CR1 RXDMAEN LL_I2C_IsEnabledDMAReq_RX + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledDMAReq_RX(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXDMAEN) == (I2C_CR1_RXDMAEN)) ? 1UL : 0UL); +} + +/** + * @brief Get the data register address used for DMA transfer + * @rmtoll TXDR TXDATA LL_I2C_DMA_GetRegAddr\n + * RXDR RXDATA LL_I2C_DMA_GetRegAddr + * @param I2Cx I2C Instance + * @param Direction This parameter can be one of the following values: + * @arg @ref LL_I2C_DMA_REG_DATA_TRANSMIT + * @arg @ref LL_I2C_DMA_REG_DATA_RECEIVE + * @retval Address of data register + */ +__STATIC_INLINE uint32_t LL_I2C_DMA_GetRegAddr(const I2C_TypeDef *I2Cx, uint32_t Direction) +{ + uint32_t data_reg_addr; + + if (Direction == LL_I2C_DMA_REG_DATA_TRANSMIT) + { + /* return address of TXDR register */ + data_reg_addr = (uint32_t) &(I2Cx->TXDR); + } + else + { + /* return address of RXDR register */ + data_reg_addr = (uint32_t) &(I2Cx->RXDR); + } + + return data_reg_addr; +} + +/** + * @brief Enable Clock stretching. + * @note This bit can only be programmed when the I2C is disabled (PE = 0). + * @rmtoll CR1 NOSTRETCH LL_I2C_EnableClockStretching + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableClockStretching(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH); +} + +/** + * @brief Disable Clock stretching. + * @note This bit can only be programmed when the I2C is disabled (PE = 0). + * @rmtoll CR1 NOSTRETCH LL_I2C_DisableClockStretching + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableClockStretching(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH); +} + +/** + * @brief Check if Clock stretching is enabled or disabled. + * @rmtoll CR1 NOSTRETCH LL_I2C_IsEnabledClockStretching + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledClockStretching(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_NOSTRETCH) != (I2C_CR1_NOSTRETCH)) ? 1UL : 0UL); +} + +/** + * @brief Enable hardware byte control in slave mode. + * @rmtoll CR1 SBC LL_I2C_EnableSlaveByteControl + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableSlaveByteControl(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_SBC); +} + +/** + * @brief Disable hardware byte control in slave mode. + * @rmtoll CR1 SBC LL_I2C_DisableSlaveByteControl + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableSlaveByteControl(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_SBC); +} + +/** + * @brief Check if hardware byte control in slave mode is enabled or disabled. + * @rmtoll CR1 SBC LL_I2C_IsEnabledSlaveByteControl + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledSlaveByteControl(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_SBC) == (I2C_CR1_SBC)) ? 1UL : 0UL); +} + +/** + * @brief Enable Wakeup from STOP. + * @note The macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not + * WakeUpFromStop feature is supported by the I2Cx Instance. + * @note This bit can only be programmed when Digital Filter is disabled. + * @rmtoll CR1 WUPEN LL_I2C_EnableWakeUpFromStop + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableWakeUpFromStop(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_WUPEN); +} + +/** + * @brief Disable Wakeup from STOP. + * @note The macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not + * WakeUpFromStop feature is supported by the I2Cx Instance. + * @rmtoll CR1 WUPEN LL_I2C_DisableWakeUpFromStop + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableWakeUpFromStop(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_WUPEN); +} + +/** + * @brief Check if Wakeup from STOP is enabled or disabled. + * @note The macro IS_I2C_WAKEUP_FROMSTOP_INSTANCE(I2Cx) can be used to check whether or not + * WakeUpFromStop feature is supported by the I2Cx Instance. + * @rmtoll CR1 WUPEN LL_I2C_IsEnabledWakeUpFromStop + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledWakeUpFromStop(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_WUPEN) == (I2C_CR1_WUPEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable General Call. + * @note When enabled the Address 0x00 is ACKed. + * @rmtoll CR1 GCEN LL_I2C_EnableGeneralCall + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableGeneralCall(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_GCEN); +} + +/** + * @brief Disable General Call. + * @note When disabled the Address 0x00 is NACKed. + * @rmtoll CR1 GCEN LL_I2C_DisableGeneralCall + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableGeneralCall(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_GCEN); +} + +/** + * @brief Check if General Call is enabled or disabled. + * @rmtoll CR1 GCEN LL_I2C_IsEnabledGeneralCall + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledGeneralCall(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_GCEN) == (I2C_CR1_GCEN)) ? 1UL : 0UL); +} + +/** + * @brief Configure the Master to operate in 7-bit or 10-bit addressing mode. + * @note Changing this bit is not allowed, when the START bit is set. + * @rmtoll CR2 ADD10 LL_I2C_SetMasterAddressingMode + * @param I2Cx I2C Instance. + * @param AddressingMode This parameter can be one of the following values: + * @arg @ref LL_I2C_ADDRESSING_MODE_7BIT + * @arg @ref LL_I2C_ADDRESSING_MODE_10BIT + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetMasterAddressingMode(I2C_TypeDef *I2Cx, uint32_t AddressingMode) +{ + MODIFY_REG(I2Cx->CR2, I2C_CR2_ADD10, AddressingMode); +} + +/** + * @brief Get the Master addressing mode. + * @rmtoll CR2 ADD10 LL_I2C_GetMasterAddressingMode + * @param I2Cx I2C Instance. + * @retval Returned value can be one of the following values: + * @arg @ref LL_I2C_ADDRESSING_MODE_7BIT + * @arg @ref LL_I2C_ADDRESSING_MODE_10BIT + */ +__STATIC_INLINE uint32_t LL_I2C_GetMasterAddressingMode(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_ADD10)); +} + +/** + * @brief Set the Own Address1. + * @rmtoll OAR1 OA1 LL_I2C_SetOwnAddress1\n + * OAR1 OA1MODE LL_I2C_SetOwnAddress1 + * @param I2Cx I2C Instance. + * @param OwnAddress1 This parameter must be a value between Min_Data=0 and Max_Data=0x3FF. + * @param OwnAddrSize This parameter can be one of the following values: + * @arg @ref LL_I2C_OWNADDRESS1_7BIT + * @arg @ref LL_I2C_OWNADDRESS1_10BIT + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetOwnAddress1(I2C_TypeDef *I2Cx, uint32_t OwnAddress1, uint32_t OwnAddrSize) +{ + MODIFY_REG(I2Cx->OAR1, I2C_OAR1_OA1 | I2C_OAR1_OA1MODE, OwnAddress1 | OwnAddrSize); +} + +/** + * @brief Enable acknowledge on Own Address1 match address. + * @rmtoll OAR1 OA1EN LL_I2C_EnableOwnAddress1 + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableOwnAddress1(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN); +} + +/** + * @brief Disable acknowledge on Own Address1 match address. + * @rmtoll OAR1 OA1EN LL_I2C_DisableOwnAddress1 + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableOwnAddress1(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN); +} + +/** + * @brief Check if Own Address1 acknowledge is enabled or disabled. + * @rmtoll OAR1 OA1EN LL_I2C_IsEnabledOwnAddress1 + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress1(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->OAR1, I2C_OAR1_OA1EN) == (I2C_OAR1_OA1EN)) ? 1UL : 0UL); +} + +/** + * @brief Set the 7bits Own Address2. + * @note This action has no effect if own address2 is enabled. + * @rmtoll OAR2 OA2 LL_I2C_SetOwnAddress2\n + * OAR2 OA2MSK LL_I2C_SetOwnAddress2 + * @param I2Cx I2C Instance. + * @param OwnAddress2 Value between Min_Data=0 and Max_Data=0x7F. + * @param OwnAddrMask This parameter can be one of the following values: + * @arg @ref LL_I2C_OWNADDRESS2_NOMASK + * @arg @ref LL_I2C_OWNADDRESS2_MASK01 + * @arg @ref LL_I2C_OWNADDRESS2_MASK02 + * @arg @ref LL_I2C_OWNADDRESS2_MASK03 + * @arg @ref LL_I2C_OWNADDRESS2_MASK04 + * @arg @ref LL_I2C_OWNADDRESS2_MASK05 + * @arg @ref LL_I2C_OWNADDRESS2_MASK06 + * @arg @ref LL_I2C_OWNADDRESS2_MASK07 + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetOwnAddress2(I2C_TypeDef *I2Cx, uint32_t OwnAddress2, uint32_t OwnAddrMask) +{ + MODIFY_REG(I2Cx->OAR2, I2C_OAR2_OA2 | I2C_OAR2_OA2MSK, OwnAddress2 | OwnAddrMask); +} + +/** + * @brief Enable acknowledge on Own Address2 match address. + * @rmtoll OAR2 OA2EN LL_I2C_EnableOwnAddress2 + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableOwnAddress2(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN); +} + +/** + * @brief Disable acknowledge on Own Address2 match address. + * @rmtoll OAR2 OA2EN LL_I2C_DisableOwnAddress2 + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableOwnAddress2(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN); +} + +/** + * @brief Check if Own Address1 acknowledge is enabled or disabled. + * @rmtoll OAR2 OA2EN LL_I2C_IsEnabledOwnAddress2 + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledOwnAddress2(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->OAR2, I2C_OAR2_OA2EN) == (I2C_OAR2_OA2EN)) ? 1UL : 0UL); +} + +/** + * @brief Configure the SDA setup, hold time and the SCL high, low period. + * @note This bit can only be programmed when the I2C is disabled (PE = 0). + * @rmtoll TIMINGR TIMINGR LL_I2C_SetTiming + * @param I2Cx I2C Instance. + * @param Timing This parameter must be a value between Min_Data=0 and Max_Data=0xFFFFFFFF. + * @note This parameter is computed with the STM32CubeMX Tool. + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetTiming(I2C_TypeDef *I2Cx, uint32_t Timing) +{ + WRITE_REG(I2Cx->TIMINGR, Timing); +} + +/** + * @brief Get the Timing Prescaler setting. + * @rmtoll TIMINGR PRESC LL_I2C_GetTimingPrescaler + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x0 and Max_Data=0xF + */ +__STATIC_INLINE uint32_t LL_I2C_GetTimingPrescaler(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_PRESC) >> I2C_TIMINGR_PRESC_Pos); +} + +/** + * @brief Get the SCL low period setting. + * @rmtoll TIMINGR SCLL LL_I2C_GetClockLowPeriod + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x00 and Max_Data=0xFF + */ +__STATIC_INLINE uint32_t LL_I2C_GetClockLowPeriod(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLL) >> I2C_TIMINGR_SCLL_Pos); +} + +/** + * @brief Get the SCL high period setting. + * @rmtoll TIMINGR SCLH LL_I2C_GetClockHighPeriod + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x00 and Max_Data=0xFF + */ +__STATIC_INLINE uint32_t LL_I2C_GetClockHighPeriod(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLH) >> I2C_TIMINGR_SCLH_Pos); +} + +/** + * @brief Get the SDA hold time. + * @rmtoll TIMINGR SDADEL LL_I2C_GetDataHoldTime + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x0 and Max_Data=0xF + */ +__STATIC_INLINE uint32_t LL_I2C_GetDataHoldTime(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SDADEL) >> I2C_TIMINGR_SDADEL_Pos); +} + +/** + * @brief Get the SDA setup time. + * @rmtoll TIMINGR SCLDEL LL_I2C_GetDataSetupTime + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x0 and Max_Data=0xF + */ +__STATIC_INLINE uint32_t LL_I2C_GetDataSetupTime(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->TIMINGR, I2C_TIMINGR_SCLDEL) >> I2C_TIMINGR_SCLDEL_Pos); +} + +/** + * @brief Configure peripheral mode. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll CR1 SMBHEN LL_I2C_SetMode\n + * CR1 SMBDEN LL_I2C_SetMode + * @param I2Cx I2C Instance. + * @param PeripheralMode This parameter can be one of the following values: + * @arg @ref LL_I2C_MODE_I2C + * @arg @ref LL_I2C_MODE_SMBUS_HOST + * @arg @ref LL_I2C_MODE_SMBUS_DEVICE + * @arg @ref LL_I2C_MODE_SMBUS_DEVICE_ARP + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetMode(I2C_TypeDef *I2Cx, uint32_t PeripheralMode) +{ + MODIFY_REG(I2Cx->CR1, I2C_CR1_SMBHEN | I2C_CR1_SMBDEN, PeripheralMode); +} + +/** + * @brief Get peripheral mode. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll CR1 SMBHEN LL_I2C_GetMode\n + * CR1 SMBDEN LL_I2C_GetMode + * @param I2Cx I2C Instance. + * @retval Returned value can be one of the following values: + * @arg @ref LL_I2C_MODE_I2C + * @arg @ref LL_I2C_MODE_SMBUS_HOST + * @arg @ref LL_I2C_MODE_SMBUS_DEVICE + * @arg @ref LL_I2C_MODE_SMBUS_DEVICE_ARP + */ +__STATIC_INLINE uint32_t LL_I2C_GetMode(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->CR1, I2C_CR1_SMBHEN | I2C_CR1_SMBDEN)); +} + +/** + * @brief Enable SMBus alert (Host or Device mode) + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note SMBus Device mode: + * - SMBus Alert pin is drived low and + * Alert Response Address Header acknowledge is enabled. + * SMBus Host mode: + * - SMBus Alert pin management is supported. + * @rmtoll CR1 ALERTEN LL_I2C_EnableSMBusAlert + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableSMBusAlert(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_ALERTEN); +} + +/** + * @brief Disable SMBus alert (Host or Device mode) + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note SMBus Device mode: + * - SMBus Alert pin is not drived (can be used as a standard GPIO) and + * Alert Response Address Header acknowledge is disabled. + * SMBus Host mode: + * - SMBus Alert pin management is not supported. + * @rmtoll CR1 ALERTEN LL_I2C_DisableSMBusAlert + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableSMBusAlert(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_ALERTEN); +} + +/** + * @brief Check if SMBus alert (Host or Device mode) is enabled or disabled. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll CR1 ALERTEN LL_I2C_IsEnabledSMBusAlert + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusAlert(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_ALERTEN) == (I2C_CR1_ALERTEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable SMBus Packet Error Calculation (PEC). + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll CR1 PECEN LL_I2C_EnableSMBusPEC + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableSMBusPEC(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_PECEN); +} + +/** + * @brief Disable SMBus Packet Error Calculation (PEC). + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll CR1 PECEN LL_I2C_DisableSMBusPEC + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableSMBusPEC(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_PECEN); +} + +/** + * @brief Check if SMBus Packet Error Calculation (PEC) is enabled or disabled. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll CR1 PECEN LL_I2C_IsEnabledSMBusPEC + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPEC(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_PECEN) == (I2C_CR1_PECEN)) ? 1UL : 0UL); +} + +/** + * @brief Configure the SMBus Clock Timeout. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note This configuration can only be programmed when associated Timeout is disabled (TimeoutA and/orTimeoutB). + * @rmtoll TIMEOUTR TIMEOUTA LL_I2C_ConfigSMBusTimeout\n + * TIMEOUTR TIDLE LL_I2C_ConfigSMBusTimeout\n + * TIMEOUTR TIMEOUTB LL_I2C_ConfigSMBusTimeout + * @param I2Cx I2C Instance. + * @param TimeoutA This parameter must be a value between Min_Data=0 and Max_Data=0xFFF. + * @param TimeoutAMode This parameter can be one of the following values: + * @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW + * @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH + * @param TimeoutB + * @retval None + */ +__STATIC_INLINE void LL_I2C_ConfigSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t TimeoutA, uint32_t TimeoutAMode, + uint32_t TimeoutB) +{ + MODIFY_REG(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTA | I2C_TIMEOUTR_TIDLE | I2C_TIMEOUTR_TIMEOUTB, + TimeoutA | TimeoutAMode | (TimeoutB << I2C_TIMEOUTR_TIMEOUTB_Pos)); +} + +/** + * @brief Configure the SMBus Clock TimeoutA (SCL low timeout or SCL and SDA high timeout depends on TimeoutA mode). + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note These bits can only be programmed when TimeoutA is disabled. + * @rmtoll TIMEOUTR TIMEOUTA LL_I2C_SetSMBusTimeoutA + * @param I2Cx I2C Instance. + * @param TimeoutA This parameter must be a value between Min_Data=0 and Max_Data=0xFFF. + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetSMBusTimeoutA(I2C_TypeDef *I2Cx, uint32_t TimeoutA) +{ + WRITE_REG(I2Cx->TIMEOUTR, TimeoutA); +} + +/** + * @brief Get the SMBus Clock TimeoutA setting. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll TIMEOUTR TIMEOUTA LL_I2C_GetSMBusTimeoutA + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0 and Max_Data=0xFFF + */ +__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutA(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTA)); +} + +/** + * @brief Set the SMBus Clock TimeoutA mode. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note This bit can only be programmed when TimeoutA is disabled. + * @rmtoll TIMEOUTR TIDLE LL_I2C_SetSMBusTimeoutAMode + * @param I2Cx I2C Instance. + * @param TimeoutAMode This parameter can be one of the following values: + * @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW + * @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetSMBusTimeoutAMode(I2C_TypeDef *I2Cx, uint32_t TimeoutAMode) +{ + WRITE_REG(I2Cx->TIMEOUTR, TimeoutAMode); +} + +/** + * @brief Get the SMBus Clock TimeoutA mode. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll TIMEOUTR TIDLE LL_I2C_GetSMBusTimeoutAMode + * @param I2Cx I2C Instance. + * @retval Returned value can be one of the following values: + * @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW + * @arg @ref LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH + */ +__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutAMode(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIDLE)); +} + +/** + * @brief Configure the SMBus Extended Cumulative Clock TimeoutB (Master or Slave mode). + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note These bits can only be programmed when TimeoutB is disabled. + * @rmtoll TIMEOUTR TIMEOUTB LL_I2C_SetSMBusTimeoutB + * @param I2Cx I2C Instance. + * @param TimeoutB This parameter must be a value between Min_Data=0 and Max_Data=0xFFF. + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetSMBusTimeoutB(I2C_TypeDef *I2Cx, uint32_t TimeoutB) +{ + WRITE_REG(I2Cx->TIMEOUTR, TimeoutB << I2C_TIMEOUTR_TIMEOUTB_Pos); +} + +/** + * @brief Get the SMBus Extended Cumulative Clock TimeoutB setting. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll TIMEOUTR TIMEOUTB LL_I2C_GetSMBusTimeoutB + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0 and Max_Data=0xFFF + */ +__STATIC_INLINE uint32_t LL_I2C_GetSMBusTimeoutB(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->TIMEOUTR, I2C_TIMEOUTR_TIMEOUTB) >> I2C_TIMEOUTR_TIMEOUTB_Pos); +} + +/** + * @brief Enable the SMBus Clock Timeout. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll TIMEOUTR TIMOUTEN LL_I2C_EnableSMBusTimeout\n + * TIMEOUTR TEXTEN LL_I2C_EnableSMBusTimeout + * @param I2Cx I2C Instance. + * @param ClockTimeout This parameter can be one of the following values: + * @arg @ref LL_I2C_SMBUS_TIMEOUTA + * @arg @ref LL_I2C_SMBUS_TIMEOUTB + * @arg @ref LL_I2C_SMBUS_ALL_TIMEOUT + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout) +{ + SET_BIT(I2Cx->TIMEOUTR, ClockTimeout); +} + +/** + * @brief Disable the SMBus Clock Timeout. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll TIMEOUTR TIMOUTEN LL_I2C_DisableSMBusTimeout\n + * TIMEOUTR TEXTEN LL_I2C_DisableSMBusTimeout + * @param I2Cx I2C Instance. + * @param ClockTimeout This parameter can be one of the following values: + * @arg @ref LL_I2C_SMBUS_TIMEOUTA + * @arg @ref LL_I2C_SMBUS_TIMEOUTB + * @arg @ref LL_I2C_SMBUS_ALL_TIMEOUT + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableSMBusTimeout(I2C_TypeDef *I2Cx, uint32_t ClockTimeout) +{ + CLEAR_BIT(I2Cx->TIMEOUTR, ClockTimeout); +} + +/** + * @brief Check if the SMBus Clock Timeout is enabled or disabled. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll TIMEOUTR TIMOUTEN LL_I2C_IsEnabledSMBusTimeout\n + * TIMEOUTR TEXTEN LL_I2C_IsEnabledSMBusTimeout + * @param I2Cx I2C Instance. + * @param ClockTimeout This parameter can be one of the following values: + * @arg @ref LL_I2C_SMBUS_TIMEOUTA + * @arg @ref LL_I2C_SMBUS_TIMEOUTB + * @arg @ref LL_I2C_SMBUS_ALL_TIMEOUT + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusTimeout(const I2C_TypeDef *I2Cx, uint32_t ClockTimeout) +{ + return ((READ_BIT(I2Cx->TIMEOUTR, (I2C_TIMEOUTR_TIMOUTEN | I2C_TIMEOUTR_TEXTEN)) == \ + (ClockTimeout)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup I2C_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable TXIS interrupt. + * @rmtoll CR1 TXIE LL_I2C_EnableIT_TX + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableIT_TX(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_TXIE); +} + +/** + * @brief Disable TXIS interrupt. + * @rmtoll CR1 TXIE LL_I2C_DisableIT_TX + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableIT_TX(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_TXIE); +} + +/** + * @brief Check if the TXIS Interrupt is enabled or disabled. + * @rmtoll CR1 TXIE LL_I2C_IsEnabledIT_TX + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TX(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_TXIE) == (I2C_CR1_TXIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable RXNE interrupt. + * @rmtoll CR1 RXIE LL_I2C_EnableIT_RX + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableIT_RX(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_RXIE); +} + +/** + * @brief Disable RXNE interrupt. + * @rmtoll CR1 RXIE LL_I2C_DisableIT_RX + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableIT_RX(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_RXIE); +} + +/** + * @brief Check if the RXNE Interrupt is enabled or disabled. + * @rmtoll CR1 RXIE LL_I2C_IsEnabledIT_RX + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_RX(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_RXIE) == (I2C_CR1_RXIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Address match interrupt (slave mode only). + * @rmtoll CR1 ADDRIE LL_I2C_EnableIT_ADDR + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableIT_ADDR(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_ADDRIE); +} + +/** + * @brief Disable Address match interrupt (slave mode only). + * @rmtoll CR1 ADDRIE LL_I2C_DisableIT_ADDR + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableIT_ADDR(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_ADDRIE); +} + +/** + * @brief Check if Address match interrupt is enabled or disabled. + * @rmtoll CR1 ADDRIE LL_I2C_IsEnabledIT_ADDR + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ADDR(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_ADDRIE) == (I2C_CR1_ADDRIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Not acknowledge received interrupt. + * @rmtoll CR1 NACKIE LL_I2C_EnableIT_NACK + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableIT_NACK(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_NACKIE); +} + +/** + * @brief Disable Not acknowledge received interrupt. + * @rmtoll CR1 NACKIE LL_I2C_DisableIT_NACK + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableIT_NACK(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_NACKIE); +} + +/** + * @brief Check if Not acknowledge received interrupt is enabled or disabled. + * @rmtoll CR1 NACKIE LL_I2C_IsEnabledIT_NACK + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_NACK(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_NACKIE) == (I2C_CR1_NACKIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable STOP detection interrupt. + * @rmtoll CR1 STOPIE LL_I2C_EnableIT_STOP + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableIT_STOP(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_STOPIE); +} + +/** + * @brief Disable STOP detection interrupt. + * @rmtoll CR1 STOPIE LL_I2C_DisableIT_STOP + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableIT_STOP(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_STOPIE); +} + +/** + * @brief Check if STOP detection interrupt is enabled or disabled. + * @rmtoll CR1 STOPIE LL_I2C_IsEnabledIT_STOP + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_STOP(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_STOPIE) == (I2C_CR1_STOPIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Transfer Complete interrupt. + * @note Any of these events will generate interrupt : + * Transfer Complete (TC) + * Transfer Complete Reload (TCR) + * @rmtoll CR1 TCIE LL_I2C_EnableIT_TC + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableIT_TC(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_TCIE); +} + +/** + * @brief Disable Transfer Complete interrupt. + * @note Any of these events will generate interrupt : + * Transfer Complete (TC) + * Transfer Complete Reload (TCR) + * @rmtoll CR1 TCIE LL_I2C_DisableIT_TC + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableIT_TC(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_TCIE); +} + +/** + * @brief Check if Transfer Complete interrupt is enabled or disabled. + * @rmtoll CR1 TCIE LL_I2C_IsEnabledIT_TC + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_TC(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_TCIE) == (I2C_CR1_TCIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Error interrupts. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note Any of these errors will generate interrupt : + * Arbitration Loss (ARLO) + * Bus Error detection (BERR) + * Overrun/Underrun (OVR) + * SMBus Timeout detection (TIMEOUT) + * SMBus PEC error detection (PECERR) + * SMBus Alert pin event detection (ALERT) + * @rmtoll CR1 ERRIE LL_I2C_EnableIT_ERR + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableIT_ERR(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR1, I2C_CR1_ERRIE); +} + +/** + * @brief Disable Error interrupts. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note Any of these errors will generate interrupt : + * Arbitration Loss (ARLO) + * Bus Error detection (BERR) + * Overrun/Underrun (OVR) + * SMBus Timeout detection (TIMEOUT) + * SMBus PEC error detection (PECERR) + * SMBus Alert pin event detection (ALERT) + * @rmtoll CR1 ERRIE LL_I2C_DisableIT_ERR + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableIT_ERR(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR1, I2C_CR1_ERRIE); +} + +/** + * @brief Check if Error interrupts are enabled or disabled. + * @rmtoll CR1 ERRIE LL_I2C_IsEnabledIT_ERR + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledIT_ERR(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR1, I2C_CR1_ERRIE) == (I2C_CR1_ERRIE)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup I2C_LL_EF_FLAG_management FLAG_management + * @{ + */ + +/** + * @brief Indicate the status of Transmit data register empty flag. + * @note RESET: When next data is written in Transmit data register. + * SET: When Transmit data register is empty. + * @rmtoll ISR TXE LL_I2C_IsActiveFlag_TXE + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXE(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXE) == (I2C_ISR_TXE)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Transmit interrupt flag. + * @note RESET: When next data is written in Transmit data register. + * SET: When Transmit data register is empty. + * @rmtoll ISR TXIS LL_I2C_IsActiveFlag_TXIS + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TXIS(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_TXIS) == (I2C_ISR_TXIS)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Receive data register not empty flag. + * @note RESET: When Receive data register is read. + * SET: When the received data is copied in Receive data register. + * @rmtoll ISR RXNE LL_I2C_IsActiveFlag_RXNE + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_RXNE(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_RXNE) == (I2C_ISR_RXNE)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Address matched flag (slave mode). + * @note RESET: Clear default value. + * SET: When the received slave address matched with one of the enabled slave address. + * @rmtoll ISR ADDR LL_I2C_IsActiveFlag_ADDR + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) == (I2C_ISR_ADDR)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Not Acknowledge received flag. + * @note RESET: Clear default value. + * SET: When a NACK is received after a byte transmission. + * @rmtoll ISR NACKF LL_I2C_IsActiveFlag_NACK + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_NACK(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_NACKF) == (I2C_ISR_NACKF)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Stop detection flag. + * @note RESET: Clear default value. + * SET: When a Stop condition is detected. + * @rmtoll ISR STOPF LL_I2C_IsActiveFlag_STOP + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_STOP(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_STOPF) == (I2C_ISR_STOPF)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Transfer complete flag (master mode). + * @note RESET: Clear default value. + * SET: When RELOAD=0, AUTOEND=0 and NBYTES date have been transferred. + * @rmtoll ISR TC LL_I2C_IsActiveFlag_TC + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TC(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_TC) == (I2C_ISR_TC)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Transfer complete flag (master mode). + * @note RESET: Clear default value. + * SET: When RELOAD=1 and NBYTES date have been transferred. + * @rmtoll ISR TCR LL_I2C_IsActiveFlag_TCR + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_TCR(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_TCR) == (I2C_ISR_TCR)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Bus error flag. + * @note RESET: Clear default value. + * SET: When a misplaced Start or Stop condition is detected. + * @rmtoll ISR BERR LL_I2C_IsActiveFlag_BERR + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BERR(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_BERR) == (I2C_ISR_BERR)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Arbitration lost flag. + * @note RESET: Clear default value. + * SET: When arbitration lost. + * @rmtoll ISR ARLO LL_I2C_IsActiveFlag_ARLO + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ARLO(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_ARLO) == (I2C_ISR_ARLO)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Overrun/Underrun flag (slave mode). + * @note RESET: Clear default value. + * SET: When an overrun/underrun error occurs (Clock Stretching Disabled). + * @rmtoll ISR OVR LL_I2C_IsActiveFlag_OVR + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_OVR(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_OVR) == (I2C_ISR_OVR)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of SMBus PEC error flag in reception. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note RESET: Clear default value. + * SET: When the received PEC does not match with the PEC register content. + * @rmtoll ISR PECERR LL_I2C_IsActiveSMBusFlag_PECERR + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_PECERR(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_PECERR) == (I2C_ISR_PECERR)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of SMBus Timeout detection flag. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note RESET: Clear default value. + * SET: When a timeout or extended clock timeout occurs. + * @rmtoll ISR TIMEOUT LL_I2C_IsActiveSMBusFlag_TIMEOUT + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_TIMEOUT(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_TIMEOUT) == (I2C_ISR_TIMEOUT)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of SMBus alert flag. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note RESET: Clear default value. + * SET: When SMBus host configuration, SMBus alert enabled and + * a falling edge event occurs on SMBA pin. + * @rmtoll ISR ALERT LL_I2C_IsActiveSMBusFlag_ALERT + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveSMBusFlag_ALERT(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_ALERT) == (I2C_ISR_ALERT)) ? 1UL : 0UL); +} + +/** + * @brief Indicate the status of Bus Busy flag. + * @note RESET: Clear default value. + * SET: When a Start condition is detected. + * @rmtoll ISR BUSY LL_I2C_IsActiveFlag_BUSY + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_BUSY(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->ISR, I2C_ISR_BUSY) == (I2C_ISR_BUSY)) ? 1UL : 0UL); +} + +/** + * @brief Clear Address Matched flag. + * @rmtoll ICR ADDRCF LL_I2C_ClearFlag_ADDR + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearFlag_ADDR(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_ADDRCF); +} + +/** + * @brief Clear Not Acknowledge flag. + * @rmtoll ICR NACKCF LL_I2C_ClearFlag_NACK + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearFlag_NACK(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_NACKCF); +} + +/** + * @brief Clear Stop detection flag. + * @rmtoll ICR STOPCF LL_I2C_ClearFlag_STOP + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearFlag_STOP(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_STOPCF); +} + +/** + * @brief Clear Transmit data register empty flag (TXE). + * @note This bit can be clear by software in order to flush the transmit data register (TXDR). + * @rmtoll ISR TXE LL_I2C_ClearFlag_TXE + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearFlag_TXE(I2C_TypeDef *I2Cx) +{ + WRITE_REG(I2Cx->ISR, I2C_ISR_TXE); +} + +/** + * @brief Clear Bus error flag. + * @rmtoll ICR BERRCF LL_I2C_ClearFlag_BERR + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearFlag_BERR(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_BERRCF); +} + +/** + * @brief Clear Arbitration lost flag. + * @rmtoll ICR ARLOCF LL_I2C_ClearFlag_ARLO + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearFlag_ARLO(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_ARLOCF); +} + +/** + * @brief Clear Overrun/Underrun flag. + * @rmtoll ICR OVRCF LL_I2C_ClearFlag_OVR + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearFlag_OVR(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_OVRCF); +} + +/** + * @brief Clear SMBus PEC error flag. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll ICR PECCF LL_I2C_ClearSMBusFlag_PECERR + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearSMBusFlag_PECERR(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_PECCF); +} + +/** + * @brief Clear SMBus Timeout detection flag. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll ICR TIMOUTCF LL_I2C_ClearSMBusFlag_TIMEOUT + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearSMBusFlag_TIMEOUT(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_TIMOUTCF); +} + +/** + * @brief Clear SMBus Alert flag. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll ICR ALERTCF LL_I2C_ClearSMBusFlag_ALERT + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_ClearSMBusFlag_ALERT(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->ICR, I2C_ICR_ALERTCF); +} + +/** + * @} + */ + +/** @defgroup I2C_LL_EF_Data_Management Data_Management + * @{ + */ + +/** + * @brief Enable automatic STOP condition generation (master mode). + * @note Automatic end mode : a STOP condition is automatically sent when NBYTES data are transferred. + * This bit has no effect in slave mode or when RELOAD bit is set. + * @rmtoll CR2 AUTOEND LL_I2C_EnableAutoEndMode + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableAutoEndMode(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR2, I2C_CR2_AUTOEND); +} + +/** + * @brief Disable automatic STOP condition generation (master mode). + * @note Software end mode : TC flag is set when NBYTES data are transferre, stretching SCL low. + * @rmtoll CR2 AUTOEND LL_I2C_DisableAutoEndMode + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableAutoEndMode(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR2, I2C_CR2_AUTOEND); +} + +/** + * @brief Check if automatic STOP condition is enabled or disabled. + * @rmtoll CR2 AUTOEND LL_I2C_IsEnabledAutoEndMode + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledAutoEndMode(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR2, I2C_CR2_AUTOEND) == (I2C_CR2_AUTOEND)) ? 1UL : 0UL); +} + +/** + * @brief Enable reload mode (master mode). + * @note The transfer is not completed after the NBYTES data transfer, NBYTES will be reloaded when TCR flag is set. + * @rmtoll CR2 RELOAD LL_I2C_EnableReloadMode + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableReloadMode(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR2, I2C_CR2_RELOAD); +} + +/** + * @brief Disable reload mode (master mode). + * @note The transfer is completed after the NBYTES data transfer(STOP or RESTART will follow). + * @rmtoll CR2 RELOAD LL_I2C_DisableReloadMode + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableReloadMode(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR2, I2C_CR2_RELOAD); +} + +/** + * @brief Check if reload mode is enabled or disabled. + * @rmtoll CR2 RELOAD LL_I2C_IsEnabledReloadMode + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledReloadMode(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR2, I2C_CR2_RELOAD) == (I2C_CR2_RELOAD)) ? 1UL : 0UL); +} + +/** + * @brief Configure the number of bytes for transfer. + * @note Changing these bits when START bit is set is not allowed. + * @rmtoll CR2 NBYTES LL_I2C_SetTransferSize + * @param I2Cx I2C Instance. + * @param TransferSize This parameter must be a value between Min_Data=0x00 and Max_Data=0xFF. + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetTransferSize(I2C_TypeDef *I2Cx, uint32_t TransferSize) +{ + MODIFY_REG(I2Cx->CR2, I2C_CR2_NBYTES, TransferSize << I2C_CR2_NBYTES_Pos); +} + +/** + * @brief Get the number of bytes configured for transfer. + * @rmtoll CR2 NBYTES LL_I2C_GetTransferSize + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x0 and Max_Data=0xFF + */ +__STATIC_INLINE uint32_t LL_I2C_GetTransferSize(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_NBYTES) >> I2C_CR2_NBYTES_Pos); +} + +/** + * @brief Prepare the generation of a ACKnowledge or Non ACKnowledge condition after the address receive match code + or next received byte. + * @note Usage in Slave mode only. + * @rmtoll CR2 NACK LL_I2C_AcknowledgeNextData + * @param I2Cx I2C Instance. + * @param TypeAcknowledge This parameter can be one of the following values: + * @arg @ref LL_I2C_ACK + * @arg @ref LL_I2C_NACK + * @retval None + */ +__STATIC_INLINE void LL_I2C_AcknowledgeNextData(I2C_TypeDef *I2Cx, uint32_t TypeAcknowledge) +{ + MODIFY_REG(I2Cx->CR2, I2C_CR2_NACK, TypeAcknowledge); +} + +/** + * @brief Generate a START or RESTART condition + * @note The START bit can be set even if bus is BUSY or I2C is in slave mode. + * This action has no effect when RELOAD is set. + * @rmtoll CR2 START LL_I2C_GenerateStartCondition + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_GenerateStartCondition(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR2, I2C_CR2_START); +} + +/** + * @brief Generate a STOP condition after the current byte transfer (master mode). + * @rmtoll CR2 STOP LL_I2C_GenerateStopCondition + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_GenerateStopCondition(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR2, I2C_CR2_STOP); +} + +/** + * @brief Enable automatic RESTART Read request condition for 10bit address header (master mode). + * @note The master sends the complete 10bit slave address read sequence : + * Start + 2 bytes 10bit address in Write direction + Restart + first 7 bits of 10bit address + in Read direction. + * @rmtoll CR2 HEAD10R LL_I2C_EnableAuto10BitRead + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableAuto10BitRead(I2C_TypeDef *I2Cx) +{ + CLEAR_BIT(I2Cx->CR2, I2C_CR2_HEAD10R); +} + +/** + * @brief Disable automatic RESTART Read request condition for 10bit address header (master mode). + * @note The master only sends the first 7 bits of 10bit address in Read direction. + * @rmtoll CR2 HEAD10R LL_I2C_DisableAuto10BitRead + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_DisableAuto10BitRead(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR2, I2C_CR2_HEAD10R); +} + +/** + * @brief Check if automatic RESTART Read request condition for 10bit address header is enabled or disabled. + * @rmtoll CR2 HEAD10R LL_I2C_IsEnabledAuto10BitRead + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledAuto10BitRead(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR2, I2C_CR2_HEAD10R) != (I2C_CR2_HEAD10R)) ? 1UL : 0UL); +} + +/** + * @brief Configure the transfer direction (master mode). + * @note Changing these bits when START bit is set is not allowed. + * @rmtoll CR2 RD_WRN LL_I2C_SetTransferRequest + * @param I2Cx I2C Instance. + * @param TransferRequest This parameter can be one of the following values: + * @arg @ref LL_I2C_REQUEST_WRITE + * @arg @ref LL_I2C_REQUEST_READ + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetTransferRequest(I2C_TypeDef *I2Cx, uint32_t TransferRequest) +{ + MODIFY_REG(I2Cx->CR2, I2C_CR2_RD_WRN, TransferRequest); +} + +/** + * @brief Get the transfer direction requested (master mode). + * @rmtoll CR2 RD_WRN LL_I2C_GetTransferRequest + * @param I2Cx I2C Instance. + * @retval Returned value can be one of the following values: + * @arg @ref LL_I2C_REQUEST_WRITE + * @arg @ref LL_I2C_REQUEST_READ + */ +__STATIC_INLINE uint32_t LL_I2C_GetTransferRequest(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_RD_WRN)); +} + +/** + * @brief Configure the slave address for transfer (master mode). + * @note Changing these bits when START bit is set is not allowed. + * @rmtoll CR2 SADD LL_I2C_SetSlaveAddr + * @param I2Cx I2C Instance. + * @param SlaveAddr This parameter must be a value between Min_Data=0x00 and Max_Data=0x3F. + * @retval None + */ +__STATIC_INLINE void LL_I2C_SetSlaveAddr(I2C_TypeDef *I2Cx, uint32_t SlaveAddr) +{ + MODIFY_REG(I2Cx->CR2, I2C_CR2_SADD, SlaveAddr); +} + +/** + * @brief Get the slave address programmed for transfer. + * @rmtoll CR2 SADD LL_I2C_GetSlaveAddr + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x0 and Max_Data=0x3F + */ +__STATIC_INLINE uint32_t LL_I2C_GetSlaveAddr(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->CR2, I2C_CR2_SADD)); +} + +/** + * @brief Handles I2Cx communication when starting transfer or during transfer (TC or TCR flag are set). + * @rmtoll CR2 SADD LL_I2C_HandleTransfer\n + * CR2 ADD10 LL_I2C_HandleTransfer\n + * CR2 RD_WRN LL_I2C_HandleTransfer\n + * CR2 START LL_I2C_HandleTransfer\n + * CR2 STOP LL_I2C_HandleTransfer\n + * CR2 RELOAD LL_I2C_HandleTransfer\n + * CR2 NBYTES LL_I2C_HandleTransfer\n + * CR2 AUTOEND LL_I2C_HandleTransfer\n + * CR2 HEAD10R LL_I2C_HandleTransfer + * @param I2Cx I2C Instance. + * @param SlaveAddr Specifies the slave address to be programmed. + * @param SlaveAddrSize This parameter can be one of the following values: + * @arg @ref LL_I2C_ADDRSLAVE_7BIT + * @arg @ref LL_I2C_ADDRSLAVE_10BIT + * @param TransferSize Specifies the number of bytes to be programmed. + * This parameter must be a value between Min_Data=0 and Max_Data=255. + * @param EndMode This parameter can be one of the following values: + * @arg @ref LL_I2C_MODE_RELOAD + * @arg @ref LL_I2C_MODE_AUTOEND + * @arg @ref LL_I2C_MODE_SOFTEND + * @arg @ref LL_I2C_MODE_SMBUS_RELOAD + * @arg @ref LL_I2C_MODE_SMBUS_AUTOEND_NO_PEC + * @arg @ref LL_I2C_MODE_SMBUS_SOFTEND_NO_PEC + * @arg @ref LL_I2C_MODE_SMBUS_AUTOEND_WITH_PEC + * @arg @ref LL_I2C_MODE_SMBUS_SOFTEND_WITH_PEC + * @param Request This parameter can be one of the following values: + * @arg @ref LL_I2C_GENERATE_NOSTARTSTOP + * @arg @ref LL_I2C_GENERATE_STOP + * @arg @ref LL_I2C_GENERATE_START_READ + * @arg @ref LL_I2C_GENERATE_START_WRITE + * @arg @ref LL_I2C_GENERATE_RESTART_7BIT_READ + * @arg @ref LL_I2C_GENERATE_RESTART_7BIT_WRITE + * @arg @ref LL_I2C_GENERATE_RESTART_10BIT_READ + * @arg @ref LL_I2C_GENERATE_RESTART_10BIT_WRITE + * @retval None + */ +__STATIC_INLINE void LL_I2C_HandleTransfer(I2C_TypeDef *I2Cx, uint32_t SlaveAddr, uint32_t SlaveAddrSize, + uint32_t TransferSize, uint32_t EndMode, uint32_t Request) +{ + /* Declaration of tmp to prevent undefined behavior of volatile usage */ + uint32_t tmp = ((uint32_t)(((uint32_t)SlaveAddr & I2C_CR2_SADD) | \ + ((uint32_t)SlaveAddrSize & I2C_CR2_ADD10) | \ + (((uint32_t)TransferSize << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | \ + (uint32_t)EndMode | (uint32_t)Request) & (~0x80000000U)); + + /* update CR2 register */ + MODIFY_REG(I2Cx->CR2, I2C_CR2_SADD | I2C_CR2_ADD10 | + (I2C_CR2_RD_WRN & (uint32_t)(Request >> (31U - I2C_CR2_RD_WRN_Pos))) | + I2C_CR2_START | I2C_CR2_STOP | I2C_CR2_RELOAD | + I2C_CR2_NBYTES | I2C_CR2_AUTOEND | I2C_CR2_HEAD10R, + tmp); +} + +/** + * @brief Indicate the value of transfer direction (slave mode). + * @note RESET: Write transfer, Slave enters in receiver mode. + * SET: Read transfer, Slave enters in transmitter mode. + * @rmtoll ISR DIR LL_I2C_GetTransferDirection + * @param I2Cx I2C Instance. + * @retval Returned value can be one of the following values: + * @arg @ref LL_I2C_DIRECTION_WRITE + * @arg @ref LL_I2C_DIRECTION_READ + */ +__STATIC_INLINE uint32_t LL_I2C_GetTransferDirection(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_DIR)); +} + +/** + * @brief Return the slave matched address. + * @rmtoll ISR ADDCODE LL_I2C_GetAddressMatchCode + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x00 and Max_Data=0x3F + */ +__STATIC_INLINE uint32_t LL_I2C_GetAddressMatchCode(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->ISR, I2C_ISR_ADDCODE) >> I2C_ISR_ADDCODE_Pos << 1); +} + +/** + * @brief Enable internal comparison of the SMBus Packet Error byte (transmission or reception mode). + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @note This feature is cleared by hardware when the PEC byte is transferred, or when a STOP condition + or an Address Matched is received. + * This bit has no effect when RELOAD bit is set. + * This bit has no effect in device mode when SBC bit is not set. + * @rmtoll CR2 PECBYTE LL_I2C_EnableSMBusPECCompare + * @param I2Cx I2C Instance. + * @retval None + */ +__STATIC_INLINE void LL_I2C_EnableSMBusPECCompare(I2C_TypeDef *I2Cx) +{ + SET_BIT(I2Cx->CR2, I2C_CR2_PECBYTE); +} + +/** + * @brief Check if the SMBus Packet Error byte internal comparison is requested or not. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll CR2 PECBYTE LL_I2C_IsEnabledSMBusPECCompare + * @param I2Cx I2C Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_I2C_IsEnabledSMBusPECCompare(const I2C_TypeDef *I2Cx) +{ + return ((READ_BIT(I2Cx->CR2, I2C_CR2_PECBYTE) == (I2C_CR2_PECBYTE)) ? 1UL : 0UL); +} + +/** + * @brief Get the SMBus Packet Error byte calculated. + * @note The macro IS_SMBUS_ALL_INSTANCE(I2Cx) can be used to check whether or not + * SMBus feature is supported by the I2Cx Instance. + * @rmtoll PECR PEC LL_I2C_GetSMBusPEC + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x00 and Max_Data=0xFF + */ +__STATIC_INLINE uint32_t LL_I2C_GetSMBusPEC(const I2C_TypeDef *I2Cx) +{ + return (uint32_t)(READ_BIT(I2Cx->PECR, I2C_PECR_PEC)); +} + +/** + * @brief Read Receive Data register. + * @rmtoll RXDR RXDATA LL_I2C_ReceiveData8 + * @param I2Cx I2C Instance. + * @retval Value between Min_Data=0x00 and Max_Data=0xFF + */ +__STATIC_INLINE uint8_t LL_I2C_ReceiveData8(const I2C_TypeDef *I2Cx) +{ + return (uint8_t)(READ_BIT(I2Cx->RXDR, I2C_RXDR_RXDATA)); +} + +/** + * @brief Write in Transmit Data Register . + * @rmtoll TXDR TXDATA LL_I2C_TransmitData8 + * @param I2Cx I2C Instance. + * @param Data Value between Min_Data=0x00 and Max_Data=0xFF + * @retval None + */ +__STATIC_INLINE void LL_I2C_TransmitData8(I2C_TypeDef *I2Cx, uint8_t Data) +{ + WRITE_REG(I2Cx->TXDR, Data); +} + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup I2C_LL_EF_Init Initialization and de-initialization functions + * @{ + */ + +ErrorStatus LL_I2C_Init(I2C_TypeDef *I2Cx, const LL_I2C_InitTypeDef *I2C_InitStruct); +ErrorStatus LL_I2C_DeInit(const I2C_TypeDef *I2Cx); +void LL_I2C_StructInit(LL_I2C_InitTypeDef *I2C_InitStruct); + + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* I2C1 || I2C3 */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_I2C_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h new file mode 100644 index 0000000..474dd72 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_ipcc.h @@ -0,0 +1,732 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_ipcc.h + * @author MCD Application Team + * @brief Header file of IPCC LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_IPCC_H +#define STM32WBxx_LL_IPCC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined(IPCC) + +/** @defgroup IPCC_LL IPCC + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup IPCC_LL_Exported_Constants IPCC Exported Constants + * @{ + */ + +/** @defgroup IPCC_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_IPCC_ReadReg function + * @{ + */ +#define LL_IPCC_C1TOC2SR_CH1F IPCC_C1TOC2SR_CH1F_Msk /*!< C1 transmit to C2 receive Channel1 status flag before masking */ +#define LL_IPCC_C1TOC2SR_CH2F IPCC_C1TOC2SR_CH2F_Msk /*!< C1 transmit to C2 receive Channel2 status flag before masking */ +#define LL_IPCC_C1TOC2SR_CH3F IPCC_C1TOC2SR_CH3F_Msk /*!< C1 transmit to C2 receive Channel3 status flag before masking */ +#define LL_IPCC_C1TOC2SR_CH4F IPCC_C1TOC2SR_CH4F_Msk /*!< C1 transmit to C2 receive Channel4 status flag before masking */ +#define LL_IPCC_C1TOC2SR_CH5F IPCC_C1TOC2SR_CH5F_Msk /*!< C1 transmit to C2 receive Channel5 status flag before masking */ +#define LL_IPCC_C1TOC2SR_CH6F IPCC_C1TOC2SR_CH6F_Msk /*!< C1 transmit to C2 receive Channel6 status flag before masking */ +#define LL_IPCC_C2TOC1SR_CH1F IPCC_C2TOC1SR_CH1F_Msk /*!< C2 transmit to C1 receive Channel1 status flag before masking */ +#define LL_IPCC_C2TOC1SR_CH2F IPCC_C2TOC1SR_CH2F_Msk /*!< C2 transmit to C1 receive Channel2 status flag before masking */ +#define LL_IPCC_C2TOC1SR_CH3F IPCC_C2TOC1SR_CH3F_Msk /*!< C2 transmit to C1 receive Channel3 status flag before masking */ +#define LL_IPCC_C2TOC1SR_CH4F IPCC_C2TOC1SR_CH4F_Msk /*!< C2 transmit to C1 receive Channel4 status flag before masking */ +#define LL_IPCC_C2TOC1SR_CH5F IPCC_C2TOC1SR_CH5F_Msk /*!< C2 transmit to C1 receive Channel5 status flag before masking */ +#define LL_IPCC_C2TOC1SR_CH6F IPCC_C2TOC1SR_CH6F_Msk /*!< C2 transmit to C1 receive Channel6 status flag before masking */ + +/** + * @} + */ + +/** @defgroup IPCC_LL_EC_Channel Channel + * @{ + */ +#define LL_IPCC_CHANNEL_1 (0x00000001U) /*!< IPCC Channel 1 */ +#define LL_IPCC_CHANNEL_2 (0x00000002U) /*!< IPCC Channel 2 */ +#define LL_IPCC_CHANNEL_3 (0x00000004U) /*!< IPCC Channel 3 */ +#define LL_IPCC_CHANNEL_4 (0x00000008U) /*!< IPCC Channel 4 */ +#define LL_IPCC_CHANNEL_5 (0x00000010U) /*!< IPCC Channel 5 */ +#define LL_IPCC_CHANNEL_6 (0x00000020U) /*!< IPCC Channel 6 */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup IPCC_LL_Exported_Macros IPCC Exported Macros + * @{ + */ + +/** @defgroup IPCC_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in IPCC register + * @param __INSTANCE__ IPCC Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_IPCC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in IPCC register + * @param __INSTANCE__ IPCC Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_IPCC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** + * @} + */ + + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup IPCC_LL_Exported_Functions IPCC Exported Functions + * @{ + */ + +/** @defgroup IPCC_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable Transmit channel free interrupt for processor 1. + * @rmtoll C1CR TXFIE LL_C1_IPCC_EnableIT_TXF + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_EnableIT_TXF(IPCC_TypeDef *IPCCx) +{ + SET_BIT(IPCCx->C1CR, IPCC_C1CR_TXFIE); +} + +/** + * @brief Disable Transmit channel free interrupt for processor 1. + * @rmtoll C1CR TXFIE LL_C1_IPCC_DisableIT_TXF + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_DisableIT_TXF(IPCC_TypeDef *IPCCx) +{ + CLEAR_BIT(IPCCx->C1CR, IPCC_C1CR_TXFIE); +} + +/** + * @brief Check if Transmit channel free interrupt for processor 1 is enabled. + * @rmtoll C1CR TXFIE LL_C1_IPCC_IsEnabledIT_TXF + * @param IPCCx IPCC Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C1_IPCC_IsEnabledIT_TXF(IPCC_TypeDef const *const IPCCx) +{ + return ((READ_BIT(IPCCx->C1CR, IPCC_C1CR_TXFIE) == (IPCC_C1CR_TXFIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Receive channel occupied interrupt for processor 1. + * @rmtoll C1CR RXOIE LL_C1_IPCC_EnableIT_RXO + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_EnableIT_RXO(IPCC_TypeDef *IPCCx) +{ + SET_BIT(IPCCx->C1CR, IPCC_C1CR_RXOIE); +} + +/** + * @brief Disable Receive channel occupied interrupt for processor 1. + * @rmtoll C1CR RXOIE LL_C1_IPCC_DisableIT_RXO + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_DisableIT_RXO(IPCC_TypeDef *IPCCx) +{ + CLEAR_BIT(IPCCx->C1CR, IPCC_C1CR_RXOIE); +} + +/** + * @brief Check if Receive channel occupied interrupt for processor 1 is enabled. + * @rmtoll C1CR RXOIE LL_C1_IPCC_IsEnabledIT_RXO + * @param IPCCx IPCC Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C1_IPCC_IsEnabledIT_RXO(IPCC_TypeDef const *const IPCCx) +{ + return ((READ_BIT(IPCCx->C1CR, IPCC_C1CR_RXOIE) == (IPCC_C1CR_RXOIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Transmit channel free interrupt for processor 2. + * @rmtoll C2CR TXFIE LL_C2_IPCC_EnableIT_TXF + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_EnableIT_TXF(IPCC_TypeDef *IPCCx) +{ + SET_BIT(IPCCx->C2CR, IPCC_C2CR_TXFIE); +} + +/** + * @brief Disable Transmit channel free interrupt for processor 2. + * @rmtoll C2CR TXFIE LL_C2_IPCC_DisableIT_TXF + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_DisableIT_TXF(IPCC_TypeDef *IPCCx) +{ + CLEAR_BIT(IPCCx->C2CR, IPCC_C2CR_TXFIE); +} + +/** + * @brief Check if Transmit channel free interrupt for processor 2 is enabled. + * @rmtoll C2CR TXFIE LL_C2_IPCC_IsEnabledIT_TXF + * @param IPCCx IPCC Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_IPCC_IsEnabledIT_TXF(IPCC_TypeDef const *const IPCCx) +{ + return ((READ_BIT(IPCCx->C2CR, IPCC_C2CR_TXFIE) == (IPCC_C2CR_TXFIE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Receive channel occupied interrupt for processor 2. + * @rmtoll C2CR RXOIE LL_C2_IPCC_EnableIT_RXO + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_EnableIT_RXO(IPCC_TypeDef *IPCCx) +{ + SET_BIT(IPCCx->C2CR, IPCC_C2CR_RXOIE); +} + +/** + * @brief Disable Receive channel occupied interrupt for processor 2. + * @rmtoll C2CR RXOIE LL_C2_IPCC_DisableIT_RXO + * @param IPCCx IPCC Instance. + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_DisableIT_RXO(IPCC_TypeDef *IPCCx) +{ + CLEAR_BIT(IPCCx->C2CR, IPCC_C2CR_RXOIE); +} + +/** + * @brief Check if Receive channel occupied interrupt for processor 2 is enabled. + * @rmtoll C2CR RXOIE LL_C2_IPCC_IsEnabledIT_RXO + * @param IPCCx IPCC Instance. + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_IPCC_IsEnabledIT_RXO(IPCC_TypeDef const *const IPCCx) +{ + return ((READ_BIT(IPCCx->C2CR, IPCC_C2CR_RXOIE) == (IPCC_C2CR_RXOIE)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup IPCC_LL_EF_Configuration Configuration + * @{ + */ + +/** + * @brief Unmask transmit channel free interrupt for processor 1. + * @rmtoll C1MR CH1FM LL_C1_IPCC_EnableTransmitChannel\n + * C1MR CH2FM LL_C1_IPCC_EnableTransmitChannel\n + * C1MR CH3FM LL_C1_IPCC_EnableTransmitChannel\n + * C1MR CH4FM LL_C1_IPCC_EnableTransmitChannel\n + * C1MR CH5FM LL_C1_IPCC_EnableTransmitChannel\n + * C1MR CH6FM LL_C1_IPCC_EnableTransmitChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_EnableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + CLEAR_BIT(IPCCx->C1MR, Channel << IPCC_C1MR_CH1FM_Pos); +} + +/** + * @brief Mask transmit channel free interrupt for processor 1. + * @rmtoll C1MR CH1FM LL_C1_IPCC_DisableTransmitChannel\n + * C1MR CH2FM LL_C1_IPCC_DisableTransmitChannel\n + * C1MR CH3FM LL_C1_IPCC_DisableTransmitChannel\n + * C1MR CH4FM LL_C1_IPCC_DisableTransmitChannel\n + * C1MR CH5FM LL_C1_IPCC_DisableTransmitChannel\n + * C1MR CH6FM LL_C1_IPCC_DisableTransmitChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_DisableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + SET_BIT(IPCCx->C1MR, Channel << IPCC_C1MR_CH1FM_Pos); +} + +/** + * @brief Check if Transmit channel free interrupt for processor 1 is masked. + * @rmtoll C1MR CH1FM LL_C1_IPCC_IsEnabledTransmitChannel\n + * C1MR CH2FM LL_C1_IPCC_IsEnabledTransmitChannel\n + * C1MR CH3FM LL_C1_IPCC_IsEnabledTransmitChannel\n + * C1MR CH4FM LL_C1_IPCC_IsEnabledTransmitChannel\n + * C1MR CH5FM LL_C1_IPCC_IsEnabledTransmitChannel\n + * C1MR CH6FM LL_C1_IPCC_IsEnabledTransmitChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C1_IPCC_IsEnabledTransmitChannel(IPCC_TypeDef const *const IPCCx, uint32_t Channel) +{ + return ((READ_BIT(IPCCx->C1MR, Channel << IPCC_C1MR_CH1FM_Pos) != (Channel << IPCC_C1MR_CH1FM_Pos)) ? 1UL : 0UL); +} + +/** + * @brief Unmask receive channel occupied interrupt for processor 1. + * @rmtoll C1MR CH1OM LL_C1_IPCC_EnableReceiveChannel\n + * C1MR CH2OM LL_C1_IPCC_EnableReceiveChannel\n + * C1MR CH3OM LL_C1_IPCC_EnableReceiveChannel\n + * C1MR CH4OM LL_C1_IPCC_EnableReceiveChannel\n + * C1MR CH5OM LL_C1_IPCC_EnableReceiveChannel\n + * C1MR CH6OM LL_C1_IPCC_EnableReceiveChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_EnableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + CLEAR_BIT(IPCCx->C1MR, Channel); +} + +/** + * @brief Mask receive channel occupied interrupt for processor 1. + * @rmtoll C1MR CH1OM LL_C1_IPCC_DisableReceiveChannel\n + * C1MR CH2OM LL_C1_IPCC_DisableReceiveChannel\n + * C1MR CH3OM LL_C1_IPCC_DisableReceiveChannel\n + * C1MR CH4OM LL_C1_IPCC_DisableReceiveChannel\n + * C1MR CH5OM LL_C1_IPCC_DisableReceiveChannel\n + * C1MR CH6OM LL_C1_IPCC_DisableReceiveChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_DisableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + SET_BIT(IPCCx->C1MR, Channel); +} + +/** + * @brief Check if Receive channel occupied interrupt for processor 1 is masked. + * @rmtoll C1MR CH1OM LL_C1_IPCC_IsEnabledReceiveChannel\n + * C1MR CH2OM LL_C1_IPCC_IsEnabledReceiveChannel\n + * C1MR CH3OM LL_C1_IPCC_IsEnabledReceiveChannel\n + * C1MR CH4OM LL_C1_IPCC_IsEnabledReceiveChannel\n + * C1MR CH5OM LL_C1_IPCC_IsEnabledReceiveChannel\n + * C1MR CH6OM LL_C1_IPCC_IsEnabledReceiveChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C1_IPCC_IsEnabledReceiveChannel(IPCC_TypeDef const *const IPCCx, uint32_t Channel) +{ + return ((READ_BIT(IPCCx->C1MR, Channel) != (Channel)) ? 1UL : 0UL); +} + +/** + * @brief Unmask transmit channel free interrupt for processor 2. + * @rmtoll C2MR CH1FM LL_C2_IPCC_EnableTransmitChannel\n + * C2MR CH2FM LL_C2_IPCC_EnableTransmitChannel\n + * C2MR CH3FM LL_C2_IPCC_EnableTransmitChannel\n + * C2MR CH4FM LL_C2_IPCC_EnableTransmitChannel\n + * C2MR CH5FM LL_C2_IPCC_EnableTransmitChannel\n + * C2MR CH6FM LL_C2_IPCC_EnableTransmitChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_EnableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + CLEAR_BIT(IPCCx->C2MR, Channel << IPCC_C2MR_CH1FM_Pos); +} + +/** + * @brief Mask transmit channel free interrupt for processor 2. + * @rmtoll C2MR CH1FM LL_C2_IPCC_DisableTransmitChannel\n + * C2MR CH2FM LL_C2_IPCC_DisableTransmitChannel\n + * C2MR CH3FM LL_C2_IPCC_DisableTransmitChannel\n + * C2MR CH4FM LL_C2_IPCC_DisableTransmitChannel\n + * C2MR CH5FM LL_C2_IPCC_DisableTransmitChannel\n + * C2MR CH6FM LL_C2_IPCC_DisableTransmitChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_DisableTransmitChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + SET_BIT(IPCCx->C2MR, Channel << (IPCC_C2MR_CH1FM_Pos)); +} + +/** + * @brief Check if Transmit channel free interrupt for processor 2 is masked. + * @rmtoll C2MR CH1FM LL_C2_IPCC_IsEnabledTransmitChannel\n + * C2MR CH2FM LL_C2_IPCC_IsEnabledTransmitChannel\n + * C2MR CH3FM LL_C2_IPCC_IsEnabledTransmitChannel\n + * C2MR CH4FM LL_C2_IPCC_IsEnabledTransmitChannel\n + * C2MR CH5FM LL_C2_IPCC_IsEnabledTransmitChannel\n + * C2MR CH6FM LL_C2_IPCC_IsEnabledTransmitChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_IPCC_IsEnabledTransmitChannel(IPCC_TypeDef const *const IPCCx, uint32_t Channel) +{ + return ((READ_BIT(IPCCx->C2MR, Channel << IPCC_C2MR_CH1FM_Pos) != (Channel << IPCC_C2MR_CH1FM_Pos)) ? 1UL : 0UL); +} + +/** + * @brief Unmask receive channel occupied interrupt for processor 2. + * @rmtoll C2MR CH1OM LL_C2_IPCC_EnableReceiveChannel\n + * C2MR CH2OM LL_C2_IPCC_EnableReceiveChannel\n + * C2MR CH3OM LL_C2_IPCC_EnableReceiveChannel\n + * C2MR CH4OM LL_C2_IPCC_EnableReceiveChannel\n + * C2MR CH5OM LL_C2_IPCC_EnableReceiveChannel\n + * C2MR CH6OM LL_C2_IPCC_EnableReceiveChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_EnableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + CLEAR_BIT(IPCCx->C2MR, Channel); +} + +/** + * @brief Mask receive channel occupied interrupt for processor 1. + * @rmtoll C2MR CH1OM LL_C2_IPCC_DisableReceiveChannel\n + * C2MR CH2OM LL_C2_IPCC_DisableReceiveChannel\n + * C2MR CH3OM LL_C2_IPCC_DisableReceiveChannel\n + * C2MR CH4OM LL_C2_IPCC_DisableReceiveChannel\n + * C2MR CH5OM LL_C2_IPCC_DisableReceiveChannel\n + * C2MR CH6OM LL_C2_IPCC_DisableReceiveChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_DisableReceiveChannel(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + SET_BIT(IPCCx->C2MR, Channel); +} + +/** + * @brief Check if Receive channel occupied interrupt for processor 2 is masked. + * @rmtoll C2MR CH1OM LL_C2_IPCC_IsEnabledReceiveChannel\n + * C2MR CH2OM LL_C2_IPCC_IsEnabledReceiveChannel\n + * C2MR CH3OM LL_C2_IPCC_IsEnabledReceiveChannel\n + * C2MR CH4OM LL_C2_IPCC_IsEnabledReceiveChannel\n + * C2MR CH5OM LL_C2_IPCC_IsEnabledReceiveChannel\n + * C2MR CH6OM LL_C2_IPCC_IsEnabledReceiveChannel + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_IPCC_IsEnabledReceiveChannel(IPCC_TypeDef const *const IPCCx, uint32_t Channel) +{ + return ((READ_BIT(IPCCx->C2MR, Channel) != (Channel)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup IPCC_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Clear IPCC receive channel status for processor 1. + * @note Associated with IPCC_C2TOC1SR.CHxF + * @rmtoll C1SCR CH1C LL_C1_IPCC_ClearFlag_CHx\n + * C1SCR CH2C LL_C1_IPCC_ClearFlag_CHx\n + * C1SCR CH3C LL_C1_IPCC_ClearFlag_CHx\n + * C1SCR CH4C LL_C1_IPCC_ClearFlag_CHx\n + * C1SCR CH5C LL_C1_IPCC_ClearFlag_CHx\n + * C1SCR CH6C LL_C1_IPCC_ClearFlag_CHx + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_ClearFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + WRITE_REG(IPCCx->C1SCR, Channel); +} + +/** + * @brief Set IPCC transmit channel status for processor 1. + * @note Associated with IPCC_C1TOC2SR.CHxF + * @rmtoll C1SCR CH1S LL_C1_IPCC_SetFlag_CHx\n + * C1SCR CH2S LL_C1_IPCC_SetFlag_CHx\n + * C1SCR CH3S LL_C1_IPCC_SetFlag_CHx\n + * C1SCR CH4S LL_C1_IPCC_SetFlag_CHx\n + * C1SCR CH5S LL_C1_IPCC_SetFlag_CHx\n + * C1SCR CH6S LL_C1_IPCC_SetFlag_CHx + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C1_IPCC_SetFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + WRITE_REG(IPCCx->C1SCR, Channel << IPCC_C1SCR_CH1S_Pos); +} + +/** + * @brief Get channel status for processor 1. + * @rmtoll C1TOC2SR CH1F LL_C1_IPCC_IsActiveFlag_CHx\n + * C1TOC2SR CH2F LL_C1_IPCC_IsActiveFlag_CHx\n + * C1TOC2SR CH3F LL_C1_IPCC_IsActiveFlag_CHx\n + * C1TOC2SR CH4F LL_C1_IPCC_IsActiveFlag_CHx\n + * C1TOC2SR CH5F LL_C1_IPCC_IsActiveFlag_CHx\n + * C1TOC2SR CH6F LL_C1_IPCC_IsActiveFlag_CHx + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C1_IPCC_IsActiveFlag_CHx(IPCC_TypeDef const *const IPCCx, uint32_t Channel) +{ + return ((READ_BIT(IPCCx->C1TOC2SR, Channel) == (Channel)) ? 1UL : 0UL); +} + +/** + * @brief Clear IPCC receive channel status for processor 2. + * @note Associated with IPCC_C1TOC2SR.CHxF + * @rmtoll C2SCR CH1C LL_C2_IPCC_ClearFlag_CHx\n + * C2SCR CH2C LL_C2_IPCC_ClearFlag_CHx\n + * C2SCR CH3C LL_C2_IPCC_ClearFlag_CHx\n + * C2SCR CH4C LL_C2_IPCC_ClearFlag_CHx\n + * C2SCR CH5C LL_C2_IPCC_ClearFlag_CHx\n + * C2SCR CH6C LL_C2_IPCC_ClearFlag_CHx + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_ClearFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + WRITE_REG(IPCCx->C2SCR, Channel); +} + +/** + * @brief Set IPCC transmit channel status for processor 2. + * @note Associated with IPCC_C2TOC1SR.CHxF + * @rmtoll C2SCR CH1S LL_C2_IPCC_SetFlag_CHx\n + * C2SCR CH2S LL_C2_IPCC_SetFlag_CHx\n + * C2SCR CH3S LL_C2_IPCC_SetFlag_CHx\n + * C2SCR CH4S LL_C2_IPCC_SetFlag_CHx\n + * C2SCR CH5S LL_C2_IPCC_SetFlag_CHx\n + * C2SCR CH6S LL_C2_IPCC_SetFlag_CHx + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be a combination of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval None + */ +__STATIC_INLINE void LL_C2_IPCC_SetFlag_CHx(IPCC_TypeDef *IPCCx, uint32_t Channel) +{ + WRITE_REG(IPCCx->C2SCR, Channel << IPCC_C2SCR_CH1S_Pos); +} + +/** + * @brief Get channel status for processor 2. + * @rmtoll C2TOC1SR CH1F LL_C2_IPCC_IsActiveFlag_CHx\n + * C2TOC1SR CH2F LL_C2_IPCC_IsActiveFlag_CHx\n + * C2TOC1SR CH3F LL_C2_IPCC_IsActiveFlag_CHx\n + * C2TOC1SR CH4F LL_C2_IPCC_IsActiveFlag_CHx\n + * C2TOC1SR CH5F LL_C2_IPCC_IsActiveFlag_CHx\n + * C2TOC1SR CH6F LL_C2_IPCC_IsActiveFlag_CHx + * @param IPCCx IPCC Instance. + * @param Channel This parameter can be one of the following values: + * @arg @ref LL_IPCC_CHANNEL_1 + * @arg @ref LL_IPCC_CHANNEL_2 + * @arg @ref LL_IPCC_CHANNEL_3 + * @arg @ref LL_IPCC_CHANNEL_4 + * @arg @ref LL_IPCC_CHANNEL_5 + * @arg @ref LL_IPCC_CHANNEL_6 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_IPCC_IsActiveFlag_CHx(IPCC_TypeDef const *const IPCCx, uint32_t Channel) +{ + return ((READ_BIT(IPCCx->C2TOC1SR, Channel) == (Channel)) ? 1UL : 0UL); +} + +/** + * @brief Get the number of supported channels. + * @param IPCCx IPCC Instance. + * @retval Number of supported channels. + */ +__STATIC_INLINE uint32_t LL_IPCC_GetChannelNumber(IPCC_TypeDef *IPCCx) +{ + /* Added for compatibility with other STM32 series */ + (void)(IPCCx); /* To avoid gcc/g++ warnings */ + return 6U; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* IPCC */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_IPCC_H */ + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h new file mode 100644 index 0000000..eaecf9f --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_pwr.h @@ -0,0 +1,2725 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_pwr.h + * @author MCD Application Team + * @brief Header file of PWR LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_PWR_H +#define STM32WBxx_LL_PWR_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined(PWR) + +/** @defgroup PWR_LL PWR + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ +/** @defgroup PWR_LL_Private_Constants PWR Private Constants + * @{ + */ + +#if defined(PWR_CR5_SMPSEN) +/** @defgroup PWR_SMPS_Calibration PWR SMPS calibration + * @{ + */ +#define SMPS_VOLTAGE_CAL_ADDR ((uint32_t*) (0x1FFF7558UL)) /* SMPS output voltage calibration level corresponding to voltage "SMPS_VOLTAGE_CAL_VOLTAGE_MV" */ +#define SMPS_VOLTAGE_CAL_POS (8UL) /* SMPS output voltage calibration level bitfield position */ +#define SMPS_VOLTAGE_CAL (0xFUL << SMPS_VOLTAGE_CAL_POS) /* SMPS output voltage calibration level bitfield mask */ +#define SMPS_VOLTAGE_CAL_VOLTAGE_MV (1500UL) /* SMPS output voltage calibration value (unit: mV) */ +#define SMPS_VOLTAGE_BASE_MV (1200UL) /* SMPS output voltage base value (unit: mV) */ +#define SMPS_VOLTAGE_STEP_MV ( 50UL) /* SMPS output voltage step (unit: mV) */ +/** + * @} + */ +#endif /* PWR_CR5_SMPSEN */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup PWR_LL_Exported_Constants PWR Exported Constants + * @{ + */ + +/** @defgroup PWR_LL_EC_CLEAR_FLAG Clear Flags Defines + * @brief Flags defines which can be used with LL_PWR_WriteReg function + * @{ + */ +#define LL_PWR_SCR_CWUF PWR_SCR_CWUF +#if defined(PWR_CR3_EWUP2) +#define LL_PWR_SCR_CWUF5 PWR_SCR_CWUF5 +#endif /* PWR_CR3_EWUP2 */ +#define LL_PWR_SCR_CWUF4 PWR_SCR_CWUF4 +#if defined(PWR_CR3_EWUP3) +#define LL_PWR_SCR_CWUF3 PWR_SCR_CWUF3 +#endif /* PWR_CR3_EWUP3 */ +#if defined(PWR_CR3_EWUP2) +#define LL_PWR_SCR_CWUF2 PWR_SCR_CWUF2 +#endif /* PWR_CR3_EWUP2 */ +#define LL_PWR_SCR_CWUF1 PWR_SCR_CWUF1 +#define LL_PWR_SCR_CC2HF PWR_SCR_CC2HF +#define LL_PWR_SCR_CBLEAF PWR_SCR_CBLEAF +#define LL_PWR_SCR_CCRPEF PWR_SCR_CCRPEF +#if defined(PWR_CR3_E802A) +#define LL_PWR_SCR_C802AF PWR_SCR_C802AF +#define LL_PWR_SCR_C802WUF PWR_SCR_C802WUF +#endif /* PWR_CR3_E802A */ +#define LL_PWR_SCR_CBLEWUF PWR_SCR_CBLEWUF +#if defined(PWR_CR5_SMPSEN) +#define LL_PWR_SCR_CBORHF PWR_SCR_CBORHF +#define LL_PWR_SCR_CSMPSFBF PWR_SCR_CSMPSFBF +#endif /* PWR_CR5_SMPSEN */ +#define LL_PWR_EXTSCR_CCRPF PWR_EXTSCR_CCRPF +#define LL_PWR_EXTSCR_C2CSSF PWR_EXTSCR_C2CSSF +#define LL_PWR_EXTSCR_C1CSSF PWR_EXTSCR_C1CSSF +/** + * @} + */ + +/** @defgroup PWR_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_PWR_ReadReg function + * @{ + */ +#define LL_PWR_SR1_WUFI PWR_SR1_WUFI +#if defined(PWR_CR3_EWUP5) +#define LL_PWR_SR1_WUF5 PWR_SR1_WUF5 +#endif /* PWR_CR3_EWUP5 */ +#define LL_PWR_SR1_WUF4 PWR_SR1_WUF4 +#if defined(PWR_CR3_EWUP3) +#define LL_PWR_SR1_WUF3 PWR_SR1_WUF3 +#endif /* PWR_CR3_EWUP3 */ +#if defined(PWR_CR3_EWUP2) +#define LL_PWR_SR1_WUF2 PWR_SR1_WUF2 +#endif /* PWR_CR3_EWUP2 */ +#define LL_PWR_SR1_WUF1 PWR_SR1_WUF1 +#define LL_PWR_SR2_PVMO3 PWR_SR2_PVMO3 +#if defined(PWR_CR2_PVME1) +#define LL_PWR_SR2_PVMO1 PWR_SR2_PVMO1 +#endif /* PWR_CR2_PVME1 */ +#define LL_PWR_SR2_PVDO PWR_SR2_PVDO +#if defined(PWR_CR1_VOS) +#define LL_PWR_SR2_VOSF PWR_SR2_VOSF +#endif /* PWR_CR1_VOS */ +#define LL_PWR_SR2_REGLPF PWR_SR2_REGLPF +#define LL_PWR_SR2_REGLPS PWR_SR2_REGLPS + +/* BOR flags */ +#define LL_PWR_FLAG_BORH PWR_SR1_BORHF /* BORH interrupt flag */ + +#if defined(PWR_CR5_SMPSEN) +/* SMPS flags */ +#define LL_PWR_FLAG_SMPS PWR_SR2_SMPSF /* SMPS step down converter ready flag */ +#define LL_PWR_FLAG_SMPSB PWR_SR2_SMPSBF /* SMPS step down converter in bypass mode flag */ +#define LL_PWR_FLAG_SMPSFB PWR_SR1_SMPSFB /* SMPS step down converter forced in bypass mode interrupt flag */ +#endif /* PWR_CR5_SMPSEN */ + +/* Radio (BLE or 802.15.4) flags */ +#define LL_PWR_FLAG_BLEWU PWR_SR1_BLEWUF /* BLE wakeup interrupt flag */ + +#define LL_PWR_FLAG_BLEA PWR_SR1_BLEAF /* BLE end of activity interrupt flag */ +#if defined(PWR_CR3_E802A) +#define LL_PWR_FLAG_802WU PWR_SR1_802WUF /* 802.15.4 wakeup interrupt flag */ +#define LL_PWR_FLAG_802A PWR_SR1_802AF /* 802.15.4 end of activity interrupt flag */ +#endif /* PWR_CR3_E802A */ +#define LL_PWR_FLAG_CRPE PWR_SR1_CRPEF /* Critical radio phase end of activity interrupt flag */ +#define LL_PWR_FLAG_CRP PWR_EXTSCR_CRPF /* Critical radio system phase */ + +/* Multicore flags */ +#define LL_PWR_EXTSCR_C1SBF PWR_EXTSCR_C1SBF /* System standby flag for CPU1 */ +#define LL_PWR_EXTSCR_C1STOPF PWR_EXTSCR_C1STOPF /* System stop flag for CPU1 */ +#define LL_PWR_EXTSCR_C1DS PWR_EXTSCR_C1DS /* CPU1 deepsleep mode */ +#define LL_PWR_EXTSCR_C2SBF PWR_EXTSCR_C2SBF /* System standby flag for CPU2 */ +#define LL_PWR_EXTSCR_C2STOPF PWR_EXTSCR_C2STOPF /* System stop flag for CPU2 */ +#define LL_PWR_EXTSCR_C2DS PWR_EXTSCR_C2DS /* CPU2 deepsleep mode */ +#define LL_PWR_SR1_C2HF PWR_SR1_C2HF /* CPU2 hold interrupt flag */ +/** + * @} + */ + +#if defined(PWR_CR1_VOS) +/** @defgroup PWR_LL_EC_REGU_VOLTAGE REGU VOLTAGE + * @{ + */ +#define LL_PWR_REGU_VOLTAGE_SCALE1 (PWR_CR1_VOS_0) /* Regulator voltage output range 1 mode, typical output voltage at 1.2 V, system frequency up to 64 MHz. */ +#define LL_PWR_REGU_VOLTAGE_SCALE2 (PWR_CR1_VOS_1) /* Regulator voltage output range 2 mode, typical output voltage at 1.0 V, system frequency up to 16 MHz. */ +/** + * @} + */ +#endif /* PWR_CR1_VOS */ + +/** @defgroup PWR_LL_EC_MODE_PWR MODE PWR + * @{ + */ +#define LL_PWR_MODE_STOP0 (0x000000000U) +#define LL_PWR_MODE_STOP1 (PWR_CR1_LPMS_0) +#if defined(PWR_SUPPORT_STOP2) +#define LL_PWR_MODE_STOP2 (PWR_CR1_LPMS_1) +#endif /* PWR_SUPPORT_STOP2 */ +#define LL_PWR_MODE_STANDBY (PWR_CR1_LPMS_1 | PWR_CR1_LPMS_0) +#define LL_PWR_MODE_SHUTDOWN (PWR_CR1_LPMS_2) +/** + * @} + */ + +/** @defgroup PWR_LL_EC_FLASH_LPRUN_POWER_DOWN_MODE Flash power-down mode during low-power run mode + * @{ + */ +#define LL_PWR_FLASH_LPRUN_MODE_IDLE (0x000000000U) +#define LL_PWR_FLASH_LPRUN_MODE_POWER_DOWN (PWR_CR1_FPDR) +/** + * @} + */ + +/** @defgroup PWR_LL_EC_FLASH_SLEEP_POWER_DOWN_MODE Flash power-down mode during sleep mode + * @{ + */ +#define LL_PWR_FLASH_SLEEP_MODE_IDLE (0x000000000U) +#define LL_PWR_FLASH_SLEEP_MODE_POWER_DOWN (PWR_CR1_FPDS) +/** + * @} + */ + +/** @defgroup PWR_LL_EC_PVM Peripheral voltage monitoring + * @{ + */ +#if defined(PWR_CR2_PVME1) +#define LL_PWR_PVM_VDDUSB_1_2V (PWR_CR2_PVME1) /* Monitoring VDDUSB vs. 1.2V */ +#endif /* PWR_CR2_PVME1 */ +#define LL_PWR_PVM_VDDA_1_62V (PWR_CR2_PVME3) /* Monitoring VDDA vs. 1.62V */ +/** + * @} + */ + +/** @defgroup PWR_LL_EC_PVDLEVEL PVDLEVEL + * @{ + */ +#define LL_PWR_PVDLEVEL_0 (0x00000000U) /* VPVD0 around 2.0 V */ +#define LL_PWR_PVDLEVEL_1 (PWR_CR2_PLS_0) /* VPVD1 around 2.2 V */ +#define LL_PWR_PVDLEVEL_2 (PWR_CR2_PLS_1) /* VPVD2 around 2.4 V */ +#define LL_PWR_PVDLEVEL_3 (PWR_CR2_PLS_1 | PWR_CR2_PLS_0) /* VPVD3 around 2.5 V */ +#define LL_PWR_PVDLEVEL_4 (PWR_CR2_PLS_2) /* VPVD4 around 2.6 V */ +#define LL_PWR_PVDLEVEL_5 (PWR_CR2_PLS_2 | PWR_CR2_PLS_0) /* VPVD5 around 2.8 V */ +#define LL_PWR_PVDLEVEL_6 (PWR_CR2_PLS_2 | PWR_CR2_PLS_1) /* VPVD6 around 2.9 V */ +#define LL_PWR_PVDLEVEL_7 (PWR_CR2_PLS_2 | PWR_CR2_PLS_1 | PWR_CR2_PLS_0) /* External input analog voltage (Compare internally to VREFINT) */ +/** + * @} + */ + +/** @defgroup PWR_LL_EC_WAKEUP WAKEUP + * @{ + */ +#define LL_PWR_WAKEUP_PIN1 (PWR_CR3_EWUP1) +#if defined(PWR_CR3_EWUP2) +#define LL_PWR_WAKEUP_PIN2 (PWR_CR3_EWUP2) +#endif /* PWR_CR3_EWUP2 */ +#if defined(PWR_CR3_EWUP3) +#define LL_PWR_WAKEUP_PIN3 (PWR_CR3_EWUP3) +#endif /* PWR_CR3_EWUP3 */ +#define LL_PWR_WAKEUP_PIN4 (PWR_CR3_EWUP4) +#if defined(PWR_CR3_EWUP5) +#define LL_PWR_WAKEUP_PIN5 (PWR_CR3_EWUP5) +#endif /* PWR_CR3_EWUP5 */ +/** + * @} + */ + +/** @defgroup PWR_LL_EC_BATT_CHARG_RESISTOR BATT CHARG RESISTOR + * @{ + */ +#define LL_PWR_BATT_CHARG_RESISTOR_5K (0x00000000U) +#define LL_PWR_BATT_CHARGRESISTOR_1_5K (PWR_CR4_VBRS) +/** + * @} + */ + +/** @defgroup PWR_LL_EC_GPIO GPIO + * @{ + */ +#define LL_PWR_GPIO_A ((uint32_t)(&(PWR->PUCRA))) +#define LL_PWR_GPIO_B ((uint32_t)(&(PWR->PUCRB))) +#define LL_PWR_GPIO_C ((uint32_t)(&(PWR->PUCRC))) +#define LL_PWR_GPIO_D ((uint32_t)(&(PWR->PUCRD))) +#define LL_PWR_GPIO_E ((uint32_t)(&(PWR->PUCRE))) +#define LL_PWR_GPIO_H ((uint32_t)(&(PWR->PUCRH))) +/** + * @} + */ + +/** @defgroup PWR_LL_EC_GPIO_BIT GPIO BIT + * @{ + */ +#if defined(PWR_PUCRC_PC0) +/* Note: LL_PWR_GPIO_BIT_x defined from port C because all pins are available */ +/* for PWR pull-up and pull-down. */ +#define LL_PWR_GPIO_BIT_0 (PWR_PUCRC_PC0) +#define LL_PWR_GPIO_BIT_1 (PWR_PUCRC_PC1) +#define LL_PWR_GPIO_BIT_2 (PWR_PUCRC_PC2) +#define LL_PWR_GPIO_BIT_3 (PWR_PUCRC_PC3) +#define LL_PWR_GPIO_BIT_4 (PWR_PUCRC_PC4) +#define LL_PWR_GPIO_BIT_5 (PWR_PUCRC_PC5) +#define LL_PWR_GPIO_BIT_6 (PWR_PUCRC_PC6) +#define LL_PWR_GPIO_BIT_7 (PWR_PUCRC_PC7) +#define LL_PWR_GPIO_BIT_8 (PWR_PUCRC_PC8) +#define LL_PWR_GPIO_BIT_9 (PWR_PUCRC_PC9) +#define LL_PWR_GPIO_BIT_10 (PWR_PUCRC_PC10) +#define LL_PWR_GPIO_BIT_11 (PWR_PUCRC_PC11) +#define LL_PWR_GPIO_BIT_12 (PWR_PUCRC_PC12) +#define LL_PWR_GPIO_BIT_13 (PWR_PUCRC_PC13) +#define LL_PWR_GPIO_BIT_14 (PWR_PUCRC_PC14) +#define LL_PWR_GPIO_BIT_15 (PWR_PUCRC_PC15) +#else +#define LL_PWR_GPIO_BIT_0 (PWR_PUCRA_PA0) +#define LL_PWR_GPIO_BIT_1 (PWR_PUCRA_PA1) +#define LL_PWR_GPIO_BIT_2 (PWR_PUCRA_PA2) +#define LL_PWR_GPIO_BIT_3 (PWR_PUCRA_PA3) +#define LL_PWR_GPIO_BIT_4 (PWR_PUCRA_PA4) +#define LL_PWR_GPIO_BIT_5 (PWR_PUCRA_PA5) +#define LL_PWR_GPIO_BIT_6 (PWR_PUCRA_PA6) +#define LL_PWR_GPIO_BIT_7 (PWR_PUCRA_PA7) +#define LL_PWR_GPIO_BIT_8 (PWR_PUCRA_PA8) +#define LL_PWR_GPIO_BIT_9 (PWR_PUCRA_PA9) +#define LL_PWR_GPIO_BIT_10 (PWR_PUCRA_PA10) +#define LL_PWR_GPIO_BIT_11 (PWR_PUCRA_PA11) +#define LL_PWR_GPIO_BIT_12 (PWR_PUCRA_PA12) +#define LL_PWR_GPIO_BIT_13 (PWR_PUCRA_PA13) +#define LL_PWR_GPIO_BIT_14 (PWR_PUCRC_PC14) +#define LL_PWR_GPIO_BIT_15 (PWR_PUCRC_PC15) +#endif /* PWR_PUCRC_PC0 */ +/** + * @} + */ + +#if defined(PWR_CR5_SMPSEN) +/** @defgroup PWR_LL_EC_BOR_CONFIGURATION BOR configuration + * @{ + */ +#define LL_PWR_BOR_SYSTEM_RESET (0x00000000U) /*!< BOR will generate a system reset */ +#define LL_PWR_BOR_SMPS_FORCE_BYPASS (PWR_CR5_BORHC) /*!< BOR will for SMPS step down converter in bypass mode */ +/** + * @} + */ + +/** @defgroup PWR_LL_EC_SMPS_OPERATING_MODES SMPS step down converter operating modes + * @{ + */ +/* Note: Literals values are defined from register SR2 bits SMPSF and SMPSBF */ +/* but they are also used as register CR5 bits SMPSEN and SMPSBEN, */ +/* as used by all SMPS operating mode functions targeting different */ +/* registers: */ +/* "LL_PWR_SMPS_SetMode()", "LL_PWR_SMPS_GetMode()" */ +/* and "LL_PWR_SMPS_GetEffectiveMode()". */ +#define LL_PWR_SMPS_BYPASS (PWR_SR2_SMPSBF) /*!< SMPS step down in bypass mode. */ +#define LL_PWR_SMPS_STEP_DOWN (PWR_SR2_SMPSF) /*!< SMPS step down in step down mode if system low power mode is run, LP run or stop0. If system low power mode is stop1, stop2, standby, shutdown, then SMPS is forced in mode open to preserve energy stored in decoupling capacitor as long as possible. */ +/** + * @} + */ + +/** @defgroup PWR_LL_EC_SMPS_STARTUP_CURRENT SMPS step down converter supply startup current selection + * @{ + */ +#define LL_PWR_SMPS_STARTUP_CURRENT_80MA (0x00000000U) /*!< SMPS step down converter supply startup current 80mA */ +#define LL_PWR_SMPS_STARTUP_CURRENT_100MA ( PWR_CR5_SMPSSC_0) /*!< SMPS step down converter supply startup current 100mA */ +#define LL_PWR_SMPS_STARTUP_CURRENT_120MA ( PWR_CR5_SMPSSC_1 ) /*!< SMPS step down converter supply startup current 120mA */ +#define LL_PWR_SMPS_STARTUP_CURRENT_140MA ( PWR_CR5_SMPSSC_1 | PWR_CR5_SMPSSC_0) /*!< SMPS step down converter supply startup current 140mA */ +#define LL_PWR_SMPS_STARTUP_CURRENT_160MA (PWR_CR5_SMPSSC_2 ) /*!< SMPS step down converter supply startup current 160mA */ +#define LL_PWR_SMPS_STARTUP_CURRENT_180MA (PWR_CR5_SMPSSC_2 | PWR_CR5_SMPSSC_0) /*!< SMPS step down converter supply startup current 180mA */ +#define LL_PWR_SMPS_STARTUP_CURRENT_200MA (PWR_CR5_SMPSSC_2 | PWR_CR5_SMPSSC_1 ) /*!< SMPS step down converter supply startup current 200mA */ +#define LL_PWR_SMPS_STARTUP_CURRENT_220MA (PWR_CR5_SMPSSC_2 | PWR_CR5_SMPSSC_1 | PWR_CR5_SMPSSC_0) /*!< SMPS step down converter supply startup current 220mA */ +/** + * @} + */ + +/** @defgroup PWR_LL_EC_SMPS_OUTPUT_VOLTAGE_LEVEL SMPS step down converter output voltage scaling voltage level + * @{ + */ +/* Note: SMPS voltage is trimmed during device production to control + the actual voltage level variation from device to device. */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V20 (0x00000000U) /*!< SMPS step down converter supply output voltage 1.20V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V25 ( PWR_CR5_SMPSVOS_0) /*!< SMPS step down converter supply output voltage 1.25V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V30 ( PWR_CR5_SMPSVOS_1 ) /*!< SMPS step down converter supply output voltage 1.30V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V35 ( PWR_CR5_SMPSVOS_1 | PWR_CR5_SMPSVOS_0) /*!< SMPS step down converter supply output voltage 1.35V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V40 ( PWR_CR5_SMPSVOS_2 ) /*!< SMPS step down converter supply output voltage 1.40V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V45 ( PWR_CR5_SMPSVOS_2 | PWR_CR5_SMPSVOS_0) /*!< SMPS step down converter supply output voltage 1.45V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V50 ( PWR_CR5_SMPSVOS_2 | PWR_CR5_SMPSVOS_1 ) /*!< SMPS step down converter supply output voltage 1.50V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V55 ( PWR_CR5_SMPSVOS_2 | PWR_CR5_SMPSVOS_1 | PWR_CR5_SMPSVOS_0) /*!< SMPS step down converter supply output voltage 1.55V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V60 (PWR_CR5_SMPSVOS_3 ) /*!< SMPS step down converter supply output voltage 1.60V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V65 (PWR_CR5_SMPSVOS_3 | PWR_CR5_SMPSVOS_0) /*!< SMPS step down converter supply output voltage 1.65V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V70 (PWR_CR5_SMPSVOS_3 | PWR_CR5_SMPSVOS_1 ) /*!< SMPS step down converter supply output voltage 1.70V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V75 (PWR_CR5_SMPSVOS_3 | PWR_CR5_SMPSVOS_1 | PWR_CR5_SMPSVOS_0) /*!< SMPS step down converter supply output voltage 1.75V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V80 (PWR_CR5_SMPSVOS_3 | PWR_CR5_SMPSVOS_2 ) /*!< SMPS step down converter supply output voltage 1.80V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V85 (PWR_CR5_SMPSVOS_3 | PWR_CR5_SMPSVOS_2 | PWR_CR5_SMPSVOS_0) /*!< SMPS step down converter supply output voltage 1.85V */ +#define LL_PWR_SMPS_OUTPUT_VOLTAGE_1V90 (PWR_CR5_SMPSVOS_3 | PWR_CR5_SMPSVOS_2 | PWR_CR5_SMPSVOS_1 ) /*!< SMPS step down converter supply output voltage 1.90V */ +/** + * @} + */ +#endif /* PWR_CR5_SMPSEN */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup PWR_LL_Exported_Macros PWR Exported Macros + * @{ + */ + +/** @defgroup PWR_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in PWR register + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_PWR_WriteReg(__REG__, __VALUE__) WRITE_REG(PWR->__REG__, (__VALUE__)) + +/** + * @brief Read a value in PWR register + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_PWR_ReadReg(__REG__) READ_REG(PWR->__REG__) +/** + * @} + */ + +/** + * @} + */ + + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup PWR_LL_Exported_Functions PWR Exported Functions + * @{ + */ + +/** @defgroup PWR_LL_EF_Configuration Configuration + * @{ + */ + +/** + * @brief Switch from run main mode to run low-power mode. + * @rmtoll CR1 LPR LL_PWR_EnterLowPowerRunMode + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnterLowPowerRunMode(void) +{ + SET_BIT(PWR->CR1, PWR_CR1_LPR); +} + +/** + * @brief Switch from run main mode to low-power mode. + * @rmtoll CR1 LPR LL_PWR_ExitLowPowerRunMode + * @retval None + */ +__STATIC_INLINE void LL_PWR_ExitLowPowerRunMode(void) +{ + CLEAR_BIT(PWR->CR1, PWR_CR1_LPR); +} + +/** + * @brief Check if the regulator is in low-power mode + * @rmtoll CR1 LPR LL_PWR_IsEnabledLowPowerRunMode + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledLowPowerRunMode(void) +{ + return ((READ_BIT(PWR->CR1, PWR_CR1_LPR) == (PWR_CR1_LPR)) ? 1UL : 0UL); +} + +#if defined(PWR_CR1_VOS) +/** + * @brief Set the main internal regulator output voltage + * @note A delay is required for the internal regulator to be ready + * after the voltage scaling has been changed. + * Check whether regulator reached the selected voltage level + * can be done using function @ref LL_PWR_IsActiveFlag_VOS(). + * @rmtoll CR1 VOS LL_PWR_SetRegulVoltageScaling + * @param VoltageScaling This parameter can be one of the following values: + * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE1 + * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE2 + * @retval None + */ +__STATIC_INLINE void LL_PWR_SetRegulVoltageScaling(uint32_t VoltageScaling) +{ + MODIFY_REG(PWR->CR1, PWR_CR1_VOS, VoltageScaling); +} + +/** + * @brief Get the main internal regulator output voltage + * @rmtoll CR1 VOS LL_PWR_GetRegulVoltageScaling + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE1 + * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE2 + */ +__STATIC_INLINE uint32_t LL_PWR_GetRegulVoltageScaling(void) +{ + return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_VOS)); +} +#endif /* PWR_CR1_VOS */ + +/** + * @brief Enable access to the backup domain + * @rmtoll CR1 DBP LL_PWR_EnableBkUpAccess + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableBkUpAccess(void) +{ + SET_BIT(PWR->CR1, PWR_CR1_DBP); +} + +/** + * @brief Disable access to the backup domain + * @rmtoll CR1 DBP LL_PWR_DisableBkUpAccess + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableBkUpAccess(void) +{ + CLEAR_BIT(PWR->CR1, PWR_CR1_DBP); +} + +/** + * @brief Check if the backup domain is enabled + * @rmtoll CR1 DBP LL_PWR_IsEnabledBkUpAccess + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess(void) +{ + return ((READ_BIT(PWR->CR1, PWR_CR1_DBP) == (PWR_CR1_DBP)) ? 1UL : 0UL); +} + +/** + * @brief Set Low-Power mode + * @rmtoll CR1 LPMS LL_PWR_SetPowerMode + * @param LowPowerMode This parameter can be one of the following values: + * @arg @ref LL_PWR_MODE_STOP0 + * @arg @ref LL_PWR_MODE_STOP1 + * @arg @ref LL_PWR_MODE_STOP2 (*) + * @arg @ref LL_PWR_MODE_STANDBY + * @arg @ref LL_PWR_MODE_SHUTDOWN + * + * (*) Not available on devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_PWR_SetPowerMode(uint32_t LowPowerMode) +{ + MODIFY_REG(PWR->CR1, PWR_CR1_LPMS, LowPowerMode); +} + +/** + * @brief Get Low-Power mode + * @rmtoll CR1 LPMS LL_PWR_GetPowerMode + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_MODE_STOP0 + * @arg @ref LL_PWR_MODE_STOP1 + * @arg @ref LL_PWR_MODE_STOP2 (*) + * @arg @ref LL_PWR_MODE_STANDBY + * @arg @ref LL_PWR_MODE_SHUTDOWN + * + * (*) Not available on devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx + */ +__STATIC_INLINE uint32_t LL_PWR_GetPowerMode(void) +{ + return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_LPMS)); +} + +/** + * @brief Set flash power-down mode during low-power run mode + * @rmtoll CR1 FPDR LL_PWR_SetFlashPowerModeLPRun + * @param FlashLowPowerMode This parameter can be one of the following values: + * @arg @ref LL_PWR_FLASH_LPRUN_MODE_IDLE + * @arg @ref LL_PWR_FLASH_LPRUN_MODE_POWER_DOWN + * @retval None + */ +__STATIC_INLINE void LL_PWR_SetFlashPowerModeLPRun(uint32_t FlashLowPowerMode) +{ + /* Unlock bit FPDR */ + WRITE_REG(PWR->CR1, 0x0000C1B0UL); + + /* Update bit FPDR */ + MODIFY_REG(PWR->CR1, PWR_CR1_FPDR, FlashLowPowerMode); +} + +/** + * @brief Get flash power-down mode during low-power run mode + * @rmtoll CR1 FPDR LL_PWR_GetFlashPowerModeLPRun + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_FLASH_LPRUN_MODE_IDLE + * @arg @ref LL_PWR_FLASH_LPRUN_MODE_POWER_DOWN + */ +__STATIC_INLINE uint32_t LL_PWR_GetFlashPowerModeLPRun(void) +{ + return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_FPDR)); +} + +/** + * @brief Set flash power-down mode during sleep mode + * @rmtoll CR1 FPDS LL_PWR_SetFlashPowerModeSleep + * @param FlashLowPowerMode This parameter can be one of the following values: + * @arg @ref LL_PWR_FLASH_SLEEP_MODE_IDLE + * @arg @ref LL_PWR_FLASH_SLEEP_MODE_POWER_DOWN + * @retval None + */ +__STATIC_INLINE void LL_PWR_SetFlashPowerModeSleep(uint32_t FlashLowPowerMode) +{ + MODIFY_REG(PWR->CR1, PWR_CR1_FPDS, FlashLowPowerMode); +} + +/** + * @brief Get flash power-down mode during sleep mode + * @rmtoll CR1 FPDS LL_PWR_GetFlashPowerModeSleep + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_FLASH_SLEEP_MODE_IDLE + * @arg @ref LL_PWR_FLASH_SLEEP_MODE_POWER_DOWN + */ +__STATIC_INLINE uint32_t LL_PWR_GetFlashPowerModeSleep(void) +{ + return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_FPDS)); +} + +#if defined(PWR_CR2_PVME1) +/** + * @brief Enable VDDUSB supply + * @rmtoll CR2 USV LL_PWR_EnableVddUSB + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableVddUSB(void) +{ + SET_BIT(PWR->CR2, PWR_CR2_USV); +} + +/** + * @brief Disable VDDUSB supply + * @rmtoll CR2 USV LL_PWR_DisableVddUSB + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableVddUSB(void) +{ + CLEAR_BIT(PWR->CR2, PWR_CR2_USV); +} + +/** + * @brief Check if VDDUSB supply is enabled + * @rmtoll CR2 USV LL_PWR_IsEnabledVddUSB + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledVddUSB(void) +{ + return ((READ_BIT(PWR->CR2, PWR_CR2_USV) == (PWR_CR2_USV)) ? 1UL : 0UL); +} +#endif + +/** + * @brief Enable the Power Voltage Monitoring on a peripheral + * @rmtoll CR2 PVME1 LL_PWR_EnablePVM\n + * CR2 PVME3 LL_PWR_EnablePVM + * @param PeriphVoltage This parameter can be one of the following values: + * @arg @ref LL_PWR_PVM_VDDUSB_1_2V (*) + * @arg @ref LL_PWR_PVM_VDDA_1_62V + * + * (*) Not available on devices STM32WB50xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnablePVM(uint32_t PeriphVoltage) +{ + SET_BIT(PWR->CR2, PeriphVoltage); +} + +/** + * @brief Disable the Power Voltage Monitoring on a peripheral + * @rmtoll CR2 PVME1 LL_PWR_DisablePVM\n + * CR2 PVME3 LL_PWR_DisablePVM + * @param PeriphVoltage This parameter can be one of the following values: + * @arg @ref LL_PWR_PVM_VDDUSB_1_2V (*) + * @arg @ref LL_PWR_PVM_VDDA_1_62V + * + * (*) Not available on devices STM32WB50xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisablePVM(uint32_t PeriphVoltage) +{ + CLEAR_BIT(PWR->CR2, PeriphVoltage); +} + +/** + * @brief Check if Power Voltage Monitoring is enabled on a peripheral + * @rmtoll CR2 PVME1 LL_PWR_IsEnabledPVM\n + * CR2 PVME3 LL_PWR_IsEnabledPVM + * @param PeriphVoltage This parameter can be one of the following values: + * @arg @ref LL_PWR_PVM_VDDUSB_1_2V (*) + * @arg @ref LL_PWR_PVM_VDDA_1_62V + * + * (*) Not available on devices STM32WB50xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledPVM(uint32_t PeriphVoltage) +{ + return ((READ_BIT(PWR->CR2, PeriphVoltage) == (PeriphVoltage)) ? 1UL : 0UL); +} + +/** + * @brief Configure the voltage threshold detected by the Power Voltage Detector + * @rmtoll CR2 PLS LL_PWR_SetPVDLevel + * @param PVDLevel This parameter can be one of the following values: + * @arg @ref LL_PWR_PVDLEVEL_0 + * @arg @ref LL_PWR_PVDLEVEL_1 + * @arg @ref LL_PWR_PVDLEVEL_2 + * @arg @ref LL_PWR_PVDLEVEL_3 + * @arg @ref LL_PWR_PVDLEVEL_4 + * @arg @ref LL_PWR_PVDLEVEL_5 + * @arg @ref LL_PWR_PVDLEVEL_6 + * @arg @ref LL_PWR_PVDLEVEL_7 + * @retval None + */ +__STATIC_INLINE void LL_PWR_SetPVDLevel(uint32_t PVDLevel) +{ + MODIFY_REG(PWR->CR2, PWR_CR2_PLS, PVDLevel); +} + +/** + * @brief Get the voltage threshold detection + * @rmtoll CR2 PLS LL_PWR_GetPVDLevel + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_PVDLEVEL_0 + * @arg @ref LL_PWR_PVDLEVEL_1 + * @arg @ref LL_PWR_PVDLEVEL_2 + * @arg @ref LL_PWR_PVDLEVEL_3 + * @arg @ref LL_PWR_PVDLEVEL_4 + * @arg @ref LL_PWR_PVDLEVEL_5 + * @arg @ref LL_PWR_PVDLEVEL_6 + * @arg @ref LL_PWR_PVDLEVEL_7 + */ +__STATIC_INLINE uint32_t LL_PWR_GetPVDLevel(void) +{ + return (uint32_t)(READ_BIT(PWR->CR2, PWR_CR2_PLS)); +} + +/** + * @brief Enable Power Voltage Detector + * @rmtoll CR2 PVDE LL_PWR_EnablePVD + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnablePVD(void) +{ + SET_BIT(PWR->CR2, PWR_CR2_PVDE); +} + +/** + * @brief Disable Power Voltage Detector + * @rmtoll CR2 PVDE LL_PWR_DisablePVD + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisablePVD(void) +{ + CLEAR_BIT(PWR->CR2, PWR_CR2_PVDE); +} + +/** + * @brief Check if Power Voltage Detector is enabled + * @rmtoll CR2 PVDE LL_PWR_IsEnabledPVD + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledPVD(void) +{ + return ((READ_BIT(PWR->CR2, PWR_CR2_PVDE) == (PWR_CR2_PVDE)) ? 1UL : 0UL); +} + +/** + * @brief Enable Internal Wake-up line + * @rmtoll CR3 EIWF LL_PWR_EnableInternWU + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableInternWU(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_EIWUL); +} + +/** + * @brief Disable Internal Wake-up line + * @rmtoll CR3 EIWF LL_PWR_DisableInternWU + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableInternWU(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_EIWUL); +} + +/** + * @brief Check if Internal Wake-up line is enabled + * @rmtoll CR3 EIWF LL_PWR_IsEnabledInternWU + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledInternWU(void) +{ + return ((READ_BIT(PWR->CR3, PWR_CR3_EIWUL) == (PWR_CR3_EIWUL)) ? 1UL : 0UL); +} + +/** + * @brief Enable pull-up and pull-down configuration + * @rmtoll CR3 APC LL_PWR_EnablePUPDCfg + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnablePUPDCfg(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_APC); +} + +/** + * @brief Disable pull-up and pull-down configuration + * @rmtoll CR3 APC LL_PWR_DisablePUPDCfg + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisablePUPDCfg(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_APC); +} + +/** + * @brief Check if pull-up and pull-down configuration is enabled + * @rmtoll CR3 APC LL_PWR_IsEnabledPUPDCfg + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledPUPDCfg(void) +{ + return ((READ_BIT(PWR->CR3, PWR_CR3_APC) == (PWR_CR3_APC)) ? 1UL : 0UL); +} + +/** + * @brief Enable SRAM2a content retention in Standby mode + * @note On devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx, retention is extended + * to SRAM1, SRAM2a and SRAM2b. + * @rmtoll CR3 RRS LL_PWR_EnableSRAM2Retention + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableSRAM2Retention(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_RRS); +} + +/** + * @brief Disable SRAM2a content retention in Standby mode + * @note On devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx, retention is extended + * to SRAM1, SRAM2a and SRAM2b. + * @rmtoll CR3 RRS LL_PWR_DisableSRAM2Retention + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableSRAM2Retention(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_RRS); +} + +/** + * @brief Check if SRAM2 content retention in Standby mode is enabled + * @note On devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx, retention is extended + * to SRAM1, SRAM2a and SRAM2b. + * @rmtoll CR3 RRS LL_PWR_IsEnabledSRAM2Retention + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledSRAM2Retention(void) +{ + return ((READ_BIT(PWR->CR3, PWR_CR3_RRS) == (PWR_CR3_RRS)) ? 1UL : 0UL); +} + +/** + * @brief Enable the WakeUp PINx functionality + * @rmtoll CR3 EWUP1 LL_PWR_EnableWakeUpPin\n + * CR3 EWUP2 LL_PWR_EnableWakeUpPin\n + * CR3 EWUP3 LL_PWR_EnableWakeUpPin\n + * CR3 EWUP4 LL_PWR_EnableWakeUpPin\n + * CR3 EWUP5 LL_PWR_EnableWakeUpPin\n + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableWakeUpPin(uint32_t WakeUpPin) +{ + SET_BIT(PWR->CR3, WakeUpPin); +} + +/** + * @brief Disable the WakeUp PINx functionality + * @rmtoll CR3 EWUP1 LL_PWR_DisableWakeUpPin\n + * CR3 EWUP2 LL_PWR_DisableWakeUpPin\n + * CR3 EWUP3 LL_PWR_DisableWakeUpPin\n + * CR3 EWUP4 LL_PWR_DisableWakeUpPin\n + * CR3 EWUP5 LL_PWR_DisableWakeUpPin\n + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableWakeUpPin(uint32_t WakeUpPin) +{ + CLEAR_BIT(PWR->CR3, WakeUpPin); +} + +/** + * @brief Check if the WakeUp PINx functionality is enabled + * @rmtoll CR3 EWUP1 LL_PWR_IsEnabledWakeUpPin\n + * CR3 EWUP2 LL_PWR_IsEnabledWakeUpPin\n + * CR3 EWUP3 LL_PWR_IsEnabledWakeUpPin\n + * CR3 EWUP4 LL_PWR_IsEnabledWakeUpPin\n + * CR3 EWUP5 LL_PWR_IsEnabledWakeUpPin\n + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin) +{ + return ((READ_BIT(PWR->CR3, WakeUpPin) == (WakeUpPin)) ? 1UL : 0UL); +} + +/** + * @brief Set the resistor impedance + * @rmtoll CR4 VBRS LL_PWR_SetBattChargResistor + * @param Resistor This parameter can be one of the following values: + * @arg @ref LL_PWR_BATT_CHARG_RESISTOR_5K + * @arg @ref LL_PWR_BATT_CHARGRESISTOR_1_5K + * @retval None + */ +__STATIC_INLINE void LL_PWR_SetBattChargResistor(uint32_t Resistor) +{ + MODIFY_REG(PWR->CR4, PWR_CR4_VBRS, Resistor); +} + +/** + * @brief Get the resistor impedance + * @rmtoll CR4 VBRS LL_PWR_GetBattChargResistor + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_BATT_CHARG_RESISTOR_5K + * @arg @ref LL_PWR_BATT_CHARGRESISTOR_1_5K + */ +__STATIC_INLINE uint32_t LL_PWR_GetBattChargResistor(void) +{ + return (uint32_t)(READ_BIT(PWR->CR4, PWR_CR4_VBRS)); +} + +/** + * @brief Enable battery charging + * @rmtoll CR4 VBE LL_PWR_EnableBatteryCharging + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableBatteryCharging(void) +{ + SET_BIT(PWR->CR4, PWR_CR4_VBE); +} + +/** + * @brief Disable battery charging + * @rmtoll CR4 VBE LL_PWR_DisableBatteryCharging + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableBatteryCharging(void) +{ + CLEAR_BIT(PWR->CR4, PWR_CR4_VBE); +} + +/** + * @brief Check if battery charging is enabled + * @rmtoll CR4 VBE LL_PWR_IsEnabledBatteryCharging + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledBatteryCharging(void) +{ + return ((READ_BIT(PWR->CR4, PWR_CR4_VBE) == (PWR_CR4_VBE)) ? 1UL : 0UL); +} + +/** + * @brief Set the Wake-Up pin polarity low for the event detection + * @rmtoll CR4 WP1 LL_PWR_SetWakeUpPinPolarityLow\n + * CR4 WP2 LL_PWR_SetWakeUpPinPolarityLow\n + * CR4 WP3 LL_PWR_SetWakeUpPinPolarityLow\n + * CR4 WP4 LL_PWR_SetWakeUpPinPolarityLow\n + * CR4 WP5 LL_PWR_SetWakeUpPinPolarityLow + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityLow(uint32_t WakeUpPin) +{ + SET_BIT(PWR->CR4, WakeUpPin); +} + +/** + * @brief Set the Wake-Up pin polarity high for the event detection + * @rmtoll CR4 WP1 LL_PWR_SetWakeUpPinPolarityHigh\n + * CR4 WP2 LL_PWR_SetWakeUpPinPolarityHigh\n + * CR4 WP3 LL_PWR_SetWakeUpPinPolarityHigh\n + * CR4 WP4 LL_PWR_SetWakeUpPinPolarityHigh\n + * CR4 WP5 LL_PWR_SetWakeUpPinPolarityHigh + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityHigh(uint32_t WakeUpPin) +{ + CLEAR_BIT(PWR->CR4, WakeUpPin); +} + +/** + * @brief Get the Wake-Up pin polarity for the event detection + * @rmtoll CR4 WP1 LL_PWR_IsWakeUpPinPolarityLow\n + * CR4 WP2 LL_PWR_IsWakeUpPinPolarityLow\n + * CR4 WP3 LL_PWR_IsWakeUpPinPolarityLow\n + * CR4 WP4 LL_PWR_IsWakeUpPinPolarityLow\n + * CR4 WP5 LL_PWR_IsWakeUpPinPolarityLow + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsWakeUpPinPolarityLow(uint32_t WakeUpPin) +{ + return ((READ_BIT(PWR->CR4, WakeUpPin) == (WakeUpPin)) ? 1UL : 0UL); +} + +/** + * @brief Enable GPIO pull-up state in Standby and Shutdown modes + * @note Some pins are not configurable for pulling in Standby and Shutdown + * modes. Refer to reference manual for available pins and ports. + * @rmtoll PUCRA PU0-15 LL_PWR_EnableGPIOPullUp\n + * PUCRB PU0-15 LL_PWR_EnableGPIOPullUp\n + * PUCRC PU0-15 LL_PWR_EnableGPIOPullUp\n + * PUCRD PU0-15 LL_PWR_EnableGPIOPullUp\n + * PUCRE PU0-15 LL_PWR_EnableGPIOPullUp\n + * PUCRH PU0-15 LL_PWR_EnableGPIOPullUp + * @param GPIO This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_A + * @arg @ref LL_PWR_GPIO_B + * @arg @ref LL_PWR_GPIO_C + * @arg @ref LL_PWR_GPIO_D + * @arg @ref LL_PWR_GPIO_E + * @arg @ref LL_PWR_GPIO_H + * @param GPIONumber This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_BIT_0 + * @arg @ref LL_PWR_GPIO_BIT_1 + * @arg @ref LL_PWR_GPIO_BIT_2 + * @arg @ref LL_PWR_GPIO_BIT_3 + * @arg @ref LL_PWR_GPIO_BIT_4 + * @arg @ref LL_PWR_GPIO_BIT_5 + * @arg @ref LL_PWR_GPIO_BIT_6 + * @arg @ref LL_PWR_GPIO_BIT_7 + * @arg @ref LL_PWR_GPIO_BIT_8 + * @arg @ref LL_PWR_GPIO_BIT_9 + * @arg @ref LL_PWR_GPIO_BIT_10 + * @arg @ref LL_PWR_GPIO_BIT_11 + * @arg @ref LL_PWR_GPIO_BIT_12 + * @arg @ref LL_PWR_GPIO_BIT_13 + * @arg @ref LL_PWR_GPIO_BIT_14 + * @arg @ref LL_PWR_GPIO_BIT_15 + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber) +{ + SET_BIT(*((__IO uint32_t *)GPIO), GPIONumber); +} + +/** + * @brief Disable GPIO pull-up state in Standby and Shutdown modes + * @note Some pins are not configurable for pulling in Standby and Shutdown + * modes. Refer to reference manual for available pins and ports. + * @rmtoll PUCRA PU0-15 LL_PWR_DisableGPIOPullUp\n + * PUCRB PU0-15 LL_PWR_DisableGPIOPullUp\n + * PUCRC PU0-15 LL_PWR_DisableGPIOPullUp\n + * PUCRD PU0-15 LL_PWR_DisableGPIOPullUp\n + * PUCRE PU0-15 LL_PWR_DisableGPIOPullUp\n + * PUCRH PU0-15 LL_PWR_DisableGPIOPullUp + * @param GPIO This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_A + * @arg @ref LL_PWR_GPIO_B + * @arg @ref LL_PWR_GPIO_C + * @arg @ref LL_PWR_GPIO_D + * @arg @ref LL_PWR_GPIO_E + * @arg @ref LL_PWR_GPIO_H + * @param GPIONumber This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_BIT_0 + * @arg @ref LL_PWR_GPIO_BIT_1 + * @arg @ref LL_PWR_GPIO_BIT_2 + * @arg @ref LL_PWR_GPIO_BIT_3 + * @arg @ref LL_PWR_GPIO_BIT_4 + * @arg @ref LL_PWR_GPIO_BIT_5 + * @arg @ref LL_PWR_GPIO_BIT_6 + * @arg @ref LL_PWR_GPIO_BIT_7 + * @arg @ref LL_PWR_GPIO_BIT_8 + * @arg @ref LL_PWR_GPIO_BIT_9 + * @arg @ref LL_PWR_GPIO_BIT_10 + * @arg @ref LL_PWR_GPIO_BIT_11 + * @arg @ref LL_PWR_GPIO_BIT_12 + * @arg @ref LL_PWR_GPIO_BIT_13 + * @arg @ref LL_PWR_GPIO_BIT_14 + * @arg @ref LL_PWR_GPIO_BIT_15 + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber) +{ + CLEAR_BIT(*((__IO uint32_t *)GPIO), GPIONumber); +} + +/** + * @brief Check if GPIO pull-up state is enabled + * @rmtoll PUCRA PU0-15 LL_PWR_IsEnabledGPIOPullUp\n + * PUCRB PU0-15 LL_PWR_IsEnabledGPIOPullUp\n + * PUCRC PU0-15 LL_PWR_IsEnabledGPIOPullUp\n + * PUCRD PU0-15 LL_PWR_IsEnabledGPIOPullUp\n + * PUCRE PU0-15 LL_PWR_IsEnabledGPIOPullUp\n + * PUCRH PU0-15 LL_PWR_IsEnabledGPIOPullUp + * @param GPIO This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_A + * @arg @ref LL_PWR_GPIO_B + * @arg @ref LL_PWR_GPIO_C + * @arg @ref LL_PWR_GPIO_D + * @arg @ref LL_PWR_GPIO_E + * @arg @ref LL_PWR_GPIO_H + * @param GPIONumber This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_BIT_0 + * @arg @ref LL_PWR_GPIO_BIT_1 + * @arg @ref LL_PWR_GPIO_BIT_2 + * @arg @ref LL_PWR_GPIO_BIT_3 + * @arg @ref LL_PWR_GPIO_BIT_4 + * @arg @ref LL_PWR_GPIO_BIT_5 + * @arg @ref LL_PWR_GPIO_BIT_6 + * @arg @ref LL_PWR_GPIO_BIT_7 + * @arg @ref LL_PWR_GPIO_BIT_8 + * @arg @ref LL_PWR_GPIO_BIT_9 + * @arg @ref LL_PWR_GPIO_BIT_10 + * @arg @ref LL_PWR_GPIO_BIT_11 + * @arg @ref LL_PWR_GPIO_BIT_12 + * @arg @ref LL_PWR_GPIO_BIT_13 + * @arg @ref LL_PWR_GPIO_BIT_14 + * @arg @ref LL_PWR_GPIO_BIT_15 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber) +{ + return ((READ_BIT(*((__IO uint32_t *)GPIO), GPIONumber) == (GPIONumber)) ? 1UL : 0UL); +} + +/** + * @brief Enable GPIO pull-down state in Standby and Shutdown modes + * @note Some pins are not configurable for pulling in Standby and Shutdown + * modes. Refer to reference manual for available pins and ports. + * @rmtoll PDCRA PD0-15 LL_PWR_EnableGPIOPullDown\n + * PDCRB PD0-15 LL_PWR_EnableGPIOPullDown\n + * PDCRC PD0-15 LL_PWR_EnableGPIOPullDown\n + * PDCRD PD0-15 LL_PWR_EnableGPIOPullDown\n + * PDCRE PD0-15 LL_PWR_EnableGPIOPullDown\n + * PDCRH PD0-15 LL_PWR_EnableGPIOPullDown + * @param GPIO This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_A + * @arg @ref LL_PWR_GPIO_B + * @arg @ref LL_PWR_GPIO_C + * @arg @ref LL_PWR_GPIO_D + * @arg @ref LL_PWR_GPIO_E + * @arg @ref LL_PWR_GPIO_H + * @param GPIONumber This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_BIT_0 + * @arg @ref LL_PWR_GPIO_BIT_1 + * @arg @ref LL_PWR_GPIO_BIT_2 + * @arg @ref LL_PWR_GPIO_BIT_3 + * @arg @ref LL_PWR_GPIO_BIT_4 + * @arg @ref LL_PWR_GPIO_BIT_5 + * @arg @ref LL_PWR_GPIO_BIT_6 + * @arg @ref LL_PWR_GPIO_BIT_7 + * @arg @ref LL_PWR_GPIO_BIT_8 + * @arg @ref LL_PWR_GPIO_BIT_9 + * @arg @ref LL_PWR_GPIO_BIT_10 + * @arg @ref LL_PWR_GPIO_BIT_11 + * @arg @ref LL_PWR_GPIO_BIT_12 + * @arg @ref LL_PWR_GPIO_BIT_13 + * @arg @ref LL_PWR_GPIO_BIT_14 + * @arg @ref LL_PWR_GPIO_BIT_15 + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber) +{ + SET_BIT(*((__IO uint32_t *)(GPIO + 4UL)), GPIONumber); +} + +/** + * @brief Disable GPIO pull-down state in Standby and Shutdown modes + * @note Some pins are not configurable for pulling in Standby and Shutdown + * modes. Refer to reference manual for available pins and ports. + * @rmtoll PDCRA PD0-15 LL_PWR_DisableGPIOPullDown\n + * PDCRB PD0-15 LL_PWR_DisableGPIOPullDown\n + * PDCRC PD0-15 LL_PWR_DisableGPIOPullDown\n + * PDCRD PD0-15 LL_PWR_DisableGPIOPullDown\n + * PDCRE PD0-15 LL_PWR_DisableGPIOPullDown\n + * PDCRH PD0-15 LL_PWR_DisableGPIOPullDown + * @param GPIO This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_A + * @arg @ref LL_PWR_GPIO_B + * @arg @ref LL_PWR_GPIO_C + * @arg @ref LL_PWR_GPIO_D + * @arg @ref LL_PWR_GPIO_E + * @arg @ref LL_PWR_GPIO_H + * @param GPIONumber This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_BIT_0 + * @arg @ref LL_PWR_GPIO_BIT_1 + * @arg @ref LL_PWR_GPIO_BIT_2 + * @arg @ref LL_PWR_GPIO_BIT_3 + * @arg @ref LL_PWR_GPIO_BIT_4 + * @arg @ref LL_PWR_GPIO_BIT_5 + * @arg @ref LL_PWR_GPIO_BIT_6 + * @arg @ref LL_PWR_GPIO_BIT_7 + * @arg @ref LL_PWR_GPIO_BIT_8 + * @arg @ref LL_PWR_GPIO_BIT_9 + * @arg @ref LL_PWR_GPIO_BIT_10 + * @arg @ref LL_PWR_GPIO_BIT_11 + * @arg @ref LL_PWR_GPIO_BIT_12 + * @arg @ref LL_PWR_GPIO_BIT_13 + * @arg @ref LL_PWR_GPIO_BIT_14 + * @arg @ref LL_PWR_GPIO_BIT_15 + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber) +{ + CLEAR_BIT(*((__IO uint32_t *)(GPIO + 4UL)), GPIONumber); +} + +/** + * @brief Check if GPIO pull-down state is enabled + * @rmtoll PDCRA PD0-15 LL_PWR_IsEnabledGPIOPullDown\n + * PDCRB PD0-15 LL_PWR_IsEnabledGPIOPullDown\n + * PDCRC PD0-15 LL_PWR_IsEnabledGPIOPullDown\n + * PDCRD PD0-15 LL_PWR_IsEnabledGPIOPullDown\n + * PDCRE PD0-15 LL_PWR_IsEnabledGPIOPullDown\n + * PDCRH PD0-15 LL_PWR_IsEnabledGPIOPullDown + * @param GPIO This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_A + * @arg @ref LL_PWR_GPIO_B + * @arg @ref LL_PWR_GPIO_C + * @arg @ref LL_PWR_GPIO_D + * @arg @ref LL_PWR_GPIO_E + * @arg @ref LL_PWR_GPIO_H + * @param GPIONumber This parameter can be one of the following values: + * @arg @ref LL_PWR_GPIO_BIT_0 + * @arg @ref LL_PWR_GPIO_BIT_1 + * @arg @ref LL_PWR_GPIO_BIT_2 + * @arg @ref LL_PWR_GPIO_BIT_3 + * @arg @ref LL_PWR_GPIO_BIT_4 + * @arg @ref LL_PWR_GPIO_BIT_5 + * @arg @ref LL_PWR_GPIO_BIT_6 + * @arg @ref LL_PWR_GPIO_BIT_7 + * @arg @ref LL_PWR_GPIO_BIT_8 + * @arg @ref LL_PWR_GPIO_BIT_9 + * @arg @ref LL_PWR_GPIO_BIT_10 + * @arg @ref LL_PWR_GPIO_BIT_11 + * @arg @ref LL_PWR_GPIO_BIT_12 + * @arg @ref LL_PWR_GPIO_BIT_13 + * @arg @ref LL_PWR_GPIO_BIT_14 + * @arg @ref LL_PWR_GPIO_BIT_15 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber) +{ + return ((READ_BIT(*((__IO uint32_t *)(GPIO + 4UL)), GPIONumber) == (GPIONumber)) ? 1UL : 0UL); +} + +#if defined(PWR_CR5_SMPSEN) +/** + * @brief Set BOR configuration + * @rmtoll CR5 BORHC LL_PWR_SetBORConfig + * @param BORConfiguration This parameter can be one of the following values: + * @arg @ref LL_PWR_BOR_SYSTEM_RESET + * @arg @ref LL_PWR_BOR_SMPS_FORCE_BYPASS + */ +__STATIC_INLINE void LL_PWR_SetBORConfig(uint32_t BORConfiguration) +{ + MODIFY_REG(PWR->CR5, PWR_CR5_BORHC, BORConfiguration); +} + +/** + * @brief Get BOR configuration + * @rmtoll CR5 BORHC LL_PWR_GetBORConfig + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_BOR_SYSTEM_RESET + * @arg @ref LL_PWR_BOR_SMPS_FORCE_BYPASS + */ +__STATIC_INLINE uint32_t LL_PWR_GetBORConfig(void) +{ + return (uint32_t)(READ_BIT(PWR->CR5, PWR_CR5_BORHC)); +} +#endif /* PWR_CR5_SMPSEN */ + +/** + * @} + */ + +#if defined(PWR_CR5_SMPSEN) +/** @defgroup PWR_LL_EF_Configuration_SMPS Configuration of SMPS + * @{ + */ + +/** + * @brief Set SMPS operating mode + * @note When SMPS step down converter SMPS mode is enabled, + * it is good practice to enable the BORH to monitor the supply: + * in this case, when the supply drops below the SMPS step down + * converter SMPS mode operating supply level, + * switching on the fly is performed automaticcaly + * and interruption is generated. + * Refer to function @ref LL_PWR_SetBORConfig(). + * @note Occurrence of SMPS step down converter forced in bypass mode + * can be monitored by flag and interruption. + * Refer to functions + * @ref LL_PWR_IsActiveFlag_SMPSFB(), @ref LL_PWR_ClearFlag_SMPSFB(), + * @ref LL_PWR_EnableIT_BORH_SMPSFB(). + * @rmtoll CR5 SMPSEN LL_PWR_SMPS_SetMode \n + * CR5 SMPSBEN LL_PWR_SMPS_SetMode + * @param OperatingMode This parameter can be one of the following values: + * @arg @ref LL_PWR_SMPS_BYPASS + * @arg @ref LL_PWR_SMPS_STEP_DOWN (1) + * + * (1) SMPS operating mode step down or open depends on system low-power mode: + * - step down mode if system low power mode is run, LP run or stop0, + * - open mode if system low power mode is Stop1, Stop2, Standby or Shutdown + * @retval None + */ +__STATIC_INLINE void LL_PWR_SMPS_SetMode(uint32_t OperatingMode) +{ + /* Note: Operation on bits performed to keep compatibility of literals */ + /* for all SMPS operating mode functions: */ + /* "LL_PWR_SMPS_SetMode()", "LL_PWR_SMPS_GetMode()" */ + /* and "LL_PWR_SMPS_GetEffectiveMode()". */ + MODIFY_REG(PWR->CR5, PWR_CR5_SMPSEN, (OperatingMode & PWR_SR2_SMPSF) << (PWR_CR5_SMPSEN_Pos - PWR_SR2_SMPSF_Pos)); +} + +/** + * @brief Get SMPS operating mode + * @rmtoll CR5 SMPSEN LL_PWR_SMPS_GetMode \n + * CR5 SMPSBEN LL_PWR_SMPS_GetMode + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_SMPS_BYPASS + * @arg @ref LL_PWR_SMPS_STEP_DOWN (1) + * + * (1) SMPS operating mode step down or open depends on system low-power mode: + * - step down mode if system low power mode is run, LP run or stop0, + * - open mode if system low power mode is Stop1, Stop2, Standby or Shutdown + */ +__STATIC_INLINE uint32_t LL_PWR_SMPS_GetMode(void) +{ + /* Note: Operation on bits performed to keep compatibility of literals */ + /* for all SMPS operating mode functions: */ + /* "LL_PWR_SMPS_SetMode()", "LL_PWR_SMPS_GetMode()" */ + /* and "LL_PWR_SMPS_GetEffectiveMode()". */ + uint32_t OperatingMode = (READ_BIT(PWR->CR5, PWR_CR5_SMPSEN) >> (PWR_CR5_SMPSEN_Pos - PWR_SR2_SMPSF_Pos)); + + OperatingMode = (OperatingMode | ((~OperatingMode >> 1U) & PWR_SR2_SMPSBF)); + + return OperatingMode; +} + +/** + * @brief Get SMPS effective operating mode + * @note SMPS operating mode can be changed by hardware, therefore + * requested operating mode can differ from effective low power mode. + * - dependency on system low-power mode: + * - step down mode if system low power mode is run, LP run or stop0, + * - open mode if system low power mode is Stop1, Stop2, Standby or Shutdown + * - dependency on BOR level: + * - bypass mode if supply voltage drops below BOR level + * @note This functions check flags of SMPS operating modes step down + * and bypass. If the SMPS is not among these 2 operating modes, + * then it can be in mode off or open. + * @rmtoll SR2 SMPSF LL_PWR_SMPS_GetEffectiveMode \n + * SR2 SMPSBF LL_PWR_SMPS_GetEffectiveMode + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_SMPS_BYPASS + * @arg @ref LL_PWR_SMPS_STEP_DOWN (1) + * + * (1) SMPS operating mode step down or open depends on system low-power mode: + * - step down mode if system low power mode is run, LP run or stop0, + * - open mode if system low power mode is Stop1, Stop2, Standby or Shutdown + */ +__STATIC_INLINE uint32_t LL_PWR_SMPS_GetEffectiveMode(void) +{ + return (uint32_t)(READ_BIT(PWR->SR2, (PWR_SR2_SMPSF | PWR_SR2_SMPSBF))); +} + +/** + * @brief SMPS step down converter enable + * @note This function can be used for specific usage of the SMPS, + * for general usage of the SMPS the function + * @ref LL_PWR_SMPS_SetMode() should be used instead. + * @rmtoll CR5 SMPSEN LL_PWR_SMPS_Enable + * @retval None + */ +__STATIC_INLINE void LL_PWR_SMPS_Enable(void) +{ + SET_BIT(PWR->CR5, PWR_CR5_SMPSEN); +} + +/** + * @brief SMPS step down converter enable + * @note This function can be used for specific usage of the SMPS, + * for general usage of the SMPS the function + * @ref LL_PWR_SMPS_SetMode() should be used instead. + * @rmtoll CR5 SMPSEN LL_PWR_SMPS_Disable + * @retval None + */ +__STATIC_INLINE void LL_PWR_SMPS_Disable(void) +{ + CLEAR_BIT(PWR->CR5, PWR_CR5_SMPSEN); +} + +/** + * @brief Check if the SMPS step down converter is enabled + * @rmtoll CR5 SMPSEN LL_PWR_SMPS_IsEnabled + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_SMPS_IsEnabled(void) +{ + return ((READ_BIT(PWR->CR5, PWR_CR5_SMPSEN) == (PWR_CR5_SMPSEN)) ? 1UL : 0UL); +} + +/** + * @brief Set SMPS step down converter supply startup current selection + * @rmtoll CR5 SMPSSC LL_PWR_SMPS_SetStartupCurrent + * @param StartupCurrent This parameter can be one of the following values: + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_80MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_100MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_120MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_140MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_160MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_180MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_200MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_220MA + * @retval None + */ +__STATIC_INLINE void LL_PWR_SMPS_SetStartupCurrent(uint32_t StartupCurrent) +{ + MODIFY_REG(PWR->CR5, PWR_CR5_SMPSSC, StartupCurrent); +} + +/** + * @brief Get SMPS step down converter supply startup current selection + * @rmtoll CR5 SMPSSC LL_PWR_SMPS_GetStartupCurrent + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_80MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_100MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_120MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_140MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_160MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_180MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_200MA + * @arg @ref LL_PWR_SMPS_STARTUP_CURRENT_220MA + */ +__STATIC_INLINE uint32_t LL_PWR_SMPS_GetStartupCurrent(void) +{ + return (uint32_t)(READ_BIT(PWR->CR5, PWR_CR5_SMPSSC)); +} + +/** + * @brief Set SMPS step down converter output voltage scaling + * @note SMPS output voltage is calibrated in production, + * calibration parameters are applied to the voltage level parameter + * to reach the requested voltage value. + * @rmtoll CR5 SMPSVOS LL_PWR_SMPS_SetOutputVoltageLevel + * @param OutputVoltageLevel This parameter can be one of the following values: + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V20 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V25 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V30 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V35 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V40 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V45 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V50 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V55 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V60 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V65 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V70 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V75 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V80 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V85 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V90 + * @retval None + */ +__STATIC_INLINE void LL_PWR_SMPS_SetOutputVoltageLevel(uint32_t OutputVoltageLevel) +{ + __IO const uint32_t OutputVoltageLevel_calibration = (((*SMPS_VOLTAGE_CAL_ADDR) & SMPS_VOLTAGE_CAL) >> SMPS_VOLTAGE_CAL_POS); /* SMPS output voltage level calibrated in production */ + int32_t TrimmingSteps; /* Trimming steps between theoretical output voltage and calibrated output voltage */ + int32_t OutputVoltageLevelTrimmed; /* SMPS output voltage level after calibration: trimming value added to required level */ + + if (OutputVoltageLevel_calibration == 0UL) + { + /* Device with SMPS output voltage not calibrated in production: Apply output voltage value directly */ + + /* Update register */ + MODIFY_REG(PWR->CR5, PWR_CR5_SMPSVOS, OutputVoltageLevel); + } + else + { + /* Device with SMPS output voltage calibrated in production: Apply output voltage value after correction by calibration value */ + + TrimmingSteps = ((int32_t)OutputVoltageLevel_calibration - (int32_t)(LL_PWR_SMPS_OUTPUT_VOLTAGE_1V50 >> PWR_CR5_SMPSVOS_Pos)); + OutputVoltageLevelTrimmed = ((int32_t)((uint32_t)(OutputVoltageLevel >> PWR_CR5_SMPSVOS_Pos)) + (int32_t)TrimmingSteps); + + /* Clamp value to voltage trimming bitfield range */ + if (OutputVoltageLevelTrimmed < 0) + { + OutputVoltageLevelTrimmed = 0; + } + else + { + if (OutputVoltageLevelTrimmed > (int32_t)PWR_CR5_SMPSVOS) + { + OutputVoltageLevelTrimmed = (int32_t)PWR_CR5_SMPSVOS; + } + } + + /* Update register */ + MODIFY_REG(PWR->CR5, PWR_CR5_SMPSVOS, (uint32_t)OutputVoltageLevelTrimmed); + } +} + +/** + * @brief Get SMPS step down converter output voltage scaling + * @note SMPS output voltage is calibrated in production, + * calibration parameters are applied to the voltage level parameter + * to return the effective voltage value. + * @rmtoll CR5 SMPSVOS LL_PWR_SMPS_GetOutputVoltageLevel + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V20 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V25 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V30 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V35 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V40 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V45 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V50 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V55 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V60 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V65 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V70 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V75 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V80 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V85 + * @arg @ref LL_PWR_SMPS_OUTPUT_VOLTAGE_1V90 + */ +__STATIC_INLINE uint32_t LL_PWR_SMPS_GetOutputVoltageLevel(void) +{ + __IO const uint32_t OutputVoltageLevel_calibration = (((*SMPS_VOLTAGE_CAL_ADDR) & SMPS_VOLTAGE_CAL) >> SMPS_VOLTAGE_CAL_POS); /* SMPS output voltage level calibrated in production */ + int32_t TrimmingSteps; /* Trimming steps between theoretical output voltage and calibrated output voltage */ + int32_t OutputVoltageLevelTrimmed; /* SMPS output voltage level after calibration: trimming value added to required level */ + + if (OutputVoltageLevel_calibration == 0UL) + { + /* Device with SMPS output voltage not calibrated in production: Return output voltage value directly */ + + return (uint32_t)(READ_BIT(PWR->CR5, PWR_CR5_SMPSVOS)); + } + else + { + /* Device with SMPS output voltage calibrated in production: Return output voltage value after correction by calibration value */ + + TrimmingSteps = ((int32_t)OutputVoltageLevel_calibration - (int32_t)(LL_PWR_SMPS_OUTPUT_VOLTAGE_1V50 >> PWR_CR5_SMPSVOS_Pos)); /* Trimming steps between theoretical output voltage and calibrated output voltage */ + + OutputVoltageLevelTrimmed = ((int32_t)((uint32_t)READ_BIT(PWR->CR5, PWR_CR5_SMPSVOS)) - TrimmingSteps); + + /* Clamp value to voltage range */ + if (OutputVoltageLevelTrimmed < 0) + { + OutputVoltageLevelTrimmed = (int32_t)LL_PWR_SMPS_OUTPUT_VOLTAGE_1V20; + } + else + { + if (OutputVoltageLevelTrimmed > (int32_t)PWR_CR5_SMPSVOS) + { + OutputVoltageLevelTrimmed = (int32_t)LL_PWR_SMPS_OUTPUT_VOLTAGE_1V90; + } + } + + return (uint32_t)OutputVoltageLevelTrimmed; + } +} + +/** + * @} + */ +#endif /* PWR_CR5_SMPSEN */ + +/** @defgroup PWR_LL_EF_Configuration_Multicore Configuration of multicore, intended to be executed by CPU1 + * @{ + */ + +/** + * @brief Boot CPU2 after reset or wakeup from stop or standby modes + * @rmtoll CR4 C2BOOT LL_PWR_EnableBootC2 + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableBootC2(void) +{ + SET_BIT(PWR->CR4, PWR_CR4_C2BOOT); +} + +/** + * @brief Release bit to boot CPU2 after reset or wakeup from stop or standby + * modes + * @rmtoll CR4 C2BOOT LL_PWR_DisableBootC2 + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableBootC2(void) +{ + CLEAR_BIT(PWR->CR4, PWR_CR4_C2BOOT); +} + +/** + * @brief Check if bit to boot CPU2 after reset or wakeup from stop or standby + * modes is set + * @rmtoll CR4 C2BOOT LL_PWR_IsEnabledBootC2 + * @retval State of bit (1 or 0) + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledBootC2(void) +{ + return ((READ_BIT(PWR->CR4, PWR_CR4_C2BOOT) == (PWR_CR4_C2BOOT)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup PWR_LL_EF_Configuration_CPU2 Configuration of CPU2, intended to be executed by CPU2 + * @{ + */ + +/** + * @brief Set Low-Power mode for CPU2 + * @rmtoll C2CR1 LPMS LL_C2_PWR_SetPowerMode + * @param LowPowerMode This parameter can be one of the following values: + * @arg @ref LL_PWR_MODE_STOP0 + * @arg @ref LL_PWR_MODE_STOP1 + * @arg @ref LL_PWR_MODE_STOP2 (*) + * @arg @ref LL_PWR_MODE_STANDBY + * @arg @ref LL_PWR_MODE_SHUTDOWN + * + * (*) Not available on devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_SetPowerMode(uint32_t LowPowerMode) +{ + MODIFY_REG(PWR->C2CR1, PWR_C2CR1_LPMS, LowPowerMode); +} + +/** + * @brief Get Low-Power mode for CPU2 + * @rmtoll C2CR1 LPMS LL_C2_PWR_GetPowerMode + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_MODE_STOP0 + * @arg @ref LL_PWR_MODE_STOP1 + * @arg @ref LL_PWR_MODE_STOP2 (*) + * @arg @ref LL_PWR_MODE_STANDBY + * @arg @ref LL_PWR_MODE_SHUTDOWN + * + * (*) Not available on devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx + */ +__STATIC_INLINE uint32_t LL_C2_PWR_GetPowerMode(void) +{ + return (uint32_t)(READ_BIT(PWR->C2CR1, PWR_C2CR1_LPMS)); +} + +/** + * @brief Set flash power-down mode during low-power run mode for CPU2 + * @rmtoll C2CR1 FPDR LL_C2_PWR_SetFlashPowerModeLPRun + * @param FlashLowPowerMode This parameter can be one of the following values: + * @arg @ref LL_PWR_FLASH_LPRUN_MODE_IDLE + * @arg @ref LL_PWR_FLASH_LPRUN_MODE_POWER_DOWN + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_SetFlashPowerModeLPRun(uint32_t FlashLowPowerMode) +{ + /* Unlock bit FPDR */ + WRITE_REG(PWR->C2CR1, 0x0000C1B0UL); + + /* Update bit FPDR */ + MODIFY_REG(PWR->C2CR1, PWR_C2CR1_FPDR, FlashLowPowerMode); +} + +/** + * @brief Get flash power-down mode during low-power run mode for CPU2 + * @rmtoll C2CR1 FPDR LL_C2_PWR_GetFlashPowerModeLPRun + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_FLASH_LPRUN_MODE_IDLE + * @arg @ref LL_PWR_FLASH_LPRUN_MODE_POWER_DOWN + */ +__STATIC_INLINE uint32_t LL_C2_PWR_GetFlashPowerModeLPRun(void) +{ + return (uint32_t)(READ_BIT(PWR->C2CR1, PWR_C2CR1_FPDR)); +} + +/** + * @brief Set flash power-down mode during sleep mode for CPU2 + * @rmtoll C2CR1 FPDS LL_C2_PWR_SetFlashPowerModeSleep + * @param FlashLowPowerMode This parameter can be one of the following values: + * @arg @ref LL_PWR_FLASH_SLEEP_MODE_IDLE + * @arg @ref LL_PWR_FLASH_SLEEP_MODE_POWER_DOWN + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_SetFlashPowerModeSleep(uint32_t FlashLowPowerMode) +{ + MODIFY_REG(PWR->C2CR1, PWR_C2CR1_FPDS, FlashLowPowerMode); +} + +/** + * @brief Get flash power-down mode during sleep mode for CPU2 + * @rmtoll C2CR1 FPDS LL_C2_PWR_GetFlashPowerModeSleep + * @retval Returned value can be one of the following values: + * @arg @ref LL_PWR_FLASH_SLEEP_MODE_IDLE + * @arg @ref LL_PWR_FLASH_SLEEP_MODE_POWER_DOWN + */ +__STATIC_INLINE uint32_t LL_C2_PWR_GetFlashPowerModeSleep(void) +{ + return (uint32_t)(READ_BIT(PWR->C2CR1, PWR_C2CR1_FPDS)); +} + + +/** + * @brief Enable Internal Wake-up line for CPU2 + * @rmtoll C2CR3 EIWUL LL_C2_PWR_EnableInternWU + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_EnableInternWU(void) +{ + SET_BIT(PWR->C2CR3, PWR_C2CR3_EIWUL); +} + +/** + * @brief Disable Internal Wake-up line for CPU2 + * @rmtoll C2CR3 EIWUL LL_C2_PWR_DisableInternWU + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_DisableInternWU(void) +{ + CLEAR_BIT(PWR->C2CR3, PWR_C2CR3_EIWUL); +} + +/** + * @brief Check if Internal Wake-up line is enabled for CPU2 + * @rmtoll C2CR3 EIWUL LL_C2_PWR_IsEnabledInternWU + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_PWR_IsEnabledInternWU(void) +{ + return ((READ_BIT(PWR->C2CR3, PWR_C2CR3_EIWUL) == (PWR_C2CR3_EIWUL)) ? 1UL : 0UL); +} + +/** + * @brief Enable the WakeUp PINx functionality + * @rmtoll C2CR3 EWUP1 LL_C2_PWR_EnableWakeUpPin\n + * C2CR3 EWUP2 LL_C2_PWR_EnableWakeUpPin\n + * C2CR3 EWUP3 LL_C2_PWR_EnableWakeUpPin\n + * C2CR3 EWUP4 LL_C2_PWR_EnableWakeUpPin\n + * C2CR3 EWUP5 LL_C2_PWR_EnableWakeUpPin + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_EnableWakeUpPin(uint32_t WakeUpPin) +{ + SET_BIT(PWR->C2CR3, WakeUpPin); +} + +/** + * @brief Disable the WakeUp PINx functionality + * @rmtoll C2CR3 EWUP1 LL_C2_PWR_DisableWakeUpPin\n + * C2CR3 EWUP2 LL_C2_PWR_DisableWakeUpPin\n + * C2CR3 EWUP3 LL_C2_PWR_DisableWakeUpPin\n + * C2CR3 EWUP4 LL_C2_PWR_DisableWakeUpPin\n + * C2CR3 EWUP5 LL_C2_PWR_DisableWakeUpPin + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_DisableWakeUpPin(uint32_t WakeUpPin) +{ + CLEAR_BIT(PWR->C2CR3, WakeUpPin); +} + +/** + * @brief Check if the WakeUp PINx functionality is enabled + * @rmtoll C2CR3 EWUP1 LL_C2_PWR_IsEnabledWakeUpPin\n + * C2CR3 EWUP2 LL_C2_PWR_IsEnabledWakeUpPin\n + * C2CR3 EWUP3 LL_C2_PWR_IsEnabledWakeUpPin\n + * C2CR3 EWUP4 LL_C2_PWR_IsEnabledWakeUpPin\n + * C2CR3 EWUP5 LL_C2_PWR_IsEnabledWakeUpPin + * @param WakeUpPin This parameter can be one of the following values: + * @arg @ref LL_PWR_WAKEUP_PIN1 + * @arg @ref LL_PWR_WAKEUP_PIN2 (*) + * @arg @ref LL_PWR_WAKEUP_PIN3 (*) + * @arg @ref LL_PWR_WAKEUP_PIN4 + * @arg @ref LL_PWR_WAKEUP_PIN5 (*) + * + * (*) Not available on devices STM32WB50xx, STM32WB35xx, STM32WB30xx, STM32WB15xx, STM32WB10xx, STM32WB1Mxx + * @retval None + */ +__STATIC_INLINE uint32_t LL_C2_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin) +{ + return ((READ_BIT(PWR->C2CR3, WakeUpPin) == (WakeUpPin)) ? 1UL : 0UL); +} + +/** + * @brief Enable pull-up and pull-down configuration for CPU2 + * @rmtoll C2CR3 APC LL_C2_PWR_EnablePUPDCfg + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_EnablePUPDCfg(void) +{ + SET_BIT(PWR->C2CR3, PWR_C2CR3_APC); +} + +/** + * @brief Disable pull-up and pull-down configuration for CPU2 + * @rmtoll C2CR3 APC LL_C2_PWR_DisablePUPDCfg + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_DisablePUPDCfg(void) +{ + CLEAR_BIT(PWR->C2CR3, PWR_C2CR3_APC); +} + +/** + * @brief Check if pull-up and pull-down configuration is enabled for CPU2 + * @rmtoll C2CR3 APC LL_C2_PWR_IsEnabledPUPDCfg + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_PWR_IsEnabledPUPDCfg(void) +{ + return ((READ_BIT(PWR->C2CR3, PWR_C2CR3_APC) == (PWR_C2CR3_APC)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup PWR_LL_EF_Configuration_CPU2_Radio Configuration of radio (BLE or 802.15.4) of CPU2, intended to be executed by CPU2 + * @{ + */ + +/** + * @brief Wakeup BLE controller from its sleep mode + * @note This bit is automatically reset when BLE controller + * exit its sleep mode. + * @rmtoll C2CR1 BLEEWKUP LL_C2_PWR_WakeUp_BLE + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_WakeUp_BLE(void) +{ + SET_BIT(PWR->C2CR1, PWR_C2CR1_BLEEWKUP); +} + +/** + * @brief Check if the BLE controller is woken-up from + * low-power mode. + * @rmtoll C2CR1 BLEEWKUP LL_C2_PWR_IsWokenUp_BLE + * @retval State of bit (1 or 0) (value "0": BLE is not woken-up) + */ +__STATIC_INLINE uint32_t LL_C2_PWR_IsWokenUp_BLE(void) +{ + return ((READ_BIT(PWR->C2CR1, PWR_C2CR1_BLEEWKUP) == (PWR_C2CR1_BLEEWKUP)) ? 1UL : 0UL); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Wakeup 802.15.4 controller from its sleep mode + * @note This bit is automatically reset when 802.15.4 controller + * exit its sleep mode. + * @rmtoll C2CR1 802EWKUP LL_C2_PWR_WakeUp_802_15_4 + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_WakeUp_802_15_4(void) +{ + SET_BIT(PWR->C2CR1, PWR_C2CR1_802EWKUP); +} + +/** + * @brief Check if the 802.15.4 controller is woken-up from + * low-power mode. + * @rmtoll C2CR1 802EWKUP LL_C2_PWR_IsWokenUp_802_15_4 + * @retval State of bit (1 or 0) (value "0": 802.15.4 is not woken-up) + */ +__STATIC_INLINE uint32_t LL_C2_PWR_IsWokenUp_802_15_4(void) +{ + return ((READ_BIT(PWR->C2CR1, PWR_C2CR1_802EWKUP) == (PWR_C2CR1_802EWKUP)) ? 1UL : 0UL); +} +#endif /* PWR_CR3_E802A */ + +/** + * @} + */ + +/** @defgroup PWR_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Get Internal Wake-up line Flag + * @rmtoll SR1 WUFI LL_PWR_IsActiveFlag_InternWU + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_InternWU(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_WUFI) == (PWR_SR1_WUFI)) ? 1UL : 0UL); +} + +#if defined(PWR_CR3_EWUP5) +/** + * @brief Get Wake-up Flag 5 + * @rmtoll SR1 WUF5 LL_PWR_IsActiveFlag_WU5 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU5(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_WUF5) == (PWR_SR1_WUF5)) ? 1UL : 0UL); +} +#endif /* PWR_CR3_EWUP5 */ + +/** + * @brief Get Wake-up Flag 4 + * @rmtoll SR1 WUF4 LL_PWR_IsActiveFlag_WU4 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU4(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_WUF4) == (PWR_SR1_WUF4)) ? 1UL : 0UL); +} + +#if defined(PWR_CR3_EWUP3) +/** + * @brief Get Wake-up Flag 3 + * @rmtoll SR1 WUF3 LL_PWR_IsActiveFlag_WU3 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU3(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_WUF3) == (PWR_SR1_WUF3)) ? 1UL : 0UL); +} +#endif /* PWR_CR3_EWUP3 */ + +#if defined(PWR_CR3_EWUP2) +/** + * @brief Get Wake-up Flag 2 + * @rmtoll SR1 WUF2 LL_PWR_IsActiveFlag_WU2 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU2(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_WUF2) == (PWR_SR1_WUF2)) ? 1UL : 0UL); +} +#endif /* PWR_CR3_EWUP2 */ + +/** + * @brief Get Wake-up Flag 1 + * @rmtoll SR1 WUF1 LL_PWR_IsActiveFlag_WU1 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU1(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_WUF1) == (PWR_SR1_WUF1)) ? 1UL : 0UL); +} + +/** + * @brief Clear Wake-up Flags + * @rmtoll SCR CWUF LL_PWR_ClearFlag_WU + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_WU(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CWUF); +} + +#if defined(PWR_CR3_EWUP5) +/** + * @brief Clear Wake-up Flag 5 + * @rmtoll SCR CWUF5 LL_PWR_ClearFlag_WU5 + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_WU5(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CWUF5); +} +#endif /* PWR_CR3_EWUP5 */ + +/** + * @brief Clear Wake-up Flag 4 + * @rmtoll SCR CWUF4 LL_PWR_ClearFlag_WU4 + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_WU4(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CWUF4); +} + +#if defined(PWR_CR3_EWUP3) +/** + * @brief Clear Wake-up Flag 3 + * @rmtoll SCR CWUF3 LL_PWR_ClearFlag_WU3 + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_WU3(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CWUF3); +} +#endif /* PWR_CR3_EWUP3 */ + +#if defined(PWR_CR3_EWUP2) +/** + * @brief Clear Wake-up Flag 2 + * @rmtoll SCR CWUF2 LL_PWR_ClearFlag_WU2 + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_WU2(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CWUF2); +} +#endif /* PWR_CR3_EWUP2 */ + +/** + * @brief Clear Wake-up Flag 1 + * @rmtoll SCR CWUF1 LL_PWR_ClearFlag_WU1 + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_WU1(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CWUF1); +} + + +/** + * @brief Indicate whether VDDA voltage is below or above PVM3 threshold + * @rmtoll SR2 PVMO3 LL_PWR_IsActiveFlag_PVMO3 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVMO3(void) +{ + return ((READ_BIT(PWR->SR2, PWR_SR2_PVMO3) == (PWR_SR2_PVMO3)) ? 1UL : 0UL); +} + +#if defined(PWR_CR2_PVME1) +/** + * @brief Indicate whether VDDUSB voltage is below or above PVM1 threshold + * @rmtoll SR2 PVMO1 LL_PWR_IsActiveFlag_PVMO1 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVMO1(void) +{ + return ((READ_BIT(PWR->SR2, PWR_SR2_PVMO1) == (PWR_SR2_PVMO1)) ? 1UL : 0UL); +} +#endif /* PWR_CR2_PVME1 */ + +/** + * @brief Indicate whether VDD voltage is below or above the selected PVD threshold + * @rmtoll SR2 PVDO LL_PWR_IsActiveFlag_PVDO + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVDO(void) +{ + return ((READ_BIT(PWR->SR2, PWR_SR2_PVDO) == (PWR_SR2_PVDO)) ? 1UL : 0UL); +} + +#if defined(PWR_CR1_VOS) +/** + * @brief Indicate whether the regulator is ready in the selected voltage range or if its output voltage is still changing to the required voltage level + * @rmtoll SR2 VOSF LL_PWR_IsActiveFlag_VOS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VOS(void) +{ + return ((READ_BIT(PWR->SR2, PWR_SR2_VOSF) == (PWR_SR2_VOSF)) ? 1UL : 0UL); +} +#endif /* PWR_CR1_VOS */ + +/** + * @brief Indicate whether the regulator is ready in main mode or is in low-power mode + * @note Take care, return value "0" means the regulator is ready. Return value "1" means the output voltage range is still changing. + * @rmtoll SR2 REGLPF LL_PWR_IsActiveFlag_REGLPF + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_REGLPF(void) +{ + return ((READ_BIT(PWR->SR2, PWR_SR2_REGLPF) == (PWR_SR2_REGLPF)) ? 1UL : 0UL); +} + +/** + * @brief Indicate whether or not the low-power regulator is ready + * @rmtoll SR2 REGLPS LL_PWR_IsActiveFlag_REGLPS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_REGLPS(void) +{ + return ((READ_BIT(PWR->SR2, PWR_SR2_REGLPS) == (PWR_SR2_REGLPS)) ? 1UL : 0UL); +} + +/** + * @brief Get BORH interrupt flag + * @rmtoll SR1 BORHF LL_PWR_IsActiveFlag_BORH + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_BORH(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_BORHF) == (PWR_SR1_BORHF)) ? 1UL : 0UL); +} + +/** + * @brief Clear BORH interrupt flag + * @rmtoll SCR CBORHF LL_PWR_ClearFlag_BORH + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_BORH(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CBORHF); +} + +/** + * @} + */ + +#if defined(PWR_CR5_SMPSEN) +/** @defgroup PWR_LL_EF_FLAG_Management_SMPS FLAG management for SMPS + * @{ + */ + +/** + * @brief Get SMPS step down converter forced in bypass mode interrupt flag + * @note To activate flag of SMPS step down converter forced in bypass mode + * by BORH, BOR must be preliminarily configured to control SMPS + * operating mode. + * Refer to function @ref LL_PWR_SetBORConfig(). + * @rmtoll SR1 SMPSFBF LL_PWR_IsActiveFlag_SMPSFB + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_SMPSFB(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_SMPSFBF) == (PWR_SR1_SMPSFBF)) ? 1UL : 0UL); +} + +/** + * @brief Clear SMPS step down converter forced in bypass mode interrupt flag + * @note To activate flag of SMPS step down converter forced in bypass mode + * by BORH, BOR must be preliminarily configured to control SMPS + * operating mode. + * Refer to function @ref LL_PWR_SetBORConfig(). + * @rmtoll SCR CSMPSFBF LL_PWR_ClearFlag_SMPSFB + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_SMPSFB(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CSMPSFBF); +} + +/** + * @} + */ +#endif /* PWR_CR5_SMPSEN */ + +/** @defgroup PWR_LL_EF_FLAG_Management_Radio FLAG management for radio (BLE or 802.15.4) + * @{ + */ + +/** + * @brief Get BLE wakeup interrupt flag + * @rmtoll SR1 BLEWUF LL_PWR_IsActiveFlag_BLEWU + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_BLEWU(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_BLEWUF) == (PWR_SR1_BLEWUF)) ? 1UL : 0UL); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Get 802.15.4 wakeup interrupt flag + * @rmtoll SR1 802WUF LL_PWR_IsActiveFlag_802WU + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_802WU(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_802WUF) == (PWR_SR1_802WUF)) ? 1UL : 0UL); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Get BLE end of activity interrupt flag + * @rmtoll SR1 BLEAF LL_PWR_IsActiveFlag_BLEA + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_BLEA(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_BLEAF) == (PWR_SR1_BLEAF)) ? 1UL : 0UL); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Get 802.15.4 end of activity interrupt flag + * @rmtoll SR1 802AF LL_PWR_IsActiveFlag_802A + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_802A(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_802AF) == (PWR_SR1_802AF)) ? 1UL : 0UL); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Get critical radio phase end of activity interrupt flag + * @rmtoll SR1 CRPEF LL_PWR_IsActiveFlag_CRPE + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_CRPE(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_CRPEF) == (PWR_SR1_CRPEF)) ? 1UL : 0UL); +} + +/** + * @brief Get critical radio system phase flag + * @rmtoll EXTSCR CRPF LL_PWR_IsActiveFlag_CRP + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_CRP(void) +{ + return ((READ_BIT(PWR->EXTSCR, PWR_EXTSCR_CRPF) == (PWR_EXTSCR_CRPF)) ? 1UL : 0UL); +} + +/** + * @brief Clear BLE wakeup interrupt flag + * @rmtoll SCR BLEWU LL_PWR_ClearFlag_BLEWU + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_BLEWU(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CBLEWUF); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Clear 802.15.4 wakeup interrupt flag + * @rmtoll SCR 802WU LL_PWR_ClearFlag_802WU + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_802WU(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_C802WUF); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Clear BLE end of activity interrupt flag + * @rmtoll SCR BLEAF LL_PWR_ClearFlag_BLEA + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_BLEA(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CBLEAF); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Clear 802.15.4 end of activity interrupt flag + * @rmtoll SCR 802AF LL_PWR_ClearFlag_802A + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_802A(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_C802AF); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Clear critical radio phase end of activity interrupt flag + * @rmtoll SCR CCRPEF LL_PWR_ClearFlag_CRPE + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_CRPE(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CCRPEF); +} + +/** + * @brief Clear critical radio system phase flag + * @rmtoll EXTSCR CCRP LL_PWR_ClearFlag_CRP + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_CRP(void) +{ + WRITE_REG(PWR->EXTSCR, PWR_EXTSCR_CCRPF); +} + +/** + * @} + */ + +/** @defgroup PWR_LL_EF_FLAG_Management_Multicore FLAG management for multicore + * @{ + */ + +/** + * @brief Get CPU2 hold interrupt flag + * @rmtoll SCR CC2HF LL_PWR_IsActiveFlag_C2H + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_C2H(void) +{ + return ((READ_BIT(PWR->SR1, PWR_SR1_C2HF) == (PWR_SR1_C2HF)) ? 1UL : 0UL); +} + +/** + * @brief Get system stop flag for CPU1 + * @rmtoll EXTSCR C1STOPF LL_PWR_IsActiveFlag_C1STOP + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_C1STOP(void) +{ + return ((READ_BIT(PWR->EXTSCR, PWR_EXTSCR_C1STOPF) == (PWR_EXTSCR_C1STOPF)) ? 1UL : 0UL); +} + +/** + * @brief Get system standby flag for CPU1 + * @rmtoll EXTSCR C1SBF LL_PWR_IsActiveFlag_C1SB + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_C1SB(void) +{ + return ((READ_BIT(PWR->EXTSCR, PWR_EXTSCR_C1SBF) == (PWR_EXTSCR_C1SBF)) ? 1UL : 0UL); +} + +/** + * @brief Get deepsleep mode for CPU1 + * @rmtoll EXTSCR C1DS LL_PWR_IsActiveFlag_C1DS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_C1DS(void) +{ + return ((READ_BIT(PWR->EXTSCR, PWR_EXTSCR_C1DS) == (PWR_EXTSCR_C1DS)) ? 1UL : 0UL); +} + +/** + * @brief System stop flag for CPU2 + * @rmtoll EXTSCR C2STOPF LL_PWR_IsActiveFlag_C2STOP + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_C2STOP(void) +{ + return ((READ_BIT(PWR->EXTSCR, PWR_EXTSCR_C2STOPF) == (PWR_EXTSCR_C2STOPF)) ? 1UL : 0UL); +} + +/** + * @brief System standby flag for CPU2 + * @rmtoll EXTSCR C2SBF LL_PWR_IsActiveFlag_C2SB + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_C2SB(void) +{ + return ((READ_BIT(PWR->EXTSCR, PWR_EXTSCR_C2SBF) == (PWR_EXTSCR_C2SBF)) ? 1UL : 0UL); +} + +/** + * @brief Get deepsleep mode for CPU2 + * @rmtoll EXTSCR C2DS LL_PWR_IsActiveFlag_C2DS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_C2DS(void) +{ + return ((READ_BIT(PWR->EXTSCR, PWR_EXTSCR_C2DS) == (PWR_EXTSCR_C2DS)) ? 1UL : 0UL); +} + +/** + * @brief Clear CPU2 hold interrupt flag + * @rmtoll SCR CC2HF LL_PWR_ClearFlag_C2H + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_C2H(void) +{ + WRITE_REG(PWR->SCR, PWR_SCR_CC2HF); +} +/** + * @brief Clear standby and stop flags for CPU1 + * @rmtoll EXTSCR C1CSSF LL_PWR_ClearFlag_C1STOP_C1STB + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_C1STOP_C1STB(void) +{ + WRITE_REG(PWR->EXTSCR, PWR_EXTSCR_C1CSSF); +} + +/** + * @brief Clear standby and stop flags for CPU2 + * @rmtoll EXTSCR C2CSSF LL_PWR_ClearFlag_C2STOP_C2STB + * @retval None + */ +__STATIC_INLINE void LL_PWR_ClearFlag_C2STOP_C2STB(void) +{ + WRITE_REG(PWR->EXTSCR, PWR_EXTSCR_C2CSSF); +} + +/** + * @} + */ + +#if defined(PWR_CR5_SMPSEN) +/** @defgroup PWR_LL_EF_IT_Management_SMPS PWR IT management for SMPS + * @{ + */ + +/** + * @brief Enable SMPS step down converter forced in bypass mode by BORH + * interrupt for CPU1 + * @note To activate flag of SMPS step down converter forced in bypass mode + * by BORH, BOR must be preliminarily configured to control SMPS + * operating mode. + * Refer to function @ref LL_PWR_SetBORConfig(). + * @rmtoll CR3 EBORHSMPSFB LL_PWR_EnableIT_BORH_SMPSFB + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableIT_BORH_SMPSFB(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_EBORHSMPSFB); +} + +/** + * @brief Disable SMPS step down converter forced in bypass mode by BORH + * interrupt for CPU1 + * @rmtoll CR3 EBORHSMPSFB LL_PWR_DisableIT_BORH_SMPSFB + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableIT_BORH_SMPSFB(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_EBORHSMPSFB); +} + +/** + * @brief Check if SMPS step down converter forced in bypass mode by BORH + * interrupt is enabled for CPU1 + * @rmtoll CR3 EBORHSMPSFB LL_PWR_IsEnabledIT_BORH_SMPSFB + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledIT_BORH_SMPSFB(void) +{ + return ((READ_BIT(PWR->CR3, PWR_CR3_EBORHSMPSFB) == (PWR_CR3_EBORHSMPSFB)) ? 1UL : 0UL); +} + +/** + * @} + */ +#endif /* PWR_CR5_SMPSEN */ + +/** @defgroup PWR_LL_EF_IT_Management_Radio PWR IT management for radio (BLE or 802.15.4) + * @{ + */ + +/** + * @brief Enable BLE end of activity interrupt for CPU1 + * @rmtoll CR3 EBLEA LL_PWR_EnableIT_BLEA + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableIT_BLEA(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_EBLEA); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Enable 802.15.4 end of activity interrupt for CPU1 + * @rmtoll CR3 E802A LL_PWR_EnableIT_802A + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableIT_802A(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_E802A); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Disable BLE end of activity interrupt for CPU1 + * @rmtoll CR3 EBLEA LL_PWR_DisableIT_BLEA + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableIT_BLEA(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_EBLEA); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Disable 802.15.4 end of activity interrupt for CPU1 + * @rmtoll CR3 E802A LL_PWR_DisableIT_802A + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableIT_802A(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_E802A); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Check if BLE end of activity interrupt is enabled for CPU1 + * @rmtoll CR3 EBLEA LL_PWR_IsEnabledIT_BLEA + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledIT_BLEA(void) +{ + return ((READ_BIT(PWR->CR3, PWR_CR3_EBLEA) == (PWR_CR3_EBLEA)) ? 1UL : 0UL); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Check if 802.15.4 end of activity interrupt is enabled for CPU1 + * @rmtoll CR3 E802A LL_PWR_IsEnabledIT_802A + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledIT_802A(void) +{ + return ((READ_BIT(PWR->CR3, PWR_CR3_E802A) == (PWR_CR3_E802A)) ? 1UL : 0UL); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Enable critical radio phase end of activity interrupt for CPU1 + * @rmtoll CR3 ECRPE LL_PWR_EnableIT_802A + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableIT_CRPE(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_ECRPE); +} + +/** + * @brief Disable critical radio phase end of activity interrupt for CPU1 + * @rmtoll CR3 ECRPE LL_PWR_DisableIT_802A + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableIT_CRPE(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_ECRPE); +} + +/** + * @brief Check if critical radio phase end of activity interrupt is enabled for CPU1 + * @rmtoll CR3 ECRPE LL_PWR_IsEnabledIT_802A + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledIT_CRPE(void) +{ + return ((READ_BIT(PWR->CR3, PWR_CR3_ECRPE) == (PWR_CR3_ECRPE)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup PWR_LL_EF_IT_Management_Multicore PWR IT management for multicore + * @{ + */ + +/** + * @brief Enable CPU2 hold interrupt for CPU1 + * @rmtoll CR3 EC2H LL_PWR_EnableIT_HoldCPU2 + * @retval None + */ +__STATIC_INLINE void LL_PWR_EnableIT_HoldCPU2(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_EC2H); +} + +/** + * @brief Disable 802.15.4 host wakeup interrupt for CPU2 + * @rmtoll CR3 EC2H LL_PWR_DisableIT_HoldCPU2 + * @retval None + */ +__STATIC_INLINE void LL_PWR_DisableIT_HoldCPU2(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_EC2H); +} + +/** + * @brief Check if BLE host wakeup interrupt is enabled for CPU2 + * @rmtoll CR3 EC2H LL_PWR_IsEnabledIT_HoldCPU2 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_PWR_IsEnabledIT_HoldCPU2(void) +{ + return ((READ_BIT(PWR->CR3, PWR_CR3_EC2H) == (PWR_CR3_EC2H)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup PWR_LL_EF_IT_Management_CPU2 PWR IT management of CPU2, intended to be executed by CPU2 + * @{ + */ + +/** + * @brief Enable BLE host wakeup interrupt for CPU2 + * @rmtoll C2CR3 EBLEWUP LL_C2_PWR_EnableIT_BLEWU + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_EnableIT_BLEWU(void) +{ + SET_BIT(PWR->C2CR3, PWR_C2CR3_EBLEWUP); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Enable 802.15.4 host wakeup interrupt for CPU2 + * @rmtoll C2CR3 E802WUP LL_C2_PWR_EnableIT_802WU + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_EnableIT_802WU(void) +{ + SET_BIT(PWR->C2CR3, PWR_C2CR3_E802WUP); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Disable BLE host wakeup interrupt for CPU2 + * @rmtoll C2CR3 EBLEWUP LL_C2_PWR_DisableIT_BLEWU + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_DisableIT_BLEWU(void) +{ + CLEAR_BIT(PWR->C2CR3, PWR_C2CR3_EBLEWUP); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Disable 802.15.4 host wakeup interrupt for CPU2 + * @rmtoll C2CR3 E802WUP LL_C2_PWR_DisableIT_802WU + * @retval None + */ +__STATIC_INLINE void LL_C2_PWR_DisableIT_802WU(void) +{ + CLEAR_BIT(PWR->C2CR3, PWR_C2CR3_E802WUP); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Check if BLE host wakeup interrupt is enabled for CPU2 + * @rmtoll C2CR3 EBLEWUP LL_C2_PWR_IsEnabledIT_BLEWU + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_PWR_IsEnabledIT_BLEWU(void) +{ + return ((READ_BIT(PWR->C2CR3, PWR_C2CR3_EBLEWUP) == (PWR_C2CR3_EBLEWUP)) ? 1UL : 0UL); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Check if 802.15.4 host wakeup interrupt is enabled for CPU2 + * @rmtoll C2CR3 E802WUP LL_C2_PWR_IsEnabledIT_802WU + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_PWR_IsEnabledIT_802WU(void) +{ + return ((READ_BIT(PWR->C2CR3, PWR_C2CR3_E802WUP) == (PWR_C2CR3_E802WUP)) ? 1UL : 0UL); +} +#endif /* PWR_CR3_E802A */ + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup PWR_LL_EF_Init De-initialization function + * @{ + */ +ErrorStatus LL_PWR_DeInit(void); +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* PWR */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_PWR_H */ + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h new file mode 100644 index 0000000..c00c0d5 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rcc.h @@ -0,0 +1,4560 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_rcc.h + * @author MCD Application Team + * @brief Header file of RCC LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_RCC_H +#define STM32WBxx_LL_RCC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined(RCC) + +/** @defgroup RCC_LL RCC + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/** @defgroup RCC_LL_Private_Variables RCC Private Variables + * @{ + */ + +#define HSE_CONTROL_UNLOCK_KEY 0xCAFECAFEU + +/** + * @} + */ + +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RCC_LL_Private_Macros RCC Private Macros + * @{ + */ +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/* Exported types ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RCC_LL_Exported_Types RCC Exported Types + * @{ + */ + +/** @defgroup LL_ES_CLOCK_FREQ Clocks Frequency Structure + * @{ + */ + +/** + * @brief RCC Clocks Frequency Structure + */ +typedef struct +{ + uint32_t SYSCLK_Frequency; /*!< SYSCLK clock frequency */ + uint32_t HCLK1_Frequency; /*!< HCLK1 clock frequency */ + uint32_t HCLK2_Frequency; /*!< HCLK2 clock frequency */ + uint32_t HCLK4_Frequency; /*!< HCLK4 clock frequency */ + uint32_t HCLK5_Frequency; /*!< HCLK5 clock frequency */ + uint32_t PCLK1_Frequency; /*!< PCLK1 clock frequency */ + uint32_t PCLK2_Frequency; /*!< PCLK2 clock frequency */ +} LL_RCC_ClocksTypeDef; + +/** + * @} + */ + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup RCC_LL_Exported_Constants RCC Exported Constants + * @{ + */ + +/** @defgroup RCC_LL_EC_OSC_VALUES Oscillator Values adaptation + * @brief Defines used to adapt values of different oscillators + * @note These values could be modified in the user environment according to + * HW set-up. + * @{ + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE 32000000U /*!< Value of the HSE oscillator in Hz */ +#endif /* !HSE_VALUE */ + +#if !defined (HSI_VALUE) +#define HSI_VALUE 16000000U /*!< Value of the HSI oscillator in Hz */ +#endif /* !HSI_VALUE */ + +#if !defined (LSE_VALUE) +#if defined(STM32WB5Mxx) +#define LSE_VALUE 32774U /*!< Value of the LSE oscillator in Hz */ +#else +#define LSE_VALUE 32768U /*!< Value of the LSE oscillator in Hz */ +#endif /* STM32WB5Mxx */ +#endif /* !LSE_VALUE */ + +#if !defined (LSI_VALUE) +#define LSI_VALUE 32000U /*!< Value of the LSI oscillator in Hz */ +#endif /* !LSI_VALUE */ + +#if defined(RCC_HSI48_SUPPORT) +#if !defined (HSI48_VALUE) +#define HSI48_VALUE 48000000U /*!< Value of the HSI48 oscillator in Hz */ +#endif /* !HSI48_VALUE */ +#endif /* RCC_HSI48_SUPPORT */ + +/** + * @} + */ + +/** @defgroup RCC_LL_EC_CLEAR_FLAG Clear Flags Defines + * @brief Flags defines which can be used with LL_RCC_WriteReg function + * @{ + */ +#define LL_RCC_CICR_LSI1RDYC RCC_CICR_LSI1RDYC /*!< LSI1 Ready Interrupt Clear */ +#define LL_RCC_CICR_LSI2RDYC RCC_CICR_LSI2RDYC /*!< LSI1 Ready Interrupt Clear */ +#define LL_RCC_CICR_LSERDYC RCC_CICR_LSERDYC /*!< LSE Ready Interrupt Clear */ +#define LL_RCC_CICR_MSIRDYC RCC_CICR_MSIRDYC /*!< MSI Ready Interrupt Clear */ +#define LL_RCC_CICR_HSIRDYC RCC_CICR_HSIRDYC /*!< HSI Ready Interrupt Clear */ +#define LL_RCC_CICR_HSERDYC RCC_CICR_HSERDYC /*!< HSE Ready Interrupt Clear */ +#define LL_RCC_CICR_PLLRDYC RCC_CICR_PLLRDYC /*!< PLL Ready Interrupt Clear */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_CICR_HSI48RDYC RCC_CICR_HSI48RDYC /*!< HSI48 Ready Interrupt Clear */ +#endif /* RCC_HSI48_SUPPORT */ +#if defined(SAI1) +#define LL_RCC_CICR_PLLSAI1RDYC RCC_CICR_PLLSAI1RDYC /*!< PLLSAI1 Ready Interrupt Clear */ +#endif /* SAI1 */ +#define LL_RCC_CICR_LSECSSC RCC_CICR_LSECSSC /*!< LSE Clock Security System Interrupt Clear */ +#define LL_RCC_CICR_CSSC RCC_CICR_CSSC /*!< Clock Security System Interrupt Clear */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_RCC_ReadReg function + * @{ + */ +#define LL_RCC_CIFR_LSI1RDYF RCC_CIFR_LSI1RDYF /*!< LSI1 Ready Interrupt flag */ +#define LL_RCC_CIFR_LSI2RDYF RCC_CIFR_LSI2RDYF /*!< LSI2 Ready Interrupt flag */ +#define LL_RCC_CIFR_LSERDYF RCC_CIFR_LSERDYF /*!< LSE Ready Interrupt flag */ +#define LL_RCC_CIFR_MSIRDYF RCC_CIFR_MSIRDYF /*!< MSI Ready Interrupt flag */ +#define LL_RCC_CIFR_HSIRDYF RCC_CIFR_HSIRDYF /*!< HSI Ready Interrupt flag */ +#define LL_RCC_CIFR_HSERDYF RCC_CIFR_HSERDYF /*!< HSE Ready Interrupt flag */ +#define LL_RCC_CIFR_PLLRDYF RCC_CIFR_PLLRDYF /*!< PLL Ready Interrupt flag */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_CIFR_HSI48RDYF RCC_CIFR_HSI48RDYF /*!< HSI48 Ready Interrupt flag */ +#endif /* RCC_HSI48_SUPPORT */ +#if defined(SAI1) +#define LL_RCC_CIFR_PLLSAI1RDYF RCC_CIFR_PLLSAI1RDYF /*!< PLLSAI1 Ready Interrupt flag */ +#endif /* SAI1 */ +#define LL_RCC_CIFR_LSECSSF RCC_CIFR_LSECSSF /*!< LSE Clock Security System Interrupt flag */ +#define LL_RCC_CIFR_CSSF RCC_CIFR_CSSF /*!< Clock Security System Interrupt flag */ +#define LL_RCC_CSR_LPWRRSTF RCC_CSR_LPWRRSTF /*!< Low-Power reset flag */ +#define LL_RCC_CSR_OBLRSTF RCC_CSR_OBLRSTF /*!< OBL reset flag */ +#define LL_RCC_CSR_PINRSTF RCC_CSR_PINRSTF /*!< PIN reset flag */ +#define LL_RCC_CSR_SFTRSTF RCC_CSR_SFTRSTF /*!< Software Reset flag */ +#define LL_RCC_CSR_IWDGRSTF RCC_CSR_IWDGRSTF /*!< Independent Watchdog reset flag */ +#define LL_RCC_CSR_WWDGRSTF RCC_CSR_WWDGRSTF /*!< Window watchdog reset flag */ +#define LL_RCC_CSR_BORRSTF RCC_CSR_BORRSTF /*!< BOR reset flag */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_RCC_ReadReg and LL_RCC_WriteReg functions + * @{ + */ +#define LL_RCC_CIER_LSI1RDYIE RCC_CIER_LSI1RDYIE /*!< LSI1 Ready Interrupt Enable */ +#define LL_RCC_CIER_LSI2RDYIE RCC_CIER_LSI2RDYIE /*!< LSI Ready Interrupt Enable */ +#define LL_RCC_CIER_LSERDYIE RCC_CIER_LSERDYIE /*!< LSE Ready Interrupt Enable */ +#define LL_RCC_CIER_MSIRDYIE RCC_CIER_MSIRDYIE /*!< MSI Ready Interrupt Enable */ +#define LL_RCC_CIER_HSIRDYIE RCC_CIER_HSIRDYIE /*!< HSI Ready Interrupt Enable */ +#define LL_RCC_CIER_HSERDYIE RCC_CIER_HSERDYIE /*!< HSE Ready Interrupt Enable */ +#define LL_RCC_CIER_PLLRDYIE RCC_CIER_PLLRDYIE /*!< PLL Ready Interrupt Enable */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_CIER_HSI48RDYIE RCC_CIER_HSI48RDYIE /*!< HSI48 Ready Interrupt Enable */ +#endif /* RCC_HSI48_SUPPORT */ +#if defined(SAI1) +#define LL_RCC_CIER_PLLSAI1RDYIE RCC_CIER_PLLSAI1RDYIE /*!< PLLSAI1 Ready Interrupt Enable */ +#endif /* SAI1 */ +#define LL_RCC_CIER_LSECSSIE RCC_CIER_LSECSSIE /*!< LSE CSS Interrupt Enable */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_LSEDRIVE LSE oscillator drive capability + * @{ + */ +#define LL_RCC_LSEDRIVE_LOW 0x00000000U /*!< Xtal mode lower driving capability */ +#define LL_RCC_LSEDRIVE_MEDIUMLOW RCC_BDCR_LSEDRV_0 /*!< Xtal mode medium low driving capability */ +#define LL_RCC_LSEDRIVE_MEDIUMHIGH RCC_BDCR_LSEDRV_1 /*!< Xtal mode medium high driving capability */ +#define LL_RCC_LSEDRIVE_HIGH RCC_BDCR_LSEDRV /*!< Xtal mode higher driving capability */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_MSIRANGE MSI clock ranges + * @{ + */ +#define LL_RCC_MSIRANGE_0 RCC_CR_MSIRANGE_0 /*!< MSI = 100 KHz */ +#define LL_RCC_MSIRANGE_1 RCC_CR_MSIRANGE_1 /*!< MSI = 200 KHz */ +#define LL_RCC_MSIRANGE_2 RCC_CR_MSIRANGE_2 /*!< MSI = 400 KHz */ +#define LL_RCC_MSIRANGE_3 RCC_CR_MSIRANGE_3 /*!< MSI = 800 KHz */ +#define LL_RCC_MSIRANGE_4 RCC_CR_MSIRANGE_4 /*!< MSI = 1 MHz */ +#define LL_RCC_MSIRANGE_5 RCC_CR_MSIRANGE_5 /*!< MSI = 2 MHz */ +#define LL_RCC_MSIRANGE_6 RCC_CR_MSIRANGE_6 /*!< MSI = 4 MHz */ +#define LL_RCC_MSIRANGE_7 RCC_CR_MSIRANGE_7 /*!< MSI = 8 MHz */ +#define LL_RCC_MSIRANGE_8 RCC_CR_MSIRANGE_8 /*!< MSI = 16 MHz */ +#define LL_RCC_MSIRANGE_9 RCC_CR_MSIRANGE_9 /*!< MSI = 24 MHz */ +#define LL_RCC_MSIRANGE_10 RCC_CR_MSIRANGE_10 /*!< MSI = 32 MHz */ +#define LL_RCC_MSIRANGE_11 RCC_CR_MSIRANGE_11 /*!< MSI = 48 MHz */ +/** + * @} + */ + + +/** @defgroup RCC_LL_EC_HSE_CURRENT_CONTROL HSE current control max limits + * @{ + */ +#define LL_RCC_HSE_CURRENTMAX_0 0x000000000U /*!< HSE current control max limit = 0.18 ma/V*/ +#define LL_RCC_HSE_CURRENTMAX_1 RCC_HSECR_HSEGMC0 /*!< HSE current control max limit = 0.57 ma/V*/ +#define LL_RCC_HSE_CURRENTMAX_2 RCC_HSECR_HSEGMC1 /*!< HSE current control max limit = 0.78 ma/V*/ +#define LL_RCC_HSE_CURRENTMAX_3 (RCC_HSECR_HSEGMC1|RCC_HSECR_HSEGMC0) /*!< HSE current control max limit = 1.13 ma/V*/ +#define LL_RCC_HSE_CURRENTMAX_4 RCC_HSECR_HSEGMC2 /*!< HSE current control max limit = 0.61 ma/V*/ +#define LL_RCC_HSE_CURRENTMAX_5 (RCC_HSECR_HSEGMC2|RCC_HSECR_HSEGMC0) /*!< HSE current control max limit = 1.65 ma/V*/ +#define LL_RCC_HSE_CURRENTMAX_6 (RCC_HSECR_HSEGMC2|RCC_HSECR_HSEGMC1) /*!< HSE current control max limit = 2.12 ma/V*/ +#define LL_RCC_HSE_CURRENTMAX_7 (RCC_HSECR_HSEGMC2|RCC_HSECR_HSEGMC1|RCC_HSECR_HSEGMC0) /*!< HSE current control max limit = 2.84 ma/V*/ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_HSE_SENSE_AMPLIFIER HSE sense amplifier threshold + * @{ + */ +#define LL_RCC_HSEAMPTHRESHOLD_1_2 (0x000000000U) /*!< HSE sense amplifier bias current factor = 1/2*/ +#define LL_RCC_HSEAMPTHRESHOLD_3_4 RCC_HSECR_HSES /*!< HSE sense amplifier bias current factor = 3/4*/ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_LSCO_CLKSOURCE LSCO Selection + * @{ + */ +#define LL_RCC_LSCO_CLKSOURCE_LSI 0x00000000U /*!< LSI selection for low speed clock */ +#define LL_RCC_LSCO_CLKSOURCE_LSE RCC_BDCR_LSCOSEL /*!< LSE selection for low speed clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_SYS_CLKSOURCE System clock switch + * @{ + */ +#define LL_RCC_SYS_CLKSOURCE_MSI 0x00000000U /*!< MSI selection as system clock */ +#define LL_RCC_SYS_CLKSOURCE_HSI RCC_CFGR_SW_0 /*!< HSI selection as system clock */ +#define LL_RCC_SYS_CLKSOURCE_HSE RCC_CFGR_SW_1 /*!< HSE selection as system clock */ +#define LL_RCC_SYS_CLKSOURCE_PLL (RCC_CFGR_SW_1 | RCC_CFGR_SW_0) /*!< PLL selection as system clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_SYS_CLKSOURCE_STATUS System clock switch status + * @{ + */ +#define LL_RCC_SYS_CLKSOURCE_STATUS_MSI 0x00000000U /*!< MSI used as system clock */ +#define LL_RCC_SYS_CLKSOURCE_STATUS_HSI RCC_CFGR_SWS_0 /*!< HSI used as system clock */ +#define LL_RCC_SYS_CLKSOURCE_STATUS_HSE RCC_CFGR_SWS_1 /*!< HSE used as system clock */ +#define LL_RCC_SYS_CLKSOURCE_STATUS_PLL (RCC_CFGR_SWS_1 | RCC_CFGR_SWS_0) /*!< PLL used as system clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_RF_CLKSOURCE_STATUS RF system clock switch status + * @{ + */ +#define LL_RCC_RF_CLKSOURCE_HSI 0x00000000U /*!< HSI used as RF system clock */ +#define LL_RCC_RF_CLKSOURCE_HSE_DIV2 RCC_EXTCFGR_RFCSS /*!< HSE divided by 2 used as RF system clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_SYSCLK_DIV AHB prescaler + * @{ + */ +#define LL_RCC_SYSCLK_DIV_1 0x00000000U /*!< SYSCLK not divided */ +#define LL_RCC_SYSCLK_DIV_2 RCC_CFGR_HPRE_3 /*!< SYSCLK divided by 2 */ +#define LL_RCC_SYSCLK_DIV_3 RCC_CFGR_HPRE_0 /*!< SYSCLK divided by 3 */ +#define LL_RCC_SYSCLK_DIV_4 (RCC_CFGR_HPRE_3 | RCC_CFGR_HPRE_0) /*!< SYSCLK divided by 4 */ +#define LL_RCC_SYSCLK_DIV_5 RCC_CFGR_HPRE_1 /*!< SYSCLK divided by 5 */ +#define LL_RCC_SYSCLK_DIV_6 (RCC_CFGR_HPRE_2 | RCC_CFGR_HPRE_0) /*!< SYSCLK divided by 6 */ +#define LL_RCC_SYSCLK_DIV_8 (RCC_CFGR_HPRE_3 | RCC_CFGR_HPRE_1) /*!< SYSCLK divided by 8 */ +#define LL_RCC_SYSCLK_DIV_10 (RCC_CFGR_HPRE_2 | RCC_CFGR_HPRE_1) /*!< SYSCLK divided by 10 */ +#define LL_RCC_SYSCLK_DIV_16 (RCC_CFGR_HPRE_3 | RCC_CFGR_HPRE_1 | RCC_CFGR_HPRE_0) /*!< SYSCLK divided by 16 */ +#define LL_RCC_SYSCLK_DIV_32 (RCC_CFGR_HPRE_2 | RCC_CFGR_HPRE_1 | RCC_CFGR_HPRE_0) /*!< SYSCLK divided by 32 */ +#define LL_RCC_SYSCLK_DIV_64 (RCC_CFGR_HPRE_3 | RCC_CFGR_HPRE_2) /*!< SYSCLK divided by 64 */ +#define LL_RCC_SYSCLK_DIV_128 (RCC_CFGR_HPRE_3 | RCC_CFGR_HPRE_2 | RCC_CFGR_HPRE_0) /*!< SYSCLK divided by 128 */ +#define LL_RCC_SYSCLK_DIV_256 (RCC_CFGR_HPRE_3 | RCC_CFGR_HPRE_2 | RCC_CFGR_HPRE_1) /*!< SYSCLK divided by 256 */ +#define LL_RCC_SYSCLK_DIV_512 (RCC_CFGR_HPRE_3 | RCC_CFGR_HPRE_2 | RCC_CFGR_HPRE_1 | RCC_CFGR_HPRE_0) /*!< SYSCLK divided by 512 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_APB1_DIV APB low-speed prescaler (APB1) + * @{ + */ +#define LL_RCC_APB1_DIV_1 0x00000000U /*!< HCLK1 not divided */ +#define LL_RCC_APB1_DIV_2 RCC_CFGR_PPRE1_2 /*!< HCLK1 divided by 2 */ +#define LL_RCC_APB1_DIV_4 (RCC_CFGR_PPRE1_2 | RCC_CFGR_PPRE1_0) /*!< HCLK1 divided by 4 */ +#define LL_RCC_APB1_DIV_8 (RCC_CFGR_PPRE1_2 | RCC_CFGR_PPRE1_1) /*!< HCLK1 divided by 8 */ +#define LL_RCC_APB1_DIV_16 (RCC_CFGR_PPRE1_2 | RCC_CFGR_PPRE1_1 | RCC_CFGR_PPRE1_0) /*!< HCLK1 divided by 16 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_APB2_DIV APB high-speed prescaler (APB2) + * @{ + */ +#define LL_RCC_APB2_DIV_1 0x00000000U /*!< HCLK1 not divided */ +#define LL_RCC_APB2_DIV_2 RCC_CFGR_PPRE2_2 /*!< HCLK1 divided by 2 */ +#define LL_RCC_APB2_DIV_4 (RCC_CFGR_PPRE2_2 | RCC_CFGR_PPRE2_0) /*!< HCLK1 divided by 4 */ +#define LL_RCC_APB2_DIV_8 (RCC_CFGR_PPRE2_2 | RCC_CFGR_PPRE2_1) /*!< HCLK1 divided by 8 */ +#define LL_RCC_APB2_DIV_16 (RCC_CFGR_PPRE2_2 | RCC_CFGR_PPRE2_1 | RCC_CFGR_PPRE2_0) /*!< HCLK1 divided by 16 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_STOP_WAKEUPCLOCK Wakeup from Stop and CSS backup clock selection + * @{ + */ +#define LL_RCC_STOP_WAKEUPCLOCK_MSI 0x00000000U /*!< MSI selection after wake-up from STOP */ +#define LL_RCC_STOP_WAKEUPCLOCK_HSI RCC_CFGR_STOPWUCK /*!< HSI selection after wake-up from STOP */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_MCO1SOURCE MCO1 SOURCE selection + * @{ + */ +#define LL_RCC_MCO1SOURCE_NOCLOCK 0x00000000U /*!< MCO output disabled, no clock on MCO */ +#define LL_RCC_MCO1SOURCE_SYSCLK RCC_CFGR_MCOSEL_0 /*!< SYSCLK selection as MCO1 source */ +#define LL_RCC_MCO1SOURCE_MSI RCC_CFGR_MCOSEL_1 /*!< MSI selection as MCO1 source */ +#define LL_RCC_MCO1SOURCE_HSI (RCC_CFGR_MCOSEL_0| RCC_CFGR_MCOSEL_1) /*!< HSI selection as MCO1 source */ +#define LL_RCC_MCO1SOURCE_HSE RCC_CFGR_MCOSEL_2 /*!< HSE after stabilization selection as MCO1 source */ +#define LL_RCC_MCO1SOURCE_PLLCLK (RCC_CFGR_MCOSEL_0|RCC_CFGR_MCOSEL_2) /*!< Main PLL selection as MCO1 source */ +#define LL_RCC_MCO1SOURCE_LSI1 (RCC_CFGR_MCOSEL_1|RCC_CFGR_MCOSEL_2) /*!< LSI1 selection as MCO1 source */ +#define LL_RCC_MCO1SOURCE_LSI2 (RCC_CFGR_MCOSEL_0|RCC_CFGR_MCOSEL_1|RCC_CFGR_MCOSEL_2) /*!< LSI2 selection as MCO1 source */ +#define LL_RCC_MCO1SOURCE_LSE RCC_CFGR_MCOSEL_3 /*!< LSE selection as MCO1 source */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_MCO1SOURCE_HSI48 (RCC_CFGR_MCOSEL_0|RCC_CFGR_MCOSEL_3) /*!< HSI48 selection as MCO1 source */ +#endif /* RCC_HSI48_SUPPORT */ +#define LL_RCC_MCO1SOURCE_HSE_BEFORE_STAB (RCC_CFGR_MCOSEL_2|RCC_CFGR_MCOSEL_3) /*!< HSE before stabilization selection as MCO1 source */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_MCO1_DIV MCO1 prescaler + * @{ + */ +#define LL_RCC_MCO1_DIV_1 0x00000000U /*!< MCO not divided */ +#define LL_RCC_MCO1_DIV_2 RCC_CFGR_MCOPRE_0 /*!< MCO divided by 2 */ +#define LL_RCC_MCO1_DIV_4 RCC_CFGR_MCOPRE_1 /*!< MCO divided by 4 */ +#define LL_RCC_MCO1_DIV_8 (RCC_CFGR_MCOPRE_1 | RCC_CFGR_MCOPRE_0) /*!< MCO divided by 8 */ +#define LL_RCC_MCO1_DIV_16 RCC_CFGR_MCOPRE_2 /*!< MCO divided by 16 */ +/** + * @} + */ + +#if defined(RCC_SMPS_SUPPORT) +/** @defgroup RCC_LL_EC_SMPS_CLKSOURCE SMPS clock switch + * @{ + */ +#define LL_RCC_SMPS_CLKSOURCE_HSI 0x00000000U /*!< HSI selection as SMPS clock */ +#define LL_RCC_SMPS_CLKSOURCE_MSI RCC_SMPSCR_SMPSSEL_0 /*!< MSI selection as SMPS clock */ +#define LL_RCC_SMPS_CLKSOURCE_HSE RCC_SMPSCR_SMPSSEL_1 /*!< HSE selection as SMPS clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_SMPS_CLKSOURCE_STATUS SMPS clock switch status + * @{ + */ +#define LL_RCC_SMPS_CLKSOURCE_STATUS_HSI 0x00000000U /*!< HSI used as SMPS clock */ +#define LL_RCC_SMPS_CLKSOURCE_STATUS_MSI RCC_SMPSCR_SMPSSWS_0 /*!< MSI used as SMPS clock */ +#define LL_RCC_SMPS_CLKSOURCE_STATUS_HSE RCC_SMPSCR_SMPSSWS_1 /*!< HSE used as SMPS clock */ +#define LL_RCC_SMPS_CLKSOURCE_STATUS_NO_CLOCK (RCC_SMPSCR_SMPSSWS_0|RCC_SMPSCR_SMPSSWS_1) /*!< No Clock used as SMPS clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_SMPS_DIV SMPS prescaler + * @{ + */ +#define LL_RCC_SMPS_DIV_0 (0x00000000U) /*!< SMPS clock division 0 */ +#define LL_RCC_SMPS_DIV_1 RCC_SMPSCR_SMPSDIV_0 /*!< SMPS clock division 1 */ +#define LL_RCC_SMPS_DIV_2 RCC_SMPSCR_SMPSDIV_1 /*!< SMPS clock division 2 */ +#define LL_RCC_SMPS_DIV_3 (RCC_SMPSCR_SMPSDIV_0|RCC_SMPSCR_SMPSDIV_1) /*!< SMPS clock division 3 */ +/** + * @} + */ +#endif /* RCC_SMPS_SUPPORT */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RCC_LL_EC_PERIPH_FREQUENCY Peripheral clock frequency + * @{ + */ +#define LL_RCC_PERIPH_FREQUENCY_NO 0x00000000U /*!< No clock enabled for the peripheral */ +#define LL_RCC_PERIPH_FREQUENCY_NA 0xFFFFFFFFU /*!< Frequency cannot be provided as external clock */ +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** @defgroup RCC_LL_EC_USART1_CLKSOURCE USART1 CLKSOURCE + * @{ + */ +#define LL_RCC_USART1_CLKSOURCE_PCLK2 0x00000000U /*!< PCLK2 selected as USART1 clock */ +#define LL_RCC_USART1_CLKSOURCE_SYSCLK RCC_CCIPR_USART1SEL_0 /*!< SYSCLK selected as USART1 clock */ +#define LL_RCC_USART1_CLKSOURCE_HSI RCC_CCIPR_USART1SEL_1 /*!< HSI selected as USART1 clock */ +#define LL_RCC_USART1_CLKSOURCE_LSE RCC_CCIPR_USART1SEL /*!< LSE selected as USART1 clock */ +/** + * @} + */ + +#if defined(LPUART1) +/** @defgroup RCC_LL_EC_LPUART1_CLKSOURCE LPUART1 CLKSOURCE + * @{ + */ +#define LL_RCC_LPUART1_CLKSOURCE_PCLK1 0x00000000U /*!< PCLK1 selected as LPUART1 clock */ +#define LL_RCC_LPUART1_CLKSOURCE_SYSCLK RCC_CCIPR_LPUART1SEL_0 /*!< SYCLK selected as LPUART1 clock */ +#define LL_RCC_LPUART1_CLKSOURCE_HSI RCC_CCIPR_LPUART1SEL_1 /*!< HSI selected as LPUART1 clock */ +#define LL_RCC_LPUART1_CLKSOURCE_LSE RCC_CCIPR_LPUART1SEL /*!< LSE selected as LPUART1 clock */ +/** + * @} + */ +#endif /* LPUART1 */ + +/** @defgroup RCC_LL_EC_I2Cx_CLKSOURCE I2Cx CLKSOURCE + * @{ + */ +#define LL_RCC_I2C1_CLKSOURCE_PCLK1 (uint32_t)((RCC_CCIPR_I2C1SEL << 4) | (0x00000000U >> 4)) /*!< PCLK1 selected as I2C1 clock */ +#define LL_RCC_I2C1_CLKSOURCE_SYSCLK (uint32_t)((RCC_CCIPR_I2C1SEL << 4) | (RCC_CCIPR_I2C1SEL_0 >> 4)) /*!< SYSCLK selected as I2C1 clock */ +#define LL_RCC_I2C1_CLKSOURCE_HSI (uint32_t)((RCC_CCIPR_I2C1SEL << 4) | (RCC_CCIPR_I2C1SEL_1 >> 4)) /*!< HSI selected as I2C1 clock */ +#if defined(I2C3) +#define LL_RCC_I2C3_CLKSOURCE_PCLK1 (uint32_t)((RCC_CCIPR_I2C3SEL << 4) | (0x00000000U >> 4)) /*!< PCLK1 selected as I2C3 clock */ +#define LL_RCC_I2C3_CLKSOURCE_SYSCLK (uint32_t)((RCC_CCIPR_I2C3SEL << 4) | (RCC_CCIPR_I2C3SEL_0 >> 4)) /*!< SYSCLK selected as I2C3 clock */ +#define LL_RCC_I2C3_CLKSOURCE_HSI (uint32_t)((RCC_CCIPR_I2C3SEL << 4) | (RCC_CCIPR_I2C3SEL_1 >> 4)) /*!< HSI selected as I2C3 clock */ +#endif /* I2C3 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_LPTIMx_CLKSOURCE LPTIMx CLKSOURCE + * @{ + */ +#define LL_RCC_LPTIM1_CLKSOURCE_PCLK1 (uint32_t)(RCC_CCIPR_LPTIM1SEL | (0x00000000U >> 16)) /*!< PCLK1 selected as LPTIM1 clock */ +#define LL_RCC_LPTIM1_CLKSOURCE_LSI (uint32_t)(RCC_CCIPR_LPTIM1SEL | (RCC_CCIPR_LPTIM1SEL_0 >> 16)) /*!< LSI selected as LPTIM1 clock */ +#define LL_RCC_LPTIM1_CLKSOURCE_HSI (uint32_t)(RCC_CCIPR_LPTIM1SEL | (RCC_CCIPR_LPTIM1SEL_1 >> 16)) /*!< HSI selected as LPTIM1 clock */ +#define LL_RCC_LPTIM1_CLKSOURCE_LSE (uint32_t)(RCC_CCIPR_LPTIM1SEL | (RCC_CCIPR_LPTIM1SEL >> 16)) /*!< LSE selected as LPTIM1 clock */ +#define LL_RCC_LPTIM2_CLKSOURCE_PCLK1 (uint32_t)(RCC_CCIPR_LPTIM2SEL | (0x00000000U >> 16)) /*!< PCLK1 selected as LPTIM2 clock */ +#define LL_RCC_LPTIM2_CLKSOURCE_LSI (uint32_t)(RCC_CCIPR_LPTIM2SEL | (RCC_CCIPR_LPTIM2SEL_0 >> 16)) /*!< LSI selected as LPTIM2 clock */ +#define LL_RCC_LPTIM2_CLKSOURCE_HSI (uint32_t)(RCC_CCIPR_LPTIM2SEL | (RCC_CCIPR_LPTIM2SEL_1 >> 16)) /*!< HSI selected as LPTIM2 clock */ +#define LL_RCC_LPTIM2_CLKSOURCE_LSE (uint32_t)(RCC_CCIPR_LPTIM2SEL | (RCC_CCIPR_LPTIM2SEL >> 16)) /*!< LSE selected as LPTIM2 clock */ +/** + * @} + */ + +#if defined(SAI1) +/** @defgroup RCC_LL_EC_SAI1_CLKSOURCE SAI1 CLKSOURCE + * @{ + */ +#define LL_RCC_SAI1_CLKSOURCE_PLLSAI1 0x00000000U /*!< PLLSAI1 selected as SAI1 clock */ +#define LL_RCC_SAI1_CLKSOURCE_PLL RCC_CCIPR_SAI1SEL_0 /*!< PLL selected as SAI1 clock */ +#define LL_RCC_SAI1_CLKSOURCE_HSI RCC_CCIPR_SAI1SEL_1 /*!< HSI selected as SAI1 clock */ +#define LL_RCC_SAI1_CLKSOURCE_PIN RCC_CCIPR_SAI1SEL /*!< External input selected as SAI1 clock */ +/** + * @} + */ +#endif /* SAI1 */ + +/** @defgroup RCC_LL_EC_CLK48_CLKSOURCE CLK48 CLKSOURCE + * @{ + */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_CLK48_CLKSOURCE_HSI48 0x00000000U /*!< HSI48 selected as CLK48 clock */ +#endif /* RCC_HSI48_SUPPORT */ +#if defined(SAI1) +#define LL_RCC_CLK48_CLKSOURCE_PLLSAI1 RCC_CCIPR_CLK48SEL_0 /*!< PLLSAI1 selected as CLK48 clock */ +#endif /* SAI1 */ +#define LL_RCC_CLK48_CLKSOURCE_PLL RCC_CCIPR_CLK48SEL_1 /*!< PLL selected as CLK48 clock */ +#define LL_RCC_CLK48_CLKSOURCE_MSI RCC_CCIPR_CLK48SEL /*!< MSI selected as CLK48 clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_USB_CLKSOURCE USB CLKSOURCE + * @{ + */ +#if defined(RCC_HSI48_SUPPORT) +#define LL_RCC_USB_CLKSOURCE_HSI48 LL_RCC_CLK48_CLKSOURCE_HSI48 /*!< HSI48 selected as USB clock */ +#endif /* RCC_HSI48_SUPPORT */ +#if defined(SAI1) +#define LL_RCC_USB_CLKSOURCE_PLLSAI1 LL_RCC_CLK48_CLKSOURCE_PLLSAI1 /*!< PLLSAI1 selected as USB clock */ +#endif /* SAI1 */ +#define LL_RCC_USB_CLKSOURCE_PLL LL_RCC_CLK48_CLKSOURCE_PLL /*!< PLL selected as USB clock */ +#define LL_RCC_USB_CLKSOURCE_MSI LL_RCC_CLK48_CLKSOURCE_MSI /*!< MSI selected as USB clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_ADC_CLKSRC ADC CLKSRC + * @{ + */ +#define LL_RCC_ADC_CLKSOURCE_NONE 0x00000000U /*!< no Clock used as ADC clock*/ +#if defined(STM32WB55xx) || defined (STM32WB5Mxx) || defined (STM32WB35xx) +#define LL_RCC_ADC_CLKSOURCE_PLLSAI1 RCC_CCIPR_ADCSEL_0 /*!< PLLSAI1 selected as ADC clock*/ +#elif defined (STM32WB15xx) || defined(STM32WB1Mxx) +#define LL_RCC_ADC_CLKSOURCE_HSI RCC_CCIPR_ADCSEL_0 /*!< HSI selected as ADC clock */ +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ +#define LL_RCC_ADC_CLKSOURCE_PLL RCC_CCIPR_ADCSEL_1 /*!< PLL selected as ADC clock */ +#define LL_RCC_ADC_CLKSOURCE_SYSCLK RCC_CCIPR_ADCSEL /*!< SYSCLK selected as ADC clock */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_RNG_CLKSRC RNG CLKSRC + * @{ + */ +#define LL_RCC_RNG_CLKSOURCE_CLK48 0x00000000U /*!< CLK48 divided by 3 selected as RNG Clock */ +#define LL_RCC_RNG_CLKSOURCE_LSI RCC_CCIPR_RNGSEL_0 /*!< LSI selected as ADC clock */ +#define LL_RCC_RNG_CLKSOURCE_LSE RCC_CCIPR_RNGSEL_1 /*!< LSE selected as ADC clock */ +/** + * @} + */ + + +/** @defgroup RCC_LL_EC_USART1 USART1 + * @{ + */ +#define LL_RCC_USART1_CLKSOURCE RCC_CCIPR_USART1SEL /*!< USART1 clock source selection bits */ +/** + * @} + */ + +#if defined(LPUART1) +/** @defgroup RCC_LL_EC_LPUART1 LPUART1 + * @{ + */ +#define LL_RCC_LPUART1_CLKSOURCE RCC_CCIPR_LPUART1SEL /*!< LPUART1 clock source selection bits */ +/** + * @} + */ +#endif /* LPUART1 */ + +/** @defgroup RCC_LL_EC_I2C1 I2C1 + * @{ + */ +#define LL_RCC_I2C1_CLKSOURCE RCC_CCIPR_I2C1SEL /*!< I2C1 clock source selection bits */ +#define LL_RCC_I2C3_CLKSOURCE RCC_CCIPR_I2C3SEL /*!< I2C3 clock source selection bits */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_LPTIM1 LPTIM1 + * @{ + */ +#define LL_RCC_LPTIM1_CLKSOURCE RCC_CCIPR_LPTIM1SEL /*!< LPTIM1 clock source selection bits */ +#define LL_RCC_LPTIM2_CLKSOURCE RCC_CCIPR_LPTIM2SEL /*!< LPTIM2 clock source selection bits */ +/** + * @} + */ + +#if defined(SAI1) +/** @defgroup RCC_LL_EC_SAI1 SAI1 + * @{ + */ +#define LL_RCC_SAI1_CLKSOURCE RCC_CCIPR_SAI1SEL /*!< SAI1 clock source selection bits */ +/** + * @} + */ +#endif /* SAI1 */ + +/** @defgroup RCC_LL_EC_CLK48 CLK48 + * @{ + */ +#define LL_RCC_CLK48_CLKSOURCE RCC_CCIPR_CLK48SEL /*!< CLK48 clock source selection bits */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_USB USB + * @{ + */ +#define LL_RCC_USB_CLKSOURCE LL_RCC_CLK48_CLKSOURCE /*!< USB clock source selection bits */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_RNG RNG + * @{ + */ +#define LL_RCC_RNG_CLKSOURCE RCC_CCIPR_RNGSEL /*!< RNG clock source selection bits */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_ADC ADC + * @{ + */ +#define LL_RCC_ADC_CLKSOURCE RCC_CCIPR_ADCSEL /*!< ADC clock source selection bits */ +/** + * @} + */ + + +/** @defgroup RCC_LL_EC_RTC_CLKSOURCE RTC clock source selection + * @{ + */ +#define LL_RCC_RTC_CLKSOURCE_NONE 0x00000000U /*!< No clock used as RTC clock */ +#define LL_RCC_RTC_CLKSOURCE_LSE RCC_BDCR_RTCSEL_0 /*!< LSE oscillator clock used as RTC clock */ +#define LL_RCC_RTC_CLKSOURCE_LSI RCC_BDCR_RTCSEL_1 /*!< LSI oscillator clock used as RTC clock */ +#define LL_RCC_RTC_CLKSOURCE_HSE_DIV32 RCC_BDCR_RTCSEL /*!< HSE oscillator clock divided by 32 used as RTC clock */ + +/** + * @} + */ + +/** @defgroup RCC_LL_EC_RFWKP_CLKSOURCE RF Wakeup clock source selection + * @{ + */ +#define LL_RCC_RFWKP_CLKSOURCE_NONE 0x00000000U /*!< No clock used as RF Wakeup clock */ +#define LL_RCC_RFWKP_CLKSOURCE_LSE RCC_CSR_RFWKPSEL_0 /*!< LSE oscillator clock used as RF Wakeup clock */ +#if defined(STM32WB15xx) || defined(STM32WB10xx) +#define LL_RCC_RFWKP_CLKSOURCE_LSI RCC_CSR_RFWKPSEL_1 /*!< LSI oscillator clock used as RF Wakeup clock */ +#endif /* STM32WB15xx || STM32WB10xx */ +#define LL_RCC_RFWKP_CLKSOURCE_HSE_DIV1024 RCC_CSR_RFWKPSEL /*!< HSE oscillator clock divided by 1024 used as RF Wakeup clock */ + +/** + * @} + */ + + +/** @defgroup RCC_LL_EC_PLLSOURCE PLL and PLLSAI1 entry clock source + * @{ + */ +#define LL_RCC_PLLSOURCE_NONE 0x00000000U /*!< No clock */ +#define LL_RCC_PLLSOURCE_MSI RCC_PLLCFGR_PLLSRC_0 /*!< MSI clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSI RCC_PLLCFGR_PLLSRC_1 /*!< HSI clock selected as PLL entry clock source */ +#define LL_RCC_PLLSOURCE_HSE (RCC_PLLCFGR_PLLSRC_1 | RCC_PLLCFGR_PLLSRC_0) /*!< HSE clock selected as PLL entry clock source */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PLLM_DIV PLL and PLLSAI1 division factor + * @{ + */ +#define LL_RCC_PLLM_DIV_1 0x00000000U /*!< PLL and PLLSAI1 division factor by 1 */ +#define LL_RCC_PLLM_DIV_2 (RCC_PLLCFGR_PLLM_0) /*!< PLL and PLLSAI1 division factor by 2 */ +#define LL_RCC_PLLM_DIV_3 (RCC_PLLCFGR_PLLM_1) /*!< PLL and PLLSAI1 division factor by 3 */ +#define LL_RCC_PLLM_DIV_4 ((RCC_PLLCFGR_PLLM_1 | RCC_PLLCFGR_PLLM_0)) /*!< PLL and PLLSAI1 division factor by 4 */ +#define LL_RCC_PLLM_DIV_5 (RCC_PLLCFGR_PLLM_2) /*!< PLL and PLLSAI1 division factor by 5 */ +#define LL_RCC_PLLM_DIV_6 ((RCC_PLLCFGR_PLLM_2 | RCC_PLLCFGR_PLLM_0)) /*!< PLL and PLLSAI1 division factor by 6 */ +#define LL_RCC_PLLM_DIV_7 ((RCC_PLLCFGR_PLLM_2 | RCC_PLLCFGR_PLLM_1)) /*!< PLL and PLLSAI1 division factor by 7 */ +#define LL_RCC_PLLM_DIV_8 (RCC_PLLCFGR_PLLM) /*!< PLL and PLLSAI1 division factor by 8 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PLLR_DIV PLL division factor (PLLR) + * @{ + */ +#define LL_RCC_PLLR_DIV_2 (RCC_PLLCFGR_PLLR_0) /*!< Main PLL division factor for PLLCLK (system clock) by 2 */ +#define LL_RCC_PLLR_DIV_3 (RCC_PLLCFGR_PLLR_1) /*!< Main PLL division factor for PLLCLK (system clock) by 3 */ +#define LL_RCC_PLLR_DIV_4 (RCC_PLLCFGR_PLLR_1|RCC_PLLCFGR_PLLR_0) /*!< Main PLL division factor for PLLCLK (system clock) by 4 */ +#define LL_RCC_PLLR_DIV_5 (RCC_PLLCFGR_PLLR_2) /*!< Main PLL division factor for PLLCLK (system clock) by 5 */ +#define LL_RCC_PLLR_DIV_6 (RCC_PLLCFGR_PLLR_2|RCC_PLLCFGR_PLLR_0) /*!< Main PLL division factor for PLLCLK (system clock) by 6 */ +#define LL_RCC_PLLR_DIV_7 (RCC_PLLCFGR_PLLR_2|RCC_PLLCFGR_PLLR_1) /*!< Main PLL division factor for PLLCLK (system clock) by 7 */ +#define LL_RCC_PLLR_DIV_8 (RCC_PLLCFGR_PLLR) /*!< Main PLL division factor for PLLCLK (system clock) by 8 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PLLP_DIV PLL division factor (PLLP) + * @{ + */ +#define LL_RCC_PLLP_DIV_2 (RCC_PLLCFGR_PLLP_0) /*!< Main PLL division factor for PLLP output by 2 */ +#define LL_RCC_PLLP_DIV_3 (RCC_PLLCFGR_PLLP_1) /*!< Main PLL division factor for PLLP output by 3 */ +#define LL_RCC_PLLP_DIV_4 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_1) /*!< Main PLL division factor for PLLP output by 4 */ +#define LL_RCC_PLLP_DIV_5 (RCC_PLLCFGR_PLLP_2) /*!< Main PLL division factor for PLLP output by 5 */ +#define LL_RCC_PLLP_DIV_6 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_2) /*!< Main PLL division factor for PLLP output by 6 */ +#define LL_RCC_PLLP_DIV_7 (RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_2) /*!< Main PLL division factor for PLLP output by 7 */ +#define LL_RCC_PLLP_DIV_8 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_2) /*!< Main PLL division factor for PLLP output by 8 */ +#define LL_RCC_PLLP_DIV_9 (RCC_PLLCFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 9 */ +#define LL_RCC_PLLP_DIV_10 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 10 */ +#define LL_RCC_PLLP_DIV_11 (RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 11 */ +#define LL_RCC_PLLP_DIV_12 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 12 */ +#define LL_RCC_PLLP_DIV_13 (RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 13 */ +#define LL_RCC_PLLP_DIV_14 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 14 */ +#define LL_RCC_PLLP_DIV_15 (RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 15 */ +#define LL_RCC_PLLP_DIV_16 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 16 */ +#define LL_RCC_PLLP_DIV_17 (RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 17 */ +#define LL_RCC_PLLP_DIV_18 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 18 */ +#define LL_RCC_PLLP_DIV_19 (RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 19 */ +#define LL_RCC_PLLP_DIV_20 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 20 */ +#define LL_RCC_PLLP_DIV_21 (RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 21 */ +#define LL_RCC_PLLP_DIV_22 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 22 */ +#define LL_RCC_PLLP_DIV_23 (RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 23 */ +#define LL_RCC_PLLP_DIV_24 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 24 */ +#define LL_RCC_PLLP_DIV_25 (RCC_PLLCFGR_PLLP_3|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 25 */ +#define LL_RCC_PLLP_DIV_26 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_3|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 26 */ +#define LL_RCC_PLLP_DIV_27 (RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_3|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 27 */ +#define LL_RCC_PLLP_DIV_28 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_3|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 28 */ +#define LL_RCC_PLLP_DIV_29 (RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_3|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 29 */ +#define LL_RCC_PLLP_DIV_30 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_3|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 30 */ +#define LL_RCC_PLLP_DIV_31 (RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_3|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 31 */ +#define LL_RCC_PLLP_DIV_32 (RCC_PLLCFGR_PLLP_0|RCC_PLLCFGR_PLLP_1|RCC_PLLCFGR_PLLP_2|RCC_PLLCFGR_PLLP_3|RCC_PLLCFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 32 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PLLQ_DIV PLL division factor (PLLQ) + * @{ + */ +#define LL_RCC_PLLQ_DIV_2 (RCC_PLLCFGR_PLLQ_0) /*!< Main PLL division factor for PLLQ output by 2 */ +#define LL_RCC_PLLQ_DIV_3 (RCC_PLLCFGR_PLLQ_1) /*!< Main PLL division factor for PLLQ output by 3 */ +#define LL_RCC_PLLQ_DIV_4 (RCC_PLLCFGR_PLLQ_1|RCC_PLLCFGR_PLLQ_0) /*!< Main PLL division factor for PLLQ output by 4 */ +#define LL_RCC_PLLQ_DIV_5 (RCC_PLLCFGR_PLLQ_2) /*!< Main PLL division factor for PLLQ output by 5 */ +#define LL_RCC_PLLQ_DIV_6 (RCC_PLLCFGR_PLLQ_2|RCC_PLLCFGR_PLLQ_0) /*!< Main PLL division factor for PLLQ output by 6 */ +#define LL_RCC_PLLQ_DIV_7 (RCC_PLLCFGR_PLLQ_2|RCC_PLLCFGR_PLLQ_1) /*!< Main PLL division factor for PLLQ output by 7 */ +#define LL_RCC_PLLQ_DIV_8 (RCC_PLLCFGR_PLLQ) /*!< Main PLL division factor for PLLQ output by 8 */ +/** + * @} + */ + + +#if defined(SAI1) +/** @defgroup RCC_LL_EC_PLLSAI1Q PLLSAI1 division factor (PLLQ) + * @{ + */ +#define LL_RCC_PLLSAI1Q_DIV_2 (RCC_PLLSAI1CFGR_PLLQ_0) /*!< PLLSAI1 division factor for PLLSAI1Q output by 2 */ +#define LL_RCC_PLLSAI1Q_DIV_3 (RCC_PLLSAI1CFGR_PLLQ_1) /*!< PLLSAI1 division factor for PLLSAI1Q output by 3 */ +#define LL_RCC_PLLSAI1Q_DIV_4 (RCC_PLLSAI1CFGR_PLLQ_1 | RCC_PLLSAI1CFGR_PLLQ_0) /*!< PLLSAI1 division factor for PLLSAI1Q output by 4 */ +#define LL_RCC_PLLSAI1Q_DIV_5 (RCC_PLLSAI1CFGR_PLLQ_2) /*!< PLLSAI1 division factor for PLLSAI1Q output by 5 */ +#define LL_RCC_PLLSAI1Q_DIV_6 (RCC_PLLSAI1CFGR_PLLQ_2 | RCC_PLLSAI1CFGR_PLLQ_0) /*!< PLLSAI1 division factor for PLLSAI1Q output by 6 */ +#define LL_RCC_PLLSAI1Q_DIV_7 (RCC_PLLSAI1CFGR_PLLQ_2 | RCC_PLLSAI1CFGR_PLLQ_1) /*!< PLLSAI1 division factor for PLLSAI1Q output by 7 */ +#define LL_RCC_PLLSAI1Q_DIV_8 (RCC_PLLSAI1CFGR_PLLQ_2 | RCC_PLLSAI1CFGR_PLLQ_1 | RCC_PLLSAI1CFGR_PLLQ_0) /*!< PLLSAI1 division factor for PLLSAI1Q output by 8 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PLLSAI1P PLLSAI1 division factor (PLLP) + * @{ + */ +#define LL_RCC_PLLSAI1P_DIV_2 (RCC_PLLSAI1CFGR_PLLP_0) /*!< Main PLL division factor for PLLP output by 2 */ +#define LL_RCC_PLLSAI1P_DIV_3 (RCC_PLLSAI1CFGR_PLLP_1) /*!< Main PLL division factor for PLLP output by 3 */ +#define LL_RCC_PLLSAI1P_DIV_4 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_1) /*!< Main PLL division factor for PLLP output by 4 */ +#define LL_RCC_PLLSAI1P_DIV_5 (RCC_PLLSAI1CFGR_PLLP_2) /*!< Main PLL division factor for PLLP output by 5 */ +#define LL_RCC_PLLSAI1P_DIV_6 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_2) /*!< Main PLL division factor for PLLP output by 6 */ +#define LL_RCC_PLLSAI1P_DIV_7 (RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_2) /*!< Main PLL division factor for PLLP output by 7 */ +#define LL_RCC_PLLSAI1P_DIV_8 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_2) /*!< Main PLL division factor for PLLP output by 8 */ +#define LL_RCC_PLLSAI1P_DIV_9 (RCC_PLLSAI1CFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 9 */ +#define LL_RCC_PLLSAI1P_DIV_10 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 10 */ +#define LL_RCC_PLLSAI1P_DIV_11 (RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 11 */ +#define LL_RCC_PLLSAI1P_DIV_12 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 12 */ +#define LL_RCC_PLLSAI1P_DIV_13 (RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 13 */ +#define LL_RCC_PLLSAI1P_DIV_14 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 14 */ +#define LL_RCC_PLLSAI1P_DIV_15 (RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 15 */ +#define LL_RCC_PLLSAI1P_DIV_16 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_3) /*!< Main PLL division factor for PLLP output by 16 */ +#define LL_RCC_PLLSAI1P_DIV_17 (RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 17 */ +#define LL_RCC_PLLSAI1P_DIV_18 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 18 */ +#define LL_RCC_PLLSAI1P_DIV_19 (RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 19 */ +#define LL_RCC_PLLSAI1P_DIV_20 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 20 */ +#define LL_RCC_PLLSAI1P_DIV_21 (RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 21 */ +#define LL_RCC_PLLSAI1P_DIV_22 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 22 */ +#define LL_RCC_PLLSAI1P_DIV_23 (RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 23 */ +#define LL_RCC_PLLSAI1P_DIV_24 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 24 */ +#define LL_RCC_PLLSAI1P_DIV_25 (RCC_PLLSAI1CFGR_PLLP_3|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 25 */ +#define LL_RCC_PLLSAI1P_DIV_26 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_3|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 26 */ +#define LL_RCC_PLLSAI1P_DIV_27 (RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_3|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 27*/ +#define LL_RCC_PLLSAI1P_DIV_28 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_3|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 28 */ +#define LL_RCC_PLLSAI1P_DIV_29 (RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_3|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 29 */ +#define LL_RCC_PLLSAI1P_DIV_30 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_3|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 30 */ +#define LL_RCC_PLLSAI1P_DIV_31 (RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_3|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 31 */ +#define LL_RCC_PLLSAI1P_DIV_32 (RCC_PLLSAI1CFGR_PLLP_0|RCC_PLLSAI1CFGR_PLLP_1|RCC_PLLSAI1CFGR_PLLP_2|RCC_PLLSAI1CFGR_PLLP_3|RCC_PLLSAI1CFGR_PLLP_4) /*!< Main PLL division factor for PLLP output by 32 */ +/** + * @} + */ + +/** @defgroup RCC_LL_EC_PLLSAI1R PLLSAI1 division factor (PLLR) + * @{ + */ +#define LL_RCC_PLLSAI1R_DIV_2 (RCC_PLLSAI1CFGR_PLLR_0) /*!< PLLSAI1 division factor for PLLSAI1R output by 2 */ +#define LL_RCC_PLLSAI1R_DIV_3 (RCC_PLLSAI1CFGR_PLLR_1) /*!< PLLSAI1 division factor for PLLSAI1R output by 3 */ +#define LL_RCC_PLLSAI1R_DIV_4 (RCC_PLLSAI1CFGR_PLLR_1 | RCC_PLLSAI1CFGR_PLLR_0) /*!< PLLSAI1 division factor for PLLSAI1R output by 4 */ +#define LL_RCC_PLLSAI1R_DIV_5 (RCC_PLLSAI1CFGR_PLLR_2) /*!< PLLSAI1 division factor for PLLSAI1R output by 5 */ +#define LL_RCC_PLLSAI1R_DIV_6 (RCC_PLLSAI1CFGR_PLLR_2 | RCC_PLLSAI1CFGR_PLLR_0) /*!< PLLSAI1 division factor for PLLSAI1R output by 6 */ +#define LL_RCC_PLLSAI1R_DIV_7 (RCC_PLLSAI1CFGR_PLLR_2 | RCC_PLLSAI1CFGR_PLLR_1) /*!< PLLSAI1 division factor for PLLSAI1R output by 7 */ +#define LL_RCC_PLLSAI1R_DIV_8 (RCC_PLLSAI1CFGR_PLLR_2 | RCC_PLLSAI1CFGR_PLLR_1 | RCC_PLLSAI1CFGR_PLLR_0) /*!< PLLSAI1 division factor for PLLSAI1R output by 8 */ +/** + * @} + */ +#endif /* SAI1 */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup RCC_LL_Exported_Macros RCC Exported Macros + * @{ + */ + +/** @defgroup RCC_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in RCC register + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_RCC_WriteReg(__REG__, __VALUE__) WRITE_REG(RCC->__REG__, (__VALUE__)) + +/** + * @brief Read a value in RCC register + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_RCC_ReadReg(__REG__) READ_REG(RCC->__REG__) +/** + * @} + */ + +/** @defgroup RCC_LL_EM_CALC_FREQ Calculate frequencies + * @{ + */ + +/** + * @brief Helper macro to calculate the PLLRCLK frequency on system domain + * @note ex: @ref __LL_RCC_CALC_PLLCLK_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (), + * @ref LL_RCC_PLL_GetN (), @ref LL_RCC_PLL_GetR ()); + * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI) + * @param __PLLM__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param __PLLN__ Between Min_Data = 6 and Max_Data = 127 + * @param __PLLR__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLR_DIV_2 + * @arg @ref LL_RCC_PLLR_DIV_3 + * @arg @ref LL_RCC_PLLR_DIV_4 + * @arg @ref LL_RCC_PLLR_DIV_5 + * @arg @ref LL_RCC_PLLR_DIV_6 + * @arg @ref LL_RCC_PLLR_DIV_7 + * @arg @ref LL_RCC_PLLR_DIV_8 + * @retval PLL clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLCLK_FREQ(__INPUTFREQ__, __PLLM__, __PLLN__, __PLLR__) ((__INPUTFREQ__) * (__PLLN__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) / \ + (((__PLLR__) >> RCC_PLLCFGR_PLLR_Pos) + 1U)) + +#if defined(SAI1) +/** + * @brief Helper macro to calculate the PLLPCLK frequency used on SAI domain + * @note ex: @ref __LL_RCC_CALC_PLLCLK_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (), + * @ref LL_RCC_PLL_GetN (), @ref LL_RCC_PLL_GetP ()); + * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI) + * @param __PLLM__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param __PLLN__ Between Min_Data = 6 and Max_Data = 127 + * @param __PLLP__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLP_DIV_2 + * @arg @ref LL_RCC_PLLP_DIV_3 + * @arg @ref LL_RCC_PLLP_DIV_4 + * @arg @ref LL_RCC_PLLP_DIV_5 + * @arg @ref LL_RCC_PLLP_DIV_6 + * @arg @ref LL_RCC_PLLP_DIV_7 + * @arg @ref LL_RCC_PLLP_DIV_8 + * @arg @ref LL_RCC_PLLP_DIV_9 + * @arg @ref LL_RCC_PLLP_DIV_10 + * @arg @ref LL_RCC_PLLP_DIV_11 + * @arg @ref LL_RCC_PLLP_DIV_12 + * @arg @ref LL_RCC_PLLP_DIV_13 + * @arg @ref LL_RCC_PLLP_DIV_14 + * @arg @ref LL_RCC_PLLP_DIV_15 + * @arg @ref LL_RCC_PLLP_DIV_16 + * @arg @ref LL_RCC_PLLP_DIV_17 + * @arg @ref LL_RCC_PLLP_DIV_18 + * @arg @ref LL_RCC_PLLP_DIV_19 + * @arg @ref LL_RCC_PLLP_DIV_20 + * @arg @ref LL_RCC_PLLP_DIV_21 + * @arg @ref LL_RCC_PLLP_DIV_22 + * @arg @ref LL_RCC_PLLP_DIV_23 + * @arg @ref LL_RCC_PLLP_DIV_24 + * @arg @ref LL_RCC_PLLP_DIV_25 + * @arg @ref LL_RCC_PLLP_DIV_26 + * @arg @ref LL_RCC_PLLP_DIV_27 + * @arg @ref LL_RCC_PLLP_DIV_28 + * @arg @ref LL_RCC_PLLP_DIV_29 + * @arg @ref LL_RCC_PLLP_DIV_30 + * @arg @ref LL_RCC_PLLP_DIV_31 + * @retval PLL clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLCLK_SAI_FREQ(__INPUTFREQ__, __PLLM__, __PLLN__, __PLLP__) ((__INPUTFREQ__) * (__PLLN__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U))/ \ + (((__PLLP__) >> RCC_PLLCFGR_PLLP_Pos) + 1U)) +#endif /* SAI1 */ + +/** + * @brief Helper macro to calculate the PLLPCLK frequency used on ADC domain + * @note ex: @ref __LL_RCC_CALC_PLLCLK_ADC_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (), + * @ref LL_RCC_PLL_GetN (), @ref LL_RCC_PLL_GetP ()); + * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI) + * @param __PLLM__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param __PLLN__ Between Min_Data = 6 and Max_Data = 127 + * @param __PLLP__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLP_DIV_2 + * @arg @ref LL_RCC_PLLP_DIV_3 + * @arg @ref LL_RCC_PLLP_DIV_4 + * @arg @ref LL_RCC_PLLP_DIV_5 + * @arg @ref LL_RCC_PLLP_DIV_6 + * @arg @ref LL_RCC_PLLP_DIV_7 + * @arg @ref LL_RCC_PLLP_DIV_8 + * @arg @ref LL_RCC_PLLP_DIV_9 + * @arg @ref LL_RCC_PLLP_DIV_10 + * @arg @ref LL_RCC_PLLP_DIV_11 + * @arg @ref LL_RCC_PLLP_DIV_12 + * @arg @ref LL_RCC_PLLP_DIV_13 + * @arg @ref LL_RCC_PLLP_DIV_14 + * @arg @ref LL_RCC_PLLP_DIV_15 + * @arg @ref LL_RCC_PLLP_DIV_16 + * @arg @ref LL_RCC_PLLP_DIV_17 + * @arg @ref LL_RCC_PLLP_DIV_18 + * @arg @ref LL_RCC_PLLP_DIV_19 + * @arg @ref LL_RCC_PLLP_DIV_20 + * @arg @ref LL_RCC_PLLP_DIV_21 + * @arg @ref LL_RCC_PLLP_DIV_22 + * @arg @ref LL_RCC_PLLP_DIV_23 + * @arg @ref LL_RCC_PLLP_DIV_24 + * @arg @ref LL_RCC_PLLP_DIV_25 + * @arg @ref LL_RCC_PLLP_DIV_26 + * @arg @ref LL_RCC_PLLP_DIV_27 + * @arg @ref LL_RCC_PLLP_DIV_28 + * @arg @ref LL_RCC_PLLP_DIV_29 + * @arg @ref LL_RCC_PLLP_DIV_30 + * @arg @ref LL_RCC_PLLP_DIV_31 + * @arg @ref LL_RCC_PLLP_DIV_32 + * @retval PLL clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLCLK_ADC_FREQ(__INPUTFREQ__, __PLLM__, __PLLN__, __PLLP__) ((__INPUTFREQ__) * (__PLLN__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) / \ + (((__PLLP__) >> RCC_PLLCFGR_PLLP_Pos) + 1U)) + + +/** + * @brief Helper macro to calculate the PLLQCLK frequency used on 48M domain + * @note ex: @ref __LL_RCC_CALC_PLLCLK_48M_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (), + * @ref LL_RCC_PLL_GetN (), @ref LL_RCC_PLL_GetQ ()); + * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI) + * @param __PLLM__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param __PLLN__ Between Min_Data = 6 and Max_Data = 127 + * @param __PLLQ__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLQ_DIV_2 + * @arg @ref LL_RCC_PLLQ_DIV_3 + * @arg @ref LL_RCC_PLLQ_DIV_4 + * @arg @ref LL_RCC_PLLQ_DIV_5 + * @arg @ref LL_RCC_PLLQ_DIV_6 + * @arg @ref LL_RCC_PLLQ_DIV_7 + * @arg @ref LL_RCC_PLLQ_DIV_8 + * @retval PLL clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLCLK_48M_FREQ(__INPUTFREQ__, __PLLM__, __PLLN__, __PLLQ__) ((__INPUTFREQ__) * (__PLLN__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) / \ + (((__PLLQ__) >> RCC_PLLCFGR_PLLQ_Pos) + 1U)) + +#if defined(SAI1) +/** + * @brief Helper macro to calculate the PLLSAI1PCLK frequency used for SAI domain + * @note ex: @ref __LL_RCC_CALC_PLLSAI1_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (), + * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetP ()); + * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI) + * @param __PLLM__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param __PLLSAI1N__ Between 6 and 127 + * @param __PLLSAI1P__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1P_DIV_2 + * @arg @ref LL_RCC_PLLSAI1P_DIV_3 + * @arg @ref LL_RCC_PLLSAI1P_DIV_4 + * @arg @ref LL_RCC_PLLSAI1P_DIV_5 + * @arg @ref LL_RCC_PLLSAI1P_DIV_6 + * @arg @ref LL_RCC_PLLSAI1P_DIV_7 + * @arg @ref LL_RCC_PLLSAI1P_DIV_8 + * @arg @ref LL_RCC_PLLSAI1P_DIV_9 + * @arg @ref LL_RCC_PLLSAI1P_DIV_10 + * @arg @ref LL_RCC_PLLSAI1P_DIV_11 + * @arg @ref LL_RCC_PLLSAI1P_DIV_12 + * @arg @ref LL_RCC_PLLSAI1P_DIV_13 + * @arg @ref LL_RCC_PLLSAI1P_DIV_14 + * @arg @ref LL_RCC_PLLSAI1P_DIV_15 + * @arg @ref LL_RCC_PLLSAI1P_DIV_16 + * @arg @ref LL_RCC_PLLSAI1P_DIV_17 + * @arg @ref LL_RCC_PLLSAI1P_DIV_18 + * @arg @ref LL_RCC_PLLSAI1P_DIV_19 + * @arg @ref LL_RCC_PLLSAI1P_DIV_20 + * @arg @ref LL_RCC_PLLSAI1P_DIV_21 + * @arg @ref LL_RCC_PLLSAI1P_DIV_22 + * @arg @ref LL_RCC_PLLSAI1P_DIV_23 + * @arg @ref LL_RCC_PLLSAI1P_DIV_24 + * @arg @ref LL_RCC_PLLSAI1P_DIV_25 + * @arg @ref LL_RCC_PLLSAI1P_DIV_26 + * @arg @ref LL_RCC_PLLSAI1P_DIV_27 + * @arg @ref LL_RCC_PLLSAI1P_DIV_28 + * @arg @ref LL_RCC_PLLSAI1P_DIV_29 + * @arg @ref LL_RCC_PLLSAI1P_DIV_30 + * @arg @ref LL_RCC_PLLSAI1P_DIV_31 + * @arg @ref LL_RCC_PLLSAI1P_DIV_32 + * @retval PLLSAI1 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLSAI1_SAI_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI1N__, __PLLSAI1P__) \ + ((__INPUTFREQ__) * (__PLLSAI1N__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) / \ + (((__PLLSAI1P__) >> RCC_PLLSAI1CFGR_PLLP_Pos) + 1U)) + +/** + * @brief Helper macro to calculate the PLLSAI1QCLK frequency used on 48M domain + * @note ex: @ref __LL_RCC_CALC_PLLSAI1_48M_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (), + * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetQ ()); + * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI) + * @param __PLLM__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param __PLLSAI1N__ Between 6 and 127 + * @param __PLLSAI1Q__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1Q_DIV_2 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_3 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_4 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_5 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_6 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_7 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_8 + * @retval PLLSAI1 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLSAI1_48M_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI1N__, __PLLSAI1Q__) \ + ((__INPUTFREQ__) * (__PLLSAI1N__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) / \ + (((__PLLSAI1Q__) >> RCC_PLLSAI1CFGR_PLLQ_Pos) + 1U)) + +/** + * @brief Helper macro to calculate the PLLSAI1RCLK frequency used on ADC domain + * @note ex: @ref __LL_RCC_CALC_PLLSAI1_ADC_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (), + * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetR ()); + * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI) + * @param __PLLM__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param __PLLSAI1N__ Between 6 and 127 + * @param __PLLSAI1R__ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1R_DIV_2 + * @arg @ref LL_RCC_PLLSAI1R_DIV_3 + * @arg @ref LL_RCC_PLLSAI1R_DIV_4 + * @arg @ref LL_RCC_PLLSAI1R_DIV_5 + * @arg @ref LL_RCC_PLLSAI1R_DIV_6 + * @arg @ref LL_RCC_PLLSAI1R_DIV_7 + * @arg @ref LL_RCC_PLLSAI1R_DIV_8 + * @retval PLLSAI1 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PLLSAI1_ADC_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI1N__, __PLLSAI1R__) \ + ((__INPUTFREQ__) * (__PLLSAI1N__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) / \ + (((__PLLSAI1R__) >> RCC_PLLSAI1CFGR_PLLR_Pos) + 1U)) +#endif /* SAI1 */ + +/** + * @brief Helper macro to calculate the HCLK1 frequency + * @param __SYSCLKFREQ__ SYSCLK frequency (based on MSI/HSE/HSI/PLLCLK) + * @param __CPU1PRESCALER__ This parameter can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + * @retval HCLK1 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_HCLK1_FREQ(__SYSCLKFREQ__,__CPU1PRESCALER__) ((__SYSCLKFREQ__) / AHBPrescTable[((__CPU1PRESCALER__)\ + & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos]) + +/** + * @brief Helper macro to calculate the HCLK2 frequency + * @param __SYSCLKFREQ__ SYSCLK frequency (based on MSI/HSE/HSI/PLLCLK) + * @param __CPU2PRESCALER__ This parameter can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + * @retval HCLK2 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_HCLK2_FREQ(__SYSCLKFREQ__, __CPU2PRESCALER__) ((__SYSCLKFREQ__) / AHBPrescTable[((__CPU2PRESCALER__)\ + & RCC_EXTCFGR_C2HPRE) >> RCC_EXTCFGR_C2HPRE_Pos]) + +/** + * @brief Helper macro to calculate the HCLK4 frequency + * @param __SYSCLKFREQ__ SYSCLK frequency (based on MSI/HSE/HSI/PLLCLK) + * @param __AHB4PRESCALER__ This parameter can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + * @retval HCLK4 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_HCLK4_FREQ(__SYSCLKFREQ__, __AHB4PRESCALER__) ((__SYSCLKFREQ__) / AHBPrescTable[(((__AHB4PRESCALER__) >> 4U)\ + & RCC_EXTCFGR_SHDHPRE) >> RCC_EXTCFGR_SHDHPRE_Pos]) + + +/** + * @brief Helper macro to calculate the PCLK1 frequency (ABP1) + * @param __HCLKFREQ__ HCLK frequency + * @param __APB1PRESCALER__ This parameter can be one of the following values: + * @arg @ref LL_RCC_APB1_DIV_1 + * @arg @ref LL_RCC_APB1_DIV_2 + * @arg @ref LL_RCC_APB1_DIV_4 + * @arg @ref LL_RCC_APB1_DIV_8 + * @arg @ref LL_RCC_APB1_DIV_16 + * @retval PCLK1 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PCLK1_FREQ(__HCLKFREQ__, __APB1PRESCALER__) ((__HCLKFREQ__) >> (APBPrescTable[(((__APB1PRESCALER__)\ + & RCC_CFGR_PPRE1_Msk) >> RCC_CFGR_PPRE1_Pos)] & 31U)) + +/** + * @brief Helper macro to calculate the PCLK2 frequency (ABP2) + * @param __HCLKFREQ__ HCLK frequency + * @param __APB2PRESCALER__ This parameter can be one of the following values: + * @arg @ref LL_RCC_APB2_DIV_1 + * @arg @ref LL_RCC_APB2_DIV_2 + * @arg @ref LL_RCC_APB2_DIV_4 + * @arg @ref LL_RCC_APB2_DIV_8 + * @arg @ref LL_RCC_APB2_DIV_16 + * @retval PCLK2 clock frequency (in Hz) + */ +#define __LL_RCC_CALC_PCLK2_FREQ(__HCLKFREQ__, __APB2PRESCALER__) ((__HCLKFREQ__) >> (APBPrescTable[(((__APB2PRESCALER__)\ + & RCC_CFGR_PPRE2_Msk) >> RCC_CFGR_PPRE2_Pos)] & 31U)) + +/** + * @brief Helper macro to calculate the MSI frequency (in Hz) + * @note __MSIRANGE__can be retrieved by @ref LL_RCC_MSI_GetRange() + * @param __MSIRANGE__ This parameter can be one of the following values: + * @arg @ref LL_RCC_MSIRANGE_0 + * @arg @ref LL_RCC_MSIRANGE_1 + * @arg @ref LL_RCC_MSIRANGE_2 + * @arg @ref LL_RCC_MSIRANGE_3 + * @arg @ref LL_RCC_MSIRANGE_4 + * @arg @ref LL_RCC_MSIRANGE_5 + * @arg @ref LL_RCC_MSIRANGE_6 + * @arg @ref LL_RCC_MSIRANGE_7 + * @arg @ref LL_RCC_MSIRANGE_8 + * @arg @ref LL_RCC_MSIRANGE_9 + * @arg @ref LL_RCC_MSIRANGE_10 + * @arg @ref LL_RCC_MSIRANGE_11 + * @retval MSI clock frequency (in Hz) + */ +#define __LL_RCC_CALC_MSI_FREQ(__MSIRANGE__) MSIRangeTable[((__MSIRANGE__)\ + & RCC_CR_MSIRANGE_Msk) >> RCC_CR_MSIRANGE_Pos] +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup RCC_LL_Exported_Functions RCC Exported Functions + * @{ + */ + +/** @defgroup RCC_LL_EF_HSE HSE + * @{ + */ + +/** + * @brief Enable HSE sysclk and pll prescaler division by 2 + * @rmtoll CR HSEPRE LL_RCC_HSE_EnableDiv2 + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_EnableDiv2(void) +{ + SET_BIT(RCC->CR, RCC_CR_HSEPRE); +} + +/** + * @brief Disable HSE sysclk and pll prescaler + * @rmtoll CR HSEPRE LL_RCC_HSE_DisableDiv2 + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_DisableDiv2(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_HSEPRE); +} + +/** + * @brief Get HSE sysclk and pll prescaler + * @rmtoll CR HSEPRE LL_RCC_HSE_IsEnabledDiv2 + * @retval None + */ +__STATIC_INLINE uint32_t LL_RCC_HSE_IsEnabledDiv2(void) +{ + return ((READ_BIT(RCC->CR, RCC_CR_HSEPRE) == (RCC_CR_HSEPRE)) ? 1UL : 0UL); +} + +/** + * @brief Enable the Clock Security System. + * @rmtoll CR CSSON LL_RCC_HSE_EnableCSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_EnableCSS(void) +{ + SET_BIT(RCC->CR, RCC_CR_CSSON); +} + +/** + * @brief Enable HSE crystal oscillator (HSE ON) + * @rmtoll CR HSEON LL_RCC_HSE_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_Enable(void) +{ + SET_BIT(RCC->CR, RCC_CR_HSEON); +} + +/** + * @brief Disable HSE crystal oscillator (HSE ON) + * @rmtoll CR HSEON LL_RCC_HSE_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_Disable(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_HSEON); +} + +/** + * @brief Check if HSE oscillator Ready + * @rmtoll CR HSERDY LL_RCC_HSE_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSE_IsReady(void) +{ + return ((READ_BIT(RCC->CR, RCC_CR_HSERDY) == (RCC_CR_HSERDY)) ? 1UL : 0UL); +} + +/** + * @brief Check if HSE clock control register is locked or not + * @rmtoll HSECR UNLOCKED LL_RCC_HSE_IsClockControlLocked + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSE_IsClockControlLocked(void) +{ + return ((READ_BIT(RCC->HSECR, RCC_HSECR_UNLOCKED) != (RCC_HSECR_UNLOCKED)) ? 1UL : 0UL); +} + +/** + * @brief Set HSE capacitor tuning + * @rmtoll HSECR HSETUNE LL_RCC_HSE_SetCapacitorTuning + * @param Value Between Min_Data = 0 and Max_Data = 63 + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSE_SetCapacitorTuning(uint32_t Value) +{ + WRITE_REG(RCC->HSECR, HSE_CONTROL_UNLOCK_KEY); + MODIFY_REG(RCC->HSECR, RCC_HSECR_HSETUNE, Value << RCC_HSECR_HSETUNE_Pos); +} + +/** + * @brief Get HSE capacitor tuning + * @rmtoll HSECR HSETUNE LL_RCC_HSE_GetCapacitorTuning + * @retval Between Min_Data = 0 and Max_Data = 63 + */ +__STATIC_INLINE uint32_t LL_RCC_HSE_GetCapacitorTuning(void) +{ + return (uint32_t)(READ_BIT(RCC->HSECR, RCC_HSECR_HSETUNE) >> RCC_HSECR_HSETUNE_Pos); +} + +/** + * @brief Set HSE current control + * @rmtoll HSECR HSEGMC LL_RCC_HSE_SetCurrentControl + * @param CurrentMax This parameter can be one of the following values: + * @arg @ref LL_RCC_HSE_CURRENTMAX_0 + * @arg @ref LL_RCC_HSE_CURRENTMAX_1 + * @arg @ref LL_RCC_HSE_CURRENTMAX_2 + * @arg @ref LL_RCC_HSE_CURRENTMAX_3 + * @arg @ref LL_RCC_HSE_CURRENTMAX_4 + * @arg @ref LL_RCC_HSE_CURRENTMAX_5 + * @arg @ref LL_RCC_HSE_CURRENTMAX_6 + * @arg @ref LL_RCC_HSE_CURRENTMAX_7 + */ +__STATIC_INLINE void LL_RCC_HSE_SetCurrentControl(uint32_t CurrentMax) +{ + WRITE_REG(RCC->HSECR, HSE_CONTROL_UNLOCK_KEY); + MODIFY_REG(RCC->HSECR, RCC_HSECR_HSEGMC, CurrentMax); +} + +/** + * @brief Get HSE current control + * @rmtoll HSECR HSEGMC LL_RCC_HSE_GetCurrentControl + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_HSE_CURRENTMAX_0 + * @arg @ref LL_RCC_HSE_CURRENTMAX_1 + * @arg @ref LL_RCC_HSE_CURRENTMAX_2 + * @arg @ref LL_RCC_HSE_CURRENTMAX_3 + * @arg @ref LL_RCC_HSE_CURRENTMAX_4 + * @arg @ref LL_RCC_HSE_CURRENTMAX_5 + * @arg @ref LL_RCC_HSE_CURRENTMAX_6 + * @arg @ref LL_RCC_HSE_CURRENTMAX_7 + */ +__STATIC_INLINE uint32_t LL_RCC_HSE_GetCurrentControl(void) +{ + return (uint32_t)(READ_BIT(RCC->HSECR, RCC_HSECR_HSEGMC)); +} + +/** + * @brief Set HSE sense amplifier threshold + * @rmtoll HSECR HSES LL_RCC_HSE_SetSenseAmplifier + * @param SenseAmplifier This parameter can be one of the following values: + * @arg @ref LL_RCC_HSEAMPTHRESHOLD_1_2 + * @arg @ref LL_RCC_HSEAMPTHRESHOLD_3_4 + */ +__STATIC_INLINE void LL_RCC_HSE_SetSenseAmplifier(uint32_t SenseAmplifier) +{ + WRITE_REG(RCC->HSECR, HSE_CONTROL_UNLOCK_KEY); + MODIFY_REG(RCC->HSECR, RCC_HSECR_HSES, SenseAmplifier); +} + +/** + * @brief Get HSE current control + * @rmtoll HSECR HSES LL_RCC_HSE_GetSenseAmplifier + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_HSEAMPTHRESHOLD_1_2 + * @arg @ref LL_RCC_HSEAMPTHRESHOLD_3_4 + */ +__STATIC_INLINE uint32_t LL_RCC_HSE_GetSenseAmplifier(void) +{ + return (uint32_t)(READ_BIT(RCC->HSECR, RCC_HSECR_HSES)); +} +/** + * @} + */ + +/** @defgroup RCC_LL_EF_HSI HSI + * @{ + */ + +/** + * @brief Enable HSI even in stop mode + * @note HSI oscillator is forced ON even in Stop mode + * @rmtoll CR HSIKERON LL_RCC_HSI_EnableInStopMode + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_EnableInStopMode(void) +{ + SET_BIT(RCC->CR, RCC_CR_HSIKERON); +} + +/** + * @brief Disable HSI in stop mode + * @rmtoll CR HSIKERON LL_RCC_HSI_DisableInStopMode + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_DisableInStopMode(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_HSIKERON); +} + +/** + * @brief Check if HSI in stop mode is ready + * @rmtoll CR HSIKERON LL_RCC_HSI_IsEnabledInStopMode + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSI_IsEnabledInStopMode(void) +{ + return ((READ_BIT(RCC->CR, RCC_CR_HSIKERON) == (RCC_CR_HSIKERON)) ? 1UL : 0UL); +} + +/** + * @brief Enable HSI oscillator + * @rmtoll CR HSION LL_RCC_HSI_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_Enable(void) +{ + SET_BIT(RCC->CR, RCC_CR_HSION); +} + +/** + * @brief Disable HSI oscillator + * @rmtoll CR HSION LL_RCC_HSI_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_Disable(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_HSION); +} + +/** + * @brief Check if HSI clock is ready + * @rmtoll CR HSIRDY LL_RCC_HSI_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSI_IsReady(void) +{ + return ((READ_BIT(RCC->CR, RCC_CR_HSIRDY) == (RCC_CR_HSIRDY)) ? 1UL : 0UL); +} + +/** + * @brief Enable HSI Automatic from stop mode + * @rmtoll CR HSIASFS LL_RCC_HSI_EnableAutoFromStop + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_EnableAutoFromStop(void) +{ + SET_BIT(RCC->CR, RCC_CR_HSIASFS); +} + +/** + * @brief Disable HSI Automatic from stop mode + * @rmtoll CR HSIASFS LL_RCC_HSI_DisableAutoFromStop + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_DisableAutoFromStop(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_HSIASFS); +} +/** + * @brief Get HSI Calibration value + * @note When HSITRIM is written, HSICAL is updated with the sum of + * HSITRIM and the factory trim value + * @rmtoll ICSCR HSICAL LL_RCC_HSI_GetCalibration + * @retval Between Min_Data = 0x00 and Max_Data = 0xFF + */ +__STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration(void) +{ + return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_HSICAL) >> RCC_ICSCR_HSICAL_Pos); +} + +/** + * @brief Set HSI Calibration trimming + * @note user-programmable trimming value that is added to the HSICAL + * @note Default value is 64, which, when added to the HSICAL value, + * should trim the HSI to 16 MHz +/- 1 % + * @rmtoll ICSCR HSITRIM LL_RCC_HSI_SetCalibTrimming + * @param Value Between Min_Data = 0 and Max_Data = 127 + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming(uint32_t Value) +{ + MODIFY_REG(RCC->ICSCR, RCC_ICSCR_HSITRIM, Value << RCC_ICSCR_HSITRIM_Pos); +} + +/** + * @brief Get HSI Calibration trimming + * @rmtoll ICSCR HSITRIM LL_RCC_HSI_GetCalibTrimming + * @retval Between Min_Data = 0 and Max_Data = 127 + */ +__STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibTrimming(void) +{ + return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_HSITRIM) >> RCC_ICSCR_HSITRIM_Pos); +} + +/** + * @} + */ + +#if defined(RCC_HSI48_SUPPORT) +/** @defgroup RCC_LL_EF_HSI48 HSI48 + * @{ + */ + +/** + * @brief Enable HSI48 + * @rmtoll CRRCR HSI48ON LL_RCC_HSI48_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI48_Enable(void) +{ + SET_BIT(RCC->CRRCR, RCC_CRRCR_HSI48ON); +} + +/** + * @brief Disable HSI48 + * @rmtoll CRRCR HSI48ON LL_RCC_HSI48_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_HSI48_Disable(void) +{ + CLEAR_BIT(RCC->CRRCR, RCC_CRRCR_HSI48ON); +} + +/** + * @brief Check if HSI48 oscillator Ready + * @rmtoll CRRCR HSI48RDY LL_RCC_HSI48_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_HSI48_IsReady(void) +{ + return ((READ_BIT(RCC->CRRCR, RCC_CRRCR_HSI48RDY) == (RCC_CRRCR_HSI48RDY)) ? 1UL : 0UL); +} + +/** + * @brief Get HSI48 Calibration value + * @rmtoll CRRCR HSI48CAL LL_RCC_HSI48_GetCalibration + * @retval Between Min_Data = 0x00 and Max_Data = 0x1FF + */ +__STATIC_INLINE uint32_t LL_RCC_HSI48_GetCalibration(void) +{ + return (uint32_t)(READ_BIT(RCC->CRRCR, RCC_CRRCR_HSI48CAL) >> RCC_CRRCR_HSI48CAL_Pos); +} + +/** + * @} + */ +#endif /* RCC_HSI48_SUPPORT */ + +/** @defgroup RCC_LL_EF_LSE LSE + * @{ + */ + +/** + * @brief Enable Low Speed External (LSE) crystal. + * @rmtoll BDCR LSEON LL_RCC_LSE_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_Enable(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_LSEON); +} + +/** + * @brief Disable Low Speed External (LSE) crystal. + * @rmtoll BDCR LSEON LL_RCC_LSE_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_Disable(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON); +} + +/** + * @brief Check if Low Speed External (LSE) crystal has been enabled or not + * @rmtoll BDCR LSEON LL_RCC_LSE_IsEnabled + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_LSE_IsEnabled(void) +{ + return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSEON) == (RCC_BDCR_LSEON)) ? 1UL : 0UL); +} + +/** + * @brief Enable external clock source (LSE bypass). + * @rmtoll BDCR LSEBYP LL_RCC_LSE_EnableBypass + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_EnableBypass(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); +} + +/** + * @brief Disable external clock source (LSE bypass). + * @rmtoll BDCR LSEBYP LL_RCC_LSE_DisableBypass + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_DisableBypass(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); +} + +/** + * @brief Set LSE oscillator drive capability + * @note The oscillator is in Xtal mode when it is not in bypass mode. + * @rmtoll BDCR LSEDRV LL_RCC_LSE_SetDriveCapability + * @param LSEDrive This parameter can be one of the following values: + * @arg @ref LL_RCC_LSEDRIVE_LOW + * @arg @ref LL_RCC_LSEDRIVE_MEDIUMLOW + * @arg @ref LL_RCC_LSEDRIVE_MEDIUMHIGH + * @arg @ref LL_RCC_LSEDRIVE_HIGH + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_SetDriveCapability(uint32_t LSEDrive) +{ + MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, LSEDrive); +} + +/** + * @brief Get LSE oscillator drive capability + * @rmtoll BDCR LSEDRV LL_RCC_LSE_GetDriveCapability + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_LSEDRIVE_LOW + * @arg @ref LL_RCC_LSEDRIVE_MEDIUMLOW + * @arg @ref LL_RCC_LSEDRIVE_MEDIUMHIGH + * @arg @ref LL_RCC_LSEDRIVE_HIGH + */ +__STATIC_INLINE uint32_t LL_RCC_LSE_GetDriveCapability(void) +{ + return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_LSEDRV)); +} + +/** + * @brief Enable Clock security system on LSE. + * @rmtoll BDCR LSECSSON LL_RCC_LSE_EnableCSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_EnableCSS(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_LSECSSON); +} + +/** + * @brief Disable Clock security system on LSE. + * @note Clock security system can be disabled only after a LSE + * failure detection. In that case it MUST be disabled by software. + * @rmtoll BDCR LSECSSON LL_RCC_LSE_DisableCSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSE_DisableCSS(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSECSSON); +} + +/** + * @brief Check if LSE oscillator Ready + * @rmtoll BDCR LSERDY LL_RCC_LSE_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_LSE_IsReady(void) +{ + return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == (RCC_BDCR_LSERDY)) ? 1UL : 0UL); +} + +/** + * @brief Check if CSS on LSE failure Detection + * @rmtoll BDCR LSECSSD LL_RCC_LSE_IsCSSDetected + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_LSE_IsCSSDetected(void) +{ + return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSECSSD) == (RCC_BDCR_LSECSSD)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_LSI1 LSI1 + * @{ + */ + +/** + * @brief Enable LSI1 Oscillator + * @rmtoll CSR LSI1ON LL_RCC_LSI1_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSI1_Enable(void) +{ + SET_BIT(RCC->CSR, RCC_CSR_LSI1ON); +} + +/** + * @brief Disable LSI1 Oscillator + * @rmtoll CSR LSI1ON LL_RCC_LSI1_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSI1_Disable(void) +{ + CLEAR_BIT(RCC->CSR, RCC_CSR_LSI1ON); +} + +/** + * @brief Check if LSI1 is Ready + * @rmtoll CSR LSI1RDY LL_RCC_LSI1_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_LSI1_IsReady(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_LSI1RDY) == (RCC_CSR_LSI1RDY)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_LSI2 LSI2 + * @{ + */ + +/** + * @brief Enable LSI2 Oscillator + * @rmtoll CSR LSI2ON LL_RCC_LSI2_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSI2_Enable(void) +{ + SET_BIT(RCC->CSR, RCC_CSR_LSI2ON); +} + +/** + * @brief Disable LSI2 Oscillator + * @rmtoll CSR LSI2ON LL_RCC_LSI2_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSI2_Disable(void) +{ + CLEAR_BIT(RCC->CSR, RCC_CSR_LSI2ON); +} + +/** + * @brief Check if LSI2 is Ready + * @rmtoll CSR LSI2RDY LL_RCC_LSI2_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_LSI2_IsReady(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_LSI2RDY) == (RCC_CSR_LSI2RDY)) ? 1UL : 0UL); +} + +/** + * @brief Set LSI2 trimming value + * @rmtoll CSR LSI2TRIM LL_RCC_LSI2_SetTrimming + * @param Value Between Min_Data = 0 and Max_Data = 15 + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSI2_SetTrimming(uint32_t Value) +{ + MODIFY_REG(RCC->CSR, RCC_CSR_LSI2TRIM, Value << RCC_CSR_LSI2TRIM_Pos); +} + +/** + * @brief Get LSI2 trimming value + * @rmtoll CSR LSI2TRIM LL_RCC_LSI2_GetTrimming + * @retval Between Min_Data = 0 and Max_Data = 12 + */ +__STATIC_INLINE uint32_t LL_RCC_LSI2_GetTrimming(void) +{ + return (uint32_t)(READ_BIT(RCC->CSR, RCC_CSR_LSI2TRIM) >> RCC_CSR_LSI2TRIM_Pos); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_MSI MSI + * @{ + */ + +/** + * @brief Enable MSI oscillator + * @rmtoll CR MSION LL_RCC_MSI_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_MSI_Enable(void) +{ + SET_BIT(RCC->CR, RCC_CR_MSION); +} + +/** + * @brief Disable MSI oscillator + * @rmtoll CR MSION LL_RCC_MSI_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_MSI_Disable(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_MSION); +} + +/** + * @brief Check if MSI oscillator Ready + * @rmtoll CR MSIRDY LL_RCC_MSI_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_MSI_IsReady(void) +{ + return ((READ_BIT(RCC->CR, RCC_CR_MSIRDY) == (RCC_CR_MSIRDY)) ? 1UL : 0UL); +} + +/** + * @brief Enable MSI PLL-mode (Hardware auto calibration with LSE) + * @note MSIPLLEN must be enabled after LSE is enabled (LSEON enabled) + * and ready (LSERDY set by hardware) + * @note hardware protection to avoid enabling MSIPLLEN if LSE is not + * ready + * @rmtoll CR MSIPLLEN LL_RCC_MSI_EnablePLLMode + * @retval None + */ +__STATIC_INLINE void LL_RCC_MSI_EnablePLLMode(void) +{ + SET_BIT(RCC->CR, RCC_CR_MSIPLLEN); +} + +/** + * @brief Disable MSI-PLL mode + * @note cleared by hardware when LSE is disabled (LSEON = 0) or when + * the Clock Security System on LSE detects a LSE failure + * @rmtoll CR MSIPLLEN LL_RCC_MSI_DisablePLLMode + * @retval None + */ +__STATIC_INLINE void LL_RCC_MSI_DisablePLLMode(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_MSIPLLEN); +} + + +/** + * @brief Configure the Internal Multi Speed oscillator (MSI) clock range in run mode. + * @rmtoll CR MSIRANGE LL_RCC_MSI_SetRange + * @param Range This parameter can be one of the following values: + * @arg @ref LL_RCC_MSIRANGE_0 + * @arg @ref LL_RCC_MSIRANGE_1 + * @arg @ref LL_RCC_MSIRANGE_2 + * @arg @ref LL_RCC_MSIRANGE_3 + * @arg @ref LL_RCC_MSIRANGE_4 + * @arg @ref LL_RCC_MSIRANGE_5 + * @arg @ref LL_RCC_MSIRANGE_6 + * @arg @ref LL_RCC_MSIRANGE_7 + * @arg @ref LL_RCC_MSIRANGE_8 + * @arg @ref LL_RCC_MSIRANGE_9 + * @arg @ref LL_RCC_MSIRANGE_10 + * @arg @ref LL_RCC_MSIRANGE_11 + * @retval None + */ +__STATIC_INLINE void LL_RCC_MSI_SetRange(uint32_t Range) +{ + MODIFY_REG(RCC->CR, RCC_CR_MSIRANGE, Range); +} + +/** + * @brief Get the Internal Multi Speed oscillator (MSI) clock range in run mode. + * @rmtoll CR MSIRANGE LL_RCC_MSI_GetRange + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_MSIRANGE_0 + * @arg @ref LL_RCC_MSIRANGE_1 + * @arg @ref LL_RCC_MSIRANGE_2 + * @arg @ref LL_RCC_MSIRANGE_3 + * @arg @ref LL_RCC_MSIRANGE_4 + * @arg @ref LL_RCC_MSIRANGE_5 + * @arg @ref LL_RCC_MSIRANGE_6 + * @arg @ref LL_RCC_MSIRANGE_7 + * @arg @ref LL_RCC_MSIRANGE_8 + * @arg @ref LL_RCC_MSIRANGE_9 + * @arg @ref LL_RCC_MSIRANGE_10 + * @arg @ref LL_RCC_MSIRANGE_11 + */ +__STATIC_INLINE uint32_t LL_RCC_MSI_GetRange(void) +{ + uint32_t msiRange = READ_BIT(RCC->CR, RCC_CR_MSIRANGE); + if (msiRange > LL_RCC_MSIRANGE_11) + { + msiRange = LL_RCC_MSIRANGE_11; + } + return msiRange; +} + + +/** + * @brief Get MSI Calibration value + * @note When MSITRIM is written, MSICAL is updated with the sum of + * MSITRIM and the factory trim value + * @rmtoll ICSCR MSICAL LL_RCC_MSI_GetCalibration + * @retval Between Min_Data = 0 and Max_Data = 255 + */ +__STATIC_INLINE uint32_t LL_RCC_MSI_GetCalibration(void) +{ + return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_MSICAL) >> RCC_ICSCR_MSICAL_Pos); +} + +/** + * @brief Set MSI Calibration trimming + * @note user-programmable trimming value that is added to the MSICAL + * @rmtoll ICSCR MSITRIM LL_RCC_MSI_SetCalibTrimming + * @param Value Between Min_Data = 0 and Max_Data = 255 + * @retval None + */ +__STATIC_INLINE void LL_RCC_MSI_SetCalibTrimming(uint32_t Value) +{ + MODIFY_REG(RCC->ICSCR, RCC_ICSCR_MSITRIM, Value << RCC_ICSCR_MSITRIM_Pos); +} + +/** + * @brief Get MSI Calibration trimming + * @rmtoll ICSCR MSITRIM LL_RCC_MSI_GetCalibTrimming + * @retval Between 0 and 255 + */ +__STATIC_INLINE uint32_t LL_RCC_MSI_GetCalibTrimming(void) +{ + return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_MSITRIM) >> RCC_ICSCR_MSITRIM_Pos); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_LSCO LSCO + * @{ + */ + +/** + * @brief Enable Low speed clock + * @rmtoll BDCR LSCOEN LL_RCC_LSCO_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSCO_Enable(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_LSCOEN); +} + +/** + * @brief Disable Low speed clock + * @rmtoll BDCR LSCOEN LL_RCC_LSCO_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSCO_Disable(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSCOEN); +} + +/** + * @brief Configure Low speed clock selection + * @rmtoll BDCR LSCOSEL LL_RCC_LSCO_SetSource + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_LSCO_CLKSOURCE_LSI + * @arg @ref LL_RCC_LSCO_CLKSOURCE_LSE + * @retval None + */ +__STATIC_INLINE void LL_RCC_LSCO_SetSource(uint32_t Source) +{ + MODIFY_REG(RCC->BDCR, RCC_BDCR_LSCOSEL, Source); +} + +/** + * @brief Get Low speed clock selection + * @rmtoll BDCR LSCOSEL LL_RCC_LSCO_GetSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_LSCO_CLKSOURCE_LSI + * @arg @ref LL_RCC_LSCO_CLKSOURCE_LSE + */ +__STATIC_INLINE uint32_t LL_RCC_LSCO_GetSource(void) +{ + return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_LSCOSEL)); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_System System + * @{ + */ + +/** + * @brief Configure the system clock source + * @rmtoll CFGR SW LL_RCC_SetSysClkSource + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_SYS_CLKSOURCE_MSI + * @arg @ref LL_RCC_SYS_CLKSOURCE_HSI + * @arg @ref LL_RCC_SYS_CLKSOURCE_HSE + * @arg @ref LL_RCC_SYS_CLKSOURCE_PLL + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetSysClkSource(uint32_t Source) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, Source); +} + +/** + * @brief Get the system clock source + * @rmtoll CFGR SWS LL_RCC_GetSysClkSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_MSI + * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_HSI + * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_HSE + * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_PLL + */ +__STATIC_INLINE uint32_t LL_RCC_GetSysClkSource(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_SWS)); +} + +/** + * @brief Get the RF clock source + * @rmtoll EXTCFGR RFCSS LL_RCC_GetRFClockSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_RF_CLKSOURCE_HSI + * @arg @ref LL_RCC_RF_CLKSOURCE_HSE_DIV2 + */ +__STATIC_INLINE uint32_t LL_RCC_GetRFClockSource(void) +{ + return (uint32_t)(READ_BIT(RCC->EXTCFGR, RCC_EXTCFGR_RFCSS)); +} + +/** + * @brief Set RF Wakeup Clock Source + * @rmtoll CSR RFWKPSEL LL_RCC_SetRFWKPClockSource + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_RFWKP_CLKSOURCE_NONE + * @arg @ref LL_RCC_RFWKP_CLKSOURCE_LSE + * @arg @ref LL_RCC_RFWKP_CLKSOURCE_LSI (*) + * @arg @ref LL_RCC_RFWKP_CLKSOURCE_HSE_DIV1024 + * @note (*) Value not defined for all devices + * + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetRFWKPClockSource(uint32_t Source) +{ + MODIFY_REG(RCC->CSR, RCC_CSR_RFWKPSEL, Source); +} + +/** + * @brief Get RF Wakeup Clock Source + * @rmtoll CSR RFWKPSEL LL_RCC_GetRFWKPClockSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_RFWKP_CLKSOURCE_NONE + * @arg @ref LL_RCC_RFWKP_CLKSOURCE_LSE + * @arg @ref LL_RCC_RFWKP_CLKSOURCE_LSI (*) + * @arg @ref LL_RCC_RFWKP_CLKSOURCE_HSE_DIV1024 + * @note (*) Value not defined for all devices + * + */ +__STATIC_INLINE uint32_t LL_RCC_GetRFWKPClockSource(void) +{ + return (uint32_t)(READ_BIT(RCC->CSR, RCC_CSR_RFWKPSEL)); +} + +/** + * @brief Check if Radio System is reset. + * @rmtoll CSR RFRSTS LL_RCC_IsRFUnderReset + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsRFUnderReset(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_RFRSTS) == (RCC_CSR_RFRSTS)) ? 1UL : 0UL); +} + +/** + * @brief Set AHB prescaler + * @rmtoll CFGR HPRE LL_RCC_SetAHBPrescaler + * @param Prescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetAHBPrescaler(uint32_t Prescaler) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, Prescaler); +} + +/** + * @brief Set CPU2 AHB prescaler + * @rmtoll EXTCFGR C2HPRE LL_C2_RCC_SetAHBPrescaler + * @param Prescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + * @retval None + */ +__STATIC_INLINE void LL_C2_RCC_SetAHBPrescaler(uint32_t Prescaler) +{ + MODIFY_REG(RCC->EXTCFGR, RCC_EXTCFGR_C2HPRE, Prescaler); +} + +/** + * @brief Set AHB4 prescaler + * @rmtoll EXTCFGR SHDHPRE LL_RCC_SetAHB4Prescaler + * @param Prescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetAHB4Prescaler(uint32_t Prescaler) +{ + MODIFY_REG(RCC->EXTCFGR, RCC_EXTCFGR_SHDHPRE, Prescaler >> 4); +} + +/** + * @brief Set APB1 prescaler + * @rmtoll CFGR PPRE1 LL_RCC_SetAPB1Prescaler + * @param Prescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_APB1_DIV_1 + * @arg @ref LL_RCC_APB1_DIV_2 + * @arg @ref LL_RCC_APB1_DIV_4 + * @arg @ref LL_RCC_APB1_DIV_8 + * @arg @ref LL_RCC_APB1_DIV_16 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetAPB1Prescaler(uint32_t Prescaler) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, Prescaler); +} + +/** + * @brief Set APB2 prescaler + * @rmtoll CFGR PPRE2 LL_RCC_SetAPB2Prescaler + * @param Prescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_APB2_DIV_1 + * @arg @ref LL_RCC_APB2_DIV_2 + * @arg @ref LL_RCC_APB2_DIV_4 + * @arg @ref LL_RCC_APB2_DIV_8 + * @arg @ref LL_RCC_APB2_DIV_16 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetAPB2Prescaler(uint32_t Prescaler) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, Prescaler); +} + +/** + * @brief Get AHB prescaler + * @rmtoll CFGR HPRE LL_RCC_GetAHBPrescaler + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + */ +__STATIC_INLINE uint32_t LL_RCC_GetAHBPrescaler(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_HPRE)); +} + +/** + * @brief Get C2 AHB prescaler + * @rmtoll EXTCFGR C2HPRE LL_C2_RCC_GetAHBPrescaler + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + */ +__STATIC_INLINE uint32_t LL_C2_RCC_GetAHBPrescaler(void) +{ + return (uint32_t)(READ_BIT(RCC->EXTCFGR, RCC_EXTCFGR_C2HPRE)); +} + +/** + * @brief Get AHB4 prescaler + * @rmtoll EXTCFGR SHDHPRE LL_RCC_GetAHB4Prescaler + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SYSCLK_DIV_1 + * @arg @ref LL_RCC_SYSCLK_DIV_2 + * @arg @ref LL_RCC_SYSCLK_DIV_3 + * @arg @ref LL_RCC_SYSCLK_DIV_4 + * @arg @ref LL_RCC_SYSCLK_DIV_5 + * @arg @ref LL_RCC_SYSCLK_DIV_6 + * @arg @ref LL_RCC_SYSCLK_DIV_8 + * @arg @ref LL_RCC_SYSCLK_DIV_10 + * @arg @ref LL_RCC_SYSCLK_DIV_16 + * @arg @ref LL_RCC_SYSCLK_DIV_32 + * @arg @ref LL_RCC_SYSCLK_DIV_64 + * @arg @ref LL_RCC_SYSCLK_DIV_128 + * @arg @ref LL_RCC_SYSCLK_DIV_256 + * @arg @ref LL_RCC_SYSCLK_DIV_512 + */ +__STATIC_INLINE uint32_t LL_RCC_GetAHB4Prescaler(void) +{ + return (uint32_t)(READ_BIT(RCC->EXTCFGR, RCC_EXTCFGR_SHDHPRE) << 4); +} + +/** + * @brief Get APB1 prescaler + * @rmtoll CFGR PPRE1 LL_RCC_GetAPB1Prescaler + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_APB1_DIV_1 + * @arg @ref LL_RCC_APB1_DIV_2 + * @arg @ref LL_RCC_APB1_DIV_4 + * @arg @ref LL_RCC_APB1_DIV_8 + * @arg @ref LL_RCC_APB1_DIV_16 + */ +__STATIC_INLINE uint32_t LL_RCC_GetAPB1Prescaler(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PPRE1)); +} + +/** + * @brief Get APB2 prescaler + * @rmtoll CFGR PPRE2 LL_RCC_GetAPB2Prescaler + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_APB2_DIV_1 + * @arg @ref LL_RCC_APB2_DIV_2 + * @arg @ref LL_RCC_APB2_DIV_4 + * @arg @ref LL_RCC_APB2_DIV_8 + * @arg @ref LL_RCC_APB2_DIV_16 + */ +__STATIC_INLINE uint32_t LL_RCC_GetAPB2Prescaler(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PPRE2)); +} + +/** + * @brief Set Clock After Wake-Up From Stop mode + * @rmtoll CFGR STOPWUCK LL_RCC_SetClkAfterWakeFromStop + * @param Clock This parameter can be one of the following values: + * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_MSI + * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_HSI + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetClkAfterWakeFromStop(uint32_t Clock) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_STOPWUCK, Clock); +} + +/** + * @brief Get Clock After Wake-Up From Stop mode + * @rmtoll CFGR STOPWUCK LL_RCC_GetClkAfterWakeFromStop + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_MSI + * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_HSI + */ +__STATIC_INLINE uint32_t LL_RCC_GetClkAfterWakeFromStop(void) +{ + return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_STOPWUCK)); +} + +/** + * @} + */ + +#if defined(RCC_SMPS_SUPPORT) +/** @defgroup RCC_LL_EF_SMPS SMPS + * @{ + */ +/** + * @brief Configure SMPS step down converter clock source + * @rmtoll SMPSCR SMPSSEL LL_RCC_SetSMPSClockSource + * @param SMPSSource This parameter can be one of the following values: + * @arg @ref LL_RCC_SMPS_CLKSOURCE_HSI + * @arg @ref LL_RCC_SMPS_CLKSOURCE_MSI (*) + * @arg @ref LL_RCC_SMPS_CLKSOURCE_HSE + * @note The system must always be configured so as to get a SMPS Step Down + * converter clock frequency between 2 MHz and 8 MHz + * @note (*) The MSI shall only be selected as SMPS Step Down converter + * clock source when a supported SMPS Step Down converter clock + * MSIRANGE is set (LL_RCC_MSIRANGE_8 to LL_RCC_MSIRANGE_11) + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetSMPSClockSource(uint32_t SMPSSource) +{ + MODIFY_REG(RCC->SMPSCR, RCC_SMPSCR_SMPSSEL, SMPSSource); +} + +/** + * @brief Get the SMPS clock source selection + * @rmtoll SMPSCR SMPSSEL LL_RCC_GetSMPSClockSelection + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SMPS_CLKSOURCE_HSI + * @arg @ref LL_RCC_SMPS_CLKSOURCE_MSI + * @arg @ref LL_RCC_SMPS_CLKSOURCE_HSE + */ +__STATIC_INLINE uint32_t LL_RCC_GetSMPSClockSelection(void) +{ + return (uint32_t)(READ_BIT(RCC->SMPSCR, RCC_SMPSCR_SMPSSEL)); +} + + +/** + * @brief Get the SMPS clock source + * @rmtoll SMPSCR SMPSSWS LL_RCC_GetSMPSClockSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SMPS_CLKSOURCE_STATUS_HSI + * @arg @ref LL_RCC_SMPS_CLKSOURCE_STATUS_MSI + * @arg @ref LL_RCC_SMPS_CLKSOURCE_STATUS_HSE + * @arg @ref LL_RCC_SMPS_CLKSOURCE_STATUS_NO_CLOCK + */ +__STATIC_INLINE uint32_t LL_RCC_GetSMPSClockSource(void) +{ + return (uint32_t)(READ_BIT(RCC->SMPSCR, RCC_SMPSCR_SMPSSWS)); +} + +/** + * @brief Set SMPS prescaler + * @rmtoll SMPSCR SMPSDIV LL_RCC_SetSMPSPrescaler + * @param Prescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_SMPS_DIV_0 + * @arg @ref LL_RCC_SMPS_DIV_1 + * @arg @ref LL_RCC_SMPS_DIV_2 + * @arg @ref LL_RCC_SMPS_DIV_3 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetSMPSPrescaler(uint32_t Prescaler) +{ + MODIFY_REG(RCC->SMPSCR, RCC_SMPSCR_SMPSDIV, Prescaler); +} + +/** + * @brief Get SMPS prescaler + * @rmtoll SMPSCR SMPSDIV LL_RCC_GetSMPSPrescaler + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SMPS_DIV_0 + * @arg @ref LL_RCC_SMPS_DIV_1 + * @arg @ref LL_RCC_SMPS_DIV_2 + * @arg @ref LL_RCC_SMPS_DIV_3 + */ +__STATIC_INLINE uint32_t LL_RCC_GetSMPSPrescaler(void) +{ + return (uint32_t)(READ_BIT(RCC->SMPSCR, RCC_SMPSCR_SMPSDIV)); +} + +/** + * @} + */ +#endif /* RCC_SMPS_SUPPORT */ + +/** @defgroup RCC_LL_EF_MCO MCO + * @{ + */ + +/** + * @brief Configure MCOx + * @rmtoll CFGR MCOSEL LL_RCC_ConfigMCO\n + * CFGR MCOPRE LL_RCC_ConfigMCO + * @param MCOxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_MCO1SOURCE_NOCLOCK + * @arg @ref LL_RCC_MCO1SOURCE_SYSCLK + * @arg @ref LL_RCC_MCO1SOURCE_MSI + * @arg @ref LL_RCC_MCO1SOURCE_HSI + * @arg @ref LL_RCC_MCO1SOURCE_HSE + * @arg @ref LL_RCC_MCO1SOURCE_HSI48 (*) + * @arg @ref LL_RCC_MCO1SOURCE_PLLCLK + * @arg @ref LL_RCC_MCO1SOURCE_LSI1 + * @arg @ref LL_RCC_MCO1SOURCE_LSI2 + * @arg @ref LL_RCC_MCO1SOURCE_LSE + * @arg @ref LL_RCC_MCO1SOURCE_HSE_BEFORE_STAB + * @param MCOxPrescaler This parameter can be one of the following values: + * @arg @ref LL_RCC_MCO1_DIV_1 + * @arg @ref LL_RCC_MCO1_DIV_2 + * @arg @ref LL_RCC_MCO1_DIV_4 + * @arg @ref LL_RCC_MCO1_DIV_8 + * @arg @ref LL_RCC_MCO1_DIV_16 + * @note (*) Value not defined for all devices + * @retval None + */ +__STATIC_INLINE void LL_RCC_ConfigMCO(uint32_t MCOxSource, uint32_t MCOxPrescaler) +{ + MODIFY_REG(RCC->CFGR, RCC_CFGR_MCOSEL | RCC_CFGR_MCOPRE, MCOxSource | MCOxPrescaler); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_Peripheral_Clock_Source Peripheral Clock Source + * @{ + */ + +/** + * @brief Configure USARTx clock source + * @rmtoll CCIPR USART1SEL LL_RCC_SetUSARTClockSource + * @param USARTxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_USART1_CLKSOURCE_PCLK2 + * @arg @ref LL_RCC_USART1_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_USART1_CLKSOURCE_HSI + * @arg @ref LL_RCC_USART1_CLKSOURCE_LSE + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetUSARTClockSource(uint32_t USARTxSource) +{ + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_USART1SEL, USARTxSource); +} + +#if defined(LPUART1) +/** + * @brief Configure LPUART1x clock source + * @rmtoll CCIPR LPUART1SEL LL_RCC_SetLPUARTClockSource + * @param LPUARTxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_LPUART1_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_LPUART1_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_LPUART1_CLKSOURCE_HSI + * @arg @ref LL_RCC_LPUART1_CLKSOURCE_LSE + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetLPUARTClockSource(uint32_t LPUARTxSource) +{ + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_LPUART1SEL, LPUARTxSource); +} +#endif /* LPUART1 */ + +/** + * @brief Configure I2Cx clock source + * @rmtoll CCIPR I2CxSEL LL_RCC_SetI2CClockSource + * @param I2CxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_I2C1_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_I2C1_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_I2C1_CLKSOURCE_HSI + * @arg @ref LL_RCC_I2C3_CLKSOURCE_PCLK1 (*) + * @arg @ref LL_RCC_I2C3_CLKSOURCE_SYSCLK (*) + * @arg @ref LL_RCC_I2C3_CLKSOURCE_HSI (*) + * @note (*) Value not defined for all devices + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetI2CClockSource(uint32_t I2CxSource) +{ + MODIFY_REG(RCC->CCIPR, ((I2CxSource >> 4) & 0x000FF000U), ((I2CxSource << 4) & 0x000FF000U)); +} + +/** + * @brief Configure LPTIMx clock source + * @rmtoll CCIPR LPTIMxSEL LL_RCC_SetLPTIMClockSource + * @param LPTIMxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_LSI + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_HSI + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_LSE + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_LSI + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_HSI + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_LSE + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetLPTIMClockSource(uint32_t LPTIMxSource) +{ + MODIFY_REG(RCC->CCIPR, (LPTIMxSource & 0xFFFF0000U), (LPTIMxSource << 16)); +} + +#if defined(SAI1) +/** + * @brief Configure SAIx clock source + * @rmtoll CCIPR SAI1SEL LL_RCC_SetSAIClockSource + * @param SAIxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLLSAI1 + * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLL + * @arg @ref LL_RCC_SAI1_CLKSOURCE_HSI + * @arg @ref LL_RCC_SAI1_CLKSOURCE_PIN + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetSAIClockSource(uint32_t SAIxSource) +{ + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_SAI1SEL, SAIxSource); +} +#endif /* SAI1 */ + +/** + * @brief Configure RNG clock source + * @note In case of CLK48 clock selected, it must be configured first thanks to LL_RCC_SetCLK48ClockSource + * @rmtoll CCIPR RNGSEL LL_RCC_SetRNGClockSource + * @param RNGxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_RNG_CLKSOURCE_CLK48 + * @arg @ref LL_RCC_RNG_CLKSOURCE_LSI + * @arg @ref LL_RCC_RNG_CLKSOURCE_LSE + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetRNGClockSource(uint32_t RNGxSource) +{ + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_RNGSEL, RNGxSource); +} + +/** + * @brief Configure CLK48 clock source + * @rmtoll CCIPR CLK48SEL LL_RCC_SetCLK48ClockSource + * @param CLK48xSource This parameter can be one of the following values: + * @arg @ref LL_RCC_CLK48_CLKSOURCE_HSI48 (*) + * @arg @ref LL_RCC_CLK48_CLKSOURCE_PLLSAI1 (*) + * @arg @ref LL_RCC_CLK48_CLKSOURCE_PLL + * @arg @ref LL_RCC_CLK48_CLKSOURCE_MSI + * @note (*) Value not defined for all devices + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetCLK48ClockSource(uint32_t CLK48xSource) +{ + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_CLK48SEL, CLK48xSource); +} + +#if defined(USB) +/** + * @brief Configure USB clock source + * @rmtoll CCIPR CLK48SEL LL_RCC_SetUSBClockSource + * @param USBxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_USB_CLKSOURCE_HSI48 + * @arg @ref LL_RCC_USB_CLKSOURCE_PLLSAI1 + * @arg @ref LL_RCC_USB_CLKSOURCE_PLL + * @arg @ref LL_RCC_USB_CLKSOURCE_MSI + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetUSBClockSource(uint32_t USBxSource) +{ + LL_RCC_SetCLK48ClockSource(USBxSource); +} +#endif /* USB */ + +/** + * @brief Configure RNG clock source + * @note Allow to configure the overall RNG Clock source, if CLK48 is selected as RNG + Clock source, the CLK48xSource has to be configured + * @rmtoll CCIPR RNGSEL LL_RCC_ConfigRNGClockSource + * @rmtoll CCIPR CLK48SEL LL_RCC_ConfigRNGClockSource + * @param RNGxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_RNG_CLKSOURCE_CLK48 + * @arg @ref LL_RCC_RNG_CLKSOURCE_LSI + * @arg @ref LL_RCC_RNG_CLKSOURCE_LSE + * @param CLK48xSource This parameter can be one of the following values: + * @arg @ref LL_RCC_CLK48_CLKSOURCE_HSI48 (*) + * @arg @ref LL_RCC_CLK48_CLKSOURCE_PLLSAI1 (*) + * @arg @ref LL_RCC_CLK48_CLKSOURCE_PLL + * @arg @ref LL_RCC_CLK48_CLKSOURCE_MSI + * @note (*) Value not defined for all devices + * @retval None + */ +__STATIC_INLINE void LL_RCC_ConfigRNGClockSource(uint32_t RNGxSource, uint32_t CLK48xSource) +{ + if (RNGxSource == LL_RCC_RNG_CLKSOURCE_CLK48) + { + LL_RCC_SetCLK48ClockSource(CLK48xSource); + } + LL_RCC_SetRNGClockSource(RNGxSource); +} + + +/** + * @brief Configure ADC clock source + * @rmtoll CCIPR ADCSEL LL_RCC_SetADCClockSource + * @param ADCxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_ADC_CLKSOURCE_NONE + * @arg @ref LL_RCC_ADC_CLKSOURCE_PLLSAI1 (*) + * @arg @ref LL_RCC_ADC_CLKSOURCE_PLL + * @arg @ref LL_RCC_ADC_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_ADC_CLKSOURCE_HSI (*) + * @note (*) Value not defined for all devices + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetADCClockSource(uint32_t ADCxSource) +{ + MODIFY_REG(RCC->CCIPR, RCC_CCIPR_ADCSEL, ADCxSource); +} + + +/** + * @brief Get USARTx clock source + * @rmtoll CCIPR USART1SEL LL_RCC_GetUSARTClockSource + * @param USARTx This parameter can be one of the following values: + * @arg @ref LL_RCC_USART1_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_USART1_CLKSOURCE_PCLK2 + * @arg @ref LL_RCC_USART1_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_USART1_CLKSOURCE_HSI + * @arg @ref LL_RCC_USART1_CLKSOURCE_LSE + */ +__STATIC_INLINE uint32_t LL_RCC_GetUSARTClockSource(uint32_t USARTx) +{ + return (uint32_t)(READ_BIT(RCC->CCIPR, USARTx)); +} + +#if defined(LPUART1) +/** + * @brief Get LPUARTx clock source + * @rmtoll CCIPR LPUART1SEL LL_RCC_GetLPUARTClockSource + * @param LPUARTx This parameter can be one of the following values: + * @arg @ref LL_RCC_LPUART1_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_LPUART1_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_LPUART1_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_LPUART1_CLKSOURCE_HSI + * @arg @ref LL_RCC_LPUART1_CLKSOURCE_LSE + */ +__STATIC_INLINE uint32_t LL_RCC_GetLPUARTClockSource(uint32_t LPUARTx) +{ + return (uint32_t)(READ_BIT(RCC->CCIPR, LPUARTx)); +} +#endif /* LPUART1 */ + +/** + * @brief Get I2Cx clock source + * @rmtoll CCIPR I2CxSEL LL_RCC_GetI2CClockSource + * @param I2Cx This parameter can be one of the following values: + * @arg @ref LL_RCC_I2C1_CLKSOURCE + * @arg @ref LL_RCC_I2C3_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_I2C1_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_I2C1_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_I2C1_CLKSOURCE_HSI + * @arg @ref LL_RCC_I2C3_CLKSOURCE_PCLK1 (*) + * @arg @ref LL_RCC_I2C3_CLKSOURCE_SYSCLK (*) + * @arg @ref LL_RCC_I2C3_CLKSOURCE_HSI (*) + * @note (*) Value not defined for all devices + */ +__STATIC_INLINE uint32_t LL_RCC_GetI2CClockSource(uint32_t I2Cx) +{ + return (uint32_t)((READ_BIT(RCC->CCIPR, I2Cx) >> 4) | (I2Cx << 4)); +} + +/** + * @brief Get LPTIMx clock source + * @rmtoll CCIPR LPTIMxSEL LL_RCC_GetLPTIMClockSource + * @param LPTIMx This parameter can be one of the following values: + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_LSI + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_HSI + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_LSE + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_PCLK1 + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_LSI + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_HSI + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_LSE + */ +__STATIC_INLINE uint32_t LL_RCC_GetLPTIMClockSource(uint32_t LPTIMx) +{ + return (uint32_t)((READ_BIT(RCC->CCIPR, LPTIMx) >> 16) | LPTIMx); +} + +#if defined(SAI1) +/** + * @brief Get SAIx clock source + * @rmtoll CCIPR SAI1SEL LL_RCC_GetSAIClockSource + * @param SAIx This parameter can be one of the following values: + * @arg @ref LL_RCC_SAI1_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLLSAI1 + * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLL + * @arg @ref LL_RCC_SAI1_CLKSOURCE_HSI + * @arg @ref LL_RCC_SAI1_CLKSOURCE_PIN + */ +__STATIC_INLINE uint32_t LL_RCC_GetSAIClockSource(uint32_t SAIx) +{ + return (uint32_t)(READ_BIT(RCC->CCIPR, SAIx)); +} +#endif /* SAI1 */ + +/** + * @brief Get RNGx clock source + * @rmtoll CCIPR RNGSEL LL_RCC_GetRNGClockSource + * @param RNGx This parameter can be one of the following values: + * @arg @ref LL_RCC_RNG_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_RNG_CLKSOURCE_CLK48 + * @arg @ref LL_RCC_RNG_CLKSOURCE_LSI + * @arg @ref LL_RCC_RNG_CLKSOURCE_LSE + */ +__STATIC_INLINE uint32_t LL_RCC_GetRNGClockSource(uint32_t RNGx) +{ + return (uint32_t)(READ_BIT(RCC->CCIPR, RNGx)); +} + +/** + * @brief Get CLK48x clock source + * @rmtoll CCIPR CLK48SEL LL_RCC_GetCLK48ClockSource + * @param CLK48x This parameter can be one of the following values: + * @arg @ref LL_RCC_CLK48_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_CLK48_CLKSOURCE_HSI48 (*) + * @arg @ref LL_RCC_CLK48_CLKSOURCE_PLLSAI1 (*) + * @arg @ref LL_RCC_CLK48_CLKSOURCE_PLL + * @arg @ref LL_RCC_CLK48_CLKSOURCE_MSI + * @note (*) Value not defined for all devices + */ +__STATIC_INLINE uint32_t LL_RCC_GetCLK48ClockSource(uint32_t CLK48x) +{ + return (uint32_t)(READ_BIT(RCC->CCIPR, CLK48x)); +} + +#if defined(USB) +/** + * @brief Get USBx clock source + * @rmtoll CCIPR CLK48SEL LL_RCC_GetUSBClockSource + * @param USBx This parameter can be one of the following values: + * @arg @ref LL_RCC_USB_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_USB_CLKSOURCE_HSI48 + * @arg @ref LL_RCC_USB_CLKSOURCE_PLLSAI1 + * @arg @ref LL_RCC_USB_CLKSOURCE_PLL + * @arg @ref LL_RCC_USB_CLKSOURCE_MSI + */ +__STATIC_INLINE uint32_t LL_RCC_GetUSBClockSource(uint32_t USBx) +{ + return LL_RCC_GetCLK48ClockSource(USBx); +} +#endif /* USB */ + +/** + * @brief Get ADCx clock source + * @rmtoll CCIPR ADCSEL LL_RCC_GetADCClockSource + * @param ADCx This parameter can be one of the following values: + * @arg @ref LL_RCC_ADC_CLKSOURCE + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_ADC_CLKSOURCE_NONE + * @arg @ref LL_RCC_ADC_CLKSOURCE_PLLSAI1 (*) + * @arg @ref LL_RCC_ADC_CLKSOURCE_PLL + * @arg @ref LL_RCC_ADC_CLKSOURCE_SYSCLK + * @arg @ref LL_RCC_ADC_CLKSOURCE_HSI (*) + * @note (*) Value not defined for all devices + */ +__STATIC_INLINE uint32_t LL_RCC_GetADCClockSource(uint32_t ADCx) +{ + return (uint32_t)(READ_BIT(RCC->CCIPR, ADCx)); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_RTC RTC + * @{ + */ + +/** + * @brief Set RTC Clock Source + * @note Once the RTC clock source has been selected, it cannot be changed anymore unless + * the Backup domain is reset, or unless a failure is detected on LSE (LSECSSD is + * set). The BDRST bit can be used to reset them. + * @rmtoll BDCR RTCSEL LL_RCC_SetRTCClockSource + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_RTC_CLKSOURCE_NONE + * @arg @ref LL_RCC_RTC_CLKSOURCE_LSE + * @arg @ref LL_RCC_RTC_CLKSOURCE_LSI + * @arg @ref LL_RCC_RTC_CLKSOURCE_HSE_DIV32 + * @retval None + */ +__STATIC_INLINE void LL_RCC_SetRTCClockSource(uint32_t Source) +{ + MODIFY_REG(RCC->BDCR, RCC_BDCR_RTCSEL, Source); +} + +/** + * @brief Get RTC Clock Source + * @rmtoll BDCR RTCSEL LL_RCC_GetRTCClockSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_RTC_CLKSOURCE_NONE + * @arg @ref LL_RCC_RTC_CLKSOURCE_LSE + * @arg @ref LL_RCC_RTC_CLKSOURCE_LSI + * @arg @ref LL_RCC_RTC_CLKSOURCE_HSE_DIV32 + */ +__STATIC_INLINE uint32_t LL_RCC_GetRTCClockSource(void) +{ + return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL)); +} + +/** + * @brief Enable RTC + * @rmtoll BDCR RTCEN LL_RCC_EnableRTC + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableRTC(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_RTCEN); +} + +/** + * @brief Disable RTC + * @rmtoll BDCR RTCEN LL_RCC_DisableRTC + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableRTC(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_RTCEN); +} + +/** + * @brief Check if RTC has been enabled or not + * @rmtoll BDCR RTCEN LL_RCC_IsEnabledRTC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledRTC(void) +{ + return ((READ_BIT(RCC->BDCR, RCC_BDCR_RTCEN) == (RCC_BDCR_RTCEN)) ? 1UL : 0UL); +} + +/** + * @brief Force the Backup domain reset + * @rmtoll BDCR BDRST LL_RCC_ForceBackupDomainReset + * @retval None + */ +__STATIC_INLINE void LL_RCC_ForceBackupDomainReset(void) +{ + SET_BIT(RCC->BDCR, RCC_BDCR_BDRST); +} + +/** + * @brief Release the Backup domain reset + * @rmtoll BDCR BDRST LL_RCC_ReleaseBackupDomainReset + * @retval None + */ +__STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset(void) +{ + CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST); +} + +/** + * @} + */ + + +/** @defgroup RCC_LL_EF_PLL PLL + * @{ + */ + +/** + * @brief Enable PLL + * @rmtoll CR PLLON LL_RCC_PLL_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_Enable(void) +{ + SET_BIT(RCC->CR, RCC_CR_PLLON); +} + +/** + * @brief Disable PLL + * @note Cannot be disabled if the PLL clock is used as the system clock + * @rmtoll CR PLLON LL_RCC_PLL_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_Disable(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_PLLON); +} + +/** + * @brief Check if PLL Ready + * @rmtoll CR PLLRDY LL_RCC_PLL_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_IsReady(void) +{ + return ((READ_BIT(RCC->CR, RCC_CR_PLLRDY) == (RCC_CR_PLLRDY)) ? 1UL : 0UL); +} + +/** + * @brief Configure PLL used for SYSCLK Domain + * @note PLL Source and PLLM Divider can be written only when PLL is disabled + * PLLSAI1 are disabled + * @note PLLN/PLLR can be written only when PLL is disabled + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_ConfigDomain_SYS\n + * PLLCFGR PLLM LL_RCC_PLL_ConfigDomain_SYS\n + * PLLCFGR PLLN LL_RCC_PLL_ConfigDomain_SYS\n + * PLLCFGR PLLR LL_RCC_PLL_ConfigDomain_SYS + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_NONE + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @param PLLM This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param PLLN Between 6 and 127 + * @param PLLR This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLR_DIV_2 + * @arg @ref LL_RCC_PLLR_DIV_4 + * @arg @ref LL_RCC_PLLR_DIV_6 + * @arg @ref LL_RCC_PLLR_DIV_8 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR) +{ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLR, + Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLR); +} + +#if defined(SAI1) +/** + * @brief Configure PLL used for SAI domain clock + * @note PLL Source and PLLM Divider can be written only when PLL is disabled + * PLLSAI1 are disabled + * @note PLLN/PLLP can be written only when PLL is disabled + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_ConfigDomain_SAI\n + * PLLCFGR PLLM LL_RCC_PLL_ConfigDomain_SAI\n + * PLLCFGR PLLN LL_RCC_PLL_ConfigDomain_SAI\n + * PLLCFGR PLLP LL_RCC_PLL_ConfigDomain_SAI + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_NONE + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @param PLLM This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param PLLN Between 6 and 127 + * @param PLLP This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLP_DIV_2 + * @arg @ref LL_RCC_PLLP_DIV_3 + * @arg @ref LL_RCC_PLLP_DIV_4 + * @arg @ref LL_RCC_PLLP_DIV_5 + * @arg @ref LL_RCC_PLLP_DIV_6 + * @arg @ref LL_RCC_PLLP_DIV_7 + * @arg @ref LL_RCC_PLLP_DIV_8 + * @arg @ref LL_RCC_PLLP_DIV_9 + * @arg @ref LL_RCC_PLLP_DIV_10 + * @arg @ref LL_RCC_PLLP_DIV_11 + * @arg @ref LL_RCC_PLLP_DIV_12 + * @arg @ref LL_RCC_PLLP_DIV_13 + * @arg @ref LL_RCC_PLLP_DIV_14 + * @arg @ref LL_RCC_PLLP_DIV_15 + * @arg @ref LL_RCC_PLLP_DIV_16 + * @arg @ref LL_RCC_PLLP_DIV_17 + * @arg @ref LL_RCC_PLLP_DIV_18 + * @arg @ref LL_RCC_PLLP_DIV_19 + * @arg @ref LL_RCC_PLLP_DIV_20 + * @arg @ref LL_RCC_PLLP_DIV_21 + * @arg @ref LL_RCC_PLLP_DIV_22 + * @arg @ref LL_RCC_PLLP_DIV_23 + * @arg @ref LL_RCC_PLLP_DIV_24 + * @arg @ref LL_RCC_PLLP_DIV_25 + * @arg @ref LL_RCC_PLLP_DIV_26 + * @arg @ref LL_RCC_PLLP_DIV_27 + * @arg @ref LL_RCC_PLLP_DIV_28 + * @arg @ref LL_RCC_PLLP_DIV_29 + * @arg @ref LL_RCC_PLLP_DIV_30 + * @arg @ref LL_RCC_PLLP_DIV_31 + * @arg @ref LL_RCC_PLLP_DIV_32 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP) +{ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLP, + Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLP); +} +#endif /* SAI1 */ + +/** + * @brief Configure PLL used for ADC domain clock + * @note PLL Source and PLLM Divider can be written only when PLL is disabled + * PLLSAI1 are disabled + * @note PLLN/PLLP can be written only when PLL is disabled + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_ConfigDomain_ADC\n + * PLLCFGR PLLM LL_RCC_PLL_ConfigDomain_ADC\n + * PLLCFGR PLLN LL_RCC_PLL_ConfigDomain_ADC\n + * PLLCFGR PLLP LL_RCC_PLL_ConfigDomain_ADC + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_NONE + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @param PLLM This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param PLLN Between 6 and 127 + * @param PLLP This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLP_DIV_2 + * @arg @ref LL_RCC_PLLP_DIV_3 + * @arg @ref LL_RCC_PLLP_DIV_4 + * @arg @ref LL_RCC_PLLP_DIV_5 + * @arg @ref LL_RCC_PLLP_DIV_6 + * @arg @ref LL_RCC_PLLP_DIV_7 + * @arg @ref LL_RCC_PLLP_DIV_8 + * @arg @ref LL_RCC_PLLP_DIV_9 + * @arg @ref LL_RCC_PLLP_DIV_10 + * @arg @ref LL_RCC_PLLP_DIV_11 + * @arg @ref LL_RCC_PLLP_DIV_12 + * @arg @ref LL_RCC_PLLP_DIV_13 + * @arg @ref LL_RCC_PLLP_DIV_14 + * @arg @ref LL_RCC_PLLP_DIV_15 + * @arg @ref LL_RCC_PLLP_DIV_16 + * @arg @ref LL_RCC_PLLP_DIV_17 + * @arg @ref LL_RCC_PLLP_DIV_18 + * @arg @ref LL_RCC_PLLP_DIV_19 + * @arg @ref LL_RCC_PLLP_DIV_20 + * @arg @ref LL_RCC_PLLP_DIV_21 + * @arg @ref LL_RCC_PLLP_DIV_22 + * @arg @ref LL_RCC_PLLP_DIV_23 + * @arg @ref LL_RCC_PLLP_DIV_24 + * @arg @ref LL_RCC_PLLP_DIV_25 + * @arg @ref LL_RCC_PLLP_DIV_26 + * @arg @ref LL_RCC_PLLP_DIV_27 + * @arg @ref LL_RCC_PLLP_DIV_28 + * @arg @ref LL_RCC_PLLP_DIV_29 + * @arg @ref LL_RCC_PLLP_DIV_30 + * @arg @ref LL_RCC_PLLP_DIV_31 + * @arg @ref LL_RCC_PLLP_DIV_32 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_ADC(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP) +{ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLP, + Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLP); +} + +/** + * @brief Configure PLL used for 48Mhz domain clock + * @note PLL Source and PLLM Divider can be written only when PLL is disabled + * PLLSAI1 are disabled + * @note PLLN/PLLQ can be written only when PLL is disabled + * @note This can be selected for USB, RNG + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_ConfigDomain_48M\n + * PLLCFGR PLLM LL_RCC_PLL_ConfigDomain_48M\n + * PLLCFGR PLLN LL_RCC_PLL_ConfigDomain_48M\n + * PLLCFGR PLLQ LL_RCC_PLL_ConfigDomain_48M + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_NONE + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @param PLLM This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param PLLN Between 6 and 127 + * @param PLLQ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLQ_DIV_2 + * @arg @ref LL_RCC_PLLQ_DIV_3 + * @arg @ref LL_RCC_PLLQ_DIV_4 + * @arg @ref LL_RCC_PLLQ_DIV_5 + * @arg @ref LL_RCC_PLLQ_DIV_6 + * @arg @ref LL_RCC_PLLQ_DIV_7 + * @arg @ref LL_RCC_PLLQ_DIV_8 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_ConfigDomain_48M(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ) +{ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLQ, + Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLQ); +} + +/** + * @brief Get Main PLL multiplication factor for VCO + * @rmtoll PLLCFGR PLLN LL_RCC_PLL_GetN + * @retval Between 6 and 127 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetN(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos); +} + +/** + * @brief Get Main PLL division factor for PLLP + * @note used for PLLSAI1CLK (SAI1 clock) + * @rmtoll PLLCFGR PLLP LL_RCC_PLL_GetP + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLP_DIV_2 + * @arg @ref LL_RCC_PLLP_DIV_3 + * @arg @ref LL_RCC_PLLP_DIV_4 + * @arg @ref LL_RCC_PLLP_DIV_5 + * @arg @ref LL_RCC_PLLP_DIV_6 + * @arg @ref LL_RCC_PLLP_DIV_7 + * @arg @ref LL_RCC_PLLP_DIV_8 + * @arg @ref LL_RCC_PLLP_DIV_9 + * @arg @ref LL_RCC_PLLP_DIV_10 + * @arg @ref LL_RCC_PLLP_DIV_11 + * @arg @ref LL_RCC_PLLP_DIV_12 + * @arg @ref LL_RCC_PLLP_DIV_13 + * @arg @ref LL_RCC_PLLP_DIV_14 + * @arg @ref LL_RCC_PLLP_DIV_15 + * @arg @ref LL_RCC_PLLP_DIV_16 + * @arg @ref LL_RCC_PLLP_DIV_17 + * @arg @ref LL_RCC_PLLP_DIV_18 + * @arg @ref LL_RCC_PLLP_DIV_19 + * @arg @ref LL_RCC_PLLP_DIV_20 + * @arg @ref LL_RCC_PLLP_DIV_21 + * @arg @ref LL_RCC_PLLP_DIV_22 + * @arg @ref LL_RCC_PLLP_DIV_23 + * @arg @ref LL_RCC_PLLP_DIV_24 + * @arg @ref LL_RCC_PLLP_DIV_25 + * @arg @ref LL_RCC_PLLP_DIV_26 + * @arg @ref LL_RCC_PLLP_DIV_27 + * @arg @ref LL_RCC_PLLP_DIV_28 + * @arg @ref LL_RCC_PLLP_DIV_29 + * @arg @ref LL_RCC_PLLP_DIV_30 + * @arg @ref LL_RCC_PLLP_DIV_31 + * @arg @ref LL_RCC_PLLP_DIV_32 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetP(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLP)); +} + +/** + * @brief Get Main PLL division factor for PLLQ + * @note used for PLL48MCLK selected for USB, RNG (48 MHz clock) + * @rmtoll PLLCFGR PLLQ LL_RCC_PLL_GetQ + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLQ_DIV_2 + * @arg @ref LL_RCC_PLLQ_DIV_3 + * @arg @ref LL_RCC_PLLQ_DIV_4 + * @arg @ref LL_RCC_PLLQ_DIV_5 + * @arg @ref LL_RCC_PLLQ_DIV_6 + * @arg @ref LL_RCC_PLLQ_DIV_7 + * @arg @ref LL_RCC_PLLQ_DIV_8 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetQ(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLQ)); +} + +/** + * @brief Get Main PLL division factor for PLLR + * @note used for PLLCLK (system clock) + * @rmtoll PLLCFGR PLLR LL_RCC_PLL_GetR + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLR_DIV_2 + * @arg @ref LL_RCC_PLLR_DIV_3 + * @arg @ref LL_RCC_PLLR_DIV_4 + * @arg @ref LL_RCC_PLLR_DIV_5 + * @arg @ref LL_RCC_PLLR_DIV_6 + * @arg @ref LL_RCC_PLLR_DIV_7 + * @arg @ref LL_RCC_PLLR_DIV_8 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetR(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLR)); +} + +/** + * @brief Get Division factor for the main PLL and other PLL + * @rmtoll PLLCFGR PLLM LL_RCC_PLL_GetDivider + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetDivider(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLM)); +} + +#if defined(SAI1) +/** + * @brief Enable PLL output mapped on SAI domain clock + * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_EnableDomain_SAI + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_EnableDomain_SAI(void) +{ + SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN); +} + +/** + * @brief Disable PLL output mapped on SAI domain clock + * @note In order to save power, when the PLLCLK of the PLL is + * not used, should be 0 + * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_DisableDomain_SAI + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_DisableDomain_SAI(void) +{ + CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN); +} +#endif /* SAI1 */ + +/** + * @brief Check if PLL output mapped on SAI domain clock is enabled + * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_IsEnabledDomain_SAI + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_IsEnabledDomain_SAI(void) +{ + return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN) == (RCC_PLLCFGR_PLLPEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable PLL output mapped on ADC domain clock + * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_EnableDomain_ADC + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_EnableDomain_ADC(void) +{ + SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN); +} + +/** + * @brief Disable PLL output mapped on ADC domain clock + * @note In order to save power, when the PLLCLK of the PLL is + * not used, should be 0 + * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_DisableDomain_ADC + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_DisableDomain_ADC(void) +{ + CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN); +} + +/** + * @brief Check if PLL output mapped on ADC domain clock is enabled + * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_IsEnabledDomain_ADC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_IsEnabledDomain_ADC(void) +{ + return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN) == (RCC_PLLCFGR_PLLPEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable PLL output mapped on 48MHz domain clock + * @rmtoll PLLCFGR PLLQEN LL_RCC_PLL_EnableDomain_48M + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_EnableDomain_48M(void) +{ + SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLQEN); +} + +/** + * @brief Disable PLL output mapped on 48MHz domain clock + * @note In order to save power, when the PLLCLK of the PLL is + * not used, should be 0 + * @rmtoll PLLCFGR PLLQEN LL_RCC_PLL_DisableDomain_48M + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_DisableDomain_48M(void) +{ + CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLQEN); +} + +/** + * @brief Check if PLL output mapped on 48MHz domain clock is enabled + * @rmtoll PLLCFGR PLLQEN LL_RCC_PLL_IsEnabledDomain_48M + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_IsEnabledDomain_48M(void) +{ + return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLQEN) == (RCC_PLLCFGR_PLLQEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable PLL output mapped on SYSCLK domain + * @rmtoll PLLCFGR PLLREN LL_RCC_PLL_EnableDomain_SYS + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_EnableDomain_SYS(void) +{ + SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLREN); +} + +/** + * @brief Disable PLL output mapped on SYSCLK domain + * @note Cannot be disabled if the PLL clock is used as the system clock + * @note In order to save power, when the PLLCLK of the PLL is + * not used, Main PLL should be 0 + * @rmtoll PLLCFGR PLLREN LL_RCC_PLL_DisableDomain_SYS + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_DisableDomain_SYS(void) +{ + CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLREN); +} + +/** + * @brief Check if PLL output mapped on SYSCLK domain clock is enabled + * @rmtoll PLLCFGR RCC_PLLCFGR_PLLREN LL_RCC_PLL_LL_RCC_PLL_IsEnabledDomain_SYSIsEnabledDomain_SYS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_IsEnabledDomain_SYS(void) +{ + return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLREN) == (RCC_PLLCFGR_PLLREN)) ? 1UL : 0UL); +} + +/** + * @} + */ + +#if defined(SAI1) +/** @defgroup RCC_LL_EF_PLLSAI1 PLLSAI1 + * @{ + */ + +/** + * @brief Enable PLLSAI1 + * @rmtoll CR PLLSAI1ON LL_RCC_PLLSAI1_Enable + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_Enable(void) +{ + SET_BIT(RCC->CR, RCC_CR_PLLSAI1ON); +} + +/** + * @brief Disable PLLSAI1 + * @rmtoll CR PLLSAI1ON LL_RCC_PLLSAI1_Disable + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_Disable(void) +{ + CLEAR_BIT(RCC->CR, RCC_CR_PLLSAI1ON); +} + +/** + * @brief Check if PLLSAI1 Ready + * @rmtoll CR PLLSAI1RDY LL_RCC_PLLSAI1_IsReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLLSAI1_IsReady(void) +{ + return ((READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) == (RCC_CR_PLLSAI1RDY)) ? 1UL : 0UL); +} + +/** + * @brief Configure PLLSAI1 used for 48Mhz domain clock + * @note PLL Source and PLLM Divider can be written only when PLL is disabled + * PLLSAI1 are disabled + * @note PLLN/PLLQ can be written only when PLLSAI1 is disabled + * @note This can be selected for USB, RNG + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_48M\n + * PLLCFGR PLLM LL_RCC_PLLSAI1_ConfigDomain_48M\n + * PLLSAI1CFGR PLLN LL_RCC_PLLSAI1_ConfigDomain_48M\n + * PLLSAI1CFGR PLLQ LL_RCC_PLLSAI1_ConfigDomain_48M + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_NONE + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @param PLLM This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param PLLN Between 6 and 127 + * @param PLLQ This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1Q_DIV_2 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_3 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_4 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_5 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_6 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_7 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_8 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_48M(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ) +{ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM); + MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLN | RCC_PLLSAI1CFGR_PLLQ, (PLLN << RCC_PLLSAI1CFGR_PLLN_Pos) | PLLQ); +} + +/** + * @brief Configure PLLSAI1 used for SAI domain clock + * @note PLL Source and PLLM Divider can be written only when PLL is disabled + * PLLSAI1 are disabled + * @note PLLN/PLLP can be written only when PLLSAI1 is disabled + * @note This can be selected for SAI1 or SAI2 (*) + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_SAI\n + * PLLCFGR PLLM LL_RCC_PLLSAI1_ConfigDomain_SAI\n + * PLLSAI1CFGR PLLN LL_RCC_PLLSAI1_ConfigDomain_SAI\n + * PLLSAI1CFGR PLLP LL_RCC_PLLSAI1_ConfigDomain_SAI + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_NONE + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @param PLLM This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param PLLN Between 6 and 127 + * @param PLLP This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1P_DIV_2 + * @arg @ref LL_RCC_PLLSAI1P_DIV_3 + * @arg @ref LL_RCC_PLLSAI1P_DIV_4 + * @arg @ref LL_RCC_PLLSAI1P_DIV_5 + * @arg @ref LL_RCC_PLLSAI1P_DIV_6 + * @arg @ref LL_RCC_PLLSAI1P_DIV_7 + * @arg @ref LL_RCC_PLLSAI1P_DIV_8 + * @arg @ref LL_RCC_PLLSAI1P_DIV_9 + * @arg @ref LL_RCC_PLLSAI1P_DIV_10 + * @arg @ref LL_RCC_PLLSAI1P_DIV_11 + * @arg @ref LL_RCC_PLLSAI1P_DIV_12 + * @arg @ref LL_RCC_PLLSAI1P_DIV_13 + * @arg @ref LL_RCC_PLLSAI1P_DIV_14 + * @arg @ref LL_RCC_PLLSAI1P_DIV_15 + * @arg @ref LL_RCC_PLLSAI1P_DIV_16 + * @arg @ref LL_RCC_PLLSAI1P_DIV_17 + * @arg @ref LL_RCC_PLLSAI1P_DIV_18 + * @arg @ref LL_RCC_PLLSAI1P_DIV_19 + * @arg @ref LL_RCC_PLLSAI1P_DIV_20 + * @arg @ref LL_RCC_PLLSAI1P_DIV_21 + * @arg @ref LL_RCC_PLLSAI1P_DIV_22 + * @arg @ref LL_RCC_PLLSAI1P_DIV_23 + * @arg @ref LL_RCC_PLLSAI1P_DIV_24 + * @arg @ref LL_RCC_PLLSAI1P_DIV_25 + * @arg @ref LL_RCC_PLLSAI1P_DIV_26 + * @arg @ref LL_RCC_PLLSAI1P_DIV_27 + * @arg @ref LL_RCC_PLLSAI1P_DIV_28 + * @arg @ref LL_RCC_PLLSAI1P_DIV_29 + * @arg @ref LL_RCC_PLLSAI1P_DIV_30 + * @arg @ref LL_RCC_PLLSAI1P_DIV_31 + * @arg @ref LL_RCC_PLLSAI1P_DIV_32 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP) +{ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM); + MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLN | RCC_PLLSAI1CFGR_PLLP, + (PLLN << RCC_PLLSAI1CFGR_PLLN_Pos) | PLLP); +} + +/** + * @brief Configure PLLSAI1 used for ADC domain clock + * @note PLL Source and PLLM Divider can be written only when PLL is disabled + * PLLSAI1 are disabled + * @note PLLN/PLLR can be written only when PLLSAI1 is disabled + * @note This can be selected for ADC + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_ADC\n + * PLLCFGR PLLM LL_RCC_PLLSAI1_ConfigDomain_ADC\n + * PLLSAI1CFGR PLLN LL_RCC_PLLSAI1_ConfigDomain_ADC\n + * PLLSAI1CFGR PLLR LL_RCC_PLLSAI1_ConfigDomain_ADC + * @param Source This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_NONE + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @param PLLM This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLM_DIV_1 + * @arg @ref LL_RCC_PLLM_DIV_2 + * @arg @ref LL_RCC_PLLM_DIV_3 + * @arg @ref LL_RCC_PLLM_DIV_4 + * @arg @ref LL_RCC_PLLM_DIV_5 + * @arg @ref LL_RCC_PLLM_DIV_6 + * @arg @ref LL_RCC_PLLM_DIV_7 + * @arg @ref LL_RCC_PLLM_DIV_8 + * @param PLLN Between 6 and 127 + * @param PLLR This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1R_DIV_2 + * @arg @ref LL_RCC_PLLSAI1R_DIV_3 + * @arg @ref LL_RCC_PLLSAI1R_DIV_4 + * @arg @ref LL_RCC_PLLSAI1R_DIV_5 + * @arg @ref LL_RCC_PLLSAI1R_DIV_6 + * @arg @ref LL_RCC_PLLSAI1R_DIV_7 + * @arg @ref LL_RCC_PLLSAI1R_DIV_8 + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_ADC(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR) +{ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM); + MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLN | RCC_PLLSAI1CFGR_PLLR, (PLLN << RCC_PLLSAI1CFGR_PLLN_Pos) | PLLR); +} + +/** + * @brief Get SAI1PLL multiplication factor for VCO + * @rmtoll PLLSAI1CFGR PLLN LL_RCC_PLLSAI1_GetN + * @retval Between 6 and 127 + */ +__STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetN(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLN) >> RCC_PLLSAI1CFGR_PLLN_Pos); +} + +/** + * @brief Get SAI1PLL division factor for PLLSAI1P + * @note used for PLLSAI1CLK (SAI1 or SAI2 (*) clock). + * @rmtoll PLLSAI1CFGR PLLP LL_RCC_PLLSAI1_GetP + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1P_DIV_2 + * @arg @ref LL_RCC_PLLSAI1P_DIV_3 + * @arg @ref LL_RCC_PLLSAI1P_DIV_4 + * @arg @ref LL_RCC_PLLSAI1P_DIV_5 + * @arg @ref LL_RCC_PLLSAI1P_DIV_6 + * @arg @ref LL_RCC_PLLSAI1P_DIV_7 + * @arg @ref LL_RCC_PLLSAI1P_DIV_8 + * @arg @ref LL_RCC_PLLSAI1P_DIV_9 + * @arg @ref LL_RCC_PLLSAI1P_DIV_10 + * @arg @ref LL_RCC_PLLSAI1P_DIV_11 + * @arg @ref LL_RCC_PLLSAI1P_DIV_12 + * @arg @ref LL_RCC_PLLSAI1P_DIV_13 + * @arg @ref LL_RCC_PLLSAI1P_DIV_14 + * @arg @ref LL_RCC_PLLSAI1P_DIV_15 + * @arg @ref LL_RCC_PLLSAI1P_DIV_16 + * @arg @ref LL_RCC_PLLSAI1P_DIV_17 + * @arg @ref LL_RCC_PLLSAI1P_DIV_18 + * @arg @ref LL_RCC_PLLSAI1P_DIV_19 + * @arg @ref LL_RCC_PLLSAI1P_DIV_20 + * @arg @ref LL_RCC_PLLSAI1P_DIV_21 + * @arg @ref LL_RCC_PLLSAI1P_DIV_22 + * @arg @ref LL_RCC_PLLSAI1P_DIV_23 + * @arg @ref LL_RCC_PLLSAI1P_DIV_24 + * @arg @ref LL_RCC_PLLSAI1P_DIV_25 + * @arg @ref LL_RCC_PLLSAI1P_DIV_26 + * @arg @ref LL_RCC_PLLSAI1P_DIV_27 + * @arg @ref LL_RCC_PLLSAI1P_DIV_28 + * @arg @ref LL_RCC_PLLSAI1P_DIV_29 + * @arg @ref LL_RCC_PLLSAI1P_DIV_30 + * @arg @ref LL_RCC_PLLSAI1P_DIV_31 + * @arg @ref LL_RCC_PLLSAI1P_DIV_32 + */ +__STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetP(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLP)); +} + +/** + * @brief Get SAI1PLL division factor for PLLQ + * @note used PLL48M2CLK selected for USB, RNG (48 MHz clock) + * @rmtoll PLLSAI1CFGR PLLQ LL_RCC_PLLSAI1_GetQ + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1Q_DIV_2 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_3 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_4 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_5 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_6 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_7 + * @arg @ref LL_RCC_PLLSAI1Q_DIV_8 + */ +__STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetQ(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLQ)); +} + +/** + * @brief Get PLLSAI1 division factor for PLLSAIR + * @note used for PLLADC1CLK (ADC clock) + * @rmtoll PLLSAI1CFGR PLLR LL_RCC_PLLSAI1_GetR + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLSAI1R_DIV_2 + * @arg @ref LL_RCC_PLLSAI1R_DIV_3 + * @arg @ref LL_RCC_PLLSAI1R_DIV_4 + * @arg @ref LL_RCC_PLLSAI1R_DIV_5 + * @arg @ref LL_RCC_PLLSAI1R_DIV_6 + * @arg @ref LL_RCC_PLLSAI1R_DIV_7 + * @arg @ref LL_RCC_PLLSAI1R_DIV_8 + */ +__STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetR(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLR)); +} + + +/** + * @brief Enable PLLSAI1 output mapped on SAI domain clock + * @rmtoll PLLSAI1CFGR PLLPEN LL_RCC_PLLSAI1_EnableDomain_SAI + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_EnableDomain_SAI(void) +{ + SET_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLPEN); +} + +/** + * @brief Disable PLLSAI1 output mapped on SAI domain clock + * @note In order to save power, when of the PLLSAI1 is + * not used, should be 0 + * @rmtoll PLLSAI1CFGR PLLPEN LL_RCC_PLLSAI1_DisableDomain_SAI + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_DisableDomain_SAI(void) +{ + CLEAR_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLPEN); +} + +/** + * @brief Check if PLLSAI1 output mapped on SAI domain clock is enabled + * @rmtoll PLLSAI1CFGR PLLPEN LL_RCC_PLLSAI1_IsEnabledDomain_SAI + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLLSAI1_IsEnabledDomain_SAI(void) +{ + return ((READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLPEN) == (RCC_PLLSAI1CFGR_PLLPEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable PLLSAI1 output mapped on 48MHz domain clock + * @rmtoll PLLSAI1CFGR PLLQEN LL_RCC_PLLSAI1_EnableDomain_48M + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_EnableDomain_48M(void) +{ + SET_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLQEN); +} + +/** + * @brief Disable PLLSAI1 output mapped on 48MHz domain clock + * @note In order to save power, when of the PLLSAI1 is + * not used, should be 0 + * @rmtoll PLLSAI1CFGR PLLQEN LL_RCC_PLLSAI1_DisableDomain_48M + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_DisableDomain_48M(void) +{ + CLEAR_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLQEN); +} + +/** + * @brief Check if PLLSAI1 output mapped on 48MHz domain clock is enabled + * @rmtoll PLLSAI1CFGR PLLQEN LL_RCC_PLLSAI1_IsEnabledDomain_48M + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLLSAI1_IsEnabledDomain_48M(void) +{ + return ((READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLQEN) == (RCC_PLLSAI1CFGR_PLLQEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable PLLSAI1 output mapped on ADC domain clock + * @rmtoll PLLSAI1CFGR PLLREN LL_RCC_PLLSAI1_EnableDomain_ADC + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_EnableDomain_ADC(void) +{ + SET_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLREN); +} + +/** + * @brief Disable PLLSAI1 output mapped on ADC domain clock + * @note In order to save power, when of the PLLSAI1 is + * not used, Main PLLSAI1 should be 0 + * @rmtoll PLLSAI1CFGR PLLREN LL_RCC_PLLSAI1_DisableDomain_ADC + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLLSAI1_DisableDomain_ADC(void) +{ + CLEAR_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLREN); +} + +/** + * @brief Check if PLLSAI1 output mapped on ADC domain clock is enabled + * @rmtoll PLLSAI1CFGR PLLREN LL_RCC_PLLSAI1_IsEnabledDomain_ADC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_PLLSAI1_IsEnabledDomain_ADC(void) +{ + return ((READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLREN) == (RCC_PLLSAI1CFGR_PLLREN)) ? 1UL : 0UL); +} +#endif /* SAI1 */ + +/** + * @} + */ + + + +/** @defgroup RCC_LL_EF_FLAG_Management FLAG Management + * @{ + */ + +/** + * @brief Clear LSI1 ready interrupt flag + * @rmtoll CICR LSI1RDYC LL_RCC_ClearFlag_LSI1RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_LSI1RDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_LSI1RDYC); +} + +/** + * @brief Clear LSI2 ready interrupt flag + * @rmtoll CICR LSI2RDYC LL_RCC_ClearFlag_LSI2RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_LSI2RDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_LSI2RDYC); +} + +/** + * @brief Clear LSE ready interrupt flag + * @rmtoll CICR LSERDYC LL_RCC_ClearFlag_LSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_LSERDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_LSERDYC); +} + +/** + * @brief Clear MSI ready interrupt flag + * @rmtoll CICR MSIRDYC LL_RCC_ClearFlag_MSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_MSIRDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_MSIRDYC); +} + +/** + * @brief Clear HSI ready interrupt flag + * @rmtoll CICR HSIRDYC LL_RCC_ClearFlag_HSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSIRDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_HSIRDYC); +} + +/** + * @brief Clear HSE ready interrupt flag + * @rmtoll CICR HSERDYC LL_RCC_ClearFlag_HSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSERDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_HSERDYC); +} + +/** + * @brief Configure PLL clock source + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_SetMainSource + * @param PLLSource This parameter can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + * @retval None + */ +__STATIC_INLINE void LL_RCC_PLL_SetMainSource(uint32_t PLLSource) +{ + MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, PLLSource); +} + +/** + * @brief Get the oscillator used as PLL clock source. + * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_GetMainSource + * @retval Returned value can be one of the following values: + * @arg @ref LL_RCC_PLLSOURCE_NONE + * @arg @ref LL_RCC_PLLSOURCE_MSI + * @arg @ref LL_RCC_PLLSOURCE_HSI + * @arg @ref LL_RCC_PLLSOURCE_HSE + */ +__STATIC_INLINE uint32_t LL_RCC_PLL_GetMainSource(void) +{ + return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC)); +} + +/** + * @brief Clear PLL ready interrupt flag + * @rmtoll CICR PLLRDYC LL_RCC_ClearFlag_PLLRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_PLLRDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_PLLRDYC); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Clear HSI48 ready interrupt flag + * @rmtoll CICR HSI48RDYC LL_RCC_ClearFlag_HSI48RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSI48RDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_HSI48RDYC); +} +#endif /* RCC_HSI48_SUPPORT */ + +#if defined(SAI1) +/** + * @brief Clear PLLSAI1 ready interrupt flag + * @rmtoll CICR PLLSAI1RDYC LL_RCC_ClearFlag_PLLSAI1RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_PLLSAI1RDY(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_PLLSAI1RDYC); +} +#endif /* SAI1 */ + +/** + * @brief Clear Clock security system interrupt flag + * @rmtoll CICR CSSC LL_RCC_ClearFlag_HSECSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_HSECSS(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_CSSC); +} + +/** + * @brief Clear LSE Clock security system interrupt flag + * @rmtoll CICR LSECSSC LL_RCC_ClearFlag_LSECSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearFlag_LSECSS(void) +{ + SET_BIT(RCC->CICR, RCC_CICR_LSECSSC); +} + +/** + * @brief Check if LSI1 ready interrupt occurred or not + * @rmtoll CIFR LSI1RDYF LL_RCC_IsActiveFlag_LSI1RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSI1RDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSI1RDYF) == (RCC_CIFR_LSI1RDYF)) ? 1UL : 0UL); +} + +/** + * @brief Check if LSI2 ready interrupt occurred or not + * @rmtoll CIFR LSI2RDYF LL_RCC_IsActiveFlag_LSI2RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSI2RDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSI2RDYF) == (RCC_CIFR_LSI2RDYF)) ? 1UL : 0UL); +} + +/** + * @brief Check if LSE ready interrupt occurred or not + * @rmtoll CIFR LSERDYF LL_RCC_IsActiveFlag_LSERDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSERDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSERDYF) == (RCC_CIFR_LSERDYF)) ? 1UL : 0UL); +} + +/** + * @brief Check if MSI ready interrupt occurred or not + * @rmtoll CIFR MSIRDYF LL_RCC_IsActiveFlag_MSIRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_MSIRDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_MSIRDYF) == (RCC_CIFR_MSIRDYF)) ? 1UL : 0UL); +} + +/** + * @brief Check if HSI ready interrupt occurred or not + * @rmtoll CIFR HSIRDYF LL_RCC_IsActiveFlag_HSIRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSIRDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSIRDYF) == (RCC_CIFR_HSIRDYF)) ? 1UL : 0UL); +} + +/** + * @brief Check if HSE ready interrupt occurred or not + * @rmtoll CIFR HSERDYF LL_RCC_IsActiveFlag_HSERDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSERDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSERDYF) == (RCC_CIFR_HSERDYF)) ? 1UL : 0UL); +} + +/** + * @brief Check if PLL ready interrupt occurred or not + * @rmtoll CIFR PLLRDYF LL_RCC_IsActiveFlag_PLLRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLLRDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_PLLRDYF) == (RCC_CIFR_PLLRDYF)) ? 1UL : 0UL); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Check if HSI48 ready interrupt occurred or not + * @rmtoll CIFR HSI48RDYF LL_RCC_IsActiveFlag_HSI48RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSI48RDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSI48RDYF) == (RCC_CIFR_HSI48RDYF)) ? 1UL : 0UL); +} +#endif /* RCC_HSI48_SUPPORT */ + +#if defined(SAI1) +/** + * @brief Check if PLLSAI1 ready interrupt occurred or not + * @rmtoll CIFR PLLSAI1RDYF LL_RCC_IsActiveFlag_PLLSAI1RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLLSAI1RDY(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_PLLSAI1RDYF) == (RCC_CIFR_PLLSAI1RDYF)) ? 1UL : 0UL); +} +#endif /* SAI1 */ + +/** + * @brief Check if Clock security system interrupt occurred or not + * @rmtoll CIFR CSSF LL_RCC_IsActiveFlag_HSECSS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSECSS(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_CSSF) == (RCC_CIFR_CSSF)) ? 1UL : 0UL); +} + +/** + * @brief Check if LSE Clock security system interrupt occurred or not + * @rmtoll CIFR LSECSSF LL_RCC_IsActiveFlag_LSECSS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSECSS(void) +{ + return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSECSSF) == (RCC_CIFR_LSECSSF)) ? 1UL : 0UL); +} + +/** + * @brief Check if HCLK1 prescaler flag value has been applied or not + * @rmtoll CFGR HPREF LL_RCC_IsActiveFlag_HPRE + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HPRE(void) +{ + return ((READ_BIT(RCC->CFGR, RCC_CFGR_HPREF) == (RCC_CFGR_HPREF)) ? 1UL : 0UL); +} + +/** + * @brief Check if HCLK2 prescaler flag value has been applied or not + * @rmtoll EXTCFGR C2HPREF LL_RCC_IsActiveFlag_C2HPRE + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_C2HPRE(void) +{ + return ((READ_BIT(RCC->EXTCFGR, RCC_EXTCFGR_C2HPREF) == (RCC_EXTCFGR_C2HPREF)) ? 1UL : 0UL); +} + +/** + * @brief Check if HCLK4 prescaler flag value has been applied or not + * @rmtoll EXTCFGR SHDHPREF LL_RCC_IsActiveFlag_SHDHPRE + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SHDHPRE(void) +{ + return ((READ_BIT(RCC->EXTCFGR, RCC_EXTCFGR_SHDHPREF) == (RCC_EXTCFGR_SHDHPREF)) ? 1UL : 0UL); +} + + +/** + * @brief Check if PLCK1 prescaler flag value has been applied or not + * @rmtoll CFGR PPRE1F LL_RCC_IsActiveFlag_PPRE1 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PPRE1(void) +{ + return ((READ_BIT(RCC->CFGR, RCC_CFGR_PPRE1F) == (RCC_CFGR_PPRE1F)) ? 1UL : 0UL); +} + +/** + * @brief Check if PLCK2 prescaler flag value has been applied or not + * @rmtoll CFGR PPRE2F LL_RCC_IsActiveFlag_PPRE2 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PPRE2(void) +{ + return ((READ_BIT(RCC->CFGR, RCC_CFGR_PPRE2F) == (RCC_CFGR_PPRE2F)) ? 1UL : 0UL); +} + +/** + * @brief Check if RCC flag Independent Watchdog reset is set or not. + * @rmtoll CSR IWDGRSTF LL_RCC_IsActiveFlag_IWDGRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_IWDGRST(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_IWDGRSTF) == (RCC_CSR_IWDGRSTF)) ? 1UL : 0UL); +} + +/** + * @brief Check if RCC flag Low Power reset is set or not. + * @rmtoll CSR LPWRRSTF LL_RCC_IsActiveFlag_LPWRRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LPWRRST(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_LPWRRSTF) == (RCC_CSR_LPWRRSTF)) ? 1UL : 0UL); +} + +/** + * @brief Check if RCC flag Option byte reset is set or not. + * @rmtoll CSR OBLRSTF LL_RCC_IsActiveFlag_OBLRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_OBLRST(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_OBLRSTF) == (RCC_CSR_OBLRSTF)) ? 1UL : 0UL); +} + +/** + * @brief Check if RCC flag Pin reset is set or not. + * @rmtoll CSR PINRSTF LL_RCC_IsActiveFlag_PINRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PINRST(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_PINRSTF) == (RCC_CSR_PINRSTF)) ? 1UL : 0UL); +} + +/** + * @brief Check if RCC flag Software reset is set or not. + * @rmtoll CSR SFTRSTF LL_RCC_IsActiveFlag_SFTRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SFTRST(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_SFTRSTF) == (RCC_CSR_SFTRSTF)) ? 1UL : 0UL); +} + +/** + * @brief Check if RCC flag Window Watchdog reset is set or not. + * @rmtoll CSR WWDGRSTF LL_RCC_IsActiveFlag_WWDGRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_WWDGRST(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_WWDGRSTF) == (RCC_CSR_WWDGRSTF)) ? 1UL : 0UL); +} + +/** + * @brief Check if RCC flag BOR reset is set or not. + * @rmtoll CSR BORRSTF LL_RCC_IsActiveFlag_BORRST + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_BORRST(void) +{ + return ((READ_BIT(RCC->CSR, RCC_CSR_BORRSTF) == (RCC_CSR_BORRSTF)) ? 1UL : 0UL); +} + +/** + * @brief Set RMVF bit to clear the reset flags. + * @rmtoll CSR RMVF LL_RCC_ClearResetFlags + * @retval None + */ +__STATIC_INLINE void LL_RCC_ClearResetFlags(void) +{ + SET_BIT(RCC->CSR, RCC_CSR_RMVF); +} + +/** + * @} + */ + +/** @defgroup RCC_LL_EF_IT_Management IT Management + * @{ + */ + +/** + * @brief Enable LSI1 ready interrupt + * @rmtoll CIER LSI1RDYIE LL_RCC_EnableIT_LSI1RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_LSI1RDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_LSI1RDYIE); +} + +/** + * @brief Enable LSI2 ready interrupt + * @rmtoll CIER LSI2RDYIE LL_RCC_EnableIT_LSI2RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_LSI2RDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_LSI2RDYIE); +} +/** + * @brief Enable LSE ready interrupt + * @rmtoll CIER LSERDYIE LL_RCC_EnableIT_LSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_LSERDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_LSERDYIE); +} + +/** + * @brief Enable MSI ready interrupt + * @rmtoll CIER MSIRDYIE LL_RCC_EnableIT_MSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_MSIRDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_MSIRDYIE); +} + +/** + * @brief Enable HSI ready interrupt + * @rmtoll CIER HSIRDYIE LL_RCC_EnableIT_HSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_HSIRDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_HSIRDYIE); +} + +/** + * @brief Enable HSE ready interrupt + * @rmtoll CIER HSERDYIE LL_RCC_EnableIT_HSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_HSERDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_HSERDYIE); +} + +/** + * @brief Enable PLL ready interrupt + * @rmtoll CIER PLLRDYIE LL_RCC_EnableIT_PLLRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_PLLRDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_PLLRDYIE); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Enable HSI48 ready interrupt + * @rmtoll CIER HSI48RDYIE LL_RCC_EnableIT_HSI48RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_HSI48RDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE); +} +#endif /* RCC_HSI48_SUPPORT */ + +#if defined(SAI1) +/** + * @brief Enable PLLSAI1 ready interrupt + * @rmtoll CIER PLLSAI1RDYIE LL_RCC_EnableIT_PLLSAI1RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_PLLSAI1RDY(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_PLLSAI1RDYIE); +} +#endif /* SAI1 */ + +/** + * @brief Enable LSE clock security system interrupt + * @rmtoll CIER LSECSSIE LL_RCC_EnableIT_LSECSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_EnableIT_LSECSS(void) +{ + SET_BIT(RCC->CIER, RCC_CIER_LSECSSIE); +} + +/** + * @brief Disable LSI1 ready interrupt + * @rmtoll CIER LSI1RDYIE LL_RCC_DisableIT_LSI1RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_LSI1RDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_LSI1RDYIE); +} + +/** + * @brief Disable LSI2 ready interrupt + * @rmtoll CIER LSI2RDYIE LL_RCC_DisableIT_LSI2RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_LSI2RDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_LSI2RDYIE); +} +/** + * @brief Disable LSE ready interrupt + * @rmtoll CIER LSERDYIE LL_RCC_DisableIT_LSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_LSERDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_LSERDYIE); +} + +/** + * @brief Disable MSI ready interrupt + * @rmtoll CIER MSIRDYIE LL_RCC_DisableIT_MSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_MSIRDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_MSIRDYIE); +} + +/** + * @brief Disable HSI ready interrupt + * @rmtoll CIER HSIRDYIE LL_RCC_DisableIT_HSIRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_HSIRDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_HSIRDYIE); +} + +/** + * @brief Disable HSE ready interrupt + * @rmtoll CIER HSERDYIE LL_RCC_DisableIT_HSERDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_HSERDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_HSERDYIE); +} + +/** + * @brief Disable PLL ready interrupt + * @rmtoll CIER PLLRDYIE LL_RCC_DisableIT_PLLRDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_PLLRDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_PLLRDYIE); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Disable HSI48 ready interrupt + * @rmtoll CIER HSI48RDYIE LL_RCC_DisableIT_HSI48RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_HSI48RDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE); +} +#endif /* RCC_HSI48_SUPPORT */ + +#if defined(SAI1) +/** + * @brief Disable PLLSAI1 ready interrupt + * @rmtoll CIER PLLSAI1RDYIE LL_RCC_DisableIT_PLLSAI1RDY + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_PLLSAI1RDY(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_PLLSAI1RDYIE); +} +#endif /* SAI1 */ + +/** + * @brief Disable LSE clock security system interrupt + * @rmtoll CIER LSECSSIE LL_RCC_DisableIT_LSECSS + * @retval None + */ +__STATIC_INLINE void LL_RCC_DisableIT_LSECSS(void) +{ + CLEAR_BIT(RCC->CIER, RCC_CIER_LSECSSIE); +} + +/** + * @brief Checks if LSI1 ready interrupt source is enabled or disabled. + * @rmtoll CIER LSI1RDYIE LL_RCC_IsEnabledIT_LSI1RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSI1RDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_LSI1RDYIE) == (RCC_CIER_LSI1RDYIE)) ? 1UL : 0UL); +} + +/** + * @brief Checks if LSI2 ready interrupt source is enabled or disabled. + * @rmtoll CIER LSI2RDYIE LL_RCC_IsEnabledIT_LSI2RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSI2RDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_LSI2RDYIE) == (RCC_CIER_LSI2RDYIE)) ? 1UL : 0UL); +} +/** + * @brief Checks if LSE ready interrupt source is enabled or disabled. + * @rmtoll CIER LSERDYIE LL_RCC_IsEnabledIT_LSERDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSERDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_LSERDYIE) == (RCC_CIER_LSERDYIE)) ? 1UL : 0UL); +} + +/** + * @brief Checks if MSI ready interrupt source is enabled or disabled. + * @rmtoll CIER MSIRDYIE LL_RCC_IsEnabledIT_MSIRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_MSIRDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_MSIRDYIE) == (RCC_CIER_MSIRDYIE)) ? 1UL : 0UL); +} + +/** + * @brief Checks if HSI ready interrupt source is enabled or disabled. + * @rmtoll CIER HSIRDYIE LL_RCC_IsEnabledIT_HSIRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSIRDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_HSIRDYIE) == (RCC_CIER_HSIRDYIE)) ? 1UL : 0UL); +} + +/** + * @brief Checks if HSE ready interrupt source is enabled or disabled. + * @rmtoll CIER HSERDYIE LL_RCC_IsEnabledIT_HSERDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSERDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_HSERDYIE) == (RCC_CIER_HSERDYIE)) ? 1UL : 0UL); +} + +/** + * @brief Checks if PLL ready interrupt source is enabled or disabled. + * @rmtoll CIER PLLRDYIE LL_RCC_IsEnabledIT_PLLRDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_PLLRDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_PLLRDYIE) == (RCC_CIER_PLLRDYIE)) ? 1UL : 0UL); +} + +#if defined(RCC_HSI48_SUPPORT) +/** + * @brief Checks if HSI48 ready interrupt source is enabled or disabled. + * @rmtoll CIER HSI48RDYIE LL_RCC_IsEnabledIT_HSI48RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSI48RDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE) == (RCC_CIER_HSI48RDYIE)) ? 1UL : 0UL); +} +#endif /* RCC_HSI48_SUPPORT */ + +#if defined(SAI1) +/** + * @brief Checks if PLLSAI1 ready interrupt source is enabled or disabled. + * @rmtoll CIER PLLSAI1RDYIE LL_RCC_IsEnabledIT_PLLSAI1RDY + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_PLLSAI1RDY(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_PLLSAI1RDYIE) == (RCC_CIER_PLLSAI1RDYIE)) ? 1UL : 0UL); +} +#endif /* SAI1 */ + +/** + * @brief Checks if LSECSS interrupt source is enabled or disabled. + * @rmtoll CIER LSECSSIE LL_RCC_IsEnabledIT_LSECSS + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSECSS(void) +{ + return ((READ_BIT(RCC->CIER, RCC_CIER_LSECSSIE) == (RCC_CIER_LSECSSIE)) ? 1UL : 0UL); +} + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RCC_LL_EF_Init De-initialization function + * @{ + */ +ErrorStatus LL_RCC_DeInit(void); +/** + * @} + */ + +/** @defgroup RCC_LL_EF_Get_Freq Get system and peripherals clocks frequency functions + * @{ + */ +void LL_RCC_GetSystemClocksFreq(LL_RCC_ClocksTypeDef *RCC_Clocks); +#if defined(RCC_SMPS_SUPPORT) +uint32_t LL_RCC_GetSMPSClockFreq(void); +#endif /* RCC_SMPS_SUPPORT */ +uint32_t LL_RCC_GetUSARTClockFreq(uint32_t USARTxSource); +uint32_t LL_RCC_GetI2CClockFreq(uint32_t I2CxSource); +#if defined(LPUART1) +uint32_t LL_RCC_GetLPUARTClockFreq(uint32_t LPUARTxSource); +#endif /* LPUART1 */ +uint32_t LL_RCC_GetLPTIMClockFreq(uint32_t LPTIMxSource); +#if defined(SAI1) +uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource); +#endif /* SAI1 */ +uint32_t LL_RCC_GetCLK48ClockFreq(uint32_t CLK48xSource); +uint32_t LL_RCC_GetRNGClockFreq(uint32_t RNGxSource); +#if defined(USB) +uint32_t LL_RCC_GetUSBClockFreq(uint32_t USBxSource); +#endif /* USB */ +uint32_t LL_RCC_GetADCClockFreq(uint32_t ADCxSource); +uint32_t LL_RCC_GetRTCClockFreq(void); +uint32_t LL_RCC_GetRFWKPClockFreq(void); +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* RCC */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_RCC_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h new file mode 100644 index 0000000..a4846f6 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_rtc.h @@ -0,0 +1,3838 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_rtc.h + * @author MCD Application Team + * @brief Header file of RTC LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_RTC_H +#define STM32WBxx_LL_RTC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined(RTC) + +/** @defgroup RTC_LL RTC + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/** @defgroup RTC_LL_Private_Constants RTC Private Constants + * @{ + */ +/* Masks Definition */ +#define RTC_INIT_MASK 0xFFFFFFFFU +#define RTC_RSF_MASK ((uint32_t)~(RTC_ISR_INIT | RTC_ISR_RSF)) + +/* Write protection defines */ +#define RTC_WRITE_PROTECTION_DISABLE ((uint8_t)0xFFU) +#define RTC_WRITE_PROTECTION_ENABLE_1 ((uint8_t)0xCAU) +#define RTC_WRITE_PROTECTION_ENABLE_2 ((uint8_t)0x53U) + +/* Defines used to combine date & time */ +#define RTC_OFFSET_WEEKDAY 24U +#define RTC_OFFSET_DAY 16U +#define RTC_OFFSET_MONTH 8U +#define RTC_OFFSET_HOUR 16U +#define RTC_OFFSET_MINUTE 8U + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RTC_LL_Private_Macros RTC Private Macros + * @{ + */ +/** + * @} + */ +#endif /*USE_FULL_LL_DRIVER*/ + +/* Exported types ------------------------------------------------------------*/ +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RTC_LL_ES_INIT RTC Exported Init structure + * @{ + */ + +/** + * @brief RTC Init structures definition + */ +typedef struct +{ + uint32_t HourFormat; /*!< Specifies the RTC Hours Format. + This parameter can be a value of @ref RTC_LL_EC_HOURFORMAT + + This feature can be modified afterwards using unitary function + @ref LL_RTC_SetHourFormat(). */ + + uint32_t AsynchPrescaler; /*!< Specifies the RTC Asynchronous Predivider value. + This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F + + This feature can be modified afterwards using unitary function + @ref LL_RTC_SetAsynchPrescaler(). */ + + uint32_t SynchPrescaler; /*!< Specifies the RTC Synchronous Predivider value. + This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFF + + This feature can be modified afterwards using unitary function + @ref LL_RTC_SetSynchPrescaler(). */ +} LL_RTC_InitTypeDef; + +/** + * @brief RTC Time structure definition + */ +typedef struct +{ + uint32_t TimeFormat; /*!< Specifies the RTC AM/PM Time. + This parameter can be a value of @ref RTC_LL_EC_TIME_FORMAT + + This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetFormat(). */ + + uint8_t Hours; /*!< Specifies the RTC Time Hours. + This parameter must be a number between Min_Data = 0 and Max_Data = 12 if the @ref LL_RTC_TIME_FORMAT_PM is selected. + This parameter must be a number between Min_Data = 0 and Max_Data = 23 if the @ref LL_RTC_TIME_FORMAT_AM_OR_24 is selected. + + This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetHour(). */ + + uint8_t Minutes; /*!< Specifies the RTC Time Minutes. + This parameter must be a number between Min_Data = 0 and Max_Data = 59 + + This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetMinute(). */ + + uint8_t Seconds; /*!< Specifies the RTC Time Seconds. + This parameter must be a number between Min_Data = 0 and Max_Data = 59 + + This feature can be modified afterwards using unitary function @ref LL_RTC_TIME_SetSecond(). */ +} LL_RTC_TimeTypeDef; + +/** + * @brief RTC Date structure definition + */ +typedef struct +{ + uint8_t WeekDay; /*!< Specifies the RTC Date WeekDay. + This parameter can be a value of @ref RTC_LL_EC_WEEKDAY + + This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetWeekDay(). */ + + uint8_t Month; /*!< Specifies the RTC Date Month. + This parameter can be a value of @ref RTC_LL_EC_MONTH + + This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetMonth(). */ + + uint8_t Day; /*!< Specifies the RTC Date Day. + This parameter must be a number between Min_Data = 1 and Max_Data = 31 + + This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetDay(). */ + + uint8_t Year; /*!< Specifies the RTC Date Year. + This parameter must be a number between Min_Data = 0 and Max_Data = 99 + + This feature can be modified afterwards using unitary function @ref LL_RTC_DATE_SetYear(). */ +} LL_RTC_DateTypeDef; + +/** + * @brief RTC Alarm structure definition + */ +typedef struct +{ + LL_RTC_TimeTypeDef AlarmTime; /*!< Specifies the RTC Alarm Time members. */ + + uint32_t AlarmMask; /*!< Specifies the RTC Alarm Masks. + This parameter can be a value of @ref RTC_LL_EC_ALMA_MASK for ALARM A or @ref RTC_LL_EC_ALMB_MASK for ALARM B. + + This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetMask() for ALARM A + or @ref LL_RTC_ALMB_SetMask() for ALARM B. + */ + + uint32_t AlarmDateWeekDaySel; /*!< Specifies the RTC Alarm is on day or WeekDay. + This parameter can be a value of @ref RTC_LL_EC_ALMA_WEEKDAY_SELECTION for ALARM A or @ref RTC_LL_EC_ALMB_WEEKDAY_SELECTION for ALARM B + + This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_EnableWeekday() or @ref LL_RTC_ALMA_DisableWeekday() + for ALARM A or @ref LL_RTC_ALMB_EnableWeekday() or @ref LL_RTC_ALMB_DisableWeekday() for ALARM B + */ + + uint8_t AlarmDateWeekDay; /*!< Specifies the RTC Alarm Day/WeekDay. + If AlarmDateWeekDaySel set to day, this parameter must be a number between Min_Data = 1 and Max_Data = 31. + + This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetDay() + for ALARM A or @ref LL_RTC_ALMB_SetDay() for ALARM B. + + If AlarmDateWeekDaySel set to Weekday, this parameter can be a value of @ref RTC_LL_EC_WEEKDAY. + + This feature can be modified afterwards using unitary function @ref LL_RTC_ALMA_SetWeekDay() + for ALARM A or @ref LL_RTC_ALMB_SetWeekDay() for ALARM B. + */ +} LL_RTC_AlarmTypeDef; + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup RTC_LL_Exported_Constants RTC Exported Constants + * @{ + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RTC_LL_EC_FORMAT FORMAT + * @{ + */ +#define LL_RTC_FORMAT_BIN 0x00000000U /*!< Binary data format */ +#define LL_RTC_FORMAT_BCD 0x00000001U /*!< BCD data format */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_ALMA_WEEKDAY_SELECTION RTC Alarm A Date WeekDay + * @{ + */ +#define LL_RTC_ALMA_DATEWEEKDAYSEL_DATE 0x00000000U /*!< Alarm A Date is selected */ +#define LL_RTC_ALMA_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMAR_WDSEL /*!< Alarm A WeekDay is selected */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_ALMB_WEEKDAY_SELECTION RTC Alarm B Date WeekDay + * @{ + */ +#define LL_RTC_ALMB_DATEWEEKDAYSEL_DATE 0x00000000U /*!< Alarm B Date is selected */ +#define LL_RTC_ALMB_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMBR_WDSEL /*!< Alarm B WeekDay is selected */ +/** + * @} + */ + +#endif /* USE_FULL_LL_DRIVER */ + +/** @defgroup RTC_LL_EC_GET_FLAG Get Flags Defines + * @brief Flags defines which can be used with LL_RTC_ReadReg function + * @{ + */ +#define LL_RTC_ISR_ITSF RTC_ISR_ITSF +#define LL_RTC_ISR_RECALPF RTC_ISR_RECALPF +#if defined(RTC_TAMPER3_SUPPORT) +#define LL_RTC_ISR_TAMP3F RTC_ISR_TAMP3F +#endif /* RTC_TAMPER3_SUPPORT */ +#define LL_RTC_ISR_TAMP2F RTC_ISR_TAMP2F +#if defined(RTC_TAMPER1_SUPPORT) +#define LL_RTC_ISR_TAMP1F RTC_ISR_TAMP1F +#endif /* RTC_TAMPER1_SUPPORT */ +#define LL_RTC_ISR_TSOVF RTC_ISR_TSOVF +#define LL_RTC_ISR_TSF RTC_ISR_TSF +#define LL_RTC_ISR_WUTF RTC_ISR_WUTF +#define LL_RTC_ISR_ALRBF RTC_ISR_ALRBF +#define LL_RTC_ISR_ALRAF RTC_ISR_ALRAF +#define LL_RTC_ISR_INITF RTC_ISR_INITF +#define LL_RTC_ISR_RSF RTC_ISR_RSF +#define LL_RTC_ISR_INITS RTC_ISR_INITS +#define LL_RTC_ISR_SHPF RTC_ISR_SHPF +#define LL_RTC_ISR_WUTWF RTC_ISR_WUTWF +#define LL_RTC_ISR_ALRBWF RTC_ISR_ALRBWF +#define LL_RTC_ISR_ALRAWF RTC_ISR_ALRAWF +/** + * @} + */ + +/** @defgroup RTC_LL_EC_IT IT Defines + * @brief IT defines which can be used with LL_RTC_ReadReg and LL_RTC_WriteReg functions + * @{ + */ +#define LL_RTC_CR_TSIE RTC_CR_TSIE +#define LL_RTC_CR_WUTIE RTC_CR_WUTIE +#define LL_RTC_CR_ALRBIE RTC_CR_ALRBIE +#define LL_RTC_CR_ALRAIE RTC_CR_ALRAIE +#if defined(RTC_TAMPER3_SUPPORT) +#define LL_RTC_TAMPCR_TAMP3IE RTC_TAMPCR_TAMP3IE +#endif /* RTC_TAMPER3_SUPPORT */ +#define LL_RTC_TAMPCR_TAMP2IE RTC_TAMPCR_TAMP2IE +#if defined(RTC_TAMPER1_SUPPORT) +#define LL_RTC_TAMPCR_TAMP1IE RTC_TAMPCR_TAMP1IE +#endif /* RTC_TAMPER1_SUPPORT */ +#define LL_RTC_TAMPCR_TAMPIE RTC_TAMPCR_TAMPIE +/** + * @} + */ + +/** @defgroup RTC_LL_EC_WEEKDAY WEEK DAY + * @{ + */ +#define LL_RTC_WEEKDAY_MONDAY ((uint8_t)0x01U) /*!< Monday */ +#define LL_RTC_WEEKDAY_TUESDAY ((uint8_t)0x02U) /*!< Tuesday */ +#define LL_RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03U) /*!< Wednesday */ +#define LL_RTC_WEEKDAY_THURSDAY ((uint8_t)0x04U) /*!< Thrusday */ +#define LL_RTC_WEEKDAY_FRIDAY ((uint8_t)0x05U) /*!< Friday */ +#define LL_RTC_WEEKDAY_SATURDAY ((uint8_t)0x06U) /*!< Saturday */ +#define LL_RTC_WEEKDAY_SUNDAY ((uint8_t)0x07U) /*!< Sunday */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_MONTH MONTH + * @{ + */ +#define LL_RTC_MONTH_JANUARY ((uint8_t)0x01U) /*!< January */ +#define LL_RTC_MONTH_FEBRUARY ((uint8_t)0x02U) /*!< February */ +#define LL_RTC_MONTH_MARCH ((uint8_t)0x03U) /*!< March */ +#define LL_RTC_MONTH_APRIL ((uint8_t)0x04U) /*!< April */ +#define LL_RTC_MONTH_MAY ((uint8_t)0x05U) /*!< May */ +#define LL_RTC_MONTH_JUNE ((uint8_t)0x06U) /*!< June */ +#define LL_RTC_MONTH_JULY ((uint8_t)0x07U) /*!< July */ +#define LL_RTC_MONTH_AUGUST ((uint8_t)0x08U) /*!< August */ +#define LL_RTC_MONTH_SEPTEMBER ((uint8_t)0x09U) /*!< September */ +#define LL_RTC_MONTH_OCTOBER ((uint8_t)0x10U) /*!< October */ +#define LL_RTC_MONTH_NOVEMBER ((uint8_t)0x11U) /*!< November */ +#define LL_RTC_MONTH_DECEMBER ((uint8_t)0x12U) /*!< December */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_HOURFORMAT HOUR FORMAT + * @{ + */ +#define LL_RTC_HOURFORMAT_24HOUR 0x00000000U /*!< 24 hour/day format */ +#define LL_RTC_HOURFORMAT_AMPM RTC_CR_FMT /*!< AM/PM hour format */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_ALARMOUT ALARM OUTPUT + * @{ + */ +#define LL_RTC_ALARMOUT_DISABLE 0x00000000U /*!< Output disabled */ +#define LL_RTC_ALARMOUT_ALMA RTC_CR_OSEL_0 /*!< Alarm A output enabled */ +#define LL_RTC_ALARMOUT_ALMB RTC_CR_OSEL_1 /*!< Alarm B output enabled */ +#define LL_RTC_ALARMOUT_WAKEUP RTC_CR_OSEL /*!< Wakeup output enabled */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_ALARM_OUTPUTTYPE ALARM OUTPUT TYPE + * @{ + */ +#define LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN 0x00000000U /*!< RTC_ALARM, when mapped on PC13, is open-drain output */ +#if defined(RTC_OR_ALARMOUTTYPE) +#define LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL RTC_OR_ALARMOUTTYPE /*!< RTC_ALARM, when mapped on PC13, is push-pull output */ +#endif /* RTC_OR_ALARMOUTTYPE */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_OUTPUTPOLARITY_PIN OUTPUT POLARITY PIN + * @{ + */ +#define LL_RTC_OUTPUTPOLARITY_PIN_HIGH 0x00000000U /*!< Pin is high when ALRAF/ALRBF/WUTF is asserted (depending on OSEL)*/ +#define LL_RTC_OUTPUTPOLARITY_PIN_LOW RTC_CR_POL /*!< Pin is low when ALRAF/ALRBF/WUTF is asserted (depending on OSEL) */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TIME_FORMAT TIME FORMAT + * @{ + */ +#define LL_RTC_TIME_FORMAT_AM_OR_24 0x00000000U /*!< AM or 24-hour format */ +#define LL_RTC_TIME_FORMAT_PM RTC_TR_PM /*!< PM */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_SHIFT_SECOND SHIFT SECOND + * @{ + */ +#define LL_RTC_SHIFT_SECOND_DELAY 0x00000000U /* Delay (seconds) = SUBFS / (PREDIV_S + 1) */ +#define LL_RTC_SHIFT_SECOND_ADVANCE RTC_SHIFTR_ADD1S /* Advance (seconds) = (1 - (SUBFS / (PREDIV_S + 1))) */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_ALMA_MASK ALARMA MASK + * @{ + */ +#define LL_RTC_ALMA_MASK_NONE 0x00000000U /*!< No masks applied on Alarm A*/ +#define LL_RTC_ALMA_MASK_DATEWEEKDAY RTC_ALRMAR_MSK4 /*!< Date/day do not care in Alarm A comparison */ +#define LL_RTC_ALMA_MASK_HOURS RTC_ALRMAR_MSK3 /*!< Hours do not care in Alarm A comparison */ +#define LL_RTC_ALMA_MASK_MINUTES RTC_ALRMAR_MSK2 /*!< Minutes do not care in Alarm A comparison */ +#define LL_RTC_ALMA_MASK_SECONDS RTC_ALRMAR_MSK1 /*!< Seconds do not care in Alarm A comparison */ +#define LL_RTC_ALMA_MASK_ALL (RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1) /*!< Masks all */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_ALMA_TIME_FORMAT ALARMA TIME FORMAT + * @{ + */ +#define LL_RTC_ALMA_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */ +#define LL_RTC_ALMA_TIME_FORMAT_PM RTC_ALRMAR_PM /*!< PM */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_ALMB_MASK ALARMB MASK + * @{ + */ +#define LL_RTC_ALMB_MASK_NONE 0x00000000U /*!< No masks applied on Alarm B */ +#define LL_RTC_ALMB_MASK_DATEWEEKDAY RTC_ALRMBR_MSK4 /*!< Date/day do not care in Alarm B comparison */ +#define LL_RTC_ALMB_MASK_HOURS RTC_ALRMBR_MSK3 /*!< Hours do not care in Alarm B comparison */ +#define LL_RTC_ALMB_MASK_MINUTES RTC_ALRMBR_MSK2 /*!< Minutes do not care in Alarm B comparison */ +#define LL_RTC_ALMB_MASK_SECONDS RTC_ALRMBR_MSK1 /*!< Seconds do not care in Alarm B comparison */ +#define LL_RTC_ALMB_MASK_ALL (RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1) /*!< Masks all */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_ALMB_TIME_FORMAT ALARMB TIME FORMAT + * @{ + */ +#define LL_RTC_ALMB_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */ +#define LL_RTC_ALMB_TIME_FORMAT_PM RTC_ALRMBR_PM /*!< PM */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TIMESTAMP_EDGE TIMESTAMP EDGE + * @{ + */ +#define LL_RTC_TIMESTAMP_EDGE_RISING 0x00000000U /*!< RTC_TS input rising edge generates a time-stamp event */ +#define LL_RTC_TIMESTAMP_EDGE_FALLING RTC_CR_TSEDGE /*!< RTC_TS input falling edge generates a time-stamp event */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TS_TIME_FORMAT TIMESTAMP TIME FORMAT + * @{ + */ +#define LL_RTC_TS_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */ +#define LL_RTC_TS_TIME_FORMAT_PM RTC_TSTR_PM /*!< PM */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TAMPER TAMPER + * @{ + */ +#if defined(RTC_TAMPER1_SUPPORT) +#define LL_RTC_TAMPER_1 RTC_TAMPCR_TAMP1E /*!< RTC_TAMP1 input detection */ +#endif /* RTC_TAMPER1_SUPPORT */ +#define LL_RTC_TAMPER_2 RTC_TAMPCR_TAMP2E /*!< RTC_TAMP2 input detection */ +#if defined(RTC_TAMPER3_SUPPORT) +#define LL_RTC_TAMPER_3 RTC_TAMPCR_TAMP3E /*!< RTC_TAMP3 input detection */ +#endif /* RTC_TAMPER3_SUPPORT */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TAMPER_MASK TAMPER MASK + * @{ + */ +#if defined(RTC_TAMPER1_SUPPORT) +#define LL_RTC_TAMPER_MASK_TAMPER1 RTC_TAMPCR_TAMP1MF /*!< Tamper 1 event generates a trigger event. TAMP1F is masked and internally cleared by hardware.The backup registers are not erased */ +#endif /* RTC_TAMPER1_SUPPORT */ +#define LL_RTC_TAMPER_MASK_TAMPER2 RTC_TAMPCR_TAMP2MF /*!< Tamper 2 event generates a trigger event. TAMP2F is masked and internally cleared by hardware. The backup registers are not erased. */ +#if defined(RTC_TAMPER3_SUPPORT) +#define LL_RTC_TAMPER_MASK_TAMPER3 RTC_TAMPCR_TAMP3MF /*!< Tamper 3 event generates a trigger event. TAMP3F is masked and internally cleared by hardware. The backup registers are not erased */ +#endif /* RTC_TAMPER3_SUPPORT */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TAMPER_NOERASE TAMPER NO ERASE + * @{ + */ +#if defined(RTC_TAMPER1_SUPPORT) +#define LL_RTC_TAMPER_NOERASE_TAMPER1 RTC_TAMPCR_TAMP1NOERASE /*!< Tamper 1 event does not erase the backup registers. */ +#endif /* RTC_TAMPER1_SUPPORT */ +#define LL_RTC_TAMPER_NOERASE_TAMPER2 RTC_TAMPCR_TAMP2NOERASE /*!< Tamper 2 event does not erase the backup registers. */ +#if defined(RTC_TAMPER3_SUPPORT) +#define LL_RTC_TAMPER_NOERASE_TAMPER3 RTC_TAMPCR_TAMP3NOERASE /*!< Tamper 3 event does not erase the backup registers. */ +#endif /* RTC_TAMPER3_SUPPORT */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TAMPER_DURATION TAMPER DURATION + * @{ + */ +#define LL_RTC_TAMPER_DURATION_1RTCCLK 0x00000000U /*!< Tamper pins are pre-charged before sampling during 1 RTCCLK cycle */ +#define LL_RTC_TAMPER_DURATION_2RTCCLK RTC_TAMPCR_TAMPPRCH_0 /*!< Tamper pins are pre-charged before sampling during 2 RTCCLK cycles */ +#define LL_RTC_TAMPER_DURATION_4RTCCLK RTC_TAMPCR_TAMPPRCH_1 /*!< Tamper pins are pre-charged before sampling during 4 RTCCLK cycles */ +#define LL_RTC_TAMPER_DURATION_8RTCCLK RTC_TAMPCR_TAMPPRCH /*!< Tamper pins are pre-charged before sampling during 8 RTCCLK cycles */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TAMPER_FILTER TAMPER FILTER + * @{ + */ +#define LL_RTC_TAMPER_FILTER_DISABLE 0x00000000U /*!< Tamper filter is disabled */ +#define LL_RTC_TAMPER_FILTER_2SAMPLE RTC_TAMPCR_TAMPFLT_0 /*!< Tamper is activated after 2 consecutive samples at the active level */ +#define LL_RTC_TAMPER_FILTER_4SAMPLE RTC_TAMPCR_TAMPFLT_1 /*!< Tamper is activated after 4 consecutive samples at the active level */ +#define LL_RTC_TAMPER_FILTER_8SAMPLE RTC_TAMPCR_TAMPFLT /*!< Tamper is activated after 8 consecutive samples at the active level. */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TAMPER_SAMPLFREQDIV TAMPER SAMPLING FREQUENCY DIVIDER + * @{ + */ +#define LL_RTC_TAMPER_SAMPLFREQDIV_32768 0x00000000U /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 32768 */ +#define LL_RTC_TAMPER_SAMPLFREQDIV_16384 RTC_TAMPCR_TAMPFREQ_0 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 16384 */ +#define LL_RTC_TAMPER_SAMPLFREQDIV_8192 RTC_TAMPCR_TAMPFREQ_1 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 8192 */ +#define LL_RTC_TAMPER_SAMPLFREQDIV_4096 (RTC_TAMPCR_TAMPFREQ_1 | RTC_TAMPCR_TAMPFREQ_0) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 4096 */ +#define LL_RTC_TAMPER_SAMPLFREQDIV_2048 RTC_TAMPCR_TAMPFREQ_2 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 2048 */ +#define LL_RTC_TAMPER_SAMPLFREQDIV_1024 (RTC_TAMPCR_TAMPFREQ_2 | RTC_TAMPCR_TAMPFREQ_0) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 1024 */ +#define LL_RTC_TAMPER_SAMPLFREQDIV_512 (RTC_TAMPCR_TAMPFREQ_2 | RTC_TAMPCR_TAMPFREQ_1) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 512 */ +#define LL_RTC_TAMPER_SAMPLFREQDIV_256 RTC_TAMPCR_TAMPFREQ /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 256 */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_TAMPER_ACTIVELEVEL TAMPER ACTIVE LEVEL + * @{ + */ +#if defined(RTC_TAMPER1_SUPPORT) +#define LL_RTC_TAMPER_ACTIVELEVEL_TAMP1 RTC_TAMPCR_TAMP1TRG /*!< RTC_TAMP1 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */ +#endif /* RTC_TAMPER1_SUPPORT */ +#define LL_RTC_TAMPER_ACTIVELEVEL_TAMP2 RTC_TAMPCR_TAMP2TRG /*!< RTC_TAMP2 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */ +#if defined(RTC_TAMPER3_SUPPORT) +#define LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 RTC_TAMPCR_TAMP3TRG /*!< RTC_TAMP3 input falling edge (if TAMPFLT = 00) or staying high (if TAMPFLT != 00) triggers a tamper detection event */ +#endif /* RTC_TAMPER3_SUPPORT */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_WAKEUPCLOCK_DIV WAKEUP CLOCK DIV + * @{ + */ +#define LL_RTC_WAKEUPCLOCK_DIV_16 0x00000000U /*!< RTC/16 clock is selected */ +#define LL_RTC_WAKEUPCLOCK_DIV_8 (RTC_CR_WUCKSEL_0) /*!< RTC/8 clock is selected */ +#define LL_RTC_WAKEUPCLOCK_DIV_4 (RTC_CR_WUCKSEL_1) /*!< RTC/4 clock is selected */ +#define LL_RTC_WAKEUPCLOCK_DIV_2 (RTC_CR_WUCKSEL_1 | RTC_CR_WUCKSEL_0) /*!< RTC/2 clock is selected */ +#define LL_RTC_WAKEUPCLOCK_CKSPRE (RTC_CR_WUCKSEL_2) /*!< ck_spre (usually 1 Hz) clock is selected */ +#define LL_RTC_WAKEUPCLOCK_CKSPRE_WUT (RTC_CR_WUCKSEL_2 | RTC_CR_WUCKSEL_1) /*!< ck_spre (usually 1 Hz) clock is selected and 2exp16 is added to the WUT counter value*/ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_BKP BACKUP + * @{ + */ +#define LL_RTC_BKP_DR0 0x00000000U +#define LL_RTC_BKP_DR1 0x00000001U +#define LL_RTC_BKP_DR2 0x00000002U +#define LL_RTC_BKP_DR3 0x00000003U +#define LL_RTC_BKP_DR4 0x00000004U +#define LL_RTC_BKP_DR5 0x00000005U +#define LL_RTC_BKP_DR6 0x00000006U +#define LL_RTC_BKP_DR7 0x00000007U +#define LL_RTC_BKP_DR8 0x00000008U +#define LL_RTC_BKP_DR9 0x00000009U +#define LL_RTC_BKP_DR10 0x0000000AU +#define LL_RTC_BKP_DR11 0x0000000BU +#define LL_RTC_BKP_DR12 0x0000000CU +#define LL_RTC_BKP_DR13 0x0000000DU +#define LL_RTC_BKP_DR14 0x0000000EU +#define LL_RTC_BKP_DR15 0x0000000FU +#define LL_RTC_BKP_DR16 0x00000010U +#define LL_RTC_BKP_DR17 0x00000011U +#define LL_RTC_BKP_DR18 0x00000012U +#define LL_RTC_BKP_DR19 0x00000013U +/** + * @} + */ + +/** @defgroup RTC_LL_EC_CALIB_OUTPUT Calibration output + * @{ + */ +#define LL_RTC_CALIB_OUTPUT_NONE 0x00000000U /*!< Calibration output disabled */ +#define LL_RTC_CALIB_OUTPUT_1HZ (RTC_CR_COE | RTC_CR_COSEL) /*!< Calibration output is 1 Hz */ +#define LL_RTC_CALIB_OUTPUT_512HZ (RTC_CR_COE) /*!< Calibration output is 512 Hz */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_CALIB_INSERTPULSE Calibration pulse insertion + * @{ + */ +#define LL_RTC_CALIB_INSERTPULSE_NONE 0x00000000U /*!< No RTCCLK pulses are added */ +#define LL_RTC_CALIB_INSERTPULSE_SET RTC_CALR_CALP /*!< One RTCCLK pulse is effectively inserted every 2exp11 pulses (frequency increased by 488.5 ppm) */ +/** + * @} + */ + +/** @defgroup RTC_LL_EC_CALIB_PERIOD Calibration period + * @{ + */ +#define LL_RTC_CALIB_PERIOD_32SEC 0x00000000U /*!< Use a 32-second calibration cycle period */ +#define LL_RTC_CALIB_PERIOD_16SEC RTC_CALR_CALW16 /*!< Use a 16-second calibration cycle period */ +#define LL_RTC_CALIB_PERIOD_8SEC RTC_CALR_CALW8 /*!< Use a 8-second calibration cycle period */ +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ +/** @defgroup RTC_LL_Exported_Macros RTC Exported Macros + * @{ + */ + +/** @defgroup RTC_LL_EM_WRITE_READ Common Write and read registers Macros + * @{ + */ + +/** + * @brief Write a value in RTC register + * @param __INSTANCE__ RTC Instance + * @param __REG__ Register to be written + * @param __VALUE__ Value to be written in the register + * @retval None + */ +#define LL_RTC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__)) + +/** + * @brief Read a value in RTC register + * @param __INSTANCE__ RTC Instance + * @param __REG__ Register to be read + * @retval Register value + */ +#define LL_RTC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__) +/** + * @} + */ + +/** @defgroup RTC_LL_EM_Convert Convert helper Macros + * @{ + */ + +/** + * @brief Helper macro to convert a value from 2 digit decimal format to BCD format + * @param __VALUE__ Byte to be converted + * @retval Converted byte + */ +#define __LL_RTC_CONVERT_BIN2BCD(__VALUE__) (uint8_t)((((__VALUE__) / 10U) << 4U) | ((__VALUE__) % 10U)) + +/** + * @brief Helper macro to convert a value from BCD format to 2 digit decimal format + * @param __VALUE__ BCD value to be converted + * @retval Converted byte + */ +#define __LL_RTC_CONVERT_BCD2BIN(__VALUE__) (uint8_t)(((uint8_t)((__VALUE__) & (uint8_t)0xF0U) >> (uint8_t)0x4U) * 10U + ((__VALUE__) & (uint8_t)0x0FU)) + +/** + * @} + */ + +/** @defgroup RTC_LL_EM_Date Date helper Macros + * @{ + */ + +/** + * @brief Helper macro to retrieve weekday. + * @param __RTC_DATE__ Date returned by @ref LL_RTC_DATE_Get function. + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + */ +#define __LL_RTC_GET_WEEKDAY(__RTC_DATE__) (((__RTC_DATE__) >> RTC_OFFSET_WEEKDAY) & 0x000000FFU) + +/** + * @brief Helper macro to retrieve Year in BCD format + * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get + * @retval Year in BCD format (0x00 . . . 0x99) + */ +#define __LL_RTC_GET_YEAR(__RTC_DATE__) ((__RTC_DATE__) & 0x000000FFU) + +/** + * @brief Helper macro to retrieve Month in BCD format + * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_MONTH_JANUARY + * @arg @ref LL_RTC_MONTH_FEBRUARY + * @arg @ref LL_RTC_MONTH_MARCH + * @arg @ref LL_RTC_MONTH_APRIL + * @arg @ref LL_RTC_MONTH_MAY + * @arg @ref LL_RTC_MONTH_JUNE + * @arg @ref LL_RTC_MONTH_JULY + * @arg @ref LL_RTC_MONTH_AUGUST + * @arg @ref LL_RTC_MONTH_SEPTEMBER + * @arg @ref LL_RTC_MONTH_OCTOBER + * @arg @ref LL_RTC_MONTH_NOVEMBER + * @arg @ref LL_RTC_MONTH_DECEMBER + */ +#define __LL_RTC_GET_MONTH(__RTC_DATE__) (((__RTC_DATE__) >>RTC_OFFSET_MONTH) & 0x000000FFU) + +/** + * @brief Helper macro to retrieve Day in BCD format + * @param __RTC_DATE__ Value returned by @ref LL_RTC_DATE_Get + * @retval Day in BCD format (0x01 . . . 0x31) + */ +#define __LL_RTC_GET_DAY(__RTC_DATE__) (((__RTC_DATE__) >>RTC_OFFSET_DAY) & 0x000000FFU) + +/** + * @} + */ + +/** @defgroup RTC_LL_EM_Time Time helper Macros + * @{ + */ + +/** + * @brief Helper macro to retrieve hour in BCD format + * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function + * @retval Hours in BCD format (0x01. . .0x12 or between Min_Data=0x00 and Max_Data=0x23) + */ +#define __LL_RTC_GET_HOUR(__RTC_TIME__) (((__RTC_TIME__) >> RTC_OFFSET_HOUR) & 0x000000FFU) + +/** + * @brief Helper macro to retrieve minute in BCD format + * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function + * @retval Minutes in BCD format (0x00. . .0x59) + */ +#define __LL_RTC_GET_MINUTE(__RTC_TIME__) (((__RTC_TIME__) >> RTC_OFFSET_MINUTE) & 0x000000FFU) + +/** + * @brief Helper macro to retrieve second in BCD format + * @param __RTC_TIME__ RTC time returned by @ref LL_RTC_TIME_Get function + * @retval Seconds in format (0x00. . .0x59) + */ +#define __LL_RTC_GET_SECOND(__RTC_TIME__) ((__RTC_TIME__) & 0x000000FFU) + +/** + * @} + */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup RTC_LL_Exported_Functions RTC Exported Functions + * @{ + */ + +/** @defgroup RTC_LL_EF_Configuration Configuration + * @{ + */ + +/** + * @brief Set Hours format (24 hour/day or AM/PM hour format) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function) + * @rmtoll CR FMT LL_RTC_SetHourFormat + * @param RTCx RTC Instance + * @param HourFormat This parameter can be one of the following values: + * @arg @ref LL_RTC_HOURFORMAT_24HOUR + * @arg @ref LL_RTC_HOURFORMAT_AMPM + * @retval None + */ +__STATIC_INLINE void LL_RTC_SetHourFormat(RTC_TypeDef *RTCx, uint32_t HourFormat) +{ + MODIFY_REG(RTCx->CR, RTC_CR_FMT, HourFormat); +} + +/** + * @brief Get Hours format (24 hour/day or AM/PM hour format) + * @rmtoll CR FMT LL_RTC_GetHourFormat + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_HOURFORMAT_24HOUR + * @arg @ref LL_RTC_HOURFORMAT_AMPM + */ +__STATIC_INLINE uint32_t LL_RTC_GetHourFormat(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_FMT)); +} + +/** + * @brief Select the flag to be routed to RTC_ALARM output + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR OSEL LL_RTC_SetAlarmOutEvent + * @param RTCx RTC Instance + * @param AlarmOutput This parameter can be one of the following values: + * @arg @ref LL_RTC_ALARMOUT_DISABLE + * @arg @ref LL_RTC_ALARMOUT_ALMA + * @arg @ref LL_RTC_ALARMOUT_ALMB + * @arg @ref LL_RTC_ALARMOUT_WAKEUP + * @retval None + */ +__STATIC_INLINE void LL_RTC_SetAlarmOutEvent(RTC_TypeDef *RTCx, uint32_t AlarmOutput) +{ + MODIFY_REG(RTCx->CR, RTC_CR_OSEL, AlarmOutput); +} + +/** + * @brief Get the flag to be routed to RTC_ALARM output + * @rmtoll CR OSEL LL_RTC_GetAlarmOutEvent + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_ALARMOUT_DISABLE + * @arg @ref LL_RTC_ALARMOUT_ALMA + * @arg @ref LL_RTC_ALARMOUT_ALMB + * @arg @ref LL_RTC_ALARMOUT_WAKEUP + */ +__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutEvent(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_OSEL)); +} + +#if defined(RTC_OR_ALARMOUTTYPE) +/** + * @brief Set RTC_ALARM output type (ALARM in push-pull or open-drain output) + * @note Used only when RTC_ALARM is mapped on PC13 + * @rmtoll OR ALARMOUTTYPE LL_RTC_SetAlarmOutputType + * @param RTCx RTC Instance + * @param Output This parameter can be one of the following values: + * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN + * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_SetAlarmOutputType(RTC_TypeDef *RTCx, uint32_t Output) +{ + MODIFY_REG(RTCx->OR, RTC_OR_ALARMOUTTYPE, Output); +} + +/** + * @brief Get RTC_ALARM output type (ALARM in push-pull or open-drain output) + * @note used only when RTC_ALARM is mapped on PC13 + * @rmtoll OR ALARMOUTTYPE LL_RTC_GetAlarmOutputType + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN + * @arg @ref LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL (*) + * + * (*) value not applicable to all devices. + */ +__STATIC_INLINE uint32_t LL_RTC_GetAlarmOutputType(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->OR, RTC_OR_ALARMOUTTYPE)); +} +#endif /* RTC_OR_ALARMOUTTYPE */ + +/** + * @brief Enable initialization mode + * @note Initialization mode is used to program time and date register (RTC_TR and RTC_DR) + * and prescaler register (RTC_PRER). + * Counters are stopped and start counting from the new value when INIT is reset. + * @rmtoll ISR INIT LL_RTC_EnableInitMode + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableInitMode(RTC_TypeDef *RTCx) +{ + /* Set the Initialization mode */ + WRITE_REG(RTCx->ISR, RTC_INIT_MASK); +} + +/** + * @brief Disable initialization mode (Free running mode) + * @rmtoll ISR INIT LL_RTC_DisableInitMode + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableInitMode(RTC_TypeDef *RTCx) +{ + /* Exit Initialization mode */ + WRITE_REG(RTCx->ISR, (uint32_t)~RTC_ISR_INIT); +} + +/** + * @brief Set Output polarity (pin is low when ALRAF/ALRBF/WUTF is asserted) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR POL LL_RTC_SetOutputPolarity + * @param RTCx RTC Instance + * @param Polarity This parameter can be one of the following values: + * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_HIGH + * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_LOW + * @retval None + */ +__STATIC_INLINE void LL_RTC_SetOutputPolarity(RTC_TypeDef *RTCx, uint32_t Polarity) +{ + MODIFY_REG(RTCx->CR, RTC_CR_POL, Polarity); +} + +/** + * @brief Get Output polarity + * @rmtoll CR POL LL_RTC_GetOutputPolarity + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_HIGH + * @arg @ref LL_RTC_OUTPUTPOLARITY_PIN_LOW + */ +__STATIC_INLINE uint32_t LL_RTC_GetOutputPolarity(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_POL)); +} + +/** + * @brief Enable Bypass the shadow registers + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR BYPSHAD LL_RTC_EnableShadowRegBypass + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableShadowRegBypass(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_BYPSHAD); +} + +/** + * @brief Disable Bypass the shadow registers + * @rmtoll CR BYPSHAD LL_RTC_DisableShadowRegBypass + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableShadowRegBypass(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_BYPSHAD); +} + +/** + * @brief Check if Shadow registers bypass is enabled or not. + * @rmtoll CR BYPSHAD LL_RTC_IsShadowRegBypassEnabled + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsShadowRegBypassEnabled(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->CR, RTC_CR_BYPSHAD) == (RTC_CR_BYPSHAD)) ? 1UL : 0UL); +} + +/** + * @brief Enable RTC_REFIN reference clock detection (50 or 60 Hz) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function) + * @rmtoll CR REFCKON LL_RTC_EnableRefClock + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableRefClock(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_REFCKON); +} + +/** + * @brief Disable RTC_REFIN reference clock detection (50 or 60 Hz) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function) + * @rmtoll CR REFCKON LL_RTC_DisableRefClock + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableRefClock(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_REFCKON); +} + +/** + * @brief Set Asynchronous prescaler factor + * @rmtoll PRER PREDIV_A LL_RTC_SetAsynchPrescaler + * @param RTCx RTC Instance + * @param AsynchPrescaler Value between Min_Data = 0 and Max_Data = 0x7F + * @retval None + */ +__STATIC_INLINE void LL_RTC_SetAsynchPrescaler(RTC_TypeDef *RTCx, uint32_t AsynchPrescaler) +{ + MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_A, AsynchPrescaler << RTC_PRER_PREDIV_A_Pos); +} + +/** + * @brief Set Synchronous prescaler factor + * @rmtoll PRER PREDIV_S LL_RTC_SetSynchPrescaler + * @param RTCx RTC Instance + * @param SynchPrescaler Value between Min_Data = 0 and Max_Data = 0x7FFF + * @retval None + */ +__STATIC_INLINE void LL_RTC_SetSynchPrescaler(RTC_TypeDef *RTCx, uint32_t SynchPrescaler) +{ + MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_S, SynchPrescaler); +} + +/** + * @brief Get Asynchronous prescaler factor + * @rmtoll PRER PREDIV_A LL_RTC_GetAsynchPrescaler + * @param RTCx RTC Instance + * @retval Value between Min_Data = 0 and Max_Data = 0x7F + */ +__STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_A) >> RTC_PRER_PREDIV_A_Pos); +} + +/** + * @brief Get Synchronous prescaler factor + * @rmtoll PRER PREDIV_S LL_RTC_GetSynchPrescaler + * @param RTCx RTC Instance + * @retval Value between Min_Data = 0 and Max_Data = 0x7FFF + */ +__STATIC_INLINE uint32_t LL_RTC_GetSynchPrescaler(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_S)); +} + +/** + * @brief Enable the write protection for RTC registers. + * @rmtoll WPR KEY LL_RTC_EnableWriteProtection + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableWriteProtection(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_DISABLE); +} + +/** + * @brief Disable the write protection for RTC registers. + * @rmtoll WPR KEY LL_RTC_DisableWriteProtection + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableWriteProtection(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_1); + WRITE_REG(RTCx->WPR, RTC_WRITE_PROTECTION_ENABLE_2); +} + +/** + * @brief Enable RTC_OUT remap + * @rmtoll OR OUT_RMP LL_RTC_EnableOutRemap + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableOutRemap(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->OR, RTC_OR_OUT_RMP); +} + +/** + * @brief Disable RTC_OUT remap + * @rmtoll OR OUT_RMP LL_RTC_DisableOutRemap + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableOutRemap(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->OR, RTC_OR_OUT_RMP); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_Time Time + * @{ + */ + +/** + * @brief Set time format (AM/24-hour or PM notation) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function) + * @rmtoll TR PM LL_RTC_TIME_SetFormat + * @param RTCx RTC Instance + * @param TimeFormat This parameter can be one of the following values: + * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24 + * @arg @ref LL_RTC_TIME_FORMAT_PM + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_SetFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat) +{ + MODIFY_REG(RTCx->TR, RTC_TR_PM, TimeFormat); +} + +/** + * @brief Get time format (AM or PM notation) + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar + * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)). + * @rmtoll TR PM LL_RTC_TIME_GetFormat + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24 + * @arg @ref LL_RTC_TIME_FORMAT_PM + */ +__STATIC_INLINE uint32_t LL_RTC_TIME_GetFormat(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TR, RTC_TR_PM)); +} + +/** + * @brief Set Hours in BCD format + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function) + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert hour from binary to BCD format + * @rmtoll TR HT LL_RTC_TIME_SetHour\n + * TR HU LL_RTC_TIME_SetHour + * @param RTCx RTC Instance + * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_SetHour(RTC_TypeDef *RTCx, uint32_t Hours) +{ + MODIFY_REG(RTCx->TR, (RTC_TR_HT | RTC_TR_HU), + (((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos))); +} + +/** + * @brief Get Hours in BCD format + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar + * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)). + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert hour from BCD to + * Binary format + * @rmtoll TR HT LL_RTC_TIME_GetHour\n + * TR HU LL_RTC_TIME_GetHour + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + */ +__STATIC_INLINE uint32_t LL_RTC_TIME_GetHour(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU))) >> RTC_TR_HU_Pos); +} + +/** + * @brief Set Minutes in BCD format + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function) + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format + * @rmtoll TR MNT LL_RTC_TIME_SetMinute\n + * TR MNU LL_RTC_TIME_SetMinute + * @param RTCx RTC Instance + * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes) +{ + MODIFY_REG(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU), + (((Minutes & 0xF0U) << (RTC_TR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_TR_MNU_Pos))); +} + +/** + * @brief Get Minutes in BCD format + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar + * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)). + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert minute from BCD + * to Binary format + * @rmtoll TR MNT LL_RTC_TIME_GetMinute\n + * TR MNU LL_RTC_TIME_GetMinute + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x59 + */ +__STATIC_INLINE uint32_t LL_RTC_TIME_GetMinute(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU)) >> RTC_TR_MNU_Pos); +} + +/** + * @brief Set Seconds in BCD format + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function) + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format + * @rmtoll TR ST LL_RTC_TIME_SetSecond\n + * TR SU LL_RTC_TIME_SetSecond + * @param RTCx RTC Instance + * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds) +{ + MODIFY_REG(RTCx->TR, (RTC_TR_ST | RTC_TR_SU), + (((Seconds & 0xF0U) << (RTC_TR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_TR_SU_Pos))); +} + +/** + * @brief Get Seconds in BCD format + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar + * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)). + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD + * to Binary format + * @rmtoll TR ST LL_RTC_TIME_GetSecond\n + * TR SU LL_RTC_TIME_GetSecond + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x59 + */ +__STATIC_INLINE uint32_t LL_RTC_TIME_GetSecond(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TR, (RTC_TR_ST | RTC_TR_SU)) >> RTC_TR_SU_Pos); +} + +/** + * @brief Set time (hour, minute and second) in BCD format + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function) + * @note TimeFormat and Hours should follow the same format + * @rmtoll TR PM LL_RTC_TIME_Config\n + * TR HT LL_RTC_TIME_Config\n + * TR HU LL_RTC_TIME_Config\n + * TR MNT LL_RTC_TIME_Config\n + * TR MNU LL_RTC_TIME_Config\n + * TR ST LL_RTC_TIME_Config\n + * TR SU LL_RTC_TIME_Config + * @param RTCx RTC Instance + * @param Format12_24 This parameter can be one of the following values: + * @arg @ref LL_RTC_TIME_FORMAT_AM_OR_24 + * @arg @ref LL_RTC_TIME_FORMAT_PM + * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59 + * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds) +{ + uint32_t temp; + + temp = Format12_24 | \ + (((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos)) | \ + (((Minutes & 0xF0U) << (RTC_TR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_TR_MNU_Pos)) | \ + (((Seconds & 0xF0U) << (RTC_TR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_TR_SU_Pos)); + MODIFY_REG(RTCx->TR, (RTC_TR_PM | RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU), temp); +} + +/** + * @brief Get time (hour, minute and second) in BCD format + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note Read either RTC_SSR or RTC_TR locks the values in the higher-order calendar + * shadow registers until RTC_DR is read (LL_RTC_ReadReg(RTC, DR)). + * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND + * are available to get independently each parameter. + * @rmtoll TR HT LL_RTC_TIME_Get\n + * TR HU LL_RTC_TIME_Get\n + * TR MNT LL_RTC_TIME_Get\n + * TR MNU LL_RTC_TIME_Get\n + * TR ST LL_RTC_TIME_Get\n + * TR SU LL_RTC_TIME_Get + * @param RTCx RTC Instance + * @retval Combination of hours, minutes and seconds (Format: 0x00HHMMSS). + */ +__STATIC_INLINE uint32_t LL_RTC_TIME_Get(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU))); +} + +/** + * @brief Memorize whether the daylight saving time change has been performed + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR BKP LL_RTC_TIME_EnableDayLightStore + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_EnableDayLightStore(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_BKP); +} + +/** + * @brief Disable memorization whether the daylight saving time change has been performed. + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR BKP LL_RTC_TIME_DisableDayLightStore + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_DisableDayLightStore(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_BKP); +} + +/** + * @brief Check if RTC Day Light Saving stored operation has been enabled or not + * @rmtoll CR BKP LL_RTC_TIME_IsDayLightStoreEnabled + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_TIME_IsDayLightStoreEnabled(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->CR, RTC_CR_BKP) == (RTC_CR_BKP)) ? 1UL : 0UL); +} + +/** + * @brief Subtract 1 hour (winter time change) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR SUB1H LL_RTC_TIME_DecHour + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_DecHour(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_SUB1H); +} + +/** + * @brief Add 1 hour (summer time change) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ADD1H LL_RTC_TIME_IncHour + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_IncHour(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_ADD1H); +} + +/** + * @brief Get subseconds value in the synchronous prescaler counter. + * @note You can use both SubSeconds value and SecondFraction (PREDIV_S through + * LL_RTC_GetSynchPrescaler function) terms returned to convert Calendar + * SubSeconds value in second fraction ratio with time unit following + * generic formula: + * ==> Seconds fraction ratio * time_unit = + * [(SecondFraction-SubSeconds)/(SecondFraction+1)] * time_unit + * This conversion can be performed only if no shift operation is pending + * (ie. SHFP=0) when PREDIV_S >= SS. + * @rmtoll SSR SS LL_RTC_TIME_GetSubSecond + * @param RTCx RTC Instance + * @retval Subseconds value (number between 0 and 65535) + */ +__STATIC_INLINE uint32_t LL_RTC_TIME_GetSubSecond(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->SSR, RTC_SSR_SS)); +} + +/** + * @brief Synchronize to a remote clock with a high degree of precision. + * @note This operation effectively subtracts from (delays) or advance the clock of a fraction of a second. + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note When REFCKON is set, firmware must not write to Shift control register. + * @rmtoll SHIFTR ADD1S LL_RTC_TIME_Synchronize\n + * SHIFTR SUBFS LL_RTC_TIME_Synchronize + * @param RTCx RTC Instance + * @param ShiftSecond This parameter can be one of the following values: + * @arg @ref LL_RTC_SHIFT_SECOND_DELAY + * @arg @ref LL_RTC_SHIFT_SECOND_ADVANCE + * @param Fraction Number of Seconds Fractions (any value from 0 to 0x7FFF) + * @retval None + */ +__STATIC_INLINE void LL_RTC_TIME_Synchronize(RTC_TypeDef *RTCx, uint32_t ShiftSecond, uint32_t Fraction) +{ + WRITE_REG(RTCx->SHIFTR, ShiftSecond | Fraction); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_Date Date + * @{ + */ + +/** + * @brief Set Year in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Year from binary to BCD format + * @rmtoll DR YT LL_RTC_DATE_SetYear\n + * DR YU LL_RTC_DATE_SetYear + * @param RTCx RTC Instance + * @param Year Value between Min_Data=0x00 and Max_Data=0x99 + * @retval None + */ +__STATIC_INLINE void LL_RTC_DATE_SetYear(RTC_TypeDef *RTCx, uint32_t Year) +{ + MODIFY_REG(RTCx->DR, (RTC_DR_YT | RTC_DR_YU), + (((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos))); +} + +/** + * @brief Get Year in BCD format + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Year from BCD to Binary format + * @rmtoll DR YT LL_RTC_DATE_GetYear\n + * DR YU LL_RTC_DATE_GetYear + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x99 + */ +__STATIC_INLINE uint32_t LL_RTC_DATE_GetYear(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->DR, (RTC_DR_YT | RTC_DR_YU))) >> RTC_DR_YU_Pos); +} + +/** + * @brief Set Week day + * @rmtoll DR WDU LL_RTC_DATE_SetWeekDay + * @param RTCx RTC Instance + * @param WeekDay This parameter can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + * @retval None + */ +__STATIC_INLINE void LL_RTC_DATE_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay) +{ + MODIFY_REG(RTCx->DR, RTC_DR_WDU, WeekDay << RTC_DR_WDU_Pos); +} + +/** + * @brief Get Week day + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @rmtoll DR WDU LL_RTC_DATE_GetWeekDay + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + */ +__STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->DR, RTC_DR_WDU) >> RTC_DR_WDU_Pos); +} + +/** + * @brief Set Month in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Month from binary to BCD format + * @rmtoll DR MT LL_RTC_DATE_SetMonth\n + * DR MU LL_RTC_DATE_SetMonth + * @param RTCx RTC Instance + * @param Month This parameter can be one of the following values: + * @arg @ref LL_RTC_MONTH_JANUARY + * @arg @ref LL_RTC_MONTH_FEBRUARY + * @arg @ref LL_RTC_MONTH_MARCH + * @arg @ref LL_RTC_MONTH_APRIL + * @arg @ref LL_RTC_MONTH_MAY + * @arg @ref LL_RTC_MONTH_JUNE + * @arg @ref LL_RTC_MONTH_JULY + * @arg @ref LL_RTC_MONTH_AUGUST + * @arg @ref LL_RTC_MONTH_SEPTEMBER + * @arg @ref LL_RTC_MONTH_OCTOBER + * @arg @ref LL_RTC_MONTH_NOVEMBER + * @arg @ref LL_RTC_MONTH_DECEMBER + * @retval None + */ +__STATIC_INLINE void LL_RTC_DATE_SetMonth(RTC_TypeDef *RTCx, uint32_t Month) +{ + MODIFY_REG(RTCx->DR, (RTC_DR_MT | RTC_DR_MU), + (((Month & 0xF0U) << (RTC_DR_MT_Pos - 4U)) | ((Month & 0x0FU) << RTC_DR_MU_Pos))); +} + +/** + * @brief Get Month in BCD format + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format + * @rmtoll DR MT LL_RTC_DATE_GetMonth\n + * DR MU LL_RTC_DATE_GetMonth + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_MONTH_JANUARY + * @arg @ref LL_RTC_MONTH_FEBRUARY + * @arg @ref LL_RTC_MONTH_MARCH + * @arg @ref LL_RTC_MONTH_APRIL + * @arg @ref LL_RTC_MONTH_MAY + * @arg @ref LL_RTC_MONTH_JUNE + * @arg @ref LL_RTC_MONTH_JULY + * @arg @ref LL_RTC_MONTH_AUGUST + * @arg @ref LL_RTC_MONTH_SEPTEMBER + * @arg @ref LL_RTC_MONTH_OCTOBER + * @arg @ref LL_RTC_MONTH_NOVEMBER + * @arg @ref LL_RTC_MONTH_DECEMBER + */ +__STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->DR, (RTC_DR_MT | RTC_DR_MU))) >> RTC_DR_MU_Pos); +} + +/** + * @brief Set Day in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format + * @rmtoll DR DT LL_RTC_DATE_SetDay\n + * DR DU LL_RTC_DATE_SetDay + * @param RTCx RTC Instance + * @param Day Value between Min_Data=0x01 and Max_Data=0x31 + * @retval None + */ +__STATIC_INLINE void LL_RTC_DATE_SetDay(RTC_TypeDef *RTCx, uint32_t Day) +{ + MODIFY_REG(RTCx->DR, (RTC_DR_DT | RTC_DR_DU), + (((Day & 0xF0U) << (RTC_DR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_DR_DU_Pos))); +} + +/** + * @brief Get Day in BCD format + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format + * @rmtoll DR DT LL_RTC_DATE_GetDay\n + * DR DU LL_RTC_DATE_GetDay + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x01 and Max_Data=0x31 + */ +__STATIC_INLINE uint32_t LL_RTC_DATE_GetDay(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->DR, (RTC_DR_DT | RTC_DR_DU))) >> RTC_DR_DU_Pos); +} + +/** + * @brief Set date (WeekDay, Day, Month and Year) in BCD format + * @rmtoll DR WDU LL_RTC_DATE_Config\n + * DR MT LL_RTC_DATE_Config\n + * DR MU LL_RTC_DATE_Config\n + * DR DT LL_RTC_DATE_Config\n + * DR DU LL_RTC_DATE_Config\n + * DR YT LL_RTC_DATE_Config\n + * DR YU LL_RTC_DATE_Config + * @param RTCx RTC Instance + * @param WeekDay This parameter can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + * @param Day Value between Min_Data=0x01 and Max_Data=0x31 + * @param Month This parameter can be one of the following values: + * @arg @ref LL_RTC_MONTH_JANUARY + * @arg @ref LL_RTC_MONTH_FEBRUARY + * @arg @ref LL_RTC_MONTH_MARCH + * @arg @ref LL_RTC_MONTH_APRIL + * @arg @ref LL_RTC_MONTH_MAY + * @arg @ref LL_RTC_MONTH_JUNE + * @arg @ref LL_RTC_MONTH_JULY + * @arg @ref LL_RTC_MONTH_AUGUST + * @arg @ref LL_RTC_MONTH_SEPTEMBER + * @arg @ref LL_RTC_MONTH_OCTOBER + * @arg @ref LL_RTC_MONTH_NOVEMBER + * @arg @ref LL_RTC_MONTH_DECEMBER + * @param Year Value between Min_Data=0x00 and Max_Data=0x99 + * @retval None + */ +__STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uint32_t Day, uint32_t Month, uint32_t Year) +{ + uint32_t temp; + + temp = ( WeekDay << RTC_DR_WDU_Pos) | \ + (((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos)) | \ + (((Month & 0xF0U) << (RTC_DR_MT_Pos - 4U)) | ((Month & 0x0FU) << RTC_DR_MU_Pos)) | \ + (((Day & 0xF0U) << (RTC_DR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_DR_DU_Pos)); + + MODIFY_REG(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU), temp); +} + +/** + * @brief Get date (WeekDay, Day, Month and Year) in BCD format + * @note if RTC shadow registers are not bypassed (BYPSHAD=0), need to check if RSF flag is set + * before reading this bit + * @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_YEAR, __LL_RTC_GET_MONTH, + * and __LL_RTC_GET_DAY are available to get independently each parameter. + * @rmtoll DR WDU LL_RTC_DATE_Get\n + * DR MT LL_RTC_DATE_Get\n + * DR MU LL_RTC_DATE_Get\n + * DR DT LL_RTC_DATE_Get\n + * DR DU LL_RTC_DATE_Get\n + * DR YT LL_RTC_DATE_Get\n + * DR YU LL_RTC_DATE_Get + * @param RTCx RTC Instance + * @retval Combination of WeekDay, Day, Month and Year (Format: 0xWWDDMMYY). + */ +__STATIC_INLINE uint32_t LL_RTC_DATE_Get(RTC_TypeDef *RTCx) +{ + uint32_t temp; + + temp = READ_BIT(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU)); + + return (uint32_t)((((temp & RTC_DR_WDU) >> RTC_DR_WDU_Pos) << RTC_OFFSET_WEEKDAY) | \ + (((temp & (RTC_DR_DT | RTC_DR_DU)) >> RTC_DR_DU_Pos) << RTC_OFFSET_DAY) | \ + (((temp & (RTC_DR_MT | RTC_DR_MU)) >> RTC_DR_MU_Pos) << RTC_OFFSET_MONTH) | \ + ((temp & (RTC_DR_YT | RTC_DR_YU)) >> RTC_DR_YU_Pos)); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_ALARMA ALARMA + * @{ + */ + +/** + * @brief Enable Alarm A + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ALRAE LL_RTC_ALMA_Enable + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_Enable(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_ALRAE); +} + +/** + * @brief Disable Alarm A + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ALRAE LL_RTC_ALMA_Disable + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_Disable(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_ALRAE); +} + +/** + * @brief Specify the Alarm A masks. + * @rmtoll ALRMAR MSK4 LL_RTC_ALMA_SetMask\n + * ALRMAR MSK3 LL_RTC_ALMA_SetMask\n + * ALRMAR MSK2 LL_RTC_ALMA_SetMask\n + * ALRMAR MSK1 LL_RTC_ALMA_SetMask + * @param RTCx RTC Instance + * @param Mask This parameter can be a combination of the following values: + * @arg @ref LL_RTC_ALMA_MASK_NONE + * @arg @ref LL_RTC_ALMA_MASK_DATEWEEKDAY + * @arg @ref LL_RTC_ALMA_MASK_HOURS + * @arg @ref LL_RTC_ALMA_MASK_MINUTES + * @arg @ref LL_RTC_ALMA_MASK_SECONDS + * @arg @ref LL_RTC_ALMA_MASK_ALL + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetMask(RTC_TypeDef *RTCx, uint32_t Mask) +{ + MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1, Mask); +} + +/** + * @brief Get the Alarm A masks. + * @rmtoll ALRMAR MSK4 LL_RTC_ALMA_GetMask\n + * ALRMAR MSK3 LL_RTC_ALMA_GetMask\n + * ALRMAR MSK2 LL_RTC_ALMA_GetMask\n + * ALRMAR MSK1 LL_RTC_ALMA_GetMask + * @param RTCx RTC Instance + * @retval Returned value can be can be a combination of the following values: + * @arg @ref LL_RTC_ALMA_MASK_NONE + * @arg @ref LL_RTC_ALMA_MASK_DATEWEEKDAY + * @arg @ref LL_RTC_ALMA_MASK_HOURS + * @arg @ref LL_RTC_ALMA_MASK_MINUTES + * @arg @ref LL_RTC_ALMA_MASK_SECONDS + * @arg @ref LL_RTC_ALMA_MASK_ALL + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetMask(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_MSK4 | RTC_ALRMAR_MSK3 | RTC_ALRMAR_MSK2 | RTC_ALRMAR_MSK1)); +} + +/** + * @brief Enable AlarmA Week day selection (DU[3:0] represents the week day. DT[1:0] is do not care) + * @rmtoll ALRMAR WDSEL LL_RTC_ALMA_EnableWeekday + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_EnableWeekday(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL); +} + +/** + * @brief Disable AlarmA Week day selection (DU[3:0] represents the date ) + * @rmtoll ALRMAR WDSEL LL_RTC_ALMA_DisableWeekday + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_DisableWeekday(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->ALRMAR, RTC_ALRMAR_WDSEL); +} + +/** + * @brief Set ALARM A Day in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format + * @rmtoll ALRMAR DT LL_RTC_ALMA_SetDay\n + * ALRMAR DU LL_RTC_ALMA_SetDay + * @param RTCx RTC Instance + * @param Day Value between Min_Data=0x01 and Max_Data=0x31 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetDay(RTC_TypeDef *RTCx, uint32_t Day) +{ + MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU), + (((Day & 0xF0U) << (RTC_ALRMAR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMAR_DU_Pos))); +} + +/** + * @brief Get ALARM A Day in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format + * @rmtoll ALRMAR DT LL_RTC_ALMA_GetDay\n + * ALRMAR DU LL_RTC_ALMA_GetDay + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x01 and Max_Data=0x31 + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU))) >> RTC_ALRMAR_DU_Pos); +} + +/** + * @brief Set ALARM A Weekday + * @rmtoll ALRMAR DU LL_RTC_ALMA_SetWeekDay + * @param RTCx RTC Instance + * @param WeekDay This parameter can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay) +{ + MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_DU, WeekDay << RTC_ALRMAR_DU_Pos); +} + +/** + * @brief Get ALARM A Weekday + * @rmtoll ALRMAR DU LL_RTC_ALMA_GetWeekDay + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetWeekDay(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_DU) >> RTC_ALRMAR_DU_Pos); +} + +/** + * @brief Set Alarm A time format (AM/24-hour or PM notation) + * @rmtoll ALRMAR PM LL_RTC_ALMA_SetTimeFormat + * @param RTCx RTC Instance + * @param TimeFormat This parameter can be one of the following values: + * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM + * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetTimeFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat) +{ + MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM, TimeFormat); +} + +/** + * @brief Get Alarm A time format (AM or PM notation) + * @rmtoll ALRMAR PM LL_RTC_ALMA_GetTimeFormat + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM + * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetTimeFormat(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_PM)); +} + +/** + * @brief Set ALARM A Hours in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Hours from binary to BCD format + * @rmtoll ALRMAR HT LL_RTC_ALMA_SetHour\n + * ALRMAR HU LL_RTC_ALMA_SetHour + * @param RTCx RTC Instance + * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetHour(RTC_TypeDef *RTCx, uint32_t Hours) +{ + MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU), + (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos))); +} + +/** + * @brief Get ALARM A Hours in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format + * @rmtoll ALRMAR HT LL_RTC_ALMA_GetHour\n + * ALRMAR HU LL_RTC_ALMA_GetHour + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU))) >> RTC_ALRMAR_HU_Pos); +} + +/** + * @brief Set ALARM A Minutes in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format + * @rmtoll ALRMAR MNT LL_RTC_ALMA_SetMinute\n + * ALRMAR MNU LL_RTC_ALMA_SetMinute + * @param RTCx RTC Instance + * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes) +{ + MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU), + (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos))); +} + +/** + * @brief Get ALARM A Minutes in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format + * @rmtoll ALRMAR MNT LL_RTC_ALMA_GetMinute\n + * ALRMAR MNU LL_RTC_ALMA_GetMinute + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x59 + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU))) >> RTC_ALRMAR_MNU_Pos); +} + +/** + * @brief Set ALARM A Seconds in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format + * @rmtoll ALRMAR ST LL_RTC_ALMA_SetSecond\n + * ALRMAR SU LL_RTC_ALMA_SetSecond + * @param RTCx RTC Instance + * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds) +{ + MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU), + (((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos))); +} + +/** + * @brief Get ALARM A Seconds in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format + * @rmtoll ALRMAR ST LL_RTC_ALMA_GetSecond\n + * ALRMAR SU LL_RTC_ALMA_GetSecond + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x59 + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU))) >> RTC_ALRMAR_SU_Pos); +} + +/** + * @brief Set Alarm A Time (hour, minute and second) in BCD format + * @rmtoll ALRMAR PM LL_RTC_ALMA_ConfigTime\n + * ALRMAR HT LL_RTC_ALMA_ConfigTime\n + * ALRMAR HU LL_RTC_ALMA_ConfigTime\n + * ALRMAR MNT LL_RTC_ALMA_ConfigTime\n + * ALRMAR MNU LL_RTC_ALMA_ConfigTime\n + * ALRMAR ST LL_RTC_ALMA_ConfigTime\n + * ALRMAR SU LL_RTC_ALMA_ConfigTime + * @param RTCx RTC Instance + * @param Format12_24 This parameter can be one of the following values: + * @arg @ref LL_RTC_ALMA_TIME_FORMAT_AM + * @arg @ref LL_RTC_ALMA_TIME_FORMAT_PM + * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59 + * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds) +{ + uint32_t temp; + + temp = Format12_24 | \ + (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)) | \ + (((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)) | \ + (((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos)); + + MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM | RTC_ALRMAR_HT | RTC_ALRMAR_HU | RTC_ALRMAR_MNT | RTC_ALRMAR_MNU | RTC_ALRMAR_ST | RTC_ALRMAR_SU, temp); +} + +/** + * @brief Get Alarm B Time (hour, minute and second) in BCD format + * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND + * are available to get independently each parameter. + * @rmtoll ALRMAR HT LL_RTC_ALMA_GetTime\n + * ALRMAR HU LL_RTC_ALMA_GetTime\n + * ALRMAR MNT LL_RTC_ALMA_GetTime\n + * ALRMAR MNU LL_RTC_ALMA_GetTime\n + * ALRMAR ST LL_RTC_ALMA_GetTime\n + * ALRMAR SU LL_RTC_ALMA_GetTime + * @param RTCx RTC Instance + * @retval Combination of hours, minutes and seconds. + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetTime(RTC_TypeDef *RTCx) +{ + return (uint32_t)((LL_RTC_ALMA_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMA_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMA_GetSecond(RTCx)); +} + +/** + * @brief Mask the most-significant bits of the subseconds field starting from + * the bit specified in parameter Mask + * @note This register can be written only when ALRAE is reset in RTC_CR register, + * or in initialization mode. + * @rmtoll ALRMASSR MASKSS LL_RTC_ALMA_SetSubSecondMask + * @param RTCx RTC Instance + * @param Mask Value between Min_Data=0x00 and Max_Data=0xF + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask) +{ + MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS, Mask << RTC_ALRMASSR_MASKSS_Pos); +} + +/** + * @brief Get Alarm A subseconds mask + * @rmtoll ALRMASSR MASKSS LL_RTC_ALMA_GetSubSecondMask + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0xF + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecondMask(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS) >> RTC_ALRMASSR_MASKSS_Pos); +} + +/** + * @brief Set Alarm A subseconds value + * @rmtoll ALRMASSR SS LL_RTC_ALMA_SetSubSecond + * @param RTCx RTC Instance + * @param Subsecond Value between Min_Data=0x00 and Max_Data=0x7FFF + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMA_SetSubSecond(RTC_TypeDef *RTCx, uint32_t Subsecond) +{ + MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_SS, Subsecond); +} + +/** + * @brief Get Alarm A subseconds value + * @rmtoll ALRMASSR SS LL_RTC_ALMA_GetSubSecond + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x7FFF + */ +__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecond(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_SS)); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_ALARMB ALARMB + * @{ + */ + +/** + * @brief Enable Alarm B + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ALRBE LL_RTC_ALMB_Enable + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_Enable(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_ALRBE); +} + +/** + * @brief Disable Alarm B + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ALRBE LL_RTC_ALMB_Disable + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_Disable(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_ALRBE); +} + +/** + * @brief Specify the Alarm B masks. + * @rmtoll ALRMBR MSK4 LL_RTC_ALMB_SetMask\n + * ALRMBR MSK3 LL_RTC_ALMB_SetMask\n + * ALRMBR MSK2 LL_RTC_ALMB_SetMask\n + * ALRMBR MSK1 LL_RTC_ALMB_SetMask + * @param RTCx RTC Instance + * @param Mask This parameter can be a combination of the following values: + * @arg @ref LL_RTC_ALMB_MASK_NONE + * @arg @ref LL_RTC_ALMB_MASK_DATEWEEKDAY + * @arg @ref LL_RTC_ALMB_MASK_HOURS + * @arg @ref LL_RTC_ALMB_MASK_MINUTES + * @arg @ref LL_RTC_ALMB_MASK_SECONDS + * @arg @ref LL_RTC_ALMB_MASK_ALL + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetMask(RTC_TypeDef *RTCx, uint32_t Mask) +{ + MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1, Mask); +} + +/** + * @brief Get the Alarm B masks. + * @rmtoll ALRMBR MSK4 LL_RTC_ALMB_GetMask\n + * ALRMBR MSK3 LL_RTC_ALMB_GetMask\n + * ALRMBR MSK2 LL_RTC_ALMB_GetMask\n + * ALRMBR MSK1 LL_RTC_ALMB_GetMask + * @param RTCx RTC Instance + * @retval Returned value can be can be a combination of the following values: + * @arg @ref LL_RTC_ALMB_MASK_NONE + * @arg @ref LL_RTC_ALMB_MASK_DATEWEEKDAY + * @arg @ref LL_RTC_ALMB_MASK_HOURS + * @arg @ref LL_RTC_ALMB_MASK_MINUTES + * @arg @ref LL_RTC_ALMB_MASK_SECONDS + * @arg @ref LL_RTC_ALMB_MASK_ALL + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetMask(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_MSK4 | RTC_ALRMBR_MSK3 | RTC_ALRMBR_MSK2 | RTC_ALRMBR_MSK1)); +} + +/** + * @brief Enable AlarmB Week day selection (DU[3:0] represents the week day. DT[1:0] is do not care) + * @rmtoll ALRMBR WDSEL LL_RTC_ALMB_EnableWeekday + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_EnableWeekday(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->ALRMBR, RTC_ALRMBR_WDSEL); +} + +/** + * @brief Disable AlarmB Week day selection (DU[3:0] represents the date ) + * @rmtoll ALRMBR WDSEL LL_RTC_ALMB_DisableWeekday + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_DisableWeekday(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->ALRMBR, RTC_ALRMBR_WDSEL); +} + +/** + * @brief Set ALARM B Day in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Day from binary to BCD format + * @rmtoll ALRMBR DT LL_RTC_ALMB_SetDay\n + * ALRMBR DU LL_RTC_ALMB_SetDay + * @param RTCx RTC Instance + * @param Day Value between Min_Data=0x01 and Max_Data=0x31 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetDay(RTC_TypeDef *RTCx, uint32_t Day) +{ + MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU), + (((Day & 0xF0U) << (RTC_ALRMBR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMBR_DU_Pos))); +} + +/** + * @brief Get ALARM B Day in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format + * @rmtoll ALRMBR DT LL_RTC_ALMB_GetDay\n + * ALRMBR DU LL_RTC_ALMB_GetDay + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x01 and Max_Data=0x31 + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetDay(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU))) >> RTC_ALRMBR_DU_Pos); +} + +/** + * @brief Set ALARM B Weekday + * @rmtoll ALRMBR DU LL_RTC_ALMB_SetWeekDay + * @param RTCx RTC Instance + * @param WeekDay This parameter can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay) +{ + MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_DU, WeekDay << RTC_ALRMBR_DU_Pos); +} + +/** + * @brief Get ALARM B Weekday + * @rmtoll ALRMBR DU LL_RTC_ALMB_GetWeekDay + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetWeekDay(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_DU) >> RTC_ALRMBR_DU_Pos); +} + +/** + * @brief Set ALARM B time format (AM/24-hour or PM notation) + * @rmtoll ALRMBR PM LL_RTC_ALMB_SetTimeFormat + * @param RTCx RTC Instance + * @param TimeFormat This parameter can be one of the following values: + * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM + * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetTimeFormat(RTC_TypeDef *RTCx, uint32_t TimeFormat) +{ + MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM, TimeFormat); +} + +/** + * @brief Get ALARM B time format (AM or PM notation) + * @rmtoll ALRMBR PM LL_RTC_ALMB_GetTimeFormat + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM + * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetTimeFormat(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_PM)); +} + +/** + * @brief Set ALARM B Hours in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Hours from binary to BCD format + * @rmtoll ALRMBR HT LL_RTC_ALMB_SetHour\n + * ALRMBR HU LL_RTC_ALMB_SetHour + * @param RTCx RTC Instance + * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetHour(RTC_TypeDef *RTCx, uint32_t Hours) +{ + MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU), + (((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos))); +} + +/** + * @brief Get ALARM B Hours in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format + * @rmtoll ALRMBR HT LL_RTC_ALMB_GetHour\n + * ALRMBR HU LL_RTC_ALMB_GetHour + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetHour(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU))) >> RTC_ALRMBR_HU_Pos); +} + +/** + * @brief Set ALARM B Minutes in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Minutes from binary to BCD format + * @rmtoll ALRMBR MNT LL_RTC_ALMB_SetMinute\n + * ALRMBR MNU LL_RTC_ALMB_SetMinute + * @param RTCx RTC Instance + * @param Minutes between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes) +{ + MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU), + (((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos))); +} + +/** + * @brief Get ALARM B Minutes in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format + * @rmtoll ALRMBR MNT LL_RTC_ALMB_GetMinute\n + * ALRMBR MNU LL_RTC_ALMB_GetMinute + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x59 + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetMinute(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU))) >> RTC_ALRMBR_MNU_Pos); +} + +/** + * @brief Set ALARM B Seconds in BCD format + * @note helper macro __LL_RTC_CONVERT_BIN2BCD is available to convert Seconds from binary to BCD format + * @rmtoll ALRMBR ST LL_RTC_ALMB_SetSecond\n + * ALRMBR SU LL_RTC_ALMB_SetSecond + * @param RTCx RTC Instance + * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds) +{ + MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU), + (((Seconds & 0xF0U) << (RTC_ALRMBR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMBR_SU_Pos))); +} + +/** + * @brief Get ALARM B Seconds in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format + * @rmtoll ALRMBR ST LL_RTC_ALMB_GetSecond\n + * ALRMBR SU LL_RTC_ALMB_GetSecond + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x59 + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetSecond(RTC_TypeDef *RTCx) +{ + return (uint32_t)((READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU))) >> RTC_ALRMBR_SU_Pos); +} + +/** + * @brief Set Alarm B Time (hour, minute and second) in BCD format + * @rmtoll ALRMBR PM LL_RTC_ALMB_ConfigTime\n + * ALRMBR HT LL_RTC_ALMB_ConfigTime\n + * ALRMBR HU LL_RTC_ALMB_ConfigTime\n + * ALRMBR MNT LL_RTC_ALMB_ConfigTime\n + * ALRMBR MNU LL_RTC_ALMB_ConfigTime\n + * ALRMBR ST LL_RTC_ALMB_ConfigTime\n + * ALRMBR SU LL_RTC_ALMB_ConfigTime + * @param RTCx RTC Instance + * @param Format12_24 This parameter can be one of the following values: + * @arg @ref LL_RTC_ALMB_TIME_FORMAT_AM + * @arg @ref LL_RTC_ALMB_TIME_FORMAT_PM + * @param Hours Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + * @param Minutes Value between Min_Data=0x00 and Max_Data=0x59 + * @param Seconds Value between Min_Data=0x00 and Max_Data=0x59 + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12_24, uint32_t Hours, uint32_t Minutes, uint32_t Seconds) +{ + uint32_t temp; + + temp = Format12_24 | \ + (((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos)) | \ + (((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos)) | \ + (((Seconds & 0xF0U) << (RTC_ALRMBR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMBR_SU_Pos)); + + MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM | RTC_ALRMBR_HT | RTC_ALRMBR_HU | RTC_ALRMBR_MNT | RTC_ALRMBR_MNU | RTC_ALRMBR_ST | RTC_ALRMBR_SU, temp); +} + +/** + * @brief Get Alarm B Time (hour, minute and second) in BCD format + * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND + * are available to get independently each parameter. + * @rmtoll ALRMBR HT LL_RTC_ALMB_GetTime\n + * ALRMBR HU LL_RTC_ALMB_GetTime\n + * ALRMBR MNT LL_RTC_ALMB_GetTime\n + * ALRMBR MNU LL_RTC_ALMB_GetTime\n + * ALRMBR ST LL_RTC_ALMB_GetTime\n + * ALRMBR SU LL_RTC_ALMB_GetTime + * @param RTCx RTC Instance + * @retval Combination of hours, minutes and seconds. + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetTime(RTC_TypeDef *RTCx) +{ + return (uint32_t)((LL_RTC_ALMB_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_ALMB_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_ALMB_GetSecond(RTCx)); +} + +/** + * @brief Mask the most-significant bits of the subseconds field starting from + * the bit specified in parameter Mask + * @note This register can be written only when ALRBE is reset in RTC_CR register, + * or in initialization mode. + * @rmtoll ALRMBSSR MASKSS LL_RTC_ALMB_SetSubSecondMask + * @param RTCx RTC Instance + * @param Mask Value between Min_Data=0x00 and Max_Data=0xF + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask) +{ + MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS, Mask << RTC_ALRMBSSR_MASKSS_Pos); +} + +/** + * @brief Get Alarm B subseconds mask + * @rmtoll ALRMBSSR MASKSS LL_RTC_ALMB_GetSubSecondMask + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0xF + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecondMask(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS) >> RTC_ALRMBSSR_MASKSS_Pos); +} + +/** + * @brief Set Alarm B subseconds value + * @rmtoll ALRMBSSR SS LL_RTC_ALMB_SetSubSecond + * @param RTCx RTC Instance + * @param Subsecond Value between Min_Data=0x00 and Max_Data=0x7FFF + * @retval None + */ +__STATIC_INLINE void LL_RTC_ALMB_SetSubSecond(RTC_TypeDef *RTCx, uint32_t Subsecond) +{ + MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_SS, Subsecond); +} + +/** + * @brief Get Alarm B subseconds value + * @rmtoll ALRMBSSR SS LL_RTC_ALMB_GetSubSecond + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x7FFF + */ +__STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecond(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_SS)); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_Timestamp Timestamp + * @{ + */ + +/** + * @brief Enable internal event timestamp + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ITSE LL_RTC_TS_EnableInternalEvent + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TS_EnableInternalEvent(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_ITSE); +} + +/** + * @brief Disable internal event timestamp + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ITSE LL_RTC_TS_DisableInternalEvent + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TS_DisableInternalEvent(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_ITSE); +} + +/** + * @brief Enable Timestamp + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR TSE LL_RTC_TS_Enable + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TS_Enable(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_TSE); +} + +/** + * @brief Disable Timestamp + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR TSE LL_RTC_TS_Disable + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TS_Disable(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_TSE); +} + +/** + * @brief Set Time-stamp event active edge + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note TSE must be reset when TSEDGE is changed to avoid unwanted TSF setting + * @rmtoll CR TSEDGE LL_RTC_TS_SetActiveEdge + * @param RTCx RTC Instance + * @param Edge This parameter can be one of the following values: + * @arg @ref LL_RTC_TIMESTAMP_EDGE_RISING + * @arg @ref LL_RTC_TIMESTAMP_EDGE_FALLING + * @retval None + */ +__STATIC_INLINE void LL_RTC_TS_SetActiveEdge(RTC_TypeDef *RTCx, uint32_t Edge) +{ + MODIFY_REG(RTCx->CR, RTC_CR_TSEDGE, Edge); +} + +/** + * @brief Get Time-stamp event active edge + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR TSEDGE LL_RTC_TS_GetActiveEdge + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_TIMESTAMP_EDGE_RISING + * @arg @ref LL_RTC_TIMESTAMP_EDGE_FALLING + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetActiveEdge(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_TSEDGE)); +} + +/** + * @brief Get Timestamp AM/PM notation (AM or 24-hour format) + * @rmtoll TSTR PM LL_RTC_TS_GetTimeFormat + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_TS_TIME_FORMAT_AM + * @arg @ref LL_RTC_TS_TIME_FORMAT_PM + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetTimeFormat(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_PM)); +} + +/** + * @brief Get Timestamp Hours in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Hours from BCD to Binary format + * @rmtoll TSTR HT LL_RTC_TS_GetHour\n + * TSTR HU LL_RTC_TS_GetHour + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x01 and Max_Data=0x12 or between Min_Data=0x00 and Max_Data=0x23 + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetHour(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_HT | RTC_TSTR_HU) >> RTC_TSTR_HU_Pos); +} + +/** + * @brief Get Timestamp Minutes in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Minutes from BCD to Binary format + * @rmtoll TSTR MNT LL_RTC_TS_GetMinute\n + * TSTR MNU LL_RTC_TS_GetMinute + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x59 + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetMinute(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_MNT | RTC_TSTR_MNU) >> RTC_TSTR_MNU_Pos); +} + +/** + * @brief Get Timestamp Seconds in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Seconds from BCD to Binary format + * @rmtoll TSTR ST LL_RTC_TS_GetSecond\n + * TSTR SU LL_RTC_TS_GetSecond + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0x59 + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetSecond(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_ST | RTC_TSTR_SU)); +} + +/** + * @brief Get Timestamp time (hour, minute and second) in BCD format + * @note helper macros __LL_RTC_GET_HOUR, __LL_RTC_GET_MINUTE and __LL_RTC_GET_SECOND + * are available to get independently each parameter. + * @rmtoll TSTR HT LL_RTC_TS_GetTime\n + * TSTR HU LL_RTC_TS_GetTime\n + * TSTR MNT LL_RTC_TS_GetTime\n + * TSTR MNU LL_RTC_TS_GetTime\n + * TSTR ST LL_RTC_TS_GetTime\n + * TSTR SU LL_RTC_TS_GetTime + * @param RTCx RTC Instance + * @retval Combination of hours, minutes and seconds. + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetTime(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSTR, + RTC_TSTR_HT | RTC_TSTR_HU | RTC_TSTR_MNT | RTC_TSTR_MNU | RTC_TSTR_ST | RTC_TSTR_SU)); +} + +/** + * @brief Get Timestamp Week day + * @rmtoll TSDR WDU LL_RTC_TS_GetWeekDay + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_WEEKDAY_MONDAY + * @arg @ref LL_RTC_WEEKDAY_TUESDAY + * @arg @ref LL_RTC_WEEKDAY_WEDNESDAY + * @arg @ref LL_RTC_WEEKDAY_THURSDAY + * @arg @ref LL_RTC_WEEKDAY_FRIDAY + * @arg @ref LL_RTC_WEEKDAY_SATURDAY + * @arg @ref LL_RTC_WEEKDAY_SUNDAY + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU) >> RTC_TSDR_WDU_Pos); +} + +/** + * @brief Get Timestamp Month in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Month from BCD to Binary format + * @rmtoll TSDR MT LL_RTC_TS_GetMonth\n + * TSDR MU LL_RTC_TS_GetMonth + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_MONTH_JANUARY + * @arg @ref LL_RTC_MONTH_FEBRUARY + * @arg @ref LL_RTC_MONTH_MARCH + * @arg @ref LL_RTC_MONTH_APRIL + * @arg @ref LL_RTC_MONTH_MAY + * @arg @ref LL_RTC_MONTH_JUNE + * @arg @ref LL_RTC_MONTH_JULY + * @arg @ref LL_RTC_MONTH_AUGUST + * @arg @ref LL_RTC_MONTH_SEPTEMBER + * @arg @ref LL_RTC_MONTH_OCTOBER + * @arg @ref LL_RTC_MONTH_NOVEMBER + * @arg @ref LL_RTC_MONTH_DECEMBER + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetMonth(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_MT | RTC_TSDR_MU) >> RTC_TSDR_MU_Pos); +} + +/** + * @brief Get Timestamp Day in BCD format + * @note helper macro __LL_RTC_CONVERT_BCD2BIN is available to convert Day from BCD to Binary format + * @rmtoll TSDR DT LL_RTC_TS_GetDay\n + * TSDR DU LL_RTC_TS_GetDay + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x01 and Max_Data=0x31 + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetDay(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_DT | RTC_TSDR_DU)); +} + +/** + * @brief Get Timestamp date (WeekDay, Day and Month) in BCD format + * @note helper macros __LL_RTC_GET_WEEKDAY, __LL_RTC_GET_MONTH, + * and __LL_RTC_GET_DAY are available to get independently each parameter. + * @rmtoll TSDR WDU LL_RTC_TS_GetDate\n + * TSDR MT LL_RTC_TS_GetDate\n + * TSDR MU LL_RTC_TS_GetDate\n + * TSDR DT LL_RTC_TS_GetDate\n + * TSDR DU LL_RTC_TS_GetDate + * @param RTCx RTC Instance + * @retval Combination of Weekday, Day and Month + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetDate(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU | RTC_TSDR_MT | RTC_TSDR_MU | RTC_TSDR_DT | RTC_TSDR_DU)); +} + +/** + * @brief Get time-stamp subseconds value + * @rmtoll TSSSR SS LL_RTC_TS_GetSubSecond + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0xFFFF + */ +__STATIC_INLINE uint32_t LL_RTC_TS_GetSubSecond(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TSSSR, RTC_TSSSR_SS)); +} + +#if defined(RTC_TAMPCR_TAMPTS) +/** + * @brief Activate timestamp on tamper detection event + * @rmtoll TAMPCR TAMPTS LL_RTC_TS_EnableOnTamper + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TS_EnableOnTamper(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPTS); +} + +/** + * @brief Disable timestamp on tamper detection event + * @rmtoll TAMPCR TAMPTS LL_RTC_TS_DisableOnTamper + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TS_DisableOnTamper(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPTS); +} +#endif /* RTC_TAMPCR_TAMPTS */ + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_Tamper Tamper + * @{ + */ + +/** + * @brief Enable RTC_TAMPx input detection + * @rmtoll TAMPCR TAMP1E LL_RTC_TAMPER_Enable\n + * TAMPCR TAMP2E LL_RTC_TAMPER_Enable\n + * TAMPCR TAMP3E LL_RTC_TAMPER_Enable + * @param RTCx RTC Instance + * @param Tamper This parameter can be a combination of the following values: + * @arg @ref LL_RTC_TAMPER_1 (*) + * @arg @ref LL_RTC_TAMPER_2 + * @arg @ref LL_RTC_TAMPER_3 (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_Enable(RTC_TypeDef *RTCx, uint32_t Tamper) +{ + SET_BIT(RTCx->TAMPCR, Tamper); +} + +/** + * @brief Clear RTC_TAMPx input detection + * @rmtoll TAMPCR TAMP1E LL_RTC_TAMPER_Disable\n + * TAMPCR TAMP2E LL_RTC_TAMPER_Disable\n + * TAMPCR TAMP3E LL_RTC_TAMPER_Disable + * @param RTCx RTC Instance + * @param Tamper This parameter can be a combination of the following values: + * @arg @ref LL_RTC_TAMPER_1 (*) + * @arg @ref LL_RTC_TAMPER_2 + * @arg @ref LL_RTC_TAMPER_3 (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_Disable(RTC_TypeDef *RTCx, uint32_t Tamper) +{ + CLEAR_BIT(RTCx->TAMPCR, Tamper); +} + +/** + * @brief Enable Tamper mask flag + * @note Associated Tamper IT must not enabled when tamper mask is set. + * @rmtoll TAMPCR TAMP1MF LL_RTC_TAMPER_EnableMask\n + * TAMPCR TAMP2MF LL_RTC_TAMPER_EnableMask\n + * TAMPCR TAMP3MF LL_RTC_TAMPER_EnableMask + * @param RTCx RTC Instance + * @param Mask This parameter can be a combination of the following values: + * @arg @ref LL_RTC_TAMPER_MASK_TAMPER1 (*) + * @arg @ref LL_RTC_TAMPER_MASK_TAMPER2 + * @arg @ref LL_RTC_TAMPER_MASK_TAMPER3 (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_EnableMask(RTC_TypeDef *RTCx, uint32_t Mask) +{ + SET_BIT(RTCx->TAMPCR, Mask); +} + +/** + * @brief Disable Tamper mask flag + * @rmtoll TAMPCR TAMP1MF LL_RTC_TAMPER_DisableMask\n + * TAMPCR TAMP2MF LL_RTC_TAMPER_DisableMask\n + * TAMPCR TAMP3MF LL_RTC_TAMPER_DisableMask + * @param RTCx RTC Instance + * @param Mask This parameter can be a combination of the following values: + * @arg @ref LL_RTC_TAMPER_MASK_TAMPER1 (*) + * @arg @ref LL_RTC_TAMPER_MASK_TAMPER2 + * @arg @ref LL_RTC_TAMPER_MASK_TAMPER3 (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_DisableMask(RTC_TypeDef *RTCx, uint32_t Mask) +{ + CLEAR_BIT(RTCx->TAMPCR, Mask); +} + +/** + * @brief Enable backup register erase after Tamper event detection + * @rmtoll TAMPCR TAMP1NOERASE LL_RTC_TAMPER_EnableEraseBKP\n + * TAMPCR TAMP2NOERASE LL_RTC_TAMPER_EnableEraseBKP\n + * TAMPCR TAMP3NOERASE LL_RTC_TAMPER_EnableEraseBKP + * @param RTCx RTC Instance + * @param Tamper This parameter can be a combination of the following values: + * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER1 (*) + * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER2 + * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER3 (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_EnableEraseBKP(RTC_TypeDef *RTCx, uint32_t Tamper) +{ + CLEAR_BIT(RTCx->TAMPCR, Tamper); +} + +/** + * @brief Disable backup register erase after Tamper event detection + * @rmtoll TAMPCR TAMP1NOERASE LL_RTC_TAMPER_DisableEraseBKP\n + * TAMPCR TAMP2NOERASE LL_RTC_TAMPER_DisableEraseBKP\n + * TAMPCR TAMP3NOERASE LL_RTC_TAMPER_DisableEraseBKP + * @param RTCx RTC Instance + * @param Tamper This parameter can be a combination of the following values: + * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER1 (*) + * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER2 + * @arg @ref LL_RTC_TAMPER_NOERASE_TAMPER3 (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_DisableEraseBKP(RTC_TypeDef *RTCx, uint32_t Tamper) +{ + SET_BIT(RTCx->TAMPCR, Tamper); +} + +/** + * @brief Disable RTC_TAMPx pull-up disable (Disable precharge of RTC_TAMPx pins) + * @rmtoll TAMPCR TAMPPUDIS LL_RTC_TAMPER_DisablePullUp + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_DisablePullUp(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPPUDIS); +} + +/** + * @brief Enable RTC_TAMPx pull-up disable ( Precharge RTC_TAMPx pins before sampling) + * @rmtoll TAMPCR TAMPPUDIS LL_RTC_TAMPER_EnablePullUp + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_EnablePullUp(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPPUDIS); +} + +/** + * @brief Set RTC_TAMPx precharge duration + * @rmtoll TAMPCR TAMPPRCH LL_RTC_TAMPER_SetPrecharge + * @param RTCx RTC Instance + * @param Duration This parameter can be one of the following values: + * @arg @ref LL_RTC_TAMPER_DURATION_1RTCCLK + * @arg @ref LL_RTC_TAMPER_DURATION_2RTCCLK + * @arg @ref LL_RTC_TAMPER_DURATION_4RTCCLK + * @arg @ref LL_RTC_TAMPER_DURATION_8RTCCLK + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_SetPrecharge(RTC_TypeDef *RTCx, uint32_t Duration) +{ + MODIFY_REG(RTCx->TAMPCR, RTC_TAMPCR_TAMPPRCH, Duration); +} + +/** + * @brief Get RTC_TAMPx precharge duration + * @rmtoll TAMPCR TAMPPRCH LL_RTC_TAMPER_GetPrecharge + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_TAMPER_DURATION_1RTCCLK + * @arg @ref LL_RTC_TAMPER_DURATION_2RTCCLK + * @arg @ref LL_RTC_TAMPER_DURATION_4RTCCLK + * @arg @ref LL_RTC_TAMPER_DURATION_8RTCCLK + */ +__STATIC_INLINE uint32_t LL_RTC_TAMPER_GetPrecharge(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPPRCH)); +} + +/** + * @brief Set RTC_TAMPx filter count + * @rmtoll TAMPCR TAMPFLT LL_RTC_TAMPER_SetFilterCount + * @param RTCx RTC Instance + * @param FilterCount This parameter can be one of the following values: + * @arg @ref LL_RTC_TAMPER_FILTER_DISABLE + * @arg @ref LL_RTC_TAMPER_FILTER_2SAMPLE + * @arg @ref LL_RTC_TAMPER_FILTER_4SAMPLE + * @arg @ref LL_RTC_TAMPER_FILTER_8SAMPLE + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_SetFilterCount(RTC_TypeDef *RTCx, uint32_t FilterCount) +{ + MODIFY_REG(RTCx->TAMPCR, RTC_TAMPCR_TAMPFLT, FilterCount); +} + +/** + * @brief Get RTC_TAMPx filter count + * @rmtoll TAMPCR TAMPFLT LL_RTC_TAMPER_GetFilterCount + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_TAMPER_FILTER_DISABLE + * @arg @ref LL_RTC_TAMPER_FILTER_2SAMPLE + * @arg @ref LL_RTC_TAMPER_FILTER_4SAMPLE + * @arg @ref LL_RTC_TAMPER_FILTER_8SAMPLE + */ +__STATIC_INLINE uint32_t LL_RTC_TAMPER_GetFilterCount(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPFLT)); +} + +/** + * @brief Set Tamper sampling frequency + * @rmtoll TAMPCR TAMPFREQ LL_RTC_TAMPER_SetSamplingFreq + * @param RTCx RTC Instance + * @param SamplingFreq This parameter can be one of the following values: + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_32768 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_16384 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_8192 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_4096 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_2048 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_1024 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_512 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_256 + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_SetSamplingFreq(RTC_TypeDef *RTCx, uint32_t SamplingFreq) +{ + MODIFY_REG(RTCx->TAMPCR, RTC_TAMPCR_TAMPFREQ, SamplingFreq); +} + +/** + * @brief Get Tamper sampling frequency + * @rmtoll TAMPCR TAMPFREQ LL_RTC_TAMPER_GetSamplingFreq + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_32768 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_16384 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_8192 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_4096 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_2048 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_1024 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_512 + * @arg @ref LL_RTC_TAMPER_SAMPLFREQDIV_256 + */ +__STATIC_INLINE uint32_t LL_RTC_TAMPER_GetSamplingFreq(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPFREQ)); +} + +/** + * @brief Enable Active level for Tamper input + * @rmtoll TAMPCR TAMP1TRG LL_RTC_TAMPER_EnableActiveLevel\n + * TAMPCR TAMP2TRG LL_RTC_TAMPER_EnableActiveLevel\n + * TAMPCR TAMP3TRG LL_RTC_TAMPER_EnableActiveLevel + * @param RTCx RTC Instance + * @param Tamper This parameter can be a combination of the following values: + * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP1 (*) + * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP2 + * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_EnableActiveLevel(RTC_TypeDef *RTCx, uint32_t Tamper) +{ + SET_BIT(RTCx->TAMPCR, Tamper); +} + +/** + * @brief Disable Active level for Tamper input + * @rmtoll TAMPCR TAMP1TRG LL_RTC_TAMPER_DisableActiveLevel\n + * TAMPCR TAMP2TRG LL_RTC_TAMPER_DisableActiveLevel\n + * TAMPCR TAMP3TRG LL_RTC_TAMPER_DisableActiveLevel + * @param RTCx RTC Instance + * @param Tamper This parameter can be a combination of the following values: + * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP1 (*) + * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP2 + * @arg @ref LL_RTC_TAMPER_ACTIVELEVEL_TAMP3 (*) + * + * (*) value not applicable to all devices. + * @retval None + */ +__STATIC_INLINE void LL_RTC_TAMPER_DisableActiveLevel(RTC_TypeDef *RTCx, uint32_t Tamper) +{ + CLEAR_BIT(RTCx->TAMPCR, Tamper); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_Wakeup Wakeup + * @{ + */ + +/** + * @brief Enable Wakeup timer + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR WUTE LL_RTC_WAKEUP_Enable + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_WAKEUP_Enable(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_WUTE); +} + +/** + * @brief Disable Wakeup timer + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR WUTE LL_RTC_WAKEUP_Disable + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_WAKEUP_Disable(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_WUTE); +} + +/** + * @brief Check if Wakeup timer is enabled or not + * @rmtoll CR WUTE LL_RTC_WAKEUP_IsEnabled + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_WAKEUP_IsEnabled(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->CR, RTC_CR_WUTE) == (RTC_CR_WUTE)) ? 1UL : 0UL); +} + +/** + * @brief Select Wakeup clock + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note Bit can be written only when RTC_CR WUTE bit = 0 and RTC_ISR WUTWF bit = 1 + * @rmtoll CR WUCKSEL LL_RTC_WAKEUP_SetClock + * @param RTCx RTC Instance + * @param WakeupClock This parameter can be one of the following values: + * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_16 + * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_8 + * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_4 + * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_2 + * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE + * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE_WUT + * @retval None + */ +__STATIC_INLINE void LL_RTC_WAKEUP_SetClock(RTC_TypeDef *RTCx, uint32_t WakeupClock) +{ + MODIFY_REG(RTCx->CR, RTC_CR_WUCKSEL, WakeupClock); +} + +/** + * @brief Get Wakeup clock + * @rmtoll CR WUCKSEL LL_RTC_WAKEUP_GetClock + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_16 + * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_8 + * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_4 + * @arg @ref LL_RTC_WAKEUPCLOCK_DIV_2 + * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE + * @arg @ref LL_RTC_WAKEUPCLOCK_CKSPRE_WUT + */ +__STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetClock(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_WUCKSEL)); +} + +/** + * @brief Set Wakeup auto-reload value + * @note Bit can be written only when WUTWF is set to 1 in RTC_ISR + * @rmtoll WUTR WUT LL_RTC_WAKEUP_SetAutoReload + * @param RTCx RTC Instance + * @param Value Value between Min_Data=0x00 and Max_Data=0xFFFF + * @retval None + */ +__STATIC_INLINE void LL_RTC_WAKEUP_SetAutoReload(RTC_TypeDef *RTCx, uint32_t Value) +{ + MODIFY_REG(RTCx->WUTR, RTC_WUTR_WUT, Value); +} + +/** + * @brief Get Wakeup auto-reload value + * @rmtoll WUTR WUT LL_RTC_WAKEUP_GetAutoReload + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data=0xFFFF + */ +__STATIC_INLINE uint32_t LL_RTC_WAKEUP_GetAutoReload(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->WUTR, RTC_WUTR_WUT)); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_Backup_Registers Backup_Registers + * @{ + */ + +/** + * @brief Writes a data in a specified RTC Backup data register. + * @rmtoll BKPxR BKP LL_RTC_BAK_SetRegister + * @param RTCx RTC Instance + * @param BackupRegister This parameter can be one of the following values: + * @arg @ref LL_RTC_BKP_DR0 + * @arg @ref LL_RTC_BKP_DR1 + * @arg @ref LL_RTC_BKP_DR2 + * @arg @ref LL_RTC_BKP_DR3 + * @arg @ref LL_RTC_BKP_DR4 + * @arg @ref LL_RTC_BKP_DR5 + * @arg @ref LL_RTC_BKP_DR6 + * @arg @ref LL_RTC_BKP_DR7 + * @arg @ref LL_RTC_BKP_DR8 + * @arg @ref LL_RTC_BKP_DR9 + * @arg @ref LL_RTC_BKP_DR10 + * @arg @ref LL_RTC_BKP_DR11 + * @arg @ref LL_RTC_BKP_DR12 + * @arg @ref LL_RTC_BKP_DR13 + * @arg @ref LL_RTC_BKP_DR14 + * @arg @ref LL_RTC_BKP_DR15 + * @arg @ref LL_RTC_BKP_DR16 + * @arg @ref LL_RTC_BKP_DR17 + * @arg @ref LL_RTC_BKP_DR18 + * @arg @ref LL_RTC_BKP_DR19 + * @param Data Value between Min_Data=0x00 and Max_Data=0xFFFFFFFF + * @retval None + */ +__STATIC_INLINE void LL_RTC_BAK_SetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister, uint32_t Data) +{ + uint32_t temp; + + temp = (uint32_t)(&(RTCx->BKP0R)); + temp += (BackupRegister * 4U); + + /* Write the specified register */ + *(__IO uint32_t *)temp = (uint32_t)Data; +} + +/** + * @brief Reads data from the specified RTC Backup data Register. + * @rmtoll BKPxR BKP LL_RTC_BAK_GetRegister + * @param RTCx RTC Instance + * @param BackupRegister This parameter can be one of the following values: + * @arg @ref LL_RTC_BKP_DR0 + * @arg @ref LL_RTC_BKP_DR1 + * @arg @ref LL_RTC_BKP_DR2 + * @arg @ref LL_RTC_BKP_DR3 + * @arg @ref LL_RTC_BKP_DR4 + * @arg @ref LL_RTC_BKP_DR5 + * @arg @ref LL_RTC_BKP_DR6 + * @arg @ref LL_RTC_BKP_DR7 + * @arg @ref LL_RTC_BKP_DR8 + * @arg @ref LL_RTC_BKP_DR9 + * @arg @ref LL_RTC_BKP_DR10 + * @arg @ref LL_RTC_BKP_DR11 + * @arg @ref LL_RTC_BKP_DR12 + * @arg @ref LL_RTC_BKP_DR13 + * @arg @ref LL_RTC_BKP_DR14 + * @arg @ref LL_RTC_BKP_DR15 + * @arg @ref LL_RTC_BKP_DR16 + * @arg @ref LL_RTC_BKP_DR17 + * @arg @ref LL_RTC_BKP_DR18 + * @arg @ref LL_RTC_BKP_DR19 + * @retval Value between Min_Data=0x00 and Max_Data=0xFFFFFFFF + */ +__STATIC_INLINE uint32_t LL_RTC_BAK_GetRegister(RTC_TypeDef *RTCx, uint32_t BackupRegister) +{ + uint32_t temp; + + temp = (uint32_t)(&(RTCx->BKP0R)); + temp += (BackupRegister * 4U); + + /* Read the specified register */ + return (*(__IO uint32_t *)temp); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_Calibration Calibration + * @{ + */ + +/** + * @brief Set Calibration output frequency (1 Hz or 512 Hz) + * @note Bits are write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR COE LL_RTC_CAL_SetOutputFreq\n + * CR COSEL LL_RTC_CAL_SetOutputFreq + * @param RTCx RTC Instance + * @param Frequency This parameter can be one of the following values: + * @arg @ref LL_RTC_CALIB_OUTPUT_NONE + * @arg @ref LL_RTC_CALIB_OUTPUT_1HZ + * @arg @ref LL_RTC_CALIB_OUTPUT_512HZ + * + * @retval None + */ +__STATIC_INLINE void LL_RTC_CAL_SetOutputFreq(RTC_TypeDef *RTCx, uint32_t Frequency) +{ + MODIFY_REG(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL, Frequency); +} + +/** + * @brief Get Calibration output frequency (1 Hz or 512 Hz) + * @rmtoll CR COE LL_RTC_CAL_GetOutputFreq\n + * CR COSEL LL_RTC_CAL_GetOutputFreq + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_CALIB_OUTPUT_NONE + * @arg @ref LL_RTC_CALIB_OUTPUT_1HZ + * @arg @ref LL_RTC_CALIB_OUTPUT_512HZ + * + */ +__STATIC_INLINE uint32_t LL_RTC_CAL_GetOutputFreq(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->CR, RTC_CR_COE | RTC_CR_COSEL)); +} + +/** + * @brief Insert or not One RTCCLK pulse every 2exp11 pulses (frequency increased by 488.5 ppm) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note Bit can be written only when RECALPF is set to 0 in RTC_ISR + * @rmtoll CALR CALP LL_RTC_CAL_SetPulse + * @param RTCx RTC Instance + * @param Pulse This parameter can be one of the following values: + * @arg @ref LL_RTC_CALIB_INSERTPULSE_NONE + * @arg @ref LL_RTC_CALIB_INSERTPULSE_SET + * @retval None + */ +__STATIC_INLINE void LL_RTC_CAL_SetPulse(RTC_TypeDef *RTCx, uint32_t Pulse) +{ + MODIFY_REG(RTCx->CALR, RTC_CALR_CALP, Pulse); +} + +/** + * @brief Check if one RTCCLK has been inserted or not every 2exp11 pulses (frequency increased by 488.5 ppm) + * @rmtoll CALR CALP LL_RTC_CAL_IsPulseInserted + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_CAL_IsPulseInserted(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->CALR, RTC_CALR_CALP) == (RTC_CALR_CALP)) ? 1UL : 0UL); +} + +/** + * @brief Set smooth calibration cycle period + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note Bit can be written only when RECALPF is set to 0 in RTC_ISR + * @rmtoll CALR CALW8 LL_RTC_CAL_SetPeriod\n + * CALR CALW16 LL_RTC_CAL_SetPeriod + * @param RTCx RTC Instance + * @param Period This parameter can be one of the following values: + * @arg @ref LL_RTC_CALIB_PERIOD_32SEC + * @arg @ref LL_RTC_CALIB_PERIOD_16SEC + * @arg @ref LL_RTC_CALIB_PERIOD_8SEC + * @retval None + */ +__STATIC_INLINE void LL_RTC_CAL_SetPeriod(RTC_TypeDef *RTCx, uint32_t Period) +{ + MODIFY_REG(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16, Period); +} + +/** + * @brief Get smooth calibration cycle period + * @rmtoll CALR CALW8 LL_RTC_CAL_GetPeriod\n + * CALR CALW16 LL_RTC_CAL_GetPeriod + * @param RTCx RTC Instance + * @retval Returned value can be one of the following values: + * @arg @ref LL_RTC_CALIB_PERIOD_32SEC + * @arg @ref LL_RTC_CALIB_PERIOD_16SEC + * @arg @ref LL_RTC_CALIB_PERIOD_8SEC + */ +__STATIC_INLINE uint32_t LL_RTC_CAL_GetPeriod(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALW8 | RTC_CALR_CALW16)); +} + +/** + * @brief Set smooth Calibration minus + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @note Bit can be written only when RECALPF is set to 0 in RTC_ISR + * @rmtoll CALR CALM LL_RTC_CAL_SetMinus + * @param RTCx RTC Instance + * @param CalibMinus Value between Min_Data=0x00 and Max_Data=0x1FF + * @retval None + */ +__STATIC_INLINE void LL_RTC_CAL_SetMinus(RTC_TypeDef *RTCx, uint32_t CalibMinus) +{ + MODIFY_REG(RTCx->CALR, RTC_CALR_CALM, CalibMinus); +} + +/** + * @brief Get smooth Calibration minus + * @rmtoll CALR CALM LL_RTC_CAL_GetMinus + * @param RTCx RTC Instance + * @retval Value between Min_Data=0x00 and Max_Data= 0x1FF + */ +__STATIC_INLINE uint32_t LL_RTC_CAL_GetMinus(RTC_TypeDef *RTCx) +{ + return (uint32_t)(READ_BIT(RTCx->CALR, RTC_CALR_CALM)); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_FLAG_Management FLAG_Management + * @{ + */ + +/** + * @brief Get Internal Time-stamp flag + * @rmtoll ISR ITSF LL_RTC_IsActiveFlag_ITS + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ITS(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_ITSF) == (RTC_ISR_ITSF)) ? 1UL : 0UL); +} + +/** + * @brief Get Recalibration pending Flag + * @rmtoll ISR RECALPF LL_RTC_IsActiveFlag_RECALP + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RECALP(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_RECALPF) == (RTC_ISR_RECALPF)) ? 1UL : 0UL); +} + +#if defined(RTC_TAMPER3_SUPPORT) +/** + * @brief Get RTC_TAMP3 detection flag + * @rmtoll ISR TAMP3F LL_RTC_IsActiveFlag_TAMP3 + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP3(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_TAMP3F) == (RTC_ISR_TAMP3F)) ? 1UL : 0UL); +} +#endif /* RTC_TAMPER3_SUPPORT */ + +/** + * @brief Get RTC_TAMP2 detection flag + * @rmtoll ISR TAMP2F LL_RTC_IsActiveFlag_TAMP2 + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP2(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_TAMP2F) == (RTC_ISR_TAMP2F)) ? 1UL : 0UL); +} + +#if defined(RTC_TAMPER1_SUPPORT) +/** + * @brief Get RTC_TAMP1 detection flag + * @rmtoll ISR TAMP1F LL_RTC_IsActiveFlag_TAMP1 + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TAMP1(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_TAMP1F) == (RTC_ISR_TAMP1F)) ? 1UL : 0UL); +} +#endif /* RTC_TAMPER1_SUPPORT */ + +/** + * @brief Get Time-stamp overflow flag + * @rmtoll ISR TSOVF LL_RTC_IsActiveFlag_TSOV + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TSOV(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_TSOVF) == (RTC_ISR_TSOVF)) ? 1UL : 0UL); +} + +/** + * @brief Get Time-stamp flag + * @rmtoll ISR TSF LL_RTC_IsActiveFlag_TS + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_TS(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_TSF) == (RTC_ISR_TSF)) ? 1UL : 0UL); +} + +/** + * @brief Get Wakeup timer flag + * @rmtoll ISR WUTF LL_RTC_IsActiveFlag_WUT + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUT(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_WUTF) == (RTC_ISR_WUTF)) ? 1UL : 0UL); +} + +/** + * @brief Get Alarm B flag + * @rmtoll ISR ALRBF LL_RTC_IsActiveFlag_ALRB + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRB(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_ALRBF) == (RTC_ISR_ALRBF)) ? 1UL : 0UL); +} + +/** + * @brief Get Alarm A flag + * @rmtoll ISR ALRAF LL_RTC_IsActiveFlag_ALRA + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRA(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_ALRAF) == (RTC_ISR_ALRAF)) ? 1UL : 0UL); +} + +/** + * @brief Clear Internal Time-stamp flag + * @rmtoll ISR ITSF LL_RTC_ClearFlag_ITS + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_ITS(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_ITSF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} + +#if defined(RTC_TAMPER3_SUPPORT) +/** + * @brief Clear RTC_TAMP3 detection flag + * @rmtoll ISR TAMP3F LL_RTC_ClearFlag_TAMP3 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_TAMP3(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_TAMP3F | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} +#endif /* RTC_TAMPER3_SUPPORT */ + +/** + * @brief Clear RTC_TAMP2 detection flag + * @rmtoll ISR TAMP2F LL_RTC_ClearFlag_TAMP2 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_TAMP2(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_TAMP2F | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} + +#if defined(RTC_TAMPER1_SUPPORT) +/** + * @brief Clear RTC_TAMP1 detection flag + * @rmtoll ISR TAMP1F LL_RTC_ClearFlag_TAMP1 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_TAMP1(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_TAMP1F | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} +#endif /* RTC_TAMPER1_SUPPORT */ + +/** + * @brief Clear Time-stamp overflow flag + * @rmtoll ISR TSOVF LL_RTC_ClearFlag_TSOV + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_TSOV(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_TSOVF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} + +/** + * @brief Clear Time-stamp flag + * @rmtoll ISR TSF LL_RTC_ClearFlag_TS + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_TS(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_TSF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} + +/** + * @brief Clear Wakeup timer flag + * @rmtoll ISR WUTF LL_RTC_ClearFlag_WUT + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_WUT(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_WUTF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} + +/** + * @brief Clear Alarm B flag + * @rmtoll ISR ALRBF LL_RTC_ClearFlag_ALRB + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_ALRB(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_ALRBF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} + +/** + * @brief Clear Alarm A flag + * @rmtoll ISR ALRAF LL_RTC_ClearFlag_ALRA + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_ALRA(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_ALRAF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} + +/** + * @brief Get Initialization flag + * @rmtoll ISR INITF LL_RTC_IsActiveFlag_INIT + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INIT(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_INITF) == (RTC_ISR_INITF)) ? 1UL : 0UL); +} + +/** + * @brief Get Registers synchronization flag + * @rmtoll ISR RSF LL_RTC_IsActiveFlag_RS + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_RS(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_RSF) == (RTC_ISR_RSF)) ? 1UL : 0UL); +} + +/** + * @brief Clear Registers synchronization flag + * @rmtoll ISR RSF LL_RTC_ClearFlag_RS + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_ClearFlag_RS(RTC_TypeDef *RTCx) +{ + WRITE_REG(RTCx->ISR, (~((RTC_ISR_RSF | RTC_ISR_INIT) & 0x0000FFFFU) | (RTCx->ISR & RTC_ISR_INIT))); +} + +/** + * @brief Get Initialization status flag + * @rmtoll ISR INITS LL_RTC_IsActiveFlag_INITS + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_INITS(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_INITS) == (RTC_ISR_INITS)) ? 1UL : 0UL); +} + +/** + * @brief Get Shift operation pending flag + * @rmtoll ISR SHPF LL_RTC_IsActiveFlag_SHP + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_SHP(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_SHPF) == (RTC_ISR_SHPF)) ? 1UL : 0UL); +} + +/** + * @brief Get Wakeup timer write flag + * @rmtoll ISR WUTWF LL_RTC_IsActiveFlag_WUTW + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_WUTW(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_WUTWF) == (RTC_ISR_WUTWF)) ? 1UL : 0UL); +} + +/** + * @brief Get Alarm B write flag + * @rmtoll ISR ALRBWF LL_RTC_IsActiveFlag_ALRBW + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRBW(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_ALRBWF) == (RTC_ISR_ALRBWF)) ? 1UL : 0UL); +} + +/** + * @brief Get Alarm A write flag + * @rmtoll ISR ALRAWF LL_RTC_IsActiveFlag_ALRAW + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsActiveFlag_ALRAW(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->ISR, RTC_ISR_ALRAWF) == (RTC_ISR_ALRAWF)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup RTC_LL_EF_IT_Management IT_Management + * @{ + */ + +/** + * @brief Enable Time-stamp interrupt + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR TSIE LL_RTC_EnableIT_TS + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableIT_TS(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_TSIE); +} + +/** + * @brief Disable Time-stamp interrupt + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR TSIE LL_RTC_DisableIT_TS + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableIT_TS(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_TSIE); +} + +/** + * @brief Enable Wakeup timer interrupt + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR WUTIE LL_RTC_EnableIT_WUT + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableIT_WUT(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_WUTIE); +} + +/** + * @brief Disable Wakeup timer interrupt + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR WUTIE LL_RTC_DisableIT_WUT + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableIT_WUT(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_WUTIE); +} + +/** + * @brief Enable Alarm B interrupt + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ALRBIE LL_RTC_EnableIT_ALRB + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableIT_ALRB(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_ALRBIE); +} + +/** + * @brief Disable Alarm B interrupt + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ALRBIE LL_RTC_DisableIT_ALRB + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableIT_ALRB(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_ALRBIE); +} + +/** + * @brief Enable Alarm A interrupt + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ALRAIE LL_RTC_EnableIT_ALRA + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableIT_ALRA(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->CR, RTC_CR_ALRAIE); +} + +/** + * @brief Disable Alarm A interrupt + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. + * @rmtoll CR ALRAIE LL_RTC_DisableIT_ALRA + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableIT_ALRA(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->CR, RTC_CR_ALRAIE); +} + +#if defined(RTC_TAMPER3_SUPPORT) +/** + * @brief Enable Tamper 3 interrupt + * @rmtoll TAMPCR TAMP3IE LL_RTC_EnableIT_TAMP3 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableIT_TAMP3(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMP3IE); +} + +/** + * @brief Disable Tamper 3 interrupt + * @rmtoll TAMPCR TAMP3IE LL_RTC_DisableIT_TAMP3 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableIT_TAMP3(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMP3IE); +} +#endif /* RTC_TAMPER3_SUPPORT */ + +/** + * @brief Enable Tamper 2 interrupt + * @rmtoll TAMPCR TAMP2IE LL_RTC_EnableIT_TAMP2 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableIT_TAMP2(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMP2IE); +} + +/** + * @brief Disable Tamper 2 interrupt + * @rmtoll TAMPCR TAMP2IE LL_RTC_DisableIT_TAMP2 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableIT_TAMP2(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMP2IE); +} + +#if defined(RTC_TAMPER1_SUPPORT) +/** + * @brief Enable Tamper 1 interrupt + * @rmtoll TAMPCR TAMP1IE LL_RTC_EnableIT_TAMP1 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableIT_TAMP1(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMP1IE); +} + +/** + * @brief Disable Tamper 1 interrupt + * @rmtoll TAMPCR TAMP1IE LL_RTC_DisableIT_TAMP1 + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableIT_TAMP1(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMP1IE); +} +#endif /* RTC_TAMPER1_SUPPORT */ + +/** + * @brief Enable all Tamper Interrupt + * @rmtoll TAMPCR TAMPIE LL_RTC_EnableIT_TAMP + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_EnableIT_TAMP(RTC_TypeDef *RTCx) +{ + SET_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPIE); +} + +/** + * @brief Disable all Tamper Interrupt + * @rmtoll TAMPCR TAMPIE LL_RTC_DisableIT_TAMP + * @param RTCx RTC Instance + * @retval None + */ +__STATIC_INLINE void LL_RTC_DisableIT_TAMP(RTC_TypeDef *RTCx) +{ + CLEAR_BIT(RTCx->TAMPCR, RTC_TAMPCR_TAMPIE); +} + +/** + * @brief Check if Time-stamp interrupt is enabled or not + * @rmtoll CR TSIE LL_RTC_IsEnabledIT_TS + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TS(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->CR, RTC_CR_TSIE) == (RTC_CR_TSIE)) ? 1UL : 0UL); +} + +/** + * @brief Check if Wakeup timer interrupt is enabled or not + * @rmtoll CR WUTIE LL_RTC_IsEnabledIT_WUT + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_WUT(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->CR, RTC_CR_WUTIE) == (RTC_CR_WUTIE)) ? 1UL : 0UL); +} + +/** + * @brief Check if Alarm B interrupt is enabled or not + * @rmtoll CR ALRBIE LL_RTC_IsEnabledIT_ALRB + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ALRB(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->CR, RTC_CR_ALRBIE) == (RTC_CR_ALRBIE)) ? 1UL : 0UL); +} + +/** + * @brief Check if Alarm A interrupt is enabled or not + * @rmtoll CR ALRAIE LL_RTC_IsEnabledIT_ALRA + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_ALRA(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->CR, RTC_CR_ALRAIE) == (RTC_CR_ALRAIE)) ? 1UL : 0UL); +} + +#if defined(RTC_TAMPER3_SUPPORT) +/** + * @brief Check if Tamper 3 interrupt is enabled or not + * @rmtoll TAMPCR TAMP3IE LL_RTC_IsEnabledIT_TAMP3 + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP3(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->TAMPCR, + RTC_TAMPCR_TAMP3IE) == (RTC_TAMPCR_TAMP3IE)) ? 1UL : 0UL); +} +#endif /* RTC_TAMPER3_SUPPORT */ + +/** + * @brief Check if Tamper 2 interrupt is enabled or not + * @rmtoll TAMPCR TAMP2IE LL_RTC_IsEnabledIT_TAMP2 + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP2(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->TAMPCR, + RTC_TAMPCR_TAMP2IE) == (RTC_TAMPCR_TAMP2IE)) ? 1UL : 0UL); + +} + +#if defined(RTC_TAMPER1_SUPPORT) +/** + * @brief Check if Tamper 1 interrupt is enabled or not + * @rmtoll TAMPCR TAMP1IE LL_RTC_IsEnabledIT_TAMP1 + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP1(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->TAMPCR, + RTC_TAMPCR_TAMP1IE) == (RTC_TAMPCR_TAMP1IE)) ? 1UL : 0UL); +} +#endif /* RTC_TAMPER1_SUPPORT */ + +/** + * @brief Check if all the TAMPER interrupts are enabled or not + * @rmtoll TAMPCR TAMPIE LL_RTC_IsEnabledIT_TAMP + * @param RTCx RTC Instance + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_RTC_IsEnabledIT_TAMP(RTC_TypeDef *RTCx) +{ + return ((READ_BIT(RTCx->TAMPCR, + RTC_TAMPCR_TAMPIE) == (RTC_TAMPCR_TAMPIE)) ? 1UL : 0UL); +} + +/** + * @} + */ + +#if defined(USE_FULL_LL_DRIVER) +/** @defgroup RTC_LL_EF_Init Initialization and de-initialization functions + * @{ + */ + +ErrorStatus LL_RTC_DeInit(RTC_TypeDef *RTCx); +ErrorStatus LL_RTC_Init(RTC_TypeDef *RTCx, LL_RTC_InitTypeDef *RTC_InitStruct); +void LL_RTC_StructInit(LL_RTC_InitTypeDef *RTC_InitStruct); +ErrorStatus LL_RTC_TIME_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_TimeTypeDef *RTC_TimeStruct); +void LL_RTC_TIME_StructInit(LL_RTC_TimeTypeDef *RTC_TimeStruct); +ErrorStatus LL_RTC_DATE_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_DateTypeDef *RTC_DateStruct); +void LL_RTC_DATE_StructInit(LL_RTC_DateTypeDef *RTC_DateStruct); +ErrorStatus LL_RTC_ALMA_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct); +ErrorStatus LL_RTC_ALMB_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct); +void LL_RTC_ALMA_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct); +void LL_RTC_ALMB_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct); +ErrorStatus LL_RTC_EnterInitMode(RTC_TypeDef *RTCx); +ErrorStatus LL_RTC_ExitInitMode(RTC_TypeDef *RTCx); +ErrorStatus LL_RTC_WaitForSynchro(RTC_TypeDef *RTCx); + +/** + * @} + */ +#endif /* USE_FULL_LL_DRIVER */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined(RTC) */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_RTC_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h new file mode 100644 index 0000000..1a7afcb --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_system.h @@ -0,0 +1,2277 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_system.h + * @author MCD Application Team + * @brief Header file of SYSTEM LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + The LL SYSTEM driver contains a set of generic APIs that can be + used by user: + (+) Some of the FLASH features need to be handled in the SYSTEM file. + (+) Access to DBGCMU registers + (+) Access to SYSCFG registers + (+) Access to VREFBUF registers + + @endverbatim + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_SYSTEM_H +#define STM32WBxx_LL_SYSTEM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined (FLASH) || defined (SYSCFG) || defined (DBGMCU) || defined (VREFBUF) + +/** @defgroup SYSTEM_LL SYSTEM + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ +/** @defgroup SYSTEM_LL_Private_Constants SYSTEM Private Constants + * @{ + */ +/** + * @brief VREFBUF VREF_SC0 & VREF_SC1 calibration values + */ +#define VREFBUF_SC0_CAL_ADDR ((uint8_t*) (0x1FFF75F0UL)) /*!< Address of VREFBUF trimming value for VRS=0, + VREF_SC0 in STM32WB datasheet */ +#define VREFBUF_SC1_CAL_ADDR ((uint8_t*) (0x1FFF7530UL)) /*!< Address of VREFBUF trimming value for VRS=1, + VREF_SC1 in STM32WB datasheet */ +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/** @defgroup SYSTEM_LL_Exported_Constants SYSTEM Exported Constants + * @{ + */ + +/** @defgroup SYSTEM_LL_EC_REMAP SYSCFG REMAP + * @{ + */ +#define LL_SYSCFG_REMAP_FLASH 0x00000000U /*!< Main Flash memory mapped at 0x00000000 */ +#define LL_SYSCFG_REMAP_SYSTEMFLASH SYSCFG_MEMRMP_MEM_MODE_0 /*!< System Flash memory mapped at 0x00000000 */ +#define LL_SYSCFG_REMAP_SRAM (SYSCFG_MEMRMP_MEM_MODE_1 | SYSCFG_MEMRMP_MEM_MODE_0) /*!< SRAM1 mapped at 0x00000000 */ +#if defined(QUADSPI) +#define LL_SYSCFG_REMAP_QUADSPI (SYSCFG_MEMRMP_MEM_MODE_2 | SYSCFG_MEMRMP_MEM_MODE_1) /*!< QUADSPI memory mapped at 0x00000000 */ +#endif /* QUADSPI */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_I2C_FASTMODEPLUS SYSCFG I2C FASTMODEPLUS + * @{ + */ +#define LL_SYSCFG_I2C_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_PB6_FMP /*!< Enable Fast Mode Plus on PB6 */ +#define LL_SYSCFG_I2C_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_PB7_FMP /*!< Enable Fast Mode Plus on PB7 */ +#define LL_SYSCFG_I2C_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_PB8_FMP /*!< Enable Fast Mode Plus on PB8 */ +#define LL_SYSCFG_I2C_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_PB9_FMP /*!< Enable Fast Mode Plus on PB9 */ +#define LL_SYSCFG_I2C_FASTMODEPLUS_I2C1 SYSCFG_CFGR1_I2C1_FMP /*!< Enable Fast Mode Plus on I2C1 pins */ +#if defined(I2C3) +#define LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 SYSCFG_CFGR1_I2C3_FMP /*!< Enable Fast Mode Plus on I2C3 pins */ +#endif /* I2C3 */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_EXTI_PORT SYSCFG EXTI PORT + * @{ + */ +#define LL_SYSCFG_EXTI_PORTA 0U /*!< EXTI PORT A */ +#define LL_SYSCFG_EXTI_PORTB 1U /*!< EXTI PORT B */ +#define LL_SYSCFG_EXTI_PORTC 2U /*!< EXTI PORT C */ +#define LL_SYSCFG_EXTI_PORTD 3U /*!< EXTI PORT D */ +#define LL_SYSCFG_EXTI_PORTE 4U /*!< EXTI PORT E */ +#define LL_SYSCFG_EXTI_PORTH 7U /*!< EXTI PORT H */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_EXTI_LINE SYSCFG EXTI LINE + * @{ + */ +#define LL_SYSCFG_EXTI_LINE0 (uint32_t)((0x000FU << 16U) | 0U) /*!< EXTI_POSITION_0 | EXTICR[0] */ +#define LL_SYSCFG_EXTI_LINE1 (uint32_t)((0x00F0U << 16U) | 0U) /*!< EXTI_POSITION_4 | EXTICR[0] */ +#define LL_SYSCFG_EXTI_LINE2 (uint32_t)((0x0F00U << 16U) | 0U) /*!< EXTI_POSITION_8 | EXTICR[0] */ +#define LL_SYSCFG_EXTI_LINE3 (uint32_t)((0xF000U << 16U) | 0U) /*!< EXTI_POSITION_12 | EXTICR[0] */ +#define LL_SYSCFG_EXTI_LINE4 (uint32_t)((0x000FU << 16U) | 1U) /*!< EXTI_POSITION_0 | EXTICR[1] */ +#define LL_SYSCFG_EXTI_LINE5 (uint32_t)((0x00F0U << 16U) | 1U) /*!< EXTI_POSITION_4 | EXTICR[1] */ +#define LL_SYSCFG_EXTI_LINE6 (uint32_t)((0x0F00U << 16U) | 1U) /*!< EXTI_POSITION_8 | EXTICR[1] */ +#define LL_SYSCFG_EXTI_LINE7 (uint32_t)((0xF000U << 16U) | 1U) /*!< EXTI_POSITION_12 | EXTICR[1] */ +#define LL_SYSCFG_EXTI_LINE8 (uint32_t)((0x000FU << 16U) | 2U) /*!< EXTI_POSITION_0 | EXTICR[2] */ +#define LL_SYSCFG_EXTI_LINE9 (uint32_t)((0x00F0U << 16U) | 2U) /*!< EXTI_POSITION_4 | EXTICR[2] */ +#define LL_SYSCFG_EXTI_LINE10 (uint32_t)((0x0F00U << 16U) | 2U) /*!< EXTI_POSITION_8 | EXTICR[2] */ +#define LL_SYSCFG_EXTI_LINE11 (uint32_t)((0xF000U << 16U) | 2U) /*!< EXTI_POSITION_12 | EXTICR[2] */ +#define LL_SYSCFG_EXTI_LINE12 (uint32_t)((0x000FU << 16U) | 3U) /*!< EXTI_POSITION_0 | EXTICR[3] */ +#define LL_SYSCFG_EXTI_LINE13 (uint32_t)((0x00F0U << 16U) | 3U) /*!< EXTI_POSITION_4 | EXTICR[3] */ +#define LL_SYSCFG_EXTI_LINE14 (uint32_t)((0x0F00U << 16U) | 3U) /*!< EXTI_POSITION_8 | EXTICR[3] */ +#define LL_SYSCFG_EXTI_LINE15 (uint32_t)((0xF000U << 16U) | 3U) /*!< EXTI_POSITION_12 | EXTICR[3] */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_TIMBREAK SYSCFG TIMER BREAK + * @{ + */ +#define LL_SYSCFG_TIMBREAK_ECC SYSCFG_CFGR2_ECCL /*!< Enables and locks the ECC error signal + with Break Input of TIM1/16/17 */ +#define LL_SYSCFG_TIMBREAK_PVD SYSCFG_CFGR2_PVDL /*!< Enables and locks the PVD connection + with TIM1/16/17 Break Input + and also the PVDE + and PLS bits of the Power Control Interface */ +#define LL_SYSCFG_TIMBREAK_SRAM2_PARITY SYSCFG_CFGR2_SPL /*!< Enables and locks the SRAM2_PARITY error signal + with Break Input of TIM1/16/17 */ +#define LL_SYSCFG_TIMBREAK_LOCKUP SYSCFG_CFGR2_CLL /*!< Enables and locks the LOCKUP output of CortexM4 + with Break Input of TIM1/16/17 */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_SRAM2WRP SYSCFG SRAM2 WRITE PROTECTION + * @{ + */ +#define LL_SYSCFG_SRAM2WRP_PAGE0 SYSCFG_SWPR1_PAGE0 /*!< SRAM2A Write protection page 0 */ +#define LL_SYSCFG_SRAM2WRP_PAGE1 SYSCFG_SWPR1_PAGE1 /*!< SRAM2A Write protection page 1 */ +#define LL_SYSCFG_SRAM2WRP_PAGE2 SYSCFG_SWPR1_PAGE2 /*!< SRAM2A Write protection page 2 */ +#define LL_SYSCFG_SRAM2WRP_PAGE3 SYSCFG_SWPR1_PAGE3 /*!< SRAM2A Write protection page 3 */ +#define LL_SYSCFG_SRAM2WRP_PAGE4 SYSCFG_SWPR1_PAGE4 /*!< SRAM2A Write protection page 4 */ +#define LL_SYSCFG_SRAM2WRP_PAGE5 SYSCFG_SWPR1_PAGE5 /*!< SRAM2A Write protection page 5 */ +#define LL_SYSCFG_SRAM2WRP_PAGE6 SYSCFG_SWPR1_PAGE6 /*!< SRAM2A Write protection page 6 */ +#define LL_SYSCFG_SRAM2WRP_PAGE7 SYSCFG_SWPR1_PAGE7 /*!< SRAM2A Write protection page 7 */ +#define LL_SYSCFG_SRAM2WRP_PAGE8 SYSCFG_SWPR1_PAGE8 /*!< SRAM2A Write protection page 8 */ +#define LL_SYSCFG_SRAM2WRP_PAGE9 SYSCFG_SWPR1_PAGE9 /*!< SRAM2A Write protection page 9 */ +#define LL_SYSCFG_SRAM2WRP_PAGE10 SYSCFG_SWPR1_PAGE10 /*!< SRAM2A Write protection page 10 */ +#define LL_SYSCFG_SRAM2WRP_PAGE11 SYSCFG_SWPR1_PAGE11 /*!< SRAM2A Write protection page 11 */ +#define LL_SYSCFG_SRAM2WRP_PAGE12 SYSCFG_SWPR1_PAGE12 /*!< SRAM2A Write protection page 12 */ +#define LL_SYSCFG_SRAM2WRP_PAGE13 SYSCFG_SWPR1_PAGE13 /*!< SRAM2A Write protection page 13 */ +#define LL_SYSCFG_SRAM2WRP_PAGE14 SYSCFG_SWPR1_PAGE14 /*!< SRAM2A Write protection page 14 */ +#define LL_SYSCFG_SRAM2WRP_PAGE15 SYSCFG_SWPR1_PAGE15 /*!< SRAM2A Write protection page 15 */ +#define LL_SYSCFG_SRAM2WRP_PAGE16 SYSCFG_SWPR1_PAGE16 /*!< SRAM2A Write protection page 16 */ +#define LL_SYSCFG_SRAM2WRP_PAGE17 SYSCFG_SWPR1_PAGE17 /*!< SRAM2A Write protection page 17 */ +#define LL_SYSCFG_SRAM2WRP_PAGE18 SYSCFG_SWPR1_PAGE18 /*!< SRAM2A Write protection page 18 */ +#define LL_SYSCFG_SRAM2WRP_PAGE19 SYSCFG_SWPR1_PAGE19 /*!< SRAM2A Write protection page 19 */ +#define LL_SYSCFG_SRAM2WRP_PAGE20 SYSCFG_SWPR1_PAGE20 /*!< SRAM2A Write protection page 20 */ +#define LL_SYSCFG_SRAM2WRP_PAGE21 SYSCFG_SWPR1_PAGE21 /*!< SRAM2A Write protection page 21 */ +#define LL_SYSCFG_SRAM2WRP_PAGE22 SYSCFG_SWPR1_PAGE22 /*!< SRAM2A Write protection page 22 */ +#define LL_SYSCFG_SRAM2WRP_PAGE23 SYSCFG_SWPR1_PAGE23 /*!< SRAM2A Write protection page 23 */ +#define LL_SYSCFG_SRAM2WRP_PAGE24 SYSCFG_SWPR1_PAGE24 /*!< SRAM2A Write protection page 24 */ +#define LL_SYSCFG_SRAM2WRP_PAGE25 SYSCFG_SWPR1_PAGE25 /*!< SRAM2A Write protection page 25 */ +#define LL_SYSCFG_SRAM2WRP_PAGE26 SYSCFG_SWPR1_PAGE26 /*!< SRAM2A Write protection page 26 */ +#define LL_SYSCFG_SRAM2WRP_PAGE27 SYSCFG_SWPR1_PAGE27 /*!< SRAM2A Write protection page 27 */ +#define LL_SYSCFG_SRAM2WRP_PAGE28 SYSCFG_SWPR1_PAGE28 /*!< SRAM2A Write protection page 28 */ +#define LL_SYSCFG_SRAM2WRP_PAGE29 SYSCFG_SWPR1_PAGE29 /*!< SRAM2A Write protection page 29 */ +#define LL_SYSCFG_SRAM2WRP_PAGE30 SYSCFG_SWPR1_PAGE30 /*!< SRAM2A Write protection page 30 */ +#define LL_SYSCFG_SRAM2WRP_PAGE31 SYSCFG_SWPR1_PAGE31 /*!< SRAM2A Write protection page 31 */ + +#define LL_SYSCFG_SRAM2WRP_PAGE32 SYSCFG_SWPR2_PAGE32 /*!< SRAM2B Write protection page 32 */ +#define LL_SYSCFG_SRAM2WRP_PAGE33 SYSCFG_SWPR2_PAGE33 /*!< SRAM2B Write protection page 33 */ +#define LL_SYSCFG_SRAM2WRP_PAGE34 SYSCFG_SWPR2_PAGE34 /*!< SRAM2B Write protection page 34 */ +#define LL_SYSCFG_SRAM2WRP_PAGE35 SYSCFG_SWPR2_PAGE35 /*!< SRAM2B Write protection page 35 */ +#if defined(SYSCFG_SWPR2_PAGE36) +#define LL_SYSCFG_SRAM2WRP_PAGE36 SYSCFG_SWPR2_PAGE36 /*!< SRAM2B Write protection page 36 */ +#define LL_SYSCFG_SRAM2WRP_PAGE37 SYSCFG_SWPR2_PAGE37 /*!< SRAM2B Write protection page 37 */ +#define LL_SYSCFG_SRAM2WRP_PAGE38 SYSCFG_SWPR2_PAGE38 /*!< SRAM2B Write protection page 38 */ +#define LL_SYSCFG_SRAM2WRP_PAGE39 SYSCFG_SWPR2_PAGE39 /*!< SRAM2B Write protection page 39 */ +#define LL_SYSCFG_SRAM2WRP_PAGE40 SYSCFG_SWPR2_PAGE40 /*!< SRAM2B Write protection page 40 */ +#define LL_SYSCFG_SRAM2WRP_PAGE41 SYSCFG_SWPR2_PAGE41 /*!< SRAM2B Write protection page 41 */ +#define LL_SYSCFG_SRAM2WRP_PAGE42 SYSCFG_SWPR2_PAGE42 /*!< SRAM2B Write protection page 42 */ +#define LL_SYSCFG_SRAM2WRP_PAGE43 SYSCFG_SWPR2_PAGE43 /*!< SRAM2B Write protection page 43 */ +#define LL_SYSCFG_SRAM2WRP_PAGE44 SYSCFG_SWPR2_PAGE44 /*!< SRAM2B Write protection page 44 */ +#define LL_SYSCFG_SRAM2WRP_PAGE45 SYSCFG_SWPR2_PAGE45 /*!< SRAM2B Write protection page 45 */ +#define LL_SYSCFG_SRAM2WRP_PAGE46 SYSCFG_SWPR2_PAGE46 /*!< SRAM2B Write protection page 46 */ +#define LL_SYSCFG_SRAM2WRP_PAGE47 SYSCFG_SWPR2_PAGE47 /*!< SRAM2B Write protection page 47 */ +#define LL_SYSCFG_SRAM2WRP_PAGE48 SYSCFG_SWPR2_PAGE48 /*!< SRAM2B Write protection page 48 */ +#define LL_SYSCFG_SRAM2WRP_PAGE49 SYSCFG_SWPR2_PAGE49 /*!< SRAM2B Write protection page 49 */ +#define LL_SYSCFG_SRAM2WRP_PAGE50 SYSCFG_SWPR2_PAGE50 /*!< SRAM2B Write protection page 50 */ +#define LL_SYSCFG_SRAM2WRP_PAGE51 SYSCFG_SWPR2_PAGE51 /*!< SRAM2B Write protection page 51 */ +#define LL_SYSCFG_SRAM2WRP_PAGE52 SYSCFG_SWPR2_PAGE52 /*!< SRAM2B Write protection page 52 */ +#define LL_SYSCFG_SRAM2WRP_PAGE53 SYSCFG_SWPR2_PAGE53 /*!< SRAM2B Write protection page 53 */ +#define LL_SYSCFG_SRAM2WRP_PAGE54 SYSCFG_SWPR2_PAGE54 /*!< SRAM2B Write protection page 54 */ +#define LL_SYSCFG_SRAM2WRP_PAGE55 SYSCFG_SWPR2_PAGE55 /*!< SRAM2B Write protection page 55 */ +#define LL_SYSCFG_SRAM2WRP_PAGE56 SYSCFG_SWPR2_PAGE56 /*!< SRAM2B Write protection page 56 */ +#define LL_SYSCFG_SRAM2WRP_PAGE57 SYSCFG_SWPR2_PAGE57 /*!< SRAM2B Write protection page 57 */ +#define LL_SYSCFG_SRAM2WRP_PAGE58 SYSCFG_SWPR2_PAGE58 /*!< SRAM2B Write protection page 58 */ +#define LL_SYSCFG_SRAM2WRP_PAGE59 SYSCFG_SWPR2_PAGE59 /*!< SRAM2B Write protection page 59 */ +#define LL_SYSCFG_SRAM2WRP_PAGE60 SYSCFG_SWPR2_PAGE60 /*!< SRAM2B Write protection page 60 */ +#define LL_SYSCFG_SRAM2WRP_PAGE61 SYSCFG_SWPR2_PAGE61 /*!< SRAM2B Write protection page 61 */ +#define LL_SYSCFG_SRAM2WRP_PAGE62 SYSCFG_SWPR2_PAGE62 /*!< SRAM2B Write protection page 62 */ +#define LL_SYSCFG_SRAM2WRP_PAGE63 SYSCFG_SWPR2_PAGE63 /*!< SRAM2B Write protection page 63 */ +#endif /* SYSCFG_SWPR2_PAGE36 */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_IM SYSCFG CPU1 INTERRUPT MASK + * @{ + */ +#define LL_SYSCFG_GRP1_TIM1 SYSCFG_IMR1_TIM1IM /*!< Enabling of interrupt from Timer 1 to CPU1 */ +#if defined(TIM16) +#define LL_SYSCFG_GRP1_TIM16 SYSCFG_IMR1_TIM16IM /*!< Enabling of interrupt from Timer 16 to CPU1 */ +#endif /* TIM16 */ +#if defined(TIM17) +#define LL_SYSCFG_GRP1_TIM17 SYSCFG_IMR1_TIM17IM /*!< Enabling of interrupt from Timer 17 to CPU1 */ +#endif /* TIM17 */ + +#define LL_SYSCFG_GRP1_EXTI5 SYSCFG_IMR1_EXTI5IM /*!< Enabling of interrupt from External Interrupt Line 5 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI6 SYSCFG_IMR1_EXTI6IM /*!< Enabling of interrupt from External Interrupt Line 6 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI7 SYSCFG_IMR1_EXTI7IM /*!< Enabling of interrupt from External Interrupt Line 7 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI8 SYSCFG_IMR1_EXTI8IM /*!< Enabling of interrupt from External Interrupt Line 8 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI9 SYSCFG_IMR1_EXTI9IM /*!< Enabling of interrupt from External Interrupt Line 9 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI10 SYSCFG_IMR1_EXTI10IM /*!< Enabling of interrupt from External Interrupt Line 10 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI11 SYSCFG_IMR1_EXTI11IM /*!< Enabling of interrupt from External Interrupt Line 11 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI12 SYSCFG_IMR1_EXTI12IM /*!< Enabling of interrupt from External Interrupt Line 12 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI13 SYSCFG_IMR1_EXTI13IM /*!< Enabling of interrupt from External Interrupt Line 13 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI14 SYSCFG_IMR1_EXTI14IM /*!< Enabling of interrupt from External Interrupt Line 14 to CPU1 */ +#define LL_SYSCFG_GRP1_EXTI15 SYSCFG_IMR1_EXTI15IM /*!< Enabling of interrupt from External Interrupt Line 15 to CPU1 */ + +#if defined(SYSCFG_IMR2_PVM1IM) +#define LL_SYSCFG_GRP2_PVM1 SYSCFG_IMR2_PVM1IM /*!< Enabling of interrupt from Power Voltage Monitoring 1 to CPU1 */ +#endif /* SYSCFG_IMR2_PVM1IM */ +#define LL_SYSCFG_GRP2_PVM3 SYSCFG_IMR2_PVM3IM /*!< Enabling of interrupt from Power Voltage Monitoring 3 to CPU1 */ +#define LL_SYSCFG_GRP2_PVD SYSCFG_IMR2_PVDIM /*!< Enabling of interrupt from Power Voltage Detector to CPU1 */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_C2_IM SYSCFG CPU2 INTERRUPT MASK + * @{ + */ +#define LL_C2_SYSCFG_GRP1_RTCSTAMP_RTCTAMP_LSECSS SYSCFG_C2IMR1_RTCSTAMPTAMPLSECSSIM /*!< Enabling of interrupt from RTC TimeStamp, RTC Tampers + and LSE Clock Security System to CPU2 */ +#define LL_C2_SYSCFG_GRP1_RTCWKUP SYSCFG_C2IMR1_RTCWKUPIM /*!< Enabling of interrupt from RTC Wakeup to CPU2 */ +#define LL_C2_SYSCFG_GRP1_RTCALARM SYSCFG_C2IMR1_RTCALARMIM /*!< Enabling of interrupt from RTC Alarms to CPU2 */ +#define LL_C2_SYSCFG_GRP1_RCC SYSCFG_C2IMR1_RCCIM /*!< Enabling of interrupt from RCC to CPU2 */ +#define LL_C2_SYSCFG_GRP1_FLASH SYSCFG_C2IMR1_FLASHIM /*!< Enabling of interrupt from FLASH to CPU2 */ +#define LL_C2_SYSCFG_GRP1_PKA SYSCFG_C2IMR1_PKAIM /*!< Enabling of interrupt from Public Key Accelerator to CPU2 */ +#define LL_C2_SYSCFG_GRP1_RNG SYSCFG_C2IMR1_RNGIM /*!< Enabling of interrupt from Random Number Generator to CPU2 */ +#if defined(AES1) +#define LL_C2_SYSCFG_GRP1_AES1 SYSCFG_C2IMR1_AES1IM /*!< Enabling of interrupt from Advanced Encryption Standard 1 to CPU2 */ +#endif /* AES1 */ +#if defined(COMP1) +#define LL_C2_SYSCFG_GRP1_COMP SYSCFG_C2IMR1_COMPIM /*!< Enabling of interrupt from Comparator to CPU2 */ +#endif /* COMP1 */ +#define LL_C2_SYSCFG_GRP1_ADC SYSCFG_C2IMR1_ADCIM /*!< Enabling of interrupt from Analog Digital Converter to CPU2 */ + +#define LL_C2_SYSCFG_GRP1_EXTI0 SYSCFG_C2IMR1_EXTI0IM /*!< Enabling of interrupt from External Interrupt Line 0 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI1 SYSCFG_C2IMR1_EXTI1IM /*!< Enabling of interrupt from External Interrupt Line 1 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI2 SYSCFG_C2IMR1_EXTI2IM /*!< Enabling of interrupt from External Interrupt Line 2 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI3 SYSCFG_C2IMR1_EXTI3IM /*!< Enabling of interrupt from External Interrupt Line 3 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI4 SYSCFG_C2IMR1_EXTI4IM /*!< Enabling of interrupt from External Interrupt Line 4 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI5 SYSCFG_C2IMR1_EXTI5IM /*!< Enabling of interrupt from External Interrupt Line 5 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI6 SYSCFG_C2IMR1_EXTI6IM /*!< Enabling of interrupt from External Interrupt Line 6 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI7 SYSCFG_C2IMR1_EXTI7IM /*!< Enabling of interrupt from External Interrupt Line 7 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI8 SYSCFG_C2IMR1_EXTI8IM /*!< Enabling of interrupt from External Interrupt Line 8 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI9 SYSCFG_C2IMR1_EXTI9IM /*!< Enabling of interrupt from External Interrupt Line 9 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI10 SYSCFG_C2IMR1_EXTI10IM /*!< Enabling of interrupt from External Interrupt Line 10 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI11 SYSCFG_C2IMR1_EXTI11IM /*!< Enabling of interrupt from External Interrupt Line 11 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI12 SYSCFG_C2IMR1_EXTI12IM /*!< Enabling of interrupt from External Interrupt Line 12 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI13 SYSCFG_C2IMR1_EXTI13IM /*!< Enabling of interrupt from External Interrupt Line 13 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI14 SYSCFG_C2IMR1_EXTI14IM /*!< Enabling of interrupt from External Interrupt Line 14 to CPU2 */ +#define LL_C2_SYSCFG_GRP1_EXTI15 SYSCFG_C2IMR1_EXTI15IM /*!< Enabling of interrupt from External Interrupt Line 15 to CPU2 */ + +#define LL_C2_SYSCFG_GRP2_DMA1CH1 SYSCFG_C2IMR2_DMA1CH1IM /*!< Enabling of interrupt from DMA1 Channel 1 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA1CH2 SYSCFG_C2IMR2_DMA1CH2IM /*!< Enabling of interrupt from DMA1 Channel 2 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA1CH3 SYSCFG_C2IMR2_DMA1CH3IM /*!< Enabling of interrupt from DMA1 Channel 3 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA1CH4 SYSCFG_C2IMR2_DMA1CH4IM /*!< Enabling of interrupt from DMA1 Channel 4 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA1CH5 SYSCFG_C2IMR2_DMA1CH5IM /*!< Enabling of interrupt from DMA1 Channel 5 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA1CH6 SYSCFG_C2IMR2_DMA1CH6IM /*!< Enabling of interrupt from DMA1 Channel 6 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA1CH7 SYSCFG_C2IMR2_DMA1CH7IM /*!< Enabling of interrupt from DMA1 Channel 7 to CPU2 */ + +#if defined(DMA2) +#define LL_C2_SYSCFG_GRP2_DMA2CH1 SYSCFG_C2IMR2_DMA2CH1IM /*!< Enabling of interrupt from DMA2 Channel 1 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA2CH2 SYSCFG_C2IMR2_DMA2CH2IM /*!< Enabling of interrupt from DMA2 Channel 2 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA2CH3 SYSCFG_C2IMR2_DMA2CH3IM /*!< Enabling of interrupt from DMA2 Channel 3 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA2CH4 SYSCFG_C2IMR2_DMA2CH4IM /*!< Enabling of interrupt from DMA2 Channel 4 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA2CH5 SYSCFG_C2IMR2_DMA2CH5IM /*!< Enabling of interrupt from DMA2 Channel 5 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA2CH6 SYSCFG_C2IMR2_DMA2CH6IM /*!< Enabling of interrupt from DMA2 Channel 6 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_DMA2CH7 SYSCFG_C2IMR2_DMA2CH7IM /*!< Enabling of interrupt from DMA2 Channel 7 to CPU2 */ +#endif /* DMA2 */ + +#define LL_C2_SYSCFG_GRP2_DMAMUX1 SYSCFG_C2IMR2_DMAMUX1IM /*!< Enabling of interrupt from DMAMUX1 to CPU2 */ +#if defined(SYSCFG_C2IMR2_PVM1IM) +#define LL_C2_SYSCFG_GRP2_PVM1 SYSCFG_C2IMR2_PVM1IM /*!< Enabling of interrupt from Power Voltage Monitoring 1 to CPU2 */ +#endif /* SYSCFG_C2IMR2_PVM1IM */ +#define LL_C2_SYSCFG_GRP2_PVM3 SYSCFG_C2IMR2_PVM3IM /*!< Enabling of interrupt from Power Voltage Monitoring 3 to CPU2 */ +#define LL_C2_SYSCFG_GRP2_PVD SYSCFG_C2IMR2_PVDIM /*!< Enabling of interrupt from Power Voltage Detector to CPU2 */ +#define LL_C2_SYSCFG_GRP2_TSC SYSCFG_C2IMR2_TSCIM /*!< Enabling of interrupt from Touch Sensing Controller to CPU2 */ +#if defined(LCD) +#define LL_C2_SYSCFG_GRP2_LCD SYSCFG_C2IMR2_LCDIM /*!< Enabling of interrupt from Liquid Crystal Display to CPU2 */ +#endif /* LCD */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_SECURE_IP_ACCESS SYSCFG SECURE IP ACCESS + * @{ + */ +#if defined(AES1) +#define LL_SYSCFG_SECURE_ACCESS_AES1 SYSCFG_SIPCR_SAES1 /*!< Enabling the security access of Advanced Encryption Standard 1 KEY[7:0] */ +#endif /* AES1 */ +#define LL_SYSCFG_SECURE_ACCESS_AES2 SYSCFG_SIPCR_SAES2 /*!< Enabling the security access of Advanced Encryption Standard 2 */ +#define LL_SYSCFG_SECURE_ACCESS_PKA SYSCFG_SIPCR_SPKA /*!< Enabling the security access of Public Key Accelerator */ +#define LL_SYSCFG_SECURE_ACCESS_RNG SYSCFG_SIPCR_SRNG /*!< Enabling the security access of Random Number Generator */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_APB1_GRP1_STOP_IP DBGMCU CPU1 APB1 GRP1 STOP IP + * @{ + */ +#define LL_DBGMCU_APB1_GRP1_TIM2_STOP DBGMCU_APB1FZR1_DBG_TIM2_STOP /*!< The counter clock of TIM2 is stopped when the core is halted */ +#define LL_DBGMCU_APB1_GRP1_RTC_STOP DBGMCU_APB1FZR1_DBG_RTC_STOP /*!< The clock of the RTC counter is stopped when the core is halted */ +#define LL_DBGMCU_APB1_GRP1_WWDG_STOP DBGMCU_APB1FZR1_DBG_WWDG_STOP /*!< The window watchdog counter clock is stopped when the core is halted */ +#define LL_DBGMCU_APB1_GRP1_IWDG_STOP DBGMCU_APB1FZR1_DBG_IWDG_STOP /*!< The independent watchdog counter clock is stopped when the core is halted */ +#define LL_DBGMCU_APB1_GRP1_I2C1_STOP DBGMCU_APB1FZR1_DBG_I2C1_STOP /*!< The I2C1 SMBus timeout is frozen */ +#if defined(I2C3) +#define LL_DBGMCU_APB1_GRP1_I2C3_STOP DBGMCU_APB1FZR1_DBG_I2C3_STOP /*!< The I2C3 SMBus timeout is frozen */ +#endif /* I2C3 */ +#define LL_DBGMCU_APB1_GRP1_LPTIM1_STOP DBGMCU_APB1FZR1_DBG_LPTIM1_STOP /*!< The counter clock of LPTIM1 is stopped when the core is halted */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_C2_APB1_GRP1_STOP_IP DBGMCU CPU2 APB1 GRP1 STOP IP + * @{ + */ +#define LL_C2_DBGMCU_APB1_GRP1_TIM2_STOP DBGMCU_C2APB1FZR1_DBG_TIM2_STOP /*!< The counter clock of TIM2 is stopped when the core is halted */ +#define LL_C2_DBGMCU_APB1_GRP1_RTC_STOP DBGMCU_C2APB1FZR1_DBG_RTC_STOP /*!< The clock of the RTC counter is stopped when the core is halted */ +#define LL_C2_DBGMCU_APB1_GRP1_IWDG_STOP DBGMCU_C2APB1FZR1_DBG_IWDG_STOP /*!< The independent watchdog counter clock is stopped when the core is halted */ +#define LL_C2_DBGMCU_APB1_GRP1_I2C1_STOP DBGMCU_C2APB1FZR1_DBG_I2C1_STOP /*!< The I2C1 SMBus timeout is frozen */ +#if defined(I2C3) +#define LL_C2_DBGMCU_APB1_GRP1_I2C3_STOP DBGMCU_C2APB1FZR1_DBG_I2C3_STOP /*!< The I2C3 SMBus timeout is frozen */ +#endif /* I2C3 */ +#define LL_C2_DBGMCU_APB1_GRP1_LPTIM1_STOP DBGMCU_C2APB1FZR1_DBG_LPTIM1_STOP /*!< The counter clock of LPTIM1 is stopped when the core is halted */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_APB1_GRP2_STOP_IP DBGMCU CPU1 APB1 GRP2 STOP IP + * @{ + */ +#define LL_DBGMCU_APB1_GRP2_LPTIM2_STOP DBGMCU_APB1FZR2_DBG_LPTIM2_STOP /*!< The counter clock of LPTIM2 is stopped when the core is halted */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_C2_APB1_GRP2_STOP_IP DBGMCU CPU2 APB1 GRP2 STOP IP + * @{ + */ +#define LL_C2_DBGMCU_APB1_GRP2_LPTIM2_STOP DBGMCU_C2APB1FZR2_DBG_LPTIM2_STOP /*!< The counter clock of LPTIM2 is stopped when the core is halted */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_APB2_GRP1_STOP_IP DBGMCU CPU1 APB2 GRP1 STOP IP + * @{ + */ +#define LL_DBGMCU_APB2_GRP1_TIM1_STOP DBGMCU_APB2FZR_DBG_TIM1_STOP /*!< The counter clock of TIM1 is stopped when the core is halted */ +#if defined(TIM16) +#define LL_DBGMCU_APB2_GRP1_TIM16_STOP DBGMCU_APB2FZR_DBG_TIM16_STOP /*!< The counter clock of TIM16 is stopped when the core is halted */ +#endif /* TIM16 */ +#if defined(TIM17) +#define LL_DBGMCU_APB2_GRP1_TIM17_STOP DBGMCU_APB2FZR_DBG_TIM17_STOP /*!< The counter clock of TIM17 is stopped when the core is halted */ +#endif /* TIM17 */ +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EC_C2_APB2_GRP1_STOP_IP DBGMCU CPU2 APB2 GRP1 STOP IP + * @{ + */ +#define LL_C2_DBGMCU_APB2_GRP1_TIM1_STOP DBGMCU_C2APB2FZR_DBG_TIM1_STOP /*!< The counter clock of TIM1 is stopped when the core is halted */ +#if defined(TIM16) +#define LL_C2_DBGMCU_APB2_GRP1_TIM16_STOP DBGMCU_C2APB2FZR_DBG_TIM16_STOP /*!< The counter clock of TIM16 is stopped when the core is halted */ +#endif /* TIM16 */ +#if defined(TIM17) +#define LL_C2_DBGMCU_APB2_GRP1_TIM17_STOP DBGMCU_C2APB2FZR_DBG_TIM17_STOP /*!< The counter clock of TIM17 is stopped when the core is halted */ +#endif /* TIM17 */ +/** + * @} + */ + +#if defined(VREFBUF) +/** @defgroup SYSTEM_LL_EC_VOLTAGE VREFBUF VOLTAGE + * @{ + */ +#define LL_VREFBUF_VOLTAGE_SCALE0 0x00000000U /*!< Voltage reference scale 0 (VREF_OUT1) */ +#define LL_VREFBUF_VOLTAGE_SCALE1 VREFBUF_CSR_VRS /*!< Voltage reference scale 1 (VREF_OUT2) */ +/** + * @} + */ +#endif /* VREFBUF */ + +/** @defgroup SYSTEM_LL_EC_LATENCY FLASH LATENCY + * @{ + */ +#define LL_FLASH_LATENCY_0 FLASH_ACR_LATENCY_0WS /*!< FLASH Zero wait state */ +#define LL_FLASH_LATENCY_1 FLASH_ACR_LATENCY_1WS /*!< FLASH One wait state */ +#define LL_FLASH_LATENCY_2 FLASH_ACR_LATENCY_2WS /*!< FLASH Two wait states */ +#define LL_FLASH_LATENCY_3 FLASH_ACR_LATENCY_3WS /*!< FLASH Three wait states */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup SYSTEM_LL_Exported_Functions SYSTEM Exported Functions + * @{ + */ + +/** @defgroup SYSTEM_LL_EF_SYSCFG SYSCFG + * @{ + */ + +/** + * @brief Set memory mapping at address 0x00000000 + * @rmtoll SYSCFG_MEMRMP MEM_MODE LL_SYSCFG_SetRemapMemory + * @param Memory This parameter can be one of the following values: + * @arg @ref LL_SYSCFG_REMAP_FLASH + * @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH + * @arg @ref LL_SYSCFG_REMAP_SRAM + * @arg @ref LL_SYSCFG_REMAP_QUADSPI + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_SetRemapMemory(uint32_t Memory) +{ + MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, Memory); +} + +/** + * @brief Get memory mapping at address 0x00000000 + * @rmtoll SYSCFG_MEMRMP MEM_MODE LL_SYSCFG_GetRemapMemory + * @retval Returned value can be one of the following values: + * @arg @ref LL_SYSCFG_REMAP_FLASH + * @arg @ref LL_SYSCFG_REMAP_SYSTEMFLASH + * @arg @ref LL_SYSCFG_REMAP_SRAM + * @arg @ref LL_SYSCFG_REMAP_QUADSPI + */ +__STATIC_INLINE uint32_t LL_SYSCFG_GetRemapMemory(void) +{ + return (uint32_t)(READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE)); +} + +/** + * @brief Enable I/O analog switch voltage booster. + * @note When voltage booster is enabled, I/O analog switches are supplied + * by a dedicated voltage booster, from VDD power domain. This is + * the recommended configuration with low VDDA voltage operation. + * @note The I/O analog switch voltage booster is relevant for peripherals + * using I/O in analog input: ADC and COMP. + * However, COMP inputs have a high impedance and + * voltage booster do not impact performance significantly. + * Therefore, the voltage booster is mainly intended for + * usage with ADC. + * @rmtoll SYSCFG_CFGR1 BOOSTEN LL_SYSCFG_EnableAnalogBooster + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableAnalogBooster(void) +{ + SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOSTEN); +} + +/** + * @brief Disable I/O analog switch voltage booster. + * @note When voltage booster is enabled, I/O analog switches are supplied + * by a dedicated voltage booster, from VDD power domain. This is + * the recommended configuration with low VDDA voltage operation. + * @note The I/O analog switch voltage booster is relevant for peripherals + * using I/O in analog input: ADC and COMP. + * However, COMP inputs have a high impedance and + * voltage booster do not impact performance significantly. + * Therefore, the voltage booster is mainly intended for + * usage with ADC. + * @rmtoll SYSCFG_CFGR1 BOOSTEN LL_SYSCFG_DisableAnalogBooster + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableAnalogBooster(void) +{ + CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOSTEN); +} + +#if defined(SYSCFG_CFGR1_ANASWVDD) +/** + * @brief Enable the Analog GPIO switch to control voltage selection + * when the supply voltage is supplied by VDDA + * @rmtoll SYSCFG_CFGR1 ANASWVDD LL_SYSCFG_EnableAnalogGpioSwitch + * @note Activating the gpio switch enable IOs analog switches supplied by VDDA + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableAnalogGpioSwitch(void) +{ + SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_ANASWVDD); +} + +/** + * @brief Disable the Analog GPIO switch to control voltage selection + * when the supply voltage is supplied by VDDA + * @rmtoll SYSCFG_CFGR1 ANASWVDD LL_SYSCFG_DisableAnalogGpioSwitch + * @note Activating the gpio switch enable IOs analog switches supplied by VDDA + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableAnalogGpioSwitch(void) +{ + CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_ANASWVDD); +} +#endif /* SYSCFG_CFGR1_ANASWVDD */ + +/** + * @brief Enable the I2C fast mode plus driving capability. + * @rmtoll SYSCFG_CFGR1 I2C_PBx_FMP LL_SYSCFG_EnableFastModePlus\n + * SYSCFG_CFGR1 I2Cx_FMP LL_SYSCFG_EnableFastModePlus + * @param ConfigFastModePlus This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB6 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB7 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB8 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB9 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C1 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableFastModePlus(uint32_t ConfigFastModePlus) +{ + SET_BIT(SYSCFG->CFGR1, ConfigFastModePlus); +} + +/** + * @brief Disable the I2C fast mode plus driving capability. + * @rmtoll SYSCFG_CFGR1 I2C_PBx_FMP LL_SYSCFG_DisableFastModePlus\n + * SYSCFG_CFGR1 I2Cx_FMP LL_SYSCFG_DisableFastModePlus + * @param ConfigFastModePlus This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB6 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB7 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB8 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_PB9 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C1 + * @arg @ref LL_SYSCFG_I2C_FASTMODEPLUS_I2C3 + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableFastModePlus(uint32_t ConfigFastModePlus) +{ + CLEAR_BIT(SYSCFG->CFGR1, ConfigFastModePlus); +} + +/** + * @brief Enable Floating Point Unit Invalid operation Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_0 LL_SYSCFG_EnableIT_FPU_IOC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_IOC(void) +{ + SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_0); +} + +/** + * @brief Enable Floating Point Unit Divide-by-zero Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_1 LL_SYSCFG_EnableIT_FPU_DZC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_DZC(void) +{ + SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_1); +} + +/** + * @brief Enable Floating Point Unit Underflow Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_2 LL_SYSCFG_EnableIT_FPU_UFC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_UFC(void) +{ + SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_2); +} + +/** + * @brief Enable Floating Point Unit Overflow Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_3 LL_SYSCFG_EnableIT_FPU_OFC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_OFC(void) +{ + SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_3); +} + +/** + * @brief Enable Floating Point Unit Input denormal Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_4 LL_SYSCFG_EnableIT_FPU_IDC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_IDC(void) +{ + SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_4); +} + +/** + * @brief Enable Floating Point Unit Inexact Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_5 LL_SYSCFG_EnableIT_FPU_IXC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableIT_FPU_IXC(void) +{ + SET_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_5); +} + +/** + * @brief Disable Floating Point Unit Invalid operation Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_0 LL_SYSCFG_DisableIT_FPU_IOC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_IOC(void) +{ + CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_0); +} + +/** + * @brief Disable Floating Point Unit Divide-by-zero Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_1 LL_SYSCFG_DisableIT_FPU_DZC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_DZC(void) +{ + CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_1); +} + +/** + * @brief Disable Floating Point Unit Underflow Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_2 LL_SYSCFG_DisableIT_FPU_UFC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_UFC(void) +{ + CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_2); +} + +/** + * @brief Disable Floating Point Unit Overflow Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_3 LL_SYSCFG_DisableIT_FPU_OFC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_OFC(void) +{ + CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_3); +} + +/** + * @brief Disable Floating Point Unit Input denormal Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_4 LL_SYSCFG_DisableIT_FPU_IDC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_IDC(void) +{ + CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_4); +} + +/** + * @brief Disable Floating Point Unit Inexact Interrupt + * @rmtoll SYSCFG_CFGR1 FPU_IE_5 LL_SYSCFG_DisableIT_FPU_IXC + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableIT_FPU_IXC(void) +{ + CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_5); +} + +/** + * @brief Check if Floating Point Unit Invalid operation Interrupt source is enabled or disabled. + * @rmtoll SYSCFG_CFGR1 FPU_IE_0 LL_SYSCFG_IsEnabledIT_FPU_IOC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_IOC(void) +{ + return ((READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_0) == (SYSCFG_CFGR1_FPU_IE_0)) ? 1UL : 0UL); +} + +/** + * @brief Check if Floating Point Unit Divide-by-zero Interrupt source is enabled or disabled. + * @rmtoll SYSCFG_CFGR1 FPU_IE_1 LL_SYSCFG_IsEnabledIT_FPU_DZC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_DZC(void) +{ + return ((READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_1) == (SYSCFG_CFGR1_FPU_IE_1)) ? 1UL : 0UL); +} + +/** + * @brief Check if Floating Point Unit Underflow Interrupt source is enabled or disabled. + * @rmtoll SYSCFG_CFGR1 FPU_IE_2 LL_SYSCFG_IsEnabledIT_FPU_UFC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_UFC(void) +{ + return ((READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_2) == (SYSCFG_CFGR1_FPU_IE_2)) ? 1UL : 0UL); +} + +/** + * @brief Check if Floating Point Unit Overflow Interrupt source is enabled or disabled. + * @rmtoll SYSCFG_CFGR1 FPU_IE_3 LL_SYSCFG_IsEnabledIT_FPU_OFC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_OFC(void) +{ + return ((READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_3) == (SYSCFG_CFGR1_FPU_IE_3)) ? 1UL : 0UL); +} + +/** + * @brief Check if Floating Point Unit Input denormal Interrupt source is enabled or disabled. + * @rmtoll SYSCFG_CFGR1 FPU_IE_4 LL_SYSCFG_IsEnabledIT_FPU_IDC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_IDC(void) +{ + return ((READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_4) == (SYSCFG_CFGR1_FPU_IE_4)) ? 1UL : 0UL); +} + +/** + * @brief Check if Floating Point Unit Inexact Interrupt source is enabled or disabled. + * @rmtoll SYSCFG_CFGR1 FPU_IE_5 LL_SYSCFG_IsEnabledIT_FPU_IXC + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledIT_FPU_IXC(void) +{ + return ((READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_FPU_IE_5) == (SYSCFG_CFGR1_FPU_IE_5)) ? 1UL : 0UL); +} + + +/** + * @brief Configure source input for the EXTI external interrupt. + * @rmtoll SYSCFG_EXTICR1 EXTIx LL_SYSCFG_SetEXTISource\n + * SYSCFG_EXTICR2 EXTIx LL_SYSCFG_SetEXTISource\n + * SYSCFG_EXTICR3 EXTIx LL_SYSCFG_SetEXTISource\n + * SYSCFG_EXTICR4 EXTIx LL_SYSCFG_SetEXTISource + * @param Port This parameter can be one of the following values: + * @arg @ref LL_SYSCFG_EXTI_PORTA + * @arg @ref LL_SYSCFG_EXTI_PORTB + * @arg @ref LL_SYSCFG_EXTI_PORTC + * @arg @ref LL_SYSCFG_EXTI_PORTD + * @arg @ref LL_SYSCFG_EXTI_PORTE + * @arg @ref LL_SYSCFG_EXTI_PORTH + * + * @param Line This parameter can be one of the following values: + * @arg @ref LL_SYSCFG_EXTI_LINE0 + * @arg @ref LL_SYSCFG_EXTI_LINE1 + * @arg @ref LL_SYSCFG_EXTI_LINE2 + * @arg @ref LL_SYSCFG_EXTI_LINE3 + * @arg @ref LL_SYSCFG_EXTI_LINE4 + * @arg @ref LL_SYSCFG_EXTI_LINE5 + * @arg @ref LL_SYSCFG_EXTI_LINE6 + * @arg @ref LL_SYSCFG_EXTI_LINE7 + * @arg @ref LL_SYSCFG_EXTI_LINE8 + * @arg @ref LL_SYSCFG_EXTI_LINE9 + * @arg @ref LL_SYSCFG_EXTI_LINE10 + * @arg @ref LL_SYSCFG_EXTI_LINE11 + * @arg @ref LL_SYSCFG_EXTI_LINE12 + * @arg @ref LL_SYSCFG_EXTI_LINE13 + * @arg @ref LL_SYSCFG_EXTI_LINE14 + * @arg @ref LL_SYSCFG_EXTI_LINE15 + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_SetEXTISource(uint32_t Port, uint32_t Line) +{ + MODIFY_REG(SYSCFG->EXTICR[Line & 0x03U], (Line >> 16U), (Port << ((POSITION_VAL((Line >> 16U))) & 0x0000000FUL))); +} + +/** + * @brief Get the configured defined for specific EXTI Line + * @rmtoll SYSCFG_EXTICR1 EXTIx LL_SYSCFG_GetEXTISource\n + * SYSCFG_EXTICR2 EXTIx LL_SYSCFG_GetEXTISource\n + * SYSCFG_EXTICR3 EXTIx LL_SYSCFG_GetEXTISource\n + * SYSCFG_EXTICR4 EXTIx LL_SYSCFG_GetEXTISource + * @param Line This parameter can be one of the following values: + * @arg @ref LL_SYSCFG_EXTI_LINE0 + * @arg @ref LL_SYSCFG_EXTI_LINE1 + * @arg @ref LL_SYSCFG_EXTI_LINE2 + * @arg @ref LL_SYSCFG_EXTI_LINE3 + * @arg @ref LL_SYSCFG_EXTI_LINE4 + * @arg @ref LL_SYSCFG_EXTI_LINE5 + * @arg @ref LL_SYSCFG_EXTI_LINE6 + * @arg @ref LL_SYSCFG_EXTI_LINE7 + * @arg @ref LL_SYSCFG_EXTI_LINE8 + * @arg @ref LL_SYSCFG_EXTI_LINE9 + * @arg @ref LL_SYSCFG_EXTI_LINE10 + * @arg @ref LL_SYSCFG_EXTI_LINE11 + * @arg @ref LL_SYSCFG_EXTI_LINE12 + * @arg @ref LL_SYSCFG_EXTI_LINE13 + * @arg @ref LL_SYSCFG_EXTI_LINE14 + * @arg @ref LL_SYSCFG_EXTI_LINE15 + * @retval Returned value can be one of the following values: + * @arg @ref LL_SYSCFG_EXTI_PORTA + * @arg @ref LL_SYSCFG_EXTI_PORTB + * @arg @ref LL_SYSCFG_EXTI_PORTC + * @arg @ref LL_SYSCFG_EXTI_PORTD + * @arg @ref LL_SYSCFG_EXTI_PORTE + * @arg @ref LL_SYSCFG_EXTI_PORTH + */ +__STATIC_INLINE uint32_t LL_SYSCFG_GetEXTISource(uint32_t Line) +{ + return (uint32_t)(READ_BIT(SYSCFG->EXTICR[Line & 0x03U], (Line >> 16U)) >> (POSITION_VAL(Line >> 16U) & 0x0000000FUL)); +} + +/** + * @brief Enable SRAM2 Erase (starts a hardware SRAM2 erase operation. This bit is + * automatically cleared at the end of the SRAM2 erase operation.) + * @note This bit is write-protected: setting this bit is possible only after the + * correct key sequence is written in the SYSCFG_SKR register. + * @rmtoll SYSCFG_SCSR SRAM2ER LL_SYSCFG_EnableSRAM2Erase + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableSRAM2Erase(void) +{ + SET_BIT(SYSCFG->SCSR, SYSCFG_SCSR_SRAM2ER); +} + +/** + * @brief Check if SRAM2 erase operation is on going + * @rmtoll SYSCFG_SCSR SRAM2BSY LL_SYSCFG_IsSRAM2EraseOngoing + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsSRAM2EraseOngoing(void) +{ + return ((READ_BIT(SYSCFG->SCSR, SYSCFG_SCSR_SRAM2BSY) == (SYSCFG_SCSR_SRAM2BSY)) ? 1UL : 0UL); +} + +/** + * @brief Disable CPU2 SRAM fetch (execution) (This bit can be set by Firmware + * and will only be reset by a Hardware reset, including a reset after Standby.) + * @note Firmware writing 0 has no effect. + * @rmtoll SYSCFG_SCSR C2RFD LL_SYSCFG_DisableSRAMFetch + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableSRAMFetch(void) +{ + SET_BIT(SYSCFG->SCSR, SYSCFG_SCSR_C2RFD); +} + +/** + * @brief Check if CPU2 SRAM fetch is enabled + * @rmtoll SYSCFG_SCSR C2RFD LL_SYSCFG_IsEnabledSRAMFetch + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledSRAMFetch(void) +{ + return ((READ_BIT(SYSCFG->SCSR, SYSCFG_SCSR_C2RFD) != (SYSCFG_SCSR_C2RFD)) ? 1UL : 0UL); +} + +/** + * @brief Set connections to TIM1/16/17 Break inputs + * @rmtoll SYSCFG_CFGR2 CLL LL_SYSCFG_SetTIMBreakInputs\n + * SYSCFG_CFGR2 SPL LL_SYSCFG_SetTIMBreakInputs\n + * SYSCFG_CFGR2 PVDL LL_SYSCFG_SetTIMBreakInputs\n + * SYSCFG_CFGR2 ECCL LL_SYSCFG_SetTIMBreakInputs + * @param Break This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_TIMBREAK_ECC + * @arg @ref LL_SYSCFG_TIMBREAK_PVD + * @arg @ref LL_SYSCFG_TIMBREAK_SRAM2_PARITY + * @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_SetTIMBreakInputs(uint32_t Break) +{ + MODIFY_REG(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL | SYSCFG_CFGR2_SPL | SYSCFG_CFGR2_PVDL | SYSCFG_CFGR2_ECCL, Break); +} + +/** + * @brief Get connections to TIM1/16/17 Break inputs + * @rmtoll SYSCFG_CFGR2 CLL LL_SYSCFG_GetTIMBreakInputs\n + * SYSCFG_CFGR2 SPL LL_SYSCFG_GetTIMBreakInputs\n + * SYSCFG_CFGR2 PVDL LL_SYSCFG_GetTIMBreakInputs\n + * SYSCFG_CFGR2 ECCL LL_SYSCFG_GetTIMBreakInputs + * @retval Returned value can be can be a combination of the following values: + * @arg @ref LL_SYSCFG_TIMBREAK_ECC + * @arg @ref LL_SYSCFG_TIMBREAK_PVD + * @arg @ref LL_SYSCFG_TIMBREAK_SRAM2_PARITY + * @arg @ref LL_SYSCFG_TIMBREAK_LOCKUP + */ +__STATIC_INLINE uint32_t LL_SYSCFG_GetTIMBreakInputs(void) +{ + return (uint32_t)(READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_CLL | SYSCFG_CFGR2_SPL | SYSCFG_CFGR2_PVDL | SYSCFG_CFGR2_ECCL)); +} + +/** + * @brief Check if SRAM2 parity error detected + * @rmtoll SYSCFG_CFGR2 SPF LL_SYSCFG_IsActiveFlag_SP + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsActiveFlag_SP(void) +{ + return ((READ_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_SPF) == (SYSCFG_CFGR2_SPF)) ? 1UL : 0UL); +} + +/** + * @brief Clear SRAM2 parity error flag + * @rmtoll SYSCFG_CFGR2 SPF LL_SYSCFG_ClearFlag_SP + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_ClearFlag_SP(void) +{ + SET_BIT(SYSCFG->CFGR2, SYSCFG_CFGR2_SPF); +} + +/** + * @brief Enable SRAM2 page write protection for Pages in range 0 to 31 + * @note Write protection is cleared only by a system reset + * @rmtoll SYSCFG_SWPR1 PxWP LL_SYSCFG_EnableSRAM2PageWRP_0_31 + * @param SRAM2WRP This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE0 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE1 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE2 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE3 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE4 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE5 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE6 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE7 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE8 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE9 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE10 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE11 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE12 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE13 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE14 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE15 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE16 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE17 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE18 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE19 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE20 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE21 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE22 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE23 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE24 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE25 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE26 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE27 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE28 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE29 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE30 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE31 + * @retval None + */ +/* Legacy define */ +#define LL_SYSCFG_EnableSRAM2PageWRP LL_SYSCFG_EnableSRAM2PageWRP_0_31 +__STATIC_INLINE void LL_SYSCFG_EnableSRAM2PageWRP_0_31(uint32_t SRAM2WRP) +{ + SET_BIT(SYSCFG->SWPR1, SRAM2WRP); +} + +/** + * @brief Enable SRAM2 page write protection for Pages in range 32 to 63 + * @note Write protection is cleared only by a system reset + * @rmtoll SYSCFG_SWPR2 PxWP LL_SYSCFG_EnableSRAM2PageWRP_32_63 + * @param SRAM2WRP This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE32 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE33 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE34 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE35 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE36 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE37 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE38 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE39 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE40 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE41 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE42 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE43 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE44 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE45 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE46 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE47 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE48 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE49 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE50 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE51 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE52 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE53 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE54 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE55 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE56 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE57 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE58 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE59 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE60 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE61 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE62 + * @arg @ref LL_SYSCFG_SRAM2WRP_PAGE63 + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableSRAM2PageWRP_32_63(uint32_t SRAM2WRP) +{ + SET_BIT(SYSCFG->SWPR2, SRAM2WRP); +} + +/** + * @brief SRAM2 page write protection lock prior to erase + * @rmtoll SYSCFG_SKR KEY LL_SYSCFG_LockSRAM2WRP + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_LockSRAM2WRP(void) +{ + /* Writing a wrong key reactivates the write protection */ + WRITE_REG(SYSCFG->SKR, 0x00U); +} + +/** + * @brief SRAM2 page write protection unlock prior to erase + * @rmtoll SYSCFG_SKR KEY LL_SYSCFG_UnlockSRAM2WRP + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_UnlockSRAM2WRP(void) +{ + /* unlock the write protection of the SRAM2ER bit */ + WRITE_REG(SYSCFG->SKR, 0xCAU); + WRITE_REG(SYSCFG->SKR, 0x53U); +} + +/** + * @brief Enable CPU1 Interrupt Mask + * @rmtoll SYSCFG_IMR1 TIM1IM LL_SYSCFG_GRP1_EnableIT\n + * SYSCFG_IMR1 TIM16IM LL_SYSCFG_GRP1_EnableIT\n + * SYSCFG_IMR1 TIM17IM LL_SYSCFG_GRP1_EnableIT\n + * SYSCFG_IMR1 EXTIxIM LL_SYSCFG_GRP1_EnableIT + * @param Interrupt This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_GRP1_TIM1 + * @arg @ref LL_SYSCFG_GRP1_TIM16 + * @arg @ref LL_SYSCFG_GRP1_TIM17 + * @arg @ref LL_SYSCFG_GRP1_EXTI5 + * @arg @ref LL_SYSCFG_GRP1_EXTI6 + * @arg @ref LL_SYSCFG_GRP1_EXTI7 + * @arg @ref LL_SYSCFG_GRP1_EXTI8 + * @arg @ref LL_SYSCFG_GRP1_EXTI9 + * @arg @ref LL_SYSCFG_GRP1_EXTI10 + * @arg @ref LL_SYSCFG_GRP1_EXTI11 + * @arg @ref LL_SYSCFG_GRP1_EXTI12 + * @arg @ref LL_SYSCFG_GRP1_EXTI13 + * @arg @ref LL_SYSCFG_GRP1_EXTI14 + * @arg @ref LL_SYSCFG_GRP1_EXTI15 + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_GRP1_EnableIT(uint32_t Interrupt) +{ + CLEAR_BIT(SYSCFG->IMR1, Interrupt); +} + +/** + * @brief Enable CPU1 Interrupt Mask + * @rmtoll SYSCFG_IMR1 PVM1IM LL_SYSCFG_GRP2_EnableIT\n + * SYSCFG_IMR1 PVM3IM LL_SYSCFG_GRP2_EnableIT\n + * SYSCFG_IMR1 PVDIM LL_SYSCFG_GRP2_EnableIT + * @param Interrupt This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_GRP2_PVM1 + * @arg @ref LL_SYSCFG_GRP2_PVM3 + * @arg @ref LL_SYSCFG_GRP2_PVD + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_GRP2_EnableIT(uint32_t Interrupt) +{ + CLEAR_BIT(SYSCFG->IMR2, Interrupt); +} + +/** + * @brief Disable CPU1 Interrupt Mask + * @rmtoll SYSCFG_IMR1 TIM1IM LL_SYSCFG_GRP1_DisableIT\n + * SYSCFG_IMR1 TIM16IM LL_SYSCFG_GRP1_DisableIT\n + * SYSCFG_IMR1 TIM17IM LL_SYSCFG_GRP1_DisableIT\n + * SYSCFG_IMR1 EXTIxIM LL_SYSCFG_GRP1_DisableIT + * @param Interrupt This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_GRP1_TIM1 + * @arg @ref LL_SYSCFG_GRP1_TIM16 + * @arg @ref LL_SYSCFG_GRP1_TIM17 + * @arg @ref LL_SYSCFG_GRP1_EXTI5 + * @arg @ref LL_SYSCFG_GRP1_EXTI6 + * @arg @ref LL_SYSCFG_GRP1_EXTI7 + * @arg @ref LL_SYSCFG_GRP1_EXTI8 + * @arg @ref LL_SYSCFG_GRP1_EXTI9 + * @arg @ref LL_SYSCFG_GRP1_EXTI10 + * @arg @ref LL_SYSCFG_GRP1_EXTI11 + * @arg @ref LL_SYSCFG_GRP1_EXTI12 + * @arg @ref LL_SYSCFG_GRP1_EXTI13 + * @arg @ref LL_SYSCFG_GRP1_EXTI14 + * @arg @ref LL_SYSCFG_GRP1_EXTI15 + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_GRP1_DisableIT(uint32_t Interrupt) +{ + SET_BIT(SYSCFG->IMR1, Interrupt); +} + +/** + * @brief Disable CPU1 Interrupt Mask + * @rmtoll SYSCFG_IMR2 PVM1IM LL_SYSCFG_GRP2_DisableIT\n + * SYSCFG_IMR2 PVM3IM LL_SYSCFG_GRP2_DisableIT\n + * SYSCFG_IMR2 PVDIM LL_SYSCFG_GRP2_DisableIT + * @param Interrupt This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_GRP2_PVM1 + * @arg @ref LL_SYSCFG_GRP2_PVM3 + * @arg @ref LL_SYSCFG_GRP2_PVD + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_GRP2_DisableIT(uint32_t Interrupt) +{ + SET_BIT(SYSCFG->IMR2, Interrupt); +} + +/** + * @brief Indicate if CPU1 Interrupt Mask is enabled + * @rmtoll SYSCFG_IMR1 TIM1IM LL_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_IMR1 TIM16IM LL_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_IMR1 TIM17IM LL_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_IMR1 EXTIxIM LL_SYSCFG_GRP1_IsEnabledIT + * @param Interrupt This parameter can be one of the following values: + * @arg @ref LL_SYSCFG_GRP1_TIM1 + * @arg @ref LL_SYSCFG_GRP1_TIM16 + * @arg @ref LL_SYSCFG_GRP1_TIM17 + * @arg @ref LL_SYSCFG_GRP1_EXTI5 + * @arg @ref LL_SYSCFG_GRP1_EXTI6 + * @arg @ref LL_SYSCFG_GRP1_EXTI7 + * @arg @ref LL_SYSCFG_GRP1_EXTI8 + * @arg @ref LL_SYSCFG_GRP1_EXTI9 + * @arg @ref LL_SYSCFG_GRP1_EXTI10 + * @arg @ref LL_SYSCFG_GRP1_EXTI11 + * @arg @ref LL_SYSCFG_GRP1_EXTI12 + * @arg @ref LL_SYSCFG_GRP1_EXTI13 + * @arg @ref LL_SYSCFG_GRP1_EXTI14 + * @arg @ref LL_SYSCFG_GRP1_EXTI15 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_GRP1_IsEnabledIT(uint32_t Interrupt) +{ + return ((READ_BIT(SYSCFG->IMR1, Interrupt) != (Interrupt)) ? 1UL : 0UL); +} + +/** + * @brief Indicate if CPU1 Interrupt Mask is enabled + * @rmtoll SYSCFG_IMR2 PVM1IM LL_SYSCFG_GRP2_IsEnabledIT\n + * SYSCFG_IMR2 PVM3IM LL_SYSCFG_GRP2_IsEnabledIT\n + * SYSCFG_IMR2 PVDIM LL_SYSCFG_GRP2_IsEnabledIT + * @param Interrupt This parameter can be one of the following values: + * @arg @ref LL_SYSCFG_GRP2_PVM1 + * @arg @ref LL_SYSCFG_GRP2_PVM3 + * @arg @ref LL_SYSCFG_GRP2_PVD + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_GRP2_IsEnabledIT(uint32_t Interrupt) +{ + return ((READ_BIT(SYSCFG->IMR2, Interrupt) != (Interrupt)) ? 1UL : 0UL); +} + +/** + * @brief Enable CPU2 Interrupt Mask + * @rmtoll SYSCFG_C2IMR1 RTCSTAMPTAMPLSECSSIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 RTCWKUPIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 RTCALARMIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 RCCIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 FLASHIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 PKAIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 RNGIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 AES1IM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 COMPIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 ADCIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 EXTIxIM LL_C2_SYSCFG_GRP1_EnableIT + * @param Interrupt This parameter can be a combination of the following values: + * @arg @ref LL_C2_SYSCFG_GRP1_RTCSTAMP_RTCTAMP_LSECSS + * @arg @ref LL_C2_SYSCFG_GRP1_RTCWKUP + * @arg @ref LL_C2_SYSCFG_GRP1_RTCALARM + * @arg @ref LL_C2_SYSCFG_GRP1_RCC + * @arg @ref LL_C2_SYSCFG_GRP1_FLASH + * @arg @ref LL_C2_SYSCFG_GRP1_PKA + * @arg @ref LL_C2_SYSCFG_GRP1_RNG + * @arg @ref LL_C2_SYSCFG_GRP1_AES1 + * @arg @ref LL_C2_SYSCFG_GRP1_COMP + * @arg @ref LL_C2_SYSCFG_GRP1_ADC + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI0 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI1 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI2 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI3 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI4 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI5 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI6 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI7 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI8 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI9 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI10 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI11 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI12 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI13 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI14 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI15 + * @retval None + */ +__STATIC_INLINE void LL_C2_SYSCFG_GRP1_EnableIT(uint32_t Interrupt) +{ + CLEAR_BIT(SYSCFG->C2IMR1, Interrupt); +} + +/** + * @brief Enable CPU2 Interrupt Mask + * @rmtoll SYSCFG_C2IMR2 DMA1CHxIM LL_C2_SYSCFG_GRP2_EnableIT\n + * SYSCFG_C2IMR2 DMA2CHxIM LL_C2_SYSCFG_GRP2_EnableIT\n + * SYSCFG_C2IMR2 PVM1IM LL_C2_SYSCFG_GRP2_EnableIT\n + * SYSCFG_C2IMR2 PVM3IM LL_C2_SYSCFG_GRP2_EnableIT\n + * SYSCFG_C2IMR2 PVDIM LL_C2_SYSCFG_GRP2_EnableIT\n + * SYSCFG_C2IMR2 TSCIM LL_C2_SYSCFG_GRP2_EnableIT\n + * SYSCFG_C2IMR2 LCDIM LL_C2_SYSCFG_GRP2_EnableIT + * @param Interrupt This parameter can be a combination of the following values: + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH1 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH2 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH3 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH4 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH5 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH6 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH7 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH1 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH2 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH3 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH4 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH5 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH6 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH7 + * @arg @ref LL_C2_SYSCFG_GRP2_DMAMUX1 + * @arg @ref LL_C2_SYSCFG_GRP2_PVM1 + * @arg @ref LL_C2_SYSCFG_GRP2_PVM3 + * @arg @ref LL_C2_SYSCFG_GRP2_PVD + * @arg @ref LL_C2_SYSCFG_GRP2_TSC + * @arg @ref LL_C2_SYSCFG_GRP2_LCD + * @retval None + */ +__STATIC_INLINE void LL_C2_SYSCFG_GRP2_EnableIT(uint32_t Interrupt) +{ + CLEAR_BIT(SYSCFG->C2IMR2, Interrupt); +} + +/** + * @brief Disable CPU2 Interrupt Mask + * @rmtoll SYSCFG_C2IMR1 RTCSTAMPTAMPLSECSSIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 RTCWKUPIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 RTCALARMIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 RCCIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 FLASHIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 PKAIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 RNGIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 AES1IM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 COMPIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 ADCIM LL_C2_SYSCFG_GRP1_DisableIT\n + * SYSCFG_C2IMR1 EXTIxIM LL_C2_SYSCFG_GRP1_DisableIT + * @param Interrupt This parameter can be a combination of the following values: + * @arg @ref LL_C2_SYSCFG_GRP1_RTCSTAMP_RTCTAMP_LSECSS + * @arg @ref LL_C2_SYSCFG_GRP1_RTCWKUP + * @arg @ref LL_C2_SYSCFG_GRP1_RTCALARM + * @arg @ref LL_C2_SYSCFG_GRP1_RCC + * @arg @ref LL_C2_SYSCFG_GRP1_FLASH + * @arg @ref LL_C2_SYSCFG_GRP1_PKA + * @arg @ref LL_C2_SYSCFG_GRP1_RNG + * @arg @ref LL_C2_SYSCFG_GRP1_AES1 + * @arg @ref LL_C2_SYSCFG_GRP1_COMP + * @arg @ref LL_C2_SYSCFG_GRP1_ADC + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI0 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI1 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI2 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI3 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI4 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI5 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI6 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI7 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI8 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI9 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI10 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI11 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI12 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI13 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI14 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI15 + * @retval None + */ +__STATIC_INLINE void LL_C2_SYSCFG_GRP1_DisableIT(uint32_t Interrupt) +{ + SET_BIT(SYSCFG->C2IMR1, Interrupt); +} + +/** + * @brief Disable CPU2 Interrupt Mask + * @rmtoll SYSCFG_C2IMR2 DMA1CHxIM LL_C2_SYSCFG_GRP2_DisableIT\n + * SYSCFG_C2IMR2 DMA2CHxIM LL_C2_SYSCFG_GRP2_DisableIT\n + * SYSCFG_C2IMR2 PVM1IM LL_C2_SYSCFG_GRP2_DisableIT\n + * SYSCFG_C2IMR2 PVM3IM LL_C2_SYSCFG_GRP2_DisableIT\n + * SYSCFG_C2IMR2 PVDIM LL_C2_SYSCFG_GRP2_DisableIT\n + * SYSCFG_C2IMR2 TSCIM LL_C2_SYSCFG_GRP2_DisableIT\n + * SYSCFG_C2IMR2 LCDIM LL_C2_SYSCFG_GRP2_DisableIT + * @param Interrupt This parameter can be a combination of the following values: + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH1 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH2 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH3 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH4 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH5 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH6 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH7 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH1 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH2 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH3 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH4 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH5 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH6 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH7 + * @arg @ref LL_C2_SYSCFG_GRP2_DMAMUX1 + * @arg @ref LL_C2_SYSCFG_GRP2_PVM1 + * @arg @ref LL_C2_SYSCFG_GRP2_PVM3 + * @arg @ref LL_C2_SYSCFG_GRP2_PVD + * @arg @ref LL_C2_SYSCFG_GRP2_TSC + * @arg @ref LL_C2_SYSCFG_GRP2_LCD + * @retval None + */ +__STATIC_INLINE void LL_C2_SYSCFG_GRP2_DisableIT(uint32_t Interrupt) +{ + SET_BIT(SYSCFG->C2IMR2, Interrupt); +} + +/** + * @brief Indicate if CPU2 Interrupt Mask is enabled + * @rmtoll SYSCFG_C2IMR1 RTCSTAMPTAMPLSECSSIM LL_C2_SYSCFG_GRP1_EnableIT\n + * SYSCFG_C2IMR1 RTCWKUPIM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 RTCALARMIM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 RCCIM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 FLASHIM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 PKAIM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 RNGIM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 AES1IM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 COMPIM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 ADCIM LL_C2_SYSCFG_GRP1_IsEnabledIT\n + * SYSCFG_C2IMR1 EXTIxIM LL_C2_SYSCFG_GRP1_IsEnabledIT + * @param Interrupt This parameter can be one of the following values: + * @arg @ref LL_C2_SYSCFG_GRP1_RTCSTAMP_RTCTAMP_LSECSS + * @arg @ref LL_C2_SYSCFG_GRP1_RTCWKUP + * @arg @ref LL_C2_SYSCFG_GRP1_RTCALARM + * @arg @ref LL_C2_SYSCFG_GRP1_RCC + * @arg @ref LL_C2_SYSCFG_GRP1_FLASH + * @arg @ref LL_C2_SYSCFG_GRP1_PKA + * @arg @ref LL_C2_SYSCFG_GRP1_RNG + * @arg @ref LL_C2_SYSCFG_GRP1_AES1 + * @arg @ref LL_C2_SYSCFG_GRP1_COMP + * @arg @ref LL_C2_SYSCFG_GRP1_ADC + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI0 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI1 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI2 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI3 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI4 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI5 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI6 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI7 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI8 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI9 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI10 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI11 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI12 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI13 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI14 + * @arg @ref LL_C2_SYSCFG_GRP1_EXTI15 + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_SYSCFG_GRP1_IsEnabledIT(uint32_t Interrupt) +{ + return ((READ_BIT(SYSCFG->C2IMR1, Interrupt) != (Interrupt)) ? 1UL : 0UL); +} + +/** + * @brief Indicate if CPU2 Interrupt Mask is enabled + * @rmtoll SYSCFG_C2IMR2 DMA1CHxIM LL_C2_SYSCFG_GRP2_IsEnabledIT\n + * SYSCFG_C2IMR2 DMA2CHxIM LL_C2_SYSCFG_GRP2_IsEnabledIT\n + * SYSCFG_C2IMR2 PVM1IM LL_C2_SYSCFG_GRP2_IsEnabledIT\n + * SYSCFG_C2IMR2 PVM3IM LL_C2_SYSCFG_GRP2_IsEnabledIT\n + * SYSCFG_C2IMR2 PVDIM LL_C2_SYSCFG_GRP2_IsEnabledIT\n + * SYSCFG_C2IMR2 TSCIM LL_C2_SYSCFG_GRP2_IsEnabledIT\n + * SYSCFG_C2IMR2 LCDIM LL_C2_SYSCFG_GRP2_IsEnabledIT + * @param Interrupt This parameter can be one of the following values: + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH1 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH2 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH3 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH4 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH5 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH6 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA1CH7 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH1 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH2 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH3 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH4 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH5 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH6 + * @arg @ref LL_C2_SYSCFG_GRP2_DMA2CH7 + * @arg @ref LL_C2_SYSCFG_GRP2_DMAMUX1 + * @arg @ref LL_C2_SYSCFG_GRP2_PVM1 + * @arg @ref LL_C2_SYSCFG_GRP2_PVM3 + * @arg @ref LL_C2_SYSCFG_GRP2_PVD + * @arg @ref LL_C2_SYSCFG_GRP2_TSC + * @arg @ref LL_C2_SYSCFG_GRP2_LCD + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_C2_SYSCFG_GRP2_IsEnabledIT(uint32_t Interrupt) +{ + return ((READ_BIT(SYSCFG->C2IMR2, Interrupt) != (Interrupt)) ? 1UL : 0UL); +} + +/** + * @brief Enable the access for security IP + * @rmtoll SYSCFG_SIPCR SAES1 LL_SYSCFG_EnableSecurityAccess\n + * SYSCFG_CFGR1 SAES2 LL_SYSCFG_EnableSecurityAccess\n + * SYSCFG_CFGR1 SPKA LL_SYSCFG_EnableSecurityAccess\n + * SYSCFG_CFGR1 SRNG LL_SYSCFG_EnableSecurityAccess + * @param SecurityAccess This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_SECURE_ACCESS_AES1 + * @arg @ref LL_SYSCFG_SECURE_ACCESS_AES2 + * @arg @ref LL_SYSCFG_SECURE_ACCESS_PKA + * @arg @ref LL_SYSCFG_SECURE_ACCESS_RNG + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_EnableSecurityAccess(uint32_t SecurityAccess) +{ + SET_BIT(SYSCFG->SIPCR, SecurityAccess); +} + +/** + * @brief Disable the access for security IP + * @rmtoll SYSCFG_SIPCR SAES1 LL_SYSCFG_DisableSecurityAccess\n + * SYSCFG_CFGR1 SAES2 LL_SYSCFG_DisableSecurityAccess\n + * SYSCFG_CFGR1 SPKA LL_SYSCFG_DisableSecurityAccess\n + * SYSCFG_CFGR1 SRNG LL_SYSCFG_DisableSecurityAccess + * @param SecurityAccess This parameter can be a combination of the following values: + * @arg @ref LL_SYSCFG_SECURE_ACCESS_AES1 + * @arg @ref LL_SYSCFG_SECURE_ACCESS_AES2 + * @arg @ref LL_SYSCFG_SECURE_ACCESS_PKA + * @arg @ref LL_SYSCFG_SECURE_ACCESS_RNG + * @retval None + */ +__STATIC_INLINE void LL_SYSCFG_DisableSecurityAccess(uint32_t SecurityAccess) +{ + CLEAR_BIT(SYSCFG->SIPCR, SecurityAccess); +} + +/** + * @brief Indicate if access for security IP is enabled + * @rmtoll SYSCFG_SIPCR SAES1 LL_SYSCFG_IsEnabledSecurityAccess\n + * SYSCFG_CFGR1 SAES2 LL_SYSCFG_IsEnabledSecurityAccess\n + * SYSCFG_CFGR1 SPKA LL_SYSCFG_IsEnabledSecurityAccess\n + * SYSCFG_CFGR1 SRNG LL_SYSCFG_IsEnabledSecurityAccess + * @param SecurityAccess This parameter can be one of the following values: + * @arg @ref LL_SYSCFG_SECURE_ACCESS_AES1 + * @arg @ref LL_SYSCFG_SECURE_ACCESS_AES2 + * @arg @ref LL_SYSCFG_SECURE_ACCESS_PKA + * @arg @ref LL_SYSCFG_SECURE_ACCESS_RNG + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_SYSCFG_IsEnabledSecurityAccess(uint32_t SecurityAccess) +{ + return ((READ_BIT(SYSCFG->SIPCR, SecurityAccess) == (SecurityAccess)) ? 1UL : 0UL); +} + +/** + * @} + */ + +/** @defgroup SYSTEM_LL_EF_DBGMCU DBGMCU + * @note DBGMCU is only accessible by Cortex M4 + * To access on DBGMCU, Cortex M0+ need to request to the Cortex M4 + * the action. + * @{ + */ + +/** + * @brief Return the device identifier + * @note For STM32WBxxxx devices, the device ID is 0x495 + * @rmtoll DBGMCU_IDCODE DEV_ID LL_DBGMCU_GetDeviceID + * @retval Values between Min_Data=0x00 and Max_Data=0xFFF (ex: device ID is 0x495) + */ +__STATIC_INLINE uint32_t LL_DBGMCU_GetDeviceID(void) +{ + return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_DEV_ID)); +} + +/** + * @brief Return the device revision identifier + * @note This field indicates the revision of the device. + * @rmtoll DBGMCU_IDCODE REV_ID LL_DBGMCU_GetRevisionID + * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF + */ +__STATIC_INLINE uint32_t LL_DBGMCU_GetRevisionID(void) +{ + return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_REV_ID) >> DBGMCU_IDCODE_REV_ID_Pos); +} + +/** + * @brief Enable the Debug Module during SLEEP mode + * @rmtoll DBGMCU_CR DBG_SLEEP LL_DBGMCU_EnableDBGSleepMode + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_EnableDBGSleepMode(void) +{ + SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP); +} + +/** + * @brief Disable the Debug Module during SLEEP mode + * @rmtoll DBGMCU_CR DBG_SLEEP LL_DBGMCU_DisableDBGSleepMode + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_DisableDBGSleepMode(void) +{ + CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP); +} + +/** + * @brief Enable the Debug Module during STOP mode + * @rmtoll DBGMCU_CR DBG_STOP LL_DBGMCU_EnableDBGStopMode + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_EnableDBGStopMode(void) +{ + SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP); +} + +/** + * @brief Disable the Debug Module during STOP mode + * @rmtoll DBGMCU_CR DBG_STOP LL_DBGMCU_DisableDBGStopMode + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_DisableDBGStopMode(void) +{ + CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STOP); +} + +/** + * @brief Enable the Debug Module during STANDBY mode + * @rmtoll DBGMCU_CR DBG_STANDBY LL_DBGMCU_EnableDBGStandbyMode + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_EnableDBGStandbyMode(void) +{ + SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY); +} + +/** + * @brief Disable the Debug Module during STANDBY mode + * @rmtoll DBGMCU_CR DBG_STANDBY LL_DBGMCU_DisableDBGStandbyMode + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_DisableDBGStandbyMode(void) +{ + CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY); +} + +/** + * @brief Enable the clock for Trace port + * @rmtoll DBGMCU_CR TRACE_CLKEN LL_DBGMCU_EnableTraceClock\n + */ +__STATIC_INLINE void LL_DBGMCU_EnableTraceClock(void) +{ + SET_BIT(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN); +} + +/** + * @brief Disable the clock for Trace port + * @rmtoll DBGMCU_CR TRACE_CLKEN LL_DBGMCU_DisableTraceClock\n + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_DisableTraceClock(void) +{ + CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN); +} + +/** + * @brief Indicate if the clock for Trace port is enabled + * @rmtoll DBGMCU_CR TRACE_CLKEN LL_DBGMCU_IsEnabledTraceClock\n + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DBGMCU_IsEnabledTraceClock(void) +{ + return ((READ_BIT(DBGMCU->CR, DBGMCU_CR_TRACE_IOEN) == (DBGMCU_CR_TRACE_IOEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable the external trigger output + * @note When enable the external trigger is output (state of bit 1), + * TRGIO pin is connected to TRGOUT. + * @rmtoll DBGMCU_CR TRGOEN LL_DBGMCU_EnableTriggerOutput\n + */ +__STATIC_INLINE void LL_DBGMCU_EnableTriggerOutput(void) +{ + SET_BIT(DBGMCU->CR, DBGMCU_CR_TRGOEN); +} + +/** + * @brief Disable the external trigger output + * @note When disable external trigger is input (state of bit 0), + * TRGIO pin is connected to TRGIN. + * @rmtoll DBGMCU_CR TRGOEN LL_DBGMCU_DisableTriggerOutput\n + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_DisableTriggerOutput(void) +{ + CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_TRGOEN); +} + +/** + * @brief Indicate if the external trigger is output or input direction + * @note When the external trigger is output (state of bit 1), + * TRGIO pin is connected to TRGOUT. + * When the external trigger is input (state of bit 0), + * TRGIO pin is connected to TRGIN. + * @rmtoll DBGMCU_CR TRGOEN LL_DBGMCU_EnableTriggerOutput\n + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_DBGMCU_IsEnabledTriggerOutput(void) +{ + return ((READ_BIT(DBGMCU->CR, DBGMCU_CR_TRGOEN) == (DBGMCU_CR_TRGOEN)) ? 1UL : 0UL); +} + +/** + * @brief Freeze CPU1 APB1 peripherals (group1 peripherals) + * @rmtoll DBGMCU_APB1FZR1 DBG_xxxx_STOP LL_DBGMCU_APB1_GRP1_FreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM1_STOP + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs) +{ + SET_BIT(DBGMCU->APB1FZR1, Periphs); +} + +/** + * @brief Freeze CPU2 APB1 peripherals (group1 peripherals) + * @rmtoll DBGMCU_C2APB1FZR1 DBG_xxxx_STOP LL_C2_DBGMCU_APB1_GRP1_FreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_TIM2_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_RTC_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_IWDG_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_I2C1_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_I2C3_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_LPTIM1_STOP + * @retval None + */ +__STATIC_INLINE void LL_C2_DBGMCU_APB1_GRP1_FreezePeriph(uint32_t Periphs) +{ + SET_BIT(DBGMCU->C2APB1FZR1, Periphs); +} + +/** + * @brief Freeze CPU1 APB1 peripherals (group2 peripherals) + * @rmtoll DBGMCU_APB1FZR2 DBG_xxxx_STOP LL_DBGMCU_APB1_GRP2_FreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_DBGMCU_APB1_GRP2_LPTIM2_STOP + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_APB1_GRP2_FreezePeriph(uint32_t Periphs) +{ + SET_BIT(DBGMCU->APB1FZR2, Periphs); +} + +/** + * @brief Freeze CPU2 APB1 peripherals (group2 peripherals) + * @rmtoll DBGMCU_C2APB1FZR2 DBG_xxxx_STOP LL_C2_DBGMCU_APB1_GRP2_FreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_DBGMCU_APB1_GRP2_LPTIM2_STOP + * @retval None + */ +__STATIC_INLINE void LL_C2_DBGMCU_APB1_GRP2_FreezePeriph(uint32_t Periphs) +{ + SET_BIT(DBGMCU->C2APB1FZR2, Periphs); +} + +/** + * @brief Unfreeze CPU1 APB1 peripherals (group1 peripherals) + * @rmtoll DBGMCU_APB1FZR1 DBG_xxxx_STOP LL_DBGMCU_APB1_GRP1_UnFreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_DBGMCU_APB1_GRP1_TIM2_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_RTC_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_WWDG_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_IWDG_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_I2C1_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_I2C3_STOP + * @arg @ref LL_DBGMCU_APB1_GRP1_LPTIM1_STOP + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_APB1_GRP1_UnFreezePeriph(uint32_t Periphs) +{ + CLEAR_BIT(DBGMCU->APB1FZR1, Periphs); +} + +/** + * @brief Unfreeze CPU2 APB1 peripherals (group1 peripherals) + * @rmtoll DBGMCU_C2APB1FZR1 DBG_xxxx_STOP LL_C2_DBGMCU_APB1_GRP1_UnFreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_TIM2_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_RTC_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_IWDG_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_I2C1_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_I2C3_STOP + * @arg @ref LL_C2_DBGMCU_APB1_GRP1_LPTIM1_STOP + * @retval None + */ +__STATIC_INLINE void LL_C2_DBGMCU_APB1_GRP1_UnFreezePeriph(uint32_t Periphs) +{ + CLEAR_BIT(DBGMCU->C2APB1FZR1, Periphs); +} + +/** + * @brief Unfreeze CPU1 APB1 peripherals (group2 peripherals) + * @rmtoll DBGMCU_APB1FZR2 DBG_xxxx_STOP LL_DBGMCU_APB1_GRP2_UnFreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_DBGMCU_APB1_GRP2_LPTIM2_STOP + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_APB1_GRP2_UnFreezePeriph(uint32_t Periphs) +{ + CLEAR_BIT(DBGMCU->APB1FZR2, Periphs); +} + +/** + * @brief Unfreeze CPU2 APB1 peripherals (group2 peripherals) + * @rmtoll DBGMCU_C2APB1FZR2 DBG_xxxx_STOP LL_C2_DBGMCU_APB1_GRP2_UnFreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_DBGMCU_APB1_GRP2_LPTIM2_STOP + * @retval None + */ +__STATIC_INLINE void LL_C2_DBGMCU_APB1_GRP2_UnFreezePeriph(uint32_t Periphs) +{ + CLEAR_BIT(DBGMCU->C2APB1FZR2, Periphs); +} + +/** + * @brief Freeze CPU1 APB2 peripherals + * @rmtoll DBGMCU_APB2FZR DBG_TIMx_STOP LL_DBGMCU_APB2_GRP1_FreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP + * @arg @ref LL_DBGMCU_APB2_GRP1_TIM16_STOP + * @arg @ref LL_DBGMCU_APB2_GRP1_TIM17_STOP + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_APB2_GRP1_FreezePeriph(uint32_t Periphs) +{ + SET_BIT(DBGMCU->APB2FZR, Periphs); +} + +/** + * @brief Freeze CPU2 APB2 peripherals + * @rmtoll DBGMCU_C2APB2FZR DBG_TIMx_STOP LL_C2_DBGMCU_APB2_GRP1_FreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_DBGMCU_APB2_GRP1_TIM1_STOP + * @arg @ref LL_C2_DBGMCU_APB2_GRP1_TIM16_STOP + * @arg @ref LL_C2_DBGMCU_APB2_GRP1_TIM17_STOP + * @retval None + */ +__STATIC_INLINE void LL_C2_DBGMCU_APB2_GRP1_FreezePeriph(uint32_t Periphs) +{ + SET_BIT(DBGMCU->C2APB2FZR, Periphs); +} + +/** + * @brief Unfreeze CPU1 APB2 peripherals + * @rmtoll DBGMCU_APB2FZR DBG_TIMx_STOP LL_DBGMCU_APB2_GRP1_UnFreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_DBGMCU_APB2_GRP1_TIM1_STOP + * @arg @ref LL_DBGMCU_APB2_GRP1_TIM16_STOP + * @arg @ref LL_DBGMCU_APB2_GRP1_TIM17_STOP + * @retval None + */ +__STATIC_INLINE void LL_DBGMCU_APB2_GRP1_UnFreezePeriph(uint32_t Periphs) +{ + CLEAR_BIT(DBGMCU->APB2FZR, Periphs); +} + +/** + * @brief Unfreeze CPU2 APB2 peripherals + * @rmtoll DBGMCU_C2APB2FZR DBG_TIMx_STOP LL_C2_DBGMCU_APB2_GRP1_UnFreezePeriph + * @param Periphs This parameter can be a combination of the following values: + * @arg @ref LL_C2_DBGMCU_APB2_GRP1_TIM1_STOP + * @arg @ref LL_C2_DBGMCU_APB2_GRP1_TIM16_STOP + * @arg @ref LL_C2_DBGMCU_APB2_GRP1_TIM17_STOP + * @retval None + */ +__STATIC_INLINE void LL_C2_DBGMCU_APB2_GRP1_UnFreezePeriph(uint32_t Periphs) +{ + CLEAR_BIT(DBGMCU->C2APB2FZR, Periphs); +} + +/** + * @} + */ + +#if defined(VREFBUF) +/** @defgroup SYSTEM_LL_EF_VREFBUF VREFBUF + * @{ + */ + +/** + * @brief Enable Internal voltage reference + * @rmtoll VREFBUF_CSR ENVR LL_VREFBUF_Enable + * @retval None + */ +__STATIC_INLINE void LL_VREFBUF_Enable(void) +{ + SET_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR); +} + +/** + * @brief Disable Internal voltage reference + * @rmtoll VREFBUF_CSR ENVR LL_VREFBUF_Disable + * @retval None + */ +__STATIC_INLINE void LL_VREFBUF_Disable(void) +{ + CLEAR_BIT(VREFBUF->CSR, VREFBUF_CSR_ENVR); +} + +/** + * @brief Enable high impedance (VREF+pin is high impedance) + * @rmtoll VREFBUF_CSR HIZ LL_VREFBUF_EnableHIZ + * @retval None + */ +__STATIC_INLINE void LL_VREFBUF_EnableHIZ(void) +{ + SET_BIT(VREFBUF->CSR, VREFBUF_CSR_HIZ); +} + +/** + * @brief Disable high impedance (VREF+pin is internally connected to the voltage reference buffer output) + * @rmtoll VREFBUF_CSR HIZ LL_VREFBUF_DisableHIZ + * @retval None + */ +__STATIC_INLINE void LL_VREFBUF_DisableHIZ(void) +{ + CLEAR_BIT(VREFBUF->CSR, VREFBUF_CSR_HIZ); +} + +/** + * @brief Set the Voltage reference scale + * @rmtoll VREFBUF_CSR VRS LL_VREFBUF_SetVoltageScaling + * @param Scale This parameter can be one of the following values: + * @arg @ref LL_VREFBUF_VOLTAGE_SCALE0 + * @arg @ref LL_VREFBUF_VOLTAGE_SCALE1 + * @retval None + */ +__STATIC_INLINE void LL_VREFBUF_SetVoltageScaling(uint32_t Scale) +{ + MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_VRS, Scale); +} + +/** + * @brief Get the Voltage reference scale + * @rmtoll VREFBUF_CSR VRS LL_VREFBUF_GetVoltageScaling + * @retval Returned value can be one of the following values: + * @arg @ref LL_VREFBUF_VOLTAGE_SCALE0 + * @arg @ref LL_VREFBUF_VOLTAGE_SCALE1 + */ +__STATIC_INLINE uint32_t LL_VREFBUF_GetVoltageScaling(void) +{ + return (uint32_t)(READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRS)); +} + +/** + * @brief Get the VREFBUF trimming value for VRS=0 (VREF_SC0) + * @retval Between 0 and 0x3F + */ +__STATIC_INLINE uint32_t LL_VREFBUF_SC0_GetCalibration(void) +{ + return (uint32_t)(*VREFBUF_SC0_CAL_ADDR); +} + +/** + * @brief Get the VREFBUF trimming value for VRS=1 (VREF_SC1) + * @retval Between 0 and 0x3F + */ +__STATIC_INLINE uint32_t LL_VREFBUF_SC1_GetCalibration(void) +{ + return (uint32_t)(*VREFBUF_SC1_CAL_ADDR); +} + +/** + * @brief Check if Voltage reference buffer is ready + * @rmtoll VREFBUF_CSR VRR LL_VREFBUF_IsVREFReady + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_VREFBUF_IsVREFReady(void) +{ + return ((READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRR) == (VREFBUF_CSR_VRR)) ? 1UL : 0UL); +} + +/** + * @brief Get the trimming code for VREFBUF calibration + * @rmtoll VREFBUF_CCR TRIM LL_VREFBUF_GetTrimming + * @retval Between 0 and 0x3F + */ +__STATIC_INLINE uint32_t LL_VREFBUF_GetTrimming(void) +{ + return (uint32_t)(READ_BIT(VREFBUF->CCR, VREFBUF_CCR_TRIM)); +} + +/** + * @brief Set the trimming code for VREFBUF calibration (Tune the internal reference buffer voltage) + * @note Each VrefBuf voltage scale is calibrated in production for each device, + * data stored in flash memory. + * Functions @ref LL_VREFBUF_SC0_GetCalibration and + * @ref LL_VREFBUF_SC0_GetCalibration can be used to retrieve + * these calibration data. + * @rmtoll VREFBUF_CCR TRIM LL_VREFBUF_SetTrimming + * @param Value Between 0 and 0x3F + * @retval None + */ +__STATIC_INLINE void LL_VREFBUF_SetTrimming(uint32_t Value) +{ + WRITE_REG(VREFBUF->CCR, Value); +} + +/** + * @} + */ +#endif /* VREFBUF */ + +/** @defgroup SYSTEM_LL_EF_FLASH FLASH + * @{ + */ + +/** + * @brief Set FLASH Latency + * @rmtoll FLASH_ACR LATENCY LL_FLASH_SetLatency + * @param Latency This parameter can be one of the following values: + * @arg @ref LL_FLASH_LATENCY_0 + * @arg @ref LL_FLASH_LATENCY_1 + * @arg @ref LL_FLASH_LATENCY_2 + * @arg @ref LL_FLASH_LATENCY_3 + * @retval None + */ +__STATIC_INLINE void LL_FLASH_SetLatency(uint32_t Latency) +{ + MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, Latency); +} + +/** + * @brief Get FLASH Latency + * @rmtoll FLASH_ACR LATENCY LL_FLASH_GetLatency + * @retval Returned value can be one of the following values: + * @arg @ref LL_FLASH_LATENCY_0 + * @arg @ref LL_FLASH_LATENCY_1 + * @arg @ref LL_FLASH_LATENCY_2 + * @arg @ref LL_FLASH_LATENCY_3 + */ +__STATIC_INLINE uint32_t LL_FLASH_GetLatency(void) +{ + return (uint32_t)(READ_BIT(FLASH->ACR, FLASH_ACR_LATENCY)); +} + +/** + * @brief Enable Prefetch + * @rmtoll FLASH_ACR PRFTEN LL_FLASH_EnablePrefetch + * @retval None + */ +__STATIC_INLINE void LL_FLASH_EnablePrefetch(void) +{ + SET_BIT(FLASH->ACR, FLASH_ACR_PRFTEN); +} + +/** + * @brief Disable Prefetch + * @rmtoll FLASH_ACR PRFTEN LL_FLASH_DisablePrefetch + * @rmtoll FLASH_C2ACR PRFTEN LL_FLASH_DisablePrefetch + * @retval None + */ +__STATIC_INLINE void LL_FLASH_DisablePrefetch(void) +{ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_PRFTEN); +} + +/** + * @brief Check if Prefetch buffer is enabled + * @rmtoll FLASH_ACR PRFTEN LL_FLASH_IsPrefetchEnabled + * @rmtoll FLASH_C2ACR C2PRFTEN LL_FLASH_IsPrefetchEnabled + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FLASH_IsPrefetchEnabled(void) +{ + return ((READ_BIT(FLASH->ACR, FLASH_ACR_PRFTEN) == (FLASH_ACR_PRFTEN)) ? 1UL : 0UL); +} + +/** + * @brief Enable Instruction cache + * @rmtoll FLASH_ACR ICEN LL_FLASH_EnableInstCache + * @rmtoll FLASH_C2ACR ICEN LL_FLASH_EnableInstCache + * @retval None + */ +__STATIC_INLINE void LL_FLASH_EnableInstCache(void) +{ + SET_BIT(FLASH->ACR, FLASH_ACR_ICEN); +} + +/** + * @brief Disable Instruction cache + * @rmtoll FLASH_ACR ICEN LL_FLASH_DisableInstCache + * @rmtoll FLASH_C2ACR ICEN LL_FLASH_DisableInstCache + * @retval None + */ +__STATIC_INLINE void LL_FLASH_DisableInstCache(void) +{ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICEN); +} + +/** + * @brief Enable Data cache + * @rmtoll FLASH_ACR DCEN LL_FLASH_EnableDataCache + * @retval None + */ +__STATIC_INLINE void LL_FLASH_EnableDataCache(void) +{ + SET_BIT(FLASH->ACR, FLASH_ACR_DCEN); +} + +/** + * @brief Disable Data cache + * @rmtoll FLASH_ACR DCEN LL_FLASH_DisableDataCache + * @retval None + */ +__STATIC_INLINE void LL_FLASH_DisableDataCache(void) +{ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCEN); +} + +/** + * @brief Enable Instruction cache reset + * @note bit can be written only when the instruction cache is disabled + * @rmtoll FLASH_ACR ICRST LL_FLASH_EnableInstCacheReset + * @rmtoll FLASH_C2ACR ICRST LL_FLASH_EnableInstCacheReset + * @retval None + */ +__STATIC_INLINE void LL_FLASH_EnableInstCacheReset(void) +{ + SET_BIT(FLASH->ACR, FLASH_ACR_ICRST); +} + +/** + * @brief Disable Instruction cache reset + * @rmtoll FLASH_ACR ICRST LL_FLASH_DisableInstCacheReset + * @rmtoll FLASH_C2ACR ICRST LL_FLASH_DisableInstCacheReset + * @retval None + */ +__STATIC_INLINE void LL_FLASH_DisableInstCacheReset(void) +{ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_ICRST); +} + +/** + * @brief Enable Data cache reset + * @note bit can be written only when the data cache is disabled + * @rmtoll FLASH_ACR DCRST LL_FLASH_EnableDataCacheReset + * @retval None + */ +__STATIC_INLINE void LL_FLASH_EnableDataCacheReset(void) +{ + SET_BIT(FLASH->ACR, FLASH_ACR_DCRST); +} + +/** + * @brief Disable Data cache reset + * @rmtoll FLASH_ACR DCRST LL_FLASH_DisableDataCacheReset + * @retval None + */ +__STATIC_INLINE void LL_FLASH_DisableDataCacheReset(void) +{ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_DCRST); +} + +/** + * @brief Suspend new program or erase operation request + * @note Any new Flash program and erase operation on both CPU side will be suspended + * until this bit and the same bit in Flash CPU2 access control register (FLASH_C2ACR) are + * cleared. The PESD bit in both the Flash status register (FLASH_SR) and Flash + * CPU2 status register (FLASH_C2SR) register will be set when at least one PES + * bit in FLASH_ACR or FLASH_C2ACR is set. + * @rmtoll FLASH_ACR PES LL_FLASH_SuspendOperation + * @rmtoll FLASH_C2ACR PES LL_FLASH_SuspendOperation + * @retval None + */ +__STATIC_INLINE void LL_FLASH_SuspendOperation(void) +{ + SET_BIT(FLASH->ACR, FLASH_ACR_PES); +} + +/** + * @brief Allow new program or erase operation request + * @note Any new Flash program and erase operation on both CPU side will be allowed + * until one of this bit or the same bit in Flash CPU2 access control register (FLASH_C2ACR) is + * set. The PESD bit in both the Flash status register (FLASH_SR) and Flash + * CPU2 status register (FLASH_C2SR) register will be clear when both PES + * bit in FLASH_ACR or FLASH_C2ACR is cleared. + * @rmtoll FLASH_ACR PES LL_FLASH_AllowOperation + * @rmtoll FLASH_C2ACR PES LL_FLASH_AllowOperation + * @retval None + */ +__STATIC_INLINE void LL_FLASH_AllowOperation(void) +{ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_PES); +} + +/** + * @brief Check if new program or erase operation request from CPU2 is suspended + * @rmtoll FLASH_ACR PES LL_FLASH_IsOperationSuspended + * @rmtoll FLASH_C2ACR PES LL_FLASH_IsOperationSuspended + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FLASH_IsOperationSuspended(void) +{ + return ((READ_BIT(FLASH->ACR, FLASH_ACR_PES) == (FLASH_ACR_PES)) ? 1UL : 0UL); +} + +/** + * @brief Check if new program or erase operation request from CPU1 or CPU2 is suspended + * @rmtoll FLASH_SR PESD LL_FLASH_IsActiveFlag_OperationSuspended + * @rmtoll FLASH_C2SR PESD LL_FLASH_IsActiveFlag_OperationSuspended + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FLASH_IsActiveFlag_OperationSuspended(void) +{ + return ((READ_BIT(FLASH->SR, FLASH_SR_PESD) == (FLASH_SR_PESD)) ? 1UL : 0UL); +} + +/** + * @brief Set EMPTY flag information as Flash User area empty + * @rmtoll FLASH_ACR EMPTY LL_FLASH_SetEmptyFlag + * @retval None + */ +__STATIC_INLINE void LL_FLASH_SetEmptyFlag(void) +{ + SET_BIT(FLASH->ACR, FLASH_ACR_EMPTY); +} + +/** + * @brief Clear EMPTY flag information as Flash User area programmed + * @rmtoll FLASH_ACR EMPTY LL_FLASH_ClearEmptyFlag + * @retval None + */ +__STATIC_INLINE void LL_FLASH_ClearEmptyFlag(void) +{ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_EMPTY); +} + +/** + * @brief Check if the EMPTY flag is set or reset + * @rmtoll FLASH_ACR EMPTY LL_FLASH_IsEmptyFlag + * @retval State of bit (1 or 0). + */ +__STATIC_INLINE uint32_t LL_FLASH_IsEmptyFlag(void) +{ + return ((READ_BIT(FLASH->ACR, FLASH_ACR_EMPTY) == FLASH_ACR_EMPTY) ? 1UL : 0UL); +} + +/** + * @brief Get IPCC buffer base address + * @rmtoll FLASH_IPCCBR IPCCDBA LL_FLASH_GetIPCCBufferAddr + * @retval IPCC data buffer base address offset + */ +__STATIC_INLINE uint32_t LL_FLASH_GetIPCCBufferAddr(void) +{ + return (uint32_t)(READ_BIT(FLASH->IPCCBR, FLASH_IPCCBR_IPCCDBA)); +} + +/** + * @brief Get CPU2 boot reset vector + * @rmtoll FLASH_SRRVR SBRV LL_FLASH_GetC2BootResetVect + * @retval CPU2 boot reset vector + */ +__STATIC_INLINE uint32_t LL_FLASH_GetC2BootResetVect(void) +{ + return (uint32_t)(READ_BIT(FLASH->SRRVR, FLASH_SRRVR_SBRV)); +} + +/** + * @brief Return the Unique Device Number + * @note The 64-bit UID64 may be used by Firmware to derive BLE 48-bit Device Address EUI-48 or + * 802.15.4 64-bit Device Address EUI-64. + * @retval Values between Min_Data=0x00 and Max_Data=0xFFFF + */ +__STATIC_INLINE uint32_t LL_FLASH_GetUDN(void) +{ + return (uint32_t)(READ_REG(*((uint32_t *)UID64_BASE))); +} + +/** + * @brief Return the Device ID + * @note The 64-bit UID64 may be used by Firmware to derive BLE 48-bit Device Address EUI-48 or + * 802.15.4 64-bit Device Address EUI-64. + * For STM32WBxxxx devices, the device ID is 0x26 + * @retval Values between Min_Data=0x00 and Max_Data=0xFF (ex: Device ID is 0x26 for STM32WB55x) + */ +__STATIC_INLINE uint32_t LL_FLASH_GetDeviceID(void) +{ + return (uint32_t)((READ_REG(*((uint32_t *)UID64_BASE + 1U))) & 0x000000FFU); +} + +/** + * @brief Return the ST Company ID + * @note The 64-bit UID64 may be used by Firmware to derive BLE 48-bit Device Address EUI-48 or + * 802.15.4 64-bit Device Address EUI-64. + * For STM32WBxxxx devices, the ST Company ID is 0x0080E1 + * @retval Values between Min_Data=0x00 and Max_Data=0xFFFFFF (ex: ST Company ID is 0x0080E1) + */ +__STATIC_INLINE uint32_t LL_FLASH_GetSTCompanyID(void) +{ + return (uint32_t)(((READ_REG(*((uint32_t *)UID64_BASE + 1U))) >> 8U) & 0x00FFFFFFU); +} +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* defined (FLASH) || defined (SYSCFG) || defined (DBGMCU) || defined (VREFBUF) */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_SYSTEM_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h new file mode 100644 index 0000000..f9d186e --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Inc/stm32wbxx_ll_utils.h @@ -0,0 +1,312 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_utils.h + * @author MCD Application Team + * @brief Header file of UTILS LL module. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + The LL UTILS driver contains a set of generic APIs that can be + used by user: + (+) Device electronic signature + (+) Timing functions + (+) PLL configuration functions + + @endverbatim + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32WBxx_LL_UTILS_H +#define STM32WBxx_LL_UTILS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx.h" + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +/** @defgroup UTILS_LL UTILS + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/* Private constants ---------------------------------------------------------*/ +/** @defgroup UTILS_LL_Private_Constants UTILS Private Constants + * @{ + */ + +/* Max delay can be used in LL_mDelay */ +#define LL_MAX_DELAY 0xFFFFFFFFU + +/** + * @brief Unique device ID register base address + */ +#define UID_BASE_ADDRESS UID_BASE + +/** + * @brief Flash size data register base address + */ +#define FLASHSIZE_BASE_ADDRESS FLASHSIZE_BASE + +/** + * @brief Package data register base address + */ +#define PACKAGE_BASE_ADDRESS PACKAGE_BASE + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup UTILS_LL_Private_Macros UTILS Private Macros + * @{ + */ +/** + * @} + */ +/* Exported types ------------------------------------------------------------*/ +/** @defgroup UTILS_LL_ES_INIT UTILS Exported structures + * @{ + */ +/** + * @brief UTILS PLL structure definition + */ +typedef struct +{ + uint32_t PLLM; /*!< Division factor for PLL VCO input clock. + This parameter can be a value of @ref RCC_LL_EC_PLLM_DIV. + + This feature can be modified afterwards using unitary function + @ref LL_RCC_PLL_ConfigDomain_SYS(). */ + + uint32_t PLLN; /*!< Multiplication factor for PLL VCO output clock. + This parameter must be a number between Min_Data = 6 and Max_Data = 127. + + This feature can be modified afterwards using unitary function + @ref LL_RCC_PLL_ConfigDomain_SYS(). */ + + uint32_t PLLR; /*!< Division for the main system clock. + This parameter can be a value of @ref RCC_LL_EC_PLLR_DIV. + + This feature can be modified afterwards using unitary function + @ref LL_RCC_PLL_ConfigDomain_SYS(). */ +} LL_UTILS_PLLInitTypeDef; + +/** + * @brief UTILS System, AHB and APB buses clock configuration structure definition + */ +typedef struct +{ + uint32_t CPU1CLKDivider; /*!< The CPU1 clock (HCLK1) divider. This clock is derived from the system clock (SYSCLK). + This parameter can be a value of @ref RCC_LL_EC_SYSCLK_DIV. + + This feature can be modified afterwards using unitary function + @ref LL_RCC_SetAHBPrescaler(). */ + + uint32_t CPU2CLKDivider; /*!< The CPU2 clock (HCLK2) divider. This clock is derived from the system clock (SYSCLK). + This parameter can be a value of @ref RCC_LL_EC_SYSCLK_DIV. + + This feature can be modified afterwards using unitary function + @ref LL_C2_RCC_SetAHBPrescaler(). */ + + uint32_t AHB4CLKDivider; /*!< The AHBS clock (HCLK4) divider. This clock is derived from the system clock (SYSCLK). + This parameter can be a value of @ref RCC_LL_EC_SYSCLK_DIV. + + This feature can be modified afterwards using unitary function + @ref LL_RCC_SetAHB4Prescaler(). */ + + uint32_t APB1CLKDivider; /*!< The APB1 clock (PCLK1) divider. This clock is derived from the AHB clock (HCLK1). + This parameter can be a value of @ref RCC_LL_EC_APB1_DIV. + + This feature can be modified afterwards using unitary function + @ref LL_RCC_SetAPB1Prescaler(). */ + + uint32_t APB2CLKDivider; /*!< The APB2 clock (PCLK2) divider. This clock is derived from the AHB clock (HCLK1). + This parameter can be a value of @ref RCC_LL_EC_APB2_DIV. + + This feature can be modified afterwards using unitary function + @ref LL_RCC_SetAPB2Prescaler(). */ + +} LL_UTILS_ClkInitTypeDef; + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ +/** @defgroup UTILS_LL_Exported_Constants UTILS Exported Constants + * @{ + */ + +/** @defgroup UTILS_EC_HSE_BYPASS HSE Bypass activation + * @{ + */ +#define LL_UTILS_HSEBYPASS_OFF 0x00000000U /*!< HSE Bypass is not enabled */ +#define LL_UTILS_HSEBYPASS_ON 0x00000001U /*!< HSE Bypass is enabled */ +/** + * @} + */ + +/** @defgroup UTILS_EC_PACKAGETYPE PACKAGE TYPE + * @{ + */ +#define LL_UTILS_PACKAGETYPE_CSP100 0x00000011U /*!< CSP100/BGA129 package type */ +#define LL_UTILS_PACKAGETYPE_QFN68 0x00000013U /*!< QFN68 package type */ +#define LL_UTILS_PACKAGETYPE_QFN48 0x0000000AU /*!< QFN48 package type */ + +/** + * @} + */ + +/** + * @} + */ + +/* Exported macro ------------------------------------------------------------*/ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup UTILS_LL_Exported_Functions UTILS Exported Functions + * @{ + */ + +/** @defgroup UTILS_EF_DEVICE_ELECTRONIC_SIGNATURE DEVICE ELECTRONIC SIGNATURE + * @{ + */ +/** + * @brief Get Word0 of the unique device identifier (UID based on 96 bits) + * @retval UID[31:0]: X and Y coordinates on the wafer expressed in BCD format + */ +__STATIC_INLINE uint32_t LL_GetUID_Word0(void) +{ + return (uint32_t)(READ_REG(*((uint32_t *)UID_BASE_ADDRESS))); +} + +/** + * @brief Get Word1 of the unique device identifier (UID based on 96 bits) + * @retval UID[63:32]: Wafer number (UID[39:32]) & LOT_NUM[23:0] (UID[63:40]) + */ +__STATIC_INLINE uint32_t LL_GetUID_Word1(void) +{ + return (uint32_t)(READ_REG(*((uint32_t *)(UID_BASE_ADDRESS + 4U)))); +} + +/** + * @brief Get Word2 of the unique device identifier (UID based on 96 bits) + * @retval UID[95:64]: Lot number (ASCII encoded) - LOT_NUM[55:24] + */ +__STATIC_INLINE uint32_t LL_GetUID_Word2(void) +{ + return (uint32_t)(READ_REG(*((uint32_t *)(UID_BASE_ADDRESS + 8U)))); +} + +/** + * @brief Get Flash memory size + * @note This bitfield indicates the size of the device Flash memory expressed in + * Kbytes. As an example, 0x040 corresponds to 64 Kbytes. + * @retval FLASH_SIZE[15:0]: Flash memory size + */ +__STATIC_INLINE uint32_t LL_GetFlashSize(void) +{ + return (uint32_t)(READ_REG(*((uint32_t *)FLASHSIZE_BASE_ADDRESS)) & 0x0000FFFFUL); +} + +/** + * @brief Get Package type + * @retval Returned value can be one of the following values: + * @arg @ref LL_UTILS_PACKAGETYPE_CSP100 + * @arg @ref LL_UTILS_PACKAGETYPE_QFN68 + * @arg @ref LL_UTILS_PACKAGETYPE_QFN48 + * + */ +__STATIC_INLINE uint32_t LL_GetPackageType(void) +{ + return (uint32_t)(READ_REG(*((uint32_t *)PACKAGE_BASE_ADDRESS)) & 0x1FU); +} + +/** + * @} + */ + +/** @defgroup UTILS_LL_EF_DELAY DELAY + * @{ + */ +/** + * @brief This function configures the Cortex-M SysTick source of the time base. + * @param HCLKFrequency HCLK frequency in Hz (can be calculated thanks to RCC helper macro or function @ref LL_RCC_GetSystemClocksFreq (HCLK1_Frequency field)) + * @note When a RTOS is used, it is recommended to avoid changing the SysTick + * configuration by calling this function, for a delay use rather osDelay RTOS service. + * @param Ticks Frequency of Ticks (Hz) + * @retval None + */ +__STATIC_INLINE void LL_InitTick(uint32_t HCLKFrequency, uint32_t Ticks) +{ + /* Configure the SysTick to have interrupt in 1ms time base */ + SysTick->LOAD = (uint32_t)((HCLKFrequency / Ticks) - 1UL); /* set reload register */ + SysTick->VAL = 0UL; /* Load the SysTick Counter Value */ + SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | + SysTick_CTRL_ENABLE_Msk; /* Enable the Systick Timer */ +} + +void LL_Init1msTick(uint32_t HCLKFrequency); + +void LL_mDelay(uint32_t Delay); + +/** + * @} + */ + +/** @defgroup UTILS_EF_SYSTEM SYSTEM + * @{ + */ + +void LL_SetSystemCoreClock(uint32_t HCLKFrequency); +ErrorStatus LL_SetFlashLatency(uint32_t HCLK4Frequency); +ErrorStatus LL_PLL_ConfigSystemClock_MSI(LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct, + LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct); +ErrorStatus LL_PLL_ConfigSystemClock_HSI(LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct, + LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct); +ErrorStatus LL_PLL_ConfigSystemClock_HSE(uint32_t HSEBypass, + LL_UTILS_PLLInitTypeDef *UTILS_PLLInitStruct, LL_UTILS_ClkInitTypeDef *UTILS_ClkInitStruct); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* STM32WBxx_LL_UTILS_H */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/LICENSE.txt b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/LICENSE.txt new file mode 100644 index 0000000..3edc4d1 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/LICENSE.txt @@ -0,0 +1,6 @@ +This software component is provided to you as part of a software package and +applicable license terms are in the Package_license file. If you received this +software component outside of a package or without applicable license terms, +the terms of the BSD-3-Clause license shall apply. +You may obtain a copy of the BSD-3-Clause at: +https://opensource.org/licenses/BSD-3-Clause diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c new file mode 100644 index 0000000..c848af1 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c @@ -0,0 +1,852 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal.c + * @author MCD Application Team + * @brief HAL module driver. + * This is the common part of the HAL initialization + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + The common HAL driver contains a set of generic and common APIs that can be + used by the PPP peripheral drivers and the user to start using the HAL. + [..] + The HAL contains two APIs' categories: + (+) Common HAL APIs + (+) Services HAL APIs + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup HAL + * @brief HAL module driver + * @{ + */ + +#ifdef HAL_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ + +/** @defgroup HAL_Private_Constants HAL Private Constants + * @{ + */ +/** + * @brief STM32WBxx HAL Driver version number + */ +#define __STM32WBxx_HAL_VERSION_MAIN (0x01U) /*!< [31:24] main version */ +#define __STM32WBxx_HAL_VERSION_SUB1 (0x0EU) /*!< [23:16] sub1 version */ +#define __STM32WBxx_HAL_VERSION_SUB2 (0x06U) /*!< [15:8] sub2 version */ +#define __STM32WBxx_HAL_VERSION_RC (0x00U) /*!< [7:0] release candidate */ +#define __STM32WBxx_HAL_VERSION ((__STM32WBxx_HAL_VERSION_MAIN << 24U)\ + |(__STM32WBxx_HAL_VERSION_SUB1 << 16U)\ + |(__STM32WBxx_HAL_VERSION_SUB2 << 8U )\ + |(__STM32WBxx_HAL_VERSION_RC)) + +#if defined(VREFBUF) +#define VREFBUF_TIMEOUT_VALUE 10U /* 10 ms */ +#endif /* VREFBUF */ + +/** + * @} + */ + +/* Private macro -------------------------------------------------------------*/ +/* Exported variables ---------------------------------------------------------*/ +/** @defgroup HAL_Exported_Variables HAL Exported Variables + * @{ + */ +__IO uint32_t uwTick; +uint32_t uwTickPrio = (1UL << __NVIC_PRIO_BITS); /* Invalid PRIO */ +HAL_TickFreqTypeDef uwTickFreq = HAL_TICK_FREQ_DEFAULT; /* 1KHz */ +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ + +/** @addtogroup HAL_Exported_Functions + * @{ + */ + +/** @addtogroup HAL_Exported_Functions_Group1 + * @brief HAL Initialization and Configuration functions + * +@verbatim + =============================================================================== + ##### HAL Initialization and Configuration functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Initialize the Flash interface the NVIC allocation and initial time base + clock configuration. + (+) De-initialize common part of the HAL. + (+) Configure the time base source to have 1ms time base with a dedicated + Tick interrupt priority. + (++) SysTick timer is used by default as source of time base, but user + can eventually implement his proper time base source (a general purpose + timer for example or other time source), keeping in mind that Time base + duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and + handled in milliseconds basis. + (++) Time base configuration function (HAL_InitTick ()) is called automatically + at the beginning of the program after reset by HAL_Init() or at any time + when clock is configured, by HAL_RCC_ClockConfig(). + (++) Source of time base is configured to generate interrupts at regular + time intervals. Care must be taken if HAL_Delay() is called from a + peripheral ISR process, the Tick interrupt line must have higher priority + (numerically lower) than the peripheral interrupt. Otherwise the caller + ISR process will be blocked. + (++) functions affecting time base configurations are declared as __weak + to make override possible in case of other implementations in user file. +@endverbatim + * @{ + */ + +/** + * @brief This function is used to initialize the HAL Library; it must be the first + * instruction to be executed in the main program (before to call any other + * HAL function), it performs the following: + * Configure the Flash prefetch, instruction and Data caches. + * Configures the SysTick to generate an interrupt each 1 millisecond, + * which is clocked by the MSI (at this stage, the clock is not yet + * configured and thus the system is running from the internal MSI at 4 MHz). + * Set NVIC Group Priority to 4. + * Calls the HAL_MspInit() callback function defined in user file + * "stm32wbxx_hal_msp.c" to do the global low level hardware initialization + * + * @note SysTick is used as time base for the HAL_Delay() function, the application + * 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) +{ + HAL_StatusTypeDef status = HAL_OK; + /* Configure Flash prefetch, Instruction cache, Data cache */ + /* Default configuration at reset is: */ + /* - Prefetch disabled */ + /* - Instruction cache enabled */ + /* - Data cache enabled */ +#if (INSTRUCTION_CACHE_ENABLE == 0U) + __HAL_FLASH_INSTRUCTION_CACHE_DISABLE(); +#endif /* INSTRUCTION_CACHE_ENABLE */ + +#if (DATA_CACHE_ENABLE == 0U) + __HAL_FLASH_DATA_CACHE_DISABLE(); +#endif /* DATA_CACHE_ENABLE */ + +#if (PREFETCH_ENABLE != 0U) + __HAL_FLASH_PREFETCH_BUFFER_ENABLE(); +#endif /* PREFETCH_ENABLE */ + + /* Set Interrupt Group Priority */ + HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); + + /* Use SysTick as time base source and configure 1ms tick (default clock after Reset is MSI) */ + if (HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK) + { + status = HAL_ERROR; + } + else + { + /* Init the low level hardware */ + HAL_MspInit(); + } + + /* Return function status */ + return status; +} + +/** + * @brief This function de-Initializes common part of the HAL and stops the source of time base. + * @note This function is optional. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DeInit(void) +{ + /* Reset of all peripherals */ + __HAL_RCC_APB1_FORCE_RESET(); + __HAL_RCC_APB1_RELEASE_RESET(); + + __HAL_RCC_APB2_FORCE_RESET(); + __HAL_RCC_APB2_RELEASE_RESET(); + + __HAL_RCC_APB3_FORCE_RESET(); + __HAL_RCC_APB3_RELEASE_RESET(); + + __HAL_RCC_AHB1_FORCE_RESET(); + __HAL_RCC_AHB1_RELEASE_RESET(); + + __HAL_RCC_AHB2_FORCE_RESET(); + __HAL_RCC_AHB2_RELEASE_RESET(); + + __HAL_RCC_AHB3_FORCE_RESET(); + __HAL_RCC_AHB3_RELEASE_RESET(); + + /* De-Init the low level hardware */ + HAL_MspDeInit(); + + /* Return function status */ + return HAL_OK; +} + +/** + * @brief Initialize the MSP. + * @retval None + */ +__weak void HAL_MspInit(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_MspInit could be implemented in the user file + */ +} + +/** + * @brief DeInitializes the MSP. + * @retval None + */ +__weak void HAL_MspDeInit(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_MspDeInit could be implemented in the user file + */ +} + +/** + * @brief This function configures the source of the time base: + * The time source is configured to have 1ms time base with a dedicated + * Tick interrupt priority. + * @note This function is called automatically at the beginning of program after + * reset by HAL_Init() or at any time when clock is reconfigured by HAL_RCC_ClockConfig(). + * @note In the default implementation, SysTick timer is the source of time base. + * It is used to generate interrupts at regular time intervals. + * Care must be taken if HAL_Delay() is called from a peripheral ISR process, + * The SysTick interrupt must have higher priority (numerically lower) + * than the peripheral interrupt. Otherwise the caller ISR process will be blocked. + * The function is declared as __weak to be overwritten in case of other + * implementation in user file. + * @param TickPriority Tick interrupt priority. + * @retval HAL status + */ +__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority) +{ + HAL_StatusTypeDef status = HAL_OK; + + if ((uint32_t)uwTickFreq != 0U) + { + /*Configure the SysTick to have interrupt in 1ms time basis*/ + if (HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq() / (1000U / (uint32_t)uwTickFreq)) == 0U) + { + /* Configure the SysTick IRQ priority */ + if (TickPriority < (1UL << __NVIC_PRIO_BITS)) + { + HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U); + uwTickPrio = TickPriority; + } + else + { + status = HAL_ERROR; + } + } + else + { + status = HAL_ERROR; + } + } + else + { + status = HAL_ERROR; + } + + /* Return function status */ + return status; +} + +/** + * @} + */ + +/** @addtogroup HAL_Exported_Functions_Group2 + * @brief HAL Control functions + * +@verbatim + =============================================================================== + ##### HAL Control functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Provide a tick value in millisecond + (+) Provide a blocking delay in millisecond + (+) Suspend the time base source interrupt + (+) Resume the time base source interrupt + (+) Get the HAL API driver version + (+) Get the device revision identifier + (+) Get the device identifier + (+) Get the unique device identifier + +@endverbatim + * @{ + */ + +/** + * @brief This function is called to increment a global variable "uwTick" + * used as application time base. + * @note In the default implementation, this variable is incremented each 1ms + * in SysTick ISR. + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @retval None + */ +__weak void HAL_IncTick(void) +{ + uwTick += (uint32_t)uwTickFreq; +} + +/** + * @brief Provides a tick value in millisecond. + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @retval tick value + */ +__weak uint32_t HAL_GetTick(void) +{ + return uwTick; +} + +/** + * @brief This function returns a tick priority. + * @retval tick priority + */ +uint32_t HAL_GetTickPrio(void) +{ + return uwTickPrio; +} + +/** + * @brief Set new tick Freq. + * @retval Status + */ +HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq) +{ + HAL_StatusTypeDef status = HAL_OK; + HAL_TickFreqTypeDef prevTickFreq; + + assert_param(IS_TICKFREQ(Freq)); + + if (uwTickFreq != Freq) + { + /* Back up uwTickFreq frequency */ + prevTickFreq = uwTickFreq; + + /* Update uwTickFreq global variable used by HAL_InitTick() */ + uwTickFreq = Freq; + + /* Apply the new tick Freq */ + status = HAL_InitTick(uwTickPrio); + + if (status != HAL_OK) + { + /* Restore previous tick frequency */ + uwTickFreq = prevTickFreq; + } + } + + return status; +} + +/** + * @brief Return tick frequency. + * @retval Tick frequency. + * Value of @ref HAL_TickFreqTypeDef. + */ +HAL_TickFreqTypeDef HAL_GetTickFreq(void) +{ + return uwTickFreq; +} + +/** + * @brief This function provides minimum delay (in milliseconds) based + * on variable incremented. + * @note In the default implementation , SysTick timer is the source of time base. + * It is used to generate interrupts at regular time intervals where uwTick + * is incremented. + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @param Delay specifies the delay time length, in milliseconds. + * @retval None + */ +__weak void HAL_Delay(uint32_t Delay) +{ + uint32_t tickstart = HAL_GetTick(); + uint32_t wait = Delay; + + /* Add a freq to guarantee minimum wait */ + if (wait < HAL_MAX_DELAY) + { + wait += (uint32_t)(uwTickFreq); + } + + while ((HAL_GetTick() - tickstart) < wait) + { + } +} + + +/** + * @brief Suspend Tick increment. + * @note In the default implementation , SysTick timer is the source of time base. It is + * used to generate interrupts at regular time intervals. Once HAL_SuspendTick() + * is called, the SysTick interrupt will be disabled and so Tick increment + * is suspended. + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @retval None + */ +__weak void HAL_SuspendTick(void) +{ + /* Disable SysTick Interrupt */ + CLEAR_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk); +} + +/** + * @brief Resume Tick increment. + * @note In the default implementation , SysTick timer is the source of time base. It is + * used to generate interrupts at regular time intervals. Once HAL_ResumeTick() + * is called, the SysTick interrupt will be enabled and so Tick increment + * is resumed. + * @note This function is declared as __weak to be overwritten in case of other + * implementations in user file. + * @retval None + */ +__weak void HAL_ResumeTick(void) +{ + /* Enable SysTick Interrupt */ + SET_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk); +} + +/** + * @brief Returns the HAL revision + * @retval version : 0xXYZR (8bits for each decimal, R for RC) + */ +uint32_t HAL_GetHalVersion(void) +{ + return __STM32WBxx_HAL_VERSION; +} + +/** + * @brief Returns the device revision identifier. + * @retval Device revision identifier + */ +uint32_t HAL_GetREVID(void) +{ + return (LL_DBGMCU_GetRevisionID()); +} + +/** + * @brief Returns the device identifier. + * @retval Device identifier + */ +uint32_t HAL_GetDEVID(void) +{ + return (LL_DBGMCU_GetDeviceID()); +} + +/** + * @brief Return the first word of the unique device identifier (UID based on 96 bits) + * @retval Device identifier + */ +uint32_t HAL_GetUIDw0(void) +{ + return (READ_REG(*((uint32_t *)UID_BASE))); +} + +/** + * @brief Return the second word of the unique device identifier (UID based on 96 bits) + * @retval Device identifier + */ +uint32_t HAL_GetUIDw1(void) +{ + return (READ_REG(*((uint32_t *)(UID_BASE + 4U)))); +} + +/** + * @brief Return the third word of the unique device identifier (UID based on 96 bits) + * @retval Device identifier + */ +uint32_t HAL_GetUIDw2(void) +{ + return (READ_REG(*((uint32_t *)(UID_BASE + 8U)))); +} + +/** + * @} + */ + +/** @addtogroup HAL_Exported_Functions_Group3 + * @brief HAL Debug functions + * +@verbatim + =============================================================================== + ##### HAL Debug functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Enable/Disable Debug module during SLEEP mode + (+) Enable/Disable Debug module during STOP mode + (+) Enable/Disable Debug module during STANDBY mode + +@endverbatim + * @{ + */ + +/** + * @brief Enable the Debug Module during SLEEP mode + * @retval None + */ +void HAL_DBGMCU_EnableDBGSleepMode(void) +{ + LL_DBGMCU_EnableDBGSleepMode(); +} + +/** + * @brief Disable the Debug Module during SLEEP mode + * @retval None + */ +void HAL_DBGMCU_DisableDBGSleepMode(void) +{ + LL_DBGMCU_DisableDBGSleepMode(); +} + +/** + * @brief Enable the Debug Module during STOP mode + * @retval None + */ +void HAL_DBGMCU_EnableDBGStopMode(void) +{ + LL_DBGMCU_EnableDBGStopMode(); +} + +/** + * @brief Disable the Debug Module during STOP mode + * @retval None + */ +void HAL_DBGMCU_DisableDBGStopMode(void) +{ + LL_DBGMCU_DisableDBGStopMode(); +} + +/** + * @brief Enable the Debug Module during STANDBY mode + * @retval None + */ +void HAL_DBGMCU_EnableDBGStandbyMode(void) +{ + LL_DBGMCU_EnableDBGStandbyMode(); +} + +/** + * @brief Disable the Debug Module during STANDBY mode + * @retval None + */ +void HAL_DBGMCU_DisableDBGStandbyMode(void) +{ + LL_DBGMCU_DisableDBGStandbyMode(); +} + +/** + * @} + */ + +/** @defgroup HAL_Exported_Functions_Group4 HAL System Configuration functions + * @brief HAL System Configuration functions + * +@verbatim + =============================================================================== + ##### HAL system configuration functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Start a hardware SRAM2 erase operation + (+) Disable CPU2 SRAM fetch (execution) + (+) Configure the Voltage reference buffer + (+) Enable/Disable the Voltage reference buffer + (+) Enable/Disable the I/O analog switch voltage booster + (+) Enable/Disable the access for security IP (AES1, AES2, PKA, RNG) + (+) Enable/Disable the access for security IP (AES2, PKA, RNG) + +@endverbatim + * @{ + */ + +/** + * @brief Start a hardware SRAM2 erase operation. + * @note As long as SRAM2 is not erased the SRAM2ER bit will be set. + * This bit is automatically reset at the end of the SRAM2 erase operation. + * @retval None + */ +void HAL_SYSCFG_SRAM2Erase(void) +{ + /* unlock the write protection of the SRAM2ER bit */ + __HAL_SYSCFG_SRAM2_WRP_UNLOCK(); + /* Starts a hardware SRAM2 erase operation*/ + __HAL_SYSCFG_SRAM2_ERASE(); +} + +/** + * @brief Disable CPU2 SRAM fetch (execution) (This bit can be set by Firmware + * and will only be reset by a Hardware reset, including a reset after Standby.) + * @note Firmware writing 0 has no effect. + * @retval None + */ +void HAL_SYSCFG_DisableSRAMFetch(void) +{ + LL_SYSCFG_DisableSRAMFetch(); +} + +/** + * @brief Check if CPU2 SRAM fetch is enabled + * @retval State of bit (1 or 0). + */ +uint32_t HAL_SYSCFG_IsEnabledSRAMFetch(void) +{ + return (LL_SYSCFG_IsEnabledSRAMFetch()); +} + +#if defined(VREFBUF) +/** + * @brief Configure the internal voltage reference buffer voltage scale. + * @param VoltageScaling specifies the output voltage to achieve + * This parameter can be one of the following values: + * @arg @ref SYSCFG_VREFBUF_VOLTAGE_SCALE0 : VREF_OUT1 around 2.048 V. + * This requires VDDA equal to or higher than 2.4 V. + * @arg @ref SYSCFG_VREFBUF_VOLTAGE_SCALE1 : VREF_OUT1 around 2.5 V. + * This requires VDDA equal to or higher than 2.8 V. + * @note Retrieve the TrimmingValue from factory located at + * VREFBUF_SC0_CAL_ADDR or VREFBUF_SC1_CAL_ADDR addresses. + * @retval None + */ +void HAL_SYSCFG_VREFBUF_VoltageScalingConfig(uint32_t VoltageScaling) +{ + uint32_t TrimmingValue; + + /* Check the parameters */ + assert_param(IS_SYSCFG_VREFBUF_VOLTAGE_SCALE(VoltageScaling)); + + LL_VREFBUF_SetVoltageScaling(VoltageScaling); + + /* Restrieve Calibration data and store them into trimming field */ + if (VoltageScaling == SYSCFG_VREFBUF_VOLTAGE_SCALE0) + { + TrimmingValue = ((uint32_t) * VREFBUF_SC0_CAL_ADDR) & 0x3FU; + } + else + { + TrimmingValue = ((uint32_t) * VREFBUF_SC1_CAL_ADDR) & 0x3FU; + } + assert_param(IS_SYSCFG_VREFBUF_TRIMMING(TrimmingValue)); + + HAL_SYSCFG_VREFBUF_TrimmingConfig(TrimmingValue); +} + +/** + * @brief Configure the internal voltage reference buffer high impedance mode. + * @param Mode specifies the high impedance mode + * This parameter can be one of the following values: + * @arg @ref SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE : VREF+ pin is internally connect to VREFINT output. + * @arg @ref SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE : VREF+ pin is high impedance. + * @retval HAL_OK/HAL_TIMEOUT + */ +void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode) +{ + + /* Check the parameters */ + assert_param(IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE(Mode)); + + MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_HIZ, Mode); +} + +/** + * @brief Tune the Internal Voltage Reference buffer (VREFBUF). + * @note Each VrefBuf voltage scale is calibrated in production for each device, + * data stored in flash memory. + * Function @ref HAL_SYSCFG_VREFBUF_VoltageScalingConfig retrieves and + * applies this calibration data as trimming value at each scale change. + * Therefore, optionally, function @ref HAL_SYSCFG_VREFBUF_TrimmingConfig + * can be used in a second time to fine tune the trimming. + * @param TrimmingValue specifies trimming code for VREFBUF calibration + * This parameter can be a number between Min_Data = 0x00 and Max_Data = 0x3F + * @retval None + */ +void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue) +{ + /* Check the parameters */ + assert_param(IS_SYSCFG_VREFBUF_TRIMMING(TrimmingValue)); + + LL_VREFBUF_SetTrimming(TrimmingValue); + +} + +/** + * @brief Enable the Internal Voltage Reference buffer (VREFBUF). + * @retval HAL_OK/HAL_TIMEOUT + */ +HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF(void) +{ + uint32_t tickstart; + + LL_VREFBUF_Enable(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait for VRR bit */ + while (READ_BIT(VREFBUF->CSR, VREFBUF_CSR_VRR) == 0U) + { + if ((HAL_GetTick() - tickstart) > VREFBUF_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + return HAL_OK; +} + +/** + * @brief Disable the Internal Voltage Reference buffer (VREFBUF). + * + * @retval None + */ +void HAL_SYSCFG_DisableVREFBUF(void) +{ + LL_VREFBUF_Disable(); +} +#endif /* VREFBUF */ + +/** + * @brief Enable the I/O analog switch voltage booster + * + * @retval None + */ +void HAL_SYSCFG_EnableIOBooster(void) +{ + LL_SYSCFG_EnableAnalogBooster(); +} + +/** + * @brief Disable the I/O analog switch voltage booster + * + * @retval None + */ +void HAL_SYSCFG_DisableIOBooster(void) +{ + LL_SYSCFG_DisableAnalogBooster(); +} + +#if defined(SYSCFG_CFGR1_ANASWVDD) +/** + * @brief Enable the I/O analog switch supplied by VDD + * @note To be used when I/O analog switch voltage booster is not enabled + * @retval None + */ +void HAL_SYSCFG_EnableIOVdd(void) +{ + LL_SYSCFG_EnableAnalogGpioSwitch(); +} + +/** + * @brief Disable the I/O analog switch supplied by VDD + * + * @retval None + */ +void HAL_SYSCFG_DisableIOVdd(void) +{ + LL_SYSCFG_DisableAnalogGpioSwitch(); +} +#endif /* SYSCFG_CFGR1_ANASWVDD */ + +/** + * @brief Enable the access for security IP + * @note When the system is secure (ESE = 1), this register provides write access security and can + * only be written by the CPU2. A write access from the CPU1 will be ignored and a bus error + * is generated. + * @param SecurityAccess This parameter can be a combination of the following values: + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_AES1 + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_AES2 + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_PKA + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_RNG + * @retval None + */ +void HAL_SYSCFG_EnableSecurityAccess(uint32_t SecurityAccess) +{ + /* Check the parameters */ + assert_param(IS_SYSCFG_SECURITY_ACCESS(SecurityAccess)); + + LL_SYSCFG_EnableSecurityAccess(SecurityAccess); +} + +/** + * @brief Disable the access for security IP + * @note When the system is secure (ESE = 1), this register provides write access security and can + * only be written by the CPU2. A write access from the CPU1 will be ignored and a bus error + * is generated. + * @param SecurityAccess This parameter can be a combination of the following values: + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_AES1 + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_AES2 + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_PKA + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_RNG + * @retval None + */ +void HAL_SYSCFG_DisableSecurityAccess(uint32_t SecurityAccess) +{ + /* Check the parameters */ + assert_param(IS_SYSCFG_SECURITY_ACCESS(SecurityAccess)); + + LL_SYSCFG_DisableSecurityAccess(SecurityAccess); +} + +/** + * @brief Indicate if access for security IP is enabled + * @param SecurityAccess This parameter can be one of the following values: + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_AES1 + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_AES2 + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_PKA + * @arg @ref HAL_SYSCFG_SECURE_ACCESS_RNG + * @retval State of bit (1 or 0). + */ +uint32_t HAL_SYSCFG_IsEnabledSecurityAccess(uint32_t SecurityAccess) +{ + return (LL_SYSCFG_IsEnabledSecurityAccess(SecurityAccess)); +} +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c new file mode 100644 index 0000000..5c34a39 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c @@ -0,0 +1,505 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_cortex.c + * @author MCD Application Team + * @brief CORTEX HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the CORTEX: + * + Initialization and Configuration functions + * + Peripheral Control functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + *** How to configure Interrupts using CORTEX HAL driver *** + =========================================================== + [..] + This section provides functions allowing to configure the NVIC interrupts (IRQ). + The Cortex M0+ exceptions are managed by CMSIS functions. + (#) Enable and Configure the priority of the selected IRQ Channels. + The priority can be 0..3. + + -@- Lower priority values gives higher priority. + -@- Priority Order: + (#@) Lowest priority. + (#@) Lowest hardware priority (IRQn position). + + (#) Configure the priority of the selected IRQ Channels using HAL_NVIC_SetPriority() + + (#) Enable the selected IRQ Channels using HAL_NVIC_EnableIRQ() + + -@- Negative value of IRQn_Type are not allowed. + + *** How to configure Systick using CORTEX HAL driver *** + ======================================================== + [..] + Setup SysTick Timer for time base. + + (+) The HAL_SYSTICK_Config() function calls the SysTick_Config() function which + is a CMSIS function that: + (++) Configures the SysTick Reload register with value passed as function parameter. + (++) Configures the SysTick IRQ priority to the lowest value (0x03). + (++) Resets the SysTick Counter register. + (++) Configures the SysTick Counter clock source to be Core Clock Source (HCLK). + (++) Enables the SysTick Interrupt. + (++) Starts the SysTick Counter. + + (+) You can change the SysTick Clock source to be HCLK_Div8 by calling the macro + __HAL_CORTEX_SYSTICKCLK_CONFIG(SYSTICK_CLKSOURCE_HCLK_DIV8) just after the + HAL_SYSTICK_Config() function call. The __HAL_CORTEX_SYSTICKCLK_CONFIG() macro is defined + inside the stm32wbxx_hal_cortex.h file. + + (+) You can change the SysTick IRQ priority by calling the + HAL_NVIC_SetPriority(SysTick_IRQn,...) function just after the HAL_SYSTICK_Config() function + call. The HAL_NVIC_SetPriority() call the NVIC_SetPriority() function which is a CMSIS function. + + (+) To adjust the SysTick time base, use the following formula: + + Reload Value = SysTick Counter Clock (Hz) x Desired Time base (s) + (++) Reload Value is the parameter to be passed for HAL_SYSTICK_Config() function + (++) Reload Value should not exceed 0xFFFFFF + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup CORTEX + * @{ + */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ + +/** @addtogroup CORTEX_Exported_Functions + * @{ + */ + + +/** @addtogroup CORTEX_Exported_Functions_Group1 + * @brief Initialization and Configuration functions + * +@verbatim + ============================================================================== + ##### Initialization and Configuration functions ##### + ============================================================================== + [..] + This section provides the CORTEX HAL driver functions allowing to configure Interrupts + SysTick functionalities + +@endverbatim + * @{ + */ + +/** + * @brief Set the priority grouping field (pre-emption priority and subpriority) + * using the required unlock sequence. + * @param PriorityGroup The priority grouping bits length. + * This parameter can be one of the following values: + * @arg NVIC_PRIORITYGROUP_0: 0 bit for pre-emption priority, + * 4 bits for subpriority + * @arg NVIC_PRIORITYGROUP_1: 1 bit for pre-emption priority, + * 3 bits for subpriority + * @arg NVIC_PRIORITYGROUP_2: 2 bits for pre-emption priority, + * 2 bits for subpriority + * @arg NVIC_PRIORITYGROUP_3: 3 bits for pre-emption priority, + * 1 bit for subpriority + * @arg NVIC_PRIORITYGROUP_4: 4 bits for pre-emption priority, + * 0 bit for subpriority + * @note When the NVIC_PriorityGroup_0 is selected, IRQ pre-emption is no more possible. + * The pending IRQ priority will be managed only by the subpriority. + * @retval None + */ +void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup) +{ + /* Check the parameters */ + assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup)); + + /* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */ + NVIC_SetPriorityGrouping(PriorityGroup); +} + +/** + * @brief Set the priority of an interrupt. + * @param IRQn External interrupt number. + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @param PreemptPriority The pre-emption priority for the IRQn channel. + * This parameter can be a value between 0 and 15 + * A lower priority value indicates a higher priority + * @param SubPriority the subpriority level for the IRQ channel. + * This parameter can be a value between 0 and 15 + * A lower priority value indicates a higher priority. + * @retval None + */ +void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority) +{ + uint32_t prioritygroup; + + /* Check the parameters */ + assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); + assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); + + prioritygroup = NVIC_GetPriorityGrouping(); + + NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); +} + +/** + * @brief Enable a device specific interrupt in the NVIC interrupt controller. + * @param IRQn External interrupt number. + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval None + */ +void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) +{ + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Enable interrupt */ + NVIC_EnableIRQ(IRQn); +} + +/** + * @brief Disable a device specific interrupt in the NVIC interrupt controller. + * @param IRQn External interrupt number. + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval None + */ +void HAL_NVIC_DisableIRQ(IRQn_Type IRQn) +{ + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Disable interrupt */ + NVIC_DisableIRQ(IRQn); +} + +/** + * @brief Initiate a system reset request to reset the MCU. + * @retval None + */ +void HAL_NVIC_SystemReset(void) +{ + /* System Reset */ + NVIC_SystemReset(); +} + +/** + * @brief Initialize the System Timer with interrupt enabled and start the System Tick Timer (SysTick): + * Counter is in free running mode to generate periodic interrupts. + * @param TicksNumb Specifies the ticks Number of ticks between two interrupts. + * @retval status: - 0 Function succeeded. + * - 1 Function failed. + */ +uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb) +{ + return SysTick_Config(TicksNumb); +} +/** + * @} + */ + +/** @addtogroup CORTEX_Exported_Functions_Group2 + * @brief Cortex control functions + * +@verbatim + ============================================================================== + ##### Peripheral Control functions ##### + ============================================================================== + [..] + This subsection provides a set of functions allowing to control the CORTEX + (NVIC, SYSTICK, MPU) functionalities. + + +@endverbatim + * @{ + */ + + +/** + * @brief Get the priority grouping field from the NVIC Interrupt Controller. + * @retval Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field) + */ +uint32_t HAL_NVIC_GetPriorityGrouping(void) +{ + /* Get the PRIGROUP[10:8] field value */ + return NVIC_GetPriorityGrouping(); +} + +/** + * @brief Get the priority of an interrupt. + * @param IRQn External interrupt number. + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @param PriorityGroup the priority grouping bits length. + * This parameter can be one of the following values: + * @arg NVIC_PRIORITYGROUP_0: 0 bit for pre-emption priority, + * 4 bits for subpriority + * @arg NVIC_PRIORITYGROUP_1: 1 bit for pre-emption priority, + * 3 bits for subpriority + * @arg NVIC_PRIORITYGROUP_2: 2 bits for pre-emption priority, + * 2 bits for subpriority + * @arg NVIC_PRIORITYGROUP_3: 3 bits for pre-emption priority, + * 1 bit for subpriority + * @arg NVIC_PRIORITYGROUP_4: 4 bits for pre-emption priority, + * 0 bit for subpriority + * @param pPreemptPriority Pointer on the Preemptive priority value (starting from 0). + * @param pSubPriority Pointer on the Subpriority value (starting from 0). + * @retval None + */ +void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t *pPreemptPriority, uint32_t *pSubPriority) +{ + /* Check the parameters */ + assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup)); + /* Get priority for Cortex-M system or device specific interrupts */ + NVIC_DecodePriority(NVIC_GetPriority(IRQn), PriorityGroup, pPreemptPriority, pSubPriority); +} + +/** + * @brief Set Pending bit of an external interrupt. + * @param IRQn External interrupt number + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval None + */ +void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn) +{ + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Set interrupt pending */ + NVIC_SetPendingIRQ(IRQn); +} + +/** + * @brief Get Pending Interrupt (read the pending register in the NVIC + * and return the pending bit for the specified interrupt). + * @param IRQn External interrupt number. + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval status: - 0 Interrupt status is not pending. + * - 1 Interrupt status is pending. + */ +uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn) +{ + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Return 1 if pending else 0 */ + return NVIC_GetPendingIRQ(IRQn); +} + +/** + * @brief Clear the pending bit of an external interrupt. + * @param IRQn External interrupt number. + * This parameter can be an enumerator of IRQn_Type enumeration + * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32wbxxxx.h)) + * @retval None + */ +void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn) +{ + /* Check the parameters */ + assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); + + /* Clear pending interrupt */ + NVIC_ClearPendingIRQ(IRQn); +} + +/** + * @brief Configure the SysTick clock source. + * @param CLKSource specifies the SysTick clock source. + * This parameter can be one of the following values: + * @arg SYSTICK_CLKSOURCE_HCLK_DIV8: AHB clock divided by 8 selected as SysTick clock source. + * @arg SYSTICK_CLKSOURCE_HCLK: AHB clock selected as SysTick clock source. + * @retval None + */ +void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource) +{ + /* Check the parameters */ + assert_param(IS_SYSTICK_CLK_SOURCE(CLKSource)); + if (CLKSource == SYSTICK_CLKSOURCE_HCLK) + { + SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK; + } + else + { + SysTick->CTRL &= ~SYSTICK_CLKSOURCE_HCLK; + } +} + +/** + * @brief Handle SYSTICK interrupt request. + * @retval None + */ +void HAL_SYSTICK_IRQHandler(void) +{ + HAL_SYSTICK_Callback(); +} + +/** + * @brief SYSTICK callback. + * @retval None + */ +__weak void HAL_SYSTICK_Callback(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_SYSTICK_Callback could be implemented in the user file + */ +} + +#if (__MPU_PRESENT == 1U) +/** + * @brief Disables the MPU + * @retval None + */ +void HAL_MPU_Disable(void) +{ + /* Make sure outstanding transfers are done */ + __DMB(); + + /* Disable fault exceptions */ + SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; + + /* Disable the MPU and clear the control register*/ + MPU->CTRL = 0U; +} + +/** + * @brief Enable the MPU. + * @param MPU_Control: Specifies the control mode of the MPU during hard fault, + * NMI, FAULTMASK and privileged access to the default memory + * This parameter can be one of the following values: + * @arg MPU_HFNMI_PRIVDEF_NONE + * @arg MPU_HARDFAULT_NMI + * @arg MPU_PRIVILEGED_DEFAULT + * @arg MPU_HFNMI_PRIVDEF + * @retval None + */ +void HAL_MPU_Enable(uint32_t MPU_Control) +{ + /* Enable the MPU */ + MPU->CTRL = (MPU_Control | MPU_CTRL_ENABLE_Msk); + + /* Enable fault exceptions */ + SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; + + /* Ensure MPU setting take effects */ + __DSB(); + __ISB(); +} + +/** + * @brief Enable the MPU Region. + * @retval None + */ +void HAL_MPU_EnableRegion(uint32_t RegionNumber) +{ + /* Check the parameters */ + assert_param(IS_MPU_REGION_NUMBER(RegionNumber)); + + /* Set the Region number */ + MPU->RNR = RegionNumber; + + /* Enable the Region */ + SET_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk); +} + +/** + * @brief Disable the MPU Region. + * @retval None + */ +void HAL_MPU_DisableRegion(uint32_t RegionNumber) +{ + /* Check the parameters */ + assert_param(IS_MPU_REGION_NUMBER(RegionNumber)); + + /* Set the Region number */ + MPU->RNR = RegionNumber; + + /* Disable the Region */ + CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk); +} + +/** + * @brief Initialize and configure the Region and the memory to be protected. + * @param MPU_Init Pointer to a MPU_Region_InitTypeDef structure that contains + * the initialization and configuration information. + * @retval None + */ +void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init) +{ + /* Check the parameters */ + assert_param(IS_MPU_REGION_NUMBER(MPU_Init->Number)); + assert_param(IS_MPU_REGION_ENABLE(MPU_Init->Enable)); + assert_param(IS_MPU_INSTRUCTION_ACCESS(MPU_Init->DisableExec)); + assert_param(IS_MPU_REGION_PERMISSION_ATTRIBUTE(MPU_Init->AccessPermission)); + assert_param(IS_MPU_TEX_LEVEL(MPU_Init->TypeExtField)); + assert_param(IS_MPU_ACCESS_SHAREABLE(MPU_Init->IsShareable)); + assert_param(IS_MPU_ACCESS_CACHEABLE(MPU_Init->IsCacheable)); + assert_param(IS_MPU_ACCESS_BUFFERABLE(MPU_Init->IsBufferable)); + assert_param(IS_MPU_SUB_REGION_DISABLE(MPU_Init->SubRegionDisable)); + assert_param(IS_MPU_REGION_SIZE(MPU_Init->Size)); + + /* Set the Region number */ + MPU->RNR = MPU_Init->Number; + + /* Disable the Region */ + CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk); + + /* Apply configuration */ + MPU->RBAR = MPU_Init->BaseAddress; + MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | + ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | + ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | + ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | + ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | + ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | + ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | + ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | + ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos); +} +#endif /* __MPU_PRESENT */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_CORTEX_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c new file mode 100644 index 0000000..316e71f --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c @@ -0,0 +1,1120 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_dma.c + * @author MCD Application Team + * @brief DMA HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the Direct Memory Access (DMA) peripheral: + * + Initialization and de-initialization functions + * + IO operation functions + * + Peripheral State and errors functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + (#) Enable and configure the peripheral to be connected to the DMA Channel + (except for internal SRAM / FLASH memories: no initialization is + necessary). Please refer to the Reference manual for connection between peripherals + and DMA requests. + + (#) For a given Channel, program the required configuration through the following parameters: + Channel request, Transfer Direction, Source and Destination data formats, + Circular or Normal mode, Channel Priority level, Source and Destination Increment mode + using HAL_DMA_Init() function. + + Prior to HAL_DMA_Init the peripheral clock shall be enabled for both DMA & DMAMUX + thanks to: + (##) DMA1 or DMA2: __HAL_RCC_DMA1_CLK_ENABLE() or __HAL_RCC_DMA2_CLK_ENABLE() ; + (##) DMAMUX1: __HAL_RCC_DMAMUX1_CLK_ENABLE(); + + (#) Use HAL_DMA_GetState() function to return the DMA state and HAL_DMA_GetError() in case of error + detection. + + (#) Use HAL_DMA_Abort() function to abort the current transfer + + -@- In Memory-to-Memory transfer mode, Circular mode is not allowed. + + *** Polling mode IO operation *** + ================================= + [..] + (+) Use HAL_DMA_Start() to start DMA transfer after the configuration of Source + address and destination address and the Length of data to be transferred + (+) Use HAL_DMA_PollForTransfer() to poll for the end of current transfer, in this + case a fixed Timeout can be configured by User depending from his application. + + *** Interrupt mode IO operation *** + =================================== + [..] + (+) Configure the DMA interrupt priority using HAL_NVIC_SetPriority() + (+) Enable the DMA IRQ handler using HAL_NVIC_EnableIRQ() + (+) Use HAL_DMA_Start_IT() to start DMA transfer after the configuration of + Source address and destination address and the Length of data to be transferred. + In this case the DMA interrupt is configured + (+) Use HAL_DMA_IRQHandler() called under DMA_IRQHandler() Interrupt subroutine + (+) At the end of data transfer HAL_DMA_IRQHandler() function is executed and user can + add his own function to register callbacks with HAL_DMA_RegisterCallback(). + + *** DMA HAL driver macros list *** + ============================================= + [..] + Below the list of macros in DMA HAL driver. + + (+) __HAL_DMA_ENABLE: Enable the specified DMA Channel. + (+) __HAL_DMA_DISABLE: Disable the specified DMA Channel. + (+) __HAL_DMA_GET_FLAG: Get the DMA Channel pending flags. + (+) __HAL_DMA_CLEAR_FLAG: Clear the DMA Channel pending flags. + (+) __HAL_DMA_ENABLE_IT: Enable the specified DMA Channel interrupts. + (+) __HAL_DMA_DISABLE_IT: Disable the specified DMA Channel interrupts. + (+) __HAL_DMA_GET_IT_SOURCE: Check whether the specified DMA Channel interrupt is enabled or not. + + [..] + (@) You can refer to the DMA HAL driver header file for more useful macros + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup DMA DMA + * @brief DMA HAL module driver + * @{ + */ + +#ifdef HAL_DMA_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup DMA_Private_Functions DMA Private Functions + * @{ + */ +static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength); +static void DMA_CalcDMAMUXChannelBaseAndMask(DMA_HandleTypeDef *hdma); +static void DMA_CalcDMAMUXRequestGenBaseAndMask(DMA_HandleTypeDef *hdma); + +/** + * @} + */ + +/* Exported functions ---------------------------------------------------------*/ + +/** @defgroup DMA_Exported_Functions DMA Exported Functions + * @{ + */ + +/** @defgroup DMA_Exported_Functions_Group1 Initialization and de-initialization functions + * @brief Initialization and de-initialization functions + * +@verbatim + =============================================================================== + ##### Initialization and de-initialization functions ##### + =============================================================================== + [..] + This section provides functions allowing to initialize the DMA Channel source + and destination addresses, incrementation and data sizes, transfer direction, + circular/normal mode selection, memory-to-memory mode selection and Channel priority value. + [..] + The HAL_DMA_Init() function follows the DMA configuration procedures as described in + reference manual. + +@endverbatim + * @{ + */ + +/** + * @brief Initialize the DMA according to the specified + * parameters in the DMA_InitTypeDef and initialize the associated handle. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma) +{ + uint32_t tmp; + + /* Check the DMA handle allocation */ + if (hdma == NULL) + { + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance)); + assert_param(IS_DMA_DIRECTION(hdma->Init.Direction)); + assert_param(IS_DMA_PERIPHERAL_INC_STATE(hdma->Init.PeriphInc)); + assert_param(IS_DMA_MEMORY_INC_STATE(hdma->Init.MemInc)); + assert_param(IS_DMA_PERIPHERAL_DATA_SIZE(hdma->Init.PeriphDataAlignment)); + assert_param(IS_DMA_MEMORY_DATA_SIZE(hdma->Init.MemDataAlignment)); + assert_param(IS_DMA_MODE(hdma->Init.Mode)); + assert_param(IS_DMA_PRIORITY(hdma->Init.Priority)); + + assert_param(IS_DMA_ALL_REQUEST(hdma->Init.Request)); + +#if defined(DMA2) + /* Compute the channel index */ + if ((uint32_t)(hdma->Instance) < (uint32_t)(DMA2_Channel1)) + { + /* DMA1 */ + hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA1_Channel1) / ((uint32_t)DMA1_Channel2 - (uint32_t)DMA1_Channel1)) << 2U; + hdma->DmaBaseAddress = DMA1; + } + else + { + /* DMA2 */ + hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA2_Channel1) / ((uint32_t)DMA2_Channel2 - (uint32_t)DMA2_Channel1)) << 2U; + hdma->DmaBaseAddress = DMA2; + } +#else + /* DMA1 */ + hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA1_Channel1) / ((uint32_t)DMA1_Channel2 - (uint32_t)DMA1_Channel1)) << 2U; + hdma->DmaBaseAddress = DMA1; +#endif /* DMA2 */ + + /* Change DMA peripheral state */ + hdma->State = HAL_DMA_STATE_BUSY; + + /* Get the CR register value */ + tmp = hdma->Instance->CCR; + + /* Clear PL, MSIZE, PSIZE, MINC, PINC, CIRC, DIR and MEM2MEM bits */ + tmp &= ((uint32_t)~(DMA_CCR_PL | DMA_CCR_MSIZE | DMA_CCR_PSIZE | + DMA_CCR_MINC | DMA_CCR_PINC | DMA_CCR_CIRC | + DMA_CCR_DIR | DMA_CCR_MEM2MEM)); + + /* Prepare the DMA Channel configuration */ + tmp |= hdma->Init.Direction | + hdma->Init.PeriphInc | hdma->Init.MemInc | + hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | + hdma->Init.Mode | hdma->Init.Priority; + + /* Write to DMA Channel CR register */ + hdma->Instance->CCR = tmp; + + /* Initialize parameters for DMAMUX channel : + DMAmuxChannel, DMAmuxChannelStatus and DMAmuxChannelStatusMask + */ + DMA_CalcDMAMUXChannelBaseAndMask(hdma); + + if (hdma->Init.Direction == DMA_MEMORY_TO_MEMORY) + { + /* if memory to memory force the request to 0*/ + hdma->Init.Request = DMA_REQUEST_MEM2MEM; + } + + /* Set peripheral request to DMAMUX channel */ + hdma->DMAmuxChannel->CCR = (hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID); + + /* Clear the DMAMUX synchro overrun flag */ + hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; + + if (((hdma->Init.Request > 0U) && (hdma->Init.Request <= DMA_REQUEST_GENERATOR3))) + { + /* Initialize parameters for DMAMUX request generator : + DMAmuxRequestGen, DMAmuxRequestGenStatus and DMAmuxRequestGenStatusMask + */ + DMA_CalcDMAMUXRequestGenBaseAndMask(hdma); + + /* Reset the DMAMUX request generator register*/ + hdma->DMAmuxRequestGen->RGCR = 0U; + + /* Clear the DMAMUX request generator overrun flag */ + hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; + } + else + { + hdma->DMAmuxRequestGen = 0U; + hdma->DMAmuxRequestGenStatus = 0U; + hdma->DMAmuxRequestGenStatusMask = 0U; + } + + /* Initialize the error code */ + hdma->ErrorCode = HAL_DMA_ERROR_NONE; + + /* Initialize the DMA state*/ + hdma->State = HAL_DMA_STATE_READY; + + /* Allocate lock resource and initialize it */ + hdma->Lock = HAL_UNLOCKED; + + return HAL_OK; +} + +/** + * @brief DeInitialize the DMA peripheral. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma) +{ + + /* Check the DMA handle allocation */ + if (NULL == hdma) + { + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance)); + + /* Disable the selected DMA Channelx */ + __HAL_DMA_DISABLE(hdma); + +#if defined(DMA2) + /* Compute the channel index */ + if ((uint32_t)(hdma->Instance) < (uint32_t)(DMA2_Channel1)) + { + /* DMA1 */ + hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA1_Channel1) / ((uint32_t)DMA1_Channel2 - (uint32_t)DMA1_Channel1)) << 2U; + hdma->DmaBaseAddress = DMA1; + } + else + { + /* DMA2 */ + hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA2_Channel1) / ((uint32_t)DMA2_Channel2 - (uint32_t)DMA2_Channel1)) << 2U; + hdma->DmaBaseAddress = DMA2; + } +#else + /* DMA1 */ + hdma->ChannelIndex = (((uint32_t)hdma->Instance - (uint32_t)DMA1_Channel1) / ((uint32_t)DMA1_Channel2 - (uint32_t)DMA1_Channel1)) << 2U; + hdma->DmaBaseAddress = DMA1; +#endif /* DMA2 */ + + /* Reset DMA Channel control register */ + hdma->Instance->CCR = 0U; + + /* Clear all flags */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1cU)); + + /* Initialize parameters for DMAMUX channel : + DMAmuxChannel, DMAmuxChannelStatus and DMAmuxChannelStatusMask */ + + DMA_CalcDMAMUXChannelBaseAndMask(hdma); + + /* Reset the DMAMUX channel that corresponds to the DMA channel */ + hdma->DMAmuxChannel->CCR = 0U; + + /* Clear the DMAMUX synchro overrun flag */ + hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; + + /* Reset Request generator parameters if any */ + if (((hdma->Init.Request > 0U) && (hdma->Init.Request <= DMA_REQUEST_GENERATOR3))) + { + /* Initialize parameters for DMAMUX request generator : + DMAmuxRequestGen, DMAmuxRequestGenStatus and DMAmuxRequestGenStatusMask + */ + DMA_CalcDMAMUXRequestGenBaseAndMask(hdma); + + /* Reset the DMAMUX request generator register*/ + hdma->DMAmuxRequestGen->RGCR = 0U; + + /* Clear the DMAMUX request generator overrun flag */ + hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; + } + + hdma->DMAmuxRequestGen = 0U; + hdma->DMAmuxRequestGenStatus = 0U; + hdma->DMAmuxRequestGenStatusMask = 0U; + + /* Clean callbacks */ + hdma->XferCpltCallback = NULL; + hdma->XferHalfCpltCallback = NULL; + hdma->XferErrorCallback = NULL; + hdma->XferAbortCallback = NULL; + + /* Initialize the error code */ + hdma->ErrorCode = HAL_DMA_ERROR_NONE; + + /* Initialize the DMA state */ + hdma->State = HAL_DMA_STATE_RESET; + + /* Release Lock */ + __HAL_UNLOCK(hdma); + + return HAL_OK; +} + +/** + * @} + */ + +/** @defgroup DMA_Exported_Functions_Group2 Input and Output operation functions + * @brief Input and Output operation functions + * +@verbatim + =============================================================================== + ##### IO operation functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Configure the source, destination address and data length and Start DMA transfer + (+) Configure the source, destination address and data length and + Start DMA transfer with interrupt + (+) Abort DMA transfer + (+) Poll for transfer complete + (+) Handle DMA interrupt request + +@endverbatim + * @{ + */ + +/** + * @brief Start the DMA Transfer. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @param SrcAddress The source memory Buffer address + * @param DstAddress The destination memory Buffer address + * @param DataLength The length of data to be transferred from source to destination + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Check the parameters */ + assert_param(IS_DMA_BUFFER_SIZE(DataLength)); + + /* Process locked */ + __HAL_LOCK(hdma); + + if (HAL_DMA_STATE_READY == hdma->State) + { + /* Change DMA peripheral state */ + hdma->State = HAL_DMA_STATE_BUSY; + hdma->ErrorCode = HAL_DMA_ERROR_NONE; + + /* Disable the peripheral */ + __HAL_DMA_DISABLE(hdma); + + /* Configure the source, destination address and the data length & clear flags*/ + DMA_SetConfig(hdma, SrcAddress, DstAddress, DataLength); + + /* Enable the Peripheral */ + __HAL_DMA_ENABLE(hdma); + } + else + { + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + status = HAL_BUSY; + } + return status; +} + +/** + * @brief Start the DMA Transfer with interrupt enabled. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @param SrcAddress The source memory Buffer address + * @param DstAddress The destination memory Buffer address + * @param DataLength The length of data to be transferred from source to destination + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, + uint32_t DataLength) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Check the parameters */ + assert_param(IS_DMA_BUFFER_SIZE(DataLength)); + + /* Process locked */ + __HAL_LOCK(hdma); + + if (HAL_DMA_STATE_READY == hdma->State) + { + /* Change DMA peripheral state */ + hdma->State = HAL_DMA_STATE_BUSY; + hdma->ErrorCode = HAL_DMA_ERROR_NONE; + + /* Disable the peripheral */ + __HAL_DMA_DISABLE(hdma); + + /* Configure the source, destination address and the data length & clear flags*/ + DMA_SetConfig(hdma, SrcAddress, DstAddress, DataLength); + + /* Enable the transfer complete interrupt */ + /* Enable the transfer Error interrupt */ + if (NULL != hdma->XferHalfCpltCallback) + { + /* Enable the Half transfer complete interrupt as well */ + __HAL_DMA_ENABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE)); + } + else + { + __HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT); + __HAL_DMA_ENABLE_IT(hdma, (DMA_IT_TC | DMA_IT_TE)); + } + + /* Check if DMAMUX Synchronization is enabled*/ + if ((hdma->DMAmuxChannel->CCR & DMAMUX_CxCR_SE) != 0U) + { + /* Enable DMAMUX sync overrun IT*/ + hdma->DMAmuxChannel->CCR |= DMAMUX_CxCR_SOIE; + } + + if (hdma->DMAmuxRequestGen != 0U) + { + /* if using DMAMUX request generator, enable the DMAMUX request generator overrun IT*/ + /* enable the request gen overrun IT*/ + hdma->DMAmuxRequestGen->RGCR |= DMAMUX_RGxCR_OIE; + } + + /* Enable the Peripheral */ + __HAL_DMA_ENABLE(hdma); + } + else + { + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + + /* Remain BUSY */ + status = HAL_BUSY; + } + return status; +} + +/** + * @brief Abort the DMA Transfer. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma) +{ + + /* Check the DMA peripheral handle */ + if (NULL == hdma) + { + return HAL_ERROR; + } + + /* Check the DMA peripheral state */ + if (hdma->State != HAL_DMA_STATE_BUSY) + { + hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; + + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + + return HAL_ERROR; + } + else + { + /* Disable DMA IT */ + __HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE)); + + /* disable the DMAMUX sync overrun IT*/ + hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE; + + /* Disable the channel */ + __HAL_DMA_DISABLE(hdma); + + /* Clear all flags */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1cU)); + + /* Clear the DMAMUX synchro overrun flag */ + hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; + + if (hdma->DMAmuxRequestGen != 0U) + { + /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT*/ + /* disable the request gen overrun IT*/ + hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE; + + /* Clear the DMAMUX request generator overrun flag */ + hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; + } + + /* Change the DMA state */ + hdma->State = HAL_DMA_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + } + + return HAL_OK; +} + +/** + * @brief Aborts the DMA Transfer in Interrupt mode. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (HAL_DMA_STATE_BUSY != hdma->State) + { + /* no transfer ongoing */ + hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; + + status = HAL_ERROR; + } + else + { + /* Disable DMA IT */ + __HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE)); + + /* Disable the channel */ + __HAL_DMA_DISABLE(hdma); + + /* disable the DMAMUX sync overrun IT*/ + hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE; + + /* Clear all flags */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1cU)); + + /* Clear the DMAMUX synchro overrun flag */ + hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; + + if (hdma->DMAmuxRequestGen != 0U) + { + /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT*/ + /* disable the request gen overrun IT*/ + hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE; + + /* Clear the DMAMUX request generator overrun flag */ + hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; + } + + /* Change the DMA state */ + hdma->State = HAL_DMA_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + + /* Call User Abort callback */ + if (hdma->XferAbortCallback != NULL) + { + hdma->XferAbortCallback(hdma); + } + } + return status; +} + +/** + * @brief Polling for transfer complete. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @param CompleteLevel Specifies the DMA level complete. + * @param Timeout Timeout duration. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_LevelCompleteTypeDef CompleteLevel, + uint32_t Timeout) +{ + uint32_t temp; + uint32_t tickstart; + + if (HAL_DMA_STATE_BUSY != hdma->State) + { + /* no transfer ongoing */ + hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; + __HAL_UNLOCK(hdma); + return HAL_ERROR; + } + + /* Polling mode not supported in circular mode */ + if ((hdma->Instance->CCR & DMA_CCR_CIRC) != 0U) + { + hdma->ErrorCode = HAL_DMA_ERROR_NOT_SUPPORTED; + return HAL_ERROR; + } + + /* Get the level transfer complete flag */ + if (HAL_DMA_FULL_TRANSFER == CompleteLevel) + { + /* Transfer Complete flag */ + temp = DMA_FLAG_TC1 << (hdma->ChannelIndex & 0x1cU); + } + else + { + /* Half Transfer Complete flag */ + temp = DMA_FLAG_HT1 << (hdma->ChannelIndex & 0x1cU); + } + + /* Get tick */ + tickstart = HAL_GetTick(); + + while ((hdma->DmaBaseAddress->ISR & temp) == 0U) + { + if ((hdma->DmaBaseAddress->ISR & (DMA_FLAG_TE1 << (hdma->ChannelIndex & 0x1CU))) != 0U) + { + /* When a DMA transfer error occurs */ + /* A hardware clear of its EN bits is performed */ + /* Clear all flags */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1cU)); + + /* Update error code */ + hdma->ErrorCode = HAL_DMA_ERROR_TE; + + /* Change the DMA state */ + hdma->State = HAL_DMA_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + + return HAL_ERROR; + } + /* Check for the Timeout */ + if (Timeout != HAL_MAX_DELAY) + { + if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U)) + { + /* Update error code */ + hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; + + /* Change the DMA state */ + hdma->State = HAL_DMA_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + + return HAL_ERROR; + } + } + } + + /*Check for DMAMUX Request generator (if used) overrun status */ + if (hdma->DMAmuxRequestGen != 0U) + { + /* if using DMAMUX request generator Check for DMAMUX request generator overrun */ + if ((hdma->DMAmuxRequestGenStatus->RGSR & hdma->DMAmuxRequestGenStatusMask) != 0U) + { + /* Disable the request gen overrun interrupt */ + hdma->DMAmuxRequestGen->RGCR |= DMAMUX_RGxCR_OIE; + + /* Clear the DMAMUX request generator overrun flag */ + hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; + + /* Update error code */ + hdma->ErrorCode |= HAL_DMA_ERROR_REQGEN; + } + } + + /* Check for DMAMUX Synchronization overrun */ + if ((hdma->DMAmuxChannelStatus->CSR & hdma->DMAmuxChannelStatusMask) != 0U) + { + /* Clear the DMAMUX synchro overrun flag */ + hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; + + /* Update error code */ + hdma->ErrorCode |= HAL_DMA_ERROR_SYNC; + } + + if (HAL_DMA_FULL_TRANSFER == CompleteLevel) + { + /* Clear the transfer complete flag */ + hdma->DmaBaseAddress->IFCR = (DMA_FLAG_TC1 << (hdma->ChannelIndex & 0x1cU)); + + /* Process unlocked */ + __HAL_UNLOCK(hdma); + + /* The selected Channelx EN bit is cleared (DMA is disabled and + all transfers are complete) */ + hdma->State = HAL_DMA_STATE_READY; + } + else + { + /* Clear the half transfer complete flag */ + hdma->DmaBaseAddress->IFCR = (DMA_FLAG_HT1 << (hdma->ChannelIndex & 0x1cU)); + } + + return HAL_OK; +} + +/** + * @brief Handle DMA interrupt request. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval None + */ +void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma) +{ + uint32_t flag_it = hdma->DmaBaseAddress->ISR; + uint32_t source_it = hdma->Instance->CCR; + + /* Half Transfer Complete Interrupt management ******************************/ + if (((flag_it & (DMA_FLAG_HT1 << (hdma->ChannelIndex & 0x1cU))) != 0U) && ((source_it & DMA_IT_HT) != 0U)) + { + /* Disable the half transfer interrupt if the DMA mode is not CIRCULAR */ + if ((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U) + { + /* Disable the half transfer interrupt */ + __HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT); + } + /* Clear the half transfer complete flag */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_HTIF1 << (hdma->ChannelIndex & 0x1CU)); + + /* DMA peripheral state is not updated in Half Transfer */ + /* but in Transfer Complete case */ + + if (hdma->XferHalfCpltCallback != NULL) + { + /* Half transfer callback */ + hdma->XferHalfCpltCallback(hdma); + } + } + + /* Transfer Complete Interrupt management ***********************************/ + else if (((flag_it & (DMA_FLAG_TC1 << (hdma->ChannelIndex & 0x1cU))) != 0U) && ((source_it & DMA_IT_TC) != 0U)) + { + if ((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U) + { + /* Disable the transfer complete and error interrupt */ + __HAL_DMA_DISABLE_IT(hdma, DMA_IT_TE | DMA_IT_TC); + + /* Change the DMA state */ + hdma->State = HAL_DMA_STATE_READY; + } + /* Clear the transfer complete flag */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_TCIF1 << (hdma->ChannelIndex & 0x1cU)); + + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + + if (hdma->XferCpltCallback != NULL) + { + /* Transfer complete callback */ + hdma->XferCpltCallback(hdma); + } + } + + /* Transfer Error Interrupt management **************************************/ + else if (((flag_it & (DMA_FLAG_TE1 << (hdma->ChannelIndex & 0x1cU))) != 0U) && ((source_it & DMA_IT_TE) != 0U)) + { + /* When a DMA transfer error occurs */ + /* A hardware clear of its EN bits is performed */ + /* Disable ALL DMA IT */ + __HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE)); + + /* Clear all flags */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1cU)); + + /* Update error code */ + hdma->ErrorCode = HAL_DMA_ERROR_TE; + + /* Change the DMA state */ + hdma->State = HAL_DMA_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hdma); + + if (hdma->XferErrorCallback != NULL) + { + /* Transfer error callback */ + hdma->XferErrorCallback(hdma); + } + } + else + { + /* Nothing To Do */ + } + return; +} + +/** + * @brief Register callbacks + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @param CallbackID User Callback identifier + * a HAL_DMA_CallbackIDTypeDef ENUM as parameter. + * @param pCallback Pointer to private callback function which has pointer to + * a DMA_HandleTypeDef structure as parameter. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_RegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID, void (* pCallback)(DMA_HandleTypeDef *_hdma)) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Process locked */ + __HAL_LOCK(hdma); + + if (HAL_DMA_STATE_READY == hdma->State) + { + switch (CallbackID) + { + case HAL_DMA_XFER_CPLT_CB_ID: + hdma->XferCpltCallback = pCallback; + break; + + case HAL_DMA_XFER_HALFCPLT_CB_ID: + hdma->XferHalfCpltCallback = pCallback; + break; + + case HAL_DMA_XFER_ERROR_CB_ID: + hdma->XferErrorCallback = pCallback; + break; + + case HAL_DMA_XFER_ABORT_CB_ID: + hdma->XferAbortCallback = pCallback; + break; + + default: + status = HAL_ERROR; + break; + } + } + else + { + status = HAL_ERROR; + } + + /* Release Lock */ + __HAL_UNLOCK(hdma); + + return status; +} + +/** + * @brief UnRegister callbacks + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @param CallbackID User Callback identifier + * a HAL_DMA_CallbackIDTypeDef ENUM as parameter. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMA_UnRegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Process locked */ + __HAL_LOCK(hdma); + + if (HAL_DMA_STATE_READY == hdma->State) + { + switch (CallbackID) + { + case HAL_DMA_XFER_CPLT_CB_ID: + hdma->XferCpltCallback = NULL; + break; + + case HAL_DMA_XFER_HALFCPLT_CB_ID: + hdma->XferHalfCpltCallback = NULL; + break; + + case HAL_DMA_XFER_ERROR_CB_ID: + hdma->XferErrorCallback = NULL; + break; + + case HAL_DMA_XFER_ABORT_CB_ID: + hdma->XferAbortCallback = NULL; + break; + + case HAL_DMA_XFER_ALL_CB_ID: + hdma->XferCpltCallback = NULL; + hdma->XferHalfCpltCallback = NULL; + hdma->XferErrorCallback = NULL; + hdma->XferAbortCallback = NULL; + break; + + default: + status = HAL_ERROR; + break; + } + } + else + { + status = HAL_ERROR; + } + + /* Release Lock */ + __HAL_UNLOCK(hdma); + + return status; +} + +/** + * @} + */ + + + +/** @defgroup DMA_Exported_Functions_Group3 Peripheral State and Errors functions + * @brief Peripheral State and Errors functions + * +@verbatim + =============================================================================== + ##### Peripheral State and Errors functions ##### + =============================================================================== + [..] + This subsection provides functions allowing to + (+) Check the DMA state + (+) Get error code + +@endverbatim + * @{ + */ + +/** + * @brief Return the DMA handle state. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval HAL state + */ +HAL_DMA_StateTypeDef HAL_DMA_GetState(DMA_HandleTypeDef *hdma) +{ + /* Return DMA handle state */ + return hdma->State; +} + +/** + * @brief Return the DMA error code. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval DMA Error Code + */ +uint32_t HAL_DMA_GetError(DMA_HandleTypeDef *hdma) +{ + return hdma->ErrorCode; +} + +/** + * @} + */ + +/** + * @} + */ + +/** @addtogroup DMA_Private_Functions + * @{ + */ + +/** + * @brief Sets the DMA Transfer parameter. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @param SrcAddress The source memory Buffer address + * @param DstAddress The destination memory Buffer address + * @param DataLength The length of data to be transferred from source to destination + * @retval HAL status + */ +static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength) +{ + /* Clear the DMAMUX synchro overrun flag */ + hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; + + if (hdma->DMAmuxRequestGen != 0U) + { + /* Clear the DMAMUX request generator overrun flag */ + hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; + } + + /* Clear all flags */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1cU)); + + /* Configure DMA Channel data length */ + hdma->Instance->CNDTR = DataLength; + + /* Memory to Peripheral */ + if ((hdma->Init.Direction) == DMA_MEMORY_TO_PERIPH) + { + /* Configure DMA Channel destination address */ + hdma->Instance->CPAR = DstAddress; + + /* Configure DMA Channel source address */ + hdma->Instance->CMAR = SrcAddress; + } + /* Peripheral to Memory */ + else + { + /* Configure DMA Channel source address */ + hdma->Instance->CPAR = SrcAddress; + + /* Configure DMA Channel destination address */ + hdma->Instance->CMAR = DstAddress; + } +} + +/** + * @brief Updates the DMA handle with the DMAMUX channel and status mask depending on channel number + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval None + */ +static void DMA_CalcDMAMUXChannelBaseAndMask(DMA_HandleTypeDef *hdma) +{ + uint32_t channel_number; + + /* check if instance is not outside the DMA channel range */ +#if defined(DMA2) + if ((uint32_t)hdma->Instance < (uint32_t)DMA2_Channel1) + { + /* DMA1 */ + hdma->DMAmuxChannel = (DMAMUX1_Channel0 + (hdma->ChannelIndex >> 2U)); + } + else + { + /* DMA2 */ + hdma->DMAmuxChannel = (DMAMUX1_Channel7 + (hdma->ChannelIndex >> 2U)); + } +#else + /* DMA1 */ + hdma->DMAmuxChannel = (DMAMUX1_Channel0 + (hdma->ChannelIndex >> 2U)); +#endif /* DMA2 */ + channel_number = (((uint32_t)hdma->Instance & 0xFFU) - 8U) / 20U; + hdma->DMAmuxChannelStatus = DMAMUX1_ChannelStatus; + + /* Initialize the field DMAmuxChannelStatusMask with the corresponding index of the DMAMUX channel selected for the current ChannelIndex */ + hdma->DMAmuxChannelStatusMask = 1UL << (channel_number & 0x1FU); +} + +/** + * @brief Updates the DMA handle with the DMAMUX request generator params + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA Channel. + * @retval None + */ + +static void DMA_CalcDMAMUXRequestGenBaseAndMask(DMA_HandleTypeDef *hdma) +{ + uint32_t request = hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID; + + /* DMA Channels are connected to DMAMUX1 request generator blocks*/ + hdma->DMAmuxRequestGen = (DMAMUX_RequestGen_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_RequestGenerator0) + ((request - 1U) * 4U))); + + hdma->DMAmuxRequestGenStatus = DMAMUX1_RequestGenStatus; + + /* here "Request" is either DMA_REQUEST_GENERATOR0 to DMA_REQUEST_GENERATOR3, i.e. <= 4*/ + hdma->DMAmuxRequestGenStatusMask = 1UL << ((request - 1U) & 0x3U); +} + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_DMA_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c new file mode 100644 index 0000000..239665c --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma_ex.c @@ -0,0 +1,295 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_dma_ex.c + * @author MCD Application Team + * @brief DMA Extension HAL module driver + * This file provides firmware functions to manage the following + * functionalities of the DMA Extension peripheral: + * + Extended features functions + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + The DMA Extension HAL driver can be used as follows: + + (+) Configure the DMA_MUX Synchronization Block using HAL_DMAEx_ConfigMuxSync function. + (+) Configure the DMA_MUX Request Generator Block using HAL_DMAEx_ConfigMuxRequestGenerator function. + Functions HAL_DMAEx_EnableMuxRequestGenerator and HAL_DMAEx_DisableMuxRequestGenerator can then be used + to respectively enable/disable the request generator. + + (+) To handle the DMAMUX Interrupts, the function HAL_DMAEx_MUX_IRQHandler should be called from + the DMAMUX IRQ handler i.e DMAMUX1_OVR_IRQHandler. + As only one interrupt line is available for all DMAMUX channels and request generators , HAL_DMAEx_MUX_IRQHandler should be + called with, as parameter, the appropriate DMA handle as many as used DMAs in the user project + (exception done if a given DMA is not using the DMAMUX SYNC block neither a request generator) + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup DMAEx DMAEx + * @brief DMA Extended HAL module driver + * @{ + */ + +#ifdef HAL_DMA_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private Constants ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ + + +/** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions + * @{ + */ + +/** @defgroup DMAEx_Exported_Functions_Group1 DMAEx Extended features functions + * @brief Extended features functions + * +@verbatim + =============================================================================== + ##### Extended features functions ##### + =============================================================================== + [..] This section provides functions allowing to: + + (+) Configure the DMAMUX Synchronization Block using HAL_DMAEx_ConfigMuxSync function. + (+) Configure the DMAMUX Request Generator Block using HAL_DMAEx_ConfigMuxRequestGenerator function. + Functions HAL_DMAEx_EnableMuxRequestGenerator and HAL_DMAEx_DisableMuxRequestGenerator can then be used + to respectively enable/disable the request generator. + +@endverbatim + * @{ + */ + +/** + * @brief Configure the DMAMUX synchronization parameters for a given DMA channel (instance). + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA channel. + * @param pSyncConfig Pointer to HAL_DMA_MuxSyncConfigTypeDef : contains the DMAMUX synchronization parameters + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMAEx_ConfigMuxSync(DMA_HandleTypeDef *hdma, HAL_DMA_MuxSyncConfigTypeDef *pSyncConfig) +{ + /* Check the parameters */ + assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance)); + + assert_param(IS_DMAMUX_SYNC_SIGNAL_ID(pSyncConfig->SyncSignalID)); + assert_param(IS_DMAMUX_SYNC_POLARITY(pSyncConfig-> SyncPolarity)); + assert_param(IS_DMAMUX_SYNC_STATE(pSyncConfig->SyncEnable)); + assert_param(IS_DMAMUX_SYNC_EVENT(pSyncConfig->EventEnable)); + assert_param(IS_DMAMUX_SYNC_REQUEST_NUMBER(pSyncConfig->RequestNumber)); + + /*Check if the DMA state is ready */ + if (hdma->State == HAL_DMA_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hdma); + + /* Set the new synchronization parameters (and keep the request ID filled during the Init)*/ + MODIFY_REG(hdma->DMAmuxChannel->CCR, \ + (DMAMUX_CxCR_SYNC_ID | DMAMUX_CxCR_NBREQ | DMAMUX_CxCR_SPOL | DMAMUX_CxCR_SE | DMAMUX_CxCR_EGE), \ + (pSyncConfig->SyncSignalID | \ + ((pSyncConfig->RequestNumber - 1U) << DMAMUX_CxCR_NBREQ_Pos) | \ + pSyncConfig->SyncPolarity | \ + ((uint32_t)pSyncConfig->SyncEnable << DMAMUX_CxCR_SE_Pos) | \ + ((uint32_t)pSyncConfig->EventEnable << DMAMUX_CxCR_EGE_Pos))); + + /* Process UnLocked */ + __HAL_UNLOCK(hdma); + + return HAL_OK; + } + else + { + /*DMA State not Ready*/ + return HAL_ERROR; + } +} + +/** + * @brief Configure the DMAMUX request generator block used by the given DMA channel (instance). + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA channel. + * @param pRequestGeneratorConfig Pointer to HAL_DMA_MuxRequestGeneratorConfigTypeDef : + * contains the request generator parameters. + * + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMAEx_ConfigMuxRequestGenerator(DMA_HandleTypeDef *hdma, + HAL_DMA_MuxRequestGeneratorConfigTypeDef *pRequestGeneratorConfig) +{ + /* Check the parameters */ + assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance)); + + assert_param(IS_DMAMUX_REQUEST_GEN_SIGNAL_ID(pRequestGeneratorConfig->SignalID)); + assert_param(IS_DMAMUX_REQUEST_GEN_POLARITY(pRequestGeneratorConfig->Polarity)); + assert_param(IS_DMAMUX_REQUEST_GEN_REQUEST_NUMBER(pRequestGeneratorConfig->RequestNumber)); + + /* check if the DMA state is ready + and DMA is using a DMAMUX request generator block + */ + if ((hdma->State == HAL_DMA_STATE_READY) && (hdma->DMAmuxRequestGen != 0U)) + { + /* Process Locked */ + __HAL_LOCK(hdma); + + /* Set the request generator new parameters*/ + WRITE_REG(hdma->DMAmuxRequestGen->RGCR, (pRequestGeneratorConfig->SignalID | \ + pRequestGeneratorConfig->Polarity | \ + ((pRequestGeneratorConfig->RequestNumber - 1U) << DMAMUX_RGxCR_GNBREQ_Pos))); + + /* Process UnLocked */ + __HAL_UNLOCK(hdma); + + return HAL_OK; + } + else + { + return HAL_ERROR; + } +} + +/** + * @brief Enable the DMAMUX request generator block used by the given DMA channel (instance). + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA channel. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMAEx_EnableMuxRequestGenerator(DMA_HandleTypeDef *hdma) +{ + /* Check the parameters */ + assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance)); + + /* check if the DMA state is ready + and DMA is using a DMAMUX request generator block + */ + if ((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != 0U)) + { + /* Enable the request generator*/ + SET_BIT(hdma->DMAmuxRequestGen->RGCR, DMAMUX_RGxCR_GE); + + return HAL_OK; + } + else + { + return HAL_ERROR; + } +} + +/** + * @brief Disable the DMAMUX request generator block used by the given DMA channel (instance). + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA channel. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_DMAEx_DisableMuxRequestGenerator(DMA_HandleTypeDef *hdma) +{ + /* Check the parameters */ + assert_param(IS_DMA_ALL_INSTANCE(hdma->Instance)); + + /* check if the DMA state is ready + and DMA is using a DMAMUX request generator block + */ + if ((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != 0)) + { + /* Disable the request generator*/ + CLEAR_BIT(hdma->DMAmuxRequestGen->RGCR, DMAMUX_RGxCR_GE); + + return HAL_OK; + } + else + { + return HAL_ERROR; + } +} + +/** + * @brief Handles DMAMUX interrupt request. + * @param hdma Pointer to a DMA_HandleTypeDef structure that contains + * the configuration information for the specified DMA channel. + * @retval None + */ +void HAL_DMAEx_MUX_IRQHandler(DMA_HandleTypeDef *hdma) +{ + /* Check for DMAMUX Synchronization overrun */ + if ((hdma->DMAmuxChannelStatus->CSR & hdma->DMAmuxChannelStatusMask) != 0U) + { + /* Disable the synchro overrun interrupt */ + CLEAR_BIT(hdma->DMAmuxChannel->CCR, DMAMUX_CxCR_SOIE); + + /* Clear the DMAMUX synchro overrun flag */ + WRITE_REG(hdma->DMAmuxChannelStatus->CFR, hdma->DMAmuxChannelStatusMask); + + /* Update error code */ + hdma->ErrorCode |= HAL_DMA_ERROR_SYNC; + + if (hdma->XferErrorCallback != NULL) + { + /* Transfer error callback */ + hdma->XferErrorCallback(hdma); + } + } + + if (hdma->DMAmuxRequestGen != 0U) + { + /* if using a DMAMUX request generator block Check for DMAMUX request generator overrun */ + if ((hdma->DMAmuxRequestGenStatus->RGSR & hdma->DMAmuxRequestGenStatusMask) != 0U) + { + /* Disable the request gen overrun interrupt */ + CLEAR_BIT(hdma->DMAmuxRequestGen->RGCR, DMAMUX_RGxCR_OIE); + + /* Clear the DMAMUX request generator overrun flag */ + WRITE_REG(hdma->DMAmuxRequestGenStatus->RGCFR, hdma->DMAmuxRequestGenStatusMask); + + /* Update error code */ + hdma->ErrorCode |= HAL_DMA_ERROR_REQGEN; + + if (hdma->XferErrorCallback != NULL) + { + /* Transfer error callback */ + hdma->XferErrorCallback(hdma); + } + } + } +} + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_DMA_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c new file mode 100644 index 0000000..ec29590 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c @@ -0,0 +1,634 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_exti.c + * @author MCD Application Team + * @brief EXTI HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the General Purpose Input/Output (EXTI) peripheral: + * + Initialization and de-initialization functions + * + IO operation functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### EXTI Peripheral features ##### + ============================================================================== + [..] + (+) Each Exti line can be configured within this driver. + + (+) Exti line can be configured in 3 different modes + (++) Interrupt + (++) Event + (++) Both of them + + (+) Configurable Exti lines can be configured with 3 different triggers + (++) Rising + (++) Falling + (++) Both of them + + (+) When set in interrupt mode, configurable Exti lines have one + interrupt pending register: + (++) Trigger request occurred + + (+) Exti lines 0 to 15 are linked to gpio pin number 0 to 15. Gpio port can + be selected through multiplexer. + + ##### How to use this driver ##### + ============================================================================== + [..] + + (#) Configure the EXTI line using HAL_EXTI_SetConfigLine(). + (++) Choose the interrupt line number by setting "Line" member from + EXTI_ConfigTypeDef structure. + (++) Configure the interrupt and/or event mode using "Mode" member from + EXTI_ConfigTypeDef structure. + (++) For configurable lines, configure rising and/or falling trigger + "Trigger" member from EXTI_ConfigTypeDef structure. + (++) For Exti lines linked to gpio, choose gpio port using "GPIOSel" + member from GPIO_InitTypeDef structure. + + (#) Get current Exti configuration of a dedicated line using + HAL_EXTI_GetConfigLine(). + (++) Provide exiting handle as parameter. + (++) Provide pointer on EXTI_ConfigTypeDef structure as second parameter. + + (#) Clear Exti configuration of a dedicated line using HAL_EXTI_GetConfigLine(). + (++) Provide exiting handle as parameter. + + (#) Register callback to treat Exti interrupts using HAL_EXTI_RegisterCallback(). + (++) Provide exiting handle as first parameter. + (++) Provide which callback will be registered using one value from + EXTI_CallbackIDTypeDef. + (++) Provide callback function pointer. + + (#) Get interrupt pending bit using HAL_EXTI_GetPending(). + + (#) Clear interrupt pending bit using HAL_EXTI_GetPending(). + + (#) Generate software interrupt using HAL_EXTI_GenerateSWI(). + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup EXTI + * @{ + */ +/** MISRA C:2012 deviation rule has been granted for following rule: + * Rule-18.1_b - Medium: Array `EXTICR' 1st subscript interval [0,7] may be out + * of bounds [0,3] in following API : + * HAL_EXTI_SetConfigLine + * HAL_EXTI_GetConfigLine + * HAL_EXTI_ClearConfigLine + */ + +#ifdef HAL_EXTI_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private defines ------------------------------------------------------------*/ +/** @defgroup EXTI_Private_Constants EXTI Private Constants + * @{ + */ +#define EXTI_MODE_OFFSET 0x04u /* 0x10: offset between CPU IMR/EMR registers */ +#define EXTI_CONFIG_OFFSET 0x08u /* 0x20: offset between CPU Rising/Falling configuration registers */ +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ + +/** @addtogroup EXTI_Exported_Functions + * @{ + */ + +/** @addtogroup EXTI_Exported_Functions_Group1 + * @brief Configuration functions + * +@verbatim + =============================================================================== + ##### Configuration functions ##### + =============================================================================== + +@endverbatim + * @{ + */ + +/** + * @brief Set configuration of a dedicated Exti line. + * @param hexti Exti handle. + * @param pExtiConfig Pointer on EXTI configuration to be set. + * @retval HAL Status. + */ +HAL_StatusTypeDef HAL_EXTI_SetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig) +{ + __IO uint32_t *regaddr; + uint32_t regval; + uint32_t linepos; + uint32_t maskline; + uint32_t offset; + + /* Check null pointer */ + if ((hexti == NULL) || (pExtiConfig == NULL)) + { + return HAL_ERROR; + } + + /* Check parameters */ + assert_param(IS_EXTI_LINE(pExtiConfig->Line)); + assert_param(IS_EXTI_MODE(pExtiConfig->Mode)); + + /* Assign line number to handle */ + hexti->Line = pExtiConfig->Line; + + /* compute line register offset and line mask */ + offset = ((pExtiConfig->Line & EXTI_REG_MASK) >> EXTI_REG_SHIFT); + linepos = (pExtiConfig->Line & EXTI_PIN_MASK); + maskline = (1uL << linepos); + + /* Configure triggers for configurable lines */ + if ((pExtiConfig->Line & EXTI_CONFIG) != 0x00u) + { + assert_param(IS_EXTI_TRIGGER(pExtiConfig->Trigger)); + + /* Configure rising trigger */ + regaddr = (&EXTI->RTSR1 + (EXTI_CONFIG_OFFSET * offset)); + regval = *regaddr; + + /* Mask or set line */ + if ((pExtiConfig->Trigger & EXTI_TRIGGER_RISING) != 0x00u) + { + regval |= maskline; + } + else + { + regval &= ~maskline; + } + + /* Store rising trigger mode */ + *regaddr = regval; + + /* Configure falling trigger */ + regaddr = (&EXTI->FTSR1 + (EXTI_CONFIG_OFFSET * offset)); + regval = *regaddr; + + /* Mask or set line */ + if ((pExtiConfig->Trigger & EXTI_TRIGGER_FALLING) != 0x00u) + { + regval |= maskline; + } + else + { + regval &= ~maskline; + } + + /* Store falling trigger mode */ + *regaddr = regval; + + /* Configure gpio port selection in case of gpio exti line */ + if ((pExtiConfig->Line & EXTI_GPIO) == EXTI_GPIO) + { + assert_param(IS_EXTI_GPIO_PORT(pExtiConfig->GPIOSel)); + assert_param(IS_EXTI_GPIO_PIN(linepos)); + + regval = SYSCFG->EXTICR[linepos >> 2u]; + regval &= ~(SYSCFG_EXTICR1_EXTI0 << (SYSCFG_EXTICR1_EXTI1_Pos * (linepos & 0x03u))); + regval |= (pExtiConfig->GPIOSel << (SYSCFG_EXTICR1_EXTI1_Pos * (linepos & 0x03u))); + SYSCFG->EXTICR[linepos >> 2u] = regval; + } + } + + /* Configure interrupt mode : read current mode */ + regaddr = (&EXTI->IMR1 + (EXTI_MODE_OFFSET * offset)); + regval = *regaddr; + + /* Mask or set line */ + if ((pExtiConfig->Mode & EXTI_MODE_INTERRUPT) != 0x00u) + { + regval |= maskline; + } + else + { + regval &= ~maskline; + } + + /* Store interrupt mode */ + *regaddr = regval; + + /* The event mode cannot be configured if the line does not support it */ + assert_param(((pExtiConfig->Line & EXTI_EVENT) == EXTI_EVENT) || ((pExtiConfig->Mode & EXTI_MODE_EVENT) != EXTI_MODE_EVENT)); + + /* Configure event mode : read current mode */ + regaddr = (&EXTI->EMR1 + (EXTI_MODE_OFFSET * offset)); + regval = *regaddr; + + /* Mask or set line */ + if ((pExtiConfig->Mode & EXTI_MODE_EVENT) != 0x00u) + { + regval |= maskline; + } + else + { + regval &= ~maskline; + } + + /* Store event mode */ + *regaddr = regval; + + return HAL_OK; +} + + +/** + * @brief Get configuration of a dedicated Exti line. + * @param hexti Exti handle. + * @param pExtiConfig Pointer on structure to store Exti configuration. + * @retval HAL Status. + */ +HAL_StatusTypeDef HAL_EXTI_GetConfigLine(EXTI_HandleTypeDef *hexti, EXTI_ConfigTypeDef *pExtiConfig) +{ + __IO uint32_t *regaddr; + uint32_t regval; + uint32_t linepos; + uint32_t maskline; + uint32_t offset; + + /* Check null pointer */ + if ((hexti == NULL) || (pExtiConfig == NULL)) + { + return HAL_ERROR; + } + + /* Check the parameter */ + assert_param(IS_EXTI_LINE(hexti->Line)); + + /* Store handle line number to configuration structure */ + pExtiConfig->Line = hexti->Line; + + /* compute line register offset and line mask */ + offset = ((pExtiConfig->Line & EXTI_REG_MASK) >> EXTI_REG_SHIFT); + linepos = (pExtiConfig->Line & EXTI_PIN_MASK); + maskline = (1uL << linepos); + + /* 1] Get core mode : interrupt */ + regaddr = (&EXTI->IMR1 + (EXTI_MODE_OFFSET * offset)); + regval = *regaddr; + + /* Check if selected line is enable */ + if ((regval & maskline) != 0x00u) + { + pExtiConfig->Mode = EXTI_MODE_INTERRUPT; + } + else + { + pExtiConfig->Mode = EXTI_MODE_NONE; + } + + /* Get event mode */ + regaddr = (&EXTI->EMR1 + (EXTI_MODE_OFFSET * offset)); + regval = *regaddr; + + /* Check if selected line is enable */ + if ((regval & maskline) != 0x00u) + { + pExtiConfig->Mode |= EXTI_MODE_EVENT; + } + + /* Get default Trigger and GPIOSel configuration */ + pExtiConfig->Trigger = EXTI_TRIGGER_NONE; + pExtiConfig->GPIOSel = 0x00u; + + /* 2] Get trigger for configurable lines : rising */ + if ((pExtiConfig->Line & EXTI_CONFIG) != 0x00u) + { + regaddr = (&EXTI->RTSR1 + (EXTI_CONFIG_OFFSET * offset)); + regval = *regaddr; + + /* Check if configuration of selected line is enable */ + if ((regval & maskline) != 0x00u) + { + pExtiConfig->Trigger = EXTI_TRIGGER_RISING; + } + + /* Get falling configuration */ + regaddr = (&EXTI->FTSR1 + (EXTI_CONFIG_OFFSET * offset)); + regval = *regaddr; + + /* Check if configuration of selected line is enable */ + if ((regval & maskline) != 0x00u) + { + pExtiConfig->Trigger |= EXTI_TRIGGER_FALLING; + } + + /* Get Gpio port selection for gpio lines */ + if ((pExtiConfig->Line & EXTI_GPIO) == EXTI_GPIO) + { + assert_param(IS_EXTI_GPIO_PIN(linepos)); + + regval = SYSCFG->EXTICR[linepos >> 2u]; + pExtiConfig->GPIOSel = (regval >> (SYSCFG_EXTICR1_EXTI1_Pos * (linepos & 0x03u))) & SYSCFG_EXTICR1_EXTI0; + } + } + + return HAL_OK; +} + + +/** + * @brief Clear whole configuration of a dedicated Exti line. + * @param hexti Exti handle. + * @retval HAL Status. + */ +HAL_StatusTypeDef HAL_EXTI_ClearConfigLine(EXTI_HandleTypeDef *hexti) +{ + __IO uint32_t *regaddr; + uint32_t regval; + uint32_t linepos; + uint32_t maskline; + uint32_t offset; + + /* Check null pointer */ + if (hexti == NULL) + { + return HAL_ERROR; + } + + /* Check the parameter */ + assert_param(IS_EXTI_LINE(hexti->Line)); + + /* compute line register offset and line mask */ + offset = ((hexti->Line & EXTI_REG_MASK) >> EXTI_REG_SHIFT); + linepos = (hexti->Line & EXTI_PIN_MASK); + maskline = (1uL << linepos); + + /* 1] Clear interrupt mode */ + regaddr = (&EXTI->IMR1 + (EXTI_MODE_OFFSET * offset)); + regval = (*regaddr & ~maskline); + *regaddr = regval; + + /* 2] Clear event mode */ + regaddr = (&EXTI->EMR1 + (EXTI_MODE_OFFSET * offset)); + regval = (*regaddr & ~maskline); + *regaddr = regval; + + /* 3] Clear triggers in case of configurable lines */ + if ((hexti->Line & EXTI_CONFIG) != 0x00u) + { + regaddr = (&EXTI->RTSR1 + (EXTI_CONFIG_OFFSET * offset)); + regval = (*regaddr & ~maskline); + *regaddr = regval; + + regaddr = (&EXTI->FTSR1 + (EXTI_CONFIG_OFFSET * offset)); + regval = (*regaddr & ~maskline); + *regaddr = regval; + + /* Get Gpio port selection for gpio lines */ + if ((hexti->Line & EXTI_GPIO) == EXTI_GPIO) + { + assert_param(IS_EXTI_GPIO_PIN(linepos)); + + regval = SYSCFG->EXTICR[linepos >> 2u]; + regval &= ~(SYSCFG_EXTICR1_EXTI0 << (SYSCFG_EXTICR1_EXTI1_Pos * (linepos & 0x03u))); + SYSCFG->EXTICR[linepos >> 2u] = regval; + } + } + + return HAL_OK; +} + + +/** + * @brief Register callback for a dedicaated Exti line. + * @param hexti Exti handle. + * @param CallbackID User callback identifier. + * This parameter can be one of @arg @ref EXTI_CallbackIDTypeDef values. + * @param pPendingCbfn function pointer to be stored as callback. + * @retval HAL Status. + */ +HAL_StatusTypeDef HAL_EXTI_RegisterCallback(EXTI_HandleTypeDef *hexti, EXTI_CallbackIDTypeDef CallbackID, + void (*pPendingCbfn)(void)) +{ + HAL_StatusTypeDef status = HAL_OK; + + switch (CallbackID) + { + case HAL_EXTI_COMMON_CB_ID: + hexti->PendingCallback = pPendingCbfn; + break; + + default: + status = HAL_ERROR; + break; + } + + return status; +} + + +/** + * @brief Store line number as handle private field. + * @param hexti Exti handle. + * @param ExtiLine Exti line number. + * This parameter can be from 0 to @ref EXTI_LINE_NB. + * @retval HAL Status. + */ +HAL_StatusTypeDef HAL_EXTI_GetHandle(EXTI_HandleTypeDef *hexti, uint32_t ExtiLine) +{ + /* Check the parameters */ + assert_param(IS_EXTI_LINE(ExtiLine)); + + /* Check null pointer */ + if (hexti == NULL) + { + return HAL_ERROR; + } + else + { + /* Store line number as handle private field */ + hexti->Line = ExtiLine; + + return HAL_OK; + } +} + + +/** + * @} + */ + +/** @addtogroup EXTI_Exported_Functions_Group2 + * @brief EXTI IO functions. + * +@verbatim + =============================================================================== + ##### IO operation functions ##### + =============================================================================== + +@endverbatim + * @{ + */ + +/** + * @brief Handle EXTI interrupt request. + * @param hexti Exti handle. + * @retval none. + */ +void HAL_EXTI_IRQHandler(EXTI_HandleTypeDef *hexti) +{ + __IO uint32_t *regaddr; + uint32_t regval; + uint32_t maskline; + uint32_t offset; + + /* Compute line register offset and line mask */ + offset = ((hexti->Line & EXTI_REG_MASK) >> EXTI_REG_SHIFT); + maskline = (1uL << (hexti->Line & EXTI_PIN_MASK)); + + /* Get pending bit */ + regaddr = (&EXTI->PR1 + (EXTI_CONFIG_OFFSET * offset)); + regval = (*regaddr & maskline); + + if (regval != 0x00u) + { + /* Clear pending bit */ + *regaddr = maskline; + + /* Call callback */ + if (hexti->PendingCallback != NULL) + { + hexti->PendingCallback(); + } + } +} + + +/** + * @brief Get interrupt pending bit of a dedicated line. + * @param hexti Exti handle. + * @param Edge Specify which pending edge as to be checked. + * This parameter can be one of the following values: + * @arg @ref EXTI_TRIGGER_RISING_FALLING + * This parameter is kept for compatibility with other series. + * @retval 1 if interrupt is pending else 0. + */ +uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(Edge); + + __IO uint32_t *regaddr; + uint32_t regval; + uint32_t linepos; + uint32_t maskline; + uint32_t offset; + + /* Check parameters */ + assert_param(IS_EXTI_LINE(hexti->Line)); + assert_param(IS_EXTI_CONFIG_LINE(hexti->Line)); + + /* compute line register offset and line mask */ + offset = ((hexti->Line & EXTI_REG_MASK) >> EXTI_REG_SHIFT); + linepos = (hexti->Line & EXTI_PIN_MASK); + maskline = (1uL << linepos); + + /* Get pending bit */ + regaddr = (&EXTI->PR1 + (EXTI_CONFIG_OFFSET * offset)); + + /* return 1 if bit is set else 0 */ + regval = ((*regaddr & maskline) >> linepos); + return regval; +} + + +/** + * @brief Clear interrupt pending bit of a dedicated line. + * @param hexti Exti handle. + * @param Edge Specify which pending edge as to be clear. + * This parameter can be one of the following values: + * @arg @ref EXTI_TRIGGER_RISING_FALLING + * This parameter is kept for compatibility with other series. + * @retval None. + */ +void HAL_EXTI_ClearPending(EXTI_HandleTypeDef *hexti, uint32_t Edge) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(Edge); + + __IO uint32_t *regaddr; + uint32_t maskline; + uint32_t offset; + + /* Check parameters */ + assert_param(IS_EXTI_LINE(hexti->Line)); + assert_param(IS_EXTI_CONFIG_LINE(hexti->Line)); + + /* compute line register offset and line mask */ + offset = ((hexti->Line & EXTI_REG_MASK) >> EXTI_REG_SHIFT); + maskline = (1uL << (hexti->Line & EXTI_PIN_MASK)); + + /* Get pending register address */ + regaddr = (&EXTI->PR1 + (EXTI_CONFIG_OFFSET * offset)); + + /* Clear Pending bit */ + *regaddr = maskline; +} + + +/** + * @brief Generate a software interrupt for a dedicated line. + * @param hexti Exti handle. + * @retval None. + */ +void HAL_EXTI_GenerateSWI(EXTI_HandleTypeDef *hexti) +{ + __IO uint32_t *regaddr; + uint32_t maskline; + uint32_t offset; + + /* Check parameters */ + assert_param(IS_EXTI_LINE(hexti->Line)); + assert_param(IS_EXTI_CONFIG_LINE(hexti->Line)); + + /* compute line register offset and line mask */ + offset = ((hexti->Line & EXTI_REG_MASK) >> EXTI_REG_SHIFT); + maskline = (1uL << (hexti->Line & EXTI_PIN_MASK)); + + regaddr = (&EXTI->SWIER1 + (EXTI_CONFIG_OFFSET * offset)); + *regaddr = maskline; +} + + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_EXTI_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c new file mode 100644 index 0000000..4f2232a --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c @@ -0,0 +1,743 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_flash.c + * @author MCD Application Team + * @brief FLASH HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the internal FLASH memory: + * + Program operations functions + * + Memory Control functions + * + Peripheral Errors functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### FLASH peripheral features ##### + ============================================================================== + + [..] The Flash memory interface manages CPU AHB I-Code and D-Code accesses + to the Flash memory. It implements the erase and program Flash memory operations + and the read and write protection mechanisms. + + [..] The Flash memory interface accelerates code execution with a system of instruction + prefetch and cache lines. + + [..] The FLASH main features are: + (+) Flash memory read operations + (+) Flash memory program/erase operations + (+) Program and Erase suspension + (+) Read / write protections (2 areas per features) + (+) CPU2 Security area + (+) Option bytes programming + (+) Prefetch on CPU1 I-Code and CPU2 S-bus + (+) 32 instruction cache lines of 4*64 bits on I-Code for CPU1 + (+) 8 data cache lines of 4*64 bits on D-Code for CPU1 + (+) 4 instruction cache lines of 1*64 bits on S-bus for CPU2 + (+) 4 data cache lines of 1*64 bits on S-Bus for CPU2 + (+) Error code correction (ECC) : Data in flash are 72-bits word + (8 bits added per double word) + + ##### How to use this driver ##### + ============================================================================== + [..] + This driver provides functions and macros to configure and program the FLASH + memory of all STM32WBxx devices. + + (#) Flash Memory IO Programming functions: + (++) Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and + HAL_FLASH_Lock() functions + (++) Program functions: double word and fast program (full row programming) + (++) There are two modes of programming: + (+++) Polling mode using HAL_FLASH_Program() function + (+++) Interrupt mode using HAL_FLASH_Program_IT() function + + (#) Interrupts and flags management functions: + (++) Handle FLASH interrupts by calling HAL_FLASH_IRQHandler() + (++) Callback functions are called when the flash operations are finished : + HAL_FLASH_EndOfOperationCallback() when everything is ok, otherwise + HAL_FLASH_OperationErrorCallback() + (++) Get error flag status by calling HAL_GetError() + + (#) Option bytes management functions : + (++) Lock and Unlock the option bytes using HAL_FLASH_OB_Unlock() and + HAL_FLASH_OB_Lock() functions + (++) Launch the reload of the option bytes using HAL_FLASH_OB_Launch() function. + In this case, a reset is generated + + [..] + In addition to these functions, this driver includes a set of macros allowing + to handle the following operations: + (+) Set the latency + (+) Enable/Disable the prefetch buffer + (+) Enable/Disable the suspend program or erase request + (+) Enable/Disable the Instruction cache and the Data cache + (+) Reset the Instruction cache and the Data cache + (+) Enable/Disable the Flash interrupts + (+) Monitor the Flash flags status + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup FLASH FLASH + * @brief FLASH HAL module driver + * @{ + */ + +#ifdef HAL_FLASH_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +/** @addtogroup FLASH_Private_Constants + * @{ + */ +#define FLASH_NB_DOUBLE_WORDS_IN_ROW 64 +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/** @defgroup FLASH_Private_Variables FLASH Private Variables + * @{ + */ +/** + * @brief Variable used for Program/Erase sectors under interruption + */ +FLASH_ProcessTypeDef pFlash = {.Lock = HAL_UNLOCKED, \ + .ErrorCode = HAL_FLASH_ERROR_NONE, \ + .ProcedureOnGoing = 0U, \ + .Address = 0U, \ + .Page = 0U, \ + .NbPagesToErase = 0U + }; +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup FLASH_Private_Functions FLASH Private Functions + * @{ + */ +static void FLASH_Program_DoubleWord(uint32_t Address, uint64_t Data); +static void FLASH_Program_Fast(uint32_t Address, uint32_t DataAddress); +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ +/** @defgroup FLASH_Exported_Functions FLASH Exported Functions + * @{ + */ + +/** @defgroup FLASH_Exported_Functions_Group1 Programming operation functions + * @brief Programming operation functions + * +@verbatim + =============================================================================== + ##### Programming operation functions ##### + =============================================================================== + [..] + This subsection provides a set of functions allowing to manage the FLASH + program operations. + +@endverbatim + * @{ + */ + +/** + * @brief Program double word or fast program of a row at a specified address. + * @note Before any operation, it is possible to check there is no operation suspended + * by call HAL_FLASHEx_IsOperationSuspended() + * @param TypeProgram Indicate the way to program at a specified address + * This parameter can be a value of @ref FLASH_TYPE_PROGRAM + * @param Address Specifies the address to be programmed. + * @param Data Specifies the data to be programmed + * This parameter is the data for the double word program and the address where + * are stored the data for the row fast program. + * + * @retval HAL_StatusTypeDef HAL Status + */ +HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data) +{ + HAL_StatusTypeDef status; + + /* Check the parameters */ + assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram)); + assert_param(IS_ADDR_ALIGNED_64BITS(Address)); + assert_param(IS_FLASH_PROGRAM_ADDRESS(Address)); + + /* Process Locked */ + __HAL_LOCK(&pFlash); + + /* Reset error code */ + pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; + + /* Verify that next operation can be proceed */ + status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); + + if (status == HAL_OK) + { + if (TypeProgram == FLASH_TYPEPROGRAM_DOUBLEWORD) + { + /* Check the parameters */ + assert_param(IS_FLASH_PROGRAM_ADDRESS(Address)); + + /* Program double-word (64-bit) at a specified address */ + FLASH_Program_DoubleWord(Address, Data); + } + else + { + /* Check the parameters */ + assert_param(IS_FLASH_FAST_PROGRAM_ADDRESS(Address)); + + /* Fast program a 64 row double-word (64-bit) at a specified address */ + FLASH_Program_Fast(Address, (uint32_t)Data); + } + + /* Wait for last operation to be completed */ + status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); + + /* If the program operation is completed, disable the PG or FSTPG Bit */ + CLEAR_BIT(FLASH->CR, TypeProgram); + } + + /* Process Unlocked */ + __HAL_UNLOCK(&pFlash); + + /* return status */ + return status; +} + +/** + * @brief Program double word or fast program of a row at a specified address with interrupt enabled. + * @note Before any operation, it is possible to check there is no operation suspended + * by call HAL_FLASHEx_IsOperationSuspended() + * @param TypeProgram Indicate the way to program at a specified address. + * This parameter can be a value of @ref FLASH_TYPE_PROGRAM + * @param Address Specifies the address to be programmed. + * @param Data Specifies the data to be programmed + * This parameter is the data for the double word program and the address where + * are stored the data for the row fast program. + * + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data) +{ + HAL_StatusTypeDef status; + + /* Check the parameters */ + assert_param(IS_FLASH_TYPEPROGRAM(TypeProgram)); + assert_param(IS_ADDR_ALIGNED_64BITS(Address)); + assert_param(IS_FLASH_PROGRAM_ADDRESS(Address)); + + /* Process Locked */ + __HAL_LOCK(&pFlash); + + /* Reset error code */ + pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; + + /* Verify that next operation can be proceed */ + status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); + + if (status != HAL_OK) + { + /* Process Unlocked */ + __HAL_UNLOCK(&pFlash); + } + else + { + /* Set internal variables used by the IRQ handler */ + pFlash.ProcedureOnGoing = TypeProgram; + pFlash.Address = Address; + + /* Enable End of Operation and Error interrupts */ + __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP | FLASH_IT_OPERR); + + if (TypeProgram == FLASH_TYPEPROGRAM_DOUBLEWORD) + { + /* Check the parameters */ + assert_param(IS_FLASH_PROGRAM_ADDRESS(Address)); + + /* Program double-word (64-bit) at a specified address */ + FLASH_Program_DoubleWord(Address, Data); + } + else + { + /* Check the parameters */ + assert_param(IS_FLASH_FAST_PROGRAM_ADDRESS(Address)); + + /* Fast program a 64 row double-word (64-bit) at a specified address */ + FLASH_Program_Fast(Address, (uint32_t)Data); + } + } + + /* return status */ + return status; +} + +/** + * @brief Handle FLASH interrupt request. + * @retval None + */ +void HAL_FLASH_IRQHandler(void) +{ + uint32_t param = 0xFFFFFFFFU; + uint32_t error; + + /* Check FLASH operation error flags */ + error = (FLASH->SR & FLASH_FLAG_SR_ERRORS); + + /* Clear Current operation */ + CLEAR_BIT(FLASH->CR, pFlash.ProcedureOnGoing); + + /* A] Set parameter for user or error callbacks */ + /* check operation was a program or erase */ + if ((pFlash.ProcedureOnGoing & (FLASH_TYPEPROGRAM_DOUBLEWORD | FLASH_TYPEPROGRAM_FAST)) != 0U) + { + /* return address being programmed */ + param = pFlash.Address; + } + else if ((pFlash.ProcedureOnGoing & (FLASH_TYPEERASE_PAGES)) != 0U) + { + /* return page number being erased */ + param = pFlash.Page; + } + else + { + /* No Procedure on-going */ + /* Nothing to do, but check error if any */ + } + + /* B] Check errors */ + if (error != 0U) + { + /*Save the error code*/ + pFlash.ErrorCode |= error; + + /* clear error flags */ + __HAL_FLASH_CLEAR_FLAG(error); + + /*Stop the procedure ongoing*/ + pFlash.ProcedureOnGoing = FLASH_TYPENONE; + + /* Error callback */ + HAL_FLASH_OperationErrorCallback(param); + } + + /* C] Check FLASH End of Operation flag */ + if (__HAL_FLASH_GET_FLAG(FLASH_FLAG_EOP)) + { + /* Clear FLASH End of Operation pending bit */ + __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP); + + if (pFlash.ProcedureOnGoing == FLASH_TYPEERASE_PAGES) + { + /* Nb of pages to erased can be decreased */ + pFlash.NbPagesToErase--; + + /* Check if there are still pages to erase*/ + if (pFlash.NbPagesToErase != 0U) + { + /* Increment page number */ + pFlash.Page++; + FLASH_PageErase(pFlash.Page); + } + else + { + /* No more pages to erase: stop erase pages procedure */ + pFlash.ProcedureOnGoing = FLASH_TYPENONE; + } + } + else + { + /*Stop the ongoing procedure */ + pFlash.ProcedureOnGoing = FLASH_TYPENONE; + } + + /* User callback */ + HAL_FLASH_EndOfOperationCallback(param); + } + + if (pFlash.ProcedureOnGoing == FLASH_TYPENONE) + { + /* Disable End of Operation and Error interrupts */ + __HAL_FLASH_DISABLE_IT(FLASH_IT_EOP | FLASH_IT_OPERR); + + /* Process Unlocked */ + __HAL_UNLOCK(&pFlash); + } +} + +/** + * @brief FLASH end of operation interrupt callback. + * @param ReturnValue The value saved in this parameter depends on the ongoing procedure + * Page Erase: Page which has been erased + * Program: Address which was selected for data program + * @retval None + */ +__weak void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(ReturnValue); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_FLASH_EndOfOperationCallback could be implemented in the user file + */ +} + +/** + * @brief FLASH operation error interrupt callback. + * @param ReturnValue The value saved in this parameter depends on the ongoing procedure + * Page Erase: Page number which returned an error + * Program: Address which was selected for data program + * @retval None + */ +__weak void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(ReturnValue); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_FLASH_OperationErrorCallback could be implemented in the user file + */ +} + +/** + * @} + */ + +/** @defgroup FLASH_Exported_Functions_Group2 Peripheral Control functions + * @brief Management functions + * +@verbatim + =============================================================================== + ##### Peripheral Control functions ##### + =============================================================================== + [..] + This subsection provides a set of functions allowing to control the FLASH + memory operations. + +@endverbatim + * @{ + */ + +/** + * @brief Unlock the FLASH control register access. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASH_Unlock(void) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0U) + { + /* Authorize the FLASH Registers access */ + WRITE_REG(FLASH->KEYR, FLASH_KEY1); + WRITE_REG(FLASH->KEYR, FLASH_KEY2); + + /* verify Flash is unlock */ + if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) != 0U) + { + status = HAL_ERROR; + } + } + + return status; +} + +/** + * @brief Lock the FLASH control register access. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASH_Lock(void) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Set the LOCK Bit to lock the FLASH Registers access */ + /* @Note The lock and unlock procedure is done only using CR registers even from CPU2 */ + SET_BIT(FLASH->CR, FLASH_CR_LOCK); + + /* verify Flash is locked */ + if (READ_BIT(FLASH->CR, FLASH_CR_LOCK) == 0U) + { + status = HAL_ERROR; + } + + return status; +} + +/** + * @brief Unlock the FLASH Option Bytes Registers access. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void) +{ + HAL_StatusTypeDef status = HAL_ERROR; + + /* @Note The lock and unlock procedure is done only using CR registers even from CPU2 */ + if (READ_BIT(FLASH->CR, FLASH_CR_OPTLOCK) != 0U) + { + /* Authorizes the Option Byte register programming */ + WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY1); + WRITE_REG(FLASH->OPTKEYR, FLASH_OPTKEY2); + + /* verify option bytes are unlocked */ + if (READ_BIT(FLASH->CR, FLASH_CR_OPTLOCK) == 0U) + { + status = HAL_OK; + } + } + + return status; +} + +/** + * @brief Lock the FLASH Option Bytes Registers access. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASH_OB_Lock(void) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Set the OPTLOCK Bit to lock the FLASH Option Byte Registers access */ + /* @Note The lock and unlock procedure is done only using CR registers even from CPU2 */ + SET_BIT(FLASH->CR, FLASH_CR_OPTLOCK); + + /* verify option bytes are lock */ + if (READ_BIT(FLASH->CR, FLASH_CR_OPTLOCK) == 0U) + { + status = HAL_ERROR; + } + + return status; +} + +/** + * @brief Launch the option byte loading. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASH_OB_Launch(void) +{ + /* Set the bit to force the option byte reloading */ + /* The OB launch is done from the same register either from CPU1 or CPU2 */ + SET_BIT(FLASH->CR, FLASH_CR_OBL_LAUNCH); + + /* We should not reach here : Option byte launch generates Option byte reset + so return error */ + return HAL_ERROR; +} + +/** + * @} + */ + +/** @defgroup FLASH_Exported_Functions_Group3 Peripheral State and Errors functions + * @brief Peripheral Errors functions + * +@verbatim + =============================================================================== + ##### Peripheral Errors functions ##### + =============================================================================== + [..] + This subsection permits to get in run-time Errors of the FLASH peripheral. + +@endverbatim + * @{ + */ + +/** + * @brief Get the specific FLASH error flag. + * @retval FLASH_ErrorCode The returned value can be + * @arg @ref HAL_FLASH_ERROR_NONE No error set + * @arg @ref HAL_FLASH_ERROR_OP FLASH Operation error + * @arg @ref HAL_FLASH_ERROR_PROG FLASH Programming error + * @arg @ref HAL_FLASH_ERROR_WRP FLASH Write protection error + * @arg @ref HAL_FLASH_ERROR_PGA FLASH Programming alignment error + * @arg @ref HAL_FLASH_ERROR_SIZ FLASH Size error + * @arg @ref HAL_FLASH_ERROR_PGS FLASH Programming sequence error + * @arg @ref HAL_FLASH_ERROR_MIS FLASH Fast programming data miss error + * @arg @ref HAL_FLASH_ERROR_FAST FLASH Fast programming error + * @arg @ref HAL_FLASH_ERROR_RD FLASH Read Protection error (PCROP) + * @arg @ref HAL_FLASH_ERROR_OPTV FLASH Option validity error + */ +uint32_t HAL_FLASH_GetError(void) +{ + return pFlash.ErrorCode; +} + +/** + * @} + */ + +/** + * @} + */ + +/* Private functions ---------------------------------------------------------*/ + +/** @addtogroup FLASH_Private_Functions + * @{ + */ + +/** + * @brief Wait for a FLASH operation to complete. + * @param Timeout Maximum flash operation timeout + * @retval HAL_StatusTypeDef HAL Status + */ +HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout) +{ + uint32_t error; + uint32_t tickstart = HAL_GetTick(); + + /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. + Even if the FLASH operation fails, the BUSY flag will be reset and an error + flag will be set */ + while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY)) + { + if ((HAL_GetTick() - tickstart) >= Timeout) + { + return HAL_TIMEOUT; + } + } + + /* Check FLASH operation error flags */ + error = FLASH->SR; + + /* Check FLASH End of Operation flag */ + if ((error & FLASH_FLAG_EOP) != 0U) + { + /* Clear FLASH End of Operation pending bit */ + __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP); + } + + /* Workaround for BZ 70309 : + - OPTVERR is always set at power-up due to failure of engi bytes checking + - FLASH_WaitForLastOperation() is called at the beginning of erase or program + operations, so the bit will be clear when performing first operation */ + if ((error & FLASH_FLAG_OPTVERR) != 0U) + { + /* Clear FLASH OPTVERR bit */ + __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR); + + /* Clear OPTVERR bit in "error" variable to not treat it as error */ + error &= ~FLASH_FLAG_OPTVERR; + } + + /* Now update error variable to only error value */ + error &= FLASH_FLAG_SR_ERRORS; + + /* clear error flags */ + __HAL_FLASH_CLEAR_FLAG(error); + + if (error != 0U) + { + /*Save the error code*/ + pFlash.ErrorCode = error; + + return HAL_ERROR; + } + + /* Wait for control register to be written */ + while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_CFGBSY)) + { + if ((HAL_GetTick() - tickstart) >= Timeout) + { + return HAL_TIMEOUT; + } + } + + return HAL_OK; +} + +/** + * @brief Program double-word (64-bit) at a specified address. + * @param Address Specifies the address to be programmed. + * @param Data Specifies the data to be programmed. + * @retval None + */ +static void FLASH_Program_DoubleWord(uint32_t Address, uint64_t Data) +{ + /* Set PG bit */ + SET_BIT(FLASH->CR, FLASH_CR_PG); + + /* Program first word */ + *(uint32_t *)Address = (uint32_t)Data; + + /* Barrier to ensure programming is performed in 2 steps, in right order + (independently of compiler optimization behavior) */ + __ISB(); + + /* Program second word */ + *(uint32_t *)(Address + 4U) = (uint32_t)(Data >> 32U); +} + +/** + * @brief Fast program a 32 row double-word (64-bit) at a specified address. + * @param Address Specifies the address to be programmed. + * @param DataAddress Specifies the address where the data are stored. + * @retval None + */ +static __RAM_FUNC void FLASH_Program_Fast(uint32_t Address, uint32_t DataAddress) +{ + uint8_t row_index = (2 * FLASH_NB_DOUBLE_WORDS_IN_ROW); + __IO uint32_t *dest_addr = (__IO uint32_t *)Address; + __IO uint32_t *src_addr = (__IO uint32_t *)DataAddress; + uint32_t primask_bit; + + /* Set FSTPG bit */ + SET_BIT(FLASH->CR, FLASH_CR_FSTPG); + + /* Enter critical section: row programming should not be longer than 7 ms */ + primask_bit = __get_PRIMASK(); + __disable_irq(); + + /* Program the double word of the row */ + do + { + *dest_addr = *src_addr; + dest_addr++; + src_addr++; + row_index--; + } while (row_index != 0U); + + /* wait for BSY in order to be sure that flash operation is ended before + allowing prefetch in flash. Timeout does not return status, as it will + be anyway done later */ + while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_BSY) != 0U) + { + } + + /* Exit critical section: restore previous priority mask */ + __set_PRIMASK(primask_bit); +} + +/** + * @} + */ + +#endif /* HAL_FLASH_MODULE_ENABLED */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c new file mode 100644 index 0000000..e54df67 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c @@ -0,0 +1,1061 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_flash_ex.c + * @author MCD Application Team + * @brief Extended FLASH HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the FLASH extended peripheral: + * + Extended programming operations functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### Flash Extended features ##### + ============================================================================== + + [..] Comparing to other previous devices, the FLASH interface for STM32WBxx + devices contains the following additional features + + (+) Capacity up to 1 Mbyte with single bank architecture supporting read-while-write + capability (RWW) + (+) Single bank memory organization + (+) PCROP protection + (+) WRP protection + (+) CPU2 Security area + (+) Program Erase Suspend feature + + ##### How to use this driver ##### + ============================================================================== + [..] This driver provides functions to configure and program the FLASH memory + of all STM32WBxx devices. It includes + (#) Flash Memory Erase functions: + (++) Lock and Unlock the FLASH interface using HAL_FLASH_Unlock() and + HAL_FLASH_Lock() functions + (++) Erase function: Erase page, erase all sectors + (++) There are two modes of erase : + (+++) Polling Mode using HAL_FLASHEx_Erase() + (+++) Interrupt Mode using HAL_FLASHEx_Erase_IT() + + (#) Option Bytes Programming function: Use HAL_FLASHEx_OBProgram() to : + (++) Set/Reset the write protection (per 4 KByte) + (++) Set the Read protection Level + (++) Program the user Option Bytes + (++) Configure the PCROP protection (per 2 KByte) + (++) Configure the IPCC Buffer start Address + (++) Configure the CPU2 boot region and reset vector start Address + (++) Configure the Flash and SRAM2 secure area + + (#) Get Option Bytes Configuration function: Use HAL_FLASHEx_OBGetConfig() to : + (++) Get the value of a write protection area + (++) Know if the read protection is activated + (++) Get the value of the user Option Bytes + (++) Get the value of a PCROP area + (++) Get the IPCC Buffer start Address + (++) Get the CPU2 boot region and reset vector start Address + (++) Get the Flash and SRAM2 secure area + + (#) Flash Suspend, Allow functions: + (++) Suspend or Allow new program or erase operation request using HAL_FLASHEx_SuspendOperation() and + HAL_FLASHEx_AllowOperation() functions + + (#) Check is flash content is empty or not using HAL_FLASHEx_FlashEmptyCheck(). + and modify this setting (for flash loader purpose e.g.) using + HAL_FLASHEx_ForceFlashEmpty(). + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup FLASHEx FLASHEx + * @brief FLASH Extended HAL module driver + * @{ + */ + +#ifdef HAL_FLASH_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup FLASHEx_Private_Functions FLASHEx Private Functions + * @{ + */ +static void FLASH_AcknowledgePageErase(void); +static void FLASH_FlushCaches(void); +static void FLASH_OB_WRPConfig(uint32_t WRPArea, uint32_t WRPStartOffset, uint32_t WRDPEndOffset); +static void FLASH_OB_OptrConfig(uint32_t UserType, uint32_t UserConfig, uint32_t RDPLevel); +static void FLASH_OB_PCROP1AConfig(uint32_t PCROPConfig, uint32_t PCROP1AStartAddr, + uint32_t PCROP1AEndAddr); +static void FLASH_OB_PCROP1BConfig(uint32_t PCROP1BStartAddr, uint32_t PCROP1BEndAddr); +static void FLASH_OB_IPCCBufferAddrConfig(uint32_t IPCCDataBufAddr); +static void FLASH_OB_SecureConfig(FLASH_OBProgramInitTypeDef *pOBParam); +static void FLASH_OB_GetWRP(uint32_t WRPArea, uint32_t *WRPStartOffset, uint32_t *WRDPEndOffset); +static uint32_t FLASH_OB_GetRDP(void); +static uint32_t FLASH_OB_GetUser(void); +static void FLASH_OB_GetPCROP(uint32_t *PCROPConfig, uint32_t *PCROP1AStartAddr, uint32_t *PCROP1AEndAddr, + uint32_t *PCROP1BStartAddr, uint32_t *PCROP1BEndAddr); +static uint32_t FLASH_OB_GetIPCCBufferAddr(void); +static void FLASH_OB_GetSecureMemoryConfig(uint32_t *SecureFlashStartAddr, uint32_t *SecureRAM2aStartAddr, + uint32_t *SecureRAM2bStartAddr, uint32_t *SecureMode); +static void FLASH_OB_GetC2BootResetConfig(uint32_t *C2BootResetVectAddr, uint32_t *C2BootResetRegion); +static HAL_StatusTypeDef FLASH_OB_ProceedWriteOperation(void); +/** + * @} + */ + +/* Exported functions -------------------------------------------------------*/ +/** @defgroup FLASHEx_Exported_Functions FLASH Extended Exported Functions + * @{ + */ + +/** @defgroup FLASHEx_Exported_Functions_Group1 Extended IO operation functions + * @brief Extended IO operation functions + * +@verbatim + =============================================================================== + ##### Extended programming operation functions ##### + =============================================================================== + [..] + This subsection provides a set of functions allowing to manage the Extended FLASH + programming operations Operations. + +@endverbatim + * @{ + */ +/** + * @brief Perform an erase of the specified FLASH memory pages. + * @note Before any operation, it is possible to check there is no operation suspended + * by call HAL_FLASHEx_IsOperationSuspended() + * @param[in] pEraseInit Pointer to an @ref FLASH_EraseInitTypeDef structure that + * contains the configuration information for the erasing. + * @param[out] PageError Pointer to variable that contains the configuration + * information on faulty page in case of error (0xFFFFFFFF means that all + * the pages have been correctly erased) + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError) +{ + HAL_StatusTypeDef status; + uint32_t index; + + /* Check the parameters */ + assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase)); + + /* Process Locked */ + __HAL_LOCK(&pFlash); + + /* Reset error code */ + pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; + + /* Verify that next operation can be proceed */ + status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); + + if (status == HAL_OK) + { + if (pEraseInit->TypeErase == FLASH_TYPEERASE_PAGES) + { + /*Initialization of PageError variable*/ + *PageError = 0xFFFFFFFFU; + + for (index = pEraseInit->Page; index < (pEraseInit->Page + pEraseInit->NbPages); index++) + { + /* Start erase page */ + FLASH_PageErase(index); + + /* Wait for last operation to be completed */ + status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); + + if (status != HAL_OK) + { + /* In case of error, stop erase procedure and return the faulty address */ + *PageError = index; + break; + } + } + + /* If operation is completed or interrupted, disable the Page Erase Bit */ + FLASH_AcknowledgePageErase(); + } + + /* Flush the caches to be sure of the data consistency */ + FLASH_FlushCaches(); + } + + /* Process Unlocked */ + __HAL_UNLOCK(&pFlash); + + return status; +} + +/** + * @brief Perform an erase of the specified FLASH memory pages with interrupt enabled. + * @note Before any operation, it is possible to check there is no operation suspended + * by call HAL_FLASHEx_IsOperationSuspended() + * @param pEraseInit Pointer to an @ref FLASH_EraseInitTypeDef structure that + * contains the configuration information for the erasing. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit) +{ + HAL_StatusTypeDef status; + + /* Check the parameters */ + assert_param(IS_FLASH_TYPEERASE(pEraseInit->TypeErase)); + + /* Process Locked */ + __HAL_LOCK(&pFlash); + + /* Reset error code */ + pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; + + /* save procedure for interrupt treatment */ + pFlash.ProcedureOnGoing = pEraseInit->TypeErase; + + /* Verify that next operation can be proceed */ + status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); + + if (status != HAL_OK) + { + /* Process Unlocked */ + __HAL_UNLOCK(&pFlash); + } + else + { + /* Enable End of Operation and Error interrupts */ + __HAL_FLASH_ENABLE_IT(FLASH_IT_EOP | FLASH_IT_OPERR); + + if (pEraseInit->TypeErase == FLASH_TYPEERASE_PAGES) + { + /* Erase by page to be done */ + pFlash.NbPagesToErase = pEraseInit->NbPages; + pFlash.Page = pEraseInit->Page; + + /*Erase 1st page and wait for IT */ + FLASH_PageErase(pEraseInit->Page); + } + } + + /* return status */ + return status; +} + +/** + * @brief Program Option bytes. + * @param pOBInit Pointer to an @ref FLASH_OBProgramInitTypeDef structure that + * contains the configuration information for the programming. + * @note To configure any option bytes, the option lock bit OPTLOCK must be + * cleared with the call of @ref HAL_FLASH_OB_Unlock() function. + * @note New option bytes configuration will be taken into account only + * - after an option bytes launch through the call of @ref HAL_FLASH_OB_Launch() + * - a Power On Reset + * - an exit from Standby or Shutdown mode. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit) +{ + uint32_t optr; + HAL_StatusTypeDef status; + + /* Check the parameters */ + assert_param(IS_OPTIONBYTE(pOBInit->OptionType)); + + /* Process Locked */ + __HAL_LOCK(&pFlash); + + pFlash.ErrorCode = HAL_FLASH_ERROR_NONE; + + /* Write protection configuration */ + if ((pOBInit->OptionType & OPTIONBYTE_WRP) != 0U) + { + /* Configure of Write protection on the selected area */ + FLASH_OB_WRPConfig(pOBInit->WRPArea, pOBInit->WRPStartOffset, pOBInit->WRPEndOffset); + } + + /* Option register */ + if ((pOBInit->OptionType & (OPTIONBYTE_RDP | OPTIONBYTE_USER)) == (OPTIONBYTE_RDP | OPTIONBYTE_USER)) + { + /* Fully modify OPTR register with RDP & user data */ + FLASH_OB_OptrConfig(pOBInit->UserType, pOBInit->UserConfig, pOBInit->RDPLevel); + } + else if ((pOBInit->OptionType & OPTIONBYTE_RDP) != 0U) + { + /* Only modify RDP so get current user data */ + optr = FLASH_OB_GetUser(); + + /* Remove BOR LEVEL User Type*/ + optr &= ~OB_USER_BOR_LEV; + + FLASH_OB_OptrConfig(optr, optr, pOBInit->RDPLevel); + } + else if ((pOBInit->OptionType & OPTIONBYTE_USER) != 0U) + { + /* Only modify user so get current RDP level */ + optr = FLASH_OB_GetRDP(); + FLASH_OB_OptrConfig(pOBInit->UserType, pOBInit->UserConfig, optr); + } + else + { + /* Do Nothing */ + } + + /* PCROP Configuration */ + if ((pOBInit->OptionType & OPTIONBYTE_PCROP) != 0U) + { + /* Check the parameters */ + assert_param(IS_OB_PCROP_CONFIG(pOBInit->PCROPConfig)); + + if ((pOBInit->PCROPConfig & (OB_PCROP_ZONE_A | OB_PCROP_RDP_ERASE)) != 0U) + { + /* Configure the Zone 1A Proprietary code readout protection */ + FLASH_OB_PCROP1AConfig(pOBInit->PCROPConfig, pOBInit->PCROP1AStartAddr, pOBInit->PCROP1AEndAddr); + } + + if ((pOBInit->PCROPConfig & OB_PCROP_ZONE_B) != 0U) + { + /* Configure the Zone 1B Proprietary code readout protection */ + FLASH_OB_PCROP1BConfig(pOBInit->PCROP1BStartAddr, pOBInit->PCROP1BEndAddr); + } + } + + /* Secure mode and CPU2 Boot Vector */ + if ((pOBInit->OptionType & (OPTIONBYTE_SECURE_MODE | OPTIONBYTE_C2_BOOT_VECT)) != 0U) + { + /* Set the secure flash and SRAM memory start address */ + FLASH_OB_SecureConfig(pOBInit); + } + + /* IPCC mailbox data buffer address */ + if ((pOBInit->OptionType & OPTIONBYTE_IPCC_BUF_ADDR) != 0U) + { + /* Configure the IPCC data buffer address */ + FLASH_OB_IPCCBufferAddrConfig(pOBInit->IPCCdataBufAddr); + } + + /* Proceed the OB Write Operation */ + status = FLASH_OB_ProceedWriteOperation(); + + /* Process Unlocked */ + __HAL_UNLOCK(&pFlash); + + /* return status */ + return status; +} + +/** + * @brief Get the Option bytes configuration. + * @note warning: this API only read flash register, it does not reflect any + * change that would have been programmed between previous Option byte + * loading and current call. + * @param pOBInit Pointer to an @ref FLASH_OBProgramInitTypeDef structure that contains the + * configuration information. The fields pOBInit->WRPArea and + * pOBInit->PCROPConfig should indicate which area is requested + * for the WRP and PCROP. + * @retval None + */ +void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit) +{ + pOBInit->OptionType = OPTIONBYTE_ALL; + + if ((pOBInit->WRPArea == OB_WRPAREA_BANK1_AREAA) || (pOBInit->WRPArea == OB_WRPAREA_BANK1_AREAB)) + { + /* Get write protection on the selected area */ + FLASH_OB_GetWRP(pOBInit->WRPArea, &(pOBInit->WRPStartOffset), &(pOBInit->WRPEndOffset)); + } + + /* Get Read protection level */ + pOBInit->RDPLevel = FLASH_OB_GetRDP(); + + /* Get the user option bytes */ + pOBInit->UserConfig = FLASH_OB_GetUser(); + pOBInit->UserType = OB_USER_ALL; + + /* Get the Zone 1A and 1B Proprietary code readout protection */ + FLASH_OB_GetPCROP(&(pOBInit->PCROPConfig), &(pOBInit->PCROP1AStartAddr), &(pOBInit->PCROP1AEndAddr), + &(pOBInit->PCROP1BStartAddr), &(pOBInit->PCROP1BEndAddr)); + pOBInit->PCROPConfig |= (OB_PCROP_ZONE_A | OB_PCROP_ZONE_B); + + /* Get the IPCC start Address */ + pOBInit->IPCCdataBufAddr = FLASH_OB_GetIPCCBufferAddr(); + + /* Get the Secure Flash start address, Secure Backup RAM2a start address, Secure non-Backup RAM2b start address and the Security Mode, */ + FLASH_OB_GetSecureMemoryConfig(&(pOBInit->SecureFlashStartAddr), &(pOBInit->SecureRAM2aStartAddr), + &(pOBInit->SecureRAM2bStartAddr), &(pOBInit->SecureMode)); + + /* Get the M0+ Secure Boot reset vector and Secure Boot memory selection */ + FLASH_OB_GetC2BootResetConfig(&(pOBInit->C2SecureBootVectAddr), &(pOBInit->C2BootRegion)); +} + +/** + * @brief Flash Empty check + * @note This API checks if first location in Flash is programmed or not. + * This check is done once by Option Byte Loader. + * @retval Returned value can be one of the following values: + * @arg @ref FLASH_PROG_NOT_EMPTY 1st location in Flash is programmed + * @arg @ref FLASH_PROG_EMPTY 1st location in Flash is empty + */ +uint32_t HAL_FLASHEx_FlashEmptyCheck(void) +{ + return (READ_BIT(FLASH->ACR, FLASH_ACR_EMPTY)); +} + + +/** + * @brief Force Empty check value. + * @note Allows to modify program empty check value in order to force this + * information in Flash Interface, for all next reset that do not launch + * Option Byte Loader. + * @param FlashEmpty Specifies the empty check value + * This parameter can be one of the following values: + * @arg @ref FLASH_PROG_NOT_EMPTY 1st location in Flash is programmed + * @arg @ref FLASH_PROG_EMPTY 1st location in Flash is empty + * @retval None + */ +void HAL_FLASHEx_ForceFlashEmpty(uint32_t FlashEmpty) +{ + assert_param(IS_FLASH_EMPTY_CHECK(FlashEmpty)); + + MODIFY_REG(FLASH->ACR, FLASH_ACR_EMPTY, FlashEmpty); +} + +/** + * @brief Suspend new program or erase operation request. + * @note Any new Flash program and erase operation on both CPU side will be suspended + * until this bit and the same bit in Flash CPU2 access control register (FLASH_C2ACR) are + * cleared. The PESD bit in both the Flash status register (FLASH_SR) and Flash + * CPU2 status register (FLASH_C2SR) register will be set when at least one PES + * bit in FLASH_ACR or FLASH_C2ACR is set. + * @retval None + */ +void HAL_FLASHEx_SuspendOperation(void) +{ + SET_BIT(FLASH->ACR, FLASH_ACR_PES); +} + +/** + * @brief Allow new program or erase operation request. + * @note Any new Flash program and erase operation on both CPU side will be allowed + * until one of this bit or the same bit in Flash CPU2 access control register (FLASH_C2ACR) is + * set. The PESD bit in both the Flash status register (FLASH_SR) and Flash + * CPU2 status register (FLASH_C2SR) register will be clear when both PES + * bit in FLASH_ACR or FLASH_C2ACR is cleared. + * @retval None + */ +void HAL_FLASHEx_AllowOperation(void) +{ + CLEAR_BIT(FLASH->ACR, FLASH_ACR_PES); +} + +/** + * @brief Check if new program or erase operation request from CPU1 or CPU2 is suspended + * @note Any new Flash program and erase operation on both CPU side will be allowed + * until one of this bit or the same bit in Flash CPU2 access control register (FLASH_C2ACR) is + * set. The PESD bit in both the Flash status register (FLASH_SR) and Flash + * CPU2 status register (FLASH_C2SR) register will be cleared when both PES + * bit in FLASH_ACR and FLASH_C2ACR are cleared. + * @retval Status + * - 0 : No suspended flash operation + * - 1 : Flash operation is suspended + */ +uint32_t HAL_FLASHEx_IsOperationSuspended(void) +{ + uint32_t status = 0U; + + if (READ_BIT(FLASH->SR, FLASH_SR_PESD) == FLASH_SR_PESD) + { + status = 1U; + } + + return status; +} + +/** + * @} + */ + +/** + * @} + */ + +/* Private functions ---------------------------------------------------------*/ +/** @addtogroup FLASHEx_Private_Functions + * @{ + */ + +/** + * @brief Erase the specified FLASH memory page. + * @param Page FLASH page to erase + * This parameter must be a value between 0 and (max number of pages in Flash - 1) + * @retval None + */ +void FLASH_PageErase(uint32_t Page) +{ + /* Check the parameters */ + assert_param(IS_FLASH_PAGE(Page)); + + /* Proceed to erase the page */ + MODIFY_REG(FLASH->CR, FLASH_CR_PNB, ((Page << FLASH_CR_PNB_Pos) | FLASH_CR_PER | FLASH_CR_STRT)); +} + +/** + * @brief Flush the instruction and data caches. + * @retval None + */ +static void FLASH_FlushCaches(void) +{ + /* Flush instruction cache */ + if (READ_BIT(FLASH->ACR, FLASH_ACR_ICEN) == FLASH_ACR_ICEN) + { + /* Disable instruction cache */ + __HAL_FLASH_INSTRUCTION_CACHE_DISABLE(); + /* Reset instruction cache */ + __HAL_FLASH_INSTRUCTION_CACHE_RESET(); + /* Enable instruction cache */ + __HAL_FLASH_INSTRUCTION_CACHE_ENABLE(); + } + + /* Flush data cache */ + if (READ_BIT(FLASH->ACR, FLASH_ACR_DCEN) == FLASH_ACR_DCEN) + { + /* Disable data cache */ + __HAL_FLASH_DATA_CACHE_DISABLE(); + /* Reset data cache */ + __HAL_FLASH_DATA_CACHE_RESET(); + /* Enable data cache */ + __HAL_FLASH_DATA_CACHE_ENABLE(); + } +} + +/** + * @brief Acknlowldge the page erase operation. + * @retval None + */ +static void FLASH_AcknowledgePageErase(void) +{ + CLEAR_BIT(FLASH->CR, (FLASH_CR_PER | FLASH_CR_PNB)); +} + +/** + * @brief Configure the write protection of the desired pages. + * @note When WRP is active in a zone, it cannot be erased or programmed. + * Consequently, a software mass erase cannot be performed if one zone + * is write-protected. + * @note When the memory read protection level is selected (RDP level = 1), + * it is not possible to program or erase Flash memory if the CPU debug + * features are connected (JTAG or single wire) or boot code is being + * executed from RAM or System flash, even if WRP is not activated. + * @note To configure the WRP options, the option lock bit OPTLOCK must be + * cleared with the call of the @ref HAL_FLASH_OB_Unlock() function. + * @note To validate the WRP options, the option bytes must be reloaded + * through the call of the @ref HAL_FLASH_OB_Launch() function. + * @param WRPArea Specifies the area to be configured. + * This parameter can be one of the following values: + * @arg @ref OB_WRPAREA_BANK1_AREAA Flash Bank 1 Area A + * @arg @ref OB_WRPAREA_BANK1_AREAB Flash Bank 1 Area B + * @param WRPStartOffset Specifies the start page of the write protected area + * This parameter can be page number between 0 and (max number of pages in the Flash - 1) + * @param WRDPEndOffset Specifies the end page of the write protected area + * This parameter can be page number between WRPStartOffset and (max number of pages in the Flash - 1) + * @retval None + */ +static void FLASH_OB_WRPConfig(uint32_t WRPArea, uint32_t WRPStartOffset, uint32_t WRDPEndOffset) +{ + /* Check the parameters */ + assert_param(IS_OB_WRPAREA(WRPArea)); + assert_param(IS_FLASH_PAGE(WRPStartOffset)); + assert_param(IS_FLASH_PAGE(WRDPEndOffset)); + + /* Configure the write protected area */ + if (WRPArea == OB_WRPAREA_BANK1_AREAA) + { + MODIFY_REG(FLASH->WRP1AR, (FLASH_WRP1AR_WRP1A_STRT | FLASH_WRP1AR_WRP1A_END), + (WRPStartOffset | (WRDPEndOffset << FLASH_WRP1AR_WRP1A_END_Pos))); + } + else /* OB_WRPAREA_BANK1_AREAB */ + { + MODIFY_REG(FLASH->WRP1BR, (FLASH_WRP1BR_WRP1B_STRT | FLASH_WRP1BR_WRP1B_END), + (WRPStartOffset | (WRDPEndOffset << FLASH_WRP1AR_WRP1A_END_Pos))); + } +} + +/** + * @brief Set user & RDP configuration + * @note !!! Warning : When enabling OB_RDP level 2 it's no more possible + * to go back to level 1 or 0 !!! + * @param UserType The FLASH User Option Bytes to be modified + * This parameter can be a combination of all the following values: + * @arg @ref OB_USER_BOR_LEV or @ref OB_USER_nRST_STOP or @ref OB_USER_nRST_STDBY or + * @arg @ref OB_USER_nRST_SHDW or @ref OB_USER_IWDG_SW or @ref OB_USER_IWDG_STOP or + * @arg @ref OB_USER_IWDG_STDBY or @ref OB_USER_WWDG_SW or @ref OB_USER_nBOOT1 or + * @arg @ref OB_USER_SRAM2PE or @ref OB_USER_SRAM2RST or @ref OB_USER_nSWBOOT0 or + * @arg @ref OB_USER_nBOOT0 or @ref OB_USER_AGC_TRIM or @ref OB_USER_ALL + * @param UserConfig The FLASH User Option Bytes values. + * This parameter can be a combination of all the following values: + * @arg @ref OB_BOR_LEVEL_0 or @ref OB_BOR_LEVEL_1 or ... or @ref OB_BOR_LEVEL_4 + * @arg @ref OB_STOP_RST or @ref OB_STOP_NORST + * @arg @ref OB_STANDBY_RST or @ref OB_STANDBY_NORST + * @arg @ref OB_SHUTDOWN_RST or @ref OB_SHUTDOWN_NORST + * @arg @ref OB_IRH_ENABLE or @ref OB_IRH_DISABLE (*) + * @arg @ref OB_IWDG_SW or @ref OB_IWDG_HW + * @arg @ref OB_IWDG_STOP_FREEZE or @ref OB_IWDG_STOP_RUN + * @arg @ref OB_IWDG_STDBY_FREEZE or @ref OB_IWDG_STDBY_RUN + * @arg @ref OB_WWDG_SW or @ref OB_WWDG_HW + * @arg @ref OB_BOOT1_SRAM or @ref OB_BOOT1_SYSTEM + * @arg @ref OB_SRAM2_PARITY_ENABLE or @ref OB_SRAM2_PARITY_DISABLE + * @arg @ref OB_SRAM2_RST_ERASE or @ref OB_SRAM2_RST_NOT_ERASE + * @arg @ref OB_BOOT0_FROM_OB or @ref OB_BOOT0_FROM_PIN + * @arg @ref OB_BOOT0_RESET or @ref OB_BOOT0_SET + * @arg @ref OB_RESET_MODE_INPUT_ONLY or @ref OB_RESET_MODE_GPIO or @ref OB_RESET_MODE_INPUT_OUTPUT (*) + * @arg @ref OB_AGC_TRIM_0 or @ref OB_AGC_TRIM_1 or ... or @ref OB_AGC_TRIM_7 + * @param RDPLevel: specifies the read protection level. + * This parameter can be one of the following values: + * @arg @ref OB_RDP_LEVEL_0 No protection + * @arg @ref OB_RDP_LEVEL_1 Read protection of the memory + * @arg @ref OB_RDP_LEVEL_2 Full chip protection + * @retval None + */ +static void FLASH_OB_OptrConfig(uint32_t UserType, uint32_t UserConfig, uint32_t RDPLevel) +{ + uint32_t optr; + + /* Check the parameters */ + assert_param(IS_OB_USER_TYPE(UserType)); + assert_param(IS_OB_USER_CONFIG(UserType, UserConfig)); + assert_param(IS_OB_RDP_LEVEL(RDPLevel)); + + /* Configure the RDP level in the option bytes register */ + optr = FLASH->OPTR; + optr &= ~(UserType | FLASH_OPTR_RDP); + FLASH->OPTR = (optr | UserConfig | RDPLevel); +} + +/** + * @brief Configure the Zone 1A Proprietary code readout protection of the desired addresses, + * and erase configuration on RDP regression. + * @note To configure the PCROP options, the option lock bit OPTLOCK must be + * cleared with the call of the @ref HAL_FLASH_OB_Unlock() function. + * @note To validate the PCROP options, the option bytes must be reloaded + * through the call of the @ref HAL_FLASH_OB_Launch() function. + * @param PCROPConfig: specifies the erase configuration (OB_PCROP_RDP_NOT_ERASE or OB_PCROP_RDP_ERASE) + * on RDP level 1 regression. + * @param PCROP1AStartAddr Specifies the Zone 1A Start address of the Proprietary code readout protection + * This parameter can be an address between begin and end of the flash + * @param PCROP1AEndAddr Specifies the Zone 1A end address of the Proprietary code readout protection + * This parameter can be an address between PCROP1AStartAddr and end of the flash + * @retval None + */ +static void FLASH_OB_PCROP1AConfig(uint32_t PCROPConfig, uint32_t PCROP1AStartAddr, uint32_t PCROP1AEndAddr) +{ + uint32_t startoffset; + uint32_t endoffset; + uint32_t pcrop1aend; + + /* Check the parameters */ + assert_param(IS_OB_PCROP_CONFIG(PCROPConfig)); + assert_param(IS_FLASH_MAIN_MEM_ADDRESS(PCROP1AStartAddr)); + assert_param(IS_FLASH_MAIN_MEM_ADDRESS(PCROP1AEndAddr)); + + /* get pcrop 1A end register */ + pcrop1aend = FLASH->PCROP1AER; + + /* Configure the Proprietary code readout protection offset */ + if ((PCROPConfig & OB_PCROP_ZONE_A) != 0U) + { + /* Compute offset depending on pcrop granularity */ + startoffset = ((PCROP1AStartAddr - FLASH_BASE) >> FLASH_PCROP_GRANULARITY_OFFSET); /* 2K pages */ + endoffset = ((PCROP1AEndAddr - FLASH_BASE) >> FLASH_PCROP_GRANULARITY_OFFSET); /* 2K pages */ + + /* Set Zone A start offset */ + WRITE_REG(FLASH->PCROP1ASR, startoffset); + + /* Set Zone A end offset */ + pcrop1aend &= ~FLASH_PCROP1AER_PCROP1A_END; + pcrop1aend |= endoffset; + } + + /* Set RDP erase protection if needed. This bit is only set & will be reset by mass erase */ + if ((PCROPConfig & OB_PCROP_RDP_ERASE) != 0U) + { + pcrop1aend |= FLASH_PCROP1AER_PCROP_RDP; + } + + /* set 1A End register */ + WRITE_REG(FLASH->PCROP1AER, pcrop1aend); +} + +/** + * @brief Configure the Zone 1B Proprietary code readout protection of the desired addresses. + * @note To configure the PCROP options, the option lock bit OPTLOCK must be + * cleared with the call of the @ref HAL_FLASH_OB_Unlock() function. + * @note To validate the PCROP options, the option bytes must be reloaded + * through the call of the @ref HAL_FLASH_OB_Launch() function. + * @param PCROP1BStartAddr Specifies the Zone 1BStart address of the Proprietary code readout protection + * This parameter can be an address between begin and end of the flash + * @param PCROP1BEndAddr Specifies the Zone 1B end address of the Proprietary code readout protection + * This parameter can be an address between PCROP1BStartAddr and end of the flash + * @retval None + */ +static void FLASH_OB_PCROP1BConfig(uint32_t PCROP1BStartAddr, uint32_t PCROP1BEndAddr) +{ + uint32_t startoffset; + uint32_t endoffset; + + /* Check the parameters */ + assert_param(IS_FLASH_MAIN_MEM_ADDRESS(PCROP1BStartAddr)); + assert_param(IS_FLASH_MAIN_MEM_ADDRESS(PCROP1BEndAddr)); + + /* Compute offset depending on pcrop granularity */ + startoffset = ((PCROP1BStartAddr - FLASH_BASE) >> FLASH_PCROP_GRANULARITY_OFFSET); /* 2K pages */ + endoffset = ((PCROP1BEndAddr - FLASH_BASE) >> FLASH_PCROP_GRANULARITY_OFFSET); /* 2K pages */ + + /* Configure the Proprietary code readout protection start address */ + WRITE_REG(FLASH->PCROP1BSR, startoffset); + + /* Configure the Proprietary code readout protection end address */ + WRITE_REG(FLASH->PCROP1BER, endoffset); +} + +/** + * @brief Program the FLASH IPCC data buffer address. + * @note To configure the extra user option bytes, the option lock bit OPTLOCK must + * be cleared with the call of the @ref HAL_FLASH_OB_Unlock() function. + * @note To validate the extra user option bytes, the option bytes must be reloaded + * through the call of the @ref HAL_FLASH_OB_Launch() function. + * @param IPCCDataBufAddr IPCC data buffer start address area in SRAM2 + * This parameter must be the double-word aligned + * @retval None + */ +static void FLASH_OB_IPCCBufferAddrConfig(uint32_t IPCCDataBufAddr) +{ + assert_param(IS_OB_IPCC_BUF_ADDR(IPCCDataBufAddr)); + + /* Configure the option bytes register */ + WRITE_REG(FLASH->IPCCBR, (uint32_t)((IPCCDataBufAddr - SRAM2A_BASE) >> 4)); +} + +/** + * @brief Configure the secure start address of the different memories (FLASH and SRAM2), + * the secure mode and the CPU2 Secure Boot reset vector + * @note To configure the PCROP options, the option lock bit OPTLOCK must be + * cleared with the call of the @ref HAL_FLASH_OB_Unlock() function. + * @param pOBParam Pointer to an @ref FLASH_OBProgramInitTypeDef structure that + * contains the configuration information for the programming + * @retval void + */ +static void FLASH_OB_SecureConfig(FLASH_OBProgramInitTypeDef *pOBParam) +{ + uint32_t sfr_reg_val = READ_REG(FLASH->SFR); + uint32_t srrvr_reg_val = READ_REG(FLASH->SRRVR); + + if ((pOBParam->OptionType & OPTIONBYTE_SECURE_MODE) != 0U) + { + assert_param(IS_OB_SFSA_START_ADDR(pOBParam->SecureFlashStartAddr)); + assert_param(IS_OB_SBRSA_START_ADDR(pOBParam->SecureRAM2aStartAddr)); + assert_param(IS_OB_SNBRSA_START_ADDR(pOBParam->SecureRAM2bStartAddr)); + assert_param(IS_OB_SECURE_MODE(pOBParam->SecureMode)); + + /* Configure SFR register content with start PAGE index to secure */ + MODIFY_REG(sfr_reg_val, FLASH_SFR_SFSA, (((pOBParam->SecureFlashStartAddr - FLASH_BASE) / FLASH_PAGE_SIZE) << FLASH_SFR_SFSA_Pos)); + + /* Configure SRRVR register */ +#if defined(FLASH_SRRVR_SBRSA_A) + MODIFY_REG(srrvr_reg_val, (FLASH_SRRVR_SBRSA_A | FLASH_SRRVR_SBRSA_B), \ + (((((pOBParam->SecureRAM2aStartAddr - SRAM2A_BASE) >> SRAM_SECURE_PAGE_GRANULARITY_OFFSET) << FLASH_SRRVR_SBRSA_A_Pos)) | \ + ((((pOBParam->SecureRAM2bStartAddr - SRAM2B_BASE) >> SRAM_SECURE_PAGE_GRANULARITY_OFFSET) << FLASH_SRRVR_SBRSA_B_Pos)))); +#else + MODIFY_REG(srrvr_reg_val, (FLASH_SRRVR_SBRSA | FLASH_SRRVR_SNBRSA), \ + (((((pOBParam->SecureRAM2aStartAddr - SRAM2A_BASE) >> SRAM_SECURE_PAGE_GRANULARITY_OFFSET) << FLASH_SRRVR_SBRSA_Pos)) | \ + ((((pOBParam->SecureRAM2bStartAddr - SRAM2B_BASE) >> SRAM_SECURE_PAGE_GRANULARITY_OFFSET) << FLASH_SRRVR_SNBRSA_Pos)))); +#endif /* FLASH_SRRVR_SBRSA_A */ + + /* If Full System Secure mode is requested, clear all the corresponding bit */ + /* Else set the corresponding bit */ + if (pOBParam->SecureMode == SYSTEM_IN_SECURE_MODE) + { + CLEAR_BIT(sfr_reg_val, FLASH_SFR_FSD); +#if defined(FLASH_SRRVR_BRSD_A) + CLEAR_BIT(srrvr_reg_val, (FLASH_SRRVR_BRSD_A | FLASH_SRRVR_BRSD_B)); +#else + CLEAR_BIT(srrvr_reg_val, (FLASH_SRRVR_BRSD | FLASH_SRRVR_NBRSD)); +#endif /* FLASH_SRRVR_BRSD_A */ + } + else + { + SET_BIT(sfr_reg_val, FLASH_SFR_FSD); +#if defined(FLASH_SRRVR_BRSD_A) + SET_BIT(srrvr_reg_val, (FLASH_SRRVR_BRSD_A | FLASH_SRRVR_BRSD_B)); +#else + SET_BIT(srrvr_reg_val, (FLASH_SRRVR_BRSD | FLASH_SRRVR_NBRSD)); +#endif /* FLASH_SRRVR_BRSD_A */ + } + + /* Update Flash registers */ + WRITE_REG(FLASH->SFR, sfr_reg_val); + } + + /* Boot vector */ + if ((pOBParam->OptionType & OPTIONBYTE_C2_BOOT_VECT) != 0U) + { + /* Check the parameters */ + assert_param(IS_OB_BOOT_VECTOR_ADDR(pOBParam->C2SecureBootVectAddr)); + assert_param(IS_OB_BOOT_REGION(pOBParam->C2BootRegion)); + + /* Set the boot vector */ + if (pOBParam->C2BootRegion == OB_C2_BOOT_FROM_FLASH) + { + MODIFY_REG(srrvr_reg_val, (FLASH_SRRVR_SBRV | FLASH_SRRVR_C2OPT), + (((pOBParam->C2SecureBootVectAddr - FLASH_BASE) >> 2) | pOBParam->C2BootRegion)); + } + else + { + MODIFY_REG(srrvr_reg_val, (FLASH_SRRVR_SBRV | FLASH_SRRVR_C2OPT), + (((pOBParam->C2SecureBootVectAddr - SRAM1_BASE) >> 2) | pOBParam->C2BootRegion)); + } + } + + /* Update Flash registers */ + WRITE_REG(FLASH->SRRVR, srrvr_reg_val); +} + +/** + * @brief Return the FLASH Write Protection Option Bytes value. + * @param[in] WRPArea Specifies the area to be returned. + * This parameter can be one of the following values: + * @arg @ref OB_WRPAREA_BANK1_AREAA Flash Bank 1 Area A + * @arg @ref OB_WRPAREA_BANK1_AREAB Flash Bank 1 Area B + * @param[out] WRPStartOffset Specifies the address where to copied the start page + * of the write protected area + * @param[out] WRDPEndOffset Specifies the address where to copied the end page of + * the write protected area + * @retval None + */ +static void FLASH_OB_GetWRP(uint32_t WRPArea, uint32_t *WRPStartOffset, uint32_t *WRDPEndOffset) +{ + /* Check the parameters */ + assert_param(IS_OB_WRPAREA(WRPArea)); + + /* Get the configuration of the write protected area */ + if (WRPArea == OB_WRPAREA_BANK1_AREAA) + { + *WRPStartOffset = READ_BIT(FLASH->WRP1AR, FLASH_WRP1AR_WRP1A_STRT); + *WRDPEndOffset = (READ_BIT(FLASH->WRP1AR, FLASH_WRP1AR_WRP1A_END) >> FLASH_WRP1AR_WRP1A_END_Pos); + } + else /* OB_WRPAREA_BANK1_AREAB */ + { + *WRPStartOffset = READ_BIT(FLASH->WRP1BR, FLASH_WRP1BR_WRP1B_STRT); + *WRDPEndOffset = (READ_BIT(FLASH->WRP1BR, FLASH_WRP1BR_WRP1B_END) >> FLASH_WRP1BR_WRP1B_END_Pos); + } +} + +/** + * @brief Return the FLASH Read Protection level. + * @retval FLASH ReadOut Protection Status: + * This return value can be one of the following values: + * @arg @ref OB_RDP_LEVEL_0 No protection + * @arg @ref OB_RDP_LEVEL_1 Read protection of the memory + * @arg @ref OB_RDP_LEVEL_2 Full chip protection + */ +static uint32_t FLASH_OB_GetRDP(void) +{ + uint32_t rdplvl = READ_BIT(FLASH->OPTR, FLASH_OPTR_RDP); + + if ((rdplvl != OB_RDP_LEVEL_0) && (rdplvl != OB_RDP_LEVEL_2)) + { + return (OB_RDP_LEVEL_1); + } + else + { + return rdplvl; + } +} + +/** + * @brief Return the FLASH User Option Byte value. + * @retval This return value can be a combination of all the following values: + * @arg @ref OB_BOR_LEVEL_0 or @ref OB_BOR_LEVEL_1 or ... or @ref OB_BOR_LEVEL_4 + * @arg @ref OB_STOP_RST or @ref OB_STOP_RST + * @arg @ref OB_STANDBY_RST or @ref OB_STANDBY_NORST + * @arg @ref OB_SHUTDOWN_RST or @ref OB_SHUTDOWN_NORST + * @arg @ref OB_IRH_ENABLE or @ref OB_IRH_DISABLE (*) + * @arg @ref OB_IWDG_SW or @ref OB_IWDG_HW + * @arg @ref OB_IWDG_STOP_FREEZE or @ref OB_IWDG_STOP_RUN + * @arg @ref OB_IWDG_STDBY_FREEZE or @ref OB_IWDG_STDBY_RUN + * @arg @ref OB_WWDG_SW or @ref OB_WWDG_HW + * @arg @ref OB_BOOT1_SRAM or @ref OB_BOOT1_SYSTEM + * @arg @ref OB_SRAM2_PARITY_ENABLE or @ref OB_SRAM2_PARITY_DISABLE + * @arg @ref OB_SRAM2_RST_ERASE or @ref OB_SRAM2_RST_NOT_ERASE + * @arg @ref OB_BOOT0_FROM_OB or @ref OB_BOOT0_FROM_PIN + * @arg @ref OB_BOOT0_RESET or @ref OB_BOOT0_SET + * @arg @ref OB_RESET_MODE_INPUT_ONLY or @ref OB_RESET_MODE_GPIO or @ref OB_RESET_MODE_INPUT_OUTPUT (*) + * @arg @ref OB_AGC_TRIM_0 or @ref OB_AGC_TRIM_1 or ... or @ref OB_AGC_TRIM_7 + */ +static uint32_t FLASH_OB_GetUser(void) +{ + uint32_t user_config = (READ_REG(FLASH->OPTR) & OB_USER_ALL); + CLEAR_BIT(user_config, (FLASH_OPTR_RDP | FLASH_OPTR_ESE)); + + return user_config; +} + +/** + * @brief Return the FLASH Write Protection Option Bytes value. + * @param PCROPConfig [out] Specifies the address where to copied the configuration of PCROP_RDP option + * @param PCROP1AStartAddr [out] Specifies the address where to copied the start address + * of the Zone 1A Proprietary code readout protection + * @param PCROP1AEndAddr [out] Specifies the address where to copied the end address of + * the Zone 1A Proprietary code readout protection + * @param PCROP1BStartAddr [out] Specifies the address where to copied the start address + * of the Zone 1B Proprietary code readout protection + * @param PCROP1BEndAddr [out] Specifies the address where to copied the end address of + * the Zone 1B Proprietary code readout protection + * @retval None + */ +static void FLASH_OB_GetPCROP(uint32_t *PCROPConfig, uint32_t *PCROP1AStartAddr, uint32_t *PCROP1AEndAddr, + uint32_t *PCROP1BStartAddr, uint32_t *PCROP1BEndAddr) +{ + uint32_t pcrop; + + pcrop = (READ_BIT(FLASH->PCROP1BSR, FLASH_PCROP1BSR_PCROP1B_STRT)); + *PCROP1BStartAddr = ((pcrop << FLASH_PCROP_GRANULARITY_OFFSET) + FLASH_BASE); + + pcrop = (READ_BIT(FLASH->PCROP1BER, FLASH_PCROP1BER_PCROP1B_END)); + *PCROP1BEndAddr = ((pcrop << FLASH_PCROP_GRANULARITY_OFFSET) + FLASH_BASE); + + pcrop = (READ_BIT(FLASH->PCROP1ASR, FLASH_PCROP1ASR_PCROP1A_STRT)); + *PCROP1AStartAddr = ((pcrop << FLASH_PCROP_GRANULARITY_OFFSET) + FLASH_BASE); + + pcrop = (READ_BIT(FLASH->PCROP1AER, FLASH_PCROP1AER_PCROP1A_END)); + *PCROP1AEndAddr = ((pcrop << FLASH_PCROP_GRANULARITY_OFFSET) + FLASH_BASE); + + *PCROPConfig = (READ_REG(FLASH->PCROP1AER) & FLASH_PCROP1AER_PCROP_RDP); +} + +/** + * @brief Return the FLASH IPCC data buffer base address Option Byte value. + * @retval Returned value is the IPCC data buffer start address area in SRAM2. + */ +static uint32_t FLASH_OB_GetIPCCBufferAddr(void) +{ + return (uint32_t)((READ_BIT(FLASH->IPCCBR, FLASH_IPCCBR_IPCCDBA) << 4) + SRAM2A_BASE); +} + +/** + * @brief Return the Secure Flash start address, Secure Backup RAM2a start address, Secure non-Backup RAM2b start address and the SecureMode + * @param SecureFlashStartAddr Specifies the address where to copied the Secure Flash start address + * @param SecureRAM2aStartAddr Specifies the address where to copied the Secure Backup RAM2a start address + * @param SecureRAM2bStartAddr Specifies the address where to copied the Secure non-Backup RAM2b start address + * @param SecureMode Specifies the address where to copied the Secure Mode. + * This return value can be one of the following values: + * @arg @ref SYSTEM_IN_SECURE_MODE : Security enabled + * @arg @ref SYSTEM_NOT_IN_SECURE_MODE : Security disabled + * @retval None + */ +static void FLASH_OB_GetSecureMemoryConfig(uint32_t *SecureFlashStartAddr, uint32_t *SecureRAM2aStartAddr, + uint32_t *SecureRAM2bStartAddr, uint32_t *SecureMode) +{ + uint32_t sfr_reg_val = READ_REG(FLASH->SFR); + uint32_t srrvr_reg_val = READ_REG(FLASH->SRRVR); + + /* Get Secure Flash start address */ + uint32_t user_config = (READ_BIT(sfr_reg_val, FLASH_SFR_SFSA) >> FLASH_SFR_SFSA_Pos); + + *SecureFlashStartAddr = ((user_config * FLASH_PAGE_SIZE) + FLASH_BASE); + + /* Get Secure SRAM2a start address */ +#if defined(FLASH_SRRVR_SBRSA_A) + user_config = (READ_BIT(srrvr_reg_val, FLASH_SRRVR_SBRSA_A) >> FLASH_SRRVR_SBRSA_A_Pos); +#else + user_config = (READ_BIT(srrvr_reg_val, FLASH_SRRVR_SBRSA) >> FLASH_SRRVR_SBRSA_Pos); +#endif /* FLASH_SRRVR_SBRSA_A */ + + *SecureRAM2aStartAddr = ((user_config << SRAM_SECURE_PAGE_GRANULARITY_OFFSET) + SRAM2A_BASE); + + /* Get Secure SRAM2b start address */ +#if defined(FLASH_SRRVR_SBRSA_B) + user_config = (READ_BIT(srrvr_reg_val, FLASH_SRRVR_SBRSA_B) >> FLASH_SRRVR_SBRSA_B_Pos); +#else + user_config = (READ_BIT(srrvr_reg_val, FLASH_SRRVR_SNBRSA) >> FLASH_SRRVR_SNBRSA_Pos); +#endif /* FLASH_SRRVR_SBRSA_B */ + + *SecureRAM2bStartAddr = ((user_config << SRAM_SECURE_PAGE_GRANULARITY_OFFSET) + SRAM2B_BASE); + + /* Get Secure Area mode */ + *SecureMode = (READ_BIT(FLASH->OPTR, FLASH_OPTR_ESE)); +} + +/** + * @brief Return the CPU2 Secure Boot reset vector address and the CPU2 Secure Boot Region + * @param C2BootResetVectAddr Specifies the address where to copied the CPU2 Secure Boot reset vector address + * @param C2BootResetRegion Specifies the Secure Boot reset memory region + * @retval None + */ +static void FLASH_OB_GetC2BootResetConfig(uint32_t *C2BootResetVectAddr, uint32_t *C2BootResetRegion) +{ + *C2BootResetRegion = (READ_BIT(FLASH->SRRVR, FLASH_SRRVR_C2OPT)); + + if (*C2BootResetRegion == OB_C2_BOOT_FROM_FLASH) + { + *C2BootResetVectAddr = (uint32_t)((READ_BIT(FLASH->SRRVR, FLASH_SRRVR_SBRV) << 2) + FLASH_BASE); + } + else + { + *C2BootResetVectAddr = (uint32_t)((READ_BIT(FLASH->SRRVR, FLASH_SRRVR_SBRV) << 2) + SRAM1_BASE); + } +} + +/** + * @brief Proceed the OB Write Operation. + * @retval HAL Status + */ +static HAL_StatusTypeDef FLASH_OB_ProceedWriteOperation(void) +{ + HAL_StatusTypeDef status; + + /* Verify that next operation can be proceed */ + status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); + + if (status == HAL_OK) + { + /* Set OPTSTRT Bit */ + SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT); + + /* Wait for last operation to be completed */ + status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); + } + + return status; +} + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_FLASH_MODULE_ENABLED */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c new file mode 100644 index 0000000..564acc3 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c @@ -0,0 +1,551 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_gpio.c + * @author MCD Application Team + * @brief GPIO HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the General Purpose Input/Output (GPIO) peripheral: + * + Initialization and de-initialization functions + * + IO operation functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### GPIO Peripheral features ##### + ============================================================================== + [..] + (+) Each port bit of the general-purpose I/O (GPIO) ports can be individually + configured by software in several modes: + (++) Input mode + (++) Analog mode + (++) Output mode + (++) Alternate function mode + (++) External interrupt/event lines + + (+) During and just after reset, the alternate functions and external interrupt + lines are not active and the I/O ports are configured in input floating mode. + + (+) All GPIO pins have weak internal pull-up and pull-down resistors, which can be + activated or not. + + (+) In Output or Alternate mode, each IO can be configured on open-drain or push-pull + type and the IO speed can be selected depending on the VDD value. + + (+) The microcontroller IO pins are connected to onboard peripherals/modules through a + multiplexer that allows only one peripheral alternate function (AF) connected + to an IO pin at a time. In this way, there can be no conflict between peripherals + sharing the same IO pin. + + (+) All ports have external interrupt/event capability. To use external interrupt + lines, the port must be configured in input mode. All available GPIO pins are + connected to the 16 external interrupt/event lines from EXTI0 to EXTI15. + + (+) The external interrupt/event controller consists of up to 28 edge detectors + (16 lines are connected to GPIO) for generating event/interrupt requests (each + input line can be independently configured to select the type (interrupt or event) + and the corresponding trigger event (rising or falling or both). Each line can + also be masked independently. + + ##### How to use this driver ##### + ============================================================================== + [..] + (#) Enable the GPIO AHB clock using the following function: __HAL_RCC_GPIOx_CLK_ENABLE(). + + (#) Configure the GPIO pin(s) using HAL_GPIO_Init(). + (++) Configure the IO mode using "Mode" member from GPIO_InitTypeDef structure + (++) Activate Pull-up, Pull-down resistor using "Pull" member from GPIO_InitTypeDef + structure. + (++) In case of Output or alternate function mode selection: the speed is + configured through "Speed" member from GPIO_InitTypeDef structure. + (++) In alternate mode is selection, the alternate function connected to the IO + is configured through "Alternate" member from GPIO_InitTypeDef structure. + (++) Analog mode is required when a pin is to be used as ADC channel + or DAC output. + (++) In case of external interrupt/event selection the "Mode" member from + GPIO_InitTypeDef structure select the type (interrupt or event) and + the corresponding trigger event (rising or falling or both). + + (#) In case of external interrupt/event mode selection, configure NVIC IRQ priority + mapped to the EXTI line using HAL_NVIC_SetPriority() and enable it using + HAL_NVIC_EnableIRQ(). + + (#) To get the level of a pin configured in input mode use HAL_GPIO_ReadPin(). + + (#) To set/reset the level of a pin configured in output mode use + HAL_GPIO_WritePin()/HAL_GPIO_TogglePin(). + + (#) To set the level of several pins and reset level of several other pins in + same cycle, use HAL_GPIO_WriteMultipleStatePin(). + + (#) To lock pin configuration until next reset use HAL_GPIO_LockPin(). + + (#) During and just after reset, the alternate functions are not + active and the GPIO pins are configured in input floating mode (except JTAG + pins). + + (#) The LSE oscillator pins OSC32_IN and OSC32_OUT can be used as general purpose + (PC14 and PC15, respectively) when the LSE oscillator is off. The LSE has + priority over the GPIO function. + + (#) The HSE oscillator pins OSC_IN/OSC_OUT can be used as + general purpose PH0 and PH1, respectively, when the HSE oscillator is off. + The HSE has priority over the GPIO function. + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup GPIO + * @{ + */ +/** MISRA C:2012 deviation rule has been granted for following rules: + * Rule-12.2 - Medium: RHS argument is in interval [0,INF] which is out of + * range of the shift operator in following API : + * HAL_GPIO_Init + * HAL_GPIO_DeInit + */ + +#ifdef HAL_GPIO_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private defines ------------------------------------------------------------*/ +/** @addtogroup GPIO_Private_Constants GPIO Private Constants + * @{ + */ +#define GPIO_NUMBER (16u) +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ + +/** @addtogroup GPIO_Exported_Functions + * @{ + */ + +/** @addtogroup GPIO_Exported_Functions_Group1 + * @brief Initialization and Configuration functions + * +@verbatim + =============================================================================== + ##### Initialization and de-initialization functions ##### + =============================================================================== + +@endverbatim + * @{ + */ + +/** + * @brief Initialize the GPIOx peripheral according to the specified parameters in the GPIO_Init. + * @param GPIOx where x can be (A..H) to select the GPIO peripheral for STM32WBxx family + * @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains + * the configuration information for the specified GPIO peripheral. + * @retval None + */ +void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init) +{ + uint32_t position = 0x00u; + uint32_t iocurrent; + uint32_t temp; + + /* Check the parameters */ + assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); + assert_param(IS_GPIO_PIN(GPIO_Init->Pin)); + assert_param(IS_GPIO_MODE(GPIO_Init->Mode)); + assert_param(IS_GPIO_PULL(GPIO_Init->Pull)); + + /* Configure the port pins */ + while (((GPIO_Init->Pin) >> position) != 0x00u) + { + /* Get current io position */ + iocurrent = (GPIO_Init->Pin) & (1uL << position); + + if (iocurrent != 0x00u) + { + /*--------------------- GPIO Mode Configuration ------------------------*/ + /* In case of Output or Alternate function mode selection */ + if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)) + { + /* Check the Speed parameter */ + assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); + /* Configure the IO Speed */ + temp = GPIOx->OSPEEDR; + temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2u)); + temp |= (GPIO_Init->Speed << (position * 2u)); + GPIOx->OSPEEDR = temp; + + /* Configure the IO Output Type */ + temp = GPIOx->OTYPER; + temp &= ~(GPIO_OTYPER_OT0 << position) ; + temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); + GPIOx->OTYPER = temp; + } + + /* Activate the Pull-up or Pull down resistor for the current IO */ + if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) + { + temp = GPIOx->PUPDR; + temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U)); + temp |= ((GPIO_Init->Pull) << (position * 2U)); + GPIOx->PUPDR = temp; + } + + /* In case of Alternate function mode selection */ + if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) + { + /* Check the Alternate function parameters */ + assert_param(IS_GPIO_AF_INSTANCE(GPIOx)); + assert_param(IS_GPIO_AF(GPIO_Init->Alternate)); + + /* Configure Alternate function mapped with the current IO */ + temp = GPIOx->AFR[position >> 3u]; + temp &= ~(0xFu << ((position & 0x07u) * 4u)); + temp |= ((GPIO_Init->Alternate) << ((position & 0x07u) * 4u)); + GPIOx->AFR[position >> 3u] = temp; + } + + /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ + temp = GPIOx->MODER; + temp &= ~(GPIO_MODER_MODE0 << (position * 2u)); + temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2u)); + GPIOx->MODER = temp; + + /*--------------------- EXTI Mode Configuration ------------------------*/ + /* Configure the External Interrupt or event for the current IO */ + if ((GPIO_Init->Mode & EXTI_MODE) != 0x00u) + { + temp = SYSCFG->EXTICR[position >> 2u]; + temp &= ~(0x0FuL << (4u * (position & 0x03u))); + temp |= (GPIO_GET_INDEX(GPIOx) << (4u * (position & 0x03u))); + SYSCFG->EXTICR[position >> 2u] = temp; + + /* Clear Rising Falling edge configuration */ + temp = EXTI->RTSR1; + temp &= ~(iocurrent); + if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00u) + { + temp |= iocurrent; + } + EXTI->RTSR1 = temp; + + temp = EXTI->FTSR1; + temp &= ~(iocurrent); + if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00u) + { + temp |= iocurrent; + } + EXTI->FTSR1 = temp; + + /* Clear EXTI line configuration */ + temp = EXTI->IMR1; + temp &= ~(iocurrent); + if ((GPIO_Init->Mode & EXTI_IT) != 0x00u) + { + temp |= iocurrent; + } + EXTI->IMR1 = temp; + + temp = EXTI->EMR1; + temp &= ~(iocurrent); + if ((GPIO_Init->Mode & EXTI_EVT) != 0x00u) + { + temp |= iocurrent; + } + EXTI->EMR1 = temp; + } + } + + position++; + } +} + +/** + * @brief De-initialize the GPIOx peripheral registers to their default reset values. + * @param GPIOx where x can be (A..H) to select the GPIO peripheral for STM32WBxx family + * @param GPIO_Pin specifies the port bit to be written. + * This parameter can be one of GPIO_PIN_x where x can be (0..15). + * @retval None + */ +void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin) +{ + uint32_t position = 0x00u; + uint32_t iocurrent; + uint32_t tmp; + + /* Check the parameters */ + assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); + assert_param(IS_GPIO_PIN(GPIO_Pin)); + + /* Configure the port pins */ + while ((GPIO_Pin >> position) != 0x00u) + { + /* Get current io position */ + iocurrent = (GPIO_Pin) & (1uL << position); + + if (iocurrent != 0x00u) + { + /*------------------------- EXTI Mode Configuration --------------------*/ + /* Clear the External Interrupt or Event for the current IO */ + + tmp = SYSCFG->EXTICR[position >> 2u]; + tmp &= (0x0FUL << (4u * (position & 0x03u))); + if (tmp == (GPIO_GET_INDEX(GPIOx) << (4u * (position & 0x03u)))) + { + /* Clear EXTI line configuration */ + EXTI->IMR1 &= ~(iocurrent); + EXTI->EMR1 &= ~(iocurrent); + + /* Clear Rising Falling edge configuration */ + EXTI->RTSR1 &= ~(iocurrent); + EXTI->FTSR1 &= ~(iocurrent); + + tmp = 0x0FuL << (4u * (position & 0x03u)); + SYSCFG->EXTICR[position >> 2u] &= ~tmp; + } + + /*------------------------- GPIO Mode Configuration --------------------*/ + /* Configure IO in Analog Mode */ + GPIOx->MODER |= (GPIO_MODER_MODE0 << (position * 2u)); + + /* Configure the default Alternate Function in current IO */ + GPIOx->AFR[position >> 3u] &= ~(0xFu << ((position & 0x07u) * 4u)) ; + + /* Deactivate the Pull-up and Pull-down resistor for the current IO */ + GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPD0 << (position * 2u)); + + /* Configure the default value IO Output Type */ + GPIOx->OTYPER &= ~(GPIO_OTYPER_OT0 << position) ; + + /* Configure the default value for IO Speed */ + GPIOx->OSPEEDR &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2u)); + } + + position++; + } +} + +/** + * @} + */ + +/** @addtogroup GPIO_Exported_Functions_Group2 + * @brief GPIO Read, Write, Toggle, Lock and EXTI management functions. + * +@verbatim + =============================================================================== + ##### IO operation functions ##### + =============================================================================== + +@endverbatim + * @{ + */ + +/** + * @brief Read the specified input port pin. + * @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32WBxx family + * @param GPIO_Pin specifies the port bit to read. + * This parameter can be GPIO_PIN_x where x can be (0..15). + * @retval The input port pin value. + */ +GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) +{ + GPIO_PinState bitstatus; + + /* Check the parameters */ + assert_param(IS_GPIO_PIN(GPIO_Pin)); + + if ((GPIOx->IDR & GPIO_Pin) != 0x00u) + { + bitstatus = GPIO_PIN_SET; + } + else + { + bitstatus = GPIO_PIN_RESET; + } + return bitstatus; +} + +/** + * @brief Set or clear the selected data port bit. + * @note This function uses GPIOx_BSRR and GPIOx_BRR registers to allow atomic read/modify + * accesses. In this way, there is no risk of an IRQ occurring between + * the read and the modify access. + * @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32WBxx family + * @param GPIO_Pin specifies the port bit to be written. + * This parameter can be one of GPIO_PIN_x where x can be (0..15). + * @param PinState specifies the value to be written to the selected bit. + * This parameter can be one of the GPIO_PinState enum values: + * @arg GPIO_PIN_RESET: to clear the port pin + * @arg GPIO_PIN_SET: to set the port pin + * @retval None + */ +void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState) +{ + /* Check the parameters */ + assert_param(IS_GPIO_PIN(GPIO_Pin)); + assert_param(IS_GPIO_PIN_ACTION(PinState)); + + if (PinState != GPIO_PIN_RESET) + { + GPIOx->BSRR = (uint32_t)GPIO_Pin; + } + else + { + GPIOx->BRR = (uint32_t)GPIO_Pin; + } +} + +/** + * @brief Set and clear several pins of a dedicated port in same cycle. + * @note This function uses GPIOx_BSRR and GPIOx_BRR registers to allow atomic read/modify + * accesses. + * @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32WLxx family + * @param PinReset specifies the port bits to be reset + * This parameter can be any combination of GPIO_PIN_x where x can be (0..15) or zero. + * @param PinSet specifies the port bits to be set + * This parameter can be any combination of GPIO_PIN_x where x can be (0..15) or zero. + * @note Both PinReset and PinSet combinations shall not get any common bit, else + * assert would be triggered. + * @note At least one of the two parameters used to set or reset shall be different from zero. + * @retval None + */ +void HAL_GPIO_WriteMultipleStatePin(GPIO_TypeDef *GPIOx, uint16_t PinReset, uint16_t PinSet) +{ + uint32_t tmp; + + /* Check the parameters */ + /* Make sure at least one parameter is different from zero and that there is no common pin */ + assert_param(IS_GPIO_PIN((uint32_t)PinReset | (uint32_t)PinSet)); + assert_param(IS_GPIO_COMMON_PIN(PinReset, PinSet)); + + tmp = (((uint32_t)PinReset << 16) | PinSet); + GPIOx->BSRR = tmp; +} + +/** + * @brief Toggle the specified GPIO pin. + * @param GPIOx where x can be (A..H) to select the GPIO peripheral for STM32WBxx family + * @param GPIO_Pin specifies the pin to be toggled. + * @retval None + */ +void HAL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) +{ + uint32_t odr; + + /* Check the parameters */ + assert_param(IS_GPIO_PIN(GPIO_Pin)); + + /* get current Output Data Register value */ + odr = GPIOx->ODR; + + /* Set selected pins that were at low level, and reset ones that were high */ + GPIOx->BSRR = ((odr & GPIO_Pin) << GPIO_NUMBER) | (~odr & GPIO_Pin); +} + +/** + * @brief Lock GPIO Pins configuration registers. + * @note The locked registers are GPIOx_MODER, GPIOx_OTYPER, GPIOx_OSPEEDR, + * GPIOx_PUPDR, GPIOx_AFRL and GPIOx_AFRH. + * @note The configuration of the locked GPIO pins can no longer be modified + * until the next reset. + * @param GPIOx where x can be (A..H) to select the GPIO peripheral for STM32WBxx family + * @param GPIO_Pin specifies the port bits to be locked. + * This parameter can be any combination of GPIO_PIN_x where x can be (0..15). + * @retval None + */ +HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) +{ + __IO uint32_t tmp = GPIO_LCKR_LCKK; + + /* Check the parameters */ + assert_param(IS_GPIO_LOCK_INSTANCE(GPIOx)); + assert_param(IS_GPIO_PIN(GPIO_Pin)); + + /* Apply lock key write sequence */ + tmp |= GPIO_Pin; + /* Set LCKx bit(s): LCKK='1' + LCK[15-0] */ + GPIOx->LCKR = tmp; + /* Reset LCKx bit(s): LCKK='0' + LCK[15-0] */ + GPIOx->LCKR = GPIO_Pin; + /* Set LCKx bit(s): LCKK='1' + LCK[15-0] */ + GPIOx->LCKR = tmp; + /* Read LCKK register. This read is mandatory to complete key lock sequence */ + tmp = GPIOx->LCKR; + + /* read again in order to confirm lock is active */ + if ((GPIOx->LCKR & GPIO_LCKR_LCKK) != 0x00u) + { + return HAL_OK; + } + else + { + return HAL_ERROR; + } +} + +/** + * @brief Handle EXTI interrupt request. + * @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line. + * @retval None + */ +void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin) +{ + /* EXTI line interrupt detected */ + if (__HAL_GPIO_EXTI_GET_IT(GPIO_Pin) != 0x00u) + { + __HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin); + HAL_GPIO_EXTI_Callback(GPIO_Pin); + } +} + +/** + * @brief EXTI line detection callback. + * @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line. + * @retval None + */ +__weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(GPIO_Pin); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_GPIO_EXTI_Callback could be implemented in the user file + */ +} + +/** + * @} + */ + + +/** + * @} + */ + +#endif /* HAL_GPIO_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c new file mode 100644 index 0000000..7f6883f --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_hsem.c @@ -0,0 +1,369 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_hsem.c + * @author MCD Application Team + * @brief HSEM HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the semaphore peripheral: + * + Semaphore Take function (2-Step Procedure) , non blocking + * + Semaphore FastTake function (1-Step Procedure) , non blocking + * + Semaphore Status check + * + Semaphore Clear Key Set and Get + * + Release and release all functions + * + Semaphore notification enabling and disabling and callnack functions + * + IRQ handler management + * + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + (#)Take a semaphore In 2-Step mode Using function HAL_HSEM_Take. This function takes as parameters : + (++) the semaphore ID from 0 to 31 + (++) the process ID from 0 to 255 + (#) Fast Take semaphore In 1-Step mode Using function HAL_HSEM_FastTake. This function takes as parameter : + (++) the semaphore ID from 0_ID to 31. Note that the process ID value is implicitly assumed as zero + (#) Check if a semaphore is Taken using function HAL_HSEM_IsSemTaken. This function takes as parameter : + (++) the semaphore ID from 0_ID to 31 + (++) It returns 1 if the given semaphore is taken otherwise (Free) zero + (#)Release a semaphore using function with HAL_HSEM_Release. This function takes as parameters : + (++) the semaphore ID from 0 to 31 + (++) the process ID from 0 to 255: + (++) Note: If ProcessID and MasterID match, semaphore is freed, and an interrupt + may be generated when enabled (notification activated). If ProcessID or MasterID does not match, + semaphore remains taken (locked) + + (#)Release all semaphores at once taken by a given Master using function HAL_HSEM_Release_All + This function takes as parameters : + (++) the Release Key (value from 0 to 0xFFFF) can be Set or Get respectively by + HAL_HSEM_SetClearKey() or HAL_HSEM_GetClearKey functions + (++) the Master ID: + (++) Note: If the Key and MasterID match, all semaphores taken by the given CPU that corresponds + to MasterID will be freed, and an interrupt may be generated when enabled (notification activated). If the + Key or the MasterID doesn't match, semaphores remains taken (locked) + + (#)Semaphores Release all key functions: + (++) HAL_HSEM_SetClearKey() to set semaphore release all Key + (++) HAL_HSEM_GetClearKey() to get release all Key + (#)Semaphores notification functions : + (++) HAL_HSEM_ActivateNotification to activate a notification callback on + a given semaphores Mask (bitfield). When one or more semaphores defined by the mask are released + the callback HAL_HSEM_FreeCallback will be asserted giving as parameters a mask of the released + semaphores (bitfield). + + (++) HAL_HSEM_DeactivateNotification to deactivate the notification of a given semaphores Mask (bitfield). + (++) See the description of the macro __HAL_HSEM_SEMID_TO_MASK to check how to calculate a semaphore mask + Used by the notification functions + *** HSEM HAL driver macros list *** + ============================================= + [..] Below the list of most used macros in HSEM HAL driver. + + (+) __HAL_HSEM_SEMID_TO_MASK: Helper macro to convert a Semaphore ID to a Mask. + [..] Example of use : + [..] mask = __HAL_HSEM_SEMID_TO_MASK(8) | __HAL_HSEM_SEMID_TO_MASK(21) | __HAL_HSEM_SEMID_TO_MASK(25). + [..] All next macros take as parameter a semaphore Mask (bitfiled) that can be constructed using __HAL_HSEM_SEMID_TO_MASK as the above example. + (+) __HAL_HSEM_ENABLE_IT: Enable the specified semaphores Mask interrupts. + (+) __HAL_HSEM_DISABLE_IT: Disable the specified semaphores Mask interrupts. + (+) __HAL_HSEM_GET_IT: Checks whether the specified semaphore interrupt has occurred or not. + (+) __HAL_HSEM_GET_FLAG: Get the semaphores status release flags. + (+) __HAL_HSEM_CLEAR_FLAG: Clear the semaphores status release flags. + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup HSEM HSEM + * @brief HSEM HAL module driver + * @{ + */ + +#ifdef HAL_HSEM_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +#if defined(DUAL_CORE) +/** @defgroup HSEM_Private_Constants HSEM Private Constants + * @{ + */ + +#ifndef HSEM_R_MASTERID +#define HSEM_R_MASTERID HSEM_R_COREID +#endif + +#ifndef HSEM_RLR_MASTERID +#define HSEM_RLR_MASTERID HSEM_RLR_COREID +#endif + +#ifndef HSEM_CR_MASTERID +#define HSEM_CR_MASTERID HSEM_CR_COREID +#endif + +/** + * @} + */ +#endif /* DUAL_CORE */ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup HSEM_Exported_Functions HSEM Exported Functions + * @{ + */ + +/** @defgroup HSEM_Exported_Functions_Group1 Take and Release functions + * @brief HSEM Take and Release functions + * +@verbatim + ============================================================================== + ##### HSEM Take and Release functions ##### + ============================================================================== +[..] This section provides functions allowing to: + (+) Take a semaphore with 2 Step method + (+) Fast Take a semaphore with 1 Step method + (+) Check semaphore state Taken or not + (+) Release a semaphore + (+) Release all semaphore at once + +@endverbatim + * @{ + */ + + +/** + * @brief Take a semaphore in 2 Step mode. + * @param SemID: semaphore ID from 0 to 31 + * @param ProcessID: Process ID from 0 to 255 + * @retval HAL status + */ +HAL_StatusTypeDef HAL_HSEM_Take(uint32_t SemID, uint32_t ProcessID) +{ + /* Check the parameters */ + assert_param(IS_HSEM_SEMID(SemID)); + assert_param(IS_HSEM_PROCESSID(ProcessID)); + + /* First step write R register with MasterID, processID and take bit=1*/ + HSEM->R[SemID] = (ProcessID | HSEM_CR_COREID_CURRENT | HSEM_R_LOCK); + + /* second step : read the R register . Take achieved if MasterID and processID match and take bit set to 1 */ + if (HSEM->R[SemID] == (ProcessID | HSEM_CR_COREID_CURRENT | HSEM_R_LOCK)) + { + /*take success when MasterID and ProcessID match and take bit set*/ + return HAL_OK; + } + + /* Semaphore take fails*/ + return HAL_ERROR; +} + +/** + * @brief Fast Take a semaphore with 1 Step mode. + * @param SemID: semaphore ID from 0 to 31 + * @retval HAL status + */ +HAL_StatusTypeDef HAL_HSEM_FastTake(uint32_t SemID) +{ + /* Check the parameters */ + assert_param(IS_HSEM_SEMID(SemID)); + + /* Read the RLR register to take the semaphore */ + if (HSEM->RLR[SemID] == (HSEM_CR_COREID_CURRENT | HSEM_RLR_LOCK)) + { + /*take success when MasterID match and take bit set*/ + return HAL_OK; + } + + /* Semaphore take fails */ + return HAL_ERROR; +} +/** + * @brief Check semaphore state Taken or not. + * @param SemID: semaphore ID + * @retval HAL HSEM state + */ +uint32_t HAL_HSEM_IsSemTaken(uint32_t SemID) +{ + return (((HSEM->R[SemID] & HSEM_R_LOCK) != 0U) ? 1UL : 0UL); +} + + +/** + * @brief Release a semaphore. + * @param SemID: semaphore ID from 0 to 31 + * @param ProcessID: Process ID from 0 to 255 + * @retval None + */ +void HAL_HSEM_Release(uint32_t SemID, uint32_t ProcessID) +{ + /* Check the parameters */ + assert_param(IS_HSEM_SEMID(SemID)); + assert_param(IS_HSEM_PROCESSID(ProcessID)); + + /* Clear the semaphore by writing to the R register : the MasterID , the processID and take bit = 0 */ + HSEM->R[SemID] = (ProcessID | HSEM_CR_COREID_CURRENT); + +} + +/** + * @brief Release All semaphore used by a given Master . + * @param Key: Semaphore Key , value from 0 to 0xFFFF + * @param CoreID: CoreID of the CPU that is using semaphores to be released + * @retval None + */ +void HAL_HSEM_ReleaseAll(uint32_t Key, uint32_t CoreID) +{ + assert_param(IS_HSEM_KEY(Key)); + assert_param(IS_HSEM_COREID(CoreID)); + + HSEM->CR = ((Key << HSEM_CR_KEY_Pos) | (CoreID << HSEM_CR_COREID_Pos)); +} + +/** + * @} + */ + +/** @defgroup HSEM_Exported_Functions_Group2 HSEM Set and Get Key functions + * @brief HSEM Set and Get Key functions. + * +@verbatim + ============================================================================== + ##### HSEM Set and Get Key functions ##### + ============================================================================== + [..] This section provides functions allowing to: + (+) Set semaphore Key + (+) Get semaphore Key +@endverbatim + + * @{ + */ + +/** + * @brief Set semaphore Key . + * @param Key: Semaphore Key , value from 0 to 0xFFFF + * @retval None + */ +void HAL_HSEM_SetClearKey(uint32_t Key) +{ + assert_param(IS_HSEM_KEY(Key)); + + MODIFY_REG(HSEM->KEYR, HSEM_KEYR_KEY, (Key << HSEM_KEYR_KEY_Pos)); + +} + +/** + * @brief Get semaphore Key . + * @retval Semaphore Key , value from 0 to 0xFFFF + */ +uint32_t HAL_HSEM_GetClearKey(void) +{ + return (HSEM->KEYR >> HSEM_KEYR_KEY_Pos); +} + +/** + * @} + */ + +/** @defgroup HSEM_Exported_Functions_Group3 HSEM IRQ handler management + * @brief HSEM Notification functions. + * +@verbatim + ============================================================================== + ##### HSEM IRQ handler management and Notification functions ##### + ============================================================================== +[..] This section provides HSEM IRQ handler and Notification function. + +@endverbatim + * @{ + */ + +/** + * @brief Activate Semaphore release Notification for a given Semaphores Mask . + * @param SemMask: Mask of Released semaphores + * @retval Semaphore Key + */ +void HAL_HSEM_ActivateNotification(uint32_t SemMask) +{ + HSEM_COMMON->IER |= SemMask; +} + +/** + * @brief Deactivate Semaphore release Notification for a given Semaphores Mask . + * @param SemMask: Mask of Released semaphores + * @retval Semaphore Key + */ +void HAL_HSEM_DeactivateNotification(uint32_t SemMask) +{ + HSEM_COMMON->IER &= ~SemMask; +} + +/** + * @brief This function handles HSEM interrupt request + * @retval None + */ +void HAL_HSEM_IRQHandler(void) +{ + uint32_t statusreg; + /* Get the list of masked freed semaphores*/ + statusreg = HSEM_COMMON->MISR; + + /*Disable Interrupts*/ + HSEM_COMMON->IER &= ~((uint32_t)statusreg); + + /*Clear Flags*/ + HSEM_COMMON->ICR = ((uint32_t)statusreg); + + /* Call FreeCallback */ + HAL_HSEM_FreeCallback(statusreg); +} + +/** + * @brief Semaphore Released Callback. + * @param SemMask: Mask of Released semaphores + * @retval None + */ +__weak void HAL_HSEM_FreeCallback(uint32_t SemMask) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(SemMask); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_HSEM_FreeCallback can be implemented in the user file + */ +} + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_HSEM_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c new file mode 100644 index 0000000..91993d6 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c @@ -0,0 +1,7561 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_i2c.c + * @author MCD Application Team + * @brief I2C HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the Inter Integrated Circuit (I2C) peripheral: + * + Initialization and de-initialization functions + * + IO operation functions + * + Peripheral State and Errors functions + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + The I2C HAL driver can be used as follows: + + (#) Declare a I2C_HandleTypeDef handle structure, for example: + I2C_HandleTypeDef hi2c; + + (#)Initialize the I2C low level resources by implementing the HAL_I2C_MspInit() API: + (##) Enable the I2Cx interface clock + (##) I2C pins configuration + (+++) Enable the clock for the I2C GPIOs + (+++) Configure I2C pins as alternate function open-drain + (##) NVIC configuration if you need to use interrupt process + (+++) Configure the I2Cx interrupt priority + (+++) Enable the NVIC I2C IRQ Channel + (##) DMA Configuration if you need to use DMA process + (+++) Declare a DMA_HandleTypeDef handle structure for + the transmit or receive channel + (+++) Enable the DMAx interface clock using + (+++) Configure the DMA handle parameters + (+++) Configure the DMA Tx or Rx channel + (+++) Associate the initialized DMA handle to the hi2c DMA Tx or Rx handle + (+++) Configure the priority and enable the NVIC for the transfer complete interrupt on + the DMA Tx or Rx channel + + (#) Configure the Communication Clock Timing, Own Address1, Master Addressing mode, Dual Addressing mode, + Own Address2, Own Address2 Mask, General call and Nostretch mode in the hi2c Init structure. + + (#) Initialize the I2C registers by calling the HAL_I2C_Init(), configures also the low level Hardware + (GPIO, CLOCK, NVIC...etc) by calling the customized HAL_I2C_MspInit(&hi2c) API. + + (#) To check if target device is ready for communication, use the function HAL_I2C_IsDeviceReady() + + (#) For I2C IO and IO MEM operations, three operation modes are available within this driver : + + *** Polling mode IO operation *** + ================================= + [..] + (+) Transmit in master mode an amount of data in blocking mode using HAL_I2C_Master_Transmit() + (+) Receive in master mode an amount of data in blocking mode using HAL_I2C_Master_Receive() + (+) Transmit in slave mode an amount of data in blocking mode using HAL_I2C_Slave_Transmit() + (+) Receive in slave mode an amount of data in blocking mode using HAL_I2C_Slave_Receive() + + *** Polling mode IO MEM operation *** + ===================================== + [..] + (+) Write an amount of data in blocking mode to a specific memory address using HAL_I2C_Mem_Write() + (+) Read an amount of data in blocking mode from a specific memory address using HAL_I2C_Mem_Read() + + + *** Interrupt mode IO operation *** + =================================== + [..] + (+) Transmit in master mode an amount of data in non-blocking mode using HAL_I2C_Master_Transmit_IT() + (+) At transmission end of transfer, HAL_I2C_MasterTxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MasterTxCpltCallback() + (+) Receive in master mode an amount of data in non-blocking mode using HAL_I2C_Master_Receive_IT() + (+) At reception end of transfer, HAL_I2C_MasterRxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MasterRxCpltCallback() + (+) Transmit in slave mode an amount of data in non-blocking mode using HAL_I2C_Slave_Transmit_IT() + (+) At transmission end of transfer, HAL_I2C_SlaveTxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_SlaveTxCpltCallback() + (+) Receive in slave mode an amount of data in non-blocking mode using HAL_I2C_Slave_Receive_IT() + (+) At reception end of transfer, HAL_I2C_SlaveRxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_SlaveRxCpltCallback() + (+) In case of transfer Error, HAL_I2C_ErrorCallback() function is executed and users can + add their own code by customization of function pointer HAL_I2C_ErrorCallback() + (+) Abort a master or memory I2C process communication with Interrupt using HAL_I2C_Master_Abort_IT() + (+) End of abort process, HAL_I2C_AbortCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_AbortCpltCallback() + (+) Discard a slave I2C process communication using __HAL_I2C_GENERATE_NACK() macro. + This action will inform Master to generate a Stop condition to discard the communication. + + + *** Interrupt mode or DMA mode IO sequential operation *** + ========================================================== + [..] + (@) These interfaces allow to manage a sequential transfer with a repeated start condition + when a direction change during transfer + [..] + (+) A specific option field manage the different steps of a sequential transfer + (+) Option field values are defined through I2C_XFEROPTIONS and are listed below: + (++) I2C_FIRST_AND_LAST_FRAME: No sequential usage, functional is same as associated interfaces in + no sequential mode + (++) I2C_FIRST_FRAME: Sequential usage, this option allow to manage a sequence with start condition, address + and data to transfer without a final stop condition + (++) I2C_FIRST_AND_NEXT_FRAME: Sequential usage (Master only), this option allow to manage a sequence with + start condition, address and data to transfer without a final stop condition, + an then permit a call the same master sequential interface several times + (like HAL_I2C_Master_Seq_Transmit_IT() then HAL_I2C_Master_Seq_Transmit_IT() + or HAL_I2C_Master_Seq_Transmit_DMA() then HAL_I2C_Master_Seq_Transmit_DMA()) + (++) I2C_NEXT_FRAME: Sequential usage, this option allow to manage a sequence with a restart condition, address + and with new data to transfer if the direction change or manage only the new data to + transfer + if no direction change and without a final stop condition in both cases + (++) I2C_LAST_FRAME: Sequential usage, this option allow to manage a sequance with a restart condition, address + and with new data to transfer if the direction change or manage only the new data to + transfer + if no direction change and with a final stop condition in both cases + (++) I2C_LAST_FRAME_NO_STOP: Sequential usage (Master only), this option allow to manage a restart condition + after several call of the same master sequential interface several times + (link with option I2C_FIRST_AND_NEXT_FRAME). + Usage can, transfer several bytes one by one using + HAL_I2C_Master_Seq_Transmit_IT + or HAL_I2C_Master_Seq_Receive_IT + or HAL_I2C_Master_Seq_Transmit_DMA + or HAL_I2C_Master_Seq_Receive_DMA + with option I2C_FIRST_AND_NEXT_FRAME then I2C_NEXT_FRAME. + Then usage of this option I2C_LAST_FRAME_NO_STOP at the last Transmit or + Receive sequence permit to call the opposite interface Receive or Transmit + without stopping the communication and so generate a restart condition. + (++) I2C_OTHER_FRAME: Sequential usage (Master only), this option allow to manage a restart condition after + each call of the same master sequential + interface. + Usage can, transfer several bytes one by one with a restart with slave address between + each bytes using + HAL_I2C_Master_Seq_Transmit_IT + or HAL_I2C_Master_Seq_Receive_IT + or HAL_I2C_Master_Seq_Transmit_DMA + or HAL_I2C_Master_Seq_Receive_DMA + with option I2C_FIRST_FRAME then I2C_OTHER_FRAME. + Then usage of this option I2C_OTHER_AND_LAST_FRAME at the last frame to help automatic + generation of STOP condition. + + (+) Different sequential I2C interfaces are listed below: + (++) Sequential transmit in master I2C mode an amount of data in non-blocking mode using + HAL_I2C_Master_Seq_Transmit_IT() or using HAL_I2C_Master_Seq_Transmit_DMA() + (+++) At transmission end of current frame transfer, HAL_I2C_MasterTxCpltCallback() is executed and + users can add their own code by customization of function pointer HAL_I2C_MasterTxCpltCallback() + (++) Sequential receive in master I2C mode an amount of data in non-blocking mode using + HAL_I2C_Master_Seq_Receive_IT() or using HAL_I2C_Master_Seq_Receive_DMA() + (+++) At reception end of current frame transfer, HAL_I2C_MasterRxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MasterRxCpltCallback() + (++) Abort a master or memory IT or DMA I2C process communication with Interrupt using HAL_I2C_Master_Abort_IT() + (+++) End of abort process, HAL_I2C_AbortCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_AbortCpltCallback() + (++) Enable/disable the Address listen mode in slave I2C mode using HAL_I2C_EnableListen_IT() + HAL_I2C_DisableListen_IT() + (+++) When address slave I2C match, HAL_I2C_AddrCallback() is executed and users can + add their own code to check the Address Match Code and the transmission direction request by master + (Write/Read). + (+++) At Listen mode end HAL_I2C_ListenCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_ListenCpltCallback() + (++) Sequential transmit in slave I2C mode an amount of data in non-blocking mode using + HAL_I2C_Slave_Seq_Transmit_IT() or using HAL_I2C_Slave_Seq_Transmit_DMA() + (+++) At transmission end of current frame transfer, HAL_I2C_SlaveTxCpltCallback() is executed and + users can add their own code by customization of function pointer HAL_I2C_SlaveTxCpltCallback() + (++) Sequential receive in slave I2C mode an amount of data in non-blocking mode using + HAL_I2C_Slave_Seq_Receive_IT() or using HAL_I2C_Slave_Seq_Receive_DMA() + (+++) At reception end of current frame transfer, HAL_I2C_SlaveRxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_SlaveRxCpltCallback() + (++) In case of transfer Error, HAL_I2C_ErrorCallback() function is executed and users can + add their own code by customization of function pointer HAL_I2C_ErrorCallback() + (++) Discard a slave I2C process communication using __HAL_I2C_GENERATE_NACK() macro. + This action will inform Master to generate a Stop condition to discard the communication. + + *** Interrupt mode IO MEM operation *** + ======================================= + [..] + (+) Write an amount of data in non-blocking mode with Interrupt to a specific memory address using + HAL_I2C_Mem_Write_IT() + (+) At Memory end of write transfer, HAL_I2C_MemTxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MemTxCpltCallback() + (+) Read an amount of data in non-blocking mode with Interrupt from a specific memory address using + HAL_I2C_Mem_Read_IT() + (+) At Memory end of read transfer, HAL_I2C_MemRxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MemRxCpltCallback() + (+) In case of transfer Error, HAL_I2C_ErrorCallback() function is executed and users can + add their own code by customization of function pointer HAL_I2C_ErrorCallback() + + *** DMA mode IO operation *** + ============================== + [..] + (+) Transmit in master mode an amount of data in non-blocking mode (DMA) using + HAL_I2C_Master_Transmit_DMA() + (+) At transmission end of transfer, HAL_I2C_MasterTxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MasterTxCpltCallback() + (+) Receive in master mode an amount of data in non-blocking mode (DMA) using + HAL_I2C_Master_Receive_DMA() + (+) At reception end of transfer, HAL_I2C_MasterRxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MasterRxCpltCallback() + (+) Transmit in slave mode an amount of data in non-blocking mode (DMA) using + HAL_I2C_Slave_Transmit_DMA() + (+) At transmission end of transfer, HAL_I2C_SlaveTxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_SlaveTxCpltCallback() + (+) Receive in slave mode an amount of data in non-blocking mode (DMA) using + HAL_I2C_Slave_Receive_DMA() + (+) At reception end of transfer, HAL_I2C_SlaveRxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_SlaveRxCpltCallback() + (+) In case of transfer Error, HAL_I2C_ErrorCallback() function is executed and users can + add their own code by customization of function pointer HAL_I2C_ErrorCallback() + (+) Abort a master or memory I2C process communication with Interrupt using HAL_I2C_Master_Abort_IT() + (+) End of abort process, HAL_I2C_AbortCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_AbortCpltCallback() + (+) Discard a slave I2C process communication using __HAL_I2C_GENERATE_NACK() macro. + This action will inform Master to generate a Stop condition to discard the communication. + + *** DMA mode IO MEM operation *** + ================================= + [..] + (+) Write an amount of data in non-blocking mode with DMA to a specific memory address using + HAL_I2C_Mem_Write_DMA() + (+) At Memory end of write transfer, HAL_I2C_MemTxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MemTxCpltCallback() + (+) Read an amount of data in non-blocking mode with DMA from a specific memory address using + HAL_I2C_Mem_Read_DMA() + (+) At Memory end of read transfer, HAL_I2C_MemRxCpltCallback() is executed and users can + add their own code by customization of function pointer HAL_I2C_MemRxCpltCallback() + (+) In case of transfer Error, HAL_I2C_ErrorCallback() function is executed and users can + add their own code by customization of function pointer HAL_I2C_ErrorCallback() + + + *** I2C HAL driver macros list *** + ================================== + [..] + Below the list of most used macros in I2C HAL driver. + + (+) __HAL_I2C_ENABLE: Enable the I2C peripheral + (+) __HAL_I2C_DISABLE: Disable the I2C peripheral + (+) __HAL_I2C_GENERATE_NACK: Generate a Non-Acknowledge I2C peripheral in Slave mode + (+) __HAL_I2C_GET_FLAG: Check whether the specified I2C flag is set or not + (+) __HAL_I2C_CLEAR_FLAG: Clear the specified I2C pending flag + (+) __HAL_I2C_ENABLE_IT: Enable the specified I2C interrupt + (+) __HAL_I2C_DISABLE_IT: Disable the specified I2C interrupt + + *** Callback registration *** + ============================================= + [..] + The compilation flag USE_HAL_I2C_REGISTER_CALLBACKS when set to 1 + allows the user to configure dynamically the driver callbacks. + Use Functions HAL_I2C_RegisterCallback() or HAL_I2C_RegisterAddrCallback() + to register an interrupt callback. + [..] + Function HAL_I2C_RegisterCallback() allows to register following callbacks: + (+) MasterTxCpltCallback : callback for Master transmission end of transfer. + (+) MasterRxCpltCallback : callback for Master reception end of transfer. + (+) SlaveTxCpltCallback : callback for Slave transmission end of transfer. + (+) SlaveRxCpltCallback : callback for Slave reception end of transfer. + (+) ListenCpltCallback : callback for end of listen mode. + (+) MemTxCpltCallback : callback for Memory transmission end of transfer. + (+) MemRxCpltCallback : callback for Memory reception end of transfer. + (+) ErrorCallback : callback for error detection. + (+) AbortCpltCallback : callback for abort completion process. + (+) MspInitCallback : callback for Msp Init. + (+) MspDeInitCallback : callback for Msp DeInit. + This function takes as parameters the HAL peripheral handle, the Callback ID + and a pointer to the user callback function. + [..] + For specific callback AddrCallback use dedicated register callbacks : HAL_I2C_RegisterAddrCallback(). + [..] + Use function HAL_I2C_UnRegisterCallback to reset a callback to the default + weak function. + HAL_I2C_UnRegisterCallback takes as parameters the HAL peripheral handle, + and the Callback ID. + This function allows to reset following callbacks: + (+) MasterTxCpltCallback : callback for Master transmission end of transfer. + (+) MasterRxCpltCallback : callback for Master reception end of transfer. + (+) SlaveTxCpltCallback : callback for Slave transmission end of transfer. + (+) SlaveRxCpltCallback : callback for Slave reception end of transfer. + (+) ListenCpltCallback : callback for end of listen mode. + (+) MemTxCpltCallback : callback for Memory transmission end of transfer. + (+) MemRxCpltCallback : callback for Memory reception end of transfer. + (+) ErrorCallback : callback for error detection. + (+) AbortCpltCallback : callback for abort completion process. + (+) MspInitCallback : callback for Msp Init. + (+) MspDeInitCallback : callback for Msp DeInit. + [..] + For callback AddrCallback use dedicated register callbacks : HAL_I2C_UnRegisterAddrCallback(). + [..] + By default, after the HAL_I2C_Init() and when the state is HAL_I2C_STATE_RESET + all callbacks are set to the corresponding weak functions: + examples HAL_I2C_MasterTxCpltCallback(), HAL_I2C_MasterRxCpltCallback(). + Exception done for MspInit and MspDeInit functions that are + reset to the legacy weak functions in the HAL_I2C_Init()/ HAL_I2C_DeInit() only when + these callbacks are null (not registered beforehand). + If MspInit or MspDeInit are not null, the HAL_I2C_Init()/ HAL_I2C_DeInit() + keep and use the user MspInit/MspDeInit callbacks (registered beforehand) whatever the state. + [..] + Callbacks can be registered/unregistered in HAL_I2C_STATE_READY state only. + Exception done MspInit/MspDeInit functions that can be registered/unregistered + in HAL_I2C_STATE_READY or HAL_I2C_STATE_RESET state, + thus registered (user) MspInit/DeInit callbacks can be used during the Init/DeInit. + Then, the user first registers the MspInit/MspDeInit user callbacks + using HAL_I2C_RegisterCallback() before calling HAL_I2C_DeInit() + or HAL_I2C_Init() function. + [..] + When the compilation flag USE_HAL_I2C_REGISTER_CALLBACKS is set to 0 or + not defined, the callback registration feature is not available and all callbacks + are set to the corresponding weak functions. + + [..] + (@) You can refer to the I2C HAL driver header file for more useful macros + + @endverbatim + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup I2C I2C + * @brief I2C HAL module driver + * @{ + */ + +#ifdef HAL_I2C_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ + +/** @defgroup I2C_Private_Define I2C Private Define + * @{ + */ +#define TIMING_CLEAR_MASK (0xF0FFFFFFU) /*!< I2C TIMING clear register Mask */ +#define I2C_TIMEOUT_ADDR (10000U) /*!< 10 s */ +#define I2C_TIMEOUT_BUSY (25U) /*!< 25 ms */ +#define I2C_TIMEOUT_DIR (25U) /*!< 25 ms */ +#define I2C_TIMEOUT_RXNE (25U) /*!< 25 ms */ +#define I2C_TIMEOUT_STOPF (25U) /*!< 25 ms */ +#define I2C_TIMEOUT_TC (25U) /*!< 25 ms */ +#define I2C_TIMEOUT_TCR (25U) /*!< 25 ms */ +#define I2C_TIMEOUT_TXIS (25U) /*!< 25 ms */ +#define I2C_TIMEOUT_FLAG (25U) /*!< 25 ms */ + +#define MAX_NBYTE_SIZE 255U +#define SLAVE_ADDR_SHIFT 7U +#define SLAVE_ADDR_MSK 0x06U + +/* Private define for @ref PreviousState usage */ +#define I2C_STATE_MSK ((uint32_t)((uint32_t)((uint32_t)HAL_I2C_STATE_BUSY_TX | \ + (uint32_t)HAL_I2C_STATE_BUSY_RX) & \ + (uint32_t)(~((uint32_t)HAL_I2C_STATE_READY)))) +/*!< Mask State define, keep only RX and TX bits */ +#define I2C_STATE_NONE ((uint32_t)(HAL_I2C_MODE_NONE)) +/*!< Default Value */ +#define I2C_STATE_MASTER_BUSY_TX ((uint32_t)(((uint32_t)HAL_I2C_STATE_BUSY_TX & I2C_STATE_MSK) | \ + (uint32_t)HAL_I2C_MODE_MASTER)) +/*!< Master Busy TX, combinaison of State LSB and Mode enum */ +#define I2C_STATE_MASTER_BUSY_RX ((uint32_t)(((uint32_t)HAL_I2C_STATE_BUSY_RX & I2C_STATE_MSK) | \ + (uint32_t)HAL_I2C_MODE_MASTER)) +/*!< Master Busy RX, combinaison of State LSB and Mode enum */ +#define I2C_STATE_SLAVE_BUSY_TX ((uint32_t)(((uint32_t)HAL_I2C_STATE_BUSY_TX & I2C_STATE_MSK) | \ + (uint32_t)HAL_I2C_MODE_SLAVE)) +/*!< Slave Busy TX, combinaison of State LSB and Mode enum */ +#define I2C_STATE_SLAVE_BUSY_RX ((uint32_t)(((uint32_t)HAL_I2C_STATE_BUSY_RX & I2C_STATE_MSK) | \ + (uint32_t)HAL_I2C_MODE_SLAVE)) +/*!< Slave Busy RX, combinaison of State LSB and Mode enum */ +#define I2C_STATE_MEM_BUSY_TX ((uint32_t)(((uint32_t)HAL_I2C_STATE_BUSY_TX & I2C_STATE_MSK) | \ + (uint32_t)HAL_I2C_MODE_MEM)) +/*!< Memory Busy TX, combinaison of State LSB and Mode enum */ +#define I2C_STATE_MEM_BUSY_RX ((uint32_t)(((uint32_t)HAL_I2C_STATE_BUSY_RX & I2C_STATE_MSK) | \ + (uint32_t)HAL_I2C_MODE_MEM)) +/*!< Memory Busy RX, combinaison of State LSB and Mode enum */ + + +/* Private define to centralize the enable/disable of Interrupts */ +#define I2C_XFER_TX_IT (uint16_t)(0x0001U) /*!< Bit field can be combinated with + @ref I2C_XFER_LISTEN_IT */ +#define I2C_XFER_RX_IT (uint16_t)(0x0002U) /*!< Bit field can be combinated with + @ref I2C_XFER_LISTEN_IT */ +#define I2C_XFER_LISTEN_IT (uint16_t)(0x8000U) /*!< Bit field can be combinated with @ref I2C_XFER_TX_IT + and @ref I2C_XFER_RX_IT */ + +#define I2C_XFER_ERROR_IT (uint16_t)(0x0010U) /*!< Bit definition to manage addition of global Error + and NACK treatment */ +#define I2C_XFER_CPLT_IT (uint16_t)(0x0020U) /*!< Bit definition to manage only STOP evenement */ +#define I2C_XFER_RELOAD_IT (uint16_t)(0x0040U) /*!< Bit definition to manage only Reload of NBYTE */ + +/* Private define Sequential Transfer Options default/reset value */ +#define I2C_NO_OPTION_FRAME (0xFFFF0000U) +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @addtogroup I2C_Private_Macro + * @{ + */ +#if defined(HAL_DMA_MODULE_ENABLED) +/* Macro to get remaining data to transfer on DMA side */ +#define I2C_GET_DMA_REMAIN_DATA(__HANDLE__) __HAL_DMA_GET_COUNTER(__HANDLE__) +#endif /* HAL_DMA_MODULE_ENABLED */ +/** + * @} + */ + +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ + +/** @defgroup I2C_Private_Functions I2C Private Functions + * @{ + */ +#if defined(HAL_DMA_MODULE_ENABLED) +/* Private functions to handle DMA transfer */ +static void I2C_DMAMasterTransmitCplt(DMA_HandleTypeDef *hdma); +static void I2C_DMAMasterReceiveCplt(DMA_HandleTypeDef *hdma); +static void I2C_DMASlaveTransmitCplt(DMA_HandleTypeDef *hdma); +static void I2C_DMASlaveReceiveCplt(DMA_HandleTypeDef *hdma); +static void I2C_DMAError(DMA_HandleTypeDef *hdma); +static void I2C_DMAAbort(DMA_HandleTypeDef *hdma); + +#endif /* HAL_DMA_MODULE_ENABLED */ + +/* Private functions to handle IT transfer */ +static void I2C_ITAddrCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags); +static void I2C_ITMasterSeqCplt(I2C_HandleTypeDef *hi2c); +static void I2C_ITSlaveSeqCplt(I2C_HandleTypeDef *hi2c); +static void I2C_ITMasterCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags); +static void I2C_ITSlaveCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags); +static void I2C_ITListenCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags); +static void I2C_ITError(I2C_HandleTypeDef *hi2c, uint32_t ErrorCode); + +/* Private functions to handle IT transfer */ +static HAL_StatusTypeDef I2C_RequestMemoryWrite(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, + uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout, + uint32_t Tickstart); +static HAL_StatusTypeDef I2C_RequestMemoryRead(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, + uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout, + uint32_t Tickstart); + +/* Private functions for I2C transfer IRQ handler */ +static HAL_StatusTypeDef I2C_Master_ISR_IT(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources); +static HAL_StatusTypeDef I2C_Mem_ISR_IT(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources); +static HAL_StatusTypeDef I2C_Slave_ISR_IT(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources); +#if defined(HAL_DMA_MODULE_ENABLED) +static HAL_StatusTypeDef I2C_Master_ISR_DMA(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources); +static HAL_StatusTypeDef I2C_Mem_ISR_DMA(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources); +static HAL_StatusTypeDef I2C_Slave_ISR_DMA(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources); +#endif /* HAL_DMA_MODULE_ENABLED */ + +/* Private functions to handle flags during polling transfer */ +static HAL_StatusTypeDef I2C_WaitOnFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Flag, FlagStatus Status, + uint32_t Timeout, uint32_t Tickstart); +static HAL_StatusTypeDef I2C_WaitOnTXISFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, + uint32_t Tickstart); +static HAL_StatusTypeDef I2C_WaitOnRXNEFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, + uint32_t Tickstart); +static HAL_StatusTypeDef I2C_WaitOnSTOPFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, + uint32_t Tickstart); +static HAL_StatusTypeDef I2C_IsErrorOccurred(I2C_HandleTypeDef *hi2c, uint32_t Timeout, + uint32_t Tickstart); + +/* Private functions to centralize the enable/disable of Interrupts */ +static void I2C_Enable_IRQ(I2C_HandleTypeDef *hi2c, uint16_t InterruptRequest); +static void I2C_Disable_IRQ(I2C_HandleTypeDef *hi2c, uint16_t InterruptRequest); + +/* Private function to treat different error callback */ +static void I2C_TreatErrorCallback(I2C_HandleTypeDef *hi2c); + +/* Private function to flush TXDR register */ +static void I2C_Flush_TXDR(I2C_HandleTypeDef *hi2c); + +/* Private function to handle start, restart or stop a transfer */ +static void I2C_TransferConfig(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t Size, uint32_t Mode, + uint32_t Request); + +/* Private function to Convert Specific options */ +static void I2C_ConvertOtherXferOptions(I2C_HandleTypeDef *hi2c); +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup I2C_Exported_Functions I2C Exported Functions + * @{ + */ + +/** @defgroup I2C_Exported_Functions_Group1 Initialization and de-initialization functions + * @brief Initialization and Configuration functions + * +@verbatim + =============================================================================== + ##### Initialization and de-initialization functions ##### + =============================================================================== + [..] This subsection provides a set of functions allowing to initialize and + deinitialize the I2Cx peripheral: + + (+) User must Implement HAL_I2C_MspInit() function in which he configures + all related peripherals resources (CLOCK, GPIO, DMA, IT and NVIC ). + + (+) Call the function HAL_I2C_Init() to configure the selected device with + the selected configuration: + (++) Clock Timing + (++) Own Address 1 + (++) Addressing mode (Master, Slave) + (++) Dual Addressing mode + (++) Own Address 2 + (++) Own Address 2 Mask + (++) General call mode + (++) Nostretch mode + + (+) Call the function HAL_I2C_DeInit() to restore the default configuration + of the selected I2Cx peripheral. + +@endverbatim + * @{ + */ + +/** + * @brief Initializes the I2C according to the specified parameters + * in the I2C_InitTypeDef and initialize the associated handle. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Init(I2C_HandleTypeDef *hi2c) +{ + /* Check the I2C handle allocation */ + if (hi2c == NULL) + { + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); + assert_param(IS_I2C_OWN_ADDRESS1(hi2c->Init.OwnAddress1)); + assert_param(IS_I2C_ADDRESSING_MODE(hi2c->Init.AddressingMode)); + assert_param(IS_I2C_DUAL_ADDRESS(hi2c->Init.DualAddressMode)); + assert_param(IS_I2C_OWN_ADDRESS2(hi2c->Init.OwnAddress2)); + assert_param(IS_I2C_OWN_ADDRESS2_MASK(hi2c->Init.OwnAddress2Masks)); + assert_param(IS_I2C_GENERAL_CALL(hi2c->Init.GeneralCallMode)); + assert_param(IS_I2C_NO_STRETCH(hi2c->Init.NoStretchMode)); + + if (hi2c->State == HAL_I2C_STATE_RESET) + { + /* Allocate lock resource and initialize it */ + hi2c->Lock = HAL_UNLOCKED; + +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + /* Init the I2C Callback settings */ + hi2c->MasterTxCpltCallback = HAL_I2C_MasterTxCpltCallback; /* Legacy weak MasterTxCpltCallback */ + hi2c->MasterRxCpltCallback = HAL_I2C_MasterRxCpltCallback; /* Legacy weak MasterRxCpltCallback */ + hi2c->SlaveTxCpltCallback = HAL_I2C_SlaveTxCpltCallback; /* Legacy weak SlaveTxCpltCallback */ + hi2c->SlaveRxCpltCallback = HAL_I2C_SlaveRxCpltCallback; /* Legacy weak SlaveRxCpltCallback */ + hi2c->ListenCpltCallback = HAL_I2C_ListenCpltCallback; /* Legacy weak ListenCpltCallback */ + hi2c->MemTxCpltCallback = HAL_I2C_MemTxCpltCallback; /* Legacy weak MemTxCpltCallback */ + hi2c->MemRxCpltCallback = HAL_I2C_MemRxCpltCallback; /* Legacy weak MemRxCpltCallback */ + hi2c->ErrorCallback = HAL_I2C_ErrorCallback; /* Legacy weak ErrorCallback */ + hi2c->AbortCpltCallback = HAL_I2C_AbortCpltCallback; /* Legacy weak AbortCpltCallback */ + hi2c->AddrCallback = HAL_I2C_AddrCallback; /* Legacy weak AddrCallback */ + + if (hi2c->MspInitCallback == NULL) + { + hi2c->MspInitCallback = HAL_I2C_MspInit; /* Legacy weak MspInit */ + } + + /* Init the low level hardware : GPIO, CLOCK, CORTEX...etc */ + hi2c->MspInitCallback(hi2c); +#else + /* Init the low level hardware : GPIO, CLOCK, CORTEX...etc */ + HAL_I2C_MspInit(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + + hi2c->State = HAL_I2C_STATE_BUSY; + + /* Disable the selected I2C peripheral */ + __HAL_I2C_DISABLE(hi2c); + + /*---------------------------- I2Cx TIMINGR Configuration ------------------*/ + /* Configure I2Cx: Frequency range */ + hi2c->Instance->TIMINGR = hi2c->Init.Timing & TIMING_CLEAR_MASK; + + /*---------------------------- I2Cx OAR1 Configuration ---------------------*/ + /* Disable Own Address1 before set the Own Address1 configuration */ + hi2c->Instance->OAR1 &= ~I2C_OAR1_OA1EN; + + /* Configure I2Cx: Own Address1 and ack own address1 mode */ + if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_7BIT) + { + hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | hi2c->Init.OwnAddress1); + } + else /* I2C_ADDRESSINGMODE_10BIT */ + { + hi2c->Instance->OAR1 = (I2C_OAR1_OA1EN | I2C_OAR1_OA1MODE | hi2c->Init.OwnAddress1); + } + + /*---------------------------- I2Cx CR2 Configuration ----------------------*/ + /* Configure I2Cx: Addressing Master mode */ + if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT) + { + SET_BIT(hi2c->Instance->CR2, I2C_CR2_ADD10); + } + else + { + /* Clear the I2C ADD10 bit */ + CLEAR_BIT(hi2c->Instance->CR2, I2C_CR2_ADD10); + } + /* Enable the AUTOEND by default, and enable NACK (should be disable only during Slave process */ + hi2c->Instance->CR2 |= (I2C_CR2_AUTOEND | I2C_CR2_NACK); + + /*---------------------------- I2Cx OAR2 Configuration ---------------------*/ + /* Disable Own Address2 before set the Own Address2 configuration */ + hi2c->Instance->OAR2 &= ~I2C_DUALADDRESS_ENABLE; + + /* Configure I2Cx: Dual mode and Own Address2 */ + hi2c->Instance->OAR2 = (hi2c->Init.DualAddressMode | hi2c->Init.OwnAddress2 | \ + (hi2c->Init.OwnAddress2Masks << 8)); + + /*---------------------------- I2Cx CR1 Configuration ----------------------*/ + /* Configure I2Cx: Generalcall and NoStretch mode */ + hi2c->Instance->CR1 = (hi2c->Init.GeneralCallMode | hi2c->Init.NoStretchMode); + + /* Enable the selected I2C peripheral */ + __HAL_I2C_ENABLE(hi2c); + + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_NONE; + hi2c->Mode = HAL_I2C_MODE_NONE; + + return HAL_OK; +} + +/** + * @brief DeInitialize the I2C peripheral. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_DeInit(I2C_HandleTypeDef *hi2c) +{ + /* Check the I2C handle allocation */ + if (hi2c == NULL) + { + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); + + hi2c->State = HAL_I2C_STATE_BUSY; + + /* Disable the I2C Peripheral Clock */ + __HAL_I2C_DISABLE(hi2c); + +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + if (hi2c->MspDeInitCallback == NULL) + { + hi2c->MspDeInitCallback = HAL_I2C_MspDeInit; /* Legacy weak MspDeInit */ + } + + /* DeInit the low level hardware: GPIO, CLOCK, NVIC */ + hi2c->MspDeInitCallback(hi2c); +#else + /* DeInit the low level hardware: GPIO, CLOCK, NVIC */ + HAL_I2C_MspDeInit(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + hi2c->State = HAL_I2C_STATE_RESET; + hi2c->PreviousState = I2C_STATE_NONE; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Release Lock */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; +} + +/** + * @brief Initialize the I2C MSP. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_MspInit(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_MspInit could be implemented in the user file + */ +} + +/** + * @brief DeInitialize the I2C MSP. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_MspDeInit could be implemented in the user file + */ +} + +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) +/** + * @brief Register a User I2C Callback + * To be used instead of the weak predefined callback + * @note The HAL_I2C_RegisterCallback() may be called before HAL_I2C_Init() in HAL_I2C_STATE_RESET + * to register callbacks for HAL_I2C_MSPINIT_CB_ID and HAL_I2C_MSPDEINIT_CB_ID. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param CallbackID ID of the callback to be registered + * This parameter can be one of the following values: + * @arg @ref HAL_I2C_MASTER_TX_COMPLETE_CB_ID Master Tx Transfer completed callback ID + * @arg @ref HAL_I2C_MASTER_RX_COMPLETE_CB_ID Master Rx Transfer completed callback ID + * @arg @ref HAL_I2C_SLAVE_TX_COMPLETE_CB_ID Slave Tx Transfer completed callback ID + * @arg @ref HAL_I2C_SLAVE_RX_COMPLETE_CB_ID Slave Rx Transfer completed callback ID + * @arg @ref HAL_I2C_LISTEN_COMPLETE_CB_ID Listen Complete callback ID + * @arg @ref HAL_I2C_MEM_TX_COMPLETE_CB_ID Memory Tx Transfer callback ID + * @arg @ref HAL_I2C_MEM_RX_COMPLETE_CB_ID Memory Rx Transfer completed callback ID + * @arg @ref HAL_I2C_ERROR_CB_ID Error callback ID + * @arg @ref HAL_I2C_ABORT_CB_ID Abort callback ID + * @arg @ref HAL_I2C_MSPINIT_CB_ID MspInit callback ID + * @arg @ref HAL_I2C_MSPDEINIT_CB_ID MspDeInit callback ID + * @param pCallback pointer to the Callback function + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_RegisterCallback(I2C_HandleTypeDef *hi2c, HAL_I2C_CallbackIDTypeDef CallbackID, + pI2C_CallbackTypeDef pCallback) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (pCallback == NULL) + { + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + return HAL_ERROR; + } + + if (HAL_I2C_STATE_READY == hi2c->State) + { + switch (CallbackID) + { + case HAL_I2C_MASTER_TX_COMPLETE_CB_ID : + hi2c->MasterTxCpltCallback = pCallback; + break; + + case HAL_I2C_MASTER_RX_COMPLETE_CB_ID : + hi2c->MasterRxCpltCallback = pCallback; + break; + + case HAL_I2C_SLAVE_TX_COMPLETE_CB_ID : + hi2c->SlaveTxCpltCallback = pCallback; + break; + + case HAL_I2C_SLAVE_RX_COMPLETE_CB_ID : + hi2c->SlaveRxCpltCallback = pCallback; + break; + + case HAL_I2C_LISTEN_COMPLETE_CB_ID : + hi2c->ListenCpltCallback = pCallback; + break; + + case HAL_I2C_MEM_TX_COMPLETE_CB_ID : + hi2c->MemTxCpltCallback = pCallback; + break; + + case HAL_I2C_MEM_RX_COMPLETE_CB_ID : + hi2c->MemRxCpltCallback = pCallback; + break; + + case HAL_I2C_ERROR_CB_ID : + hi2c->ErrorCallback = pCallback; + break; + + case HAL_I2C_ABORT_CB_ID : + hi2c->AbortCpltCallback = pCallback; + break; + + case HAL_I2C_MSPINIT_CB_ID : + hi2c->MspInitCallback = pCallback; + break; + + case HAL_I2C_MSPDEINIT_CB_ID : + hi2c->MspDeInitCallback = pCallback; + break; + + default : + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else if (HAL_I2C_STATE_RESET == hi2c->State) + { + switch (CallbackID) + { + case HAL_I2C_MSPINIT_CB_ID : + hi2c->MspInitCallback = pCallback; + break; + + case HAL_I2C_MSPDEINIT_CB_ID : + hi2c->MspDeInitCallback = pCallback; + break; + + default : + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else + { + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + } + + return status; +} + +/** + * @brief Unregister an I2C Callback + * I2C callback is redirected to the weak predefined callback + * @note The HAL_I2C_UnRegisterCallback() may be called before HAL_I2C_Init() in HAL_I2C_STATE_RESET + * to un-register callbacks for HAL_I2C_MSPINIT_CB_ID and HAL_I2C_MSPDEINIT_CB_ID. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param CallbackID ID of the callback to be unregistered + * This parameter can be one of the following values: + * This parameter can be one of the following values: + * @arg @ref HAL_I2C_MASTER_TX_COMPLETE_CB_ID Master Tx Transfer completed callback ID + * @arg @ref HAL_I2C_MASTER_RX_COMPLETE_CB_ID Master Rx Transfer completed callback ID + * @arg @ref HAL_I2C_SLAVE_TX_COMPLETE_CB_ID Slave Tx Transfer completed callback ID + * @arg @ref HAL_I2C_SLAVE_RX_COMPLETE_CB_ID Slave Rx Transfer completed callback ID + * @arg @ref HAL_I2C_LISTEN_COMPLETE_CB_ID Listen Complete callback ID + * @arg @ref HAL_I2C_MEM_TX_COMPLETE_CB_ID Memory Tx Transfer callback ID + * @arg @ref HAL_I2C_MEM_RX_COMPLETE_CB_ID Memory Rx Transfer completed callback ID + * @arg @ref HAL_I2C_ERROR_CB_ID Error callback ID + * @arg @ref HAL_I2C_ABORT_CB_ID Abort callback ID + * @arg @ref HAL_I2C_MSPINIT_CB_ID MspInit callback ID + * @arg @ref HAL_I2C_MSPDEINIT_CB_ID MspDeInit callback ID + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_UnRegisterCallback(I2C_HandleTypeDef *hi2c, HAL_I2C_CallbackIDTypeDef CallbackID) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (HAL_I2C_STATE_READY == hi2c->State) + { + switch (CallbackID) + { + case HAL_I2C_MASTER_TX_COMPLETE_CB_ID : + hi2c->MasterTxCpltCallback = HAL_I2C_MasterTxCpltCallback; /* Legacy weak MasterTxCpltCallback */ + break; + + case HAL_I2C_MASTER_RX_COMPLETE_CB_ID : + hi2c->MasterRxCpltCallback = HAL_I2C_MasterRxCpltCallback; /* Legacy weak MasterRxCpltCallback */ + break; + + case HAL_I2C_SLAVE_TX_COMPLETE_CB_ID : + hi2c->SlaveTxCpltCallback = HAL_I2C_SlaveTxCpltCallback; /* Legacy weak SlaveTxCpltCallback */ + break; + + case HAL_I2C_SLAVE_RX_COMPLETE_CB_ID : + hi2c->SlaveRxCpltCallback = HAL_I2C_SlaveRxCpltCallback; /* Legacy weak SlaveRxCpltCallback */ + break; + + case HAL_I2C_LISTEN_COMPLETE_CB_ID : + hi2c->ListenCpltCallback = HAL_I2C_ListenCpltCallback; /* Legacy weak ListenCpltCallback */ + break; + + case HAL_I2C_MEM_TX_COMPLETE_CB_ID : + hi2c->MemTxCpltCallback = HAL_I2C_MemTxCpltCallback; /* Legacy weak MemTxCpltCallback */ + break; + + case HAL_I2C_MEM_RX_COMPLETE_CB_ID : + hi2c->MemRxCpltCallback = HAL_I2C_MemRxCpltCallback; /* Legacy weak MemRxCpltCallback */ + break; + + case HAL_I2C_ERROR_CB_ID : + hi2c->ErrorCallback = HAL_I2C_ErrorCallback; /* Legacy weak ErrorCallback */ + break; + + case HAL_I2C_ABORT_CB_ID : + hi2c->AbortCpltCallback = HAL_I2C_AbortCpltCallback; /* Legacy weak AbortCpltCallback */ + break; + + case HAL_I2C_MSPINIT_CB_ID : + hi2c->MspInitCallback = HAL_I2C_MspInit; /* Legacy weak MspInit */ + break; + + case HAL_I2C_MSPDEINIT_CB_ID : + hi2c->MspDeInitCallback = HAL_I2C_MspDeInit; /* Legacy weak MspDeInit */ + break; + + default : + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else if (HAL_I2C_STATE_RESET == hi2c->State) + { + switch (CallbackID) + { + case HAL_I2C_MSPINIT_CB_ID : + hi2c->MspInitCallback = HAL_I2C_MspInit; /* Legacy weak MspInit */ + break; + + case HAL_I2C_MSPDEINIT_CB_ID : + hi2c->MspDeInitCallback = HAL_I2C_MspDeInit; /* Legacy weak MspDeInit */ + break; + + default : + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else + { + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + } + + return status; +} + +/** + * @brief Register the Slave Address Match I2C Callback + * To be used instead of the weak HAL_I2C_AddrCallback() predefined callback + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pCallback pointer to the Address Match Callback function + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_RegisterAddrCallback(I2C_HandleTypeDef *hi2c, pI2C_AddrCallbackTypeDef pCallback) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (pCallback == NULL) + { + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + return HAL_ERROR; + } + + if (HAL_I2C_STATE_READY == hi2c->State) + { + hi2c->AddrCallback = pCallback; + } + else + { + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + } + + return status; +} + +/** + * @brief UnRegister the Slave Address Match I2C Callback + * Info Ready I2C Callback is redirected to the weak HAL_I2C_AddrCallback() predefined callback + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_UnRegisterAddrCallback(I2C_HandleTypeDef *hi2c) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (HAL_I2C_STATE_READY == hi2c->State) + { + hi2c->AddrCallback = HAL_I2C_AddrCallback; /* Legacy weak AddrCallback */ + } + else + { + /* Update the error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_INVALID_CALLBACK; + + /* Return error status */ + status = HAL_ERROR; + } + + return status; +} + +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + +/** + * @} + */ + +/** @defgroup I2C_Exported_Functions_Group2 Input and Output operation functions + * @brief Data transfers functions + * +@verbatim + =============================================================================== + ##### IO operation functions ##### + =============================================================================== + [..] + This subsection provides a set of functions allowing to manage the I2C data + transfers. + + (#) There are two modes of transfer: + (++) Blocking mode : The communication is performed in the polling mode. + The status of all data processing is returned by the same function + after finishing transfer. + (++) No-Blocking mode : The communication is performed using Interrupts + or DMA. These functions return the status of the transfer startup. + The end of the data processing will be indicated through the + dedicated I2C IRQ when using Interrupt mode or the DMA IRQ when + using DMA mode. + + (#) Blocking mode functions are : + (++) HAL_I2C_Master_Transmit() + (++) HAL_I2C_Master_Receive() + (++) HAL_I2C_Slave_Transmit() + (++) HAL_I2C_Slave_Receive() + (++) HAL_I2C_Mem_Write() + (++) HAL_I2C_Mem_Read() + (++) HAL_I2C_IsDeviceReady() + + (#) No-Blocking mode functions with Interrupt are : + (++) HAL_I2C_Master_Transmit_IT() + (++) HAL_I2C_Master_Receive_IT() + (++) HAL_I2C_Slave_Transmit_IT() + (++) HAL_I2C_Slave_Receive_IT() + (++) HAL_I2C_Mem_Write_IT() + (++) HAL_I2C_Mem_Read_IT() + (++) HAL_I2C_Master_Seq_Transmit_IT() + (++) HAL_I2C_Master_Seq_Receive_IT() + (++) HAL_I2C_Slave_Seq_Transmit_IT() + (++) HAL_I2C_Slave_Seq_Receive_IT() + (++) HAL_I2C_EnableListen_IT() + (++) HAL_I2C_DisableListen_IT() + (++) HAL_I2C_Master_Abort_IT() + + (#) No-Blocking mode functions with DMA are : + (++) HAL_I2C_Master_Transmit_DMA() + (++) HAL_I2C_Master_Receive_DMA() + (++) HAL_I2C_Slave_Transmit_DMA() + (++) HAL_I2C_Slave_Receive_DMA() + (++) HAL_I2C_Mem_Write_DMA() + (++) HAL_I2C_Mem_Read_DMA() + (++) HAL_I2C_Master_Seq_Transmit_DMA() + (++) HAL_I2C_Master_Seq_Receive_DMA() + (++) HAL_I2C_Slave_Seq_Transmit_DMA() + (++) HAL_I2C_Slave_Seq_Receive_DMA() + + (#) A set of Transfer Complete Callbacks are provided in non Blocking mode: + (++) HAL_I2C_MasterTxCpltCallback() + (++) HAL_I2C_MasterRxCpltCallback() + (++) HAL_I2C_SlaveTxCpltCallback() + (++) HAL_I2C_SlaveRxCpltCallback() + (++) HAL_I2C_MemTxCpltCallback() + (++) HAL_I2C_MemRxCpltCallback() + (++) HAL_I2C_AddrCallback() + (++) HAL_I2C_ListenCpltCallback() + (++) HAL_I2C_ErrorCallback() + (++) HAL_I2C_AbortCpltCallback() + +@endverbatim + * @{ + */ + +/** + * @brief Transmits in master mode an amount of data in blocking mode. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t Timeout) +{ + uint32_t tickstart; + uint32_t xfermode; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* Init tickstart for timeout management*/ + tickstart = HAL_GetTick(); + + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferISR = NULL; + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = I2C_AUTOEND_MODE; + } + + if (hi2c->XferSize > 0U) + { + /* Preload TX register */ + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + + /* Send Slave Address */ + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)(hi2c->XferSize + 1U), xfermode, + I2C_GENERATE_START_WRITE); + } + else + { + /* Send Slave Address */ + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, + I2C_GENERATE_START_WRITE); + } + + while (hi2c->XferCount > 0U) + { + /* Wait until TXIS flag is set */ + if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + + if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U)) + { + /* Wait until TCR flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, + I2C_NO_STARTSTOP); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, + I2C_NO_STARTSTOP); + } + } + } + + /* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */ + /* Wait until STOPF flag is set */ + if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Clear Configuration Register 2 */ + I2C_RESET_CR2(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Receives in master mode an amount of data in blocking mode. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Receive(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t Timeout) +{ + uint32_t tickstart; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* Init tickstart for timeout management*/ + tickstart = HAL_GetTick(); + + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferISR = NULL; + + /* Send Slave Address */ + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, + I2C_GENERATE_START_READ); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, + I2C_GENERATE_START_READ); + } + + while (hi2c->XferCount > 0U) + { + /* Wait until RXNE flag is set */ + if (I2C_WaitOnRXNEFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferSize--; + hi2c->XferCount--; + + if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U)) + { + /* Wait until TCR flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, + I2C_NO_STARTSTOP); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, + I2C_NO_STARTSTOP); + } + } + } + + /* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */ + /* Wait until STOPF flag is set */ + if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Clear Configuration Register 2 */ + I2C_RESET_CR2(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Transmits in slave mode an amount of data in blocking mode. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Transmit(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t Timeout) +{ + uint32_t tickstart; + uint16_t tmpXferCount; + HAL_StatusTypeDef error; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* Init tickstart for timeout management*/ + tickstart = HAL_GetTick(); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferISR = NULL; + + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Preload TX data if no stretch enable */ + if (hi2c->Init.NoStretchMode == I2C_NOSTRETCH_ENABLE) + { + /* Preload TX register */ + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + } + + /* Wait until ADDR flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_ADDR, RESET, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + return HAL_ERROR; + } + + /* Clear ADDR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + + /* If 10bit addressing mode is selected */ + if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT) + { + /* Wait until ADDR flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_ADDR, RESET, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + return HAL_ERROR; + } + + /* Clear ADDR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + } + + /* Wait until DIR flag is set Transmitter mode */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_DIR, RESET, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + return HAL_ERROR; + } + + while (hi2c->XferCount > 0U) + { + /* Wait until TXIS flag is set */ + if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + return HAL_ERROR; + } + + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + } + + /* Wait until AF flag is set */ + error = I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_AF, RESET, Timeout, tickstart); + + if (error != HAL_OK) + { + /* Check that I2C transfer finished */ + /* if yes, normal use case, a NACK is sent by the MASTER when Transfer is finished */ + /* Mean XferCount == 0 */ + + tmpXferCount = hi2c->XferCount; + if ((hi2c->ErrorCode == HAL_I2C_ERROR_AF) && (tmpXferCount == 0U)) + { + /* Reset ErrorCode to NONE */ + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + } + else + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + return HAL_ERROR; + } + } + else + { + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + /* Clear AF flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Wait until STOP flag is set */ + if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + return HAL_ERROR; + } + + /* Clear STOP flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + } + + /* Wait until BUSY flag is reset */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + return HAL_ERROR; + } + + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Receive in slave mode an amount of data in blocking mode + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Receive(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t Timeout) +{ + uint32_t tickstart; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* Init tickstart for timeout management*/ + tickstart = HAL_GetTick(); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferISR = NULL; + + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Wait until ADDR flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_ADDR, RESET, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + return HAL_ERROR; + } + + /* Clear ADDR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + + /* Wait until DIR flag is reset Receiver mode */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_DIR, SET, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + return HAL_ERROR; + } + + while (hi2c->XferCount > 0U) + { + /* Wait until RXNE flag is set */ + if (I2C_WaitOnRXNEFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + /* Store Last receive data if any */ + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == SET) + { + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + } + + return HAL_ERROR; + } + + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + } + + /* Wait until STOP flag is set */ + if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + return HAL_ERROR; + } + + /* Clear STOP flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Wait until BUSY flag is reset */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, Timeout, tickstart) != HAL_OK) + { + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + return HAL_ERROR; + } + + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Transmit in master mode an amount of data in non-blocking mode with Interrupt + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Transmit_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size) +{ + uint32_t xfermode; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Master_ISR_IT; + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = I2C_AUTOEND_MODE; + } + + /* Send Slave Address */ + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE */ + if (hi2c->XferSize > 0U) + { + /* Preload TX register */ + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)(hi2c->XferSize + 1U), xfermode, + I2C_GENERATE_START_WRITE); + } + else + { + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, + I2C_GENERATE_START_WRITE); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Receive in master mode an amount of data in non-blocking mode with Interrupt + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Receive_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size) +{ + uint32_t xfermode; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Master_ISR_IT; + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = I2C_AUTOEND_MODE; + } + + /* Send Slave Address */ + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, I2C_GENERATE_START_READ); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + + /* Enable ERR, TC, STOP, NACK, RXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RX_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Transmit in slave mode an amount of data in non-blocking mode with Interrupt + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Transmit_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size) +{ + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Slave_ISR_IT; + + /* Preload TX data if no stretch enable */ + if (hi2c->Init.NoStretchMode == I2C_NOSTRETCH_ENABLE) + { + /* Preload TX register */ + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT | I2C_XFER_LISTEN_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Receive in slave mode an amount of data in non-blocking mode with Interrupt + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Receive_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size) +{ + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Slave_ISR_IT; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + + /* Enable ERR, TC, STOP, NACK, RXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RX_IT | I2C_XFER_LISTEN_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +#if defined(HAL_DMA_MODULE_ENABLED) +/** + * @brief Transmit in master mode an amount of data in non-blocking mode with DMA + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size) +{ + uint32_t xfermode; + HAL_StatusTypeDef dmaxferstatus; + uint32_t sizetoxfer = 0U; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Master_ISR_DMA; + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = I2C_AUTOEND_MODE; + } + + if (hi2c->XferSize > 0U) + { + /* Preload TX register */ + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + sizetoxfer = hi2c->XferSize; + hi2c->XferCount--; + hi2c->XferSize--; + } + + if (hi2c->XferSize > 0U) + { + if (hi2c->hdmatx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmatx->XferCpltCallback = I2C_DMAMasterTransmitCplt; + + /* Set the DMA error callback */ + hi2c->hdmatx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmatx->XferHalfCpltCallback = NULL; + hi2c->hdmatx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmatx, (uint32_t)hi2c->pBuffPtr, + (uint32_t)&hi2c->Instance->TXDR, hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Send Slave Address */ + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)(hi2c->XferSize + 1U), + xfermode, I2C_GENERATE_START_WRITE); + + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR and NACK interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_ERROR_IT); + + /* Enable DMA Request */ + hi2c->Instance->CR1 |= I2C_CR1_TXDMAEN; + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + } + else + { + /* Update Transfer ISR function pointer */ + hi2c->XferISR = I2C_Master_ISR_IT; + + /* Send Slave Address */ + /* Set NBYTES to write and generate START condition */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)sizetoxfer, I2C_AUTOEND_MODE, + I2C_GENERATE_START_WRITE); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT); + } + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Receive in master mode an amount of data in non-blocking mode with DMA + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Receive_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size) +{ + uint32_t xfermode; + HAL_StatusTypeDef dmaxferstatus; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Master_ISR_DMA; + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = I2C_AUTOEND_MODE; + } + + if (hi2c->XferSize > 0U) + { + if (hi2c->hdmarx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmarx->XferCpltCallback = I2C_DMAMasterReceiveCplt; + + /* Set the DMA error callback */ + hi2c->hdmarx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmarx->XferHalfCpltCallback = NULL; + hi2c->hdmarx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmarx, (uint32_t)&hi2c->Instance->RXDR, (uint32_t)pData, + hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Send Slave Address */ + /* Set NBYTES to read and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, I2C_GENERATE_START_READ); + + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR and NACK interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_ERROR_IT); + + /* Enable DMA Request */ + hi2c->Instance->CR1 |= I2C_CR1_RXDMAEN; + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + } + else + { + /* Update Transfer ISR function pointer */ + hi2c->XferISR = I2C_Master_ISR_IT; + + /* Send Slave Address */ + /* Set NBYTES to read and generate START condition */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, + I2C_GENERATE_START_READ); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, TC, STOP, NACK, RXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RX_IT); + } + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Transmit in slave mode an amount of data in non-blocking mode with DMA + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size) +{ + HAL_StatusTypeDef dmaxferstatus; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Slave_ISR_DMA; + + /* Preload TX data if no stretch enable */ + if (hi2c->Init.NoStretchMode == I2C_NOSTRETCH_ENABLE) + { + /* Preload TX register */ + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + } + + if (hi2c->XferCount != 0U) + { + if (hi2c->hdmatx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmatx->XferCpltCallback = I2C_DMASlaveTransmitCplt; + + /* Set the DMA error callback */ + hi2c->hdmatx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmatx->XferHalfCpltCallback = NULL; + hi2c->hdmatx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmatx, + (uint32_t)hi2c->pBuffPtr, (uint32_t)&hi2c->Instance->TXDR, + hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, STOP, NACK, ADDR interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_LISTEN_IT); + + /* Enable DMA Request */ + hi2c->Instance->CR1 |= I2C_CR1_TXDMAEN; + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + } + else + { + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, STOP, NACK, ADDR interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_LISTEN_IT); + } + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Receive in slave mode an amount of data in non-blocking mode with DMA + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Receive_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size) +{ + HAL_StatusTypeDef dmaxferstatus; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Slave_ISR_DMA; + + if (hi2c->hdmarx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmarx->XferCpltCallback = I2C_DMASlaveReceiveCplt; + + /* Set the DMA error callback */ + hi2c->hdmarx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmarx->XferHalfCpltCallback = NULL; + hi2c->hdmarx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmarx, (uint32_t)&hi2c->Instance->RXDR, (uint32_t)pData, + hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, STOP, NACK, ADDR interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_LISTEN_IT); + + /* Enable DMA Request */ + hi2c->Instance->CR1 |= I2C_CR1_RXDMAEN; + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} +#endif /* HAL_DMA_MODULE_ENABLED */ + +/** + * @brief Write an amount of data in blocking mode to a specific memory address + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param MemAddress Internal memory address + * @param MemAddSize Size of internal memory address + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout) +{ + uint32_t tickstart; + + /* Check the parameters */ + assert_param(IS_I2C_MEMADD_SIZE(MemAddSize)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* Init tickstart for timeout management*/ + tickstart = HAL_GetTick(); + + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_MEM; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferISR = NULL; + + /* Send Slave Address and Memory Address */ + if (I2C_RequestMemoryWrite(hi2c, DevAddress, MemAddress, MemAddSize, Timeout, tickstart) != HAL_OK) + { + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + return HAL_ERROR; + } + + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, I2C_NO_STARTSTOP); + } + + do + { + /* Wait until TXIS flag is set */ + if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + + if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U)) + { + /* Wait until TCR flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, + I2C_NO_STARTSTOP); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, + I2C_NO_STARTSTOP); + } + } + + } while (hi2c->XferCount > 0U); + + /* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */ + /* Wait until STOPF flag is reset */ + if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Clear Configuration Register 2 */ + I2C_RESET_CR2(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Read an amount of data in blocking mode from a specific memory address + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param MemAddress Internal memory address + * @param MemAddSize Size of internal memory address + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Mem_Read(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout) +{ + uint32_t tickstart; + + /* Check the parameters */ + assert_param(IS_I2C_MEMADD_SIZE(MemAddSize)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* Init tickstart for timeout management*/ + tickstart = HAL_GetTick(); + + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_MEM; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferISR = NULL; + + /* Send Slave Address and Memory Address */ + if (I2C_RequestMemoryRead(hi2c, DevAddress, MemAddress, MemAddSize, Timeout, tickstart) != HAL_OK) + { + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + return HAL_ERROR; + } + + /* Send Slave Address */ + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, + I2C_GENERATE_START_READ); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, + I2C_GENERATE_START_READ); + } + + do + { + /* Wait until RXNE flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_RXNE, RESET, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferSize--; + hi2c->XferCount--; + + if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U)) + { + /* Wait until TCR flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t) hi2c->XferSize, I2C_RELOAD_MODE, + I2C_NO_STARTSTOP); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, + I2C_NO_STARTSTOP); + } + } + } while (hi2c->XferCount > 0U); + + /* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */ + /* Wait until STOPF flag is reset */ + if (I2C_WaitOnSTOPFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Clear Configuration Register 2 */ + I2C_RESET_CR2(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} +/** + * @brief Write an amount of data in non-blocking mode with Interrupt to a specific memory address + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param MemAddress Internal memory address + * @param MemAddSize Size of internal memory address + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Mem_Write_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size) +{ + /* Check the parameters */ + assert_param(IS_I2C_MEMADD_SIZE(MemAddSize)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_MEM; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->XferSize = 0U; + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Mem_ISR_IT; + hi2c->Devaddress = DevAddress; + + /* If Memory address size is 8Bit */ + if (MemAddSize == I2C_MEMADD_SIZE_8BIT) + { + /* Prefetch Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress); + + /* Reset Memaddress content */ + hi2c->Memaddress = 0xFFFFFFFFU; + } + /* If Memory address size is 16Bit */ + else + { + /* Prefetch Memory Address (MSB part, LSB will be manage through interrupt) */ + hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress); + + /* Prepare Memaddress buffer for LSB part */ + hi2c->Memaddress = I2C_MEM_ADD_LSB(MemAddress); + } + /* Send Slave Address and Memory Address */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_RELOAD_MODE, I2C_GENERATE_START_WRITE); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Read an amount of data in non-blocking mode with Interrupt from a specific memory address + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param MemAddress Internal memory address + * @param MemAddSize Size of internal memory address + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Mem_Read_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size) +{ + /* Check the parameters */ + assert_param(IS_I2C_MEMADD_SIZE(MemAddSize)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_MEM; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Mem_ISR_IT; + hi2c->Devaddress = DevAddress; + + /* If Memory address size is 8Bit */ + if (MemAddSize == I2C_MEMADD_SIZE_8BIT) + { + /* Prefetch Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress); + + /* Reset Memaddress content */ + hi2c->Memaddress = 0xFFFFFFFFU; + } + /* If Memory address size is 16Bit */ + else + { + /* Prefetch Memory Address (MSB part, LSB will be manage through interrupt) */ + hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress); + + /* Prepare Memaddress buffer for LSB part */ + hi2c->Memaddress = I2C_MEM_ADD_LSB(MemAddress); + } + /* Send Slave Address and Memory Address */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_SOFTEND_MODE, I2C_GENERATE_START_WRITE); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +#if defined(HAL_DMA_MODULE_ENABLED) +/** + * @brief Write an amount of data in non-blocking mode with DMA to a specific memory address + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param MemAddress Internal memory address + * @param MemAddSize Size of internal memory address + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Mem_Write_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size) +{ + HAL_StatusTypeDef dmaxferstatus; + + /* Check the parameters */ + assert_param(IS_I2C_MEMADD_SIZE(MemAddSize)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_MEM; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Mem_ISR_DMA; + hi2c->Devaddress = DevAddress; + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + } + + /* If Memory address size is 8Bit */ + if (MemAddSize == I2C_MEMADD_SIZE_8BIT) + { + /* Prefetch Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress); + + /* Reset Memaddress content */ + hi2c->Memaddress = 0xFFFFFFFFU; + } + /* If Memory address size is 16Bit */ + else + { + /* Prefetch Memory Address (MSB part, LSB will be manage through interrupt) */ + hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress); + + /* Prepare Memaddress buffer for LSB part */ + hi2c->Memaddress = I2C_MEM_ADD_LSB(MemAddress); + } + + if (hi2c->hdmatx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmatx->XferCpltCallback = I2C_DMAMasterTransmitCplt; + + /* Set the DMA error callback */ + hi2c->hdmatx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmatx->XferHalfCpltCallback = NULL; + hi2c->hdmatx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmatx, (uint32_t)pData, (uint32_t)&hi2c->Instance->TXDR, + hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Send Slave Address and Memory Address */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_RELOAD_MODE, I2C_GENERATE_START_WRITE); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Reads an amount of data in non-blocking mode with DMA from a specific memory address. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param MemAddress Internal memory address + * @param MemAddSize Size of internal memory address + * @param pData Pointer to data buffer + * @param Size Amount of data to be read + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Mem_Read_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, + uint16_t MemAddSize, uint8_t *pData, uint16_t Size) +{ + HAL_StatusTypeDef dmaxferstatus; + + /* Check the parameters */ + assert_param(IS_I2C_MEMADD_SIZE(MemAddSize)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_MEM; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferISR = I2C_Mem_ISR_DMA; + hi2c->Devaddress = DevAddress; + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + } + + /* If Memory address size is 8Bit */ + if (MemAddSize == I2C_MEMADD_SIZE_8BIT) + { + /* Prefetch Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress); + + /* Reset Memaddress content */ + hi2c->Memaddress = 0xFFFFFFFFU; + } + /* If Memory address size is 16Bit */ + else + { + /* Prefetch Memory Address (MSB part, LSB will be manage through interrupt) */ + hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress); + + /* Prepare Memaddress buffer for LSB part */ + hi2c->Memaddress = I2C_MEM_ADD_LSB(MemAddress); + } + + if (hi2c->hdmarx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmarx->XferCpltCallback = I2C_DMAMasterReceiveCplt; + + /* Set the DMA error callback */ + hi2c->hdmarx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmarx->XferHalfCpltCallback = NULL; + hi2c->hdmarx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmarx, (uint32_t)&hi2c->Instance->RXDR, (uint32_t)pData, + hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Send Slave Address and Memory Address */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_SOFTEND_MODE, I2C_GENERATE_START_WRITE); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} +#endif /* HAL_DMA_MODULE_ENABLED */ + +/** + * @brief Checks if target device is ready for communication. + * @note This function is used with Memory devices + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param Trials Number of trials + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_IsDeviceReady(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint32_t Trials, + uint32_t Timeout) +{ + uint32_t tickstart; + + __IO uint32_t I2C_Trials = 0UL; + + HAL_StatusTypeDef status = HAL_OK; + + FlagStatus tmp1; + FlagStatus tmp2; + + if (hi2c->State == HAL_I2C_STATE_READY) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) == SET) + { + return HAL_BUSY; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + do + { + /* Generate Start */ + hi2c->Instance->CR2 = I2C_GENERATE_START(hi2c->Init.AddressingMode, DevAddress); + + /* No need to Check TC flag, with AUTOEND mode the stop is automatically generated */ + /* Wait until STOPF flag is set or a NACK flag is set*/ + tickstart = HAL_GetTick(); + + tmp1 = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF); + tmp2 = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF); + + while ((tmp1 == RESET) && (tmp2 == RESET)) + { + if (Timeout != HAL_MAX_DELAY) + { + if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U)) + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + } + + tmp1 = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF); + tmp2 = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF); + } + + /* Check if the NACKF flag has not been set */ + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF) == RESET) + { + /* Wait until STOPF flag is reset */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_STOPF, RESET, Timeout, tickstart) != HAL_OK) + { + /* A non acknowledge appear during STOP Flag waiting process, a new trial must be performed */ + if (hi2c->ErrorCode == HAL_I2C_ERROR_AF) + { + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Reset the error code for next trial */ + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + } + else + { + status = HAL_ERROR; + } + } + else + { + /* A acknowledge appear during STOP Flag waiting process, this mean that device respond to its address */ + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Device is ready */ + hi2c->State = HAL_I2C_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + } + else + { + /* A non acknowledge is detected, this mean that device not respond to its address, + a new trial must be performed */ + + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Wait until STOPF flag is reset */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_STOPF, RESET, Timeout, tickstart) != HAL_OK) + { + status = HAL_ERROR; + } + else + { + /* Clear STOP Flag, auto generated with autoend*/ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + } + } + + /* Increment Trials */ + I2C_Trials++; + + if ((I2C_Trials < Trials) && (status == HAL_ERROR)) + { + status = HAL_OK; + } + + } while (I2C_Trials < Trials); + + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Sequential transmit in master I2C mode an amount of data in non-blocking mode with Interrupt. + * @note This interface allow to manage repeated start condition when a direction change during transfer + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param XferOptions Options of Transfer, value of @ref I2C_XFEROPTIONS + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Seq_Transmit_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t XferOptions) +{ + uint32_t xfermode; + uint32_t xferrequest = I2C_GENERATE_START_WRITE; + uint32_t sizetoxfer = 0U; + + /* Check the parameters */ + assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XferOptions)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = XferOptions; + hi2c->XferISR = I2C_Master_ISR_IT; + + /* If hi2c->XferCount > MAX_NBYTE_SIZE, use reload mode */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = hi2c->XferOptions; + } + + if ((hi2c->XferSize > 0U) && ((XferOptions == I2C_FIRST_FRAME) || \ + (XferOptions == I2C_FIRST_AND_LAST_FRAME))) + { + /* Preload TX register */ + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + sizetoxfer = hi2c->XferSize; + hi2c->XferCount--; + hi2c->XferSize--; + } + + /* If transfer direction not change and there is no request to start another frame, + do not generate Restart Condition */ + /* Mean Previous state is same as current state */ + if ((hi2c->PreviousState == I2C_STATE_MASTER_BUSY_TX) && \ + (IS_I2C_TRANSFER_OTHER_OPTIONS_REQUEST(XferOptions) == 0)) + { + xferrequest = I2C_NO_STARTSTOP; + } + else + { + /* Convert OTHER_xxx XferOptions if any */ + I2C_ConvertOtherXferOptions(hi2c); + + /* Update xfermode accordingly if no reload is necessary */ + if (hi2c->XferCount <= MAX_NBYTE_SIZE) + { + xfermode = hi2c->XferOptions; + } + } + + /* Send Slave Address and set NBYTES to write */ + if ((XferOptions == I2C_FIRST_FRAME) || (XferOptions == I2C_FIRST_AND_LAST_FRAME)) + { + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)sizetoxfer, xfermode, xferrequest); + } + else + { + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, xferrequest); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +#if defined(HAL_DMA_MODULE_ENABLED) +/** + * @brief Sequential transmit in master I2C mode an amount of data in non-blocking mode with DMA. + * @note This interface allow to manage repeated start condition when a direction change during transfer + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param XferOptions Options of Transfer, value of @ref I2C_XFEROPTIONS + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Seq_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t XferOptions) +{ + uint32_t xfermode; + uint32_t xferrequest = I2C_GENERATE_START_WRITE; + HAL_StatusTypeDef dmaxferstatus; + uint32_t sizetoxfer = 0U; + + /* Check the parameters */ + assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XferOptions)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_TX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = XferOptions; + hi2c->XferISR = I2C_Master_ISR_DMA; + + /* If hi2c->XferCount > MAX_NBYTE_SIZE, use reload mode */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = hi2c->XferOptions; + } + + if ((hi2c->XferSize > 0U) && ((XferOptions == I2C_FIRST_FRAME) || \ + (XferOptions == I2C_FIRST_AND_LAST_FRAME))) + { + /* Preload TX register */ + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + sizetoxfer = hi2c->XferSize; + hi2c->XferCount--; + hi2c->XferSize--; + } + + /* If transfer direction not change and there is no request to start another frame, + do not generate Restart Condition */ + /* Mean Previous state is same as current state */ + if ((hi2c->PreviousState == I2C_STATE_MASTER_BUSY_TX) && \ + (IS_I2C_TRANSFER_OTHER_OPTIONS_REQUEST(XferOptions) == 0)) + { + xferrequest = I2C_NO_STARTSTOP; + } + else + { + /* Convert OTHER_xxx XferOptions if any */ + I2C_ConvertOtherXferOptions(hi2c); + + /* Update xfermode accordingly if no reload is necessary */ + if (hi2c->XferCount <= MAX_NBYTE_SIZE) + { + xfermode = hi2c->XferOptions; + } + } + + if (hi2c->XferSize > 0U) + { + if (hi2c->hdmatx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmatx->XferCpltCallback = I2C_DMAMasterTransmitCplt; + + /* Set the DMA error callback */ + hi2c->hdmatx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmatx->XferHalfCpltCallback = NULL; + hi2c->hdmatx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmatx, (uint32_t)hi2c->pBuffPtr, + (uint32_t)&hi2c->Instance->TXDR, hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Send Slave Address and set NBYTES to write */ + if ((XferOptions == I2C_FIRST_FRAME) || (XferOptions == I2C_FIRST_AND_LAST_FRAME)) + { + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)sizetoxfer, xfermode, xferrequest); + } + else + { + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, xferrequest); + } + + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR and NACK interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_ERROR_IT); + + /* Enable DMA Request */ + hi2c->Instance->CR1 |= I2C_CR1_TXDMAEN; + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + } + else + { + /* Update Transfer ISR function pointer */ + hi2c->XferISR = I2C_Master_ISR_IT; + + /* Send Slave Address */ + /* Set NBYTES to write and generate START condition */ + if ((XferOptions == I2C_FIRST_FRAME) || (XferOptions == I2C_FIRST_AND_LAST_FRAME)) + { + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)sizetoxfer, xfermode, xferrequest); + } + else + { + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, xferrequest); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, TC, STOP, NACK, TXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT); + } + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} +#endif /* HAL_DMA_MODULE_ENABLED */ + +/** + * @brief Sequential receive in master I2C mode an amount of data in non-blocking mode with Interrupt + * @note This interface allow to manage repeated start condition when a direction change during transfer + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param XferOptions Options of Transfer, value of @ref I2C_XFEROPTIONS + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Seq_Receive_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t XferOptions) +{ + uint32_t xfermode; + uint32_t xferrequest = I2C_GENERATE_START_READ; + + /* Check the parameters */ + assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XferOptions)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = XferOptions; + hi2c->XferISR = I2C_Master_ISR_IT; + + /* If hi2c->XferCount > MAX_NBYTE_SIZE, use reload mode */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = hi2c->XferOptions; + } + + /* If transfer direction not change and there is no request to start another frame, + do not generate Restart Condition */ + /* Mean Previous state is same as current state */ + if ((hi2c->PreviousState == I2C_STATE_MASTER_BUSY_RX) && \ + (IS_I2C_TRANSFER_OTHER_OPTIONS_REQUEST(XferOptions) == 0)) + { + xferrequest = I2C_NO_STARTSTOP; + } + else + { + /* Convert OTHER_xxx XferOptions if any */ + I2C_ConvertOtherXferOptions(hi2c); + + /* Update xfermode accordingly if no reload is necessary */ + if (hi2c->XferCount <= MAX_NBYTE_SIZE) + { + xfermode = hi2c->XferOptions; + } + } + + /* Send Slave Address and set NBYTES to read */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, xferrequest); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RX_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +#if defined(HAL_DMA_MODULE_ENABLED) +/** + * @brief Sequential receive in master I2C mode an amount of data in non-blocking mode with DMA + * @note This interface allow to manage repeated start condition when a direction change during transfer + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param XferOptions Options of Transfer, value of @ref I2C_XFEROPTIONS + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Seq_Receive_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, + uint16_t Size, uint32_t XferOptions) +{ + uint32_t xfermode; + uint32_t xferrequest = I2C_GENERATE_START_READ; + HAL_StatusTypeDef dmaxferstatus; + + /* Check the parameters */ + assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XferOptions)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY_RX; + hi2c->Mode = HAL_I2C_MODE_MASTER; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferOptions = XferOptions; + hi2c->XferISR = I2C_Master_ISR_DMA; + + /* If hi2c->XferCount > MAX_NBYTE_SIZE, use reload mode */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + xfermode = hi2c->XferOptions; + } + + /* If transfer direction not change and there is no request to start another frame, + do not generate Restart Condition */ + /* Mean Previous state is same as current state */ + if ((hi2c->PreviousState == I2C_STATE_MASTER_BUSY_RX) && \ + (IS_I2C_TRANSFER_OTHER_OPTIONS_REQUEST(XferOptions) == 0)) + { + xferrequest = I2C_NO_STARTSTOP; + } + else + { + /* Convert OTHER_xxx XferOptions if any */ + I2C_ConvertOtherXferOptions(hi2c); + + /* Update xfermode accordingly if no reload is necessary */ + if (hi2c->XferCount <= MAX_NBYTE_SIZE) + { + xfermode = hi2c->XferOptions; + } + } + + if (hi2c->XferSize > 0U) + { + if (hi2c->hdmarx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmarx->XferCpltCallback = I2C_DMAMasterReceiveCplt; + + /* Set the DMA error callback */ + hi2c->hdmarx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmarx->XferHalfCpltCallback = NULL; + hi2c->hdmarx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmarx, (uint32_t)&hi2c->Instance->RXDR, (uint32_t)pData, + hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Send Slave Address and set NBYTES to read */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, xfermode, xferrequest); + + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR and NACK interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_ERROR_IT); + + /* Enable DMA Request */ + hi2c->Instance->CR1 |= I2C_CR1_RXDMAEN; + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + } + else + { + /* Update Transfer ISR function pointer */ + hi2c->XferISR = I2C_Master_ISR_IT; + + /* Send Slave Address */ + /* Set NBYTES to read and generate START condition */ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)hi2c->XferSize, I2C_AUTOEND_MODE, + I2C_GENERATE_START_READ); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, TC, STOP, NACK, RXI interrupt */ + /* possible to enable all of these */ + /* I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | + I2C_IT_ADDRI | I2C_IT_RXI | I2C_IT_TXI */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RX_IT); + } + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} +#endif /* HAL_DMA_MODULE_ENABLED */ + +/** + * @brief Sequential transmit in slave/device I2C mode an amount of data in non-blocking mode with Interrupt + * @note This interface allow to manage repeated start condition when a direction change during transfer + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param XferOptions Options of Transfer, value of @ref I2C_XFEROPTIONS + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Seq_Transmit_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t XferOptions) +{ + /* Declaration of tmp to prevent undefined behavior of volatile usage */ + FlagStatus tmp; + + /* Check the parameters */ + assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XferOptions)); + + if (((uint32_t)hi2c->State & (uint32_t)HAL_I2C_STATE_LISTEN) == (uint32_t)HAL_I2C_STATE_LISTEN) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + /* Disable Interrupts, to prevent preemption during treatment in case of multicall */ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_TX_IT); + + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* I2C cannot manage full duplex exchange so disable previous IT enabled if any */ + /* and then toggle the HAL slave RX state to TX state */ + if (hi2c->State == HAL_I2C_STATE_BUSY_RX_LISTEN) + { + /* Disable associated Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_RX_IT); + +#if defined(HAL_DMA_MODULE_ENABLED) + /* Abort DMA Xfer if any */ + if ((hi2c->Instance->CR1 & I2C_CR1_RXDMAEN) == I2C_CR1_RXDMAEN) + { + hi2c->Instance->CR1 &= ~I2C_CR1_RXDMAEN; + + if (hi2c->hdmarx != NULL) + { + /* Set the I2C DMA Abort callback : + will lead to call HAL_I2C_ErrorCallback() at end of DMA abort procedure */ + hi2c->hdmarx->XferAbortCallback = I2C_DMAAbort; + + /* Abort DMA RX */ + if (HAL_DMA_Abort_IT(hi2c->hdmarx) != HAL_OK) + { + /* Call Directly XferAbortCallback function in case of error */ + hi2c->hdmarx->XferAbortCallback(hi2c->hdmarx); + } + } + } +#endif /* HAL_DMA_MODULE_ENABLED */ + } + + hi2c->State = HAL_I2C_STATE_BUSY_TX_LISTEN; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferOptions = XferOptions; + hi2c->XferISR = I2C_Slave_ISR_IT; + + tmp = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_ADDR); + if ((I2C_GET_DIR(hi2c) == I2C_DIRECTION_RECEIVE) && (tmp != RESET)) + { + /* Clear ADDR flag after prepare the transfer parameters */ + /* This action will generate an acknowledge to the Master */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* REnable ADDR interrupt */ + I2C_Enable_IRQ(hi2c, I2C_XFER_TX_IT | I2C_XFER_LISTEN_IT); + + return HAL_OK; + } + else + { + return HAL_ERROR; + } +} + +#if defined(HAL_DMA_MODULE_ENABLED) +/** + * @brief Sequential transmit in slave/device I2C mode an amount of data in non-blocking mode with DMA + * @note This interface allow to manage repeated start condition when a direction change during transfer + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param XferOptions Options of Transfer, value of @ref I2C_XFEROPTIONS + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Seq_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t XferOptions) +{ + /* Declaration of tmp to prevent undefined behavior of volatile usage */ + FlagStatus tmp; + HAL_StatusTypeDef dmaxferstatus; + + /* Check the parameters */ + assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XferOptions)); + + if (((uint32_t)hi2c->State & (uint32_t)HAL_I2C_STATE_LISTEN) == (uint32_t)HAL_I2C_STATE_LISTEN) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* Disable Interrupts, to prevent preemption during treatment in case of multicall */ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_TX_IT); + + /* I2C cannot manage full duplex exchange so disable previous IT enabled if any */ + /* and then toggle the HAL slave RX state to TX state */ + if (hi2c->State == HAL_I2C_STATE_BUSY_RX_LISTEN) + { + /* Disable associated Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_RX_IT); + + if ((hi2c->Instance->CR1 & I2C_CR1_RXDMAEN) == I2C_CR1_RXDMAEN) + { + /* Abort DMA Xfer if any */ + if (hi2c->hdmarx != NULL) + { + hi2c->Instance->CR1 &= ~I2C_CR1_RXDMAEN; + + /* Set the I2C DMA Abort callback : + will lead to call HAL_I2C_ErrorCallback() at end of DMA abort procedure */ + hi2c->hdmarx->XferAbortCallback = I2C_DMAAbort; + + /* Abort DMA RX */ + if (HAL_DMA_Abort_IT(hi2c->hdmarx) != HAL_OK) + { + /* Call Directly XferAbortCallback function in case of error */ + hi2c->hdmarx->XferAbortCallback(hi2c->hdmarx); + } + } + } + } + else if (hi2c->State == HAL_I2C_STATE_BUSY_TX_LISTEN) + { + if ((hi2c->Instance->CR1 & I2C_CR1_TXDMAEN) == I2C_CR1_TXDMAEN) + { + hi2c->Instance->CR1 &= ~I2C_CR1_TXDMAEN; + + /* Abort DMA Xfer if any */ + if (hi2c->hdmatx != NULL) + { + /* Set the I2C DMA Abort callback : + will lead to call HAL_I2C_ErrorCallback() at end of DMA abort procedure */ + hi2c->hdmatx->XferAbortCallback = I2C_DMAAbort; + + /* Abort DMA TX */ + if (HAL_DMA_Abort_IT(hi2c->hdmatx) != HAL_OK) + { + /* Call Directly XferAbortCallback function in case of error */ + hi2c->hdmatx->XferAbortCallback(hi2c->hdmatx); + } + } + } + } + else + { + /* Nothing to do */ + } + + hi2c->State = HAL_I2C_STATE_BUSY_TX_LISTEN; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferOptions = XferOptions; + hi2c->XferISR = I2C_Slave_ISR_DMA; + + if (hi2c->hdmatx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmatx->XferCpltCallback = I2C_DMASlaveTransmitCplt; + + /* Set the DMA error callback */ + hi2c->hdmatx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmatx->XferHalfCpltCallback = NULL; + hi2c->hdmatx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmatx, (uint32_t)pData, (uint32_t)&hi2c->Instance->TXDR, + hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Reset XferSize */ + hi2c->XferSize = 0; + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + tmp = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_ADDR); + if ((I2C_GET_DIR(hi2c) == I2C_DIRECTION_RECEIVE) && (tmp != RESET)) + { + /* Clear ADDR flag after prepare the transfer parameters */ + /* This action will generate an acknowledge to the Master */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Enable DMA Request */ + hi2c->Instance->CR1 |= I2C_CR1_TXDMAEN; + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* Enable ERR, STOP, NACK, ADDR interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_LISTEN_IT); + + return HAL_OK; + } + else + { + return HAL_ERROR; + } +} +#endif /* HAL_DMA_MODULE_ENABLED */ + +/** + * @brief Sequential receive in slave/device I2C mode an amount of data in non-blocking mode with Interrupt + * @note This interface allow to manage repeated start condition when a direction change during transfer + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param XferOptions Options of Transfer, value of @ref I2C_XFEROPTIONS + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Seq_Receive_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t XferOptions) +{ + /* Declaration of tmp to prevent undefined behavior of volatile usage */ + FlagStatus tmp; + + /* Check the parameters */ + assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XferOptions)); + + if (((uint32_t)hi2c->State & (uint32_t)HAL_I2C_STATE_LISTEN) == (uint32_t)HAL_I2C_STATE_LISTEN) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + /* Disable Interrupts, to prevent preemption during treatment in case of multicall */ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_RX_IT); + + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* I2C cannot manage full duplex exchange so disable previous IT enabled if any */ + /* and then toggle the HAL slave TX state to RX state */ + if (hi2c->State == HAL_I2C_STATE_BUSY_TX_LISTEN) + { + /* Disable associated Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + +#if defined(HAL_DMA_MODULE_ENABLED) + if ((hi2c->Instance->CR1 & I2C_CR1_TXDMAEN) == I2C_CR1_TXDMAEN) + { + hi2c->Instance->CR1 &= ~I2C_CR1_TXDMAEN; + + /* Abort DMA Xfer if any */ + if (hi2c->hdmatx != NULL) + { + /* Set the I2C DMA Abort callback : + will lead to call HAL_I2C_ErrorCallback() at end of DMA abort procedure */ + hi2c->hdmatx->XferAbortCallback = I2C_DMAAbort; + + /* Abort DMA TX */ + if (HAL_DMA_Abort_IT(hi2c->hdmatx) != HAL_OK) + { + /* Call Directly XferAbortCallback function in case of error */ + hi2c->hdmatx->XferAbortCallback(hi2c->hdmatx); + } + } + } +#endif /* HAL_DMA_MODULE_ENABLED */ + } + + hi2c->State = HAL_I2C_STATE_BUSY_RX_LISTEN; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferOptions = XferOptions; + hi2c->XferISR = I2C_Slave_ISR_IT; + + tmp = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_ADDR); + if ((I2C_GET_DIR(hi2c) == I2C_DIRECTION_TRANSMIT) && (tmp != RESET)) + { + /* Clear ADDR flag after prepare the transfer parameters */ + /* This action will generate an acknowledge to the Master */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* REnable ADDR interrupt */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RX_IT | I2C_XFER_LISTEN_IT); + + return HAL_OK; + } + else + { + return HAL_ERROR; + } +} + +#if defined(HAL_DMA_MODULE_ENABLED) +/** + * @brief Sequential receive in slave/device I2C mode an amount of data in non-blocking mode with DMA + * @note This interface allow to manage repeated start condition when a direction change during transfer + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param pData Pointer to data buffer + * @param Size Amount of data to be sent + * @param XferOptions Options of Transfer, value of @ref I2C_XFEROPTIONS + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Slave_Seq_Receive_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, + uint32_t XferOptions) +{ + /* Declaration of tmp to prevent undefined behavior of volatile usage */ + FlagStatus tmp; + HAL_StatusTypeDef dmaxferstatus; + + /* Check the parameters */ + assert_param(IS_I2C_TRANSFER_OPTIONS_REQUEST(XferOptions)); + + if (((uint32_t)hi2c->State & (uint32_t)HAL_I2C_STATE_LISTEN) == (uint32_t)HAL_I2C_STATE_LISTEN) + { + if ((pData == NULL) || (Size == 0U)) + { + hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; + return HAL_ERROR; + } + + /* Disable Interrupts, to prevent preemption during treatment in case of multicall */ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_RX_IT); + + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* I2C cannot manage full duplex exchange so disable previous IT enabled if any */ + /* and then toggle the HAL slave TX state to RX state */ + if (hi2c->State == HAL_I2C_STATE_BUSY_TX_LISTEN) + { + /* Disable associated Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + + if ((hi2c->Instance->CR1 & I2C_CR1_TXDMAEN) == I2C_CR1_TXDMAEN) + { + /* Abort DMA Xfer if any */ + if (hi2c->hdmatx != NULL) + { + hi2c->Instance->CR1 &= ~I2C_CR1_TXDMAEN; + + /* Set the I2C DMA Abort callback : + will lead to call HAL_I2C_ErrorCallback() at end of DMA abort procedure */ + hi2c->hdmatx->XferAbortCallback = I2C_DMAAbort; + + /* Abort DMA TX */ + if (HAL_DMA_Abort_IT(hi2c->hdmatx) != HAL_OK) + { + /* Call Directly XferAbortCallback function in case of error */ + hi2c->hdmatx->XferAbortCallback(hi2c->hdmatx); + } + } + } + } + else if (hi2c->State == HAL_I2C_STATE_BUSY_RX_LISTEN) + { + if ((hi2c->Instance->CR1 & I2C_CR1_RXDMAEN) == I2C_CR1_RXDMAEN) + { + hi2c->Instance->CR1 &= ~I2C_CR1_RXDMAEN; + + /* Abort DMA Xfer if any */ + if (hi2c->hdmarx != NULL) + { + /* Set the I2C DMA Abort callback : + will lead to call HAL_I2C_ErrorCallback() at end of DMA abort procedure */ + hi2c->hdmarx->XferAbortCallback = I2C_DMAAbort; + + /* Abort DMA RX */ + if (HAL_DMA_Abort_IT(hi2c->hdmarx) != HAL_OK) + { + /* Call Directly XferAbortCallback function in case of error */ + hi2c->hdmarx->XferAbortCallback(hi2c->hdmarx); + } + } + } + } + else + { + /* Nothing to do */ + } + + hi2c->State = HAL_I2C_STATE_BUSY_RX_LISTEN; + hi2c->Mode = HAL_I2C_MODE_SLAVE; + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + + /* Enable Address Acknowledge */ + hi2c->Instance->CR2 &= ~I2C_CR2_NACK; + + /* Prepare transfer parameters */ + hi2c->pBuffPtr = pData; + hi2c->XferCount = Size; + hi2c->XferSize = hi2c->XferCount; + hi2c->XferOptions = XferOptions; + hi2c->XferISR = I2C_Slave_ISR_DMA; + + if (hi2c->hdmarx != NULL) + { + /* Set the I2C DMA transfer complete callback */ + hi2c->hdmarx->XferCpltCallback = I2C_DMASlaveReceiveCplt; + + /* Set the DMA error callback */ + hi2c->hdmarx->XferErrorCallback = I2C_DMAError; + + /* Set the unused DMA callbacks to NULL */ + hi2c->hdmarx->XferHalfCpltCallback = NULL; + hi2c->hdmarx->XferAbortCallback = NULL; + + /* Enable the DMA channel */ + dmaxferstatus = HAL_DMA_Start_IT(hi2c->hdmarx, (uint32_t)&hi2c->Instance->RXDR, + (uint32_t)pData, hi2c->XferSize); + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA_PARAM; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + if (dmaxferstatus == HAL_OK) + { + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Reset XferSize */ + hi2c->XferSize = 0; + } + else + { + /* Update I2C state */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Update I2C error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_DMA; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + + tmp = __HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_ADDR); + if ((I2C_GET_DIR(hi2c) == I2C_DIRECTION_TRANSMIT) && (tmp != RESET)) + { + /* Clear ADDR flag after prepare the transfer parameters */ + /* This action will generate an acknowledge to the Master */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Enable DMA Request */ + hi2c->Instance->CR1 |= I2C_CR1_RXDMAEN; + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + /* REnable ADDR interrupt */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RX_IT | I2C_XFER_LISTEN_IT); + + return HAL_OK; + } + else + { + return HAL_ERROR; + } +} +#endif /* HAL_DMA_MODULE_ENABLED */ + +/** + * @brief Enable the Address listen mode with Interrupt. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_EnableListen_IT(I2C_HandleTypeDef *hi2c) +{ + if (hi2c->State == HAL_I2C_STATE_READY) + { + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->XferISR = I2C_Slave_ISR_IT; + + /* Enable the Address Match interrupt */ + I2C_Enable_IRQ(hi2c, I2C_XFER_LISTEN_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Disable the Address listen mode with Interrupt. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_DisableListen_IT(I2C_HandleTypeDef *hi2c) +{ + /* Declaration of tmp to prevent undefined behavior of volatile usage */ + uint32_t tmp; + + /* Disable Address listen mode only if a transfer is not ongoing */ + if (hi2c->State == HAL_I2C_STATE_LISTEN) + { + tmp = (uint32_t)(hi2c->State) & I2C_STATE_MSK; + hi2c->PreviousState = tmp | (uint32_t)(hi2c->Mode); + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + hi2c->XferISR = NULL; + + /* Disable the Address Match interrupt */ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Abort a master or memory I2C IT or DMA process communication with Interrupt. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2C_Master_Abort_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress) +{ + HAL_I2C_ModeTypeDef tmp_mode = hi2c->Mode; + + if ((tmp_mode == HAL_I2C_MODE_MASTER) || (tmp_mode == HAL_I2C_MODE_MEM)) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + /* Disable Interrupts and Store Previous state */ + if (hi2c->State == HAL_I2C_STATE_BUSY_TX) + { + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + hi2c->PreviousState = I2C_STATE_MASTER_BUSY_TX; + } + else if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + I2C_Disable_IRQ(hi2c, I2C_XFER_RX_IT); + hi2c->PreviousState = I2C_STATE_MASTER_BUSY_RX; + } + else + { + /* Do nothing */ + } + + /* Set State at HAL_I2C_STATE_ABORT */ + hi2c->State = HAL_I2C_STATE_ABORT; + + /* Set NBYTES to 1 to generate a dummy read on I2C peripheral */ + /* Set AUTOEND mode, this will generate a NACK then STOP condition to abort the current transfer */ + I2C_TransferConfig(hi2c, DevAddress, 1, I2C_AUTOEND_MODE, I2C_GENERATE_STOP); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Note : The I2C interrupts must be enabled after unlocking current process + to avoid the risk of I2C interrupt handle execution before current + process unlock */ + I2C_Enable_IRQ(hi2c, I2C_XFER_CPLT_IT); + + return HAL_OK; + } + else + { + /* Wrong usage of abort function */ + /* This function should be used only in case of abort monitored by master device */ + return HAL_ERROR; + } +} + +/** + * @} + */ + +/** @defgroup I2C_IRQ_Handler_and_Callbacks IRQ Handler and Callbacks + * @{ + */ + +/** + * @brief This function handles I2C event interrupt request. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c) /* Derogation MISRAC2012-Rule-8.13 */ +{ + /* Get current IT Flags and IT sources value */ + uint32_t itflags = READ_REG(hi2c->Instance->ISR); + uint32_t itsources = READ_REG(hi2c->Instance->CR1); + + /* I2C events treatment -------------------------------------*/ + if (hi2c->XferISR != NULL) + { + hi2c->XferISR(hi2c, itflags, itsources); + } +} + +/** + * @brief This function handles I2C error interrupt request. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +void HAL_I2C_ER_IRQHandler(I2C_HandleTypeDef *hi2c) +{ + uint32_t itflags = READ_REG(hi2c->Instance->ISR); + uint32_t itsources = READ_REG(hi2c->Instance->CR1); + uint32_t tmperror; + + /* I2C Bus error interrupt occurred ------------------------------------*/ + if ((I2C_CHECK_FLAG(itflags, I2C_FLAG_BERR) != RESET) && \ + (I2C_CHECK_IT_SOURCE(itsources, I2C_IT_ERRI) != RESET)) + { + hi2c->ErrorCode |= HAL_I2C_ERROR_BERR; + + /* Clear BERR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_BERR); + } + + /* I2C Over-Run/Under-Run interrupt occurred ----------------------------------------*/ + if ((I2C_CHECK_FLAG(itflags, I2C_FLAG_OVR) != RESET) && \ + (I2C_CHECK_IT_SOURCE(itsources, I2C_IT_ERRI) != RESET)) + { + hi2c->ErrorCode |= HAL_I2C_ERROR_OVR; + + /* Clear OVR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_OVR); + } + + /* I2C Arbitration Loss error interrupt occurred -------------------------------------*/ + if ((I2C_CHECK_FLAG(itflags, I2C_FLAG_ARLO) != RESET) && \ + (I2C_CHECK_IT_SOURCE(itsources, I2C_IT_ERRI) != RESET)) + { + hi2c->ErrorCode |= HAL_I2C_ERROR_ARLO; + + /* Clear ARLO flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ARLO); + } + + /* Store current volatile hi2c->ErrorCode, misra rule */ + tmperror = hi2c->ErrorCode; + + /* Call the Error Callback in case of Error detected */ + if ((tmperror & (HAL_I2C_ERROR_BERR | HAL_I2C_ERROR_OVR | HAL_I2C_ERROR_ARLO)) != HAL_I2C_ERROR_NONE) + { + I2C_ITError(hi2c, tmperror); + } +} + +/** + * @brief Master Tx Transfer completed callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_MasterTxCpltCallback could be implemented in the user file + */ +} + +/** + * @brief Master Rx Transfer completed callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_MasterRxCpltCallback could be implemented in the user file + */ +} + +/** @brief Slave Tx Transfer completed callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_SlaveTxCpltCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_SlaveTxCpltCallback could be implemented in the user file + */ +} + +/** + * @brief Slave Rx Transfer completed callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_SlaveRxCpltCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_SlaveRxCpltCallback could be implemented in the user file + */ +} + +/** + * @brief Slave Address Match callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param TransferDirection Master request Transfer Direction (Write/Read), value of @ref I2C_XFERDIRECTION + * @param AddrMatchCode Address Match Code + * @retval None + */ +__weak void HAL_I2C_AddrCallback(I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + UNUSED(TransferDirection); + UNUSED(AddrMatchCode); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_AddrCallback() could be implemented in the user file + */ +} + +/** + * @brief Listen Complete callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_ListenCpltCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_ListenCpltCallback() could be implemented in the user file + */ +} + +/** + * @brief Memory Tx Transfer completed callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_MemTxCpltCallback could be implemented in the user file + */ +} + +/** + * @brief Memory Rx Transfer completed callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_MemRxCpltCallback could be implemented in the user file + */ +} + +/** + * @brief I2C error callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_ErrorCallback could be implemented in the user file + */ +} + +/** + * @brief I2C abort callback. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval None + */ +__weak void HAL_I2C_AbortCpltCallback(I2C_HandleTypeDef *hi2c) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hi2c); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_I2C_AbortCpltCallback could be implemented in the user file + */ +} + +/** + * @} + */ + +/** @defgroup I2C_Exported_Functions_Group3 Peripheral State, Mode and Error functions + * @brief Peripheral State, Mode and Error functions + * +@verbatim + =============================================================================== + ##### Peripheral State, Mode and Error functions ##### + =============================================================================== + [..] + This subsection permit to get in run-time the status of the peripheral + and the data flow. + +@endverbatim + * @{ + */ + +/** + * @brief Return the I2C handle state. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval HAL state + */ +HAL_I2C_StateTypeDef HAL_I2C_GetState(const I2C_HandleTypeDef *hi2c) +{ + /* Return I2C handle state */ + return hi2c->State; +} + +/** + * @brief Returns the I2C Master, Slave, Memory or no mode. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for I2C module + * @retval HAL mode + */ +HAL_I2C_ModeTypeDef HAL_I2C_GetMode(const I2C_HandleTypeDef *hi2c) +{ + return hi2c->Mode; +} + +/** + * @brief Return the I2C error code. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @retval I2C Error Code + */ +uint32_t HAL_I2C_GetError(const I2C_HandleTypeDef *hi2c) +{ + return hi2c->ErrorCode; +} + +/** + * @} + */ + +/** + * @} + */ + +/** @addtogroup I2C_Private_Functions + * @{ + */ + +/** + * @brief Interrupt Sub-Routine which handle the Interrupt Flags Master Mode with Interrupt. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param ITFlags Interrupt flags to handle. + * @param ITSources Interrupt sources enabled. + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_Master_ISR_IT(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources) +{ + uint16_t devaddress; + uint32_t tmpITFlags = ITFlags; + + /* Process Locked */ + __HAL_LOCK(hi2c); + + if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_AF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_NACKI) != RESET)) + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Set corresponding Error Code */ + /* No need to generate STOP, it is automatically done */ + /* Error callback will be send during stop flag treatment */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_RXNE) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_RXI) != RESET)) + { + /* Remove RXNE flag on temporary variable as read done */ + tmpITFlags &= ~I2C_FLAG_RXNE; + + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferSize--; + hi2c->XferCount--; + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_TC) == RESET) && \ + ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_TXIS) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TXI) != RESET))) + { + /* Write data to TXDR */ + if (hi2c->XferCount != 0U) + { + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferSize--; + hi2c->XferCount--; + } + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_TCR) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TCI) != RESET)) + { + if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U)) + { + devaddress = (uint16_t)(hi2c->Instance->CR2 & I2C_CR2_SADD); + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, devaddress, (uint8_t)hi2c->XferSize, I2C_RELOAD_MODE, I2C_NO_STARTSTOP); + } + else + { + hi2c->XferSize = hi2c->XferCount; + if (hi2c->XferOptions != I2C_NO_OPTION_FRAME) + { + I2C_TransferConfig(hi2c, devaddress, (uint8_t)hi2c->XferSize, + hi2c->XferOptions, I2C_NO_STARTSTOP); + } + else + { + I2C_TransferConfig(hi2c, devaddress, (uint8_t)hi2c->XferSize, + I2C_AUTOEND_MODE, I2C_NO_STARTSTOP); + } + } + } + else + { + /* Call TxCpltCallback() if no stop mode is set */ + if (I2C_GET_STOP_MODE(hi2c) != I2C_AUTOEND_MODE) + { + /* Call I2C Master Sequential complete process */ + I2C_ITMasterSeqCplt(hi2c); + } + else + { + /* Wrong size Status regarding TCR flag event */ + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_SIZE); + } + } + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_TC) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TCI) != RESET)) + { + if (hi2c->XferCount == 0U) + { + if (I2C_GET_STOP_MODE(hi2c) != I2C_AUTOEND_MODE) + { + /* Generate a stop condition in case of no transfer option */ + if (hi2c->XferOptions == I2C_NO_OPTION_FRAME) + { + /* Generate Stop */ + hi2c->Instance->CR2 |= I2C_CR2_STOP; + } + else + { + /* Call I2C Master Sequential complete process */ + I2C_ITMasterSeqCplt(hi2c); + } + } + } + else + { + /* Wrong size Status regarding TC flag event */ + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_SIZE); + } + } + else + { + /* Nothing to do */ + } + + if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_STOPF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_STOPI) != RESET)) + { + /* Call I2C Master complete process */ + I2C_ITMasterCplt(hi2c, tmpITFlags); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; +} + +/** + * @brief Interrupt Sub-Routine which handle the Interrupt Flags Memory Mode with Interrupt. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param ITFlags Interrupt flags to handle. + * @param ITSources Interrupt sources enabled. + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_Mem_ISR_IT(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources) +{ + uint32_t direction = I2C_GENERATE_START_WRITE; + uint32_t tmpITFlags = ITFlags; + + /* Process Locked */ + __HAL_LOCK(hi2c); + + if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_AF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_NACKI) != RESET)) + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Set corresponding Error Code */ + /* No need to generate STOP, it is automatically done */ + /* Error callback will be send during stop flag treatment */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_RXNE) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_RXI) != RESET)) + { + /* Remove RXNE flag on temporary variable as read done */ + tmpITFlags &= ~I2C_FLAG_RXNE; + + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferSize--; + hi2c->XferCount--; + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_TXIS) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TXI) != RESET)) + { + if (hi2c->Memaddress == 0xFFFFFFFFU) + { + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferSize--; + hi2c->XferCount--; + } + else + { + /* Write LSB part of Memory Address */ + hi2c->Instance->TXDR = hi2c->Memaddress; + + /* Reset Memaddress content */ + hi2c->Memaddress = 0xFFFFFFFFU; + } + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_TCR) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TCI) != RESET)) + { + if ((hi2c->XferCount != 0U) && (hi2c->XferSize == 0U)) + { + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, (uint16_t)hi2c->Devaddress, (uint8_t)hi2c->XferSize, + I2C_RELOAD_MODE, I2C_NO_STARTSTOP); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, (uint16_t)hi2c->Devaddress, (uint8_t)hi2c->XferSize, + I2C_AUTOEND_MODE, I2C_NO_STARTSTOP); + } + } + else + { + /* Wrong size Status regarding TCR flag event */ + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_SIZE); + } + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_TC) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TCI) != RESET)) + { + /* Disable Interrupt related to address step */ + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + + /* Enable ERR, TC, STOP, NACK and RXI interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RX_IT); + + if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + direction = I2C_GENERATE_START_READ; + } + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */ + I2C_TransferConfig(hi2c, (uint16_t)hi2c->Devaddress, (uint8_t)hi2c->XferSize, + I2C_RELOAD_MODE, direction); + } + else + { + hi2c->XferSize = hi2c->XferCount; + + /* Set NBYTES to write and generate RESTART */ + I2C_TransferConfig(hi2c, (uint16_t)hi2c->Devaddress, (uint8_t)hi2c->XferSize, + I2C_AUTOEND_MODE, direction); + } + } + else + { + /* Nothing to do */ + } + + if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_STOPF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_STOPI) != RESET)) + { + /* Call I2C Master complete process */ + I2C_ITMasterCplt(hi2c, tmpITFlags); + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; +} + +/** + * @brief Interrupt Sub-Routine which handle the Interrupt Flags Slave Mode with Interrupt. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param ITFlags Interrupt flags to handle. + * @param ITSources Interrupt sources enabled. + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_Slave_ISR_IT(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources) +{ + uint32_t tmpoptions = hi2c->XferOptions; + uint32_t tmpITFlags = ITFlags; + + /* Process locked */ + __HAL_LOCK(hi2c); + + /* Check if STOPF is set */ + if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_STOPF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_STOPI) != RESET)) + { + /* Call I2C Slave complete process */ + I2C_ITSlaveCplt(hi2c, tmpITFlags); + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_AF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_NACKI) != RESET)) + { + /* Check that I2C transfer finished */ + /* if yes, normal use case, a NACK is sent by the MASTER when Transfer is finished */ + /* Mean XferCount == 0*/ + /* So clear Flag NACKF only */ + if (hi2c->XferCount == 0U) + { + if ((hi2c->State == HAL_I2C_STATE_LISTEN) && (tmpoptions == I2C_FIRST_AND_LAST_FRAME)) + /* Same action must be done for (tmpoptions == I2C_LAST_FRAME) which removed for + Warning[Pa134]: left and right operands are identical */ + { + /* Call I2C Listen complete process */ + I2C_ITListenCplt(hi2c, tmpITFlags); + } + else if ((hi2c->State == HAL_I2C_STATE_BUSY_TX_LISTEN) && (tmpoptions != I2C_NO_OPTION_FRAME)) + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + /* Last Byte is Transmitted */ + /* Call I2C Slave Sequential complete process */ + I2C_ITSlaveSeqCplt(hi2c); + } + else + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + } + } + else + { + /* if no, error use case, a Non-Acknowledge of last Data is generated by the MASTER*/ + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Set ErrorCode corresponding to a Non-Acknowledge */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + + if ((tmpoptions == I2C_FIRST_FRAME) || (tmpoptions == I2C_NEXT_FRAME)) + { + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, hi2c->ErrorCode); + } + } + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_RXNE) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_RXI) != RESET)) + { + if (hi2c->XferCount > 0U) + { + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferSize--; + hi2c->XferCount--; + } + + if ((hi2c->XferCount == 0U) && \ + (tmpoptions != I2C_NO_OPTION_FRAME)) + { + /* Call I2C Slave Sequential complete process */ + I2C_ITSlaveSeqCplt(hi2c); + } + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_ADDR) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_ADDRI) != RESET)) + { + I2C_ITAddrCplt(hi2c, tmpITFlags); + } + else if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_TXIS) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TXI) != RESET)) + { + /* Write data to TXDR only if XferCount not reach "0" */ + /* A TXIS flag can be set, during STOP treatment */ + /* Check if all Data have already been sent */ + /* If it is the case, this last write in TXDR is not sent, correspond to a dummy TXIS event */ + if (hi2c->XferCount > 0U) + { + /* Write data to TXDR */ + hi2c->Instance->TXDR = *hi2c->pBuffPtr; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + hi2c->XferCount--; + hi2c->XferSize--; + } + else + { + if ((tmpoptions == I2C_NEXT_FRAME) || (tmpoptions == I2C_FIRST_FRAME)) + { + /* Last Byte is Transmitted */ + /* Call I2C Slave Sequential complete process */ + I2C_ITSlaveSeqCplt(hi2c); + } + } + } + else + { + /* Nothing to do */ + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; +} + +#if defined(HAL_DMA_MODULE_ENABLED) +/** + * @brief Interrupt Sub-Routine which handle the Interrupt Flags Master Mode with DMA. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param ITFlags Interrupt flags to handle. + * @param ITSources Interrupt sources enabled. + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_Master_ISR_DMA(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources) +{ + uint16_t devaddress; + uint32_t xfermode; + + /* Process Locked */ + __HAL_LOCK(hi2c); + + if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_AF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_NACKI) != RESET)) + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Set corresponding Error Code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + + /* No need to generate STOP, it is automatically done */ + /* But enable STOP interrupt, to treat it */ + /* Error callback will be send during stop flag treatment */ + I2C_Enable_IRQ(hi2c, I2C_XFER_CPLT_IT); + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_TCR) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TCI) != RESET)) + { + /* Disable TC interrupt */ + __HAL_I2C_DISABLE_IT(hi2c, I2C_IT_TCI); + + if (hi2c->XferCount != 0U) + { + /* Recover Slave address */ + devaddress = (uint16_t)(hi2c->Instance->CR2 & I2C_CR2_SADD); + + /* Prepare the new XferSize to transfer */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + xfermode = I2C_RELOAD_MODE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + if (hi2c->XferOptions != I2C_NO_OPTION_FRAME) + { + xfermode = hi2c->XferOptions; + } + else + { + xfermode = I2C_AUTOEND_MODE; + } + } + + /* Set the new XferSize in Nbytes register */ + I2C_TransferConfig(hi2c, devaddress, (uint8_t)hi2c->XferSize, xfermode, I2C_NO_STARTSTOP); + + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Enable DMA Request */ + if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + hi2c->Instance->CR1 |= I2C_CR1_RXDMAEN; + } + else + { + hi2c->Instance->CR1 |= I2C_CR1_TXDMAEN; + } + } + else + { + /* Call TxCpltCallback() if no stop mode is set */ + if (I2C_GET_STOP_MODE(hi2c) != I2C_AUTOEND_MODE) + { + /* Call I2C Master Sequential complete process */ + I2C_ITMasterSeqCplt(hi2c); + } + else + { + /* Wrong size Status regarding TCR flag event */ + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_SIZE); + } + } + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_TC) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TCI) != RESET)) + { + if (hi2c->XferCount == 0U) + { + if (I2C_GET_STOP_MODE(hi2c) != I2C_AUTOEND_MODE) + { + /* Generate a stop condition in case of no transfer option */ + if (hi2c->XferOptions == I2C_NO_OPTION_FRAME) + { + /* Generate Stop */ + hi2c->Instance->CR2 |= I2C_CR2_STOP; + } + else + { + /* Call I2C Master Sequential complete process */ + I2C_ITMasterSeqCplt(hi2c); + } + } + } + else + { + /* Wrong size Status regarding TC flag event */ + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_SIZE); + } + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_STOPF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_STOPI) != RESET)) + { + /* Call I2C Master complete process */ + I2C_ITMasterCplt(hi2c, ITFlags); + } + else + { + /* Nothing to do */ + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; +} + +/** + * @brief Interrupt Sub-Routine which handle the Interrupt Flags Memory Mode with DMA. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param ITFlags Interrupt flags to handle. + * @param ITSources Interrupt sources enabled. + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_Mem_ISR_DMA(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources) +{ + uint32_t direction = I2C_GENERATE_START_WRITE; + + /* Process Locked */ + __HAL_LOCK(hi2c); + + if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_AF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_NACKI) != RESET)) + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Set corresponding Error Code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + + /* No need to generate STOP, it is automatically done */ + /* But enable STOP interrupt, to treat it */ + /* Error callback will be send during stop flag treatment */ + I2C_Enable_IRQ(hi2c, I2C_XFER_CPLT_IT); + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_TXIS) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TXI) != RESET)) + { + /* Write LSB part of Memory Address */ + hi2c->Instance->TXDR = hi2c->Memaddress; + + /* Reset Memaddress content */ + hi2c->Memaddress = 0xFFFFFFFFU; + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_TCR) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TCI) != RESET)) + { + /* Disable Interrupt related to address step */ + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + + /* Enable only Error interrupt */ + I2C_Enable_IRQ(hi2c, I2C_XFER_ERROR_IT); + + if (hi2c->XferCount != 0U) + { + /* Prepare the new XferSize to transfer */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + I2C_TransferConfig(hi2c, (uint16_t)hi2c->Devaddress, (uint8_t)hi2c->XferSize, + I2C_RELOAD_MODE, I2C_NO_STARTSTOP); + } + else + { + hi2c->XferSize = hi2c->XferCount; + I2C_TransferConfig(hi2c, (uint16_t)hi2c->Devaddress, (uint8_t)hi2c->XferSize, + I2C_AUTOEND_MODE, I2C_NO_STARTSTOP); + } + + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Enable DMA Request */ + if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + hi2c->Instance->CR1 |= I2C_CR1_RXDMAEN; + } + else + { + hi2c->Instance->CR1 |= I2C_CR1_TXDMAEN; + } + } + else + { + /* Wrong size Status regarding TCR flag event */ + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_SIZE); + } + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_TC) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_TCI) != RESET)) + { + /* Disable Interrupt related to address step */ + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + + /* Enable only Error and NACK interrupt for data transfer */ + I2C_Enable_IRQ(hi2c, I2C_XFER_ERROR_IT); + + if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + direction = I2C_GENERATE_START_READ; + } + + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + + /* Set NBYTES to write and reload if hi2c->XferCount > MAX_NBYTE_SIZE and generate RESTART */ + I2C_TransferConfig(hi2c, (uint16_t)hi2c->Devaddress, (uint8_t)hi2c->XferSize, + I2C_RELOAD_MODE, direction); + } + else + { + hi2c->XferSize = hi2c->XferCount; + + /* Set NBYTES to write and generate RESTART */ + I2C_TransferConfig(hi2c, (uint16_t)hi2c->Devaddress, (uint8_t)hi2c->XferSize, + I2C_AUTOEND_MODE, direction); + } + + /* Update XferCount value */ + hi2c->XferCount -= hi2c->XferSize; + + /* Enable DMA Request */ + if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + hi2c->Instance->CR1 |= I2C_CR1_RXDMAEN; + } + else + { + hi2c->Instance->CR1 |= I2C_CR1_TXDMAEN; + } + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_STOPF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_STOPI) != RESET)) + { + /* Call I2C Master complete process */ + I2C_ITMasterCplt(hi2c, ITFlags); + } + else + { + /* Nothing to do */ + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; +} + +/** + * @brief Interrupt Sub-Routine which handle the Interrupt Flags Slave Mode with DMA. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param ITFlags Interrupt flags to handle. + * @param ITSources Interrupt sources enabled. + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_Slave_ISR_DMA(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, + uint32_t ITSources) +{ + uint32_t tmpoptions = hi2c->XferOptions; + uint32_t treatdmanack = 0U; + HAL_I2C_StateTypeDef tmpstate; + + /* Process locked */ + __HAL_LOCK(hi2c); + + /* Check if STOPF is set */ + if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_STOPF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_STOPI) != RESET)) + { + /* Call I2C Slave complete process */ + I2C_ITSlaveCplt(hi2c, ITFlags); + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_AF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_NACKI) != RESET)) + { + /* Check that I2C transfer finished */ + /* if yes, normal use case, a NACK is sent by the MASTER when Transfer is finished */ + /* Mean XferCount == 0 */ + /* So clear Flag NACKF only */ + if ((I2C_CHECK_IT_SOURCE(ITSources, I2C_CR1_TXDMAEN) != RESET) || + (I2C_CHECK_IT_SOURCE(ITSources, I2C_CR1_RXDMAEN) != RESET)) + { + /* Split check of hdmarx, for MISRA compliance */ + if (hi2c->hdmarx != NULL) + { + if (I2C_CHECK_IT_SOURCE(ITSources, I2C_CR1_RXDMAEN) != RESET) + { + if (I2C_GET_DMA_REMAIN_DATA(hi2c->hdmarx) == 0U) + { + treatdmanack = 1U; + } + } + } + + /* Split check of hdmatx, for MISRA compliance */ + if (hi2c->hdmatx != NULL) + { + if (I2C_CHECK_IT_SOURCE(ITSources, I2C_CR1_TXDMAEN) != RESET) + { + if (I2C_GET_DMA_REMAIN_DATA(hi2c->hdmatx) == 0U) + { + treatdmanack = 1U; + } + } + } + + if (treatdmanack == 1U) + { + if ((hi2c->State == HAL_I2C_STATE_LISTEN) && (tmpoptions == I2C_FIRST_AND_LAST_FRAME)) + /* Same action must be done for (tmpoptions == I2C_LAST_FRAME) which removed for + Warning[Pa134]: left and right operands are identical */ + { + /* Call I2C Listen complete process */ + I2C_ITListenCplt(hi2c, ITFlags); + } + else if ((hi2c->State == HAL_I2C_STATE_BUSY_TX_LISTEN) && (tmpoptions != I2C_NO_OPTION_FRAME)) + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + /* Last Byte is Transmitted */ + /* Call I2C Slave Sequential complete process */ + I2C_ITSlaveSeqCplt(hi2c); + } + else + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + } + } + else + { + /* if no, error use case, a Non-Acknowledge of last Data is generated by the MASTER*/ + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Set ErrorCode corresponding to a Non-Acknowledge */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + + /* Store current hi2c->State, solve MISRA2012-Rule-13.5 */ + tmpstate = hi2c->State; + + if ((tmpoptions == I2C_FIRST_FRAME) || (tmpoptions == I2C_NEXT_FRAME)) + { + if ((tmpstate == HAL_I2C_STATE_BUSY_TX) || (tmpstate == HAL_I2C_STATE_BUSY_TX_LISTEN)) + { + hi2c->PreviousState = I2C_STATE_SLAVE_BUSY_TX; + } + else if ((tmpstate == HAL_I2C_STATE_BUSY_RX) || (tmpstate == HAL_I2C_STATE_BUSY_RX_LISTEN)) + { + hi2c->PreviousState = I2C_STATE_SLAVE_BUSY_RX; + } + else + { + /* Do nothing */ + } + + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, hi2c->ErrorCode); + } + } + } + else + { + /* Only Clear NACK Flag, no DMA treatment is pending */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + } + } + else if ((I2C_CHECK_FLAG(ITFlags, I2C_FLAG_ADDR) != RESET) && \ + (I2C_CHECK_IT_SOURCE(ITSources, I2C_IT_ADDRI) != RESET)) + { + I2C_ITAddrCplt(hi2c, ITFlags); + } + else + { + /* Nothing to do */ + } + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; +} +#endif /* HAL_DMA_MODULE_ENABLED */ + +/** + * @brief Master sends target device address followed by internal memory address for write request. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param MemAddress Internal memory address + * @param MemAddSize Size of internal memory address + * @param Timeout Timeout duration + * @param Tickstart Tick start value + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_RequestMemoryWrite(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, + uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout, + uint32_t Tickstart) +{ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_RELOAD_MODE, I2C_GENERATE_START_WRITE); + + /* Wait until TXIS flag is set */ + if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* If Memory address size is 8Bit */ + if (MemAddSize == I2C_MEMADD_SIZE_8BIT) + { + /* Send Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress); + } + /* If Memory address size is 16Bit */ + else + { + /* Send MSB of Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress); + + /* Wait until TXIS flag is set */ + if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Send LSB of Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress); + } + + /* Wait until TCR flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TCR, RESET, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + return HAL_OK; +} + +/** + * @brief Master sends target device address followed by internal memory address for read request. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param DevAddress Target device address: The device 7 bits address value + * in datasheet must be shifted to the left before calling the interface + * @param MemAddress Internal memory address + * @param MemAddSize Size of internal memory address + * @param Timeout Timeout duration + * @param Tickstart Tick start value + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_RequestMemoryRead(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, + uint16_t MemAddress, uint16_t MemAddSize, uint32_t Timeout, + uint32_t Tickstart) +{ + I2C_TransferConfig(hi2c, DevAddress, (uint8_t)MemAddSize, I2C_SOFTEND_MODE, I2C_GENERATE_START_WRITE); + + /* Wait until TXIS flag is set */ + if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* If Memory address size is 8Bit */ + if (MemAddSize == I2C_MEMADD_SIZE_8BIT) + { + /* Send Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress); + } + /* If Memory address size is 16Bit */ + else + { + /* Send MSB of Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_MSB(MemAddress); + + /* Wait until TXIS flag is set */ + if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Send LSB of Memory Address */ + hi2c->Instance->TXDR = I2C_MEM_ADD_LSB(MemAddress); + } + + /* Wait until TC flag is set */ + if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_TC, RESET, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + return HAL_OK; +} + +/** + * @brief I2C Address complete process callback. + * @param hi2c I2C handle. + * @param ITFlags Interrupt flags to handle. + * @retval None + */ +static void I2C_ITAddrCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags) +{ + uint8_t transferdirection; + uint16_t slaveaddrcode; + uint16_t ownadd1code; + uint16_t ownadd2code; + + /* Prevent unused argument(s) compilation warning */ + UNUSED(ITFlags); + + /* In case of Listen state, need to inform upper layer of address match code event */ + if (((uint32_t)hi2c->State & (uint32_t)HAL_I2C_STATE_LISTEN) == (uint32_t)HAL_I2C_STATE_LISTEN) + { + transferdirection = I2C_GET_DIR(hi2c); + slaveaddrcode = I2C_GET_ADDR_MATCH(hi2c); + ownadd1code = I2C_GET_OWN_ADDRESS1(hi2c); + ownadd2code = I2C_GET_OWN_ADDRESS2(hi2c); + + /* If 10bits addressing mode is selected */ + if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT) + { + if ((slaveaddrcode & SLAVE_ADDR_MSK) == ((ownadd1code >> SLAVE_ADDR_SHIFT) & SLAVE_ADDR_MSK)) + { + slaveaddrcode = ownadd1code; + hi2c->AddrEventCount++; + if (hi2c->AddrEventCount == 2U) + { + /* Reset Address Event counter */ + hi2c->AddrEventCount = 0U; + + /* Clear ADDR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call Slave Addr callback */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->AddrCallback(hi2c, transferdirection, slaveaddrcode); +#else + HAL_I2C_AddrCallback(hi2c, transferdirection, slaveaddrcode); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + } + else + { + slaveaddrcode = ownadd2code; + + /* Disable ADDR Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call Slave Addr callback */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->AddrCallback(hi2c, transferdirection, slaveaddrcode); +#else + HAL_I2C_AddrCallback(hi2c, transferdirection, slaveaddrcode); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + } + /* else 7 bits addressing mode is selected */ + else + { + /* Disable ADDR Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call Slave Addr callback */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->AddrCallback(hi2c, transferdirection, slaveaddrcode); +#else + HAL_I2C_AddrCallback(hi2c, transferdirection, slaveaddrcode); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + } + /* Else clear address flag only */ + else + { + /* Clear ADDR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ADDR); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + } +} + +/** + * @brief I2C Master sequential complete process. + * @param hi2c I2C handle. + * @retval None + */ +static void I2C_ITMasterSeqCplt(I2C_HandleTypeDef *hi2c) +{ + /* Reset I2C handle mode */ + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* No Generate Stop, to permit restart mode */ + /* The stop will be done at the end of transfer, when I2C_AUTOEND_MODE enable */ + if (hi2c->State == HAL_I2C_STATE_BUSY_TX) + { + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_MASTER_BUSY_TX; + hi2c->XferISR = NULL; + + /* Disable Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->MasterTxCpltCallback(hi2c); +#else + HAL_I2C_MasterTxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + /* hi2c->State == HAL_I2C_STATE_BUSY_RX */ + else + { + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_MASTER_BUSY_RX; + hi2c->XferISR = NULL; + + /* Disable Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_RX_IT); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->MasterRxCpltCallback(hi2c); +#else + HAL_I2C_MasterRxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } +} + +/** + * @brief I2C Slave sequential complete process. + * @param hi2c I2C handle. + * @retval None + */ +static void I2C_ITSlaveSeqCplt(I2C_HandleTypeDef *hi2c) +{ + uint32_t tmpcr1value = READ_REG(hi2c->Instance->CR1); + + /* Reset I2C handle mode */ + hi2c->Mode = HAL_I2C_MODE_NONE; + +#if defined(HAL_DMA_MODULE_ENABLED) + /* If a DMA is ongoing, Update handle size context */ + if (I2C_CHECK_IT_SOURCE(tmpcr1value, I2C_CR1_TXDMAEN) != RESET) + { + /* Disable DMA Request */ + hi2c->Instance->CR1 &= ~I2C_CR1_TXDMAEN; + } + else if (I2C_CHECK_IT_SOURCE(tmpcr1value, I2C_CR1_RXDMAEN) != RESET) + { + /* Disable DMA Request */ + hi2c->Instance->CR1 &= ~I2C_CR1_RXDMAEN; + } + else + { + /* Do nothing */ + } +#endif /* HAL_DMA_MODULE_ENABLED */ + + if (hi2c->State == HAL_I2C_STATE_BUSY_TX_LISTEN) + { + /* Remove HAL_I2C_STATE_SLAVE_BUSY_TX, keep only HAL_I2C_STATE_LISTEN */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->PreviousState = I2C_STATE_SLAVE_BUSY_TX; + + /* Disable Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->SlaveTxCpltCallback(hi2c); +#else + HAL_I2C_SlaveTxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + + else if (hi2c->State == HAL_I2C_STATE_BUSY_RX_LISTEN) + { + /* Remove HAL_I2C_STATE_SLAVE_BUSY_RX, keep only HAL_I2C_STATE_LISTEN */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->PreviousState = I2C_STATE_SLAVE_BUSY_RX; + + /* Disable Interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_RX_IT); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->SlaveRxCpltCallback(hi2c); +#else + HAL_I2C_SlaveRxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + else + { + /* Nothing to do */ + } +} + +/** + * @brief I2C Master complete process. + * @param hi2c I2C handle. + * @param ITFlags Interrupt flags to handle. + * @retval None + */ +static void I2C_ITMasterCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags) +{ + uint32_t tmperror; + uint32_t tmpITFlags = ITFlags; + __IO uint32_t tmpreg; + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Disable Interrupts and Store Previous state */ + if (hi2c->State == HAL_I2C_STATE_BUSY_TX) + { + I2C_Disable_IRQ(hi2c, I2C_XFER_TX_IT); + hi2c->PreviousState = I2C_STATE_MASTER_BUSY_TX; + } + else if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + I2C_Disable_IRQ(hi2c, I2C_XFER_RX_IT); + hi2c->PreviousState = I2C_STATE_MASTER_BUSY_RX; + } + else + { + /* Do nothing */ + } + + /* Clear Configuration Register 2 */ + I2C_RESET_CR2(hi2c); + + /* Reset handle parameters */ + hi2c->XferISR = NULL; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + + if (I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_AF) != RESET) + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Set acknowledge error code */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + } + + /* Fetch Last receive data if any */ + if ((hi2c->State == HAL_I2C_STATE_ABORT) && (I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_RXNE) != RESET)) + { + /* Read data from RXDR */ + tmpreg = (uint8_t)hi2c->Instance->RXDR; + UNUSED(tmpreg); + } + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + /* Store current volatile hi2c->ErrorCode, misra rule */ + tmperror = hi2c->ErrorCode; + + /* Call the corresponding callback to inform upper layer of End of Transfer */ + if ((hi2c->State == HAL_I2C_STATE_ABORT) || (tmperror != HAL_I2C_ERROR_NONE)) + { + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, hi2c->ErrorCode); + } + /* hi2c->State == HAL_I2C_STATE_BUSY_TX */ + else if (hi2c->State == HAL_I2C_STATE_BUSY_TX) + { + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_NONE; + + if (hi2c->Mode == HAL_I2C_MODE_MEM) + { + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->MemTxCpltCallback(hi2c); +#else + HAL_I2C_MemTxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + else + { + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->MasterTxCpltCallback(hi2c); +#else + HAL_I2C_MasterTxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + } + /* hi2c->State == HAL_I2C_STATE_BUSY_RX */ + else if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_NONE; + + if (hi2c->Mode == HAL_I2C_MODE_MEM) + { + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->MemRxCpltCallback(hi2c); +#else + HAL_I2C_MemRxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + else + { + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->MasterRxCpltCallback(hi2c); +#else + HAL_I2C_MasterRxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + } + else + { + /* Nothing to do */ + } +} + +/** + * @brief I2C Slave complete process. + * @param hi2c I2C handle. + * @param ITFlags Interrupt flags to handle. + * @retval None + */ +static void I2C_ITSlaveCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags) +{ + uint32_t tmpcr1value = READ_REG(hi2c->Instance->CR1); + uint32_t tmpITFlags = ITFlags; + uint32_t tmpoptions = hi2c->XferOptions; + HAL_I2C_StateTypeDef tmpstate = hi2c->State; + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Disable Interrupts and Store Previous state */ + if ((tmpstate == HAL_I2C_STATE_BUSY_TX) || (tmpstate == HAL_I2C_STATE_BUSY_TX_LISTEN)) + { + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_TX_IT); + hi2c->PreviousState = I2C_STATE_SLAVE_BUSY_TX; + } + else if ((tmpstate == HAL_I2C_STATE_BUSY_RX) || (tmpstate == HAL_I2C_STATE_BUSY_RX_LISTEN)) + { + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_RX_IT); + hi2c->PreviousState = I2C_STATE_SLAVE_BUSY_RX; + } + else if (tmpstate == HAL_I2C_STATE_LISTEN) + { + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_TX_IT | I2C_XFER_RX_IT); + hi2c->PreviousState = I2C_STATE_NONE; + } + else + { + /* Do nothing */ + } + + /* Disable Address Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + /* Clear Configuration Register 2 */ + I2C_RESET_CR2(hi2c); + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + +#if defined(HAL_DMA_MODULE_ENABLED) + /* If a DMA is ongoing, Update handle size context */ + if (I2C_CHECK_IT_SOURCE(tmpcr1value, I2C_CR1_TXDMAEN) != RESET) + { + /* Disable DMA Request */ + hi2c->Instance->CR1 &= ~I2C_CR1_TXDMAEN; + + if (hi2c->hdmatx != NULL) + { + hi2c->XferCount = (uint16_t)I2C_GET_DMA_REMAIN_DATA(hi2c->hdmatx); + } + } + else if (I2C_CHECK_IT_SOURCE(tmpcr1value, I2C_CR1_RXDMAEN) != RESET) + { + /* Disable DMA Request */ + hi2c->Instance->CR1 &= ~I2C_CR1_RXDMAEN; + + if (hi2c->hdmarx != NULL) + { + hi2c->XferCount = (uint16_t)I2C_GET_DMA_REMAIN_DATA(hi2c->hdmarx); + } + } + else + { + /* Do nothing */ + } +#endif /* HAL_DMA_MODULE_ENABLED */ + + /* Store Last receive data if any */ + if (I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_RXNE) != RESET) + { + /* Remove RXNE flag on temporary variable as read done */ + tmpITFlags &= ~I2C_FLAG_RXNE; + + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + if (hi2c->XferSize > 0U) + { + hi2c->XferSize--; + hi2c->XferCount--; + } + } + + /* All data are not transferred, so set error code accordingly */ + if (hi2c->XferCount != 0U) + { + /* Set ErrorCode corresponding to a Non-Acknowledge */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + } + + if ((I2C_CHECK_FLAG(tmpITFlags, I2C_FLAG_AF) != RESET) && \ + (I2C_CHECK_IT_SOURCE(tmpcr1value, I2C_IT_NACKI) != RESET)) + { + /* Check that I2C transfer finished */ + /* if yes, normal use case, a NACK is sent by the MASTER when Transfer is finished */ + /* Mean XferCount == 0*/ + /* So clear Flag NACKF only */ + if (hi2c->XferCount == 0U) + { + if ((hi2c->State == HAL_I2C_STATE_LISTEN) && (tmpoptions == I2C_FIRST_AND_LAST_FRAME)) + /* Same action must be done for (tmpoptions == I2C_LAST_FRAME) which removed for + Warning[Pa134]: left and right operands are identical */ + { + /* Call I2C Listen complete process */ + I2C_ITListenCplt(hi2c, tmpITFlags); + } + else if ((hi2c->State == HAL_I2C_STATE_BUSY_TX_LISTEN) && (tmpoptions != I2C_NO_OPTION_FRAME)) + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + /* Last Byte is Transmitted */ + /* Call I2C Slave Sequential complete process */ + I2C_ITSlaveSeqCplt(hi2c); + } + else + { + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + } + } + else + { + /* if no, error use case, a Non-Acknowledge of last Data is generated by the MASTER*/ + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Set ErrorCode corresponding to a Non-Acknowledge */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + + if ((tmpoptions == I2C_FIRST_FRAME) || (tmpoptions == I2C_NEXT_FRAME)) + { + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, hi2c->ErrorCode); + } + } + } + + hi2c->Mode = HAL_I2C_MODE_NONE; + hi2c->XferISR = NULL; + + if (hi2c->ErrorCode != HAL_I2C_ERROR_NONE) + { + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, hi2c->ErrorCode); + + /* Call the Listen Complete callback, to inform upper layer of the end of Listen usecase */ + if (hi2c->State == HAL_I2C_STATE_LISTEN) + { + /* Call I2C Listen complete process */ + I2C_ITListenCplt(hi2c, tmpITFlags); + } + } + else if (hi2c->XferOptions != I2C_NO_OPTION_FRAME) + { + /* Call the Sequential Complete callback, to inform upper layer of the end of Transfer */ + I2C_ITSlaveSeqCplt(hi2c); + + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the Listen Complete callback, to inform upper layer of the end of Listen usecase */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->ListenCpltCallback(hi2c); +#else + HAL_I2C_ListenCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + /* Call the corresponding callback to inform upper layer of End of Transfer */ + else if (hi2c->State == HAL_I2C_STATE_BUSY_RX) + { + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->SlaveRxCpltCallback(hi2c); +#else + HAL_I2C_SlaveRxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + else + { + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->SlaveTxCpltCallback(hi2c); +#else + HAL_I2C_SlaveTxCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } +} + +/** + * @brief I2C Listen complete process. + * @param hi2c I2C handle. + * @param ITFlags Interrupt flags to handle. + * @retval None + */ +static void I2C_ITListenCplt(I2C_HandleTypeDef *hi2c, uint32_t ITFlags) +{ + /* Reset handle parameters */ + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->PreviousState = I2C_STATE_NONE; + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + hi2c->XferISR = NULL; + + /* Store Last receive data if any */ + if (I2C_CHECK_FLAG(ITFlags, I2C_FLAG_RXNE) != RESET) + { + /* Read data from RXDR */ + *hi2c->pBuffPtr = (uint8_t)hi2c->Instance->RXDR; + + /* Increment Buffer pointer */ + hi2c->pBuffPtr++; + + if (hi2c->XferSize > 0U) + { + hi2c->XferSize--; + hi2c->XferCount--; + + /* Set ErrorCode corresponding to a Non-Acknowledge */ + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + } + } + + /* Disable all Interrupts*/ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_RX_IT | I2C_XFER_TX_IT); + + /* Clear NACK Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the Listen Complete callback, to inform upper layer of the end of Listen usecase */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->ListenCpltCallback(hi2c); +#else + HAL_I2C_ListenCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ +} + +/** + * @brief I2C interrupts error process. + * @param hi2c I2C handle. + * @param ErrorCode Error code to handle. + * @retval None + */ +static void I2C_ITError(I2C_HandleTypeDef *hi2c, uint32_t ErrorCode) +{ + HAL_I2C_StateTypeDef tmpstate = hi2c->State; + +#if defined(HAL_DMA_MODULE_ENABLED) + uint32_t tmppreviousstate; +#endif /* HAL_DMA_MODULE_ENABLED */ + + /* Reset handle parameters */ + hi2c->Mode = HAL_I2C_MODE_NONE; + hi2c->XferOptions = I2C_NO_OPTION_FRAME; + hi2c->XferCount = 0U; + + /* Set new error code */ + hi2c->ErrorCode |= ErrorCode; + + /* Disable Interrupts */ + if ((tmpstate == HAL_I2C_STATE_LISTEN) || + (tmpstate == HAL_I2C_STATE_BUSY_TX_LISTEN) || + (tmpstate == HAL_I2C_STATE_BUSY_RX_LISTEN)) + { + /* Disable all interrupts, except interrupts related to LISTEN state */ + I2C_Disable_IRQ(hi2c, I2C_XFER_RX_IT | I2C_XFER_TX_IT); + + /* keep HAL_I2C_STATE_LISTEN if set */ + hi2c->State = HAL_I2C_STATE_LISTEN; + hi2c->XferISR = I2C_Slave_ISR_IT; + } + else + { + /* Disable all interrupts */ + I2C_Disable_IRQ(hi2c, I2C_XFER_LISTEN_IT | I2C_XFER_RX_IT | I2C_XFER_TX_IT); + + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + /* If state is an abort treatment on going, don't change state */ + /* This change will be do later */ + if (hi2c->State != HAL_I2C_STATE_ABORT) + { + /* Set HAL_I2C_STATE_READY */ + hi2c->State = HAL_I2C_STATE_READY; + + /* Check if a STOPF is detected */ + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == SET) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF) == SET) + { + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + hi2c->ErrorCode |= HAL_I2C_ERROR_AF; + } + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + } + + } + hi2c->XferISR = NULL; + } + +#if defined(HAL_DMA_MODULE_ENABLED) + /* Abort DMA TX transfer if any */ + tmppreviousstate = hi2c->PreviousState; + + if ((hi2c->hdmatx != NULL) && ((tmppreviousstate == I2C_STATE_MASTER_BUSY_TX) || \ + (tmppreviousstate == I2C_STATE_SLAVE_BUSY_TX))) + { + if ((hi2c->Instance->CR1 & I2C_CR1_TXDMAEN) == I2C_CR1_TXDMAEN) + { + hi2c->Instance->CR1 &= ~I2C_CR1_TXDMAEN; + } + + if (HAL_DMA_GetState(hi2c->hdmatx) != HAL_DMA_STATE_READY) + { + /* Set the I2C DMA Abort callback : + will lead to call HAL_I2C_ErrorCallback() at end of DMA abort procedure */ + hi2c->hdmatx->XferAbortCallback = I2C_DMAAbort; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Abort DMA TX */ + if (HAL_DMA_Abort_IT(hi2c->hdmatx) != HAL_OK) + { + /* Call Directly XferAbortCallback function in case of error */ + hi2c->hdmatx->XferAbortCallback(hi2c->hdmatx); + } + } + else + { + I2C_TreatErrorCallback(hi2c); + } + } + /* Abort DMA RX transfer if any */ + else if ((hi2c->hdmarx != NULL) && ((tmppreviousstate == I2C_STATE_MASTER_BUSY_RX) || \ + (tmppreviousstate == I2C_STATE_SLAVE_BUSY_RX))) + { + if ((hi2c->Instance->CR1 & I2C_CR1_RXDMAEN) == I2C_CR1_RXDMAEN) + { + hi2c->Instance->CR1 &= ~I2C_CR1_RXDMAEN; + } + + if (HAL_DMA_GetState(hi2c->hdmarx) != HAL_DMA_STATE_READY) + { + /* Set the I2C DMA Abort callback : + will lead to call HAL_I2C_ErrorCallback() at end of DMA abort procedure */ + hi2c->hdmarx->XferAbortCallback = I2C_DMAAbort; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Abort DMA RX */ + if (HAL_DMA_Abort_IT(hi2c->hdmarx) != HAL_OK) + { + /* Call Directly hi2c->hdmarx->XferAbortCallback function in case of error */ + hi2c->hdmarx->XferAbortCallback(hi2c->hdmarx); + } + } + else + { + I2C_TreatErrorCallback(hi2c); + } + } + else +#endif /* HAL_DMA_MODULE_ENABLED */ + { + I2C_TreatErrorCallback(hi2c); + } +} + +/** + * @brief I2C Error callback treatment. + * @param hi2c I2C handle. + * @retval None + */ +static void I2C_TreatErrorCallback(I2C_HandleTypeDef *hi2c) +{ + if (hi2c->State == HAL_I2C_STATE_ABORT) + { + hi2c->State = HAL_I2C_STATE_READY; + hi2c->PreviousState = I2C_STATE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->AbortCpltCallback(hi2c); +#else + HAL_I2C_AbortCpltCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } + else + { + hi2c->PreviousState = I2C_STATE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + /* Call the corresponding callback to inform upper layer of End of Transfer */ +#if (USE_HAL_I2C_REGISTER_CALLBACKS == 1) + hi2c->ErrorCallback(hi2c); +#else + HAL_I2C_ErrorCallback(hi2c); +#endif /* USE_HAL_I2C_REGISTER_CALLBACKS */ + } +} + +/** + * @brief I2C Tx data register flush process. + * @param hi2c I2C handle. + * @retval None + */ +static void I2C_Flush_TXDR(I2C_HandleTypeDef *hi2c) +{ + /* If a pending TXIS flag is set */ + /* Write a dummy data in TXDR to clear it */ + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) != RESET) + { + hi2c->Instance->TXDR = 0x00U; + } + + /* Flush TX register if not empty */ + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXE) == RESET) + { + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_TXE); + } +} + +#if defined(HAL_DMA_MODULE_ENABLED) +/** + * @brief DMA I2C master transmit process complete callback. + * @param hdma DMA handle + * @retval None + */ +static void I2C_DMAMasterTransmitCplt(DMA_HandleTypeDef *hdma) +{ + /* Derogation MISRAC2012-Rule-11.5 */ + I2C_HandleTypeDef *hi2c = (I2C_HandleTypeDef *)(((DMA_HandleTypeDef *)hdma)->Parent); + + /* Disable DMA Request */ + hi2c->Instance->CR1 &= ~I2C_CR1_TXDMAEN; + + /* If last transfer, enable STOP interrupt */ + if (hi2c->XferCount == 0U) + { + /* Enable STOP interrupt */ + I2C_Enable_IRQ(hi2c, I2C_XFER_CPLT_IT); + } + /* else prepare a new DMA transfer and enable TCReload interrupt */ + else + { + /* Update Buffer pointer */ + hi2c->pBuffPtr += hi2c->XferSize; + + /* Set the XferSize to transfer */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + } + + /* Enable the DMA channel */ + if (HAL_DMA_Start_IT(hi2c->hdmatx, (uint32_t)hi2c->pBuffPtr, (uint32_t)&hi2c->Instance->TXDR, + hi2c->XferSize) != HAL_OK) + { + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_DMA); + } + else + { + /* Enable TC interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RELOAD_IT); + } + } +} + + +/** + * @brief DMA I2C slave transmit process complete callback. + * @param hdma DMA handle + * @retval None + */ +static void I2C_DMASlaveTransmitCplt(DMA_HandleTypeDef *hdma) +{ + /* Derogation MISRAC2012-Rule-11.5 */ + I2C_HandleTypeDef *hi2c = (I2C_HandleTypeDef *)(((DMA_HandleTypeDef *)hdma)->Parent); + uint32_t tmpoptions = hi2c->XferOptions; + + if ((tmpoptions == I2C_NEXT_FRAME) || (tmpoptions == I2C_FIRST_FRAME)) + { + /* Disable DMA Request */ + hi2c->Instance->CR1 &= ~I2C_CR1_TXDMAEN; + + /* Last Byte is Transmitted */ + /* Call I2C Slave Sequential complete process */ + I2C_ITSlaveSeqCplt(hi2c); + } + else + { + /* No specific action, Master fully manage the generation of STOP condition */ + /* Mean that this generation can arrive at any time, at the end or during DMA process */ + /* So STOP condition should be manage through Interrupt treatment */ + } +} + + +/** + * @brief DMA I2C master receive process complete callback. + * @param hdma DMA handle + * @retval None + */ +static void I2C_DMAMasterReceiveCplt(DMA_HandleTypeDef *hdma) +{ + /* Derogation MISRAC2012-Rule-11.5 */ + I2C_HandleTypeDef *hi2c = (I2C_HandleTypeDef *)(((DMA_HandleTypeDef *)hdma)->Parent); + + /* Disable DMA Request */ + hi2c->Instance->CR1 &= ~I2C_CR1_RXDMAEN; + + /* If last transfer, enable STOP interrupt */ + if (hi2c->XferCount == 0U) + { + /* Enable STOP interrupt */ + I2C_Enable_IRQ(hi2c, I2C_XFER_CPLT_IT); + } + /* else prepare a new DMA transfer and enable TCReload interrupt */ + else + { + /* Update Buffer pointer */ + hi2c->pBuffPtr += hi2c->XferSize; + + /* Set the XferSize to transfer */ + if (hi2c->XferCount > MAX_NBYTE_SIZE) + { + hi2c->XferSize = MAX_NBYTE_SIZE; + } + else + { + hi2c->XferSize = hi2c->XferCount; + } + + /* Enable the DMA channel */ + if (HAL_DMA_Start_IT(hi2c->hdmarx, (uint32_t)&hi2c->Instance->RXDR, (uint32_t)hi2c->pBuffPtr, + hi2c->XferSize) != HAL_OK) + { + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_DMA); + } + else + { + /* Enable TC interrupts */ + I2C_Enable_IRQ(hi2c, I2C_XFER_RELOAD_IT); + } + } +} + + +/** + * @brief DMA I2C slave receive process complete callback. + * @param hdma DMA handle + * @retval None + */ +static void I2C_DMASlaveReceiveCplt(DMA_HandleTypeDef *hdma) +{ + /* Derogation MISRAC2012-Rule-11.5 */ + I2C_HandleTypeDef *hi2c = (I2C_HandleTypeDef *)(((DMA_HandleTypeDef *)hdma)->Parent); + uint32_t tmpoptions = hi2c->XferOptions; + + if ((I2C_GET_DMA_REMAIN_DATA(hi2c->hdmarx) == 0U) && \ + (tmpoptions != I2C_NO_OPTION_FRAME)) + { + /* Disable DMA Request */ + hi2c->Instance->CR1 &= ~I2C_CR1_RXDMAEN; + + /* Call I2C Slave Sequential complete process */ + I2C_ITSlaveSeqCplt(hi2c); + } + else + { + /* No specific action, Master fully manage the generation of STOP condition */ + /* Mean that this generation can arrive at any time, at the end or during DMA process */ + /* So STOP condition should be manage through Interrupt treatment */ + } +} + + +/** + * @brief DMA I2C communication error callback. + * @param hdma DMA handle + * @retval None + */ +static void I2C_DMAError(DMA_HandleTypeDef *hdma) +{ + /* Derogation MISRAC2012-Rule-11.5 */ + I2C_HandleTypeDef *hi2c = (I2C_HandleTypeDef *)(((DMA_HandleTypeDef *)hdma)->Parent); + + /* Disable Acknowledge */ + hi2c->Instance->CR2 |= I2C_CR2_NACK; + + /* Call the corresponding callback to inform upper layer of End of Transfer */ + I2C_ITError(hi2c, HAL_I2C_ERROR_DMA); +} + + +/** + * @brief DMA I2C communication abort callback + * (To be called at end of DMA Abort procedure). + * @param hdma DMA handle. + * @retval None + */ +static void I2C_DMAAbort(DMA_HandleTypeDef *hdma) +{ + /* Derogation MISRAC2012-Rule-11.5 */ + I2C_HandleTypeDef *hi2c = (I2C_HandleTypeDef *)(((DMA_HandleTypeDef *)hdma)->Parent); + + /* Reset AbortCpltCallback */ + if (hi2c->hdmatx != NULL) + { + hi2c->hdmatx->XferAbortCallback = NULL; + } + if (hi2c->hdmarx != NULL) + { + hi2c->hdmarx->XferAbortCallback = NULL; + } + + I2C_TreatErrorCallback(hi2c); +} + +#endif /* HAL_DMA_MODULE_ENABLED */ + +/** + * @brief This function handles I2C Communication Timeout. It waits + * until a flag is no longer in the specified status. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param Flag Specifies the I2C flag to check. + * @param Status The actual Flag status (SET or RESET). + * @param Timeout Timeout duration + * @param Tickstart Tick start value + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_WaitOnFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Flag, FlagStatus Status, + uint32_t Timeout, uint32_t Tickstart) +{ + while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status) + { + /* Check if an error is detected */ + if (I2C_IsErrorOccurred(hi2c, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Check for the Timeout */ + if (Timeout != HAL_MAX_DELAY) + { + if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) + { + if (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status) + { + hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT; + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + return HAL_ERROR; + } + } + } + } + return HAL_OK; +} + +/** + * @brief This function handles I2C Communication Timeout for specific usage of TXIS flag. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param Timeout Timeout duration + * @param Tickstart Tick start value + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_WaitOnTXISFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, + uint32_t Tickstart) +{ + while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) == RESET) + { + /* Check if an error is detected */ + if (I2C_IsErrorOccurred(hi2c, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Check for the Timeout */ + if (Timeout != HAL_MAX_DELAY) + { + if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_TXIS) == RESET) + { + hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT; + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + } + } + } + return HAL_OK; +} + +/** + * @brief This function handles I2C Communication Timeout for specific usage of STOP flag. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param Timeout Timeout duration + * @param Tickstart Tick start value + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_WaitOnSTOPFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, + uint32_t Tickstart) +{ + while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET) + { + /* Check if an error is detected */ + if (I2C_IsErrorOccurred(hi2c, Timeout, Tickstart) != HAL_OK) + { + return HAL_ERROR; + } + + /* Check for the Timeout */ + if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET) + { + hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT; + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_ERROR; + } + } + } + return HAL_OK; +} + +/** + * @brief This function handles I2C Communication Timeout for specific usage of RXNE flag. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param Timeout Timeout duration + * @param Tickstart Tick start value + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_WaitOnRXNEFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, + uint32_t Tickstart) +{ + HAL_StatusTypeDef status = HAL_OK; + + while ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == RESET) && (status == HAL_OK)) + { + /* Check if an error is detected */ + if (I2C_IsErrorOccurred(hi2c, Timeout, Tickstart) != HAL_OK) + { + status = HAL_ERROR; + } + + /* Check if a STOPF is detected */ + if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == SET) && (status == HAL_OK)) + { + /* Check if an RXNE is pending */ + /* Store Last receive data if any */ + if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == SET) && (hi2c->XferSize > 0U)) + { + /* Return HAL_OK */ + /* The Reading of data from RXDR will be done in caller function */ + status = HAL_OK; + } + + /* Check a no-acknowledge have been detected */ + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_AF) == SET) + { + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + hi2c->ErrorCode = HAL_I2C_ERROR_AF; + + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + + /* Clear Configuration Register 2 */ + I2C_RESET_CR2(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + status = HAL_ERROR; + } + else + { + hi2c->ErrorCode = HAL_I2C_ERROR_NONE; + } + } + + /* Check for the Timeout */ + if ((((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) && (status == HAL_OK)) + { + if (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_RXNE) == RESET) + { + hi2c->ErrorCode |= HAL_I2C_ERROR_TIMEOUT; + hi2c->State = HAL_I2C_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + status = HAL_ERROR; + } + } + } + return status; +} + +/** + * @brief This function handles errors detection during an I2C Communication. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param Timeout Timeout duration + * @param Tickstart Tick start value + * @retval HAL status + */ +static HAL_StatusTypeDef I2C_IsErrorOccurred(I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart) +{ + HAL_StatusTypeDef status = HAL_OK; + uint32_t itflag = hi2c->Instance->ISR; + uint32_t error_code = 0; + uint32_t tickstart = Tickstart; + uint32_t tmp1; + HAL_I2C_ModeTypeDef tmp2; + + if (HAL_IS_BIT_SET(itflag, I2C_FLAG_AF)) + { + /* Clear NACKF Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_AF); + + /* Wait until STOP Flag is set or timeout occurred */ + /* AutoEnd should be initiate after AF */ + while ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET) && (status == HAL_OK)) + { + /* Check for the Timeout */ + if (Timeout != HAL_MAX_DELAY) + { + if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U)) + { + tmp1 = (uint32_t)(hi2c->Instance->CR2 & I2C_CR2_STOP); + tmp2 = hi2c->Mode; + + /* In case of I2C still busy, try to regenerate a STOP manually */ + if ((__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_BUSY) != RESET) && \ + (tmp1 != I2C_CR2_STOP) && \ + (tmp2 != HAL_I2C_MODE_SLAVE)) + { + /* Generate Stop */ + hi2c->Instance->CR2 |= I2C_CR2_STOP; + + /* Update Tick with new reference */ + tickstart = HAL_GetTick(); + } + + while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET) + { + /* Check for the Timeout */ + if ((HAL_GetTick() - tickstart) > I2C_TIMEOUT_STOPF) + { + error_code |= HAL_I2C_ERROR_TIMEOUT; + + status = HAL_ERROR; + + break; + } + } + } + } + } + + /* In case STOP Flag is detected, clear it */ + if (status == HAL_OK) + { + /* Clear STOP Flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_STOPF); + } + + error_code |= HAL_I2C_ERROR_AF; + + status = HAL_ERROR; + } + + /* Refresh Content of Status register */ + itflag = hi2c->Instance->ISR; + + /* Then verify if an additional errors occurs */ + /* Check if a Bus error occurred */ + if (HAL_IS_BIT_SET(itflag, I2C_FLAG_BERR)) + { + error_code |= HAL_I2C_ERROR_BERR; + + /* Clear BERR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_BERR); + + status = HAL_ERROR; + } + + /* Check if an Over-Run/Under-Run error occurred */ + if (HAL_IS_BIT_SET(itflag, I2C_FLAG_OVR)) + { + error_code |= HAL_I2C_ERROR_OVR; + + /* Clear OVR flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_OVR); + + status = HAL_ERROR; + } + + /* Check if an Arbitration Loss error occurred */ + if (HAL_IS_BIT_SET(itflag, I2C_FLAG_ARLO)) + { + error_code |= HAL_I2C_ERROR_ARLO; + + /* Clear ARLO flag */ + __HAL_I2C_CLEAR_FLAG(hi2c, I2C_FLAG_ARLO); + + status = HAL_ERROR; + } + + if (status != HAL_OK) + { + /* Flush TX register */ + I2C_Flush_TXDR(hi2c); + + /* Clear Configuration Register 2 */ + I2C_RESET_CR2(hi2c); + + hi2c->ErrorCode |= error_code; + hi2c->State = HAL_I2C_STATE_READY; + hi2c->Mode = HAL_I2C_MODE_NONE; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + } + + return status; +} + +/** + * @brief Handles I2Cx communication when starting transfer or during transfer (TC or TCR flag are set). + * @param hi2c I2C handle. + * @param DevAddress Specifies the slave address to be programmed. + * @param Size Specifies the number of bytes to be programmed. + * This parameter must be a value between 0 and 255. + * @param Mode New state of the I2C START condition generation. + * This parameter can be one of the following values: + * @arg @ref I2C_RELOAD_MODE Enable Reload mode . + * @arg @ref I2C_AUTOEND_MODE Enable Automatic end mode. + * @arg @ref I2C_SOFTEND_MODE Enable Software end mode. + * @param Request New state of the I2C START condition generation. + * This parameter can be one of the following values: + * @arg @ref I2C_NO_STARTSTOP Don't Generate stop and start condition. + * @arg @ref I2C_GENERATE_STOP Generate stop condition (Size should be set to 0). + * @arg @ref I2C_GENERATE_START_READ Generate Restart for read request. + * @arg @ref I2C_GENERATE_START_WRITE Generate Restart for write request. + * @retval None + */ +static void I2C_TransferConfig(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t Size, uint32_t Mode, + uint32_t Request) +{ + uint32_t tmp; + + /* Check the parameters */ + assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); + assert_param(IS_TRANSFER_MODE(Mode)); + assert_param(IS_TRANSFER_REQUEST(Request)); + + /* Declaration of tmp to prevent undefined behavior of volatile usage */ + tmp = ((uint32_t)(((uint32_t)DevAddress & I2C_CR2_SADD) | \ + (((uint32_t)Size << I2C_CR2_NBYTES_Pos) & I2C_CR2_NBYTES) | \ + (uint32_t)Mode | (uint32_t)Request) & (~0x80000000U)); + + /* update CR2 register */ + MODIFY_REG(hi2c->Instance->CR2, \ + ((I2C_CR2_SADD | I2C_CR2_NBYTES | I2C_CR2_RELOAD | I2C_CR2_AUTOEND | \ + (I2C_CR2_RD_WRN & (uint32_t)(Request >> (31U - I2C_CR2_RD_WRN_Pos))) | \ + I2C_CR2_START | I2C_CR2_STOP)), tmp); +} + +/** + * @brief Manage the enabling of Interrupts. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param InterruptRequest Value of @ref I2C_Interrupt_configuration_definition. + * @retval None + */ +static void I2C_Enable_IRQ(I2C_HandleTypeDef *hi2c, uint16_t InterruptRequest) +{ + uint32_t tmpisr = 0U; + +#if defined(HAL_DMA_MODULE_ENABLED) + if ((hi2c->XferISR != I2C_Master_ISR_DMA) && \ + (hi2c->XferISR != I2C_Slave_ISR_DMA) && \ + (hi2c->XferISR != I2C_Mem_ISR_DMA)) +#endif /* HAL_DMA_MODULE_ENABLED */ + { + if ((InterruptRequest & I2C_XFER_LISTEN_IT) == I2C_XFER_LISTEN_IT) + { + /* Enable ERR, STOP, NACK and ADDR interrupts */ + tmpisr |= I2C_IT_ADDRI | I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_ERRI; + } + + if ((InterruptRequest & I2C_XFER_TX_IT) == I2C_XFER_TX_IT) + { + /* Enable ERR, TC, STOP, NACK and TXI interrupts */ + tmpisr |= I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_TXI; + } + + if ((InterruptRequest & I2C_XFER_RX_IT) == I2C_XFER_RX_IT) + { + /* Enable ERR, TC, STOP, NACK and RXI interrupts */ + tmpisr |= I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_RXI; + } + + if (InterruptRequest == I2C_XFER_ERROR_IT) + { + /* Enable ERR and NACK interrupts */ + tmpisr |= I2C_IT_ERRI | I2C_IT_NACKI; + } + + if (InterruptRequest == I2C_XFER_CPLT_IT) + { + /* Enable STOP interrupts */ + tmpisr |= I2C_IT_STOPI; + } + } + +#if defined(HAL_DMA_MODULE_ENABLED) + else + { + if ((InterruptRequest & I2C_XFER_LISTEN_IT) == I2C_XFER_LISTEN_IT) + { + /* Enable ERR, STOP, NACK and ADDR interrupts */ + tmpisr |= I2C_IT_ADDRI | I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_ERRI; + } + + if ((InterruptRequest & I2C_XFER_TX_IT) == I2C_XFER_TX_IT) + { + /* Enable ERR, TC, STOP, NACK and TXI interrupts */ + tmpisr |= I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_TXI; + } + + if ((InterruptRequest & I2C_XFER_RX_IT) == I2C_XFER_RX_IT) + { + /* Enable ERR, TC, STOP, NACK and RXI interrupts */ + tmpisr |= I2C_IT_ERRI | I2C_IT_TCI | I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_RXI; + } + + if (InterruptRequest == I2C_XFER_ERROR_IT) + { + /* Enable ERR and NACK interrupts */ + tmpisr |= I2C_IT_ERRI | I2C_IT_NACKI; + } + + if (InterruptRequest == I2C_XFER_CPLT_IT) + { + /* Enable STOP interrupts */ + tmpisr |= (I2C_IT_STOPI | I2C_IT_TCI); + } + + if (InterruptRequest == I2C_XFER_RELOAD_IT) + { + /* Enable TC interrupts */ + tmpisr |= I2C_IT_TCI; + } + } +#endif /* HAL_DMA_MODULE_ENABLED */ + + /* Enable interrupts only at the end */ + /* to avoid the risk of I2C interrupt handle execution before */ + /* all interrupts requested done */ + __HAL_I2C_ENABLE_IT(hi2c, tmpisr); +} + +/** + * @brief Manage the disabling of Interrupts. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2C. + * @param InterruptRequest Value of @ref I2C_Interrupt_configuration_definition. + * @retval None + */ +static void I2C_Disable_IRQ(I2C_HandleTypeDef *hi2c, uint16_t InterruptRequest) +{ + uint32_t tmpisr = 0U; + + if ((InterruptRequest & I2C_XFER_TX_IT) == I2C_XFER_TX_IT) + { + /* Disable TC and TXI interrupts */ + tmpisr |= I2C_IT_TCI | I2C_IT_TXI; + + if (((uint32_t)hi2c->State & (uint32_t)HAL_I2C_STATE_LISTEN) != (uint32_t)HAL_I2C_STATE_LISTEN) + { + /* Disable NACK and STOP interrupts */ + tmpisr |= I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_ERRI; + } + } + + if ((InterruptRequest & I2C_XFER_RX_IT) == I2C_XFER_RX_IT) + { + /* Disable TC and RXI interrupts */ + tmpisr |= I2C_IT_TCI | I2C_IT_RXI; + + if (((uint32_t)hi2c->State & (uint32_t)HAL_I2C_STATE_LISTEN) != (uint32_t)HAL_I2C_STATE_LISTEN) + { + /* Disable NACK and STOP interrupts */ + tmpisr |= I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_ERRI; + } + } + + if ((InterruptRequest & I2C_XFER_LISTEN_IT) == I2C_XFER_LISTEN_IT) + { + /* Disable ADDR, NACK and STOP interrupts */ + tmpisr |= I2C_IT_ADDRI | I2C_IT_STOPI | I2C_IT_NACKI | I2C_IT_ERRI; + } + + if (InterruptRequest == I2C_XFER_ERROR_IT) + { + /* Enable ERR and NACK interrupts */ + tmpisr |= I2C_IT_ERRI | I2C_IT_NACKI; + } + + if (InterruptRequest == I2C_XFER_CPLT_IT) + { + /* Enable STOP interrupts */ + tmpisr |= I2C_IT_STOPI; + } + + if (InterruptRequest == I2C_XFER_RELOAD_IT) + { + /* Enable TC interrupts */ + tmpisr |= I2C_IT_TCI; + } + + /* Disable interrupts only at the end */ + /* to avoid a breaking situation like at "t" time */ + /* all disable interrupts request are not done */ + __HAL_I2C_DISABLE_IT(hi2c, tmpisr); +} + +/** + * @brief Convert I2Cx OTHER_xxx XferOptions to functional XferOptions. + * @param hi2c I2C handle. + * @retval None + */ +static void I2C_ConvertOtherXferOptions(I2C_HandleTypeDef *hi2c) +{ + /* if user set XferOptions to I2C_OTHER_FRAME */ + /* it request implicitly to generate a restart condition */ + /* set XferOptions to I2C_FIRST_FRAME */ + if (hi2c->XferOptions == I2C_OTHER_FRAME) + { + hi2c->XferOptions = I2C_FIRST_FRAME; + } + /* else if user set XferOptions to I2C_OTHER_AND_LAST_FRAME */ + /* it request implicitly to generate a restart condition */ + /* then generate a stop condition at the end of transfer */ + /* set XferOptions to I2C_FIRST_AND_LAST_FRAME */ + else if (hi2c->XferOptions == I2C_OTHER_AND_LAST_FRAME) + { + hi2c->XferOptions = I2C_FIRST_AND_LAST_FRAME; + } + else + { + /* Nothing to do */ + } +} + +/** + * @} + */ + +#endif /* HAL_I2C_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c new file mode 100644 index 0000000..eb31914 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c @@ -0,0 +1,354 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_i2c_ex.c + * @author MCD Application Team + * @brief I2C Extended HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of I2C Extended peripheral: + * + Filter Mode Functions + * + WakeUp Mode Functions + * + FastModePlus Functions + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### I2C peripheral Extended features ##### + ============================================================================== + + [..] Comparing to other previous devices, the I2C interface for STM32WBxx + devices contains the following additional features + + (+) Possibility to disable or enable Analog Noise Filter + (+) Use of a configured Digital Noise Filter + (+) Disable or enable wakeup from Stop mode(s) + (+) Disable or enable Fast Mode Plus + + ##### How to use this driver ##### + ============================================================================== + [..] This driver provides functions to configure Noise Filter and Wake Up Feature + (#) Configure I2C Analog noise filter using the function HAL_I2CEx_ConfigAnalogFilter() + (#) Configure I2C Digital noise filter using the function HAL_I2CEx_ConfigDigitalFilter() + (#) Configure the enable or disable of I2C Wake Up Mode using the functions : + (++) HAL_I2CEx_EnableWakeUp() + (++) HAL_I2CEx_DisableWakeUp() + (#) Configure the enable or disable of fast mode plus driving capability using the functions : + (++) HAL_I2CEx_EnableFastModePlus() + (++) HAL_I2CEx_DisableFastModePlus() + @endverbatim + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup I2CEx I2CEx + * @brief I2C Extended HAL module driver + * @{ + */ + +#ifdef HAL_I2C_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ + +/** @defgroup I2CEx_Exported_Functions I2C Extended Exported Functions + * @{ + */ + +/** @defgroup I2CEx_Exported_Functions_Group1 Filter Mode Functions + * @brief Filter Mode Functions + * +@verbatim + =============================================================================== + ##### Filter Mode Functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Configure Noise Filters + +@endverbatim + * @{ + */ + +/** + * @brief Configure I2C Analog noise filter. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2Cx peripheral. + * @param AnalogFilter New state of the Analog filter. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter) +{ + /* Check the parameters */ + assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); + assert_param(IS_I2C_ANALOG_FILTER(AnalogFilter)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY; + + /* Disable the selected I2C peripheral */ + __HAL_I2C_DISABLE(hi2c); + + /* Reset I2Cx ANOFF bit */ + hi2c->Instance->CR1 &= ~(I2C_CR1_ANFOFF); + + /* Set analog filter bit*/ + hi2c->Instance->CR1 |= AnalogFilter; + + __HAL_I2C_ENABLE(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Configure I2C Digital noise filter. + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2Cx peripheral. + * @param DigitalFilter Coefficient of digital noise filter between Min_Data=0x00 and Max_Data=0x0F. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter) +{ + uint32_t tmpreg; + + /* Check the parameters */ + assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance)); + assert_param(IS_I2C_DIGITAL_FILTER(DigitalFilter)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY; + + /* Disable the selected I2C peripheral */ + __HAL_I2C_DISABLE(hi2c); + + /* Get the old register value */ + tmpreg = hi2c->Instance->CR1; + + /* Reset I2Cx DNF bits [11:8] */ + tmpreg &= ~(I2C_CR1_DNF); + + /* Set I2Cx DNF coefficient */ + tmpreg |= DigitalFilter << 8U; + + /* Store the new register value */ + hi2c->Instance->CR1 = tmpreg; + + __HAL_I2C_ENABLE(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} +/** + * @} + */ + +/** @defgroup I2CEx_Exported_Functions_Group2 WakeUp Mode Functions + * @brief WakeUp Mode Functions + * +@verbatim + =============================================================================== + ##### WakeUp Mode Functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Configure Wake Up Feature + +@endverbatim + * @{ + */ + +/** + * @brief Enable I2C wakeup from Stop mode(s). + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2Cx peripheral. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp(I2C_HandleTypeDef *hi2c) +{ + /* Check the parameters */ + assert_param(IS_I2C_WAKEUP_FROMSTOP_INSTANCE(hi2c->Instance)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY; + + /* Disable the selected I2C peripheral */ + __HAL_I2C_DISABLE(hi2c); + + /* Enable wakeup from stop mode */ + hi2c->Instance->CR1 |= I2C_CR1_WUPEN; + + __HAL_I2C_ENABLE(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} + +/** + * @brief Disable I2C wakeup from Stop mode(s). + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * the configuration information for the specified I2Cx peripheral. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c) +{ + /* Check the parameters */ + assert_param(IS_I2C_WAKEUP_FROMSTOP_INSTANCE(hi2c->Instance)); + + if (hi2c->State == HAL_I2C_STATE_READY) + { + /* Process Locked */ + __HAL_LOCK(hi2c); + + hi2c->State = HAL_I2C_STATE_BUSY; + + /* Disable the selected I2C peripheral */ + __HAL_I2C_DISABLE(hi2c); + + /* Enable wakeup from stop mode */ + hi2c->Instance->CR1 &= ~(I2C_CR1_WUPEN); + + __HAL_I2C_ENABLE(hi2c); + + hi2c->State = HAL_I2C_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hi2c); + + return HAL_OK; + } + else + { + return HAL_BUSY; + } +} +/** + * @} + */ + +/** @defgroup I2CEx_Exported_Functions_Group3 Fast Mode Plus Functions + * @brief Fast Mode Plus Functions + * +@verbatim + =============================================================================== + ##### Fast Mode Plus Functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) Configure Fast Mode Plus + +@endverbatim + * @{ + */ + +/** + * @brief Enable the I2C fast mode plus driving capability. + * @param ConfigFastModePlus Selects the pin. + * This parameter can be one of the @ref I2CEx_FastModePlus values + * @note For I2C1, fast mode plus driving capability can be enabled on all selected + * I2C1 pins using I2C_FASTMODEPLUS_I2C1 parameter or independently + * on each one of the following pins PB6, PB7, PB8 and PB9. + * @note For remaining I2C1 pins (PA14, PA15...) fast mode plus driving capability + * can be enabled only by using I2C_FASTMODEPLUS_I2C1 parameter. + * @note For all I2C3 pins fast mode plus driving capability can be enabled + * only by using I2C_FASTMODEPLUS_I2C3 parameter. + * @retval None + */ +void HAL_I2CEx_EnableFastModePlus(uint32_t ConfigFastModePlus) +{ + /* Check the parameter */ + assert_param(IS_I2C_FASTMODEPLUS(ConfigFastModePlus)); + + /* Enable fast mode plus driving capability for selected pin */ + SET_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus); +} + +/** + * @brief Disable the I2C fast mode plus driving capability. + * @param ConfigFastModePlus Selects the pin. + * This parameter can be one of the @ref I2CEx_FastModePlus values + * @note For I2C1, fast mode plus driving capability can be disabled on all selected + * I2C1 pins using I2C_FASTMODEPLUS_I2C1 parameter or independently + * on each one of the following pins PB6, PB7, PB8 and PB9. + * @note For remaining I2C1 pins (PA14, PA15...) fast mode plus driving capability + * can be disabled only by using I2C_FASTMODEPLUS_I2C1 parameter. + * @note For all I2C3 pins fast mode plus driving capability can be disabled + * only by using I2C_FASTMODEPLUS_I2C3 parameter. + * @retval None + */ +void HAL_I2CEx_DisableFastModePlus(uint32_t ConfigFastModePlus) +{ + /* Check the parameter */ + assert_param(IS_I2C_FASTMODEPLUS(ConfigFastModePlus)); + + /* Disable fast mode plus driving capability for selected pin */ + CLEAR_BIT(SYSCFG->CFGR1, (uint32_t)ConfigFastModePlus); +} +/** + * @} + */ +/** + * @} + */ + +#endif /* HAL_I2C_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c new file mode 100644 index 0000000..22d16f8 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_ipcc.c @@ -0,0 +1,755 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_ipcc.c + * @author MCD Application Team + * @brief IPCC HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the Inter-Processor communication controller + * peripherals (IPCC). + * + Initialization and de-initialization functions + * + Configuration, notification and interrupts handling + * + Peripheral State and Error functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + The IPCC HAL driver can be used as follows: + + (#) Declare a IPCC_HandleTypeDef handle structure, for example: IPCC_HandleTypeDef hipcc; + (#) Initialize the IPCC low level resources by implementing the HAL_IPCC_MspInit() API: + (##) Enable the IPCC interface clock + (##) NVIC configuration if you need to use interrupt process + (+++) Configure the IPCC interrupt priority + (+++) Enable the NVIC IPCC IRQ + + (#) Initialize the IPCC registers by calling the HAL_IPCC_Init() API which trig + HAL_IPCC_MspInit(). + + (#) Implement the interrupt callbacks for transmission and reception to use the driver in interrupt mode + + (#) Associate those callback to the corresponding channel and direction using HAL_IPCC_ConfigChannel(). + This is the interrupt mode. + If no callback are configured for a given channel and direction, it is up to the user to poll the + status of the communication (polling mode). + + (#) Notify the other MCU when a message is available in a chosen channel + or when a message has been retrieved from a chosen channel by calling + the HAL_IPCC_NotifyCPU() API. + +@endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +#if defined(IPCC) +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup IPCC + * @{ + */ + +#ifdef HAL_IPCC_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/** @defgroup IPCC_Private_Constants IPCC Private Constants + * @{ + */ +#define IPCC_ALL_RX_BUF 0x0000003FU /*!< Mask for all RX buffers. */ +#define IPCC_ALL_TX_BUF 0x003F0000U /*!< Mask for all TX buffers. */ +#define CHANNEL_INDEX_MASK 0x0000000FU /*!< Mask the channel index to avoid overflow */ +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup IPCC_Private_Functions IPCC Private Functions + * @{ + */ +void IPCC_MaskInterrupt(uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); +void IPCC_UnmaskInterrupt(uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); +void IPCC_SetDefaultCallbacks(IPCC_HandleTypeDef *hipcc); +void IPCC_Reset_Register(IPCC_CommonTypeDef *Instance); +/** + * @} + */ + +/** @addtogroup IPCC_Exported_Functions + * @{ + */ + +/** @addtogroup IPCC_Exported_Functions_Group1 + * @brief Initialization and de-initialization functions + * +@verbatim + =============================================================================== + ##### Initialization and de-initialization functions ##### + =============================================================================== + [..] This subsection provides a set of functions allowing to initialize and + deinitialize the IPCC peripheral: + + (+) User must Implement HAL_IPCC_MspInit() function in which he configures + all related peripherals resources (CLOCK and NVIC ). + + (+) Call the function HAL_IPCC_Init() to configure the IPCC register. + + (+) Call the function HAL_PKA_DeInit() to restore the default configuration + of the selected IPCC peripheral. + +@endverbatim + * @{ + */ + +/** + * @brief Initialize the IPCC peripheral. + * @param hipcc IPCC handle + * @retval HAL status + */ +HAL_StatusTypeDef HAL_IPCC_Init(IPCC_HandleTypeDef *hipcc) +{ + HAL_StatusTypeDef err = HAL_OK; + + /* Check the IPCC handle allocation */ + if (hipcc != NULL) + { + /* Check the parameters */ + assert_param(IS_IPCC_ALL_INSTANCE(hipcc->Instance)); + + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + + if (hipcc->State == HAL_IPCC_STATE_RESET) + { + /* Init the low level hardware : CLOCK, NVIC */ + HAL_IPCC_MspInit(hipcc); + } + + /* Reset all registers of the current cpu to default state */ + IPCC_Reset_Register(currentInstance); + + /* Activate the interrupts */ + currentInstance->CR |= (IPCC_CR_RXOIE | IPCC_CR_TXFIE); + + /* Clear callback pointers */ + IPCC_SetDefaultCallbacks(hipcc); + + /* Reset all callback notification request */ + hipcc->callbackRequest = 0; + + hipcc->State = HAL_IPCC_STATE_READY; + } + else + { + err = HAL_ERROR; + } + + return err; +} + +/** + * @brief DeInitialize the IPCC peripheral. + * @param hipcc IPCC handle + * @retval HAL status + */ +HAL_StatusTypeDef HAL_IPCC_DeInit(IPCC_HandleTypeDef *hipcc) +{ + HAL_StatusTypeDef err = HAL_OK; + + /* Check the IPCC handle allocation */ + if (hipcc != NULL) + { + assert_param(IS_IPCC_ALL_INSTANCE(hipcc->Instance)); + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + + /* Set the state to busy */ + hipcc->State = HAL_IPCC_STATE_BUSY; + + /* Reset all registers of the current cpu to default state */ + IPCC_Reset_Register(currentInstance); + + /* Clear callback pointers */ + IPCC_SetDefaultCallbacks(hipcc); + + /* Reset all callback notification request */ + hipcc->callbackRequest = 0; + + /* DeInit the low level hardware : CLOCK, NVIC */ + HAL_IPCC_MspDeInit(hipcc); + + hipcc->State = HAL_IPCC_STATE_RESET; + } + else + { + err = HAL_ERROR; + } + + return err; +} + +/** + * @brief Initialize the IPCC MSP. + * @param hipcc IPCC handle + * @retval None + */ +__weak void HAL_IPCC_MspInit(IPCC_HandleTypeDef *hipcc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hipcc); + + /* NOTE : This function should not be modified. When the callback is needed + the HAL_IPCC_MspInit should be implemented in the user file + */ +} + +/** + * @brief IPCC MSP DeInit + * @param hipcc IPCC handle + * @retval None + */ +__weak void HAL_IPCC_MspDeInit(IPCC_HandleTypeDef *hipcc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hipcc); + + /* NOTE : This function should not be modified. When the callback is needed + the HAL_IPCC_MspDeInit should be implemented in the user file + */ +} + +/** + * @} + */ + + +/** @addtogroup IPCC_Exported_Functions_Group2 + * @brief Configuration, notification and Irq handling functions. + * +@verbatim + =============================================================================== + ##### IO operation functions ##### + =============================================================================== + [..] This section provides functions to allow two MCU to communicate. + + (#) For a given channel (from 0 to IPCC_CHANNEL_NUMBER), for a given direction + IPCC_CHANNEL_DIR_TX or IPCC_CHANNEL_DIR_RX, you can choose to communicate + in polling mode or in interrupt mode using IPCC. + By default, the IPCC HAL driver handle the communication in polling mode. + By setting a callback for a channel/direction, this communication use + the interrupt mode. + + (#) Polling mode: + (++) To transmit information, use HAL_IPCC_NotifyCPU() with + IPCC_CHANNEL_DIR_TX. To know when the other processor has handled + the notification, poll the communication using HAL_IPCC_NotifyCPU + with IPCC_CHANNEL_DIR_TX. + + (++) To receive information, poll the status of the communication with + HAL_IPCC_GetChannelStatus with IPCC_CHANNEL_DIR_RX. To notify the other + processor that the information has been received, use HAL_IPCC_NotifyCPU + with IPCC_CHANNEL_DIR_RX. + + (#) Interrupt mode: + (++) Configure a callback for the channel and the direction using HAL_IPCC_ConfigChannel(). + This callback will be triggered under interrupt. + + (++) To transmit information, use HAL_IPCC_NotifyCPU() with + IPCC_CHANNEL_DIR_TX. The callback configured with HAL_IPCC_ConfigChannel() and + IPCC_CHANNEL_DIR_TX will be triggered once the communication has been handled by the + other processor. + + (++) To receive information, the callback configured with HAL_IPCC_ConfigChannel() and + IPCC_CHANNEL_DIR_RX will be triggered on reception of a communication.To notify the other + processor that the information has been received, use HAL_IPCC_NotifyCPU + with IPCC_CHANNEL_DIR_RX. + + (++) HAL_IPCC_TX_IRQHandler must be added to the IPCC TX IRQHandler + + (++) HAL_IPCC_RX_IRQHandler must be added to the IPCC RX IRQHandler +@endverbatim + * @{ + */ + +/** + * @brief Activate the callback notification on receive/transmit interrupt + * @param hipcc IPCC handle + * @param ChannelIndex Channel number + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + * @param cb Interrupt callback + * @retval HAL status + */ +HAL_StatusTypeDef HAL_IPCC_ActivateNotification(IPCC_HandleTypeDef *hipcc, + uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir, + ChannelCb cb) +{ + HAL_StatusTypeDef err = HAL_OK; + + /* Check the IPCC handle allocation */ + if (hipcc != NULL) + { + /* Check the parameters */ + assert_param(IS_IPCC_ALL_INSTANCE(hipcc->Instance)); + + /* Check IPCC state */ + if (hipcc->State == HAL_IPCC_STATE_READY) + { + /* Set callback and register masking information */ + if (ChannelDir == IPCC_CHANNEL_DIR_TX) + { + hipcc->ChannelCallbackTx[ChannelIndex] = cb; + hipcc->callbackRequest |= (IPCC_MR_CH1FM_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } + else + { + hipcc->ChannelCallbackRx[ChannelIndex] = cb; + hipcc->callbackRequest |= (IPCC_MR_CH1OM_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } + + /* Unmask only the channels in reception (Transmission channel mask/unmask is done in HAL_IPCC_NotifyCPU) */ + if (ChannelDir == IPCC_CHANNEL_DIR_RX) + { + IPCC_UnmaskInterrupt(ChannelIndex, ChannelDir); + } + } + else + { + err = HAL_ERROR; + } + } + else + { + err = HAL_ERROR; + } + return err; +} + +/** + * @brief Remove the callback notification on receive/transmit interrupt + * @param hipcc IPCC handle + * @param ChannelIndex Channel number + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + * @retval HAL status + */ +HAL_StatusTypeDef HAL_IPCC_DeActivateNotification(IPCC_HandleTypeDef *hipcc, + uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + HAL_StatusTypeDef err = HAL_OK; + + /* Check the IPCC handle allocation */ + if (hipcc != NULL) + { + /* Check the parameters */ + assert_param(IS_IPCC_ALL_INSTANCE(hipcc->Instance)); + + /* Check IPCC state */ + if (hipcc->State == HAL_IPCC_STATE_READY) + { + /* Set default callback and register masking information */ + if (ChannelDir == IPCC_CHANNEL_DIR_TX) + { + hipcc->ChannelCallbackTx[ChannelIndex] = HAL_IPCC_TxCallback; + hipcc->callbackRequest &= ~(IPCC_MR_CH1FM_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } + else + { + hipcc->ChannelCallbackRx[ChannelIndex] = HAL_IPCC_RxCallback; + hipcc->callbackRequest &= ~(IPCC_MR_CH1OM_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } + + /* Mask the interrupt */ + IPCC_MaskInterrupt(ChannelIndex, ChannelDir); + } + else + { + err = HAL_ERROR; + } + } + else + { + err = HAL_ERROR; + } + return err; +} + +/** + * @brief Get state of IPCC channel + * @param hipcc IPCC handle + * @param ChannelIndex Channel number + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + * @retval Channel status + */ +IPCC_CHANNELStatusTypeDef HAL_IPCC_GetChannelStatus(IPCC_HandleTypeDef const *const hipcc, + uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + uint32_t channel_state; + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + IPCC_CommonTypeDef *otherInstance = IPCC_C2; + + /* Check the parameters */ + assert_param(IS_IPCC_ALL_INSTANCE(hipcc->Instance)); + + /* Read corresponding channel depending of the MCU and the direction */ + if (ChannelDir == IPCC_CHANNEL_DIR_TX) + { + channel_state = (currentInstance->SR) & (IPCC_SR_CH1F_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } + else + { + channel_state = (otherInstance->SR) & (IPCC_SR_CH1F_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } + + return (channel_state == 0UL) ? IPCC_CHANNEL_STATUS_FREE : IPCC_CHANNEL_STATUS_OCCUPIED ; +} + +/** + * @brief Notify remote processor + * @param hipcc IPCC handle + * @param ChannelIndex Channel number + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + * @retval HAL status + */ +HAL_StatusTypeDef HAL_IPCC_NotifyCPU(IPCC_HandleTypeDef const *const hipcc, + uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + HAL_StatusTypeDef err = HAL_OK; + uint32_t mask; + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + + /* Check the parameters */ + assert_param(IS_IPCC_ALL_INSTANCE(hipcc->Instance)); + + /* Check if IPCC is initialized */ + if (hipcc->State == HAL_IPCC_STATE_READY) + { + /* For IPCC_CHANNEL_DIR_TX, set the status. For IPCC_CHANNEL_DIR_RX, clear the status */ + currentInstance->SCR |= ((ChannelDir == IPCC_CHANNEL_DIR_TX) ? IPCC_SCR_CH1S : + IPCC_SCR_CH1C) + << (ChannelIndex & CHANNEL_INDEX_MASK); + + /* Unmask interrupt if the callback is requested */ + mask = ((ChannelDir == IPCC_CHANNEL_DIR_TX) ? IPCC_MR_CH1FM_Msk : + IPCC_MR_CH1OM_Msk) << (ChannelIndex & CHANNEL_INDEX_MASK); + if ((hipcc->callbackRequest & mask) == mask) + { + IPCC_UnmaskInterrupt(ChannelIndex, ChannelDir); + } + } + else + { + err = HAL_ERROR; + } + + return err; +} + +/** + * @} + */ + +/** @addtogroup IPCC_IRQ_Handler_and_Callbacks + * @{ + */ + +/** + * @brief This function handles IPCC Tx Free interrupt request. + * @param hipcc IPCC handle + * @retval None + */ +void HAL_IPCC_TX_IRQHandler(IPCC_HandleTypeDef *const hipcc) +{ + uint32_t irqmask; + uint32_t bit_pos; + uint32_t ch_count = 0U; + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + + /* check the Tx free channels which are not masked */ + irqmask = ~(currentInstance->MR) & IPCC_ALL_TX_BUF; + irqmask = irqmask & ~(currentInstance->SR << IPCC_MR_CH1FM_Pos); + + while (irqmask != 0UL) /* if several bits are set, it loops to serve all of them */ + { + bit_pos = 1UL << (IPCC_MR_CH1FM_Pos + (ch_count & CHANNEL_INDEX_MASK)); + + if ((irqmask & bit_pos) != 0U) + { + /* mask the channel Free interrupt */ + currentInstance->MR |= bit_pos; + if (hipcc->ChannelCallbackTx[ch_count] != NULL) + { + hipcc->ChannelCallbackTx[ch_count](hipcc, ch_count, IPCC_CHANNEL_DIR_TX); + } + irqmask = irqmask & ~(bit_pos); + } + ch_count++; + } +} + +/** + * @brief This function handles IPCC Rx Occupied interrupt request. + * @param hipcc : IPCC handle + * @retval None + */ +void HAL_IPCC_RX_IRQHandler(IPCC_HandleTypeDef *const hipcc) +{ + uint32_t irqmask; + uint32_t bit_pos; + uint32_t ch_count = 0U; + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + IPCC_CommonTypeDef *otherInstance = IPCC_C2; + + /* check the Rx occupied channels which are not masked */ + irqmask = ~(currentInstance->MR) & IPCC_ALL_RX_BUF; + irqmask = irqmask & otherInstance->SR; + + while (irqmask != 0UL) /* if several bits are set, it loops to serve all of them */ + { + bit_pos = 1UL << (ch_count & CHANNEL_INDEX_MASK); + + if ((irqmask & bit_pos) != 0U) + { + /* mask the channel occupied interrupt */ + currentInstance->MR |= bit_pos; + if (hipcc->ChannelCallbackRx[ch_count] != NULL) + { + hipcc->ChannelCallbackRx[ch_count](hipcc, ch_count, IPCC_CHANNEL_DIR_RX); + } + irqmask = irqmask & ~(bit_pos); + } + ch_count++; + } +} + +/** + * @brief Rx occupied callback + * @param hipcc IPCC handle + * @param ChannelIndex Channel number + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + */ +__weak void HAL_IPCC_RxCallback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hipcc); + UNUSED(ChannelIndex); + UNUSED(ChannelDir); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_IPCC_RxCallback can be implemented in the user file + */ +} + +/** + * @brief Tx free callback + * @param hipcc IPCC handle + * @param ChannelIndex Channel number + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + */ +__weak void HAL_IPCC_TxCallback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hipcc); + UNUSED(ChannelIndex); + UNUSED(ChannelDir); + + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_IPCC_TxCallback can be implemented in the user file + */ +} + +/** + * @} + */ + +/** @addtogroup IPCC_Exported_Functions_Group3 + * @brief IPCC Peripheral State and Error functions + * +@verbatim + ============================================================================== + ##### Peripheral State and Error functions ##### + ============================================================================== + [..] + This subsection permit to get in run-time the status of the peripheral + and the data flow. + +@endverbatim + * @{ + */ + +/** + * @brief Return the IPCC handle state. + * @param hipcc IPCC handle + * @retval IPCC handle state + */ +HAL_IPCC_StateTypeDef HAL_IPCC_GetState(IPCC_HandleTypeDef const *const hipcc) +{ + return hipcc->State; +} + +/** + * @} + */ + +/** + * @} + */ + +/** @addtogroup IPCC_Private_Functions + * @{ + */ + +/** + * @brief Mask IPCC interrupts. + * @param ChannelIndex Channel number + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + */ +void IPCC_MaskInterrupt(uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + if (ChannelDir == IPCC_CHANNEL_DIR_TX) + { + /* Mask interrupt */ + currentInstance->MR |= (IPCC_MR_CH1FM_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } + else + { + /* Mask interrupt */ + currentInstance->MR |= (IPCC_MR_CH1OM_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } +} +/** + * @brief Unmask IPCC interrupts. + * @param ChannelIndex Channel number + * This parameter can be one of the following values: + * @arg IPCC_CHANNEL_1: IPCC Channel 1 + * @arg IPCC_CHANNEL_2: IPCC Channel 2 + * @arg IPCC_CHANNEL_3: IPCC Channel 3 + * @arg IPCC_CHANNEL_4: IPCC Channel 4 + * @arg IPCC_CHANNEL_5: IPCC Channel 5 + * @arg IPCC_CHANNEL_6: IPCC Channel 6 + * @param ChannelDir Channel direction + */ +void IPCC_UnmaskInterrupt(uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) +{ + IPCC_CommonTypeDef *currentInstance = IPCC_C1; + if (ChannelDir == IPCC_CHANNEL_DIR_TX) + { + /* Unmask interrupt */ + currentInstance->MR &= ~(IPCC_MR_CH1FM_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } + else + { + /* Unmask interrupt */ + currentInstance->MR &= ~(IPCC_MR_CH1OM_Msk << (ChannelIndex & CHANNEL_INDEX_MASK)); + } +} + +/** + * @brief Reset all callbacks of the handle to NULL. + * @param hipcc IPCC handle + */ +void IPCC_SetDefaultCallbacks(IPCC_HandleTypeDef *hipcc) +{ + uint32_t i; + /* Set all callbacks to default */ + for (i = 0; i < IPCC_CHANNEL_NUMBER; i++) + { + hipcc->ChannelCallbackRx[i] = HAL_IPCC_RxCallback; + hipcc->ChannelCallbackTx[i] = HAL_IPCC_TxCallback; + } +} + +/** + * @brief Reset IPCC register to default value for the concerned instance. + * @param Instance pointer to register + */ +void IPCC_Reset_Register(IPCC_CommonTypeDef *Instance) +{ + /* Disable RX and TX interrupts */ + Instance->CR = 0x00000000U; + + /* Mask RX and TX interrupts */ + Instance->MR = (IPCC_ALL_TX_BUF | IPCC_ALL_RX_BUF); + + /* Clear RX status */ + Instance->SCR = IPCC_ALL_RX_BUF; +} + +/** + * @} + */ + +#endif /* HAL_IPCC_MODULE_ENABLED */ + +/** + * @} + */ + +/** + * @} + */ +#endif /* IPCC */ + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c new file mode 100644 index 0000000..baeddf4 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c @@ -0,0 +1,742 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_pwr.c + * @author MCD Application Team + * @brief PWR HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the Power Controller (PWR) peripheral: + * + Initialization/de-initialization functions + * + Peripheral Control functions + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup PWR + * @{ + */ + +#ifdef HAL_PWR_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/** @addtogroup PWR_Private_Defines + * @{ + */ + +/** @defgroup PWR_Register_Reset_Values PWR Register Reset Values + * @{ + */ +/* Definitions of PWR registers reset value */ +#define PWR_CR1_RESET_VALUE (0x00000200U) +#define PWR_CR2_RESET_VALUE (0x00000000U) +#define PWR_CR3_RESET_VALUE (0x00008000U) +#define PWR_CR4_RESET_VALUE (0x00000000U) +#define PWR_CR5_RESET_VALUE (0x00004204U) +#define PWR_PUCRA_RESET_VALUE (0x00000000U) +#define PWR_PDCRA_RESET_VALUE (0x00000000U) +#define PWR_PUCRB_RESET_VALUE (0x00000000U) +#define PWR_PDCRB_RESET_VALUE (0x00000000U) +#define PWR_PUCRC_RESET_VALUE (0x00000000U) +#define PWR_PDCRC_RESET_VALUE (0x00000000U) +#define PWR_PUCRD_RESET_VALUE (0x00000000U) +#define PWR_PDCRD_RESET_VALUE (0x00000000U) +#define PWR_PUCRE_RESET_VALUE (0x00000000U) +#define PWR_PDCRE_RESET_VALUE (0x00000000U) +#define PWR_PUCRH_RESET_VALUE (0x00000000U) +#define PWR_PDCRH_RESET_VALUE (0x00000000U) +#define PWR_C2CR1_RESET_VALUE (0x00000000U) +#define PWR_C2CR3_RESET_VALUE (0x00008000U) +/** + * @} + */ + +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup PWR_Exported_Functions PWR Exported Functions + * @{ + */ + +/** @addtogroup PWR_Exported_Functions_Group1 Initialization and de-initialization functions + * @brief Initialization and de-initialization functions + * +@verbatim + =============================================================================== + ##### Initialization and de-initialization functions ##### + =============================================================================== + [..] + +@endverbatim + * @{ + */ + +/** + * @brief Deinitialize the HAL PWR peripheral registers to their default reset values. + * @retval None + */ +void HAL_PWR_DeInit(void) +{ + /* Apply reset values to all PWR registers */ + /* Note: Update of each register required since PWR global reset is not */ + /* available at RCC level on this STM32 series. */ + LL_PWR_WriteReg(CR1, PWR_CR1_RESET_VALUE); + LL_PWR_WriteReg(CR2, PWR_CR2_RESET_VALUE); + LL_PWR_WriteReg(CR3, PWR_CR3_RESET_VALUE); + LL_PWR_WriteReg(CR4, PWR_CR4_RESET_VALUE); + LL_PWR_WriteReg(CR5, PWR_CR5_RESET_VALUE); + LL_PWR_WriteReg(PUCRA, PWR_PUCRA_RESET_VALUE); + LL_PWR_WriteReg(PDCRA, PWR_PDCRA_RESET_VALUE); + LL_PWR_WriteReg(PUCRB, PWR_PUCRB_RESET_VALUE); + LL_PWR_WriteReg(PDCRB, PWR_PDCRB_RESET_VALUE); + LL_PWR_WriteReg(PUCRC, PWR_PUCRC_RESET_VALUE); + LL_PWR_WriteReg(PDCRC, PWR_PDCRC_RESET_VALUE); +#if defined(GPIOD) + LL_PWR_WriteReg(PUCRD, PWR_PUCRD_RESET_VALUE); + LL_PWR_WriteReg(PDCRD, PWR_PDCRD_RESET_VALUE); +#endif /* GPIOD */ + LL_PWR_WriteReg(PUCRE, PWR_PUCRE_RESET_VALUE); + LL_PWR_WriteReg(PDCRE, PWR_PDCRE_RESET_VALUE); + LL_PWR_WriteReg(PUCRH, PWR_PUCRH_RESET_VALUE); + LL_PWR_WriteReg(PDCRH, PWR_PDCRH_RESET_VALUE); + LL_PWR_WriteReg(C2CR1, PWR_C2CR1_RESET_VALUE); + LL_PWR_WriteReg(C2CR3, PWR_C2CR3_RESET_VALUE); + + /* Clear all flags */ +#if defined(PWR_CR3_E802A) && defined(PWR_CR5_SMPSEN) + LL_PWR_WriteReg(SCR, + LL_PWR_SCR_CC2HF + | LL_PWR_SCR_CBLEAF + | LL_PWR_SCR_CCRPEF + | LL_PWR_SCR_C802AF + | LL_PWR_SCR_C802WUF + | LL_PWR_SCR_CBLEWUF + | LL_PWR_SCR_CBORHF + | LL_PWR_SCR_CSMPSFBF + | LL_PWR_SCR_CWUF); +#elif defined(PWR_CR3_E802A) + LL_PWR_WriteReg(SCR, + LL_PWR_SCR_CC2HF + | LL_PWR_SCR_CBLEAF + | LL_PWR_SCR_CCRPEF + | LL_PWR_SCR_C802AF + | LL_PWR_SCR_C802WUF + | LL_PWR_SCR_CBLEWUF + | LL_PWR_SCR_CWUF); +#elif defined(PWR_CR5_SMPSEN) + LL_PWR_WriteReg(SCR, + LL_PWR_SCR_CC2HF + | LL_PWR_SCR_CBLEAF + | LL_PWR_SCR_CCRPEF + | LL_PWR_SCR_CBLEWUF + | LL_PWR_SCR_CBORHF + | LL_PWR_SCR_CSMPSFBF + | LL_PWR_SCR_CWUF); +#else + LL_PWR_WriteReg(SCR, + LL_PWR_SCR_CC2HF + | LL_PWR_SCR_CBLEAF + | LL_PWR_SCR_CCRPEF + | LL_PWR_SCR_CBLEWUF + | LL_PWR_SCR_CWUF); +#endif + + LL_PWR_WriteReg(EXTSCR, + LL_PWR_EXTSCR_CCRPF + | LL_PWR_EXTSCR_C2CSSF + | LL_PWR_EXTSCR_C1CSSF + ); +} + + +/** + * @brief Enable access to the backup domain + * (RTC registers, RTC backup data registers). + * @note After reset, the backup domain is protected against + * possible unwanted write accesses. + * @note RTCSEL that sets the RTC clock source selection is in the RTC back-up domain. + * In order to set or modify the RTC clock, the backup domain access must be + * disabled. + * @note LSEON bit that switches on and off the LSE crystal belongs as well to the + * back-up domain. + * @retval None + */ +void HAL_PWR_EnableBkUpAccess(void) +{ + SET_BIT(PWR->CR1, PWR_CR1_DBP); +} + +/** + * @brief Disable access to the backup domain + * (RTC registers, RTC backup data registers). + * @retval None + */ +void HAL_PWR_DisableBkUpAccess(void) +{ + CLEAR_BIT(PWR->CR1, PWR_CR1_DBP); +} + +/** + * @} + */ + + +/** @addtogroup PWR_Exported_Functions_Group2 Peripheral Control functions + * @brief Low Power modes configuration functions + * +@verbatim + + =============================================================================== + ##### Peripheral Control functions ##### + =============================================================================== + + [..] + *** PVD configuration *** + ========================= + [..] + (+) The PVD is used to monitor the VDD power supply by comparing it to a + threshold selected by the PVD Level (PLS[2:0] bits in PWR_CR2 register). + (+) PVDO flag is available to indicate if VDD/VDDA is higher or lower + than the PVD threshold. This event is internally connected to the EXTI + line16 and can generate an interrupt if enabled. This is done through + __HAL_PVD_EXTI_ENABLE_IT() macro. + (+) The PVD is stopped in Standby mode. + + *** WakeUp pin configuration *** + ================================ + [..] + (+) WakeUp pins are used to wakeup the system from Standby mode or Shutdown mode. + The polarity of these pins can be set to configure event detection on high + level (rising edge) or low level (falling edge). + + *** Low Power modes configuration *** + ===================================== + [..] + The devices feature 8 low-power modes: + + (+) Low-power Run mode: core and peripherals are running, main regulator off, low power regulator on. + + (+) Sleep mode: Cortex-M4 core stopped, peripherals kept running, main and low power regulators on. + (+) Low-power Sleep mode: Cortex-M4 core stopped, peripherals kept running, main regulator off, low power regulator on. + + (+) Stop 0 mode: all clocks are stopped except LSI and LSE, main and low power regulators on. + (+) Stop 1 mode: all clocks are stopped except LSI and LSE, main regulator off, low power regulator on. + (+) Stop 2 mode: all clocks are stopped except LSI and LSE, main regulator off, low power regulator on, reduced set of waking up IPs compared to Stop 1 mode. + + (+) Standby mode with SRAM2a: all clocks are stopped except LSI and LSE, SRAM2a content preserved, main regulator off, low power regulator on. + Note: On devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx retention is extended to SRAM1, SRAM2a, SRAM2b. + (+) Standby mode without SRAM2a: all clocks are stopped except LSI and LSE, main and low power regulators off. + + (+) Shutdown mode: all clocks are stopped except LSE, main and low power regulators off. + + + *** Low-power run mode *** + ========================== + [..] + (+) Entry: (from main run mode) + (++) set LPR bit with HAL_PWREx_EnableLowPowerRunMode() API after having decreased the system clock below 2 MHz. + (+) Exit: + (++) clear LPR bit then wait for REGLP bit to be reset with HAL_PWREx_DisableLowPowerRunMode() API. Only + then can the system clock frequency be increased above 2 MHz. + + *** Sleep mode / Low-power sleep mode *** + ========================================= + [..] + (+) Entry: + The Sleep mode / Low-power Sleep mode is entered thru HAL_PWR_EnterSLEEPMode() API + in specifying whether or not the regulator is forced to low-power mode and if exit is interrupt or event-triggered. + (++) PWR_MAINREGULATOR_ON: Sleep mode (regulator in main mode). + (++) PWR_LOWPOWERREGULATOR_ON: Low-power sleep (regulator in low power mode). + In the latter case, the system clock frequency must have been decreased below 2 MHz beforehand. + (++) PWR_SLEEPENTRY_WFI: enter SLEEP mode with WFI instruction + (++) PWR_SLEEPENTRY_WFE: enter SLEEP mode with WFE instruction + + (+) WFI Exit: + (++) Any peripheral interrupt acknowledged by the nested vectored interrupt + controller (NVIC) or any wake-up event. + + (+) WFE Exit: + (++) Any wake-up event such as an EXTI line configured in event mode. + + [..] When exiting the Low-power sleep mode by issuing an interrupt or a wakeup event, + the MCU is in Low-power Run mode. + + *** Stop 0, Stop 1 and Stop 2 modes *** + =============================== + [..] + (+) Entry: + The Stop 0, Stop 1 or Stop 2 modes are entered thru the following API's: + (++) HAL_PWREx_EnterSTOP0Mode() for mode 0, HAL_PWREx_EnterSTOP1Mode() for mode 1, HAL_PWREx_EnterSTOP2Mode() for mode 2 + or for porting reasons HAL_PWR_EnterSTOPMode(). + Note: Low power Stop2 mode is not available on devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx. + + (+) Regulator setting (applicable to HAL_PWR_EnterSTOPMode() only): + (++) PWR_MAINREGULATOR_ON: Regulator in main mode (STOP0 mode) + (++) PWR_LOWPOWERREGULATOR_ON: Regulator in low-power mode (STOP1 mode) + (+) Exit (interrupt or event-triggered, specified when entering STOP mode): + (++) PWR_STOPENTRY_WFI: enter Stop mode with WFI instruction + (++) PWR_STOPENTRY_WFE: enter Stop mode with WFE instruction + (+) WFI Exit: + (++) Any EXTI Line (Internal or External) configured in Interrupt mode. + (++) Some specific communication peripherals (USART, LPUART, I2C) interrupts + when programmed in wakeup mode. + (+) WFE Exit: + (++) Any EXTI Line (Internal or External) configured in Event mode. + + [..] + When exiting Stop 0 and Stop 1 modes, the MCU is either in Run mode or in Low-power Run mode + depending on the LPR bit setting. + When exiting Stop 2 mode, the MCU is in Run mode. + + *** Standby mode *** + ==================== + [..] The Standby mode offers two options: + (+) option a) all clocks off except LSI and LSE, RRS bit set (keeps voltage regulator in low power mode). + SRAM and registers contents are lost except for the SRAM2 content, the RTC registers, RTC backup registers + and Standby circuitry. + (+) option b) all clocks off except LSI and LSE, RRS bit cleared (voltage regulator then disabled). + SRAM and register contents are lost except for the RTC registers, RTC backup registers + and Standby circuitry. + + (++) Entry: + (+++) The Standby mode is entered thru HAL_PWR_EnterSTANDBYMode() API. + SRAM1 and register contents are lost except for registers in the Backup domain and + Standby circuitry. SRAM2 content can be preserved if the bit RRS is set in PWR_CR3 register. + To enable this feature, the user can resort to HAL_PWREx_EnableBKRAMContentRetention() API + to set RRS bit. + (++) Exit: + (+++) WKUP pin rising edge, RTC alarm or wakeup, tamper event, time-stamp event, + external reset in NRST pin, IWDG reset. + [..] After waking up from Standby mode, program execution restarts in the same way as after a Reset. + + + *** Shutdown mode *** + ====================== + [..] + In Shutdown mode, + voltage regulator is disabled, all clocks are off except LSE, RRS bit is cleared. + SRAM and registers contents are lost except for backup domain registers. + (+) Entry: + The Shutdown mode is entered thru HAL_PWREx_EnterSHUTDOWNMode() API. + (+) Exit: + (++) WKUP pin rising edge, RTC alarm or wakeup, tamper event, time-stamp event, + external reset in NRST pin. + [..] After waking up from Shutdown mode, program execution restarts in the same way as after a Reset. + + + *** Auto-wakeup (AWU) from low-power mode *** + ============================================= + [..] + The MCU can be woken up from low-power mode by an RTC Alarm event, an RTC + Wakeup event, a tamper event or a time-stamp event, without depending on + an external interrupt (Auto-wakeup mode). + + (+) RTC auto-wakeup (AWU) from the Stop, Standby and Shutdown modes + + + (++) To wake up from the Stop mode with an RTC alarm event, it is necessary to + configure the RTC to generate the RTC alarm using the HAL_RTC_SetAlarm_IT() function. + + (++) To wake up from the Stop mode with an RTC Tamper or time stamp event, it + is necessary to configure the RTC to detect the tamper or time stamp event using the + HAL_RTCEx_SetTimeStamp_IT() or HAL_RTCEx_SetTamper_IT() functions. + + (++) To wake up from the Stop mode with an RTC WakeUp event, it is necessary to + configure the RTC to generate the RTC WakeUp event using the HAL_RTCEx_SetWakeUpTimer_IT() function. + +@endverbatim + * @{ + */ + +/** + * @brief Configure the voltage threshold detected by the Power Voltage Detector (PVD). + * @param sConfigPVD pointer to a PWR_PVDTypeDef structure that contains the PVD + * configuration information. + * @note Refer to the electrical characteristics of your device datasheet for + * more details about the voltage thresholds corresponding to each + * detection level. + * @note If "sConfigPVD->Mode" is set to PVD_MODE_IT, + * wake-up target is set by default to wake-up target CPU1. + * To select wake-up target to CPU2, additional configuration must be + * performed using macro "__HAL_PWR_PVD_EXTIC2_ENABLE_IT()" + * (and optionally, to select CPU2 only (not both CPU1 and CPU2): + * "__HAL_PWR_PVD_EXTI_DISABLE_IT()"). + * @retval None + */ +HAL_StatusTypeDef HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD) +{ + /* Check the parameters */ + assert_param(IS_PWR_PVD_LEVEL(sConfigPVD->PVDLevel)); + assert_param(IS_PWR_PVD_MODE(sConfigPVD->Mode)); + + /* Set PLS bits according to PVDLevel value */ + MODIFY_REG(PWR->CR2, PWR_CR2_PLS, sConfigPVD->PVDLevel); + + /* Clear any previous config. Keep it clear if no event or IT mode is selected */ + + /* Note: On STM32WB series, power PVD event is not available on AIEC lines */ + /* (only interruption is available through AIEC line 16). */ + __HAL_PWR_PVD_EXTI_DISABLE_IT(); /*CPU1*/ + __HAL_PWR_PVD_EXTIC2_DISABLE_IT(); /*CPU2*/ + + __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE(); + __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE(); + + /* Configure interrupt mode */ + if ((sConfigPVD->Mode & PVD_MODE_IT) == PVD_MODE_IT) + { + /* Set CPU1 as wakeup target */ + __HAL_PWR_PVD_EXTI_ENABLE_IT(); + } + + /* Configure the edge */ + if ((sConfigPVD->Mode & PVD_RISING_EDGE) == PVD_RISING_EDGE) + { + __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE(); + } + + if ((sConfigPVD->Mode & PVD_FALLING_EDGE) == PVD_FALLING_EDGE) + { + __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE(); + } + + return HAL_OK; +} + +/** + * @brief Enables the Power Voltage Detector(PVD). + * @retval None + */ +void HAL_PWR_EnablePVD(void) +{ + /* Enable the power voltage detector */ + SET_BIT(PWR->CR2, PWR_CR2_PVDE); +} + +/** + * @brief Disables the Power Voltage Detector(PVD). + * @retval None + */ +void HAL_PWR_DisablePVD(void) +{ + /* Disable the power voltage detector */ + CLEAR_BIT(PWR->CR2, PWR_CR2_PVDE); +} + + +/** + * @brief Enable the WakeUp PINx functionality. + * @param WakeUpPinPolarity Specifies which Wake-Up pin to enable. + * This parameter can be one of the following legacy values which set the default polarity + * i.e. detection on high level (rising edge): + * @arg @ref PWR_WAKEUP_PIN1, PWR_WAKEUP_PIN2, PWR_WAKEUP_PIN3, PWR_WAKEUP_PIN4, PWR_WAKEUP_PIN5 + * + * or one of the following value where the user can explicitly specify the enabled pin and + * the chosen polarity: + * @arg @ref PWR_WAKEUP_PIN1_HIGH or PWR_WAKEUP_PIN1_LOW + * @arg @ref PWR_WAKEUP_PIN2_HIGH or PWR_WAKEUP_PIN2_LOW + * @arg @ref PWR_WAKEUP_PIN3_HIGH or PWR_WAKEUP_PIN3_LOW + * @arg @ref PWR_WAKEUP_PIN4_HIGH or PWR_WAKEUP_PIN4_LOW + * @arg @ref PWR_WAKEUP_PIN5_HIGH or PWR_WAKEUP_PIN5_LOW + * @note PWR_WAKEUP_PINx and PWR_WAKEUP_PINx_HIGH are equivalent. + * @retval None + */ +void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity) +{ + assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinPolarity)); + + /* Specifies the Wake-Up pin polarity for the event detection + (rising or falling edge) */ + MODIFY_REG(PWR->CR4, (PWR_CR3_EWUP & WakeUpPinPolarity), (WakeUpPinPolarity >> PWR_WUP_POLARITY_SHIFT)); + + /* Enable wake-up pin */ + SET_BIT(PWR->CR3, (PWR_CR3_EWUP & WakeUpPinPolarity)); +} + +/** + * @brief Disable the WakeUp PINx functionality. + * @param WakeUpPinx Specifies the Power Wake-Up pin to disable. + * This parameter can be one of the following values: + * @arg PWR_WAKEUP_PIN1: An event on PA0 PIN wakes-up the system from Standby mode. + * @arg PWR_WAKEUP_PIN2: An event on PC13 PIN wakes-up the system from Standby mode. + * @arg PWR_WAKEUP_PIN3: An event on PC12 PIN wakes-up the system from Standby mode. + * @arg PWR_WAKEUP_PIN4: An event on PA2 PIN wakes-up the system from Standby mode. + * @arg PWR_WAKEUP_PIN5: An event on PC5 PIN wakes-up the system from Standby mode. + * @retval None + */ +void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx) +{ + assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinx)); + + CLEAR_BIT(PWR->CR3, (PWR_CR3_EWUP & WakeUpPinx)); +} + +/** + * @brief Enter Sleep or Low-power Sleep mode. + * @note In Sleep/Low-power Sleep mode, all I/O pins keep the same state as in Run mode. + * @param Regulator Specifies the regulator state in Sleep/Low-power Sleep mode. + * This parameter can be one of the following values: + * @arg @ref PWR_MAINREGULATOR_ON Sleep mode (regulator in main mode) + * @arg @ref PWR_LOWPOWERREGULATOR_ON Low-power Sleep mode (regulator in low-power mode) + * @note Low-power Sleep mode is entered from Low-power Run mode. Therefore, if not yet + * in Low-power Run mode before calling HAL_PWR_EnterSLEEPMode() with Regulator set + * to PWR_LOWPOWERREGULATOR_ON, the user can optionally configure the + * Flash in power-down mode in setting the SLEEP_PD bit in FLASH_ACR register. + * Additionally, the clock frequency must be reduced below 2 MHz. + * Setting SLEEP_PD in FLASH_ACR then appropriately reducing the clock frequency must + * be done before calling HAL_PWR_EnterSLEEPMode() API. + * @note When exiting Low-power Sleep mode, the MCU is in Low-power Run mode. To move in + * Run mode, the user must resort to HAL_PWREx_DisableLowPowerRunMode() API. + * @param SLEEPEntry Specifies if Sleep mode is entered with WFI or WFE instruction. + * This parameter can be one of the following values: + * @arg @ref PWR_SLEEPENTRY_WFI enter Sleep or Low-power Sleep mode with WFI instruction + * @arg @ref PWR_SLEEPENTRY_WFE enter Sleep or Low-power Sleep mode with WFE instruction + * @note When WFI entry is used, tick interrupt have to be disabled if not desired as + * the interrupt wake up source. + * @retval None + */ +void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry) +{ + /* Check the parameters */ + assert_param(IS_PWR_REGULATOR(Regulator)); + assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry)); + + /* Set Regulator parameter */ + if (Regulator == PWR_MAINREGULATOR_ON) + { + /* If in low-power run mode at this point, exit it */ + if (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_REGLPF)) + { + if (HAL_PWREx_DisableLowPowerRunMode() != HAL_OK) + { + return ; + } + } + /* Regulator now in main mode. */ + } + else + { + /* If in run mode, first move to low-power run mode. + The system clock frequency must be below 2 MHz at this point. */ + if (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_REGLPF) == RESET) + { + HAL_PWREx_EnableLowPowerRunMode(); + } + } + + /* Clear SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + + /* Select SLEEP mode entry -------------------------------------------------*/ + if (SLEEPEntry == PWR_SLEEPENTRY_WFI) + { + /* Request Wait For Interrupt */ + __WFI(); + } + else + { + /* Request Wait For Event */ + __SEV(); + __WFE(); + __WFE(); + } +} + + +/** + * @brief Enter Stop mode + * @note This API is named HAL_PWR_EnterSTOPMode to ensure compatibility with legacy code running + * on devices where only "Stop mode" is mentioned with main or low power regulator ON. + * @note In Stop mode, all I/O pins keep the same state as in Run mode. + * @note All clocks in the VCORE domain are stopped; the PLL, the MSI, + * the HSI and the HSE oscillators are disabled. Some peripherals with the wakeup capability + * (I2Cx, USARTx and LPUART) can switch on the HSI to receive a frame, and switch off the HSI + * after receiving the frame if it is not a wakeup frame. In this case, the HSI clock is propagated + * only to the peripheral requesting it. + * SRAM1, SRAM2 and register contents are preserved. + * The BOR is available. + * The voltage regulator can be configured either in normal (Stop 0) or low-power mode (Stop 1). + * @note When exiting Stop 0 or Stop 1 mode by issuing an interrupt or a wakeup event, + * the HSI RC oscillator is selected as system clock if STOPWUCK bit in RCC_CFGR register + * is set; the MSI oscillator is selected if STOPWUCK is cleared. + * @note When the voltage regulator operates in low power mode (Stop 1), an additional + * startup delay is incurred when waking up. + * By keeping the internal regulator ON during Stop mode (Stop 0), the consumption + * is higher although the startup time is reduced. + * @note Case of Stop0 mode with SMPS: Before entering Stop 0 mode with SMPS Step Down converter enabled, + * the HSI16 must be kept on by enabling HSI kernel clock (set HSIKERON register bit). + * @note According to system power policy, system entering in Stop mode + * is depending on other CPU power mode. + * @param Regulator Specifies the regulator state in Stop mode. + * This parameter can be one of the following values: + * @arg @ref PWR_MAINREGULATOR_ON Stop 0 mode (main regulator ON) + * @arg @ref PWR_LOWPOWERREGULATOR_ON Stop 1 mode (low power regulator ON) + * @param STOPEntry Specifies Stop 0, Stop 1 or Stop 2 mode is entered with WFI or WFE instruction. + * This parameter can be one of the following values: + * @arg @ref PWR_STOPENTRY_WFI Enter Stop 0 or Stop 1 mode with WFI instruction. + * @arg @ref PWR_STOPENTRY_WFE Enter Stop 0 or Stop 1 mode with WFE instruction. + * @retval None + */ +void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry) +{ + /* Check the parameters */ + assert_param(IS_PWR_REGULATOR(Regulator)); + + if (Regulator == PWR_LOWPOWERREGULATOR_ON) + { + HAL_PWREx_EnterSTOP1Mode(STOPEntry); + } + else + { + HAL_PWREx_EnterSTOP0Mode(STOPEntry); + } +} + + +/** + * @brief Enter Standby mode. + * @note In Standby mode, the PLL, the HSI, the MSI and the HSE oscillators are switched + * off. The voltage regulator is disabled, except when BKRAM content is preserved + * in which case the regulator is in low-power mode. + * SRAM and register contents are lost except for registers in the Backup domain and + * Standby circuitry. BKRAM content can be preserved if the bit RRS is set in PWR_CR3 register. + * To enable this feature, the user can resort to HAL_PWREx_EnableBKRAMContentRetention() API + * to set RRS bit. + * The BOR is available. + * @note The I/Os can be configured either with a pull-up or pull-down or can be kept in analog state. + * HAL_PWREx_EnableGPIOPullUp() and HAL_PWREx_EnableGPIOPullDown() respectively enable Pull Up and + * Pull Down state, HAL_PWREx_DisableGPIOPullUp() and HAL_PWREx_DisableGPIOPullDown() disable the + * same. + * These states are effective in Standby mode only if APC bit is set through + * HAL_PWREx_EnablePullUpPullDownConfig() API. + * @note According to system power policy, system entering in Standby mode + * is depending on other CPU power mode. + * @retval None + */ +void HAL_PWR_EnterSTANDBYMode(void) +{ + /* Set Stand-by mode */ + MODIFY_REG(PWR->CR1, PWR_CR1_LPMS, PWR_LOWPOWERMODE_STANDBY); + + /* Set SLEEPDEEP bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + + /* This option is used to ensure that store operations are completed */ +#if defined (__CC_ARM) + __force_stores(); +#endif /* __CC_ARM */ + + /* Request Wait For Interrupt */ + __WFI(); + + /* Following code is executed after wake up if system did not go to STANDBY + mode according to system power policy */ + + /* Reset SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); +} + +/** + * @brief Indicate Sleep-On-Exit when returning from Handler mode to Thread mode. + * @note Set SLEEPONEXIT bit of SCR register. When this bit is set, the processor + * re-enters SLEEP mode when an interruption handling is over. + * Setting this bit is useful when the processor is expected to run only on + * interruptions handling. + * @retval None + */ +void HAL_PWR_EnableSleepOnExit(void) +{ + /* Set SLEEPONEXIT bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPONEXIT_Msk)); +} + +/** + * @brief Disable Sleep-On-Exit feature when returning from Handler mode to Thread mode. + * @note Clear SLEEPONEXIT bit of SCR register. When this bit is set, the processor + * re-enters SLEEP mode when an interruption handling is over. + * @retval None + */ +void HAL_PWR_DisableSleepOnExit(void) +{ + /* Clear SLEEPONEXIT bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPONEXIT_Msk)); +} + + +/** + * @brief Enable CORTEX M4 SEVONPEND bit. + * @note Set SEVONPEND bit of SCR register. When this bit is set, this causes + * WFE to wake up when an interrupt moves from inactive to pended. + * @retval None + */ +void HAL_PWR_EnableSEVOnPend(void) +{ + /* Set SEVONPEND bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SEVONPEND_Msk)); +} + + +/** + * @brief Disable CORTEX M4 SEVONPEND bit. + * @note Clear SEVONPEND bit of SCR register. When this bit is set, this causes + * WFE to wake up when an interrupt moves from inactive to pended. + * @retval None + */ +void HAL_PWR_DisableSEVOnPend(void) +{ + /* Clear SEVONPEND bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SEVONPEND_Msk)); +} + + +/** + * @brief PWR PVD interrupt callback + * @retval None + */ +__weak void HAL_PWR_PVDCallback(void) +{ + /* NOTE : This function should not be modified; when the callback is needed, + the HAL_PWR_PVDCallback can be implemented in the user file + */ +} + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_PWR_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ + + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c new file mode 100644 index 0000000..b39074d --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c @@ -0,0 +1,1368 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_pwr_ex.c + * @author MCD Application Team + * @brief Extended PWR HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the Power Controller (PWR) peripheral: + * + Extended Initialization and de-initialization functions + * + Extended Peripheral Control functions + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @addtogroup PWREx + * @{ + */ + +#ifdef HAL_PWR_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/** @defgroup PWR_Extended_Private_Defines PWR Extended Private Defines + * @{ + */ +#define PWR_PORTE_AVAILABLE_PINS (PWR_GPIO_BIT_4 | PWR_GPIO_BIT_3 | PWR_GPIO_BIT_2 | PWR_GPIO_BIT_1 | PWR_GPIO_BIT_0) +#define PWR_PORTH_AVAILABLE_PINS (PWR_GPIO_BIT_3 | PWR_GPIO_BIT_1 | PWR_GPIO_BIT_0) + +/** @defgroup PWREx_TimeOut_Value PWR Extended Flag Setting Time Out Value + * @{ + */ +#define PWR_FLAG_SETTING_DELAY_US 50U /*!< Time out value for REGLPF and VOSF flags setting */ +/** + * @} + */ + +/** + * @} + */ + + + +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup PWREx_Exported_Functions PWR Extended Exported Functions + * @{ + */ + +/** @addtogroup PWREx_Exported_Functions_Group1 Extended Peripheral Control functions + * @brief Extended Peripheral Control functions + * +@verbatim + =============================================================================== + ##### Extended Peripheral Initialization and de-initialization functions ##### + =============================================================================== + [..] + +@endverbatim + * @{ + */ + + +#if defined(PWR_CR1_VOS) +/** + * @brief Return Voltage Scaling Range. + * @retval VOS bit field (PWR_REGULATOR_VOLTAGE_RANGE1 or PWR_REGULATOR_VOLTAGE_RANGE2) + */ +uint32_t HAL_PWREx_GetVoltageRange(void) +{ + return (PWR->CR1 & PWR_CR1_VOS); +} + +/** + * @brief Configure the main internal regulator output voltage. + * @param VoltageScaling specifies the regulator output voltage to achieve + * a tradeoff between performance and power consumption. + * This parameter can be one of the following values: + * @arg @ref PWR_REGULATOR_VOLTAGE_SCALE1 Regulator voltage output range 1 mode, + * typical output voltage at 1.2 V, + * system frequency up to 64 MHz. + * @arg @ref PWR_REGULATOR_VOLTAGE_SCALE2 Regulator voltage output range 2 mode, + * typical output voltage at 1.0 V, + * system frequency up to 16 MHz. + * @note When moving from Range 1 to Range 2, the system frequency must be decreased to + * a value below 16 MHz before calling HAL_PWREx_ControlVoltageScaling() API. + * When moving from Range 2 to Range 1, the system frequency can be increased to + * a value up to 64 MHz after calling HAL_PWREx_ControlVoltageScaling() API. + * @note When moving from Range 2 to Range 1, the API waits for VOSF flag to be + * cleared before returning the status. If the flag is not cleared within + * 50 microseconds, HAL_TIMEOUT status is reported. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling) +{ + uint32_t wait_loop_index; + + assert_param(IS_PWR_VOLTAGE_SCALING_RANGE(VoltageScaling)); + + /* If Set Range 1 */ + if (VoltageScaling == PWR_REGULATOR_VOLTAGE_SCALE1) + { + if (READ_BIT(PWR->CR1, PWR_CR1_VOS) != PWR_REGULATOR_VOLTAGE_SCALE1) + { + /* Set Range 1 */ + MODIFY_REG(PWR->CR1, PWR_CR1_VOS, PWR_REGULATOR_VOLTAGE_SCALE1); + + /* Wait until VOSF is cleared */ + wait_loop_index = (PWR_FLAG_SETTING_DELAY_US * (SystemCoreClock / 1000000U)); + while ((HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF)) && (wait_loop_index != 0U)) + { + wait_loop_index--; + } + if (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_VOSF)) + { + return HAL_TIMEOUT; + } + } + } + else + { + if (READ_BIT(PWR->CR1, PWR_CR1_VOS) != PWR_REGULATOR_VOLTAGE_SCALE2) + { + /* Set Range 2 */ + MODIFY_REG(PWR->CR1, PWR_CR1_VOS, PWR_REGULATOR_VOLTAGE_SCALE2); + /* No need to wait for VOSF to be cleared for this transition */ + } + } + + return HAL_OK; +} +#endif /* PWR_CR1_VOS */ + +/****************************************************************************/ + +/** + * @brief Enable battery charging. + * When VDD is present, charge the external battery on VBAT thru an internal resistor. + * @param ResistorSelection specifies the resistor impedance. + * This parameter can be one of the following values: + * @arg @ref PWR_BATTERY_CHARGING_RESISTOR_5 5 kOhms resistor + * @arg @ref PWR_BATTERY_CHARGING_RESISTOR_1_5 1.5 kOhms resistor + * @retval None + */ +void HAL_PWREx_EnableBatteryCharging(uint32_t ResistorSelection) +{ + assert_param(IS_PWR_BATTERY_RESISTOR_SELECT(ResistorSelection)); + + /* Specify resistor selection */ + MODIFY_REG(PWR->CR4, PWR_CR4_VBRS, ResistorSelection); + + /* Enable battery charging */ + SET_BIT(PWR->CR4, PWR_CR4_VBE); +} + +/** + * @brief Disable battery charging. + * @retval None + */ +void HAL_PWREx_DisableBatteryCharging(void) +{ + CLEAR_BIT(PWR->CR4, PWR_CR4_VBE); +} + +/****************************************************************************/ +#if defined(PWR_CR2_PVME1) +/** + * @brief Enable VDDUSB supply. + * @note Remove VDDUSB electrical and logical isolation, once VDDUSB supply is present. + * @retval None + */ +void HAL_PWREx_EnableVddUSB(void) +{ + SET_BIT(PWR->CR2, PWR_CR2_USV); +} + +/** + * @brief Disable VDDUSB supply. + * @retval None + */ +void HAL_PWREx_DisableVddUSB(void) +{ + CLEAR_BIT(PWR->CR2, PWR_CR2_USV); +} +#endif /* PWR_CR2_PVME1 */ + +/****************************************************************************/ + +/** + * @brief Enable Internal Wake-up Line. + * @retval None + */ +void HAL_PWREx_EnableInternalWakeUpLine(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_EIWUL); +} + +/** + * @brief Disable Internal Wake-up Line. + * @retval None + */ +void HAL_PWREx_DisableInternalWakeUpLine(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_EIWUL); +} + +#if defined(PWR_CR5_SMPSEN) +/** + * @brief Enable BORH and SMPS step down converter forced in bypass mode + * interrupt for CPU1 + * @retval None + */ +void HAL_PWREx_EnableBORH_SMPSBypassIT(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_EBORHSMPSFB); +} + +/** + * @brief Disable BORH and SMPS step down converter forced in bypass mode + * interrupt for CPU1 + * @retval None + */ +void HAL_PWREx_DisableBORH_SMPSBypassIT(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_EBORHSMPSFB); +} +#endif /* PWR_CR5_SMPSEN */ + +/** + * @brief Enable RF Phase interrupt. + * @retval None + */ +void HAL_PWREx_EnableRFPhaseIT(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_ECRPE_Msk); +} + +/** + * @brief Disable RF Phase interrupt. + * @retval None + */ +void HAL_PWREx_DisableRFPhaseIT(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_ECRPE_Msk); +} + + +/** + * @brief Enable BLE Activity interrupt. + * @retval None + */ +void HAL_PWREx_EnableBLEActivityIT(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_EBLEA); +} + +/** + * @brief Disable BLE Activity interrupt. + * @retval None + */ +void HAL_PWREx_DisableBLEActivityIT(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_EBLEA); +} + +#if defined(PWR_CR3_E802A) +/** + * @brief Enable 802.15.4 Activity interrupt. + * @retval None + */ +void HAL_PWREx_Enable802ActivityIT(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_E802A); +} + +/** + * @brief Disable 802.15.4 Activity interrupt. + * @retval None + */ +void HAL_PWREx_Disable802ActivityIT(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_E802A); +} +#endif /* PWR_CR3_E802A */ + +/** + * @brief Enable CPU2 on-Hold interrupt. + * @retval None + */ +void HAL_PWREx_EnableHOLDC2IT(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_EC2H); +} + +/** + * @brief Disable CPU2 on-Hold interrupt. + * @retval None + */ +void HAL_PWREx_DisableHOLDC2IT(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_EC2H); +} + +/****************************************************************************/ + +/** + * @brief Enable GPIO pull-up state in Standby and Shutdown modes. + * @note Set the relevant PUy bits of PWR_PUCRx register to configure the I/O in + * pull-up state in Standby and Shutdown modes. + * @note This state is effective in Standby and Shutdown modes only if APC bit + * is set through HAL_PWREx_EnablePullUpPullDownConfig() API. + * @note The configuration is lost when exiting the Shutdown mode due to the + * power-on reset, maintained when exiting the Standby mode. + * @note To avoid any conflict at Standby and Shutdown modes exits, the corresponding + * PDy bit of PWR_PDCRx register is cleared unless it is reserved. + * @note Even if a PUy bit to set is reserved, the other PUy bits entered as input + * parameter at the same time are set. + * @param GPIO Specify the IO port. This parameter can be PWR_GPIO_A, ..., PWR_GPIO_H + * to select the GPIO peripheral. + * @param GPIONumber Specify the I/O pins numbers. + * This parameter can be one of the following values: + * PWR_GPIO_BIT_0, ..., PWR_GPIO_BIT_15 (except for PORTH where less + * I/O pins are available) or the logical OR of several of them to set + * several bits for a given port in a single API call. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber) +{ + HAL_StatusTypeDef status = HAL_OK; + + assert_param(IS_PWR_GPIO(GPIO)); + assert_param(IS_PWR_GPIO_BIT_NUMBER(GPIONumber)); + + switch (GPIO) + { + case PWR_GPIO_A: + SET_BIT(PWR->PUCRA, GPIONumber); + CLEAR_BIT(PWR->PDCRA, GPIONumber); + break; + case PWR_GPIO_B: + SET_BIT(PWR->PUCRB, GPIONumber); + CLEAR_BIT(PWR->PDCRB, GPIONumber); + break; + case PWR_GPIO_C: + SET_BIT(PWR->PUCRC, GPIONumber); + CLEAR_BIT(PWR->PDCRC, GPIONumber); + break; +#if defined(GPIOD) + case PWR_GPIO_D: + SET_BIT(PWR->PUCRD, GPIONumber); + CLEAR_BIT(PWR->PDCRD, GPIONumber); + break; +#endif /* GPIOD */ + case PWR_GPIO_E: + SET_BIT(PWR->PUCRE, (GPIONumber & PWR_PORTE_AVAILABLE_PINS)); + CLEAR_BIT(PWR->PDCRE, (GPIONumber & PWR_PORTE_AVAILABLE_PINS)); + break; + case PWR_GPIO_H: + SET_BIT(PWR->PUCRH, (GPIONumber & PWR_PORTH_AVAILABLE_PINS)); + CLEAR_BIT(PWR->PDCRH, (GPIONumber & PWR_PORTH_AVAILABLE_PINS)); + break; + default: + status = HAL_ERROR; + break; + } + + return status; +} + +/** + * @brief Disable GPIO pull-up state in Standby mode and Shutdown modes. + * @note Reset the relevant PUy bits of PWR_PUCRx register used to configure the I/O + * in pull-up state in Standby and Shutdown modes. + * @note Even if a PUy bit to reset is reserved, the other PUy bits entered as input + * parameter at the same time are reset. + * @param GPIO Specifies the IO port. This parameter can be PWR_GPIO_A, ..., PWR_GPIO_H + * to select the GPIO peripheral. + * @param GPIONumber Specify the I/O pins numbers. + * This parameter can be one of the following values: + * PWR_GPIO_BIT_0, ..., PWR_GPIO_BIT_15 (except for PORTH where less + * I/O pins are available) or the logical OR of several of them to reset + * several bits for a given port in a single API call. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber) +{ + HAL_StatusTypeDef status = HAL_OK; + + assert_param(IS_PWR_GPIO(GPIO)); + assert_param(IS_PWR_GPIO_BIT_NUMBER(GPIONumber)); + + switch (GPIO) + { + case PWR_GPIO_A: + CLEAR_BIT(PWR->PUCRA, GPIONumber); + break; + case PWR_GPIO_B: + CLEAR_BIT(PWR->PUCRB, GPIONumber); + break; + case PWR_GPIO_C: + CLEAR_BIT(PWR->PUCRC, GPIONumber); + break; +#if defined(GPIOD) + case PWR_GPIO_D: + CLEAR_BIT(PWR->PUCRD, GPIONumber); + break; +#endif /* GPIOD */ + case PWR_GPIO_E: + CLEAR_BIT(PWR->PUCRE, (GPIONumber & PWR_PORTE_AVAILABLE_PINS)); + break; + case PWR_GPIO_H: + CLEAR_BIT(PWR->PUCRH, (GPIONumber & PWR_PORTH_AVAILABLE_PINS)); + break; + default: + status = HAL_ERROR; + break; + } + + return status; +} + + + +/** + * @brief Enable GPIO pull-down state in Standby and Shutdown modes. + * @note Set the relevant PDy bits of PWR_PDCRx register to configure the I/O in + * pull-down state in Standby and Shutdown modes. + * @note This state is effective in Standby and Shutdown modes only if APC bit + * is set through HAL_PWREx_EnablePullUpPullDownConfig() API. + * @note The configuration is lost when exiting the Shutdown mode due to the + * power-on reset, maintained when exiting the Standby mode. + * @note To avoid any conflict at Standby and Shutdown modes exits, the corresponding + * PUy bit of PWR_PUCRx register is cleared unless it is reserved. + * @note Even if a PDy bit to set is reserved, the other PDy bits entered as input + * parameter at the same time are set. + * @param GPIO Specify the IO port. This parameter can be PWR_GPIO_A..PWR_GPIO_H + * to select the GPIO peripheral. + * @param GPIONumber Specify the I/O pins numbers. + * This parameter can be one of the following values: + * PWR_GPIO_BIT_0, ..., PWR_GPIO_BIT_15 (except for PORTH where less + * I/O pins are available) or the logical OR of several of them to set + * several bits for a given port in a single API call. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber) +{ + HAL_StatusTypeDef status = HAL_OK; + + assert_param(IS_PWR_GPIO(GPIO)); + assert_param(IS_PWR_GPIO_BIT_NUMBER(GPIONumber)); + + switch (GPIO) + { + case PWR_GPIO_A: + SET_BIT(PWR->PDCRA, GPIONumber); + CLEAR_BIT(PWR->PUCRA, GPIONumber); + break; + case PWR_GPIO_B: + SET_BIT(PWR->PDCRB, GPIONumber); + CLEAR_BIT(PWR->PUCRB, GPIONumber); + break; + case PWR_GPIO_C: + SET_BIT(PWR->PDCRC, GPIONumber); + CLEAR_BIT(PWR->PUCRC, GPIONumber); + break; +#if defined(GPIOD) + case PWR_GPIO_D: + SET_BIT(PWR->PDCRD, GPIONumber); + CLEAR_BIT(PWR->PUCRD, GPIONumber); + break; +#endif /* GPIOD */ + case PWR_GPIO_E: + SET_BIT(PWR->PDCRE, (GPIONumber & PWR_PORTE_AVAILABLE_PINS)); + CLEAR_BIT(PWR->PUCRE, (GPIONumber & PWR_PORTE_AVAILABLE_PINS)); + break; + case PWR_GPIO_H: + SET_BIT(PWR->PDCRH, (GPIONumber & PWR_PORTH_AVAILABLE_PINS)); + CLEAR_BIT(PWR->PUCRH, (GPIONumber & PWR_PORTH_AVAILABLE_PINS)); + break; + default: + status = HAL_ERROR; + break; + } + + return status; +} + +/** + * @brief Disable GPIO pull-down state in Standby and Shutdown modes. + * @note Reset the relevant PDy bits of PWR_PDCRx register used to configure the I/O + * in pull-down state in Standby and Shutdown modes. + * @note Even if a PDy bit to reset is reserved, the other PDy bits entered as input + * parameter at the same time are reset. + * @param GPIO Specifies the IO port. This parameter can be PWR_GPIO_A..PWR_GPIO_H + * to select the GPIO peripheral. + * @param GPIONumber Specify the I/O pins numbers. + * This parameter can be one of the following values: + * PWR_GPIO_BIT_0, ..., PWR_GPIO_BIT_15 (except for PORTH where less + * I/O pins are available) or the logical OR of several of them to reset + * several bits for a given port in a single API call. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber) +{ + HAL_StatusTypeDef status = HAL_OK; + + assert_param(IS_PWR_GPIO(GPIO)); + assert_param(IS_PWR_GPIO_BIT_NUMBER(GPIONumber)); + + switch (GPIO) + { + case PWR_GPIO_A: + CLEAR_BIT(PWR->PDCRA, GPIONumber); + break; + case PWR_GPIO_B: + CLEAR_BIT(PWR->PDCRB, GPIONumber); + break; + case PWR_GPIO_C: + CLEAR_BIT(PWR->PDCRC, GPIONumber); + break; +#if defined(GPIOD) + case PWR_GPIO_D: + CLEAR_BIT(PWR->PDCRD, GPIONumber); + break; +#endif /* GPIOD */ + case PWR_GPIO_E: + CLEAR_BIT(PWR->PDCRE, (GPIONumber & PWR_PORTE_AVAILABLE_PINS)); + break; + case PWR_GPIO_H: + CLEAR_BIT(PWR->PDCRH, (GPIONumber & PWR_PORTH_AVAILABLE_PINS)); + break; + default: + status = HAL_ERROR; + break; + } + + return status; +} + +/** + * @brief Enable pull-up and pull-down configuration. + * @note When APC bit is set, the I/O pull-up and pull-down configurations defined in + * PWR_PUCRx and PWR_PDCRx registers are applied in Standby and Shutdown modes. + * @note Pull-up set by PUy bit of PWR_PUCRx register is not activated if the corresponding + * PDy bit of PWR_PDCRx register is also set (pull-down configuration priority is higher). + * HAL_PWREx_EnableGPIOPullUp() and HAL_PWREx_EnableGPIOPullDown() API's ensure there + * is no conflict when setting PUy or PDy bit. + * @retval None + */ +void HAL_PWREx_EnablePullUpPullDownConfig(void) +{ + SET_BIT(PWR->CR3, PWR_CR3_APC); +} + +/** + * @brief Disable pull-up and pull-down configuration. + * @note When APC bit is cleared, the I/O pull-up and pull-down configurations defined in + * PWR_PUCRx and PWR_PDCRx registers are not applied in Standby and Shutdown modes. + * @retval None + */ +void HAL_PWREx_DisablePullUpPullDownConfig(void) +{ + CLEAR_BIT(PWR->CR3, PWR_CR3_APC); +} + +/****************************************************************************/ + +#if defined(PWR_CR5_SMPSEN) +/** + * @brief Set BOR configuration + * @param BORConfiguration This parameter can be one of the following values: + * @arg @ref PWR_BOR_SYSTEM_RESET + * @arg @ref PWR_BOR_SMPS_FORCE_BYPASS + */ +void HAL_PWREx_SetBORConfig(uint32_t BORConfiguration) +{ + LL_PWR_SetBORConfig(BORConfiguration); +} + +/** + * @brief Get BOR configuration + * @retval Returned value can be one of the following values: + * @arg @ref PWR_BOR_SYSTEM_RESET + * @arg @ref PWR_BOR_SMPS_FORCE_BYPASS + */ +uint32_t HAL_PWREx_GetBORConfig(void) +{ + return LL_PWR_GetBORConfig(); +} +#endif /* PWR_CR5_SMPSEN */ + +/****************************************************************************/ +/** + * @brief Hold the CPU and their allocated peripherals after reset or wakeup from stop or standby. + * @param CPU: Specifies the core to be held. + * This parameter can be one of the following values: + * @arg PWR_CORE_CPU2: Hold CPU2 and set CPU1 as master. + * @note Hold CPU2 with CPU1 as master by default. + * @retval None + */ +void HAL_PWREx_HoldCore(uint32_t CPU) +{ + /* Check the parameters */ + assert_param(IS_PWR_CORE_HOLD_RELEASE(CPU)); + + LL_PWR_DisableBootC2(); +} + +/** + * @brief Release Cortex CPU2 and allocated peripherals after reset or wakeup from stop or standby. + * @param CPU: Specifies the core to be released. + * This parameter can be one of the following values: + * @arg PWR_CORE_CPU2: Release the CPU2 from holding. + * @retval None + */ +void HAL_PWREx_ReleaseCore(uint32_t CPU) +{ + /* Check the parameters */ + assert_param(IS_PWR_CORE_HOLD_RELEASE(CPU)); + + LL_PWR_EnableBootC2(); +} + +/****************************************************************************/ +/** + * @brief Enable SRAM2a content retention in Standby mode. + * @note When RRS bit is set, SRAM2a is powered by the low-power regulator in + * Standby mode and its content is kept. + * @note On devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx retention is extended + * to SRAM1, SRAM2a and SRAM2b. + * @retval None + */ +void HAL_PWREx_EnableSRAMRetention(void) +{ + LL_PWR_EnableSRAM2Retention(); +} + +/** + * @brief Disable SRAM2a content retention in Standby mode. + * @note When RRS bit is reset, SRAM2a is powered off in Standby mode + * and its content is lost. + * @note On devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx retention is extended + * to SRAM1, SRAM2a and SRAM2b. + * @retval None + */ +void HAL_PWREx_DisableSRAMRetention(void) +{ + LL_PWR_DisableSRAM2Retention(); +} + +/****************************************************************************/ +/** + * @brief Enable Flash Power Down. + * @note This API allows to enable flash power down capabilities in low power + * run and low power sleep modes. + * @param PowerMode this can be a combination of following values: + * @arg @ref PWR_FLASHPD_LPRUN + * @arg @ref PWR_FLASHPD_LPSLEEP + * @retval None + */ +void HAL_PWREx_EnableFlashPowerDown(uint32_t PowerMode) +{ + assert_param(IS_PWR_FLASH_POWERDOWN(PowerMode)); + + if ((PowerMode & PWR_FLASHPD_LPRUN) != 0U) + { + /* Unlock bit FPDR */ + WRITE_REG(PWR->CR1, 0x0000C1B0UL); + } + + /* Set flash power down mode */ + SET_BIT(PWR->CR1, PowerMode); +} + +/** + * @brief Disable Flash Power Down. + * @note This API allows to disable flash power down capabilities in low power + * run and low power sleep modes. + * @param PowerMode this can be a combination of following values: + * @arg @ref PWR_FLASHPD_LPRUN + * @arg @ref PWR_FLASHPD_LPSLEEP + * @retval None + */ +void HAL_PWREx_DisableFlashPowerDown(uint32_t PowerMode) +{ + assert_param(IS_PWR_FLASH_POWERDOWN(PowerMode)); + + /* Set flash power down mode */ + CLEAR_BIT(PWR->CR1, PowerMode); +} + +/****************************************************************************/ +#if defined(PWR_CR2_PVME1) +/** + * @brief Enable the Power Voltage Monitoring 1: VDDUSB versus 1.2V. + * @retval None + */ +void HAL_PWREx_EnablePVM1(void) +{ + SET_BIT(PWR->CR2, PWR_PVM_1); +} + +/** + * @brief Disable the Power Voltage Monitoring 1: VDDUSB versus 1.2V. + * @retval None + */ +void HAL_PWREx_DisablePVM1(void) +{ + CLEAR_BIT(PWR->CR2, PWR_PVM_1); +} +#endif /* PWR_CR2_PVME1 */ + +/** + * @brief Enable the Power Voltage Monitoring 3: VDDA versus 1.62V. + * @retval None + */ +void HAL_PWREx_EnablePVM3(void) +{ + SET_BIT(PWR->CR2, PWR_PVM_3); +} + +/** + * @brief Disable the Power Voltage Monitoring 3: VDDA versus 1.62V. + * @retval None + */ +void HAL_PWREx_DisablePVM3(void) +{ + CLEAR_BIT(PWR->CR2, PWR_PVM_3); +} + + + + +/** + * @brief Configure the Peripheral Voltage Monitoring (PVM). + * @param sConfigPVM pointer to a PWR_PVMTypeDef structure that contains the + * PVM configuration information. + * @note The API configures a single PVM according to the information contained + * in the input structure. To configure several PVMs, the API must be singly + * called for each PVM used. + * @note Refer to the electrical characteristics of your device datasheet for + * more details about the voltage thresholds corresponding to each + * detection level and to each monitored supply. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_PWREx_ConfigPVM(PWR_PVMTypeDef *sConfigPVM) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Check the parameters */ + assert_param(IS_PWR_PVM_TYPE(sConfigPVM->PVMType)); + assert_param(IS_PWR_PVM_MODE(sConfigPVM->Mode)); + + /* Configure EXTI 31 and 33 interrupts if so required: + scan thru PVMType to detect which PVMx is set and + configure the corresponding EXTI line accordingly. */ + switch (sConfigPVM->PVMType) + { +#if defined(PWR_CR2_PVME1) + case PWR_PVM_1: + /* Clear any previous config. Keep it clear if no event or IT mode is selected */ + __HAL_PWR_PVM1_EXTI_DISABLE_EVENT(); + __HAL_PWR_PVM1_EXTI_DISABLE_IT(); + __HAL_PWR_PVM1_EXTI_DISABLE_FALLING_EDGE(); + __HAL_PWR_PVM1_EXTI_DISABLE_RISING_EDGE(); + + /* Configure interrupt mode */ + if ((sConfigPVM->Mode & PVM_MODE_IT) == PVM_MODE_IT) + { + __HAL_PWR_PVM1_EXTI_ENABLE_IT(); + } + + /* Configure event mode */ + if ((sConfigPVM->Mode & PVM_MODE_EVT) == PVM_MODE_EVT) + { + __HAL_PWR_PVM1_EXTI_ENABLE_EVENT(); + } + + /* Configure the edge */ + if ((sConfigPVM->Mode & PVM_RISING_EDGE) == PVM_RISING_EDGE) + { + __HAL_PWR_PVM1_EXTI_ENABLE_RISING_EDGE(); + } + + if ((sConfigPVM->Mode & PVM_FALLING_EDGE) == PVM_FALLING_EDGE) + { + __HAL_PWR_PVM1_EXTI_ENABLE_FALLING_EDGE(); + } + break; +#endif /* PWR_CR2_PVME1 */ + + case PWR_PVM_3: + /* Clear any previous config. Keep it clear if no event or IT mode is selected */ + __HAL_PWR_PVM3_EXTI_DISABLE_EVENT(); + __HAL_PWR_PVM3_EXTI_DISABLE_IT(); + __HAL_PWR_PVM3_EXTI_DISABLE_FALLING_EDGE(); + __HAL_PWR_PVM3_EXTI_DISABLE_RISING_EDGE(); + + /* Configure interrupt mode */ + if ((sConfigPVM->Mode & PVM_MODE_IT) == PVM_MODE_IT) + { + __HAL_PWR_PVM3_EXTI_ENABLE_IT(); + } + + /* Configure event mode */ + if ((sConfigPVM->Mode & PVM_MODE_EVT) == PVM_MODE_EVT) + { + __HAL_PWR_PVM3_EXTI_ENABLE_EVENT(); + } + + /* Configure the edge */ + if ((sConfigPVM->Mode & PVM_RISING_EDGE) == PVM_RISING_EDGE) + { + __HAL_PWR_PVM3_EXTI_ENABLE_RISING_EDGE(); + } + + if ((sConfigPVM->Mode & PVM_FALLING_EDGE) == PVM_FALLING_EDGE) + { + __HAL_PWR_PVM3_EXTI_ENABLE_FALLING_EDGE(); + } + break; + + default: + status = HAL_ERROR; + break; + + } + + return status; +} + +#if defined(PWR_CR5_SMPSEN) +/** + * @brief Configure the SMPS step down converter. + * @note SMPS output voltage is calibrated in production, + * calibration parameters are applied to the voltage level parameter + * to reach the requested voltage value. + * @param sConfigSMPS pointer to a PWR_SMPSTypeDef structure that contains the + * SMPS configuration information. + * @note To set and enable SMPS operating mode, refer to function + * "HAL_PWREx_SMPS_SetMode()". + * @retval HAL status + */ +HAL_StatusTypeDef HAL_PWREx_ConfigSMPS(PWR_SMPSTypeDef *sConfigSMPS) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Check the parameters */ + assert_param(IS_PWR_SMPS_STARTUP_CURRENT(sConfigSMPS->StartupCurrent)); + assert_param(IS_PWR_SMPS_OUTPUT_VOLTAGE(sConfigSMPS->OutputVoltage)); + + __IO const uint32_t OutputVoltageLevel_calibration = (((*SMPS_VOLTAGE_CAL_ADDR) & SMPS_VOLTAGE_CAL) >> SMPS_VOLTAGE_CAL_POS); /* SMPS output voltage level calibrated in production */ + int32_t TrimmingSteps; /* Trimming steps between theoretical output voltage and calibrated output voltage */ + int32_t OutputVoltageLevelTrimmed; /* SMPS output voltage level after calibration: trimming value added to required level */ + + if (OutputVoltageLevel_calibration == 0UL) + { + /* Device with SMPS output voltage not calibrated in production: Apply output voltage value directly */ + + /* Update register */ + MODIFY_REG(PWR->CR5, PWR_CR5_SMPSVOS, (sConfigSMPS->StartupCurrent | sConfigSMPS->OutputVoltage)); + } + else + { + /* Device with SMPS output voltage calibrated in production: Apply output voltage value after correction by calibration value */ + + TrimmingSteps = ((int32_t)OutputVoltageLevel_calibration - (int32_t)(LL_PWR_SMPS_OUTPUT_VOLTAGE_1V50 >> PWR_CR5_SMPSVOS_Pos)); + OutputVoltageLevelTrimmed = ((int32_t)((uint32_t)(sConfigSMPS->OutputVoltage >> PWR_CR5_SMPSVOS_Pos)) + (int32_t)TrimmingSteps); + + /* Clamp value to voltage trimming bitfield range */ + if (OutputVoltageLevelTrimmed < 0) + { + OutputVoltageLevelTrimmed = 0; + status = HAL_ERROR; + } + else + { + if (OutputVoltageLevelTrimmed > (int32_t)PWR_CR5_SMPSVOS) + { + OutputVoltageLevelTrimmed = (int32_t)PWR_CR5_SMPSVOS; + status = HAL_ERROR; + } + } + + /* Update register */ + MODIFY_REG(PWR->CR5, (PWR_CR5_SMPSSC | PWR_CR5_SMPSVOS), + (sConfigSMPS->StartupCurrent | ((uint32_t) OutputVoltageLevelTrimmed))); + } + + return status; +} + +/** + * @brief Set SMPS operating mode. + * @param OperatingMode This parameter can be one of the following values: + * @arg @ref PWR_SMPS_BYPASS + * @arg @ref PWR_SMPS_STEP_DOWN (1) + * + * (1) SMPS operating mode step down or open depends on system low-power mode: + * - step down mode if system low power mode is run, LP run or stop, + * - open mode if system low power mode is Stop1, Stop2, Standby or Shutdown + * @retval None + */ +void HAL_PWREx_SMPS_SetMode(uint32_t OperatingMode) +{ + MODIFY_REG(PWR->CR5, PWR_CR5_SMPSEN, (OperatingMode & PWR_SR2_SMPSF) << (PWR_CR5_SMPSEN_Pos - PWR_SR2_SMPSF_Pos)); +} + +/** + * @brief Get SMPS effective operating mode + * @note SMPS operating mode can be changed by hardware, therefore + * requested operating mode can differ from effective low power mode. + * - dependency on system low-power mode: + * - step down mode if system low power mode is run, LP run or stop, + * - open mode if system low power mode is Stop1, Stop2, Standby or Shutdown + * - dependency on BOR level: + * - bypass mode if supply voltage drops below BOR level + * @note This functions check flags of SMPS operating modes step down + * and bypass. If the SMPS is not among these 2 operating modes, + * then it can be in mode off or open. + * @retval Returned value can be one of the following values: + * @arg @ref PWR_SMPS_BYPASS + * @arg @ref PWR_SMPS_STEP_DOWN (1) + * + * (1) SMPS operating mode step down or open depends on system low-power mode: + * - step down mode if system low power mode is run, LP run or stop, + * - open mode if system low power mode is Stop1, Stop2, Standby or Shutdown + */ +uint32_t HAL_PWREx_SMPS_GetEffectiveMode(void) +{ + return (uint32_t)(READ_BIT(PWR->SR2, (PWR_SR2_SMPSF | PWR_SR2_SMPSBF))); +} +#endif /* PWR_CR5_SMPSEN */ + +/****************************************************************************/ + +/** + * @brief Enable the WakeUp PINx functionality. + * @param WakeUpPinPolarity Specifies which Wake-Up pin to enable. + * This parameter can be one of the following legacy values which set the default polarity + * i.e. detection on high level (rising edge): + * @arg @ref PWR_WAKEUP_PIN1, PWR_WAKEUP_PIN2, PWR_WAKEUP_PIN3, PWR_WAKEUP_PIN4, PWR_WAKEUP_PIN5 + * + * or one of the following value where the user can explicitly specify the enabled pin and + * the chosen polarity: + * @arg @ref PWR_WAKEUP_PIN1_HIGH or PWR_WAKEUP_PIN1_LOW + * @arg @ref PWR_WAKEUP_PIN2_HIGH or PWR_WAKEUP_PIN2_LOW + * @arg @ref PWR_WAKEUP_PIN3_HIGH or PWR_WAKEUP_PIN3_LOW + * @arg @ref PWR_WAKEUP_PIN4_HIGH or PWR_WAKEUP_PIN4_LOW + * @arg @ref PWR_WAKEUP_PIN5_HIGH or PWR_WAKEUP_PIN5_LOW + * @param wakeupTarget Specifies the wake-up target + * @arg @ref PWR_CORE_CPU1 + * @arg @ref PWR_CORE_CPU2 + * @note PWR_WAKEUP_PINx and PWR_WAKEUP_PINx_HIGH are equivalent. + * @retval None + */ +void HAL_PWREx_EnableWakeUpPin(uint32_t WakeUpPinPolarity, uint32_t wakeupTarget) +{ + assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinPolarity)); + + /* Specifies the Wake-Up pin polarity for the event detection + (rising or falling edge) */ + MODIFY_REG(PWR->CR4, (PWR_C2CR3_EWUP & WakeUpPinPolarity), (WakeUpPinPolarity >> PWR_WUP_POLARITY_SHIFT)); + + /* Enable wake-up pin */ + if (PWR_CORE_CPU2 == wakeupTarget) + { + SET_BIT(PWR->C2CR3, (PWR_C2CR3_EWUP & WakeUpPinPolarity)); + } + else + { + SET_BIT(PWR->CR3, (PWR_CR3_EWUP & WakeUpPinPolarity)); + } +} + +/** + * @brief Get the Wake-Up pin flag. + * @param WakeUpFlag specifies the Wake-Up PIN flag to check. + * This parameter can be one of the following values: + * @arg PWR_FLAG_WUF1: A wakeup event was received from PA0. + * @arg PWR_FLAG_WUF2: A wakeup event was received from PC13. + * @arg PWR_FLAG_WUF3: A wakeup event was received from PC12. + * @arg PWR_FLAG_WUF4: A wakeup event was received from PA2. + * @arg PWR_FLAG_WUF5: A wakeup event was received from PC5. + * @retval The Wake-Up pin flag. + */ +uint32_t HAL_PWREx_GetWakeupFlag(uint32_t WakeUpFlag) +{ + return (PWR->SR1 & (1UL << ((WakeUpFlag) & 31U))); +} + +/** + * @brief Clear the Wake-Up pin flag. + * @param WakeUpFlag specifies the Wake-Up PIN flag to clear. + * This parameter can be one of the following values: + * @arg PWR_FLAG_WUF1: A wakeup event was received from PA0. + * @arg PWR_FLAG_WUF2: A wakeup event was received from PC13. + * @arg PWR_FLAG_WUF3: A wakeup event was received from PC12. + * @arg PWR_FLAG_WUF4: A wakeup event was received from PA2. + * @arg PWR_FLAG_WUF5: A wakeup event was received from PC5. + * @retval HAL status. + */ +HAL_StatusTypeDef HAL_PWREx_ClearWakeupFlag(uint32_t WakeUpFlag) +{ + PWR->SCR = (1UL << ((WakeUpFlag) & 31U)); + + if ((PWR->SR1 & (1UL << ((WakeUpFlag) & 31U))) != 0U) + { + return HAL_ERROR; + } + return HAL_OK; +} + +/****************************************************************************/ + +/** + * @brief Enter Low-power Run mode + * @note In Low-power Run mode, all I/O pins keep the same state as in Run mode. + * @note When Regulator is set to PWR_LOWPOWERREGULATOR_ON, the user can optionally configure the + * Flash in power-down mode in setting the RUN_PD bit in FLASH_ACR register. + * Additionally, the clock frequency must be reduced below 2 MHz. + * Setting RUN_PD in FLASH_ACR then appropriately reducing the clock frequency must + * be done before calling HAL_PWREx_EnableLowPowerRunMode() API. + * @retval None + */ +void HAL_PWREx_EnableLowPowerRunMode(void) +{ + /* Set Regulator parameter */ + SET_BIT(PWR->CR1, PWR_CR1_LPR); +} + + +/** + * @brief Exit Low-power Run mode. + * @note Before HAL_PWREx_DisableLowPowerRunMode() completion, the function checks that + * REGLPF has been properly reset (otherwise, HAL_PWREx_DisableLowPowerRunMode + * returns HAL_TIMEOUT status). The system clock frequency can then be + * increased above 2 MHz. + * @retval HAL Status + */ +HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void) +{ + uint32_t wait_loop_index; + + /* Clear LPR bit */ + CLEAR_BIT(PWR->CR1, PWR_CR1_LPR); + + /* Wait until REGLPF is reset */ + wait_loop_index = (PWR_FLAG_SETTING_DELAY_US * (SystemCoreClock / 1000000U)); + while ((HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_REGLPF)) && (wait_loop_index != 0U)) + { + wait_loop_index--; + } + if (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_REGLPF)) + { + return HAL_TIMEOUT; + } + + return HAL_OK; +} + +/****************************************************************************/ + +/** + * @brief Enter Stop 0 mode. + * @note In Stop 0 mode, main and low voltage regulators are ON. + * @note In Stop 0 mode, all I/O pins keep the same state as in Run mode. + * @note All clocks in the VCORE domain are stopped; the PLL, the MSI, + * the HSI and the HSE oscillators are disabled. Some peripherals with the wakeup capability + * (I2Cx, USARTx and LPUART) can switch on the HSI to receive a frame, and switch off the HSI + * after receiving the frame if it is not a wakeup frame. In this case, the HSI clock is propagated + * only to the peripheral requesting it. + * SRAM1, SRAM2 and register contents are preserved. + * The BOR is available. + * @note When exiting Stop 0 mode by issuing an interrupt or a wakeup event, + * the HSI RC oscillator is selected as system clock if STOPWUCK bit in RCC_CFGR register + * is set; the MSI oscillator is selected if STOPWUCK is cleared. + * @note By keeping the internal regulator ON during Stop 0 mode, the consumption + * is higher although the startup time is reduced. + * @note Case of Stop0 mode with SMPS: Before entering Stop 0 mode with SMPS Step Down converter enabled, + * the HSI16 must be kept on by enabling HSI kernel clock (set HSIKERON register bit). + * @note According to system power policy, system entering in Stop mode + * is depending on other CPU power mode. + * @param STOPEntry specifies if Stop mode in entered with WFI or WFE instruction. + * This parameter can be one of the following values: + * @arg @ref PWR_STOPENTRY_WFI Enter Stop mode with WFI instruction + * @arg @ref PWR_STOPENTRY_WFE Enter Stop mode with WFE instruction + * @retval None + */ +void HAL_PWREx_EnterSTOP0Mode(uint8_t STOPEntry) +{ + /* Check the parameters */ + assert_param(IS_PWR_STOP_ENTRY(STOPEntry)); + + /* Stop 0 mode with Main Regulator */ + MODIFY_REG(PWR->CR1, PWR_CR1_LPMS, PWR_LOWPOWERMODE_STOP0); + + + /* Set SLEEPDEEP bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + + /* Select Stop mode entry --------------------------------------------------*/ + if (STOPEntry == PWR_STOPENTRY_WFI) + { + /* Request Wait For Interrupt */ + __WFI(); + } + else + { + /* Request Wait For Event */ + __SEV(); + __WFE(); + __WFE(); + } + + /* Reset SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); +} + +/** + * @brief Enter Stop 1 mode. + * @note In Stop 1 mode, only low power voltage regulator is ON. + * @note In Stop 1 mode, all I/O pins keep the same state as in Run mode. + * @note All clocks in the VCORE domain are stopped; the PLL, the MSI, + * the HSI and the HSE oscillators are disabled. Some peripherals with the wakeup capability + * (I2Cx, USARTx and LPUART) can switch on the HSI to receive a frame, and switch off the HSI + * after receiving the frame if it is not a wakeup frame. In this case, the HSI clock is propagated + * only to the peripheral requesting it. + * SRAM1, SRAM2 and register contents are preserved. + * The BOR is available. + * @note When exiting Stop 1 mode by issuing an interrupt or a wakeup event, + * the HSI RC oscillator is selected as system clock if STOPWUCK bit in RCC_CFGR register + * is set; the MSI oscillator is selected if STOPWUCK is cleared. + * @note Due to low power mode, an additional startup delay is incurred when waking up from Stop 1 mode. + * @note According to system power policy, system entering in Stop mode + * is depending on other CPU power mode. + * @param STOPEntry specifies if Stop mode in entered with WFI or WFE instruction. + * This parameter can be one of the following values: + * @arg @ref PWR_STOPENTRY_WFI Enter Stop mode with WFI instruction + * @arg @ref PWR_STOPENTRY_WFE Enter Stop mode with WFE instruction + * @retval None + */ +void HAL_PWREx_EnterSTOP1Mode(uint8_t STOPEntry) +{ + /* Check the parameters */ + assert_param(IS_PWR_STOP_ENTRY(STOPEntry)); + + /* Stop 1 mode with Low-Power Regulator */ + MODIFY_REG(PWR->CR1, PWR_CR1_LPMS, PWR_LOWPOWERMODE_STOP1); + + /* Set SLEEPDEEP bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + + /* Select Stop mode entry --------------------------------------------------*/ + if (STOPEntry == PWR_STOPENTRY_WFI) + { + /* Request Wait For Interrupt */ + __WFI(); + } + else + { + /* Request Wait For Event */ + __SEV(); + __WFE(); + __WFE(); + } + + /* Reset SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); +} + +#if defined(PWR_SUPPORT_STOP2) +/** + * @brief Enter Stop 2 mode. + * @note In Stop 2 mode, only low power voltage regulator is ON. + * @note In Stop 2 mode, all I/O pins keep the same state as in Run mode. + * @note All clocks in the VCORE domain are stopped, the PLL, the MSI, + * the HSI and the HSE oscillators are disabled. Some peripherals with wakeup capability + * (LCD, LPTIM1, I2C3 and LPUART) can switch on the HSI to receive a frame, and switch off the HSI after + * receiving the frame if it is not a wakeup frame. In this case the HSI clock is propagated only + * to the peripheral requesting it. + * SRAM1, SRAM2 and register contents are preserved. + * The BOR is available. + * The voltage regulator is set in low-power mode but LPR bit must be cleared to enter stop 2 mode. + * Otherwise, Stop 1 mode is entered. + * @note When exiting Stop 2 mode by issuing an interrupt or a wakeup event, + * the HSI RC oscillator is selected as system clock if STOPWUCK bit in RCC_CFGR register + * is set; the MSI oscillator is selected if STOPWUCK is cleared. + * @note Case of Stop2 mode and debugger probe attached: a workaround should be applied. + * Issue specified in "ES0394 - STM32WB55Cx/Rx/Vx device errata": + * 2.2.9 Incomplete Stop 2 mode entry after a wakeup from debug upon EXTI line 48 event + * "With the JTAG debugger enabled on GPIO pins and after a wakeup from debug triggered by an event on EXTI + * line 48 (CDBGPWRUPREQ), the device may enter in a state in which attempts to enter Stop 2 mode are not fully + * effective ..." + * Workaround implementation example using LL driver: + * LL_EXTI_DisableIT_32_63(LL_EXTI_LINE_48); + * LL_C2_EXTI_DisableIT_32_63(LL_EXTI_LINE_48); + * @note According to system power policy, system entering in Stop mode + * is depending on other CPU power mode. + * @param STOPEntry specifies if Stop mode in entered with WFI or WFE instruction. + * This parameter can be one of the following values: + * @arg @ref PWR_STOPENTRY_WFI Enter Stop mode with WFI instruction + * @arg @ref PWR_STOPENTRY_WFE Enter Stop mode with WFE instruction + * @retval None + */ +void HAL_PWREx_EnterSTOP2Mode(uint8_t STOPEntry) +{ + /* Check the parameter */ + assert_param(IS_PWR_STOP_ENTRY(STOPEntry)); + + /* Set Stop mode 2 */ + MODIFY_REG(PWR->CR1, PWR_CR1_LPMS, PWR_LOWPOWERMODE_STOP2); + + /* Set SLEEPDEEP bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + + /* Select Stop mode entry --------------------------------------------------*/ + if (STOPEntry == PWR_STOPENTRY_WFI) + { + /* Request Wait For Interrupt */ + __WFI(); + } + else + { + /* Request Wait For Event */ + __SEV(); + __WFE(); + __WFE(); + } + + /* Reset SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); +} +#endif /* PWR_SUPPORT_STOP2 */ + +/** + * @brief Enter Shutdown mode. + * @note In Shutdown mode, the PLL, the HSI, the MSI, the LSI and the HSE oscillators are switched + * off. The voltage regulator is disabled and Vcore domain is powered off. + * SRAM1, SRAM2, BKRAM and registers contents are lost except for registers in the Backup domain. + * The BOR is not available. + * @note The I/Os can be configured either with a pull-up or pull-down or can be kept in analog state. + * @note According to system power policy, system entering in Shutdown mode + * is depending on other CPU power mode. + * @retval None + */ +void HAL_PWREx_EnterSHUTDOWNMode(void) +{ + /* Set Shutdown mode */ + MODIFY_REG(PWR->CR1, PWR_CR1_LPMS, PWR_LOWPOWERMODE_SHUTDOWN); + + /* Set SLEEPDEEP bit of Cortex System Control Register */ + SET_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); + + /* This option is used to ensure that store operations are completed */ +#if defined (__CC_ARM) + __force_stores(); +#endif /* __CC_ARM */ + + /* Request Wait For Interrupt */ + __WFI(); + + /* Following code is executed after wake up if system didn't go to SHUTDOWN + * or STANDBY mode according to power policy */ + + /* Reset SLEEPDEEP bit of Cortex System Control Register */ + CLEAR_BIT(SCB->SCR, ((uint32_t)SCB_SCR_SLEEPDEEP_Msk)); +} + + +/** + * @brief This function handles the PWR PVD/PVMx interrupt request. + * @note This API should be called under the PVD_PVM_IRQHandler(). + * @retval None + */ +void HAL_PWREx_PVD_PVM_IRQHandler(void) +{ + /* Check PWR exti flag */ + if (__HAL_PWR_PVD_EXTI_GET_FLAG() != 0U) + { + /* PWR PVD interrupt user callback */ + HAL_PWR_PVDCallback(); + + /* Clear PVD exti pending bit */ + __HAL_PWR_PVD_EXTI_CLEAR_FLAG(); + } + +#if defined(PWR_CR2_PVME1) + /* Next, successively check PVMx exti flags */ + if (__HAL_PWR_PVM1_EXTI_GET_FLAG() != 0U) + { + /* PWR PVM1 interrupt user callback */ + HAL_PWREx_PVM1Callback(); + + /* Clear PVM1 exti pending bit */ + __HAL_PWR_PVM1_EXTI_CLEAR_FLAG(); + } +#endif /* PWR_CR2_PVME1 */ + + if (__HAL_PWR_PVM3_EXTI_GET_FLAG() != 0U) + { + /* PWR PVM3 interrupt user callback */ + HAL_PWREx_PVM3Callback(); + + /* Clear PVM3 exti pending bit */ + __HAL_PWR_PVM3_EXTI_CLEAR_FLAG(); + } +} + +#if defined(PWR_CR2_PVME1) +/** + * @brief PWR PVM1 interrupt callback + * @retval None + */ +__weak void HAL_PWREx_PVM1Callback(void) +{ + /* NOTE : This function should not be modified; when the callback is needed, + HAL_PWREx_PVM1Callback() API can be implemented in the user file + */ +} +#endif /* PWR_CR2_PVME1 */ + +/** + * @brief PWR PVM3 interrupt callback + * @retval None + */ +__weak void HAL_PWREx_PVM3Callback(void) +{ + /* NOTE : This function should not be modified; when the callback is needed, + HAL_PWREx_PVM3Callback() API can be implemented in the user file + */ +} + + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_PWR_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ + diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c new file mode 100644 index 0000000..d2c2f5d --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c @@ -0,0 +1,1824 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_rcc.c + * @author MCD Application Team + * @brief RCC HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the Reset and Clock Control (RCC) peripheral: + * + Initialization and de-initialization functions + * + Peripheral Control functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### RCC specific features ##### + ============================================================================== + [..] + After reset the device is running from Multiple Speed Internal oscillator + (4 MHz) with Flash 0 wait state. Flash prefetch buffer, D-Cache + and I-Cache are disabled, and all peripherals are off except internal + SRAM, Flash and JTAG. + + (+) There is no prescaler on High speed (AHBs) and Low speed (APBs) buses: + all peripherals mapped on these buses are running at MSI speed. + (+) The clock for all peripherals is switched off, except the SRAM and FLASH. + (+) All GPIOs are in analog mode, except the JTAG pins which + are assigned to be used for debug purpose. + + [..] + Once the device started from reset, the user application has to: + (+) Configure the clock source to be used to drive the System clock + (if the application needs higher frequency/performance) + (+) Configure the System clock frequency and Flash settings + (+) Configure the AHB and APB buses prescalers + (+) Enable the clock for the peripheral(s) to be used + (+) Configure the clock source(s) for peripherals which clocks are not + derived from the System clock (SAI1, RTC, ADC, USB/RNG, USART1, LPUART1, LPTIMx, I2Cx, SMPS) + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup RCC RCC + * @brief RCC HAL module driver + * @{ + */ + +#ifdef HAL_RCC_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/** @defgroup RCC_Private_Constants RCC Private Constants + * @{ + */ +#define HSE_TIMEOUT_VALUE HSE_STARTUP_TIMEOUT +#define HSI_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#define MSI_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#define LSI1_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#define LSI2_TIMEOUT_VALUE (3U) /* to be adjusted with DS */ +#define HSI48_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#define PLL_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#if defined(SAI1) +#define PLLSAI1_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#endif /* SAI1 */ +#define PRESCALER_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#define LATENCY_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#define CLOCKSWITCH_TIMEOUT_VALUE (5000U) /* 5 s */ + +#define PLLSOURCE_NONE (0U) +#define MEGA_HZ (1000000U) /* Division factor to convert Hz in Mhz */ +/** + * @} + */ + +/* Private macro -------------------------------------------------------------*/ +/** @defgroup RCC_Private_Macros RCC Private Macros + * @{ + */ + +#define RCC_GET_MCO_GPIO_PIN(__RCC_MCOx__) ((__RCC_MCOx__) & GPIO_PIN_MASK) + +#define RCC_GET_MCO_GPIO_AF(__RCC_MCOx__) (((__RCC_MCOx__) & RCC_MCO_GPIOAF_MASK) >> RCC_MCO_GPIOAF_POS) + +#define RCC_GET_MCO_GPIO_INDEX(__RCC_MCOx__) (((__RCC_MCOx__) & RCC_MCO_GPIOPORT_MASK) >> RCC_MCO_GPIOPORT_POS) + +#define RCC_GET_MCO_GPIO_PORT(__RCC_MCOx__) (IOPORT_BASE + ((0x00000400UL) * RCC_GET_MCO_GPIO_INDEX((__RCC_MCOx__)))) + +#define RCC_PLL_OSCSOURCE_CONFIG(__HAL_RCC_PLLSOURCE__) \ + (MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, (uint32_t)(__HAL_RCC_PLLSOURCE__))) + +#define __COUNTOF(_A_) (sizeof(_A_) / sizeof(*(_A_))) +/** + * @} + */ + +/* Private variables ---------------------------------------------------------*/ +/** @defgroup RCC_Private_Variables RCC Private Variables + * @{ + */ + + +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup RCC_Private_Functions RCC Private Functions + * @{ + */ +static HAL_StatusTypeDef RCC_SetFlashLatencyFromMSIRange(uint32_t MSI_Range); +static HAL_StatusTypeDef RCC_SetFlashLatency(uint32_t Flash_ClkSrcFreq, uint32_t VCORE_Voltage); +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup RCC_Exported_Functions RCC Exported Functions + * @{ + */ + +/** @defgroup RCC_Exported_Functions_Group1 Initialization and de-initialization functions + * @brief Initialization and Configuration functions + * + @verbatim + =============================================================================== + ##### Initialization and de-initialization functions ##### + =============================================================================== + [..] + This section provides functions allowing to configure the internal and external oscillators + (HSE, HSI, LSE, MSI, LSI1, LSI2, PLL, CSS and MCO) and the System buses clocks (SYSCLK, HCLK1, HCLK2, HCLK4, PCLK1 + and PCLK2). + + [..] Internal/external clock and PLL configuration + (+) HSI (high-speed internal): 16 MHz factory-trimmed RC used directly or through + the PLL as System clock source. + + (+) MSI (Multiple Speed Internal): Its frequency is software trimmable from 100KHZ to 48MHZ. + It can be used to generate the clock for the USB FS (48 MHz). + The number of flash wait states is automatically adjusted when MSI range is updated with + HAL_RCC_OscConfig() and the MSI is used as System clock source. + + (+) LSI1/LSI2 (low-speed internal): 32 KHz low consumption RC used as IWDG and/or RTC + clock source. + + (+) HSE (high-speed external): 32 MHz crystal oscillator used directly or + through the PLL as System clock source. Can be used also optionally as RTC clock source. + + (+) LSE (low-speed external): 32.768 KHz oscillator used optionally as RTC clock source + or the RF system Auto-wakeup from Stop and Standby modes. + + (+) PLL (clocked by HSI, HSE or MSI) providing up to three independent output clocks: + (++) The first output is used to generate the high speed system clock (up to 64MHz). + (++) The second output is used to generate the clock for the USB FS (48 MHz), + the random analog generator (<=48 MHz) + (++) The third output is used to generate an accurate clock to achieve + high-quality audio performance on SAI interface. + + (+) PLLSAI1 (clocked by HSI, HSE or MSI) providing up to three independent output clocks: + (++) The first output is used to generate SAR ADC clock. + (++) The second output is used to generate the clock for the USB FS (48 MHz), + the random analog generator (<=48 MHz). + (++) The Third output is used to generate an accurate clock to achieve + high-quality audio performance on SAI interface. + + + (+) CSS (Clock security system): once enabled, if a HSE clock failure occurs + (HSE used directly or through PLL as System clock source), the System clock + is automatically switched to MSI or the HSI oscillator (depending on the + STOPWUCK configuration) and an interrupt is generated if enabled. + The interrupt is linked to the CPU1 and CPU2 NMI (Non-Maskable Interrupt) exception vector. + + (+) LSECSS: once enabled, if a LSE clock failure occurs, the LSE + clock is no longer supplied to the RTC but no hardware action is made to the registers. If the + MSI was in PLL-mode, this mode is disabled. + In Standby mode a wakeup is generated. In other modes an interrupt can be sent to wakeup + the software + + (+) MCO (microcontroller clock output): used to output MSI, LSI1, LSI2, HSI, LSE, HSE (before and + after stabilization), SYSCLK, HSI48 or main PLL clock (through a configurable prescaler) + on PA8, PB6 & PA15 pins. + + [..] System, AHB and APB buses clocks configuration + (+) Several clock sources can be used to drive the System clock (SYSCLK): MSI, HSI, + HSE and main PLL. + The AHB clock (HCLK1) is derived from System clock through configurable + prescaler and used to clock the CPU, memory and peripherals mapped + on AHB bus (DMA, GPIO...). APB1 (PCLK1) and APB2 (PCLK2) clocks are derived + from AHB clock through configurable prescalers and used to clock + the peripherals mapped on these buses. You can use + HAL_RCC_GetSysClockFreq() function to retrieve the frequencies of these clocks. + The AHB4 clock (HCLK4) is derived from System clock through configurable + prescaler and used to clock the FLASH + + -@- All the peripheral clocks are derived from the System clock (SYSCLK) except: + + (+@) SAI: the SAI clock can be derived either from a specific PLL (PLLSAI1) or (PLLSYS) or + from an external clock mapped on the SAI_CKIN pin. + You have to use HAL_RCCEx_PeriphCLKConfig() function to configure this clock. + (+@) RTC: the RTC clock can be derived either from the LSI, LSE or HSE clock + divided by 32. + You have to use __HAL_RCC_RTC_ENABLE() and HAL_RCCEx_PeriphCLKConfig() function + to configure this clock. + (+@) USB FS and RNG: USB FS requires a frequency equal to 48 MHz + to work correctly, while RNG peripherals requires a frequency + equal or lower than to 48 MHz. This clock is derived of the main PLL or PLLSAI1 + through PLLQ divider. You have to enable the peripheral clock and use + HAL_RCCEx_PeriphCLKConfig() function to configure this clock. + (+@) IWDG clock which is always the LSI clock. + + + (+) The maximum frequency of the SYSCLK, HCLK1, HCLK4, PCLK1 and PCLK2 is 64 MHz. + The maximum frequency of the HCLK2 is 32 MHz. + The clock source frequency should be adapted depending on the device voltage range + as listed in the Reference Manual "Clock source frequency versus voltage scaling" chapter. + + @endverbatim + + Table 1. HCLK4 clock frequency. + +-------------------------------------------------------+ + | Latency | HCLK4 clock frequency (MHz) | + | |-------------------------------------| + | | voltage range 1 | voltage range 2 | + | | 1.2 V | 1.0 V | + |-----------------|------------------|------------------| + |0WS(1 CPU cycles)| HCLK4 <= 18 | HCLK4 <= 6 | + |-----------------|------------------|------------------| + |1WS(2 CPU cycles)| HCLK4 <= 36 | HCLK4 <= 12 | + |-----------------|------------------|------------------| + |2WS(3 CPU cycles)| HCLK4 <= 54 | HCLK4 <= 16 | + |-----------------|------------------|------------------| + |3WS(4 CPU cycles)| HCLK4 <= 64 | HCLK4 <= n.a. | + |-----------------|------------------|------------------| + + * @{ + */ + +/** + * @brief Reset the RCC clock configuration to the default reset state. + * @note The default reset state of the clock configuration is given below: + * - MSI ON and used as system clock source + * - HSE, HSI, PLL, PLLSAI1 + * - HCLK1, HCLK2, HCLK4, PCLK1 and PCLK2 prescalers set to 1. + * - CSS, MCO OFF + * - All interrupts disabled + * @note This function doesn't modify the configuration of the + * - Peripheral clocks + * - LSI, LSE and RTC clocks + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCC_DeInit(void) +{ + uint32_t tickstart; + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* MSI PLL OFF */ + LL_RCC_MSI_DisablePLLMode(); + + /* Set MSION bit */ + LL_RCC_MSI_Enable(); + + /* Wait till MSI is ready */ + while (LL_RCC_MSI_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + /* Set MSIRANGE default value */ + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + + /* Set MSITRIM bits to the reset value*/ + LL_RCC_MSI_SetCalibTrimming(0); + + /* Set HSITRIM bits to the reset value*/ + LL_RCC_HSI_SetCalibTrimming(0x40U); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Reset CFGR register (MSI is selected as system clock source) */ + CLEAR_REG(RCC->CFGR); + + /* Wait till MSI is ready */ + while (READ_BIT(RCC->CFGR, RCC_CFGR_SWS) != 0U) + { + if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + /* Reset HSION, HSIKERON, HSIASFS, HSEON, PLLON, PLLSAI11ON, HSEPRE bits */ +#if defined(SAI1) + CLEAR_BIT(RCC->CR, RCC_CR_HSION | RCC_CR_HSIKERON | RCC_CR_HSIASFS | RCC_CR_HSEON | RCC_CR_HSEPRE | RCC_CR_PLLON | + RCC_CR_PLLSAI1ON); +#else + CLEAR_BIT(RCC->CR, RCC_CR_HSION | RCC_CR_HSIKERON | RCC_CR_HSIASFS | RCC_CR_HSEON | RCC_CR_HSEPRE | RCC_CR_PLLON); +#endif /* SAI1 */ + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLL is ready */ + while (LL_RCC_PLL_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + /* once PLL is OFF, reset PLLCFGR register to default value */ + WRITE_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLR_0 | RCC_PLLCFGR_PLLQ_0 | RCC_PLLCFGR_PLLP_1 | RCC_PLLCFGR_PLLN_0); + +#if defined(SAI1) + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLL is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + /* once PLLSAI1 is OFF, reset PLLSAI1CFGR register to default value */ + WRITE_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLR_0 | RCC_PLLSAI1CFGR_PLLQ_0 | + RCC_PLLSAI1CFGR_PLLP_1 | RCC_PLLSAI1CFGR_PLLN_0); +#endif /* SAI1 */ + + /* Disable all interrupts */ + CLEAR_REG(RCC->CIER); + + /* Clear all interrupt flags */ + WRITE_REG(RCC->CICR, 0xFFFFFFFFU); + + /* EXTCFGR reset*/ + LL_RCC_WriteReg(EXTCFGR, 0x00030000U); + + /* Update the SystemCoreClock global variable */ + SystemCoreClock = MSI_VALUE; + + /* Adapt Systick interrupt period */ + if (HAL_InitTick(uwTickPrio) != HAL_OK) + { + return HAL_ERROR; + } + else + { + return HAL_OK; + } +} + +/** + * @brief Initialize the RCC Oscillators according to the specified parameters in the + * @ref RCC_OscInitTypeDef. + * @param RCC_OscInitStruct pointer to a @ref RCC_OscInitTypeDef structure that + * contains the configuration information for the RCC Oscillators. + * @note The PLL is not disabled when used as system clock. + * @note The PLL source is not updated when used as PLLSAI1 clock source. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct) +{ + uint32_t tickstart; + + /* Check Null pointer */ + if (RCC_OscInitStruct == NULL) + { + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); + + /*----------------------------- MSI Configuration --------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_MSI) == RCC_OSCILLATORTYPE_MSI) + { + /* Check the parameters */ + assert_param(IS_RCC_MSI(RCC_OscInitStruct->MSIState)); + assert_param(IS_RCC_MSICALIBRATION_VALUE(RCC_OscInitStruct->MSICalibrationValue)); + assert_param(IS_RCC_MSI_CLOCK_RANGE(RCC_OscInitStruct->MSIClockRange)); + + /* When the MSI is used as system clock it will not be disabled */ + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + const uint32_t temp_plloscsrc = __HAL_RCC_GET_PLL_OSCSOURCE(); + if ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_MSI) || + ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_plloscsrc == RCC_PLLSOURCE_MSI))) + { + if (RCC_OscInitStruct->MSIState == RCC_MSI_OFF) + { + return HAL_ERROR; + } + /* Otherwise, just the calibration and MSI range change are allowed */ + else + { + /* To correctly read data from FLASH memory, the number of wait states (LATENCY) + must be correctly programmed according to the frequency of the AHB4 clock + and the supply voltage of the device. */ + if (RCC_OscInitStruct->MSIClockRange > __HAL_RCC_GET_MSI_RANGE()) + { + /* First increase number of wait states update if necessary */ + if (RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK) + { + return HAL_ERROR; + } + + /* Selects the Multiple Speed oscillator (MSI) clock range .*/ + __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange); + /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/ + __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue); + } + else + { + /* Else, keep current flash latency while decreasing applies */ + /* Selects the Multiple Speed oscillator (MSI) clock range .*/ + __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange); + /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/ + __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue); + + /* Decrease number of wait states update if necessary */ + if (RCC_SetFlashLatencyFromMSIRange(RCC_OscInitStruct->MSIClockRange) != HAL_OK) + { + return HAL_ERROR; + } + } + + /* Update the SystemCoreClock global variable */ + SystemCoreClock = HAL_RCC_GetHCLKFreq(); + + if (HAL_InitTick(uwTickPrio) != HAL_OK) + { + return HAL_ERROR; + } + } + } + else + { + /* Check the MSI State */ + if (RCC_OscInitStruct->MSIState != RCC_MSI_OFF) + { + /* Enable the Internal High Speed oscillator (MSI). */ + __HAL_RCC_MSI_ENABLE(); + + /* Get timeout */ + tickstart = HAL_GetTick(); + + /* Wait till MSI is ready */ + while (LL_RCC_MSI_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + /* Selects the Multiple Speed oscillator (MSI) clock range .*/ + __HAL_RCC_MSI_RANGE_CONFIG(RCC_OscInitStruct->MSIClockRange); + /* Adjusts the Multiple Speed oscillator (MSI) calibration value.*/ + __HAL_RCC_MSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->MSICalibrationValue); + + } + else + { + /* Disable the Internal High Speed oscillator (MSI). */ + __HAL_RCC_MSI_DISABLE(); + + /* Get timeout */ + tickstart = HAL_GetTick(); + + /* Wait till MSI is disabled */ + while (LL_RCC_MSI_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > MSI_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + } + } + + /*------------------------------- HSE Configuration ------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) + { + /* Check the parameters */ + assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); + + /* When the HSE is used as system clock or clock source for PLL in these cases it is not allowed to be disabled */ + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + const uint32_t temp_plloscsrc = __HAL_RCC_GET_PLL_OSCSOURCE(); + if ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSE) || + ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_plloscsrc == RCC_PLLSOURCE_HSE))) + { + if (RCC_OscInitStruct->HSEState == RCC_HSE_OFF) + { + return HAL_ERROR; + } + } + else + { + /* Set the new HSE configuration ---------------------------------------*/ + __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); + + /* Check the HSE State */ + if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF) + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till HSE is ready */ + while (LL_RCC_HSE_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + else + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till HSE is disabled */ + while (LL_RCC_HSE_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + } + } + + /*----------------------------- HSI Configuration --------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) + { + /* Check the parameters */ + assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState)); + assert_param(IS_RCC_HSI_CALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue)); + + /* Check if HSI is used as system clock or as PLL source when PLL is selected as system clock */ + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + const uint32_t temp_plloscsrc = __HAL_RCC_GET_PLL_OSCSOURCE(); + if ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSI) || + ((temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_PLLCLK) && (temp_plloscsrc == RCC_PLLSOURCE_HSI))) + { + /* When HSI is used as system clock it will not be disabled */ + if (RCC_OscInitStruct->HSIState == RCC_HSI_OFF) + { + return HAL_ERROR; + } + /* Otherwise, just the calibration is allowed */ + else + { + /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ + __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); + } + } + else + { + /* Check the HSI State */ + if (RCC_OscInitStruct->HSIState != RCC_HSI_OFF) + { + /* Enable the Internal High Speed oscillator (HSI). */ + __HAL_RCC_HSI_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till HSI is ready */ + while (LL_RCC_HSI_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ + __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); + } + else + { + /* Disable the Internal High Speed oscillator (HSI). */ + __HAL_RCC_HSI_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till HSI is disabled */ + while (LL_RCC_HSI_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + } + } + /*------------------------------ LSI Configuration (LSI1 or LSI2) -------------------------*/ + + if ((((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI1) == RCC_OSCILLATORTYPE_LSI1) || \ + (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI2) == RCC_OSCILLATORTYPE_LSI2)) + { + /* Check the parameters */ + assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); + + /* Check the LSI State */ + if (RCC_OscInitStruct->LSIState != RCC_LSI_OFF) + { + /*------------------------------ LSI2 selected by default (when Switch ON) -------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI2) == RCC_OSCILLATORTYPE_LSI2) + { + assert_param(IS_RCC_LSI2_CALIBRATION_VALUE(RCC_OscInitStruct->LSI2CalibrationValue)); + + /* 1. Check LSI1 state and enable if required */ + if (LL_RCC_LSI1_IsReady() == 0U) + { + /* This is required to enable LSI1 before enabling LSI2 */ + __HAL_RCC_LSI1_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSI1 is ready */ + while (LL_RCC_LSI1_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > LSI1_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /* 2. Enable the Internal Low Speed oscillator (LSI2) and set trimming value */ + __HAL_RCC_LSI2_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSI2 is ready */ + while (LL_RCC_LSI2_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > LSI2_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + /* Adjusts the Internal Low Spee oscillator (LSI2) calibration value */ + __HAL_RCC_LSI2_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->LSI2CalibrationValue); + + /* 3. Disable LSI1 */ + + /* LSI1 was initially not enable, require to disable it */ + __HAL_RCC_LSI1_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSI1 is disabled */ + while (LL_RCC_LSI1_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > LSI1_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + else + { + /*------------------------------ LSI1 selected (only if LSI2 OFF)-------------------------*/ + + /* 1. Enable the Internal Low Speed oscillator (LSI1). */ + __HAL_RCC_LSI1_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSI1 is ready */ + while (LL_RCC_LSI1_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > LSI1_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + /*2. Switch OFF LSI2*/ + + /* Disable the Internal Low Speed oscillator (LSI2). */ + __HAL_RCC_LSI2_DISABLE(); + + /* Wait till LSI2 is disabled */ + while (LL_RCC_LSI2_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > LSI2_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + } + else + { + + /* Disable the Internal Low Speed oscillator (LSI2). */ + __HAL_RCC_LSI2_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSI2 is disabled */ + while (LL_RCC_LSI2_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > LSI2_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + /* Disable the Internal Low Speed oscillator (LSI1). */ + __HAL_RCC_LSI1_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSI1 is disabled */ + while (LL_RCC_LSI1_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > LSI1_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + } + + /*------------------------------ LSE Configuration -------------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) + { + /* Check the parameters */ + assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); + + /* Update LSE configuration in Backup Domain control register */ + /* Requires to enable write access to Backup Domain of necessary */ + + if (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP)) + { + /* Enable write access to Backup domain */ + HAL_PWR_EnableBkUpAccess(); + + /* Wait for Backup domain Write protection disable */ + tickstart = HAL_GetTick(); + + while (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP)) + { + if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /* Set the new LSE configuration -----------------------------------------*/ + __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); + + /* Check the LSE State */ + if (RCC_OscInitStruct->LSEState != RCC_LSE_OFF) + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSE is ready */ + while (LL_RCC_LSE_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + else + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSE is disabled */ + while (LL_RCC_LSE_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + } +#if defined(RCC_HSI48_SUPPORT) + /*------------------------------ HSI48 Configuration -----------------------*/ + if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48) + { + /* Check the parameters */ + assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State)); + + /* Check the HSI State */ + if (RCC_OscInitStruct->HSI48State != RCC_HSI48_OFF) + { + /* Enable the Internal Low Speed oscillator (HSI48). */ + __HAL_RCC_HSI48_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till HSI48 is ready */ + while (LL_RCC_HSI48_IsReady() == 0U) + { + if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + else + { + /* Disable the Internal Low Speed oscillator (HSI48). */ + __HAL_RCC_HSI48_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till HSI48 is disabled */ + while (LL_RCC_HSI48_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + } +#endif /* RCC_HSI48_SUPPORT */ + /*-------------------------------- PLL Configuration -----------------------*/ + /* Check the parameters */ + assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); + + if (RCC_OscInitStruct->PLL.PLLState != RCC_PLL_NONE) + { + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + const uint32_t temp_pllconfig = RCC->PLLCFGR; + + /* PLL On ? */ + if (RCC_OscInitStruct->PLL.PLLState == RCC_PLL_ON) + { + /* Check the parameters */ + assert_param(IS_RCC_PLLSOURCE(RCC_OscInitStruct->PLL.PLLSource)); + assert_param(IS_RCC_PLLM_VALUE(RCC_OscInitStruct->PLL.PLLM)); + assert_param(IS_RCC_PLLN_VALUE(RCC_OscInitStruct->PLL.PLLN)); + assert_param(IS_RCC_PLLP_VALUE(RCC_OscInitStruct->PLL.PLLP)); + assert_param(IS_RCC_PLLQ_VALUE(RCC_OscInitStruct->PLL.PLLQ)); + assert_param(IS_RCC_PLLR_VALUE(RCC_OscInitStruct->PLL.PLLR)); + + /* Do nothing if PLL configuration is unchanged */ + if ((READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLM) != RCC_OscInitStruct->PLL.PLLM) || + ((READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos) != RCC_OscInitStruct->PLL.PLLN) || + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLP) != RCC_OscInitStruct->PLL.PLLP) || + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLQ) != RCC_OscInitStruct->PLL.PLLQ) || + (READ_BIT(temp_pllconfig, RCC_PLLCFGR_PLLR) != RCC_OscInitStruct->PLL.PLLR)) + { + /* Check if the PLL is used as system clock or not */ + if (temp_sysclksrc != RCC_SYSCLKSOURCE_STATUS_PLLCLK) + { +#if defined(SAI1) + /* Check if main PLL can be updated */ + /* Not possible if the source is shared by other enabled PLLSAIx */ + if (READ_BIT(RCC->CR, RCC_CR_PLLSAI1ON) != 0U) + + { + return HAL_ERROR; + } + else +#endif /* SAI1 */ + { + /* Disable the main PLL. */ + __HAL_RCC_PLL_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLL is ready */ + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U) + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + /* Configure the main PLL clock source, multiplication and division factors. */ + __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, + RCC_OscInitStruct->PLL.PLLM, + RCC_OscInitStruct->PLL.PLLN, + RCC_OscInitStruct->PLL.PLLP, + RCC_OscInitStruct->PLL.PLLQ, + RCC_OscInitStruct->PLL.PLLR); + + /* Enable the main PLL. */ + __HAL_RCC_PLL_ENABLE(); + + /* Enable PLL System Clock output. */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SYSCLK); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLL is ready */ + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U) + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + } + else + { + /* PLL is already used as System core clock */ + return HAL_ERROR; + } + } + else + { + /* PLL configuration is unchanged */ + /* Re-enable PLL if it was disabled (ie. low power mode) */ + if (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U) + { + /* Enable the main PLL. */ + __HAL_RCC_PLL_ENABLE(); + + /* Enable PLL System Clock output. */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SYSCLK); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLL is ready */ + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) == 0U) + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + } + } + else + { + /* Check that PLL is not used as system clock or not */ + if (temp_sysclksrc != RCC_SYSCLKSOURCE_STATUS_PLLCLK) + { + /* Disable the main PLL. */ + __HAL_RCC_PLL_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLL is disabled */ + while (READ_BIT(RCC->CR, RCC_CR_PLLRDY) != 0U) + { + if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + /* Disable the PLL source and outputs to save power when PLL is off */ +#if defined(SAI1) && defined(USB) + CLEAR_BIT(RCC->PLLCFGR, (RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLPEN | RCC_PLLCFGR_PLLQEN | RCC_PLLCFGR_PLLREN)); +#else + CLEAR_BIT(RCC->PLLCFGR, (RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLREN)); +#endif /* SAI1 && USB */ + } + else + { + /* PLL is already used as System core clock */ + return HAL_ERROR; + } + } + } + return HAL_OK; +} + + +/** + * @brief Initialize the CPU, AHB and APB buses clocks according to the specified + * parameters in the RCC_ClkInitStruct. + * @param RCC_ClkInitStruct pointer to a @ref RCC_ClkInitTypeDef structure that + * contains the configuration information for the RCC peripheral. + * @param FLatency FLASH Latency + * This parameter can be one of the following values: + * @arg FLASH_LATENCY_0 FLASH 0 Latency cycle + * @arg FLASH_LATENCY_1 FLASH 1 Latency cycle + * @arg FLASH_LATENCY_2 FLASH 2 Latency cycle + * @arg FLASH_LATENCY_3 FLASH 3 Latency cycle + * + * @note The SystemCoreClock CMSIS variable is used to store System Clock Frequency + * and updated by @ref HAL_RCC_GetHCLKFreq() function called within this function + * + * @note The MSI is used by default as system clock source after + * startup from Reset, wake-up from STANDBY mode. After restart from Reset, + * the MSI frequency is set to its default value 4 MHz. + * + * @note The HSI can be selected as system clock source after + * from STOP modes or in case of failure of the HSE used directly or indirectly + * as system clock (if the Clock Security System CSS is enabled). + * + * @note A switch from one clock source to another occurs only if the target + * clock source is ready (clock stable after startup delay or PLL locked). + * If a clock source which is not yet ready is selected, the switch will + * occur when the clock source is ready. + * + * @note You can use @ref HAL_RCC_GetClockConfig() function to know which clock is + * currently used as system clock source. + * + * @note Depending on the device voltage range, the software has to set correctly + * HPRE[3:0] bits to ensure that HCLK1 not exceed the maximum allowed frequency + * (for more details refer to section above "Initialization/de-initialization functions") + * @retval None + */ +HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency) +{ + uint32_t tickstart; + + /* Check Null pointer */ + if (RCC_ClkInitStruct == NULL) + { + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_RCC_CLOCKTYPE(RCC_ClkInitStruct->ClockType)); + assert_param(IS_FLASH_LATENCY(FLatency)); + + /* To correctly read data from FLASH memory, the number of wait states (LATENCY) + must be correctly programmed according to the frequency of the FLASH clock + (HCLK4) and the supply voltage of the device. */ + + /* Increasing the number of wait states because of higher CPU frequency */ + if (FLatency > __HAL_FLASH_GET_LATENCY()) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + __HAL_FLASH_SET_LATENCY(FLatency); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Check that the new number of wait states is taken into account to access the Flash + memory by reading the FLASH_ACR register */ + while (__HAL_FLASH_GET_LATENCY() != FLatency) + { + if ((HAL_GetTick() - tickstart) > LATENCY_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /*-------------------------- HCLK1 Configuration --------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) + { + assert_param(IS_RCC_HCLKx(RCC_ClkInitStruct->AHBCLKDivider)); + LL_RCC_SetAHBPrescaler(RCC_ClkInitStruct->AHBCLKDivider); + + /* HCLK1 prescaler flag when value applied */ + tickstart = HAL_GetTick(); + while (LL_RCC_IsActiveFlag_HPRE() == 0U) + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /*-------------------------- HCLK2 Configuration --------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK2) == RCC_CLOCKTYPE_HCLK2) + { + assert_param(IS_RCC_HCLKx(RCC_ClkInitStruct->AHBCLK2Divider)); + LL_C2_RCC_SetAHBPrescaler(RCC_ClkInitStruct->AHBCLK2Divider); + + /* HCLK2 prescaler flag when value applied */ + tickstart = HAL_GetTick(); + while (LL_RCC_IsActiveFlag_C2HPRE() == 0U) + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + /*-------------------------- HCLK4 Configuration --------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK4) == RCC_CLOCKTYPE_HCLK4) + { + assert_param(IS_RCC_HCLKx(RCC_ClkInitStruct->AHBCLK4Divider)); + LL_RCC_SetAHB4Prescaler(RCC_ClkInitStruct->AHBCLK4Divider); + + /* AHB shared prescaler flag when value applied */ + tickstart = HAL_GetTick(); + while (LL_RCC_IsActiveFlag_SHDHPRE() == 0U) + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /*-------------------------- PCLK1 Configuration ---------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) + { + assert_param(IS_RCC_PCLKx(RCC_ClkInitStruct->APB1CLKDivider)); + LL_RCC_SetAPB1Prescaler(RCC_ClkInitStruct->APB1CLKDivider); + + /* APB1 prescaler flag when value applied */ + tickstart = HAL_GetTick(); + while (LL_RCC_IsActiveFlag_PPRE1() == 0U) + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /*-------------------------- PCLK2 Configuration ---------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) + { + assert_param(IS_RCC_PCLKx(RCC_ClkInitStruct->APB2CLKDivider)); + LL_RCC_SetAPB2Prescaler((RCC_ClkInitStruct->APB2CLKDivider) << 3U); + + /* APB2 prescaler flag when value applied */ + tickstart = HAL_GetTick(); + while (LL_RCC_IsActiveFlag_PPRE2() == 0U) + { + if ((HAL_GetTick() - tickstart) > PRESCALER_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /*------------------------- SYSCLK Configuration ---------------------------*/ + if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) + { + assert_param(IS_RCC_SYSCLKSOURCE(RCC_ClkInitStruct->SYSCLKSource)); + + /* HSE is selected as System Clock Source */ + if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) + { + /* Check the HSE ready flag */ + if (LL_RCC_HSE_IsReady() == 0U) + { + return HAL_ERROR; + } + } + /* PLL is selected as System Clock Source */ + else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) + { + /* Check the PLL ready flag */ + if (LL_RCC_PLL_IsReady() == 0U) + { + return HAL_ERROR; + } + } + /* MSI is selected as System Clock Source */ + else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_MSI) + { + /* Check the MSI ready flag */ + if (LL_RCC_MSI_IsReady() == 0U) + { + return HAL_ERROR; + } + } + /* HSI is selected as System Clock Source */ + else + { + /* Check the HSI ready flag */ + if (LL_RCC_HSI_IsReady() == 0U) + { + return HAL_ERROR; + } + + } + + /* apply system clock switch */ + LL_RCC_SetSysClkSource(RCC_ClkInitStruct->SYSCLKSource); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* check system clock source switch status */ + while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) + { + if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /* Decreasing the number of wait states because of lower CPU frequency */ + if (FLatency < __HAL_FLASH_GET_LATENCY()) + { + /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ + __HAL_FLASH_SET_LATENCY(FLatency); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Check that the new number of wait states is taken into account to access the Flash + memory by reading the FLASH_ACR register */ + while (__HAL_FLASH_GET_LATENCY() != FLatency) + { + if ((HAL_GetTick() - tickstart) > LATENCY_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + } + + /*---------------------------------------------------------------------------*/ + + /* Update the SystemCoreClock global variable */ + SystemCoreClock = HAL_RCC_GetHCLKFreq(); + + /* Configure the source of time base considering new system clocks settings*/ + return HAL_InitTick(HAL_GetTickPrio()); +} + +/** + * @} + */ + +/** @defgroup RCC_Exported_Functions_Group2 Peripheral Control functions + * @brief RCC clocks control functions + * +@verbatim + =============================================================================== + ##### Peripheral Control functions ##### + =============================================================================== + [..] + This subsection provides a set of functions allowing to: + + (+) Output clock to MCO pin. + (+) Retrieve current clock frequencies. + (+) Enable the Clock Security System. + +@endverbatim + * @{ + */ + +/** + * @brief Select the clock source to output on MCO1 pin(PA8) or MCO2 pin (PB6) or MCO3 pin (PA15). + * @note PA8, PB6 or PA15 should be configured in alternate function mode. + * @param RCC_MCOx specifies the output direction for the clock source. + * @arg @ref RCC_MCO1_PA8 Clock source to output on MCO1 pin(PA8) + * @arg @ref RCC_MCO2_PB6 Clock source to output on MCO2 pin(PB6) + * @arg @ref RCC_MCO3_PA15 Clock source to output on MCO3 pin(PA15) + * @param RCC_MCOSource specifies the clock source to output. + * This parameter can be one of the following values: + * @arg @ref RCC_MCO1SOURCE_NOCLOCK MCO output disabled, no clock on MCO + * @arg @ref RCC_MCO1SOURCE_SYSCLK system clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_MSI MSI clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_HSI HSI clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_HSE HSE clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_PLLCLK main PLL clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_LSI1 LSI1 clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_LSI2 LSI2 clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_LSE LSE clock selected as MCO source + * @arg @ref RCC_MCO1SOURCE_HSI48 HSI48 clock selected as MCO source for devices with HSI48 + * @arg @ref RCC_MCO1SOURCE_HSE_BEFORE_STAB HSE clock before stabilization selected as MCO source + * @param RCC_MCODiv specifies the MCO prescaler. + * This parameter can be one of the following values: + * @arg @ref RCC_MCODIV_1 no division applied to MCO clock + * @arg @ref RCC_MCODIV_2 division by 2 applied to MCO clock + * @arg @ref RCC_MCODIV_4 division by 4 applied to MCO clock + * @arg @ref RCC_MCODIV_8 division by 8 applied to MCO clock + * @arg @ref RCC_MCODIV_16 division by 16 applied to MCO clock + * @retval None + */ +void HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv) +{ + GPIO_InitTypeDef gpio_initstruct; + uint32_t mcoindex; + uint32_t mco_gpio_index; + GPIO_TypeDef *mco_gpio_port; + + /* Check the parameters */ + assert_param(IS_RCC_MCO(RCC_MCOx)); + + /* Common GPIO init parameters */ + gpio_initstruct.Mode = GPIO_MODE_AF_PP; + gpio_initstruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + gpio_initstruct.Pull = GPIO_NOPULL; + + /* Get MCOx selection */ + mcoindex = RCC_MCOx & RCC_MCO_INDEX_MASK; + + /* Get MCOx GPIO Port */ + mco_gpio_port = (GPIO_TypeDef *) RCC_GET_MCO_GPIO_PORT(RCC_MCOx); + + /* MCOx Clock Enable */ + mco_gpio_index = RCC_GET_MCO_GPIO_INDEX(RCC_MCOx); + SET_BIT(RCC->AHB2ENR, (1UL << mco_gpio_index)); + + /* Configure the MCOx pin in alternate function mode */ + gpio_initstruct.Pin = RCC_GET_MCO_GPIO_PIN(RCC_MCOx); + gpio_initstruct.Alternate = RCC_GET_MCO_GPIO_AF(RCC_MCOx); + HAL_GPIO_Init(mco_gpio_port, &gpio_initstruct); + + if (mcoindex == RCC_MCO1_INDEX) + { + assert_param(IS_RCC_MCODIV(RCC_MCODiv)); + assert_param(IS_RCC_MCO1SOURCE(RCC_MCOSource)); + /* Mask MCOSEL[] and MCOPRE[] bits then set MCO clock source and prescaler */ + LL_RCC_ConfigMCO(RCC_MCOSource, RCC_MCODiv); + } + else if (mcoindex == RCC_MCO2_INDEX) + { + assert_param(IS_RCC_MCODIV(RCC_MCODiv)); + assert_param(IS_RCC_MCO2SOURCE(RCC_MCOSource)); + /* Mask MCOSEL[] and MCOPRE[] bits then set MCO clock source and prescaler */ + LL_RCC_ConfigMCO(RCC_MCOSource, RCC_MCODiv); + } +#if defined(RCC_MCO3_SUPPORT) + else if (mcoindex == RCC_MCO3_INDEX) + { + assert_param(IS_RCC_MCODIV(RCC_MCODiv)); + assert_param(IS_RCC_MCO3SOURCE(RCC_MCOSource)); + /* Mask MCOSEL[] and MCOPRE[] bits then set MCO clock source and prescaler */ + LL_RCC_ConfigMCO(RCC_MCOSource, RCC_MCODiv); + } +#endif /* RCC_MCO3_SUPPORT */ + else + {} +} + +/** + * @brief Return the SYSCLK frequency. + * + * @note The system computed by this function is not the real + * frequency in the chip. It is calculated based on the predefined + * constant and the selected clock source: + * @note If SYSCLK source is MSI, function returns values based on MSI range + * @note If SYSCLK source is HSI, function returns values based on HSI_VALUE(*) + * @note If SYSCLK source is HSE, function returns values based on HSE_VALUE(**) + * @note If SYSCLK source is PLL, function returns values based on HSE_VALUE(**), + * HSI_VALUE(*) or MSI Value multiplied/divided by the PLL factors. + * @note (*) HSI_VALUE is a constant defined in stm32wbxx_hal_conf.h file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * @note (**) HSE_VALUE is a constant defined in stm32wbxx_hal_conf.h file (default value + * 32 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * + * @note The result of this function could be not correct when using fractional + * value for HSE crystal. + * + * @note This function can be used by the user application to compute the + * baudrate for the communication peripherals or configure other parameters. + * + * @note Each time SYSCLK changes, this function must be called to update the + * right SYSCLK value. Otherwise, any configuration based on this function will be incorrect. + * + * + * @retval SYSCLK frequency + */ +uint32_t HAL_RCC_GetSysClockFreq(void) +{ + uint32_t pllsource; + uint32_t sysclockfreq; + uint32_t pllinputfreq; + const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); + + if (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_MSI) + { + /* Retrieve MSI frequency range in HZ*/ + /* MSI used as system clock source */ + sysclockfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + } + else if (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSI) + { + /* HSI used as system clock source */ + sysclockfreq = HSI_VALUE; + } + else if (temp_sysclksrc == RCC_SYSCLKSOURCE_STATUS_HSE) + { + /* HSE used as system clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + sysclockfreq = HSE_VALUE / 2U; + } + else + { + sysclockfreq = HSE_VALUE; + } + } + else + { + /* PLL used as system clock source */ + pllsource = LL_RCC_PLL_GetMainSource(); + switch (pllsource) + { + case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ + pllinputfreq = HSI_VALUE; + break; + case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + case RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */ + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + sysclockfreq = __LL_RCC_CALC_PLLCLK_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), LL_RCC_PLL_GetN(), + LL_RCC_PLL_GetR()); + } + + return sysclockfreq; +} + +/** + * @brief Return the HCLK frequency. + * @retval HCLK frequency in Hz + */ +uint32_t HAL_RCC_GetHCLKFreq(void) +{ + /* Get SysClock and Compute HCLK1 frequency ---------------------------*/ + return ((uint32_t)(__LL_RCC_CALC_HCLK1_FREQ(HAL_RCC_GetSysClockFreq(), LL_RCC_GetAHBPrescaler()))); +} + +/** + * @brief Return the HCLK2 frequency. + * @retval HCLK2 frequency in Hz + */ +uint32_t HAL_RCC_GetHCLK2Freq(void) +{ + /* Get SysClock and Compute HCLK2 frequency ---------------------------*/ + return ((uint32_t)(__LL_RCC_CALC_HCLK2_FREQ(HAL_RCC_GetSysClockFreq(), LL_C2_RCC_GetAHBPrescaler()))); +} + +/** + * @brief Return the HCLK4 frequency. + * @retval HCLK4 frequency in Hz + */ +uint32_t HAL_RCC_GetHCLK4Freq(void) +{ + /* Get SysClock and Compute AHB4 frequency ---------------------------*/ + return ((uint32_t)(__LL_RCC_CALC_HCLK4_FREQ(HAL_RCC_GetSysClockFreq(), LL_RCC_GetAHB4Prescaler()))); +} + +/** + * @brief Return the PCLK1 frequency. + * @note Each time PCLK1 changes, this function must be called to update the + * right PCLK1 value. Otherwise, any configuration based on this function will be incorrect. + * @retval PCLK1 frequency in Hz + */ +uint32_t HAL_RCC_GetPCLK1Freq(void) +{ + /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/ + return ((uint32_t)(__LL_RCC_CALC_PCLK1_FREQ(HAL_RCC_GetHCLKFreq(), LL_RCC_GetAPB1Prescaler()))); +} + +/** + * @brief Return the PCLK2 frequency. + * @note Each time PCLK2 changes, this function must be called to update the + * right PCLK2 value. Otherwise, any configuration based on this function will be incorrect. + * @retval PCLK2 frequency in Hz + */ +uint32_t HAL_RCC_GetPCLK2Freq(void) +{ + /* Get HCLK source and Compute PCLK2 frequency ---------------------------*/ + return ((uint32_t)(__LL_RCC_CALC_PCLK2_FREQ(HAL_RCC_GetHCLKFreq(), LL_RCC_GetAPB2Prescaler()))); +} + +/** + * @brief Configure the RCC_OscInitStruct according to the internal + * RCC configuration registers. + * @param RCC_OscInitStruct pointer to an RCC_OscInitTypeDef structure that + * will be configured. + * @retval None + */ +void HAL_RCC_GetOscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct) +{ + uint32_t regvalue; + uint32_t regICSRvalue; + uint32_t regPLLCFGRvalue; + + /* Check the parameters */ + assert_param(RCC_OscInitStruct != (void *)NULL); + + /* Set all possible values for the Oscillator type parameter ---------------*/ + RCC_OscInitStruct->OscillatorType = RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_MSI | \ + RCC_OSCILLATORTYPE_LSE | RCC_OSCILLATORTYPE_LSI1 | RCC_OSCILLATORTYPE_LSI2; + +#if defined(RCC_HSI48_SUPPORT) + RCC_OscInitStruct->OscillatorType |= RCC_OSCILLATORTYPE_HSI48; +#endif /* RCC_HSI48_SUPPORT */ + + /* Get register values */ + regvalue = RCC->CR; /* Control register */ + regICSRvalue = RCC->ICSCR; /* Get Internal Clock Sources Calibration register */ + regPLLCFGRvalue = RCC->PLLCFGR; /* Get PLL Configuration register */ + + /* Get the HSE configuration -----------------------------------------------*/ + RCC_OscInitStruct->HSEState = (regvalue & RCC_CR_HSEON); + + /* Get the MSI configuration -----------------------------------------------*/ + RCC_OscInitStruct->MSIState = (regvalue & RCC_CR_MSION); + RCC_OscInitStruct->MSICalibrationValue = (regICSRvalue & RCC_ICSCR_MSITRIM) >> RCC_ICSCR_MSITRIM_Pos; + RCC_OscInitStruct->MSIClockRange = (regvalue & RCC_CR_MSIRANGE); + + /* Get the HSI configuration -----------------------------------------------*/ + RCC_OscInitStruct->HSIState = (regvalue & RCC_CR_HSION); + RCC_OscInitStruct->HSICalibrationValue = ((regICSRvalue & RCC_ICSCR_HSITRIM) >> RCC_ICSCR_HSITRIM_Pos); + + /* Get the PLL configuration -----------------------------------------------*/ + RCC_OscInitStruct->PLL.PLLState = ((regvalue & RCC_CR_PLLON) >> RCC_CR_PLLON_Pos) + 1U; + RCC_OscInitStruct->PLL.PLLSource = (regPLLCFGRvalue & RCC_PLLCFGR_PLLSRC); + RCC_OscInitStruct->PLL.PLLM = (regPLLCFGRvalue & RCC_PLLCFGR_PLLM); + RCC_OscInitStruct->PLL.PLLN = ((regPLLCFGRvalue & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos); + RCC_OscInitStruct->PLL.PLLP = (regPLLCFGRvalue & RCC_PLLCFGR_PLLP); + RCC_OscInitStruct->PLL.PLLQ = (regPLLCFGRvalue & RCC_PLLCFGR_PLLQ); + RCC_OscInitStruct->PLL.PLLR = (regPLLCFGRvalue & RCC_PLLCFGR_PLLR); + + /* Get Backup Domain register */ + regvalue = RCC->BDCR; + + /* Get the LSE configuration -----------------------------------------------*/ + RCC_OscInitStruct->LSEState = (regvalue & RCC_LSE_BYPASS); + + /* Get Control/Status register */ + regvalue = RCC->CSR; + + /* Get the LSI configuration -----------------------------------------------*/ + RCC_OscInitStruct->LSIState = ((regvalue & RCC_LSI_ON) > 0U) ? RCC_LSI_ON : 0U; + +#if defined(RCC_HSI48_SUPPORT) + /* Get Control/Status register */ + regvalue = RCC->CRRCR; + + /* Get the HSI48 configuration ---------------------------------------------*/ + RCC_OscInitStruct->HSI48State = (regvalue & RCC_CRRCR_HSI48ON); +#endif /* RCC_HSI48_SUPPORT */ + +} + +/** + * @brief Configure the RCC_ClkInitStruct according to the internal + * RCC configuration registers. + * @param RCC_ClkInitStruct Pointer to a @ref RCC_ClkInitTypeDef structure that + * will be configured. + * @param pFLatency Pointer on the Flash Latency. + * @retval None + */ +void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency) +{ + /* Check the parameters */ + assert_param(RCC_ClkInitStruct != (void *)NULL); + assert_param(pFLatency != (void *)NULL); + + /* Set all possible values for the Clock type parameter --------------------*/ + RCC_ClkInitStruct->ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | + RCC_CLOCKTYPE_PCLK2 | RCC_CLOCKTYPE_HCLK2 | RCC_CLOCKTYPE_HCLK4); + + /* Get the SYSCLK configuration --------------------------------------------*/ + RCC_ClkInitStruct->SYSCLKSource = LL_RCC_GetSysClkSource(); + + /* Get the HCLK configuration ----------------------------------------------*/ + RCC_ClkInitStruct->AHBCLKDivider = LL_RCC_GetAHBPrescaler(); + + /* Get the APB1 configuration ----------------------------------------------*/ + RCC_ClkInitStruct->APB1CLKDivider = LL_RCC_GetAPB1Prescaler(); + + /* Get the APB2 configuration ----------------------------------------------*/ + RCC_ClkInitStruct->APB2CLKDivider = LL_RCC_GetAPB2Prescaler(); + + /* Get the AHBCLK2Divider configuration ------------------------------------*/ + RCC_ClkInitStruct->AHBCLK2Divider = LL_C2_RCC_GetAHBPrescaler(); + + /* Get the AHBCLK4Divider configuration ------------------------------------*/ + RCC_ClkInitStruct->AHBCLK4Divider = LL_RCC_GetAHB4Prescaler(); + + /* Get the Flash Wait State (Latency) configuration ------------------------*/ + *pFLatency = __HAL_FLASH_GET_LATENCY(); +} + +/** + * @brief Enable the Clock Security System. + * @note If a failure is detected on the HSE oscillator clock, this oscillator + * is automatically disabled and an interrupt is generated to inform the + * software about the failure (Clock Security System Interrupt, CSSI), + * allowing the MCU to perform rescue operations. The CSSI is linked to + * CPU1 and CPU2 NMI (Non-Maskable Interrupt) exception vector. + * @note The Clock Security System can only be cleared by reset. + * @retval None + */ +void HAL_RCC_EnableCSS(void) +{ + LL_RCC_HSE_EnableCSS(); +} + +/** + * @brief Handle the RCC HSE Clock Security System interrupt request. + * @note This API should be called under the NMI_Handler(). + * @retval None + */ +void HAL_RCC_NMI_IRQHandler(void) +{ + /* Check RCC CSSF interrupt flag */ + if (__HAL_RCC_GET_IT(RCC_IT_HSECSS)) + { + /* RCC Clock Security System interrupt user callback */ + HAL_RCC_CSSCallback(); + + /* Clear RCC CSS pending bit */ + __HAL_RCC_CLEAR_IT(RCC_IT_HSECSS); + } +} + +/** + * @brief Handle the RCC HSE Clock Security System interrupt callback. + * @retval none + */ +__weak void HAL_RCC_CSSCallback(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the @ref HAL_RCC_CSSCallback should be implemented in the user file + */ +} + +/** + * @brief Get and clear reset flags + * @param None + * @note Once reset flags are retrieved, this API is clearing them in order + * to isolate next reset reason. + * @retval can be a combination of @ref RCC_Reset_Flag + */ +uint32_t HAL_RCC_GetResetSource(void) +{ + uint32_t reset; + + /* Get all reset flags */ + reset = RCC->CSR & RCC_RESET_FLAG_ALL; + + /* Clear Reset flags */ + RCC->CSR |= RCC_CSR_RMVF; + + return reset; +} + +/** + * @} + */ + +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/** @addtogroup RCC_Private_Functions + * @{ + */ + +/** + * @brief Update number of Flash wait states in line with MSI range and current + voltage range. + * @param MSI_Range MSI range value from @ref RCC_MSIRANGE_0 to @ref RCC_MSIRANGE_11 + * @retval HAL status + */ +static HAL_StatusTypeDef RCC_SetFlashLatencyFromMSIRange(uint32_t MSI_Range) +{ + uint32_t flash_clksrcfreq; + uint32_t msifreq; + + /* Check the parameters */ + assert_param(IS_RCC_MSI_CLOCK_RANGE(MSI_Range)); + + /* MSI frequency range in Hz */ + if (MSI_Range > RCC_MSIRANGE_11) + { + msifreq = __LL_RCC_CALC_MSI_FREQ(RCC_MSIRANGE_11); + } + else + { + msifreq = __LL_RCC_CALC_MSI_FREQ(MSI_Range); + } + + flash_clksrcfreq = __LL_RCC_CALC_HCLK4_FREQ(msifreq, LL_RCC_GetAHB4Prescaler()); + +#if defined(PWR_CR1_VOS) + return RCC_SetFlashLatency((flash_clksrcfreq / MEGA_HZ), HAL_PWREx_GetVoltageRange()); +#else + return RCC_SetFlashLatency((flash_clksrcfreq / MEGA_HZ), PWR_REGULATOR_VOLTAGE_SCALE1); +#endif /* PWR_CR1_VOS */ +} + + +/** + * @brief Update number of Flash wait states. + * @param Flash_ClkSrcFreq Flash Clock Source (in MHz) + * @param VCORE_Voltage Current Vcore voltage (PWR_REGULATOR_VOLTAGE_SCALE1 or PWR_REGULATOR_VOLTAGE_SCALE2) + * @retval HAL status + */ +static HAL_StatusTypeDef RCC_SetFlashLatency(uint32_t Flash_ClkSrcFreq, uint32_t VCORE_Voltage) +{ + /* Flash Clock source (HCLK4) range in MHz with a VCORE is range1 */ + const uint32_t FLASH_CLK_SRC_RANGE_VOS1[] = {18UL, 36UL, 54UL, 64UL}; +#if defined(PWR_CR1_VOS) + /* Flash Clock source (HCLK4) range in MHz with a VCORE is range2 */ + const uint32_t FLASH_CLK_SRC_RANGE_VOS2[] = {6UL, 12UL, 16UL}; +#endif /* PWR_CR1_VOS */ + /* Flash Latency range */ + const uint32_t FLASH_LATENCY_RANGE[] = {FLASH_LATENCY_0, FLASH_LATENCY_1, FLASH_LATENCY_2, FLASH_LATENCY_3}; + uint32_t latency = FLASH_LATENCY_0; /* default value 0WS */ + uint32_t tickstart; + +#if defined(PWR_CR1_VOS) + if (VCORE_Voltage == PWR_REGULATOR_VOLTAGE_SCALE1) + { + for (uint32_t index = 0; index < __COUNTOF(FLASH_CLK_SRC_RANGE_VOS1); index++) + { + if (Flash_ClkSrcFreq <= FLASH_CLK_SRC_RANGE_VOS1[index]) + { + latency = FLASH_LATENCY_RANGE[index]; + break; + } + } + } + else /* PWR_REGULATOR_VOLTAGE_SCALE2 */ + { + for (uint32_t index = 0; index < __COUNTOF(FLASH_CLK_SRC_RANGE_VOS2); index++) + { + if (Flash_ClkSrcFreq <= FLASH_CLK_SRC_RANGE_VOS2[index]) + { + latency = FLASH_LATENCY_RANGE[index]; + break; + } + } + } +#else + for (uint32_t index = 0; index < __COUNTOF(FLASH_CLK_SRC_RANGE_VOS1); index++) + { + if (Flash_ClkSrcFreq <= FLASH_CLK_SRC_RANGE_VOS1[index]) + { + latency = FLASH_LATENCY_RANGE[index]; + break; + } + } +#endif /* PWR_CR1_VOS */ + + __HAL_FLASH_SET_LATENCY(latency); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Check that the new number of wait states is taken into account to access the Flash + memory by reading the FLASH_ACR register */ + while (__HAL_FLASH_GET_LATENCY() != latency) + { + if ((HAL_GetTick() - tickstart) > LATENCY_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + return HAL_OK; +} + +/** + * @} + */ + +#endif /* HAL_RCC_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c new file mode 100644 index 0000000..8d4148e --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c @@ -0,0 +1,2328 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_rcc_ex.c + * @author MCD Application Team + * @brief Extended RCC HAL module driver. + * This file provides firmware functions to manage the following + * functionalities RCC extended peripheral: + * + Extended Peripheral Control functions + * + Extended Clock management functions + * + Extended Clock Recovery System Control functions + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup RCCEx RCCEx + * @brief RCC Extended HAL module driver + * @{ + */ + +#ifdef HAL_RCC_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +/** @defgroup RCCEx_Private_Constants RCCEx Private Constants + * @{ + */ +#if defined(SAI1) +#define PLLSAI1_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ +#endif /* SAI1 */ +#define PLL_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */ + +#define CLOCKSMPS_TIMEOUT_VALUE (5000U) /* 5 s */ + +#define __LSCO1_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() +#define LSCO1_GPIO_PORT GPIOA +#define LSCO1_PIN GPIO_PIN_2 + +#define __LSCO2_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE() +#define LSCO2_GPIO_PORT GPIOH +#define LSCO2_PIN GPIO_PIN_3 + +#if defined(RCC_LSCO3_SUPPORT) +#define __LSCO3_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE() +#define LSCO3_GPIO_PORT GPIOC +#define LSCO3_PIN GPIO_PIN_12 +#endif /* RCC_LSCO3_SUPPORT */ + +#define LSI2_TIMEOUT_VALUE (3U) /* to be adjusted with DS */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup RCCEx_Private_Functions RCCEx Private Functions + * @{ + */ +#if defined(SAI1) +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNP(RCC_PLLSAI1InitTypeDef *PLLSAI1); +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNQ(RCC_PLLSAI1InitTypeDef *PLLSAI1); +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNR(RCC_PLLSAI1InitTypeDef *PLLSAI1); +#endif /* SAI1 */ + +static uint32_t RCC_PLL_GetFreqDomain_P(void); +static uint32_t RCC_PLL_GetFreqDomain_Q(void); + +#if defined(SAI1) +static uint32_t RCC_PLLSAI1_GetFreqDomain_R(void); +static uint32_t RCC_PLLSAI1_GetFreqDomain_P(void); +static uint32_t RCC_PLLSAI1_GetFreqDomain_Q(void); +#endif /* SAI1 */ + +/** + * @} + */ + +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup RCCEx_Exported_Functions RCCEx Exported Functions + * @{ + */ + +/** @defgroup RCCEx_Exported_Functions_Group1 Extended Peripheral Control functions + * @brief Extended Peripheral Control functions + * +@verbatim + =============================================================================== + ##### Extended Peripheral Control functions ##### + =============================================================================== + [..] + This subsection provides a set of functions allowing to control the RCC Clocks + frequencies. + [..] + (@) Important note: Care must be taken when HAL_RCCEx_PeriphCLKConfig() is used to + select the RTC clock source; in this case the Backup domain will be reset in + order to modify the RTC Clock source, as consequence RTC registers (including + the backup registers) and RCC_BDCR register are set to their reset values. + +@endverbatim + * @{ + */ + +/** + * @brief Initialize the RCC extended peripherals clocks according to the specified + * parameters in the @ref RCC_PeriphCLKInitTypeDef. + * @param PeriphClkInit pointer to a @ref RCC_PeriphCLKInitTypeDef structure that + * contains a field PeriphClockSelection which can be a combination of the following values: + * + * @arg @ref RCC_PERIPHCLK_USART1 USART1 peripheral clock + * @arg @ref RCC_PERIPHCLK_LPUART1 LPUART1 peripheral clock + * @arg @ref RCC_PERIPHCLK_I2C1 I2C1 peripheral clock + * @arg @ref RCC_PERIPHCLK_I2C3 I2C3 peripheral clock + * @arg @ref RCC_PERIPHCLK_LPTIM1 LPTIM1 peripheral clock + * @arg @ref RCC_PERIPHCLK_LPTIM2 LPTIM2 peripheral clock + * @arg @ref RCC_PERIPHCLK_SAI1 SAI1 peripheral clock + * @arg @ref RCC_PERIPHCLK_USB USB peripheral clock + * @arg @ref RCC_PERIPHCLK_RNG RNG peripheral clock + * @arg @ref RCC_PERIPHCLK_ADC ADC peripheral clock + * @arg @ref RCC_PERIPHCLK_RTC RTC peripheral clock + * @arg @ref RCC_PERIPHCLK_RFWAKEUP RFWKP peripheral clock + * @arg @ref RCC_PERIPHCLK_SMPS SMPS peripheral clock + * + * + * @note Care must be taken when @ref HAL_RCCEx_PeriphCLKConfig() is used to select + * the RTC clock source: in this case the access to Backup domain is enabled. + * + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) +{ + uint32_t tickstart; + HAL_StatusTypeDef ret = HAL_OK; /* Intermediate status */ + HAL_StatusTypeDef status = HAL_OK; /* Final status */ + + /* Check the parameters */ + assert_param(IS_RCC_PERIPHCLOCK(PeriphClkInit->PeriphClockSelection)); + +#if defined(SAI1) + /*-------------------------- SAI1 clock source configuration ---------------------*/ + if ((((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1)) + { + /* Check the parameters */ + assert_param(IS_RCC_SAI1CLK(PeriphClkInit->Sai1ClockSelection)); + + switch (PeriphClkInit->Sai1ClockSelection) + { + case RCC_SAI1CLKSOURCE_PLL: /* PLL is used as clock source for SAI1 */ + /* Enable SAI1 Clock output generated form System PLL . */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_SAI1CLK); + + /* SAI1 clock source config set later after clock selection check */ + break; + + case RCC_SAI1CLKSOURCE_PLLSAI1: /* PLLSAI1 is used as clock source for SAI1 */ + /* PLLSAI1 parameters N & P configuration and clock output (PLLSAI1ClockOut) */ + ret = RCCEx_PLLSAI1_ConfigNP(&(PeriphClkInit->PLLSAI1)); + /* SAI1 clock source config set later after clock selection check */ + break; + + case RCC_SAI1CLKSOURCE_PIN: /* External clock is used as source of SAI1 clock*/ + /* SAI1 clock source config set later after clock selection check */ + break; + + case RCC_SAI1CLKSOURCE_HSI: + + break; + + default: + ret = HAL_ERROR; + break; + } + + if (ret == HAL_OK) + { + /* Set the source of SAI1 clock*/ + __HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection); + } + else + { + /* set overall return value */ + status = ret; + } + } +#endif /* SAI1 */ + + /*-------------------------- RTC clock source configuration ----------------------*/ + if ((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC) + { + uint32_t rtcclocksource = LL_RCC_GetRTCClockSource(); + + /* Check for RTC Parameters used to output RTCCLK */ + assert_param(IS_RCC_RTCCLKSOURCE(PeriphClkInit->RTCClockSelection)); + + /* Configure the clock source only if a different source is expected */ + if (rtcclocksource != PeriphClkInit->RTCClockSelection) + { + /* Enable write access to Backup domain */ + HAL_PWR_EnableBkUpAccess(); + + /* If a clock source is not yet selected */ + if (rtcclocksource == RCC_RTCCLKSOURCE_NONE) + { + /* Directly set the configuration of the clock source selection */ + LL_RCC_SetRTCClockSource(PeriphClkInit->RTCClockSelection); + } + else /* A clock source is already selected */ + { + /* Store the content of BDCR register before the reset of Backup Domain */ + uint32_t bdcr = LL_RCC_ReadReg(BDCR); + + /* RTC Clock selection can be changed only if the Backup Domain is reset */ + LL_RCC_ForceBackupDomainReset(); + LL_RCC_ReleaseBackupDomainReset(); + + /* Set the value of the clock source selection */ + MODIFY_REG(bdcr, RCC_BDCR_RTCSEL, PeriphClkInit->RTCClockSelection); + + /* Restore the content of BDCR register */ + LL_RCC_WriteReg(BDCR, bdcr); + + /* Wait for LSE reactivation if LSE was enable prior to Backup Domain reset */ + if (LL_RCC_LSE_IsEnabled() == 1U) + { + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till LSE is ready */ + while (LL_RCC_LSE_IsReady() != 1U) + { + if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) + { + ret = HAL_TIMEOUT; + break; + } + } + } + } + + /* set overall return value */ + status = ret; + } + else + { + /* set overall return value */ + status = ret; + } + + } + + /*-------------------------- USART1 clock source configuration -------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART1) == RCC_PERIPHCLK_USART1) + { + /* Check the parameters */ + assert_param(IS_RCC_USART1CLKSOURCE(PeriphClkInit->Usart1ClockSelection)); + + /* Configure the USART1 clock source */ + __HAL_RCC_USART1_CONFIG(PeriphClkInit->Usart1ClockSelection); + } + +#if defined(LPUART1) + /*-------------------------- LPUART1 clock source configuration ------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPUART1) == RCC_PERIPHCLK_LPUART1) + { + /* Check the parameters */ + assert_param(IS_RCC_LPUART1CLKSOURCE(PeriphClkInit->Lpuart1ClockSelection)); + + /* Configure the LPUAR1 clock source */ + __HAL_RCC_LPUART1_CONFIG(PeriphClkInit->Lpuart1ClockSelection); + } +#endif /* LPUART1 */ + + /*-------------------------- LPTIM1 clock source configuration -------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == (RCC_PERIPHCLK_LPTIM1)) + { + assert_param(IS_RCC_LPTIM1CLK(PeriphClkInit->Lptim1ClockSelection)); + __HAL_RCC_LPTIM1_CONFIG(PeriphClkInit->Lptim1ClockSelection); + } + + /*-------------------------- LPTIM2 clock source configuration -------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM2) == (RCC_PERIPHCLK_LPTIM2)) + { + assert_param(IS_RCC_LPTIM2CLK(PeriphClkInit->Lptim2ClockSelection)); + __HAL_RCC_LPTIM2_CONFIG(PeriphClkInit->Lptim2ClockSelection); + } + + /*-------------------------- I2C1 clock source configuration ---------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C1) == RCC_PERIPHCLK_I2C1) + { + /* Check the parameters */ + assert_param(IS_RCC_I2C1CLKSOURCE(PeriphClkInit->I2c1ClockSelection)); + + /* Configure the I2C1 clock source */ + __HAL_RCC_I2C1_CONFIG(PeriphClkInit->I2c1ClockSelection); + } + +#if defined(I2C3) + /*-------------------------- I2C3 clock source configuration ---------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C3) == RCC_PERIPHCLK_I2C3) + { + /* Check the parameters */ + assert_param(IS_RCC_I2C3CLKSOURCE(PeriphClkInit->I2c3ClockSelection)); + + /* Configure the I2C3 clock source */ + __HAL_RCC_I2C3_CONFIG(PeriphClkInit->I2c3ClockSelection); + } +#endif /* I2C3 */ + +#if defined(USB) + /*-------------------------- USB clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == (RCC_PERIPHCLK_USB)) + { + assert_param(IS_RCC_USBCLKSOURCE(PeriphClkInit->UsbClockSelection)); + __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection); + + if (PeriphClkInit->UsbClockSelection == RCC_USBCLKSOURCE_PLL) + { + /* Enable PLLQ output */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_USBCLK); + } +#if defined(SAI1) + if (PeriphClkInit->UsbClockSelection == RCC_USBCLKSOURCE_PLLSAI1) + { + /* PLLSAI1 parameters N & Q configuration and clock output (PLLSAI1ClockOut) */ + ret = RCCEx_PLLSAI1_ConfigNQ(&(PeriphClkInit->PLLSAI1)); + + if (ret != HAL_OK) + { + /* set overall return value */ + status = ret; + } + } +#endif /* SAI1 */ + } +#endif /* USB */ + + /*-------------------------- RNG clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RNG) == (RCC_PERIPHCLK_RNG)) + { + /* Check the parameters */ + assert_param(IS_RCC_RNGCLKSOURCE(PeriphClkInit->RngClockSelection)); + + /* Configure the RNG clock source */ + __HAL_RCC_RNG_CONFIG(PeriphClkInit->RngClockSelection); + + if (PeriphClkInit->RngClockSelection == RCC_RNGCLKSOURCE_PLL) + { + /* Enable PLLQ output */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_RNGCLK); + } + } + + /*-------------------------- ADC clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC) + { + /* Check the parameters */ + assert_param(IS_RCC_ADCCLKSOURCE(PeriphClkInit->AdcClockSelection)); + + /* Configure the ADC interface clock source */ + __HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection); + + if (PeriphClkInit->AdcClockSelection == RCC_ADCCLKSOURCE_PLL) + { + /* Enable RCC_PLL_RNGCLK output */ + __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL_ADCCLK); + } + +#if defined(SAI1) + if (PeriphClkInit->AdcClockSelection == RCC_ADCCLKSOURCE_PLLSAI1) + { + /* PLLSAI1 parameters N & R configuration and clock output (PLLSAI1ClockOut) */ + ret = RCCEx_PLLSAI1_ConfigNR(&(PeriphClkInit->PLLSAI1)); + + if (ret != HAL_OK) + { + /* set overall return value */ + status = ret; + } + } +#endif /* SAI1 */ + } + + /*-------------------------- RFWKP clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RFWAKEUP) == RCC_PERIPHCLK_RFWAKEUP) + { + /* Check the parameters */ + assert_param(IS_RCC_RFWKPCLKSOURCE(PeriphClkInit->RFWakeUpClockSelection)); + + /* Configure the RFWKP interface clock source */ + __HAL_RCC_RFWAKEUP_CONFIG(PeriphClkInit->RFWakeUpClockSelection); + + } + +#if defined(RCC_SMPS_SUPPORT) + /*-------------------------- SMPS clock source configuration ----------------------*/ + if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SMPS) == RCC_PERIPHCLK_SMPS) + { + /* Check the parameters */ + assert_param(IS_RCC_SMPSCLKDIV(PeriphClkInit->SmpsDivSelection)); + assert_param(IS_RCC_SMPSCLKSOURCE(PeriphClkInit->SmpsClockSelection)); + + /* Configure the SMPS interface clock division factor */ + __HAL_RCC_SMPS_DIV_CONFIG(PeriphClkInit->SmpsDivSelection); + + /* Configure the SMPS interface clock source */ + __HAL_RCC_SMPS_CONFIG(PeriphClkInit->SmpsClockSelection); + } +#endif /* RCC_SMPS_SUPPORT */ + + return status; +} + + +/** + * @brief Get the RCC_ClkInitStruct according to the internal RCC configuration registers. + * @param PeriphClkInit pointer to an RCC_PeriphCLKInitTypeDef structure that + * returns the configuration information for the Extended Peripherals + * clocks(SAI1, LPTIM1, LPTIM2, I2C1, I2C3, LPUART1, + * USART1, RTC, ADCx, USB, RNG, RFWKP, SMPS). + * @retval None + */ +void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) +{ + /* Set all possible values for the extended clock type parameter------------*/ + + PeriphClkInit->PeriphClockSelection = RCC_PERIPHCLK_USART1 | RCC_PERIPHCLK_I2C1 | \ + RCC_PERIPHCLK_LPTIM1 | RCC_PERIPHCLK_LPTIM2 | \ + RCC_PERIPHCLK_RNG | RCC_PERIPHCLK_ADC | \ + RCC_PERIPHCLK_RTC | RCC_PERIPHCLK_RFWAKEUP; +#if defined(LPUART1) + PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_LPUART1; +#endif /* LPUART1 */ + +#if defined(I2C3) + PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_I2C3; +#endif /* I2C3 */ + +#if defined(SAI1) + PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_SAI1; +#endif /* SAI1 */ + +#if defined(USB) + PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_USB; +#endif /* USB */ + +#if defined(RCC_SMPS_SUPPORT) + PeriphClkInit->PeriphClockSelection |= RCC_PERIPHCLK_SMPS; +#endif /* RCC_SMPS_SUPPORT */ + + +#if defined(SAI1) + /* Get the PLLSAI1 Clock configuration -----------------------------------------------*/ + PeriphClkInit->PLLSAI1.PLLN = LL_RCC_PLLSAI1_GetN(); + PeriphClkInit->PLLSAI1.PLLP = LL_RCC_PLLSAI1_GetP(); + PeriphClkInit->PLLSAI1.PLLR = LL_RCC_PLLSAI1_GetR(); + PeriphClkInit->PLLSAI1.PLLQ = LL_RCC_PLLSAI1_GetQ(); +#endif /* SAI1 */ + + /* Get the USART1 clock source ---------------------------------------------*/ + PeriphClkInit->Usart1ClockSelection = __HAL_RCC_GET_USART1_SOURCE(); + +#if defined(LPUART1) + /* Get the LPUART1 clock source --------------------------------------------*/ + PeriphClkInit->Lpuart1ClockSelection = __HAL_RCC_GET_LPUART1_SOURCE(); +#endif /* LPUART1 */ + + /* Get the I2C1 clock source -----------------------------------------------*/ + PeriphClkInit->I2c1ClockSelection = __HAL_RCC_GET_I2C1_SOURCE(); + +#if defined(I2C3) + /* Get the I2C3 clock source -----------------------------------------------*/ + PeriphClkInit->I2c3ClockSelection = __HAL_RCC_GET_I2C3_SOURCE(); +#endif /* I2C3 */ + + /* Get the LPTIM1 clock source ---------------------------------------------*/ + PeriphClkInit->Lptim1ClockSelection = __HAL_RCC_GET_LPTIM1_SOURCE(); + + /* Get the LPTIM2 clock source ---------------------------------------------*/ + PeriphClkInit->Lptim2ClockSelection = __HAL_RCC_GET_LPTIM2_SOURCE(); + +#if defined(SAI1) + /* Get the SAI1 clock source -----------------------------------------------*/ + PeriphClkInit->Sai1ClockSelection = __HAL_RCC_GET_SAI1_SOURCE(); +#endif /* SAI1 */ + + /* Get the RTC clock source ------------------------------------------------*/ + PeriphClkInit->RTCClockSelection = __HAL_RCC_GET_RTC_SOURCE(); + +#if defined(USB) + /* Get the USB clock source ------------------------------------------------*/ + PeriphClkInit->UsbClockSelection = __HAL_RCC_GET_USB_SOURCE(); +#endif /* USB */ + + /* Get the RNG clock source ------------------------------------------------*/ + PeriphClkInit->RngClockSelection = HAL_RCCEx_GetRngCLKSource(); + + /* Get the ADC clock source ------------------------------------------------*/ + PeriphClkInit->AdcClockSelection = __HAL_RCC_GET_ADC_SOURCE(); + + /* Get the RFWKP clock source ----------------------------------------------*/ + PeriphClkInit->RFWakeUpClockSelection = __HAL_RCC_GET_RFWAKEUP_SOURCE(); + +#if defined(RCC_SMPS_SUPPORT) + /* Get the SMPS clock division factor --------------------------------------*/ + PeriphClkInit->SmpsDivSelection = __HAL_RCC_GET_SMPS_DIV(); + + /* Get the SMPS clock source -----------------------------------------------*/ + PeriphClkInit->SmpsClockSelection = __HAL_RCC_GET_SMPS_SOURCE(); +#endif /* RCC_SMPS_SUPPORT */ + +} + +/** + * @brief Return the peripheral clock frequency for peripherals with clock source + * @note Return 0 if peripheral clock identifier not managed by this API + * @param PeriphClk Peripheral clock identifier + * This parameter can be one of the following values: + * @arg @ref RCC_PERIPHCLK_RTC RTC peripheral clock + * @arg @ref RCC_PERIPHCLK_ADC ADC peripheral clock + * @arg @ref RCC_PERIPHCLK_I2C1 I2C1 peripheral clock + * @arg @ref RCC_PERIPHCLK_I2C3 I2C3 peripheral clock + * @arg @ref RCC_PERIPHCLK_LPTIM1 LPTIM1 peripheral clock + * @arg @ref RCC_PERIPHCLK_LPTIM2 LPTIM2 peripheral clock + * @arg @ref RCC_PERIPHCLK_LPUART1 LPUART1 peripheral clock + * @arg @ref RCC_PERIPHCLK_RNG RNG peripheral clock + * @arg @ref RCC_PERIPHCLK_SAI1 SAI1 peripheral clock + * @arg @ref RCC_PERIPHCLK_USART1 USART1 peripheral clock + * @arg @ref RCC_PERIPHCLK_USB USB peripheral clock + * @arg @ref RCC_PERIPHCLK_RFWAKEUP RFWKP peripheral clock + * @arg @ref RCC_PERIPHCLK_SMPS SMPS peripheral clock + * @retval Frequency in Hz + */ +uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk) +{ + uint32_t frequency = 0U; + +#if defined(RCC_SMPS_SUPPORT) + uint32_t smps_prescaler_index = ((LL_RCC_GetSMPSPrescaler()) >> RCC_SMPSCR_SMPSDIV_Pos); +#endif /* RCC_SMPS_SUPPORT */ + + /* Check the parameters */ + assert_param(IS_RCC_PERIPHCLOCK(PeriphClk)); + + if (PeriphClk == RCC_PERIPHCLK_RTC) + { + uint32_t rtcClockSource = LL_RCC_GetRTCClockSource(); + + if (rtcClockSource == LL_RCC_RTC_CLKSOURCE_LSE) /* LSE clock used as RTC clock source */ + { + if (LL_RCC_LSE_IsReady() == 1U) + { + frequency = LSE_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (rtcClockSource == LL_RCC_RTC_CLKSOURCE_LSI) /* LSI clock used as RTC clock source */ + { + const uint32_t temp_lsi1ready = LL_RCC_LSI1_IsReady(); + const uint32_t temp_lsi2ready = LL_RCC_LSI2_IsReady(); + if ((temp_lsi1ready == 1U) || (temp_lsi2ready == 1U)) + { + frequency = LSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (rtcClockSource == LL_RCC_RTC_CLKSOURCE_HSE_DIV32) /* HSE clock used as RTC clock source */ + { + frequency = HSE_VALUE / 32U; + } + else /* No clock used as RTC clock source */ + { + /* Nothing to do as frequency already initialized to 0U */ + } + } +#if defined(SAI1) + else if (PeriphClk == RCC_PERIPHCLK_SAI1) + { + switch (LL_RCC_GetSAIClockSource(LL_RCC_SAI1_CLKSOURCE)) + { + case LL_RCC_SAI1_CLKSOURCE_HSI: /* HSI clock used as SAI1 clock source */ + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + case LL_RCC_SAI1_CLKSOURCE_PLLSAI1: /* PLLSAI1 clock used as SAI1 clock source */ + if (LL_RCC_PLLSAI1_IsReady() == 1U) + { + frequency = RCC_PLLSAI1_GetFreqDomain_P(); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + case LL_RCC_SAI1_CLKSOURCE_PLL: /* PLL clock used as SAI1 clock source */ + if (LL_RCC_PLL_IsReady() == 1U) + { + frequency = RCC_PLL_GetFreqDomain_P(); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + default: /* External input clock used as SAI1 clock source */ + frequency = EXTERNAL_SAI1_CLOCK_VALUE; + break; + } + } +#endif /* SAI1 */ + else if (PeriphClk == RCC_PERIPHCLK_RNG) + { + uint32_t rngClockSource = HAL_RCCEx_GetRngCLKSource(); + + if (rngClockSource == RCC_RNGCLKSOURCE_LSI) /* LSI clock used as RNG clock source */ + { + const uint32_t temp_lsi1ready = LL_RCC_LSI1_IsReady(); + const uint32_t temp_lsi2ready = LL_RCC_LSI2_IsReady(); + if ((temp_lsi1ready == 1U) || (temp_lsi2ready == 1U)) + { + frequency = LSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (rngClockSource == RCC_RNGCLKSOURCE_LSE) /* LSE clock used as RNG clock source */ + { + if (LL_RCC_LSE_IsReady() == 1U) + { + frequency = LSE_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (rngClockSource == RCC_RNGCLKSOURCE_PLL) /* PLL clock divided by 3 used as RNG clock source */ + { + if (LL_RCC_PLL_IsReady() == 1U) + { + frequency = (RCC_PLL_GetFreqDomain_Q() / 3U); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (rngClockSource == RCC_RNGCLKSOURCE_MSI) /* MSI clock divided by 3 used as RNG clock source */ + { + if (LL_RCC_MSI_IsReady() == 1U) + { + frequency = (__LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()) / 3U); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } +#if defined(SAI1) + else if (rngClockSource == RCC_RNGCLKSOURCE_PLLSAI1) /* PLLSAI1 clock used as SAI1 clock source */ + { + if (LL_RCC_PLLSAI1_IsReady() == 1U) + { + frequency = RCC_PLLSAI1_GetFreqDomain_Q(); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } +#endif /* SAI1 */ + else /* HSI48 clock divided by 3 used as RNG clock source */ + { +#if defined(RCC_HSI48_SUPPORT) + if (LL_RCC_HSI48_IsReady() == 1U) + { + frequency = HSI48_VALUE / 3U; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } +#else + /* Nothing to do as frequency already initialized to 0U */ +#endif /* RCC_HSI48_SUPPORT */ + } + } +#if defined(USB) + else if (PeriphClk == RCC_PERIPHCLK_USB) + { + switch (LL_RCC_GetUSBClockSource(LL_RCC_USB_CLKSOURCE)) + { +#if defined(SAI1) + case LL_RCC_USB_CLKSOURCE_PLLSAI1: /* PLLSAI1 clock used as USB clock source */ + if (LL_RCC_PLLSAI1_IsReady() == 1U) + { + frequency = RCC_PLLSAI1_GetFreqDomain_Q(); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; +#endif /* SAI1 */ + + case LL_RCC_USB_CLKSOURCE_PLL: /* PLL clock used as USB clock source */ + if (LL_RCC_PLL_IsReady() == 1U) + { + frequency = RCC_PLL_GetFreqDomain_Q(); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + case LL_RCC_USB_CLKSOURCE_MSI: /* MSI clock used as USB clock source */ + if (LL_RCC_MSI_IsReady() == 1U) + { + frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + default: /* HSI48 clock used as USB clock source */ + if (LL_RCC_HSI48_IsReady() == 1U) + { + frequency = HSI48_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + } + } +#endif /* USB */ + else if (PeriphClk == RCC_PERIPHCLK_USART1) + { + switch (LL_RCC_GetUSARTClockSource(LL_RCC_USART1_CLKSOURCE)) + { + case LL_RCC_USART1_CLKSOURCE_SYSCLK: /* USART1 Clock is System Clock */ + frequency = HAL_RCC_GetSysClockFreq(); + break; + + case LL_RCC_USART1_CLKSOURCE_HSI: /* USART1 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + case LL_RCC_USART1_CLKSOURCE_LSE: /* USART1 Clock is LSE Osc. */ + if (LL_RCC_LSE_IsReady() == 1U) + { + frequency = LSE_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + default: /* USART1 Clock is PCLK2 */ + frequency = __LL_RCC_CALC_PCLK2_FREQ(__LL_RCC_CALC_HCLK1_FREQ(HAL_RCC_GetSysClockFreq(), + LL_RCC_GetAHBPrescaler()), + LL_RCC_GetAPB2Prescaler()); + break; + } + } +#if defined(LPUART1) + else if (PeriphClk == RCC_PERIPHCLK_LPUART1) + { + switch (LL_RCC_GetLPUARTClockSource(LL_RCC_LPUART1_CLKSOURCE)) + { + case LL_RCC_LPUART1_CLKSOURCE_SYSCLK: /* LPUART1 Clock is System Clock */ + frequency = HAL_RCC_GetSysClockFreq(); + break; + + case LL_RCC_LPUART1_CLKSOURCE_HSI: /* LPUART1 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + case LL_RCC_LPUART1_CLKSOURCE_LSE: /* LPUART1 Clock is LSE Osc. */ + if (LL_RCC_LSE_IsReady() == 1U) + { + frequency = LSE_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + default: /* LPUART1 Clock is PCLK1 */ + frequency = __LL_RCC_CALC_PCLK1_FREQ(__LL_RCC_CALC_HCLK1_FREQ(HAL_RCC_GetSysClockFreq(), + LL_RCC_GetAHBPrescaler()), + LL_RCC_GetAPB1Prescaler()); + break; + } + } +#endif /* LPUART1 */ + else if (PeriphClk == RCC_PERIPHCLK_ADC) + { + switch (LL_RCC_GetADCClockSource(LL_RCC_ADC_CLKSOURCE)) + { +#if defined(STM32WB55xx) || defined (STM32WB5Mxx) || defined(STM32WB35xx) + case LL_RCC_ADC_CLKSOURCE_PLLSAI1: /* PLLSAI1 clock used as ADC clock source */ + if (LL_RCC_PLLSAI1_IsReady() == 1U) + { + frequency = RCC_PLLSAI1_GetFreqDomain_R(); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; +#elif defined(STM32WB15xx) || defined(STM32WB1Mxx) + case LL_RCC_ADC_CLKSOURCE_HSI: /* HSI clock used as ADC clock source */ + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; +#endif /* STM32WB55xx || STM32WB5Mxx || STM32WB35xx */ + case LL_RCC_ADC_CLKSOURCE_SYSCLK: /* SYSCLK clock used as ADC clock source */ + frequency = HAL_RCC_GetSysClockFreq(); + break; + case LL_RCC_ADC_CLKSOURCE_PLL: /* PLL clock used as ADC clock source */ + if (LL_RCC_PLL_IsReady() == 1U) + { + frequency = RCC_PLL_GetFreqDomain_P(); + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + default: /* No clock used as ADC clock source */ + break; + } + } + else if (PeriphClk == RCC_PERIPHCLK_I2C1) + { + switch (LL_RCC_GetI2CClockSource(LL_RCC_I2C1_CLKSOURCE)) + { + case LL_RCC_I2C1_CLKSOURCE_SYSCLK: /* I2C1 Clock is System Clock */ + frequency = HAL_RCC_GetSysClockFreq(); + break; + + case LL_RCC_I2C1_CLKSOURCE_HSI: /* I2C1 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + default: /* I2C1 Clock is PCLK1 */ + frequency = __LL_RCC_CALC_PCLK1_FREQ(__LL_RCC_CALC_HCLK1_FREQ(HAL_RCC_GetSysClockFreq(), + LL_RCC_GetAHBPrescaler()), + LL_RCC_GetAPB1Prescaler()); + break; + } + } +#if defined(I2C3) + else if (PeriphClk == RCC_PERIPHCLK_I2C3) + { + switch (LL_RCC_GetI2CClockSource(LL_RCC_I2C3_CLKSOURCE)) + { + case LL_RCC_I2C3_CLKSOURCE_SYSCLK: /* I2C3 Clock is System Clock */ + frequency = HAL_RCC_GetSysClockFreq(); + break; + + case LL_RCC_I2C3_CLKSOURCE_HSI: /* I2C3 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + break; + + default: /* I2C3 Clock is PCLK1 */ + frequency = __LL_RCC_CALC_PCLK1_FREQ(__LL_RCC_CALC_HCLK1_FREQ(HAL_RCC_GetSysClockFreq(), + LL_RCC_GetAHBPrescaler()), + LL_RCC_GetAPB1Prescaler()); + break; + } + } +#endif /* I2C3 */ + else if (PeriphClk == RCC_PERIPHCLK_LPTIM1) + { + uint32_t lptimClockSource = LL_RCC_GetLPTIMClockSource(LL_RCC_LPTIM1_CLKSOURCE); + + if (lptimClockSource == LL_RCC_LPTIM1_CLKSOURCE_LSI) /* LPTIM1 Clock is LSI Osc. */ + { + const uint32_t temp_lsi1ready = LL_RCC_LSI1_IsReady(); + const uint32_t temp_lsi2ready = LL_RCC_LSI2_IsReady(); + if ((temp_lsi1ready == 1U) || (temp_lsi2ready == 1U)) + { + frequency = LSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (lptimClockSource == LL_RCC_LPTIM1_CLKSOURCE_HSI) /* LPTIM1 Clock is HSI Osc. */ + { + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (lptimClockSource == LL_RCC_LPTIM1_CLKSOURCE_LSE) /* LPTIM1 Clock is LSE Osc. */ + { + if (LL_RCC_LSE_IsReady() == 1U) + { + frequency = LSE_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else /* LPTIM1 Clock is PCLK1 */ + { + frequency = __LL_RCC_CALC_PCLK1_FREQ(__LL_RCC_CALC_HCLK1_FREQ(HAL_RCC_GetSysClockFreq(), + LL_RCC_GetAHBPrescaler()), + LL_RCC_GetAPB1Prescaler()); + } + } + else if (PeriphClk == RCC_PERIPHCLK_LPTIM2) + { + uint32_t lptimClockSource = LL_RCC_GetLPTIMClockSource(LL_RCC_LPTIM2_CLKSOURCE); + + if (lptimClockSource == LL_RCC_LPTIM2_CLKSOURCE_LSI) /* LPTIM2 Clock is LSI Osc. */ + { + const uint32_t temp_lsi1ready = LL_RCC_LSI1_IsReady(); + const uint32_t temp_lsi2ready = LL_RCC_LSI2_IsReady(); + if ((temp_lsi1ready == 1U) || (temp_lsi2ready == 1U)) + { + frequency = LSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (lptimClockSource == LL_RCC_LPTIM2_CLKSOURCE_HSI) /* LPTIM2 Clock is HSI Osc. */ + { + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (lptimClockSource == LL_RCC_LPTIM2_CLKSOURCE_LSE) /* LPTIM2 Clock is LSE Osc. */ + { + if (LL_RCC_LSE_IsReady() == 1U) + { + frequency = LSE_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else /* LPTIM2 Clock is PCLK1 */ + { + frequency = __LL_RCC_CALC_PCLK1_FREQ(__LL_RCC_CALC_HCLK1_FREQ(HAL_RCC_GetSysClockFreq(), + LL_RCC_GetAHBPrescaler()), + LL_RCC_GetAPB1Prescaler()); + } + } + else if (PeriphClk == RCC_PERIPHCLK_RFWAKEUP) + { + uint32_t rfwkpClockSource = LL_RCC_GetRFWKPClockSource(); + + if (rfwkpClockSource == LL_RCC_RFWKP_CLKSOURCE_LSE) /* LSE clock used as RF Wakeup clock source */ + { + if (LL_RCC_LSE_IsReady() == 1U) + { + frequency = LSE_VALUE; + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (rfwkpClockSource == LL_RCC_RFWKP_CLKSOURCE_HSE_DIV1024) /* HSE clock used as RF Wakeup clock source */ + { + frequency = HSE_VALUE / 1024U; + } + else /* No clock used as RF Wakeup clock source */ + { + /* Nothing to do as frequency already initialized to 0U */ + } + } +#if defined(RCC_SMPS_SUPPORT) + else if (PeriphClk == RCC_PERIPHCLK_SMPS) + { + uint32_t smpsClockSource = LL_RCC_GetSMPSClockSource(); + + if (smpsClockSource == LL_RCC_SMPS_CLKSOURCE_STATUS_HSI) /* SMPS Clock source is HSI Osc. */ + { + if (LL_RCC_HSI_IsReady() == 1U) + { + frequency = HSI_VALUE / SmpsPrescalerTable[smps_prescaler_index][0]; + frequency = frequency >> 1U; /* Systematic Div by 2 */ + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (smpsClockSource == LL_RCC_SMPS_CLKSOURCE_STATUS_HSE) /* SMPS Clock source is HSE Osc. */ + { + if (LL_RCC_HSE_IsReady() == 1U) + { + frequency = HSE_VALUE / SmpsPrescalerTable[smps_prescaler_index][5]; + frequency = frequency >> 1U; /* Systematic Div by 2 */ + } + else + { + /* Nothing to do as frequency already initialized to 0U */ + } + } + else if (smpsClockSource == LL_RCC_SMPS_CLKSOURCE_STATUS_MSI) /* SMPS Clock source is MSI Osc. */ + { + switch (LL_RCC_MSI_GetRange()) + { + case LL_RCC_MSIRANGE_8: + frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSIRANGE_8) / SmpsPrescalerTable[smps_prescaler_index][4]; + break; + case LL_RCC_MSIRANGE_9: + frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSIRANGE_9) / SmpsPrescalerTable[smps_prescaler_index][3]; + break; + case LL_RCC_MSIRANGE_10: + frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSIRANGE_10) / SmpsPrescalerTable[smps_prescaler_index][2]; + break; + case LL_RCC_MSIRANGE_11: + frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSIRANGE_11) / SmpsPrescalerTable[smps_prescaler_index][1]; + break; + default: + break; + } + frequency = frequency >> 1U; /* Systematic Div by 2 */ + } + else /* SMPS has no Clock */ + { + /* Nothing to do as frequency already initialized to 0U */ + } + } +#endif /* RCC_SMPS_SUPPORT */ + + return (frequency); +} + +/** + * @brief Return the RNG clock source + * @retval The RNG clock source can be one of the following values: + * @arg @ref RCC_RNGCLKSOURCE_HSI48 HSI48 clock divided by 3 selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_PLL PLL "Q" clock divided by 3 selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_MSI MSI clock divided by 3 selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_PLLSAI1 PLLSAI1 "Q" clock selected as RNG clock (*) + * @arg @ref RCC_RNGCLKSOURCE_LSI LSI clock selected as RNG clock + * @arg @ref RCC_RNGCLKSOURCE_LSE LSE clock selected as RNG clock + * + * (*) Value not defined in all devices. + * + */ +uint32_t HAL_RCCEx_GetRngCLKSource(void) +{ + uint32_t rng_clock_source = LL_RCC_GetRNGClockSource(LL_RCC_RNG_CLKSOURCE); + uint32_t clk48_clock_source; + + /* RNG clock source originates from 48 MHz RC oscillator */ + if (rng_clock_source == RCC_RNGCLKSOURCE_CLK48) + { + clk48_clock_source = LL_RCC_GetCLK48ClockSource(LL_RCC_CLK48_CLKSOURCE); + rng_clock_source = (CLK48_MASK | clk48_clock_source); + } + + return rng_clock_source; +} + +/** + * @} + */ + +/** @defgroup RCCEx_Exported_Functions_Group2 Extended Clock management functions + * @brief Extended Clock management functions + * +@verbatim + =============================================================================== + ##### Extended clock management functions ##### + =============================================================================== + [..] + This subsection provides a set of functions allowing to control the + activation or deactivation of MSI PLL-mode, PLLSAI1, PLLSAI12, LSE CSS, + Low speed clock output and clock after wake-up from STOP mode. +@endverbatim + * @{ + */ + +#if defined(SAI1) +/** + * @brief Enable PLLSAI1. + * @param PLLSAI1Init pointer to an RCC_PLLSAI1InitTypeDef structure that + * contains the configuration information for the PLLSAI1 + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI1(RCC_PLLSAI1InitTypeDef *PLLSAI1Init) +{ + uint32_t tickstart; + HAL_StatusTypeDef status = HAL_OK; + + /* check for PLLSAI1 Parameters used to output PLLSAI1CLK */ + assert_param(IS_RCC_PLLN_VALUE(PLLSAI1Init->PLLN)); + assert_param(IS_RCC_PLLP_VALUE(PLLSAI1Init->PLLP)); + assert_param(IS_RCC_PLLQ_VALUE(PLLSAI1Init->PLLQ)); + assert_param(IS_RCC_PLLR_VALUE(PLLSAI1Init->PLLR)); + assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PLLSAI1Init->PLLSAI1ClockOut)); + + /* Disable the PLLSAI1 */ + __HAL_RCC_PLLSAI1_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready to be updated */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + + if (status == HAL_OK) + { + /* Configure the PLLSAI1 Multiplication factor N */ + /* Configure the PLLSAI1 Division factors P, Q and R */ + __HAL_RCC_PLLSAI1_CONFIG(PLLSAI1Init->PLLN, PLLSAI1Init->PLLP, PLLSAI1Init->PLLQ, PLLSAI1Init->PLLR); + /* Configure the PLLSAI1 Clock output(s) */ + __HAL_RCC_PLLSAI1CLKOUT_ENABLE(PLLSAI1Init->PLLSAI1ClockOut); + + /* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/ + __HAL_RCC_PLLSAI1_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 1U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + } + + return status; +} + +/** + * @brief Disable PLLSAI1. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI1(void) +{ + uint32_t tickstart; + HAL_StatusTypeDef status = HAL_OK; + + /* Disable the PLLSAI1 */ + __HAL_RCC_PLLSAI1_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + + /* Disable the PLLSAI1 Clock outputs */ + __HAL_RCC_PLLSAI1CLKOUT_DISABLE(RCC_PLLSAI1_SAI1CLK | RCC_PLLSAI1_USBCLK | RCC_PLLSAI1_ADCCLK); + + return status; +} +#endif /* SAI1 */ + +/***********************************************************************************************/ + +/** + * @brief Configure the oscillator clock source for wakeup from Stop and CSS backup clock. + * @param WakeUpClk Wakeup clock + * This parameter can be one of the following values: + * @arg @ref RCC_STOP_WAKEUPCLOCK_MSI MSI oscillator selection + * @arg @ref RCC_STOP_WAKEUPCLOCK_HSI HSI oscillator selection + * @note This function shall not be called after the Clock Security System on HSE has been + * enabled. + * @retval None + */ +void HAL_RCCEx_WakeUpStopCLKConfig(uint32_t WakeUpClk) +{ + assert_param(IS_RCC_STOP_WAKEUPCLOCK(WakeUpClk)); + + __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(WakeUpClk); +} + +/** + * @brief Enable the LSE Clock Security System. + * @note Prior to enable the LSE Clock Security System, LSE oscillator is to be enabled + * with HAL_RCC_OscConfig() and the LSE oscillator clock is to be selected as RTC + * clock with HAL_RCCEx_PeriphCLKConfig(). + * @retval None + */ +void HAL_RCCEx_EnableLSECSS(void) +{ + LL_RCC_LSE_EnableCSS(); +} + +/** + * @brief Disable the LSE Clock Security System. + * @note LSE Clock Security System can only be disabled after a LSE failure detection. + * @retval None + */ +void HAL_RCCEx_DisableLSECSS(void) +{ + LL_RCC_LSE_DisableCSS(); + + /* Disable LSE CSS IT if any */ + __HAL_RCC_DISABLE_IT(RCC_IT_LSECSS); +} + +/** + * @brief Enable the LSE Clock Security System Interrupt & corresponding EXTI line. + * @note LSE Clock Security System Interrupt is mapped on RTC EXTI line 18 + * @retval None + */ +void HAL_RCCEx_EnableLSECSS_IT(void) +{ + /* Enable LSE CSS */ + LL_RCC_LSE_EnableCSS(); + + /* Enable LSE CSS IT */ + __HAL_RCC_ENABLE_IT(RCC_IT_LSECSS); + + /* Enable IT on EXTI Line 18 */ + __HAL_RCC_LSECSS_EXTI_ENABLE_IT(); + __HAL_RCC_LSECSS_EXTI_ENABLE_RISING_EDGE(); +} + +/** + * @brief Handle the RCC LSE Clock Security System interrupt request. + * @retval None + */ +void HAL_RCCEx_LSECSS_IRQHandler(void) +{ + /* Check RCC LSE CSSF flag */ + if (__HAL_RCC_GET_IT(RCC_IT_LSECSS)) + { + /* RCC LSE Clock Security System interrupt user callback */ + HAL_RCCEx_LSECSS_Callback(); + + /* Clear RCC LSE CSS pending bit */ + __HAL_RCC_CLEAR_IT(RCC_IT_LSECSS); + } +} + +/** + * @brief RCCEx LSE Clock Security System interrupt callback. + * @retval none + */ +__weak void HAL_RCCEx_LSECSS_Callback(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_RCCEx_LSECSS_Callback should be implemented in the user file + */ +} + +/** + * @brief Select the clock source to output on LSCO1 pin(PA2) or LSC02 pin (PH3) or LSCO3 pin (PC12). + * @note PA2, PH3 or PC12 should be configured in alternate function mode. + * @param RCC_LSCOx specifies the output direction for the clock source. + * @arg @ref RCC_LSCO1 Clock source to output on LSCO1 pin(PA2) + * @arg @ref RCC_LSCO2 Clock source to output on LSCO2 pin(PH3) + * @arg @ref RCC_LSCO3 Clock source to output on LSCO3 pin(PC12) + * @param RCC_LSCOSource specifies the clock source to output. + * This parameter can be one of the following values: + * @arg @ref RCC_LSCOSOURCE_LSI LSI clock selected as LSCO source + * @arg @ref RCC_LSCOSOURCE_LSE LSE clock selected as LSCO source + * @retval None + * @note LSCO should be disable with @ref HAL_RCCEx_DisableLSCO + */ +void HAL_RCCEx_LSCOConfig(uint32_t RCC_LSCOx, uint32_t RCC_LSCOSource) +{ + GPIO_InitTypeDef GPIO_InitStruct; + FlagStatus backupchanged; + + /* Check the parameters */ + assert_param(IS_RCC_LSCO(RCC_LSCOx)); + assert_param(IS_RCC_LSCOSOURCE(RCC_LSCOSource)); + + /* Common GPIO init parameters */ + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Pull = GPIO_NOPULL; + + /* RCC_LSCO1 */ + if (RCC_LSCOx == RCC_LSCO1) + { + /* LSCO1 Clock Enable */ + __LSCO1_CLK_ENABLE(); + /* Configure the LSCO1 pin in alternate function mode */ + GPIO_InitStruct.Pin = LSCO1_PIN; + GPIO_InitStruct.Alternate = GPIO_AF0_LSCO; + HAL_GPIO_Init(LSCO1_GPIO_PORT, &GPIO_InitStruct); + } + else if (RCC_LSCOx == RCC_LSCO2) + { + /* LSCO2 Clock Enable */ + __LSCO2_CLK_ENABLE(); + /* Configure the LSCO2 pin in alternate function mode */ + GPIO_InitStruct.Pin = LSCO2_PIN; + GPIO_InitStruct.Alternate = GPIO_AF0_LSCO; + HAL_GPIO_Init(LSCO2_GPIO_PORT, &GPIO_InitStruct); + + } +#if defined(RCC_LSCO3_SUPPORT) + else if (RCC_LSCOx == RCC_LSCO3) + { + /* LSCO3 Clock Enable */ + __LSCO3_CLK_ENABLE(); + /* Configure the LSCO3 pin in alternate function mode */ + GPIO_InitStruct.Pin = LSCO3_PIN; + GPIO_InitStruct.Alternate = GPIO_AF6_LSCO; + HAL_GPIO_Init(LSCO3_GPIO_PORT, &GPIO_InitStruct); + } +#endif /* RCC_LSCO3_SUPPORT */ + else + { + ; + } + + /* Update LSCOSEL clock source in Backup Domain control register */ + if (HAL_IS_BIT_CLR(PWR->CR1, PWR_CR1_DBP)) + { + HAL_PWR_EnableBkUpAccess(); + backupchanged = SET; + } + else + { + backupchanged = RESET; + } + + MODIFY_REG(RCC->BDCR, RCC_BDCR_LSCOSEL | RCC_BDCR_LSCOEN, RCC_LSCOSource | RCC_BDCR_LSCOEN); + + if (backupchanged == SET) + { + HAL_PWR_DisableBkUpAccess(); + } + +} + +/** + * @brief Select the Low Speed clock source to output on LSCO pin (PA2). + * @param LSCOSource specifies the Low Speed clock source to output. + * This parameter can be one of the following values: + * @arg @ref RCC_LSCOSOURCE_LSI LSI clock selected as LSCO source + * @arg @ref RCC_LSCOSOURCE_LSE LSE clock selected as LSCO source + * @retval None + */ +void HAL_RCCEx_EnableLSCO(uint32_t LSCOSource) +{ + /* Check the parameters */ + assert_param(IS_RCC_LSCOSOURCE(LSCOSource)); + + /* Update LSCO selection according to parameter and enable LSCO */ + MODIFY_REG(RCC->BDCR, RCC_BDCR_LSCOSEL, LSCOSource | RCC_BDCR_LSCOEN); +} + +/** + * @brief Disable the Low Speed clock output. + * @retval None + */ +void HAL_RCCEx_DisableLSCO(void) +{ + LL_RCC_LSCO_Disable(); +} + +/** + * @brief Enable the PLL-mode of the MSI. + * @note Prior to enable the PLL-mode of the MSI for automatic hardware + * calibration LSE oscillator is to be enabled with @ref HAL_RCC_OscConfig(). + * @retval None + */ +void HAL_RCCEx_EnableMSIPLLMode(void) +{ + LL_RCC_MSI_EnablePLLMode() ; +} + +/** + * @brief Disable the PLL-mode of the MSI. + * @note PLL-mode of the MSI is automatically reset when LSE oscillator is disabled. + * @retval None + */ +void HAL_RCCEx_DisableMSIPLLMode(void) +{ + LL_RCC_MSI_DisablePLLMode() ; +} + +/** + * @brief Set trimming value + * @param OscillatorType Specifies the oscillator to be trimmed + * This parameter can be one of the following values: + * @arg @ref RCC_OSCILLATORTYPE_LSI2 LSI2 oscillator selected. + * When disabling and re-enabling the LSI2 there is no need for re-trimming + * Trimming is only needed once after a NRST reset. + * Trimming values comes from factory trimmed flash location (0x1FFF7548). + * @note The LSI2 oscillator must be disabled before calling this trimming function through @ref HAL_RCC_OscConfig + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RCCEx_TrimOsc(uint32_t OscillatorType) +{ +#define FTLSI2TRIM (0xFUL) + HAL_StatusTypeDef status = HAL_OK; + + assert_param(IS_RCC_TRIMOSC(OscillatorType)); + + if (OscillatorType == RCC_OSCILLATORTYPE_LSI2) + { + if (LL_RCC_LSI2_IsReady() == 1U) + { + status = HAL_ERROR; + } + else + { + /* Copy the LSI2 trimming information from the factory trimmed Flash location */ + uint32_t factoryTrimming = ((*(uint32_t *)(0x1FFF7548)) & FTLSI2TRIM); + LL_RCC_LSI2_SetTrimming(factoryTrimming); + } + } + else + { + status = HAL_ERROR; + } + return status; +} + +/** + * @} + */ + +#if defined(CRS) +/** @defgroup RCCEx_Exported_Functions_Group3 Extended Clock Recovery System Control functions + * @brief Extended Clock Recovery System Control functions + * +@verbatim + =============================================================================== + ##### Extended Clock Recovery System Control functions ##### + =============================================================================== + [..] + For devices with Clock Recovery System feature (CRS), RCC Extended HAL driver can be used as follows: + + (#) In System clock config, HSI48 needs to be enabled + + (#) Enable CRS clock in IP MSP init which will use CRS functions + + (#) Call CRS functions as follows: + (##) Prepare synchronization configuration necessary for HSI48 calibration + (+++) Default values can be set for frequency Error Measurement (reload and error limit) + and also HSI48 oscillator smooth trimming. + (+++) Macro __HAL_RCC_CRS_RELOADVALUE_CALCULATE can be also used to calculate + directly reload value with target and synchronization frequencies values + (##) Call function HAL_RCCEx_CRSConfig which + (+++) Resets CRS registers to their default values. + (+++) Configures CRS registers with synchronization configuration + (+++) Enables automatic calibration and frequency error counter feature + Note: When using USB LPM (Link Power Management) and the device is in Sleep mode, the + periodic USB SOF will not be generated by the host. No SYNC signal will therefore be + provided to the CRS to calibrate the HSI48 on the run. To guarantee the required clock + precision after waking up from Sleep mode, the LSE or reference clock on the GPIOs + should be used as SYNC signal. + + (##) A polling function is provided to wait for complete synchronization + (+++) Call function HAL_RCCEx_CRSWaitSynchronization() + (+++) According to CRS status, user can decide to adjust again the calibration or continue + application if synchronization is OK + + (#) User can retrieve information related to synchronization in calling function + HAL_RCCEx_CRSGetSynchronizationInfo() + + (#) Regarding synchronization status and synchronization information, user can try a new calibration + in changing synchronization configuration and call again HAL_RCCEx_CRSConfig. + Note: When the SYNC event is detected during the downcounting phase (before reaching the zero value), + it means that the actual frequency is lower than the target (and so, that the TRIM value should be + incremented), while when it is detected during the upcounting phase it means that the actual frequency + is higher (and that the TRIM value should be decremented). + + (#) In interrupt mode, user can resort to the available macros (__HAL_RCC_CRS_XXX_IT). Interrupts will go + through CRS Handler (CRS_IRQn/CRS_IRQHandler) + (++) Call function HAL_RCCEx_CRSConfig() + (++) Enable CRS_IRQn (thanks to NVIC functions) + (++) Enable CRS interrupt (__HAL_RCC_CRS_ENABLE_IT) + (++) Implement CRS status management in the following user callbacks called from + HAL_RCCEx_CRS_IRQHandler(): + (+++) HAL_RCCEx_CRS_SyncOkCallback() + (+++) HAL_RCCEx_CRS_SyncWarnCallback() + (+++) HAL_RCCEx_CRS_ExpectedSyncCallback() + (+++) HAL_RCCEx_CRS_ErrorCallback() + + (#) To force a SYNC EVENT, user can use the function HAL_RCCEx_CRSSoftwareSynchronizationGenerate(). + This function can be called before calling HAL_RCCEx_CRSConfig (for instance in Systick handler) + +@endverbatim + * @{ + */ + +/** + * @brief Start automatic synchronization for polling mode + * @param pInit Pointer on RCC_CRSInitTypeDef structure + * @retval None + */ +void HAL_RCCEx_CRSConfig(RCC_CRSInitTypeDef *pInit) +{ + uint32_t value; + + /* Check the parameters */ + assert_param(IS_RCC_CRS_SYNC_DIV(pInit->Prescaler)); + assert_param(IS_RCC_CRS_SYNC_SOURCE(pInit->Source)); + assert_param(IS_RCC_CRS_SYNC_POLARITY(pInit->Polarity)); + assert_param(IS_RCC_CRS_RELOADVALUE(pInit->ReloadValue)); + assert_param(IS_RCC_CRS_ERRORLIMIT(pInit->ErrorLimitValue)); + assert_param(IS_RCC_CRS_HSI48CALIBRATION(pInit->HSI48CalibrationValue)); + + /* CONFIGURATION */ + + /* Before configuration, reset CRS registers to their default values*/ + __HAL_RCC_CRS_FORCE_RESET(); + __HAL_RCC_CRS_RELEASE_RESET(); + + /* Set the SYNCDIV[2:0] bits according to Prescaler value */ + /* Set the SYNCSRC[1:0] bits according to Source value */ + /* Set the SYNCSPOL bit according to Polarity value */ + value = (pInit->Prescaler | pInit->Source | pInit->Polarity); + /* Set the RELOAD[15:0] bits according to ReloadValue value */ + value |= pInit->ReloadValue; + /* Set the FELIM[7:0] bits according to ErrorLimitValue value */ + value |= (pInit->ErrorLimitValue << CRS_CFGR_FELIM_Pos); + WRITE_REG(CRS->CFGR, value); + + /* Adjust HSI48 oscillator smooth trimming */ + /* Set the TRIM[5:0] bits according to RCC_CRS_HSI48CalibrationValue value */ + MODIFY_REG(CRS->CR, CRS_CR_TRIM, (pInit->HSI48CalibrationValue << CRS_CR_TRIM_Pos)); + + /* START AUTOMATIC SYNCHRONIZATION*/ + + /* Enable Automatic trimming & Frequency error counter */ + SET_BIT(CRS->CR, CRS_CR_AUTOTRIMEN | CRS_CR_CEN); +} + +/** + * @brief Generate the software synchronization event + * @retval None + */ +void HAL_RCCEx_CRSSoftwareSynchronizationGenerate(void) +{ + LL_CRS_GenerateEvent_SWSYNC(); +} + +/** + * @brief Return synchronization info + * @param pSynchroInfo Pointer on @ref RCC_CRSSynchroInfoTypeDef structure + * @retval None + */ +void HAL_RCCEx_CRSGetSynchronizationInfo(RCC_CRSSynchroInfoTypeDef *pSynchroInfo) +{ + /* Check the parameter */ + assert_param(pSynchroInfo != (void *)NULL); + + /* Get the reload value */ + pSynchroInfo->ReloadValue = LL_CRS_GetReloadCounter(); + + /* Get HSI48 oscillator smooth trimming */ + pSynchroInfo->HSI48CalibrationValue = LL_CRS_GetHSI48SmoothTrimming(); + + /* Get Frequency error capture */ + pSynchroInfo->FreqErrorCapture = LL_CRS_GetFreqErrorCapture(); + + /* Get Frequency error direction */ + pSynchroInfo->FreqErrorDirection = LL_CRS_GetFreqErrorDirection(); +} + +/** + * @brief Wait for CRS Synchronization status. + * @param Timeout Duration of the timeout + * @note Timeout is based on the maximum time to receive a SYNC event based on synchronization + * frequency. + * @note If Timeout set to HAL_MAX_DELAY, HAL_TIMEOUT will be never returned. + * @retval Combination of Synchronization status + * This parameter can be a combination of the following values: + * @arg @ref RCC_CRS_TIMEOUT + * @arg @ref RCC_CRS_SYNCOK + * @arg @ref RCC_CRS_SYNCWARN + * @arg @ref RCC_CRS_SYNCERR + * @arg @ref RCC_CRS_SYNCMISS + * @arg @ref RCC_CRS_TRIMOVF + */ +uint32_t HAL_RCCEx_CRSWaitSynchronization(uint32_t Timeout) +{ + uint32_t crsstatus = RCC_CRS_NONE; + uint32_t tickstart; + + /* Get timeout */ + tickstart = HAL_GetTick(); + + /* Wait for CRS flag or timeout detection */ + do + { + if (Timeout != HAL_MAX_DELAY) + { + if (((HAL_GetTick() - tickstart) > Timeout) || (Timeout == 0U)) + { + crsstatus = RCC_CRS_TIMEOUT; + } + } + /* Check CRS SYNCOK flag */ + if (__HAL_RCC_CRS_GET_FLAG(RCC_CRS_FLAG_SYNCOK)) + { + /* CRS SYNC event OK */ + crsstatus |= RCC_CRS_SYNCOK; + + /* Clear CRS SYNC event OK bit */ + __HAL_RCC_CRS_CLEAR_FLAG(RCC_CRS_FLAG_SYNCOK); + } + + /* Check CRS SYNCWARN flag */ + if (__HAL_RCC_CRS_GET_FLAG(RCC_CRS_FLAG_SYNCWARN)) + { + /* CRS SYNC warning */ + crsstatus |= RCC_CRS_SYNCWARN; + + /* Clear CRS SYNCWARN bit */ + __HAL_RCC_CRS_CLEAR_FLAG(RCC_CRS_FLAG_SYNCWARN); + } + + /* Check CRS TRIM overflow flag */ + if (__HAL_RCC_CRS_GET_FLAG(RCC_CRS_FLAG_TRIMOVF)) + { + /* CRS SYNC Error */ + crsstatus |= RCC_CRS_TRIMOVF; + + /* Clear CRS Error bit */ + __HAL_RCC_CRS_CLEAR_FLAG(RCC_CRS_FLAG_TRIMOVF); + } + + /* Check CRS Error flag */ + if (__HAL_RCC_CRS_GET_FLAG(RCC_CRS_FLAG_SYNCERR)) + { + /* CRS SYNC Error */ + crsstatus |= RCC_CRS_SYNCERR; + + /* Clear CRS Error bit */ + __HAL_RCC_CRS_CLEAR_FLAG(RCC_CRS_FLAG_SYNCERR); + } + + /* Check CRS SYNC Missed flag */ + if (__HAL_RCC_CRS_GET_FLAG(RCC_CRS_FLAG_SYNCMISS)) + { + /* CRS SYNC Missed */ + crsstatus |= RCC_CRS_SYNCMISS; + + /* Clear CRS SYNC Missed bit */ + __HAL_RCC_CRS_CLEAR_FLAG(RCC_CRS_FLAG_SYNCMISS); + } + + /* Check CRS Expected SYNC flag */ + if (__HAL_RCC_CRS_GET_FLAG(RCC_CRS_FLAG_ESYNC)) + { + /* frequency error counter reached a zero value */ + __HAL_RCC_CRS_CLEAR_FLAG(RCC_CRS_FLAG_ESYNC); + } + } while (RCC_CRS_NONE == crsstatus); + + return crsstatus; +} + +/** + * @brief Handle the Clock Recovery System interrupt request. + * @retval None + */ +void HAL_RCCEx_CRS_IRQHandler(void) +{ + uint32_t crserror = RCC_CRS_NONE; + /* Get current IT flags and IT sources values */ + uint32_t itflags = READ_REG(CRS->ISR); + uint32_t itsources = READ_REG(CRS->CR); + + /* Check CRS SYNCOK flag */ + if (((itflags & RCC_CRS_FLAG_SYNCOK) != 0U) && ((itsources & RCC_CRS_IT_SYNCOK) != 0U)) + { + /* Clear CRS SYNC event OK flag */ + LL_CRS_ClearFlag_SYNCOK(); + + /* user callback */ + HAL_RCCEx_CRS_SyncOkCallback(); + } + /* Check CRS SYNCWARN flag */ + else if (((itflags & RCC_CRS_FLAG_SYNCWARN) != 0U) && ((itsources & RCC_CRS_IT_SYNCWARN) != 0U)) + { + /* Clear CRS SYNCWARN flag */ + LL_CRS_ClearFlag_SYNCWARN(); + + /* user callback */ + HAL_RCCEx_CRS_SyncWarnCallback(); + } + /* Check CRS Expected SYNC flag */ + else if (((itflags & RCC_CRS_FLAG_ESYNC) != 0U) && ((itsources & RCC_CRS_IT_ESYNC) != 0U)) + { + /* frequency error counter reached a zero value */ + LL_CRS_ClearFlag_ESYNC(); + + /* user callback */ + HAL_RCCEx_CRS_ExpectedSyncCallback(); + } + /* Check CRS Error flags */ + else + { + if (((itflags & RCC_CRS_FLAG_ERR) != 0U) && ((itsources & RCC_CRS_IT_ERR) != 0U)) + { + if ((itflags & RCC_CRS_FLAG_SYNCERR) != 0U) + { + crserror |= RCC_CRS_SYNCERR; + } + if ((itflags & RCC_CRS_FLAG_SYNCMISS) != 0U) + { + crserror |= RCC_CRS_SYNCMISS; + } + if ((itflags & RCC_CRS_FLAG_TRIMOVF) != 0U) + { + crserror |= RCC_CRS_TRIMOVF; + } + + /* Clear CRS Error flags */ + LL_CRS_ClearFlag_ERR(); + + /* user error callback */ + HAL_RCCEx_CRS_ErrorCallback(crserror); + } + } +} + +/** + * @brief RCCEx Clock Recovery System SYNCOK interrupt callback. + * @retval none + */ +__weak void HAL_RCCEx_CRS_SyncOkCallback(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the @ref HAL_RCCEx_CRS_SyncOkCallback should be implemented in the user file + */ +} + +/** + * @brief RCCEx Clock Recovery System SYNCWARN interrupt callback. + * @retval none + */ +__weak void HAL_RCCEx_CRS_SyncWarnCallback(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_RCCEx_CRS_SyncWarnCallback should be implemented in the user file + */ +} + +/** + * @brief RCCEx Clock Recovery System Expected SYNC interrupt callback. + * @retval none + */ +__weak void HAL_RCCEx_CRS_ExpectedSyncCallback(void) +{ + /* NOTE : This function should not be modified, when the callback is needed, + the HAL_RCCEx_CRS_ExpectedSyncCallback should be implemented in the user file + */ +} + +/** + * @brief RCCEx Clock Recovery System Error interrupt callback. + * @param Error Combination of Error status. + * This parameter can be a combination of the following values: + * @arg @ref RCC_CRS_SYNCERR + * @arg @ref RCC_CRS_SYNCMISS + * @arg @ref RCC_CRS_TRIMOVF + * @retval none + */ +__weak void HAL_RCCEx_CRS_ErrorCallback(uint32_t Error) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(Error); + + /* NOTE : This function should not be modified, when the callback is needed, + the @ref HAL_RCCEx_CRS_ErrorCallback should be implemented in the user file + */ +} + +/** + * @} + */ +#endif /* CRS */ + +/** + * @} + */ + +/** @addtogroup RCCEx_Private_Functions + * @{ + */ + +#if defined(SAI1) +/** + * @brief Configure the parameters N & P of PLLSAI1 and enable PLLSAI1 output clock(s). + * @param PLLSAI1 pointer to an RCC_PLLSAI1InitTypeDef structure that + * contains the configuration parameters N & P as well as PLLSAI1 output clock(s) + * + * @note PLLSAI1 is temporary disable to apply new parameters + * + * @retval HAL status + */ +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNP(RCC_PLLSAI1InitTypeDef *PLLSAI1) +{ + uint32_t tickstart; + HAL_StatusTypeDef status = HAL_OK; + + /* check for PLLSAI1 Parameters used to output PLLSAI1CLK */ + assert_param(IS_RCC_PLLN_VALUE(PLLSAI1->PLLN)); + assert_param(IS_RCC_PLLP_VALUE(PLLSAI1->PLLP)); + assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PLLSAI1->PLLSAI1ClockOut)); + + /* Disable the PLLSAI1 */ + __HAL_RCC_PLLSAI1_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready to be updated */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + + if (status == HAL_OK) + { + /* Configure the PLLSAI1 Multiplication factor N */ + __HAL_RCC_PLLSAI1_MULN_CONFIG(PLLSAI1->PLLN); + + /* Configure the PLLSAI1 Division factor P */ + __HAL_RCC_PLLSAI1_DIVP_CONFIG(PLLSAI1->PLLP); + + /* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/ + __HAL_RCC_PLLSAI1_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 1U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + + if (status == HAL_OK) + { + /* Configure the PLLSAI1 Clock output(s) */ + __HAL_RCC_PLLSAI1CLKOUT_ENABLE(PLLSAI1->PLLSAI1ClockOut); + } + } + + return status; +} + +/** + * @brief Configure the parameters N & Q of PLLSAI1 and enable PLLSAI1 output clock(s). + * @param PLLSAI1 pointer to an RCC_PLLSAI1InitTypeDef structure that + * contains the configuration parameters N & Q as well as PLLSAI1 output clock(s) + * + * @note PLLSAI1 is temporary disable to apply new parameters + * + * @retval HAL status + */ +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNQ(RCC_PLLSAI1InitTypeDef *PLLSAI1) +{ + uint32_t tickstart; + HAL_StatusTypeDef status = HAL_OK; + + /* check for PLLSAI1 Parameters used to output PLLSAI1CLK */ + assert_param(IS_RCC_PLLN_VALUE(PLLSAI1->PLLN)); + assert_param(IS_RCC_PLLQ_VALUE(PLLSAI1->PLLQ)); + assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PLLSAI1->PLLSAI1ClockOut)); + + /* Disable the PLLSAI1 */ + __HAL_RCC_PLLSAI1_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready to be updated */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + + if (status == HAL_OK) + { + /* Configure the PLLSAI1 Multiplication factor N */ + __HAL_RCC_PLLSAI1_MULN_CONFIG(PLLSAI1->PLLN); + /* Configure the PLLSAI1 Division factor Q */ + __HAL_RCC_PLLSAI1_DIVQ_CONFIG(PLLSAI1->PLLQ); + + /* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/ + __HAL_RCC_PLLSAI1_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 1U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + + if (status == HAL_OK) + { + /* Configure the PLLSAI1 Clock output(s) */ + __HAL_RCC_PLLSAI1CLKOUT_ENABLE(PLLSAI1->PLLSAI1ClockOut); + } + } + + return status; +} + +/** + * @brief Configure the parameters N & R of PLLSAI1 and enable PLLSAI1 output clock(s). + * @param PLLSAI1 pointer to an RCC_PLLSAI1InitTypeDef structure that + * contains the configuration parameters N & R as well as PLLSAI1 output clock(s) + * + * @note PLLSAI1 is temporary disable to apply new parameters + * + * @retval HAL status + */ +static HAL_StatusTypeDef RCCEx_PLLSAI1_ConfigNR(RCC_PLLSAI1InitTypeDef *PLLSAI1) +{ + uint32_t tickstart; + HAL_StatusTypeDef status = HAL_OK; + + /* check for PLLSAI1 Parameters used to output PLLSAI1CLK */ + assert_param(IS_RCC_PLLN_VALUE(PLLSAI1->PLLN)); + assert_param(IS_RCC_PLLR_VALUE(PLLSAI1->PLLR)); + assert_param(IS_RCC_PLLSAI1CLOCKOUT_VALUE(PLLSAI1->PLLSAI1ClockOut)); + + /* Disable the PLLSAI1 */ + __HAL_RCC_PLLSAI1_DISABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready to be updated */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + + if (status == HAL_OK) + { + /* Configure the PLLSAI1 Multiplication factor N */ + __HAL_RCC_PLLSAI1_MULN_CONFIG(PLLSAI1->PLLN); + /* Configure the PLLSAI1 Division factor R */ + __HAL_RCC_PLLSAI1_DIVR_CONFIG(PLLSAI1->PLLR); + + /* Enable the PLLSAI1 again by setting PLLSAI1ON to 1*/ + __HAL_RCC_PLLSAI1_ENABLE(); + + /* Get Start Tick*/ + tickstart = HAL_GetTick(); + + /* Wait till PLLSAI1 is ready */ + while (LL_RCC_PLLSAI1_IsReady() != 1U) + { + if ((HAL_GetTick() - tickstart) > PLLSAI1_TIMEOUT_VALUE) + { + status = HAL_TIMEOUT; + break; + } + } + + if (status == HAL_OK) + { + /* Configure the PLLSAI1 Clock output(s) */ + __HAL_RCC_PLLSAI1CLKOUT_ENABLE(PLLSAI1->PLLSAI1ClockOut); + } + } + + return status; +} +#endif /* SAI1 */ + +/** + * @brief Return PLL clock (PLLPCLK) frequency used for SAI domain + * @retval PLLPCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLL_GetFreqDomain_P(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI Value / PLLM) * PLLN + SAI Domain clock = PLL_VCO / PLLP + */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLCLK_ADC_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLL_GetN(), LL_RCC_PLL_GetP()); +} + +/** + * @brief Return PLL clock (PLLQCLK) frequency used for 48 MHz domain + * @retval PLLQCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLL_GetFreqDomain_Q(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLN + 48M Domain clock = PLL_VCO / PLLQ + */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLCLK_48M_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLL_GetN(), LL_RCC_PLL_GetQ()); +} + +#if defined(SAI1) +/** + * @brief Return PLLSAI1 clock (PLLSAI1RCLK) frequency used for ADC domain + * @retval PLLSAI1RCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLLSAI1_GetFreqDomain_R(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLLSAI1_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLSAI1N */ + /* 48M Domain clock = PLLSAI1_VCO / PLLSAI1R */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLLSAI1 clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLLSAI1 clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLLSAI1 clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLSAI1_ADC_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLLSAI1_GetN(), LL_RCC_PLLSAI1_GetR()); +} + +/** + * @brief Return PLLSAI1 clock (PLLSAI1PCLK) frequency used for SAI domain + * @retval PLLSAI1PCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLLSAI1_GetFreqDomain_P(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLLSAI1_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLSAI1N */ + /* SAI Domain clock = PLLSAI1_VCO / PLLSAI1P */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLLSAI1 clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLLSAI1 clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLLSAI1 clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLSAI1_SAI_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLLSAI1_GetN(), LL_RCC_PLLSAI1_GetP()); +} + +/** + * @brief Return PLLSAI1 clock (PLLSAI1QCLK) frequency used for 48Mhz domain + * @retval PLLSAI1QCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLLSAI1_GetFreqDomain_Q(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLLSAI1_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLSAI1N */ + /* 48M Domain clock = PLLSAI1_VCO / PLLSAI1Q */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLLSAI1 clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLLSAI1 clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLLSAI1 clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLSAI1_48M_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLLSAI1_GetN(), LL_RCC_PLLSAI1_GetQ()); +} +#endif /* SAI1 */ + +/** + * @} + */ + +#endif /* HAL_RCC_MODULE_ENABLED */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c new file mode 100644 index 0000000..b5ba9b2 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc.c @@ -0,0 +1,1945 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_rtc.c + * @author MCD Application Team + * @brief RTC HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the Real-Time Clock (RTC) peripheral: + * + Initialization and de-initialization functions + * + Calendar (Time and Date) configuration functions + * + Alarms (Alarm A and Alarm B) configuration functions + * + Peripheral Control functions + * + Peripheral State functions + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### RTC and Backup Domain Operating Condition ##### + ============================================================================== + [..] The real-time clock (RTC) and the RTC backup registers can be powered + from the VBAT voltage when the main VDD supply is powered off. + To retain the content of the RTC backup registers and supply the RTC when + VDD is turned off, VBAT pin can be connected to an optional standby + voltage supplied by a battery or by another source. + + [..] To allow the RTC operating even when the main digital supply (VDD) is turned + off, the VBAT pin powers the following blocks: + (#) The RTC + (#) The LSE oscillator + (#) PC13 to PC15 I/Os, plus PA0 and PC12 I/Os (when available) + + [..] When the backup domain is supplied by VDD (analog switch connected to VDD), + the following pins are available: + (#) PC14 and PC15 can be used as either GPIO or LSE pins + (#) PC13 can be used as a GPIO or as the RTC_AF1 pin + (#) PA0 can be used as a GPIO or as the RTC_AF2 pin + (#) PC12 can be used as a GPIO or as the RTC_AF3 pin + + [..] When the backup domain is supplied by VBAT (analog switch connected to VBAT + because VDD is not present), the following pins are available: + (#) PC14 and PC15 can be used as LSE pins only + (#) PC13 can be used as the RTC_AF1 pin + (#) PA0 can be used as the RTC_AF2 pin + (#) PC12 can be used as the RTC_AF3 pin + + ##### Backup Domain Reset ##### + ================================================================== + [..] The backup domain reset sets all RTC registers and the RCC_BDCR register + to their reset values. + [..] A backup domain reset is generated when one of the following events occurs: + (#) Software reset, triggered by setting the BDRST bit in the + RCC Backup domain control register (RCC_BDCR). + (#) VDD or VBAT power on, if both supplies have previously been powered off. + (#) Tamper detection event resets all data backup registers. + + ##### Backup Domain Access ##### + ================================================================== + [..] After reset, the backup domain (RTC registers and RTC backup data registers) + is protected against possible unwanted write accesses. + [..] To enable access to the RTC Domain and RTC registers, proceed as follows: + (+) Enable the Power Controller (PWR) APB1 interface clock using the + __HAL_RCC_PWR_CLK_ENABLE() macro. + (+) Enable access to RTC domain using the HAL_PWR_EnableBkUpAccess() function. + (+) Select the RTC clock source using the __HAL_RCC_RTC_CONFIG() macro. + (+) Enable RTC Clock using the __HAL_RCC_RTC_ENABLE() macro. + + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + (+) Enable the RTC domain access (see description in the section above). + (+) Configure the RTC Prescaler (Asynchronous and Synchronous) and RTC hour + format using the HAL_RTC_Init() function. + + *** Time and Date configuration *** + =================================== + [..] + (+) To configure the RTC Calendar (Time and Date) use the HAL_RTC_SetTime() + and HAL_RTC_SetDate() functions. + (+) To read the RTC Calendar, use the HAL_RTC_GetTime() and HAL_RTC_GetDate() + functions. + (+) To manage the RTC summer or winter time change, use the following + functions: + (++) HAL_RTC_DST_Add1Hour() or HAL_RTC_DST_Sub1Hour to add or subtract + 1 hour from the calendar time. + (++) HAL_RTC_DST_SetStoreOperation() or HAL_RTC_DST_ClearStoreOperation + to memorize whether the time change has been performed or not. + + *** Alarm configuration *** + =========================== + [..] + (+) To configure the RTC Alarm use the HAL_RTC_SetAlarm() function. + You can also configure the RTC Alarm with interrupt mode using the + HAL_RTC_SetAlarm_IT() function. + (+) To read the RTC Alarm, use the HAL_RTC_GetAlarm() function. + + ##### RTC and low power modes ##### + ================================================================== + [..] The MCU can be woken up from a low power mode by an RTC alternate + function. + [..] The RTC alternate functions are the RTC alarms (Alarm A and Alarm B), + RTC wakeup, RTC tamper event detection and RTC timestamp event detection. + These RTC alternate functions can wake up the system from the Stop and + Standby low power modes. + [..] The system can also wake up from low power modes without depending + on an external interrupt (Auto-wakeup mode), by using the RTC alarm + or the RTC wakeup events. + [..] The RTC provides a programmable time base for waking up from the + Stop or Standby mode at regular intervals. + Wakeup from STOP and STANDBY modes is possible only when the RTC clock + source is LSE or LSI. + + *** Callback registration *** + ============================================= + [..] + When the compilation define USE_HAL_RTC_REGISTER_CALLBACKS is set to 0 or + not defined, the callback registration feature is not available and all + callbacks are set to the corresponding weak functions. + This is the recommended configuration in order to optimize memory/code + consumption footprint/performances. + [..] + The compilation define USE_HAL_RTC_REGISTER_CALLBACKS when set to 1 + allows the user to configure dynamically the driver callbacks. + Use Function HAL_RTC_RegisterCallback() to register an interrupt callback. + [..] + Function HAL_RTC_RegisterCallback() allows to register following callbacks: + (+) AlarmAEventCallback : RTC Alarm A Event callback. + (+) AlarmBEventCallback : RTC Alarm B Event callback. + (+) TimeStampEventCallback : RTC Timestamp Event callback. + (+) WakeUpTimerEventCallback : RTC WakeUpTimer Event callback. + (+) Tamper1EventCallback : RTC Tamper 1 Event callback. (*) + (+) Tamper2EventCallback : RTC Tamper 2 Event callback. + (+) Tamper3EventCallback : RTC Tamper 3 Event callback. (*) + (+) MspInitCallback : RTC MspInit callback. + (+) MspDeInitCallback : RTC MspDeInit callback. + + (*) value not applicable to all devices. + [..] + This function takes as parameters the HAL peripheral handle, the Callback ID + and a pointer to the user callback function. + [..] + Use function HAL_RTC_UnRegisterCallback() to reset a callback to the default + weak function. + HAL_RTC_UnRegisterCallback() takes as parameters the HAL peripheral handle, + and the Callback ID. + This function allows to reset following callbacks: + (+) AlarmAEventCallback : RTC Alarm A Event callback. + (+) AlarmBEventCallback : RTC Alarm B Event callback. + (+) TimeStampEventCallback : RTC Timestamp Event callback. + (+) WakeUpTimerEventCallback : RTC WakeUpTimer Event callback. + (+) Tamper1EventCallback : RTC Tamper 1 Event callback. (*) + (+) Tamper2EventCallback : RTC Tamper 2 Event callback. + (+) Tamper3EventCallback : RTC Tamper 3 Event callback. (*) + (+) MspInitCallback : RTC MspInit callback. + (+) MspDeInitCallback : RTC MspDeInit callback. + + (*) value not applicable to all devices. + [..] + By default, after the HAL_RTC_Init() and when the state is HAL_RTC_STATE_RESET, + all callbacks are set to the corresponding weak functions: + examples AlarmAEventCallback(), TimeStampEventCallback(). + Exception done for MspInit() and MspDeInit() callbacks that are reset to the + legacy weak function in the HAL_RTC_Init()/HAL_RTC_DeInit() only when these + callbacks are null (not registered beforehand). + If not, MspInit() or MspDeInit() are not null, HAL_RTC_Init()/HAL_RTC_DeInit() + keep and use the user MspInit()/MspDeInit() callbacks (registered beforehand). + [..] + Callbacks can be registered/unregistered in HAL_RTC_STATE_READY state only. + Exception done for MspInit() and MspDeInit() that can be registered/unregistered + in HAL_RTC_STATE_READY or HAL_RTC_STATE_RESET state. + Thus registered (user) MspInit()/MspDeInit() callbacks can be used during the + Init/DeInit. + In that case first register the MspInit()/MspDeInit() user callbacks using + HAL_RTC_RegisterCallback() before calling HAL_RTC_DeInit() or HAL_RTC_Init() + functions. + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup RTC RTC + * @brief RTC HAL module driver + * @{ + */ + +#ifdef HAL_RTC_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup RTC_Exported_Functions RTC Exported Functions + * @{ + */ + +/** @defgroup RTC_Exported_Functions_Group1 Initialization and de-initialization functions + * @brief Initialization and Configuration functions + * +@verbatim + =============================================================================== + ##### Initialization and de-initialization functions ##### + =============================================================================== + [..] This section provides functions allowing to initialize and configure the + RTC Prescaler (Synchronous and Asynchronous), RTC Hour format, disable + RTC registers Write protection, enter and exit the RTC initialization mode, + RTC registers synchronization check and reference clock detection enable. + (#) The RTC Prescaler is programmed to generate the RTC 1Hz time base. + It is split into 2 programmable prescalers to minimize power consumption. + (++) A 7-bit asynchronous prescaler and a 15-bit synchronous prescaler. + (++) When both prescalers are used, it is recommended to configure the + asynchronous prescaler to a high value to minimize power consumption. + (#) All RTC registers are Write protected. Writing to the RTC registers + is enabled by writing a key into the Write Protection register, RTC_WPR. + (#) To configure the RTC Calendar, user application should enter + initialization mode. In this mode, the calendar counter is stopped + and its value can be updated. When the initialization sequence is + complete, the calendar restarts counting after 4 RTCCLK cycles. + (#) To read the calendar through the shadow registers after Calendar + initialization, calendar update or after wakeup from low power modes + the software must first clear the RSF flag. The software must then + wait until it is set again before reading the calendar, which means + that the calendar registers have been correctly copied into the + RTC_TR and RTC_DR shadow registers. The HAL_RTC_WaitForSynchro() function + implements the above software sequence (RSF clear and RSF check). + +@endverbatim + * @{ + */ + +/** + * @brief Initializes the RTC peripheral + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc) +{ + HAL_StatusTypeDef status; + + /* Check RTC handler validity */ + if (hrtc == NULL) + { + return HAL_ERROR; + } + + /* Check the parameters */ + assert_param(IS_RTC_ALL_INSTANCE(hrtc->Instance)); + assert_param(IS_RTC_HOUR_FORMAT(hrtc->Init.HourFormat)); + assert_param(IS_RTC_ASYNCH_PREDIV(hrtc->Init.AsynchPrediv)); + assert_param(IS_RTC_SYNCH_PREDIV(hrtc->Init.SynchPrediv)); + assert_param(IS_RTC_OUTPUT(hrtc->Init.OutPut)); + assert_param(IS_RTC_OUTPUT_REMAP(hrtc->Init.OutPutRemap)); + assert_param(IS_RTC_OUTPUT_POL(hrtc->Init.OutPutPolarity)); + assert_param(IS_RTC_OUTPUT_TYPE(hrtc->Init.OutPutType)); + +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + if (hrtc->State == HAL_RTC_STATE_RESET) + { + /* Allocate lock resource and initialize it */ + hrtc->Lock = HAL_UNLOCKED; + + hrtc->AlarmAEventCallback = HAL_RTC_AlarmAEventCallback; /* Legacy weak AlarmAEventCallback */ + hrtc->AlarmBEventCallback = HAL_RTCEx_AlarmBEventCallback; /* Legacy weak AlarmBEventCallback */ + hrtc->TimeStampEventCallback = HAL_RTCEx_TimeStampEventCallback; /* Legacy weak TimeStampEventCallback */ + hrtc->WakeUpTimerEventCallback = HAL_RTCEx_WakeUpTimerEventCallback; /* Legacy weak WakeUpTimerEventCallback */ +#if defined(RTC_TAMPER1_SUPPORT) + hrtc->Tamper1EventCallback = HAL_RTCEx_Tamper1EventCallback; /* Legacy weak Tamper1EventCallback */ +#endif /* RTC_TAMPER1_SUPPORT */ + hrtc->Tamper2EventCallback = HAL_RTCEx_Tamper2EventCallback; /* Legacy weak Tamper2EventCallback */ +#if defined(RTC_TAMPER3_SUPPORT) + hrtc->Tamper3EventCallback = HAL_RTCEx_Tamper3EventCallback; /* Legacy weak Tamper3EventCallback */ +#endif /* RTC_TAMPER3_SUPPORT */ + + if (hrtc->MspInitCallback == NULL) + { + hrtc->MspInitCallback = HAL_RTC_MspInit; + } + /* Init the low level hardware */ + hrtc->MspInitCallback(hrtc); + + if (hrtc->MspDeInitCallback == NULL) + { + hrtc->MspDeInitCallback = HAL_RTC_MspDeInit; + } + } +#else /* USE_HAL_RTC_REGISTER_CALLBACKS */ + if (hrtc->State == HAL_RTC_STATE_RESET) + { + /* Allocate lock resource and initialize it */ + hrtc->Lock = HAL_UNLOCKED; + + /* Initialize RTC MSP */ + HAL_RTC_MspInit(hrtc); + } +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + + /* Set RTC state */ + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Check whether the calendar needs to be initialized */ + if (__HAL_RTC_IS_CALENDAR_INITIALIZED(hrtc) == 0U) + { + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + + if (status == HAL_OK) + { + /* Clear RTC_CR FMT, OSEL and POL Bits */ + hrtc->Instance->CR &= ((uint32_t)~(RTC_CR_FMT | RTC_CR_OSEL | RTC_CR_POL)); + /* Set RTC_CR register */ + hrtc->Instance->CR |= (uint32_t)(hrtc->Init.HourFormat | hrtc->Init.OutPut | hrtc->Init.OutPutPolarity); + + /* Configure the RTC PRER */ + hrtc->Instance->PRER = (uint32_t)(hrtc->Init.SynchPrediv); + hrtc->Instance->PRER |= (uint32_t)(hrtc->Init.AsynchPrediv << RTC_PRER_PREDIV_A_Pos); + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + } + + if (status == HAL_OK) + { +#if defined(RTC_OR_ALARMOUTTYPE) + hrtc->Instance->OR &= (uint32_t)~(RTC_OUTPUT_TYPE_PUSHPULL | RTC_OUTPUT_REMAP_POS1); + hrtc->Instance->OR |= (uint32_t)(hrtc->Init.OutPutType | hrtc->Init.OutPutRemap); +#else + hrtc->Instance->OR &= (uint32_t)~RTC_OUTPUT_REMAP_POS1; + hrtc->Instance->OR |= (uint32_t)(hrtc->Init.OutPutRemap); +#endif /* RTC_OR_ALARMOUTTYPE */ + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + } + else + { + /* The calendar is already initialized */ + status = HAL_OK; + } + + if (status == HAL_OK) + { + hrtc->State = HAL_RTC_STATE_READY; + } + + return status; +} + +/** + * @brief DeInitializes the RTC peripheral + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @note This function does not reset the RTC Backup Data registers. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc) +{ + HAL_StatusTypeDef status; + + /* Check the parameters */ + assert_param(IS_RTC_ALL_INSTANCE(hrtc->Instance)); + + /* Set RTC state */ + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + + if (status == HAL_OK) + { + /* Reset RTC registers */ + hrtc->Instance->TR = 0x00000000U; + hrtc->Instance->DR = (RTC_DR_WDU_0 | RTC_DR_MU_0 | RTC_DR_DU_0); + hrtc->Instance->CR = 0x00000000U; + hrtc->Instance->WUTR = RTC_WUTR_WUT; + hrtc->Instance->PRER = (uint32_t)(RTC_PRER_PREDIV_A | 0x000000FFU); + hrtc->Instance->ALRMAR = 0x00000000U; + hrtc->Instance->ALRMBR = 0x00000000U; + hrtc->Instance->CALR = 0x00000000U; + hrtc->Instance->SHIFTR = 0x00000000U; + hrtc->Instance->ALRMASSR = 0x00000000U; + hrtc->Instance->ALRMBSSR = 0x00000000U; + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + if (status == HAL_OK) + { + /* Reset Tamper and alternate functions configuration register */ + hrtc->Instance->TAMPCR = 0x00000000U; + + /* Reset Option register */ + hrtc->Instance->OR = 0x00000000U; + +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + if (hrtc->MspDeInitCallback == NULL) + { + hrtc->MspDeInitCallback = HAL_RTC_MspDeInit; + } + + /* DeInit the low level hardware: CLOCK, NVIC.*/ + hrtc->MspDeInitCallback(hrtc); +#else /* USE_HAL_RTC_REGISTER_CALLBACKS */ + /* De-Initialize RTC MSP */ + HAL_RTC_MspDeInit(hrtc); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + + hrtc->State = HAL_RTC_STATE_RESET; + } + + /* Release Lock */ + __HAL_UNLOCK(hrtc); + + return status; +} + +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) +/** + * @brief Registers a User RTC Callback + * To be used instead of the weak predefined callback + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param CallbackID ID of the callback to be registered + * This parameter can be one of the following values: + * @arg @ref HAL_RTC_ALARM_A_EVENT_CB_ID Alarm A Event Callback ID + * @arg @ref HAL_RTC_ALARM_B_EVENT_CB_ID Alarm B Event Callback ID + * @arg @ref HAL_RTC_TIMESTAMP_EVENT_CB_ID Timestamp Event Callback ID + * @arg @ref HAL_RTC_WAKEUPTIMER_EVENT_CB_ID Wakeup Timer Event Callback ID + * @arg @ref HAL_RTC_TAMPER1_EVENT_CB_ID Tamper 1 Event Callback ID (*) + * @arg @ref HAL_RTC_TAMPER2_EVENT_CB_ID Tamper 2 Event Callback ID + * @arg @ref HAL_RTC_TAMPER3_EVENT_CB_ID Tamper 3 Event Callback ID (*) + * @arg @ref HAL_RTC_MSPINIT_CB_ID MSP Init callback ID + * @arg @ref HAL_RTC_MSPDEINIT_CB_ID MSP DeInit callback ID + * + * (*) value not applicable to all devices. + * @param pCallback pointer to the Callback function + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_RegisterCallback(RTC_HandleTypeDef *hrtc, HAL_RTC_CallbackIDTypeDef CallbackID, pRTC_CallbackTypeDef pCallback) +{ + HAL_StatusTypeDef status = HAL_OK; + + if (pCallback == NULL) + { + return HAL_ERROR; + } + + /* Process locked */ + __HAL_LOCK(hrtc); + + if (HAL_RTC_STATE_READY == hrtc->State) + { + switch (CallbackID) + { + case HAL_RTC_ALARM_A_EVENT_CB_ID : + hrtc->AlarmAEventCallback = pCallback; + break; + + case HAL_RTC_ALARM_B_EVENT_CB_ID : + hrtc->AlarmBEventCallback = pCallback; + break; + + case HAL_RTC_TIMESTAMP_EVENT_CB_ID : + hrtc->TimeStampEventCallback = pCallback; + break; + + case HAL_RTC_WAKEUPTIMER_EVENT_CB_ID : + hrtc->WakeUpTimerEventCallback = pCallback; + break; + +#if defined(RTC_TAMPER1_SUPPORT) + case HAL_RTC_TAMPER1_EVENT_CB_ID : + hrtc->Tamper1EventCallback = pCallback; + break; +#endif /* RTC_TAMPER1_SUPPORT */ + + case HAL_RTC_TAMPER2_EVENT_CB_ID : + hrtc->Tamper2EventCallback = pCallback; + break; + +#if defined(RTC_TAMPER3_SUPPORT) + case HAL_RTC_TAMPER3_EVENT_CB_ID : + hrtc->Tamper3EventCallback = pCallback; + break; +#endif /* RTC_TAMPER3_SUPPORT */ + + case HAL_RTC_MSPINIT_CB_ID : + hrtc->MspInitCallback = pCallback; + break; + + case HAL_RTC_MSPDEINIT_CB_ID : + hrtc->MspDeInitCallback = pCallback; + break; + + default : + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else if (HAL_RTC_STATE_RESET == hrtc->State) + { + switch (CallbackID) + { + case HAL_RTC_MSPINIT_CB_ID : + hrtc->MspInitCallback = pCallback; + break; + + case HAL_RTC_MSPDEINIT_CB_ID : + hrtc->MspDeInitCallback = pCallback; + break; + + default : + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else + { + /* Return error status */ + status = HAL_ERROR; + } + + /* Release Lock */ + __HAL_UNLOCK(hrtc); + + return status; +} + +/** + * @brief Unregisters an RTC Callback + * RTC callback is redirected to the weak predefined callback + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param CallbackID ID of the callback to be unregistered + * This parameter can be one of the following values: + * @arg @ref HAL_RTC_ALARM_A_EVENT_CB_ID Alarm A Event Callback ID + * @arg @ref HAL_RTC_ALARM_B_EVENT_CB_ID Alarm B Event Callback ID + * @arg @ref HAL_RTC_TIMESTAMP_EVENT_CB_ID Timestamp Event Callback ID + * @arg @ref HAL_RTC_WAKEUPTIMER_EVENT_CB_ID Wakeup Timer Event Callback ID + * @arg @ref HAL_RTC_TAMPER1_EVENT_CB_ID Tamper 1 Event Callback ID (*) + * @arg @ref HAL_RTC_TAMPER2_EVENT_CB_ID Tamper 2 Event Callback ID + * @arg @ref HAL_RTC_TAMPER3_EVENT_CB_ID Tamper 3 Event Callback ID (*) + * @arg @ref HAL_RTC_MSPINIT_CB_ID MSP Init callback ID + * @arg @ref HAL_RTC_MSPDEINIT_CB_ID MSP DeInit callback ID + * + * (*) value not applicable to all devices. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_UnRegisterCallback(RTC_HandleTypeDef *hrtc, HAL_RTC_CallbackIDTypeDef CallbackID) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Process locked */ + __HAL_LOCK(hrtc); + + if (HAL_RTC_STATE_READY == hrtc->State) + { + switch (CallbackID) + { + case HAL_RTC_ALARM_A_EVENT_CB_ID : + hrtc->AlarmAEventCallback = HAL_RTC_AlarmAEventCallback; /* Legacy weak AlarmAEventCallback */ + break; + + case HAL_RTC_ALARM_B_EVENT_CB_ID : + hrtc->AlarmBEventCallback = HAL_RTCEx_AlarmBEventCallback; /* Legacy weak AlarmBEventCallback */ + break; + + case HAL_RTC_TIMESTAMP_EVENT_CB_ID : + hrtc->TimeStampEventCallback = HAL_RTCEx_TimeStampEventCallback; /* Legacy weak TimeStampEventCallback */ + break; + + case HAL_RTC_WAKEUPTIMER_EVENT_CB_ID : + hrtc->WakeUpTimerEventCallback = HAL_RTCEx_WakeUpTimerEventCallback; /* Legacy weak WakeUpTimerEventCallback */ + break; + +#if defined(RTC_TAMPER1_SUPPORT) + case HAL_RTC_TAMPER1_EVENT_CB_ID : + hrtc->Tamper1EventCallback = HAL_RTCEx_Tamper1EventCallback; /* Legacy weak Tamper1EventCallback */ + break; +#endif /* RTC_TAMPER1_SUPPORT */ + + case HAL_RTC_TAMPER2_EVENT_CB_ID : + hrtc->Tamper2EventCallback = HAL_RTCEx_Tamper2EventCallback; /* Legacy weak Tamper2EventCallback */ + break; + +#if defined(RTC_TAMPER3_SUPPORT) + case HAL_RTC_TAMPER3_EVENT_CB_ID : + hrtc->Tamper3EventCallback = HAL_RTCEx_Tamper3EventCallback; /* Legacy weak Tamper3EventCallback */ + break; +#endif /* RTC_TAMPER3_SUPPORT */ + + case HAL_RTC_MSPINIT_CB_ID : + hrtc->MspInitCallback = HAL_RTC_MspInit; + break; + + case HAL_RTC_MSPDEINIT_CB_ID : + hrtc->MspDeInitCallback = HAL_RTC_MspDeInit; + break; + + default : + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else if (HAL_RTC_STATE_RESET == hrtc->State) + { + switch (CallbackID) + { + case HAL_RTC_MSPINIT_CB_ID : + hrtc->MspInitCallback = HAL_RTC_MspInit; + break; + + case HAL_RTC_MSPDEINIT_CB_ID : + hrtc->MspDeInitCallback = HAL_RTC_MspDeInit; + break; + + default : + /* Return error status */ + status = HAL_ERROR; + break; + } + } + else + { + /* Return error status */ + status = HAL_ERROR; + } + + /* Release Lock */ + __HAL_UNLOCK(hrtc); + + return status; +} +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + +/** + * @brief Initializes the RTC MSP. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTC_MspInit could be implemented in the user file + */ +} + +/** + * @brief DeInitializes the RTC MSP. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTC_MspDeInit could be implemented in the user file + */ +} + +/** + * @} + */ + +/** @defgroup RTC_Exported_Functions_Group2 RTC Time and Date functions + * @brief RTC Time and Date functions + * +@verbatim + =============================================================================== + ##### RTC Time and Date functions ##### + =============================================================================== + + [..] This section provides functions allowing to configure Time and Date features + +@endverbatim + * @{ + */ + +/** + * @brief Sets RTC current time. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sTime Pointer to Time structure + * @note DayLightSaving and StoreOperation interfaces are deprecated. + * To manage Daylight Saving Time, please use HAL_RTC_DST_xxx functions. + * @param Format Specifies the format of the entered parameters. + * This parameter can be one of the following values: + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) +{ + uint32_t tmpreg = 0U; + HAL_StatusTypeDef status; + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + assert_param(IS_RTC_DAYLIGHT_SAVING(sTime->DayLightSaving)); + assert_param(IS_RTC_STORE_OPERATION(sTime->StoreOperation)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + if (Format == RTC_FORMAT_BIN) + { + if ((hrtc->Instance->CR & RTC_CR_FMT) != 0U) + { + assert_param(IS_RTC_HOUR12(sTime->Hours)); + assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat)); + } + else + { + sTime->TimeFormat = 0x00U; + assert_param(IS_RTC_HOUR24(sTime->Hours)); + } + assert_param(IS_RTC_MINUTES(sTime->Minutes)); + assert_param(IS_RTC_SECONDS(sTime->Seconds)); + + tmpreg = (uint32_t)(( (uint32_t)RTC_ByteToBcd2(sTime->Hours) << RTC_TR_HU_Pos) | \ + ( (uint32_t)RTC_ByteToBcd2(sTime->Minutes) << RTC_TR_MNU_Pos) | \ + ( (uint32_t)RTC_ByteToBcd2(sTime->Seconds)) | \ + (((uint32_t)sTime->TimeFormat) << RTC_TR_PM_Pos)); + } + else + { + if ((hrtc->Instance->CR & RTC_CR_FMT) != 0U) + { + assert_param(IS_RTC_HOUR12(RTC_Bcd2ToByte(sTime->Hours))); + assert_param(IS_RTC_HOURFORMAT12(sTime->TimeFormat)); + } + else + { + sTime->TimeFormat = 0x00U; + assert_param(IS_RTC_HOUR24(RTC_Bcd2ToByte(sTime->Hours))); + } + assert_param(IS_RTC_MINUTES(RTC_Bcd2ToByte(sTime->Minutes))); + assert_param(IS_RTC_SECONDS(RTC_Bcd2ToByte(sTime->Seconds))); + tmpreg = (((uint32_t)(sTime->Hours) << RTC_TR_HU_Pos) | \ + ((uint32_t)(sTime->Minutes) << RTC_TR_MNU_Pos) | \ + ((uint32_t) sTime->Seconds) | \ + ((uint32_t)(sTime->TimeFormat) << RTC_TR_PM_Pos)); + } + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + + if (status == HAL_OK) + { + /* Set the RTC_TR register */ + hrtc->Instance->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); + + /* Clear the bits to be configured (Deprecated. Use HAL_RTC_DST_xxx functions instead) */ + hrtc->Instance->CR &= (uint32_t)~RTC_CR_BKP; + + /* Configure the RTC_CR register (Deprecated. Use HAL_RTC_DST_xxx functions instead) */ + hrtc->Instance->CR |= (uint32_t)(sTime->DayLightSaving | sTime->StoreOperation); + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + } + + if (status == HAL_OK) + { + hrtc->State = HAL_RTC_STATE_READY; + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return status; +} + +/** + * @brief Gets RTC current time. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sTime Pointer to Time structure + * @param Format Specifies the format of the entered parameters. + * This parameter can be one of the following values: + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @note You can use SubSeconds and SecondFraction (sTime structure fields + * returned) to convert SubSeconds value in second fraction ratio with + * time unit following generic formula: + * Second fraction ratio * time_unit = + * [(SecondFraction - SubSeconds) / (SecondFraction + 1)] * time_unit + * This conversion can be performed only if no shift operation is pending + * (ie. SHFP=0) when PREDIV_S >= SS + * @note You must call HAL_RTC_GetDate() after HAL_RTC_GetTime() to unlock the + * values in the higher-order calendar shadow registers to ensure + * consistency between the time and date values. + * Reading RTC current time locks the values in calendar shadow registers + * until current date is read to ensure consistency between the time and + * date values. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_GetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format) +{ + uint32_t tmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + + /* Get subseconds value from the corresponding register */ + sTime->SubSeconds = (uint32_t)(hrtc->Instance->SSR); + + /* Get SecondFraction structure field from the corresponding register field*/ + sTime->SecondFraction = (uint32_t)(hrtc->Instance->PRER & RTC_PRER_PREDIV_S); + + /* Get the TR register */ + tmpreg = (uint32_t)(hrtc->Instance->TR & RTC_TR_RESERVED_MASK); + + /* Fill the structure fields with the read parameters */ + sTime->Hours = (uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> RTC_TR_HU_Pos); + sTime->Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >> RTC_TR_MNU_Pos); + sTime->Seconds = (uint8_t)( tmpreg & (RTC_TR_ST | RTC_TR_SU)); + sTime->TimeFormat = (uint8_t)((tmpreg & (RTC_TR_PM)) >> RTC_TR_PM_Pos); + + /* Check the input parameters format */ + if (Format == RTC_FORMAT_BIN) + { + /* Convert the time structure parameters to Binary format */ + sTime->Hours = (uint8_t)RTC_Bcd2ToByte(sTime->Hours); + sTime->Minutes = (uint8_t)RTC_Bcd2ToByte(sTime->Minutes); + sTime->Seconds = (uint8_t)RTC_Bcd2ToByte(sTime->Seconds); + } + + return HAL_OK; +} + +/** + * @brief Sets RTC current date. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sDate Pointer to date structure + * @param Format specifies the format of the entered parameters. + * This parameter can be one of the following values: + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) +{ + uint32_t datetmpreg = 0U; + HAL_StatusTypeDef status; + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + if ((Format == RTC_FORMAT_BIN) && ((sDate->Month & 0x10U) == 0x10U)) + { + sDate->Month = (uint8_t)((sDate->Month & (uint8_t)~(0x10U)) + (uint8_t)0x0AU); + } + + assert_param(IS_RTC_WEEKDAY(sDate->WeekDay)); + + if (Format == RTC_FORMAT_BIN) + { + assert_param(IS_RTC_YEAR(sDate->Year)); + assert_param(IS_RTC_MONTH(sDate->Month)); + assert_param(IS_RTC_DATE(sDate->Date)); + + datetmpreg = (((uint32_t)RTC_ByteToBcd2(sDate->Year) << RTC_DR_YU_Pos) | \ + ((uint32_t)RTC_ByteToBcd2(sDate->Month) << RTC_DR_MU_Pos) | \ + ((uint32_t)RTC_ByteToBcd2(sDate->Date)) | \ + ((uint32_t)sDate->WeekDay << RTC_DR_WDU_Pos)); + } + else + { + assert_param(IS_RTC_YEAR(RTC_Bcd2ToByte(sDate->Year))); + assert_param(IS_RTC_MONTH(RTC_Bcd2ToByte(sDate->Month))); + assert_param(IS_RTC_DATE(RTC_Bcd2ToByte(sDate->Date))); + + datetmpreg = ((((uint32_t)sDate->Year) << RTC_DR_YU_Pos) | \ + (((uint32_t)sDate->Month) << RTC_DR_MU_Pos) | \ + ((uint32_t) sDate->Date) | \ + (((uint32_t)sDate->WeekDay) << RTC_DR_WDU_Pos)); + } + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + + if (status == HAL_OK) + { + /* Set the RTC_DR register */ + hrtc->Instance->DR = (uint32_t)(datetmpreg & RTC_DR_RESERVED_MASK); + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + } + + if (status == HAL_OK) + { + hrtc->State = HAL_RTC_STATE_READY; + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return status; +} + +/** + * @brief Gets RTC current date. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sDate Pointer to Date structure + * @param Format Specifies the format of the entered parameters. + * This parameter can be one of the following values: + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @note You must call HAL_RTC_GetDate() after HAL_RTC_GetTime() to unlock the + * values in the higher-order calendar shadow registers to ensure + * consistency between the time and date values. + * Reading RTC current time locks the values in calendar shadow registers + * until current date is read to ensure consistency between the time and + * date values. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_GetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format) +{ + uint32_t datetmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + + /* Get the DR register */ + datetmpreg = (uint32_t)(hrtc->Instance->DR & RTC_DR_RESERVED_MASK); + + /* Fill the structure fields with the read parameters */ + sDate->Year = (uint8_t)((datetmpreg & (RTC_DR_YT | RTC_DR_YU)) >> RTC_DR_YU_Pos); + sDate->Month = (uint8_t)((datetmpreg & (RTC_DR_MT | RTC_DR_MU)) >> RTC_DR_MU_Pos); + sDate->Date = (uint8_t) (datetmpreg & (RTC_DR_DT | RTC_DR_DU)); + sDate->WeekDay = (uint8_t)((datetmpreg & (RTC_DR_WDU)) >> RTC_DR_WDU_Pos); + + /* Check the input parameters format */ + if (Format == RTC_FORMAT_BIN) + { + /* Convert the date structure parameters to Binary format */ + sDate->Year = (uint8_t)RTC_Bcd2ToByte(sDate->Year); + sDate->Month = (uint8_t)RTC_Bcd2ToByte(sDate->Month); + sDate->Date = (uint8_t)RTC_Bcd2ToByte(sDate->Date); + } + return HAL_OK; +} + +/** + * @} + */ + +/** @defgroup RTC_Exported_Functions_Group3 RTC Alarm functions + * @brief RTC Alarm functions + * +@verbatim + =============================================================================== + ##### RTC Alarm functions ##### + =============================================================================== + + [..] This section provides functions allowing to configure Alarm feature + +@endverbatim + * @{ + */ +/** + * @brief Sets the specified RTC Alarm. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sAlarm Pointer to Alarm structure + * @param Format Specifies the format of the entered parameters. + * This parameter can be one of the following values: + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @note The Alarm register can only be written when the corresponding Alarm + * is disabled (Use the HAL_RTC_DeactivateAlarm()). + * @note The HAL_RTC_SetTime() must be called before enabling the Alarm feature. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_SetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format) +{ + uint32_t tickstart = 0U; + uint32_t tmpreg = 0U; + uint32_t subsecondtmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + assert_param(IS_RTC_ALARM(sAlarm->Alarm)); + assert_param(IS_RTC_ALARM_MASK(sAlarm->AlarmMask)); + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_SEL(sAlarm->AlarmDateWeekDaySel)); + assert_param(IS_RTC_ALARM_SUB_SECOND_VALUE(sAlarm->AlarmTime.SubSeconds)); + assert_param(IS_RTC_ALARM_SUB_SECOND_MASK(sAlarm->AlarmSubSecondMask)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + /* Change RTC state to BUSY */ + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Check the data format (binary or BCD) and store the Alarm time and date + configuration accordingly */ + if (Format == RTC_FORMAT_BIN) + { + if ((hrtc->Instance->CR & RTC_CR_FMT) != 0U) + { + assert_param(IS_RTC_HOUR12(sAlarm->AlarmTime.Hours)); + assert_param(IS_RTC_HOURFORMAT12(sAlarm->AlarmTime.TimeFormat)); + } + else + { + sAlarm->AlarmTime.TimeFormat = 0x00U; + assert_param(IS_RTC_HOUR24(sAlarm->AlarmTime.Hours)); + } + assert_param(IS_RTC_MINUTES(sAlarm->AlarmTime.Minutes)); + assert_param(IS_RTC_SECONDS(sAlarm->AlarmTime.Seconds)); + + if (sAlarm->AlarmDateWeekDaySel == RTC_ALARMDATEWEEKDAYSEL_DATE) + { + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_DATE(sAlarm->AlarmDateWeekDay)); + } + else + { + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(sAlarm->AlarmDateWeekDay)); + } + + tmpreg = (((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Hours) << RTC_ALRMAR_HU_Pos) | \ + ((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Minutes) << RTC_ALRMAR_MNU_Pos) | \ + ((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Seconds)) | \ + ((uint32_t)(sAlarm->AlarmTime.TimeFormat) << RTC_ALRMAR_PM_Pos) | \ + ((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmDateWeekDay) << RTC_ALRMAR_DU_Pos) | \ + ((uint32_t)sAlarm->AlarmDateWeekDaySel) | \ + ((uint32_t)sAlarm->AlarmMask)); + } + else + { + if ((hrtc->Instance->CR & RTC_CR_FMT) != 0U) + { + assert_param(IS_RTC_HOUR12(RTC_Bcd2ToByte(sAlarm->AlarmTime.Hours))); + assert_param(IS_RTC_HOURFORMAT12(sAlarm->AlarmTime.TimeFormat)); + } + else + { + sAlarm->AlarmTime.TimeFormat = 0x00U; + assert_param(IS_RTC_HOUR24(RTC_Bcd2ToByte(sAlarm->AlarmTime.Hours))); + } + + assert_param(IS_RTC_MINUTES(RTC_Bcd2ToByte(sAlarm->AlarmTime.Minutes))); + assert_param(IS_RTC_SECONDS(RTC_Bcd2ToByte(sAlarm->AlarmTime.Seconds))); + + if (sAlarm->AlarmDateWeekDaySel == RTC_ALARMDATEWEEKDAYSEL_DATE) + { + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_DATE(RTC_Bcd2ToByte(sAlarm->AlarmDateWeekDay))); + } + else + { + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(RTC_Bcd2ToByte(sAlarm->AlarmDateWeekDay))); + } + + tmpreg = (((uint32_t)(sAlarm->AlarmTime.Hours) << RTC_ALRMAR_HU_Pos) | \ + ((uint32_t)(sAlarm->AlarmTime.Minutes) << RTC_ALRMAR_MNU_Pos) | \ + ((uint32_t) sAlarm->AlarmTime.Seconds) | \ + ((uint32_t)(sAlarm->AlarmTime.TimeFormat) << RTC_ALRMAR_PM_Pos) | \ + ((uint32_t)(sAlarm->AlarmDateWeekDay) << RTC_ALRMAR_DU_Pos) | \ + ((uint32_t) sAlarm->AlarmDateWeekDaySel) | \ + ((uint32_t) sAlarm->AlarmMask)); + } + + /* Store the Alarm subseconds configuration */ + subsecondtmpreg = (uint32_t)((uint32_t)(sAlarm->AlarmTime.SubSeconds) | \ + (uint32_t)(sAlarm->AlarmSubSecondMask)); + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + if (sAlarm->Alarm == RTC_ALARM_A) + { + /* Disable Alarm A */ + __HAL_RTC_ALARMA_DISABLE(hrtc); + + /* In case interrupt mode is used, the interrupt source must be disabled */ + __HAL_RTC_ALARM_DISABLE_IT(hrtc, RTC_IT_ALRA); + + /* Clear Alarm A flag */ + __HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRAF); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC ALRAWF flag is set and if timeout is reached exit */ + while (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAWF) == 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + + /* Configure Alarm A register */ + hrtc->Instance->ALRMAR = (uint32_t)tmpreg; + /* Configure Alarm A Subseconds register */ + hrtc->Instance->ALRMASSR = subsecondtmpreg; + /* Enable Alarm A */ + __HAL_RTC_ALARMA_ENABLE(hrtc); + } + else + { + /* Disable Alarm B */ + __HAL_RTC_ALARMB_DISABLE(hrtc); + + /* In case interrupt mode is used, the interrupt source must be disabled */ + __HAL_RTC_ALARM_DISABLE_IT(hrtc, RTC_IT_ALRB); + + /* Clear Alarm B flag */ + __HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRBF); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC ALRBWF flag is set and if timeout is reached exit */ + while (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBWF) == 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + + /* Configure Alarm B register */ + hrtc->Instance->ALRMBR = (uint32_t)tmpreg; + /* Configure Alarm B Subseconds register */ + hrtc->Instance->ALRMBSSR = subsecondtmpreg; + /* Enable Alarm B */ + __HAL_RTC_ALARMB_ENABLE(hrtc); + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state back to READY */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Sets the specified RTC Alarm with Interrupt. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sAlarm Pointer to Alarm structure + * @param Format Specifies the format of the entered parameters. + * This parameter can be one of the following values: + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @note The Alarm register can only be written when the corresponding Alarm + * is disabled (Use the HAL_RTC_DeactivateAlarm()). + * @note The HAL_RTC_SetTime() must be called before enabling the Alarm feature. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_SetAlarm_IT(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format) +{ + __IO uint32_t count = RTC_TIMEOUT_VALUE * (SystemCoreClock / 32U / 1000U); + uint32_t tmpreg = 0U; + uint32_t subsecondtmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + assert_param(IS_RTC_ALARM(sAlarm->Alarm)); + assert_param(IS_RTC_ALARM_MASK(sAlarm->AlarmMask)); + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_SEL(sAlarm->AlarmDateWeekDaySel)); + assert_param(IS_RTC_ALARM_SUB_SECOND_VALUE(sAlarm->AlarmTime.SubSeconds)); + assert_param(IS_RTC_ALARM_SUB_SECOND_MASK(sAlarm->AlarmSubSecondMask)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + /* Change RTC state to BUSY */ + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Check the data format (binary or BCD) and store the Alarm time and date + configuration accordingly */ + if (Format == RTC_FORMAT_BIN) + { + if ((hrtc->Instance->CR & RTC_CR_FMT) != 0U) + { + assert_param(IS_RTC_HOUR12(sAlarm->AlarmTime.Hours)); + assert_param(IS_RTC_HOURFORMAT12(sAlarm->AlarmTime.TimeFormat)); + } + else + { + sAlarm->AlarmTime.TimeFormat = 0x00U; + assert_param(IS_RTC_HOUR24(sAlarm->AlarmTime.Hours)); + } + assert_param(IS_RTC_MINUTES(sAlarm->AlarmTime.Minutes)); + assert_param(IS_RTC_SECONDS(sAlarm->AlarmTime.Seconds)); + + if (sAlarm->AlarmDateWeekDaySel == RTC_ALARMDATEWEEKDAYSEL_DATE) + { + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_DATE(sAlarm->AlarmDateWeekDay)); + } + else + { + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(sAlarm->AlarmDateWeekDay)); + } + + tmpreg = (((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Hours) << RTC_ALRMAR_HU_Pos) | \ + ((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Minutes) << RTC_ALRMAR_MNU_Pos) | \ + ((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmTime.Seconds)) | \ + ((uint32_t)(sAlarm->AlarmTime.TimeFormat) << RTC_ALRMAR_PM_Pos) | \ + ((uint32_t)RTC_ByteToBcd2(sAlarm->AlarmDateWeekDay) << RTC_ALRMAR_DU_Pos) | \ + ((uint32_t)sAlarm->AlarmDateWeekDaySel) | \ + ((uint32_t)sAlarm->AlarmMask)); + } + else + { + if ((hrtc->Instance->CR & RTC_CR_FMT) != 0U) + { + assert_param(IS_RTC_HOUR12(RTC_Bcd2ToByte(sAlarm->AlarmTime.Hours))); + assert_param(IS_RTC_HOURFORMAT12(sAlarm->AlarmTime.TimeFormat)); + } + else + { + sAlarm->AlarmTime.TimeFormat = 0x00U; + assert_param(IS_RTC_HOUR24(RTC_Bcd2ToByte(sAlarm->AlarmTime.Hours))); + } + + assert_param(IS_RTC_MINUTES(RTC_Bcd2ToByte(sAlarm->AlarmTime.Minutes))); + assert_param(IS_RTC_SECONDS(RTC_Bcd2ToByte(sAlarm->AlarmTime.Seconds))); + + if (sAlarm->AlarmDateWeekDaySel == RTC_ALARMDATEWEEKDAYSEL_DATE) + { + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_DATE(RTC_Bcd2ToByte(sAlarm->AlarmDateWeekDay))); + } + else + { + assert_param(IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(RTC_Bcd2ToByte(sAlarm->AlarmDateWeekDay))); + } + + tmpreg = (((uint32_t)(sAlarm->AlarmTime.Hours) << RTC_ALRMAR_HU_Pos) | \ + ((uint32_t)(sAlarm->AlarmTime.Minutes) << RTC_ALRMAR_MNU_Pos) | \ + ((uint32_t) sAlarm->AlarmTime.Seconds) | \ + ((uint32_t)(sAlarm->AlarmTime.TimeFormat) << RTC_ALRMAR_PM_Pos) | \ + ((uint32_t)(sAlarm->AlarmDateWeekDay) << RTC_ALRMAR_DU_Pos) | \ + ((uint32_t) sAlarm->AlarmDateWeekDaySel) | \ + ((uint32_t) sAlarm->AlarmMask)); + } + + /* Store the Alarm subseconds configuration */ + subsecondtmpreg = (uint32_t)((uint32_t)(sAlarm->AlarmTime.SubSeconds) | \ + (uint32_t)(sAlarm->AlarmSubSecondMask)); + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + if (sAlarm->Alarm == RTC_ALARM_A) + { + /* Disable Alarm A */ + __HAL_RTC_ALARMA_DISABLE(hrtc); + + /* Clear Alarm A flag */ + __HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRAF); + + /* Wait till RTC ALRAWF flag is set and if timeout is reached exit */ + do + { + count = count - 1U; + if (count == 0U) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } while (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAWF) == 0U); + + /* Configure Alarm A register */ + hrtc->Instance->ALRMAR = (uint32_t)tmpreg; + /* Configure Alarm A Subseconds register */ + hrtc->Instance->ALRMASSR = subsecondtmpreg; + /* Enable Alarm A */ + __HAL_RTC_ALARMA_ENABLE(hrtc); + /* Enable Alarm A interrupt */ + __HAL_RTC_ALARM_ENABLE_IT(hrtc, RTC_IT_ALRA); + } + else + { + /* Disable Alarm B */ + __HAL_RTC_ALARMB_DISABLE(hrtc); + + /* Clear Alarm B flag */ + __HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRBF); + + /* Reload the counter */ + count = RTC_TIMEOUT_VALUE * (SystemCoreClock / 32U / 1000U); + + /* Wait till RTC ALRBWF flag is set and if timeout is reached exit */ + do + { + count = count - 1U; + if (count == 0U) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } while (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBWF) == 0U); + + /* Configure Alarm B register */ + hrtc->Instance->ALRMBR = (uint32_t)tmpreg; + /* Configure Alarm B Subseconds register */ + hrtc->Instance->ALRMBSSR = subsecondtmpreg; + /* Enable Alarm B */ + __HAL_RTC_ALARMB_ENABLE(hrtc); + /* Enable Alarm B interrupt */ + __HAL_RTC_ALARM_ENABLE_IT(hrtc, RTC_IT_ALRB); + } + + /* Enable and configure the EXTI line associated to the RTC Alarm interrupt */ + __HAL_RTC_ALARM_EXTI_ENABLE_IT(); + __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE(); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state back to READY */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Deactivates the specified RTC Alarm. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Alarm Specifies the Alarm. + * This parameter can be one of the following values: + * @arg RTC_ALARM_A: Alarm A + * @arg RTC_ALARM_B: Alarm B + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_DeactivateAlarm(RTC_HandleTypeDef *hrtc, uint32_t Alarm) +{ + uint32_t tickstart = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_ALARM(Alarm)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + if (Alarm == RTC_ALARM_A) + { + /* Disable Alarm A */ + __HAL_RTC_ALARMA_DISABLE(hrtc); + + /* In case interrupt mode is used, the interrupt source must be disabled */ + __HAL_RTC_ALARM_DISABLE_IT(hrtc, RTC_IT_ALRA); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC ALRAWF flag is set and if timeout is reached exit */ + while (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAWF) == 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + } + else + { + /* Disable Alarm B */ + __HAL_RTC_ALARMB_DISABLE(hrtc); + + /* In case interrupt mode is used, the interrupt source must be disabled */ + __HAL_RTC_ALARM_DISABLE_IT(hrtc, RTC_IT_ALRB); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC ALRBWF flag is set and if timeout is reached exit */ + while (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBWF) == 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Gets the RTC Alarm value and masks. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sAlarm Pointer to Date structure + * @param Alarm Specifies the Alarm. + * This parameter can be one of the following values: + * @arg RTC_ALARM_A: Alarm A + * @arg RTC_ALARM_B: Alarm B + * @param Format Specifies the format of the entered parameters. + * This parameter can be one of the following values: + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_GetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format) +{ + uint32_t tmpreg = 0U; + uint32_t subsecondtmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + assert_param(IS_RTC_ALARM(Alarm)); + + if (Alarm == RTC_ALARM_A) + { + sAlarm->Alarm = RTC_ALARM_A; + + tmpreg = (uint32_t)(hrtc->Instance->ALRMAR); + subsecondtmpreg = (uint32_t)((hrtc->Instance->ALRMASSR) & RTC_ALRMASSR_SS); + } + else + { + sAlarm->Alarm = RTC_ALARM_B; + + tmpreg = (uint32_t)(hrtc->Instance->ALRMBR); + subsecondtmpreg = (uint32_t)((hrtc->Instance->ALRMBSSR) & RTC_ALRMBSSR_SS); + } + + /* Fill the structure with the read parameters */ + sAlarm->AlarmTime.Hours = (uint8_t) ((tmpreg & (RTC_ALRMAR_HT | RTC_ALRMAR_HU)) >> RTC_ALRMAR_HU_Pos); + sAlarm->AlarmTime.Minutes = (uint8_t) ((tmpreg & (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU)) >> RTC_ALRMAR_MNU_Pos); + sAlarm->AlarmTime.Seconds = (uint8_t) ( tmpreg & (RTC_ALRMAR_ST | RTC_ALRMAR_SU)); + sAlarm->AlarmTime.TimeFormat = (uint8_t) ((tmpreg & RTC_ALRMAR_PM) >> RTC_TR_PM_Pos); + sAlarm->AlarmTime.SubSeconds = (uint32_t) subsecondtmpreg; + sAlarm->AlarmDateWeekDay = (uint8_t) ((tmpreg & (RTC_ALRMAR_DT | RTC_ALRMAR_DU)) >> RTC_ALRMAR_DU_Pos); + sAlarm->AlarmDateWeekDaySel = (uint32_t) (tmpreg & RTC_ALRMAR_WDSEL); + sAlarm->AlarmMask = (uint32_t) (tmpreg & RTC_ALARMMASK_ALL); + + if (Format == RTC_FORMAT_BIN) + { + sAlarm->AlarmTime.Hours = RTC_Bcd2ToByte(sAlarm->AlarmTime.Hours); + sAlarm->AlarmTime.Minutes = RTC_Bcd2ToByte(sAlarm->AlarmTime.Minutes); + sAlarm->AlarmTime.Seconds = RTC_Bcd2ToByte(sAlarm->AlarmTime.Seconds); + sAlarm->AlarmDateWeekDay = RTC_Bcd2ToByte(sAlarm->AlarmDateWeekDay); + } + + return HAL_OK; +} + +/** + * @brief Handles Alarm interrupt request. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +void HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc) +{ + /* Clear the EXTI flag associated to the RTC Alarm interrupt */ + __HAL_RTC_ALARM_EXTI_CLEAR_FLAG(); + + /* Get the Alarm A interrupt source enable status */ + if (__HAL_RTC_ALARM_GET_IT_SOURCE(hrtc, RTC_IT_ALRA) != 0U) + { + /* Get the pending status of the Alarm A Interrupt */ + if (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAF) != 0U) + { + /* Clear the Alarm A interrupt pending bit */ + __HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRAF); + + /* Alarm A callback */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + hrtc->AlarmAEventCallback(hrtc); +#else + HAL_RTC_AlarmAEventCallback(hrtc); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + } + } + + /* Get the Alarm B interrupt source enable status */ + if (__HAL_RTC_ALARM_GET_IT_SOURCE(hrtc, RTC_IT_ALRB) != 0U) + { + /* Get the pending status of the Alarm B Interrupt */ + if (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBF) != 0U) + { + /* Clear the Alarm B interrupt pending bit */ + __HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRBF); + + /* Alarm B callback */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + hrtc->AlarmBEventCallback(hrtc); +#else + HAL_RTCEx_AlarmBEventCallback(hrtc); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + } + } + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; +} + +/** + * @brief Alarm A callback. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTC_AlarmAEventCallback could be implemented in the user file + */ +} + +/** + * @brief Handles Alarm A Polling request. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_PollForAlarmAEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout) +{ + uint32_t tickstart = 0U; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC ALRAF flag is set and if timeout is reached exit */ + while (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRAF) == 0U) + { + if (Timeout != HAL_MAX_DELAY) + { + if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout)) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + } + + /* Clear the Alarm flag */ + __HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRAF); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + return HAL_OK; +} + +/** + * @} + */ + +/** @defgroup RTC_Exported_Functions_Group4 Peripheral Control functions + * @brief Peripheral Control functions + * +@verbatim + =============================================================================== + ##### Peripheral Control functions ##### + =============================================================================== + [..] + This subsection provides functions allowing to + (+) Wait for RTC Time and Date Synchronization + (+) Manage RTC Summer or Winter time change + +@endverbatim + * @{ + */ + +/** + * @brief Waits until the RTC Time and Date registers (RTC_TR and RTC_DR) are + * synchronized with RTC APB clock. + * @note The RTC Resynchronization mode is write protected, use the + * __HAL_RTC_WRITEPROTECTION_DISABLE() before calling this function. + * @note To read the calendar through the shadow registers after Calendar + * initialization, calendar update or after wakeup from low power modes + * the software must first clear the RSF flag. + * The software must then wait until it is set again before reading + * the calendar, which means that the calendar registers have been + * correctly copied into the RTC_TR and RTC_DR shadow registers. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTC_WaitForSynchro(RTC_HandleTypeDef *hrtc) +{ + uint32_t tickstart = 0U; + + /* Clear RSF flag, keep reserved bits at reset values (setting other flags has no effect) */ + hrtc->Instance->ISR = ((uint32_t)(RTC_RSF_MASK & RTC_ISR_RESERVED_MASK)); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait the registers to be synchronised */ + while ((hrtc->Instance->ISR & RTC_ISR_RSF) == 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + return HAL_TIMEOUT; + } + } + + return HAL_OK; +} + +/** + * @brief Daylight Saving Time, adds one hour to the calendar in one + * single operation without going through the initialization procedure. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +void HAL_RTC_DST_Add1Hour(RTC_HandleTypeDef *hrtc) +{ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + SET_BIT(hrtc->Instance->CR, RTC_CR_ADD1H); + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); +} + +/** + * @brief Daylight Saving Time, subtracts one hour from the calendar in one + * single operation without going through the initialization procedure. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +void HAL_RTC_DST_Sub1Hour(RTC_HandleTypeDef *hrtc) +{ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + SET_BIT(hrtc->Instance->CR, RTC_CR_SUB1H); + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); +} + +/** + * @brief Daylight Saving Time, sets the store operation bit. + * @note It can be used by the software in order to memorize the DST status. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +void HAL_RTC_DST_SetStoreOperation(RTC_HandleTypeDef *hrtc) +{ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + SET_BIT(hrtc->Instance->CR, RTC_CR_BKP); + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); +} + +/** + * @brief Daylight Saving Time, clears the store operation bit. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +void HAL_RTC_DST_ClearStoreOperation(RTC_HandleTypeDef *hrtc) +{ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + CLEAR_BIT(hrtc->Instance->CR, RTC_CR_BKP); + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); +} + +/** + * @brief Daylight Saving Time, reads the store operation bit. + * @param hrtc RTC handle + * @retval operation see RTC_StoreOperation_Definitions + */ +uint32_t HAL_RTC_DST_ReadStoreOperation(RTC_HandleTypeDef *hrtc) +{ + return READ_BIT(hrtc->Instance->CR, RTC_CR_BKP); +} + +/** + * @} + */ + +/** @defgroup RTC_Exported_Functions_Group5 Peripheral State functions + * @brief Peripheral State functions + * +@verbatim + =============================================================================== + ##### Peripheral State functions ##### + =============================================================================== + [..] + This subsection provides functions allowing to + (+) Get RTC state + +@endverbatim + * @{ + */ +/** + * @brief Returns the RTC state. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL state + */ +HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc) +{ + return hrtc->State; +} + +/** + * @} + */ + + +/** + * @} + */ + +/** @addtogroup RTC_Private_Functions + * @{ + */ + +/** + * @brief Enters the RTC Initialization mode. + * @note The RTC Initialization mode is write protected, use the + * __HAL_RTC_WRITEPROTECTION_DISABLE() before calling this function. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc) +{ + uint32_t tickstart = 0U; + HAL_StatusTypeDef status = HAL_OK; + + /* Check that Initialization mode is not already set */ + if (READ_BIT(hrtc->Instance->ISR, RTC_ISR_INITF) == 0U) + { + /* Set INIT bit to enter Initialization mode */ + SET_BIT(hrtc->Instance->ISR, RTC_ISR_INIT); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC is in INIT state and if timeout is reached exit */ + while ((READ_BIT(hrtc->Instance->ISR, RTC_ISR_INITF) == 0U) && (status != HAL_ERROR)) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Set RTC state */ + hrtc->State = HAL_RTC_STATE_ERROR; + status = HAL_ERROR; + } + } + } + + return status; +} + +/** + * @brief Exits the RTC Initialization mode. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef RTC_ExitInitMode(RTC_HandleTypeDef *hrtc) +{ + HAL_StatusTypeDef status = HAL_OK; + + /* Clear INIT bit to exit Initialization mode */ + CLEAR_BIT(hrtc->Instance->ISR, RTC_ISR_INIT); + + /* If CR_BYPSHAD bit = 0, wait for synchro */ + if (READ_BIT(hrtc->Instance->CR, RTC_CR_BYPSHAD) == 0U) + { + if (HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) + { + /* Set RTC state */ + hrtc->State = HAL_RTC_STATE_ERROR; + status = HAL_ERROR; + } + } + + return status; +} + +/** + * @brief Converts a 2-digit number from decimal to BCD format. + * @param number decimal-formatted number (from 0 to 99) to be converted + * @retval Converted byte + */ +uint8_t RTC_ByteToBcd2(uint8_t number) +{ + uint32_t bcdhigh = 0U; + + while (number >= 10U) + { + bcdhigh++; + number -= 10U; + } + + return ((uint8_t)(bcdhigh << 4U) | number); +} + +/** + * @brief Converts a 2-digit number from BCD to decimal format. + * @param number BCD-formatted number (from 00 to 99) to be converted + * @retval Converted word + */ +uint8_t RTC_Bcd2ToByte(uint8_t number) +{ + uint32_t tens = 0U; + tens = (((uint32_t)number & 0xF0U) >> 4U) * 10U; + return (uint8_t)(tens + ((uint32_t)number & 0x0FU)); +} + +/** + * @} + */ + +#endif /* HAL_RTC_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c new file mode 100644 index 0000000..c7944f3 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rtc_ex.c @@ -0,0 +1,2104 @@ +/** + ****************************************************************************** + * @file stm32wbxx_hal_rtc_ex.c + * @author MCD Application Team + * @brief Extended RTC HAL module driver. + * This file provides firmware functions to manage the following + * functionalities of the Real-Time Clock (RTC) Extended peripheral: + * + RTC Timestamp functions + * + RTC Tamper functions + * + RTC Wakeup functions + * + Extended Control functions + * + Extended RTC features functions + * + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + @verbatim + ============================================================================== + ##### How to use this driver ##### + ============================================================================== + [..] + (+) Enable the RTC domain access. + (+) Configure the RTC Prescaler (Asynchronous and Synchronous) and RTC hour + format using the HAL_RTC_Init() function. + + *** RTC Wakeup configuration *** + ================================ + [..] + (+) To configure the RTC Wakeup Clock source and Counter use the + HAL_RTCEx_SetWakeUpTimer() function. + You can also configure the RTC Wakeup timer in interrupt mode using the + HAL_RTCEx_SetWakeUpTimer_IT() function. + (+) To read the RTC Wakeup Counter register, use the HAL_RTCEx_GetWakeUpTimer() + function. + + *** Timestamp configuration *** + =============================== + [..] + (+) To configure the RTC Timestamp use the HAL_RTCEx_SetTimeStamp() function. + You can also configure the RTC Timestamp with interrupt mode using the + HAL_RTCEx_SetTimeStamp_IT() function. + (+) To read the RTC Timestamp Time and Date register, use the + HAL_RTCEx_GetTimeStamp() function. + (+) The Timestamp alternate function is mapped to RTC_AF1 (PC13). + + *** Internal Timestamp configuration *** + =============================== + [..] + (+) To enable the RTC internal Timestamp use the HAL_RTCEx_SetInternalTimeStamp() + function. + (+) To read the RTC Timestamp Time and Date register, use the HAL_RTCEx_GetTimeStamp() + function. + + *** Tamper configuration *** + ============================ + [..] + (+) To enable the RTC Tamper and configure the Tamper filter count, trigger + Edge or Level according to the Tamper filter value (if equal to 0 Edge + else Level), sampling frequency, NoErase, MaskFlag, precharge or + discharge and Pull-UP use the HAL_RTCEx_SetTamper() function. + You can configure RTC Tamper in interrupt mode using HAL_RTCEx_SetTamper_IT() + function. + (+) The default configuration of the Tamper erases the backup registers. + To avoid this, enable the NoErase field on the RTC_TAMPCR register. + (+) The TAMPER1 alternate function is mapped to RTC_AF1 (PC13). + (+) The TAMPER2 alternate function is mapped to RTC_AF2 (PA0). + (+) The TAMPER3 alternate function is mapped to RTC_AF3 (PC12). + + *** Backup Data Registers configuration *** + =========================================== + [..] + (+) To write to the RTC Backup Data registers, use the HAL_RTCEx_BKUPWrite() + function. + (+) To read the RTC Backup Data registers, use the HAL_RTCEx_BKUPRead() + function. + + *** Smooth Digital Calibration configuration *** + ================================================ + [..] + (+) RTC frequency can be digitally calibrated with a resolution of about + 0.954 ppm with a range from -487.1 ppm to +488.5 ppm. + The correction of the frequency is performed using a series of small + adjustments (adding and/or subtracting individual RTCCLK pulses). + (+) The smooth digital calibration is performed during a cycle of about 2^20 + RTCCLK pulses (or 32 seconds) when the input frequency is 32,768 Hz. + This cycle is maintained by a 20-bit counter clocked by RTCCLK. + (+) The smooth calibration register (RTC_CALR) specifies the number of RTCCLK + clock cycles to be masked during the 32-second cycle. + (+) To configure the RTC Smooth Digital Calibration value and the corresponding + calibration cycle period (32s,16s and 8s) use the HAL_RTCEx_SetSmoothCalib() + function. + + *** Outputs configuration *** + ============================= + [..] The RTC has 2 different outputs: + (+) RTC_ALARM: this output is used to manage the RTC alarms (Alarm A and Alarm B) + and WaKeUp signals. + To output the selected RTC signal, use the HAL_RTC_Init() function. + (+) RTC_CALIB: this output is 512Hz signal or 1Hz. + To enable the RTC_CALIB, use the HAL_RTCEx_SetCalibrationOutPut() function. + (+) Two pins can be used as RTC_ALARM or RTC_CALIB output, selected through + bit OUT_RMP of the RTC_OR register: + (+) When the RTC_CALIB or RTC_ALARM output is selected, the RTC_OUT pin is + automatically configured in output alternate function. + + @endverbatim + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_hal.h" + +/** @addtogroup STM32WBxx_HAL_Driver + * @{ + */ + +/** @defgroup RTCEx RTCEx + * @brief RTC Extended HAL module driver + * @{ + */ + +#ifdef HAL_RTC_MODULE_ENABLED + +/* Private typedef -----------------------------------------------------------*/ +/* Private define ------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Exported functions --------------------------------------------------------*/ + +/** @defgroup RTCEx_Exported_Functions RTCEx Exported Functions + * @{ + */ + +/** @defgroup RTCEx_Exported_Functions_Group1 RTC Timestamp and Tamper functions + * @brief RTC Timestamp and Tamper functions + * +@verbatim + =============================================================================== + ##### RTC Timestamp and Tamper functions ##### + =============================================================================== + + [..] This section provides functions allowing to configure Timestamp feature + +@endverbatim + * @{ + */ + +/** + * @brief Sets Timestamp. + * @note This API must be called before enabling the Timestamp feature. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param RTC_TimeStampEdge Specifies the pin edge on which the Timestamp is + * activated. + * This parameter can be one of the following values: + * @arg RTC_TIMESTAMPEDGE_RISING: the Timestamp event occurs on + * the rising edge of the related pin. + * @arg RTC_TIMESTAMPEDGE_FALLING: the Timestamp event occurs on + * the falling edge of the related pin. + * @param RTC_TimeStampPin Specifies the RTC Timestamp Pin. + * This parameter can be one of the following values: + * @arg RTC_TIMESTAMPPIN_DEFAULT: PC13 is selected as RTC Timestamp Pin. + * @note Although unused, parameter RTC_TimeStampPin has been kept for portability + * reasons. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t RTC_TimeStampEdge, uint32_t RTC_TimeStampPin) +{ + uint32_t tmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_TIMESTAMP_EDGE(RTC_TimeStampEdge)); + assert_param(IS_RTC_TIMESTAMP_PIN(RTC_TimeStampPin)); + + /* Prevent compilation warning due to unused argument(s) if assert_param check + is disabled */ + UNUSED(RTC_TimeStampPin); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + /* Change RTC state to BUSY */ + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Get the RTC_CR register and clear the bits to be configured */ + tmpreg = (uint32_t)(hrtc->Instance->CR & (uint32_t)~(RTC_CR_TSEDGE | RTC_CR_TSE)); + + /* Configure the Timestamp TSEDGE bit */ + tmpreg |= RTC_TimeStampEdge; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Copy the desired configuration into the CR register */ + hrtc->Instance->CR = (uint32_t)tmpreg; + + /* Clear RTC Timestamp flag */ + __HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSF); + + /* Clear RTC Timestamp overrun Flag */ + __HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSOVF); + + /* Enable the Timestamp saving */ + __HAL_RTC_TIMESTAMP_ENABLE(hrtc); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state back to READY */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Sets Timestamp with Interrupt. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @note This API must be called before enabling the Timestamp feature. + * @param RTC_TimeStampEdge Specifies the pin edge on which the Timestamp is + * activated. + * This parameter can be one of the following values: + * @arg RTC_TIMESTAMPEDGE_RISING: the Timestamp event occurs on + * the rising edge of the related pin. + * @arg RTC_TIMESTAMPEDGE_FALLING: the Timestamp event occurs on + * the falling edge of the related pin. + * @param RTC_TimeStampPin Specifies the RTC Timestamp Pin. + * This parameter can be one of the following values: + * @arg RTC_TIMESTAMPPIN_DEFAULT: PC13 is selected as RTC Timestamp Pin. + * @note Although unused, parameter RTC_TimeStampPin has been kept for portability + * reasons. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t RTC_TimeStampEdge, uint32_t RTC_TimeStampPin) +{ + uint32_t tmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_TIMESTAMP_EDGE(RTC_TimeStampEdge)); + assert_param(IS_RTC_TIMESTAMP_PIN(RTC_TimeStampPin)); + + /* Prevent compilation warning due to unused argument(s) if assert_param check + is disabled */ + UNUSED(RTC_TimeStampPin); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + /* Change RTC state to BUSY */ + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Get the RTC_CR register and clear the bits to be configured */ + tmpreg = (uint32_t)(hrtc->Instance->CR & (uint32_t)~(RTC_CR_TSEDGE | RTC_CR_TSE)); + + /* Configure the Timestamp TSEDGE bit */ + tmpreg |= RTC_TimeStampEdge; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Copy the desired configuration into the CR register */ + hrtc->Instance->CR = (uint32_t)tmpreg; + + /* Clear RTC Timestamp flag */ + __HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSF); + + /* Clear RTC Timestamp overrun Flag */ + __HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSOVF); + + /* Enable the Timestamp saving */ + __HAL_RTC_TIMESTAMP_ENABLE(hrtc); + + /* Enable IT Timestamp */ + __HAL_RTC_TIMESTAMP_ENABLE_IT(hrtc, RTC_IT_TS); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Enable and configure the EXTI line associated to the RTC Timestamp and Tamper interrupts */ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT(); + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE(); + + /* Change RTC state back to READY */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Deactivates Timestamp. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_DeactivateTimeStamp(RTC_HandleTypeDef *hrtc) +{ + uint32_t tmpreg = 0U; + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* In case interrupt mode is used, the interrupt source must disabled */ + __HAL_RTC_TIMESTAMP_DISABLE_IT(hrtc, RTC_IT_TS); + + /* Get the RTC_CR register and clear the bits to be configured */ + tmpreg = (uint32_t)(hrtc->Instance->CR & (uint32_t)~(RTC_CR_TSEDGE | RTC_CR_TSE)); + + /* Configure the Timestamp TSEDGE and Enable bits */ + hrtc->Instance->CR = (uint32_t)tmpreg; + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Sets Internal Timestamp. + * @note This API must be called before enabling the internal Timestamp feature. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetInternalTimeStamp(RTC_HandleTypeDef *hrtc) +{ + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Clear the internal Timestamp flag */ + __HAL_RTC_INTERNAL_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_ITSF); + + /* Configure the internal Timestamp Enable bits */ + __HAL_RTC_INTERNAL_TIMESTAMP_ENABLE(hrtc); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Deactivates internal Timestamp. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_DeactivateInternalTimeStamp(RTC_HandleTypeDef *hrtc) +{ + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Configure the internal Timestamp Enable bits */ + __HAL_RTC_INTERNAL_TIMESTAMP_DISABLE(hrtc); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Gets the RTC Timestamp value. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sTimeStamp Pointer to Time structure + * @param sTimeStampDate Pointer to Date structure + * @param Format specifies the format of the entered parameters. + * This parameter can be one of the following values: + * @arg RTC_FORMAT_BIN: Binary data format + * @arg RTC_FORMAT_BCD: BCD data format + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTimeStamp, RTC_DateTypeDef *sTimeStampDate, uint32_t Format) +{ + uint32_t tmptime = 0U; + uint32_t tmpdate = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(Format)); + + /* Get the Timestamp time and date registers values */ + tmptime = (uint32_t)(hrtc->Instance->TSTR & RTC_TR_RESERVED_MASK); + tmpdate = (uint32_t)(hrtc->Instance->TSDR & RTC_DR_RESERVED_MASK); + + /* Fill the Time structure fields with the read parameters */ + sTimeStamp->Hours = (uint8_t)((tmptime & (RTC_TSTR_HT | RTC_TSTR_HU)) >> RTC_TSTR_HU_Pos); + sTimeStamp->Minutes = (uint8_t)((tmptime & (RTC_TSTR_MNT | RTC_TSTR_MNU)) >> RTC_TSTR_MNU_Pos); + sTimeStamp->Seconds = (uint8_t)((tmptime & (RTC_TSTR_ST | RTC_TSTR_SU)) >> RTC_TSTR_SU_Pos); + sTimeStamp->TimeFormat = (uint8_t)((tmptime & (RTC_TSTR_PM)) >> RTC_TSTR_PM_Pos); + sTimeStamp->SubSeconds = (uint32_t) hrtc->Instance->TSSSR; + + /* Fill the Date structure fields with the read parameters */ + sTimeStampDate->Year = 0U; + sTimeStampDate->Month = (uint8_t)((tmpdate & (RTC_TSDR_MT | RTC_TSDR_MU)) >> RTC_TSDR_MU_Pos); + sTimeStampDate->Date = (uint8_t)((tmpdate & (RTC_TSDR_DT | RTC_TSDR_DU)) >> RTC_TSDR_DU_Pos); + sTimeStampDate->WeekDay = (uint8_t)((tmpdate & (RTC_TSDR_WDU)) >> RTC_TSDR_WDU_Pos); + + /* Check the input parameters format */ + if (Format == RTC_FORMAT_BIN) + { + /* Convert the Timestamp structure parameters to Binary format */ + sTimeStamp->Hours = (uint8_t)RTC_Bcd2ToByte(sTimeStamp->Hours); + sTimeStamp->Minutes = (uint8_t)RTC_Bcd2ToByte(sTimeStamp->Minutes); + sTimeStamp->Seconds = (uint8_t)RTC_Bcd2ToByte(sTimeStamp->Seconds); + + /* Convert the DateTimeStamp structure parameters to Binary format */ + sTimeStampDate->Month = (uint8_t)RTC_Bcd2ToByte(sTimeStampDate->Month); + sTimeStampDate->Date = (uint8_t)RTC_Bcd2ToByte(sTimeStampDate->Date); + sTimeStampDate->WeekDay = (uint8_t)RTC_Bcd2ToByte(sTimeStampDate->WeekDay); + } + + /* Clear the internal Timestamp Flag */ + __HAL_RTC_INTERNAL_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_ITSF); + + /* Clear the Timestamp Flag */ + __HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSF); + + return HAL_OK; +} + +/** + * @brief Sets Tamper. + * @note By calling this API the tamper global interrupt will be disabled and + * the selected tamper's interrupt as well. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sTamper Pointer to Tamper Structure. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetTamper(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef *sTamper) +{ + uint32_t tmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_TAMPER(sTamper->Tamper)); + assert_param(IS_RTC_TAMPER_TRIGGER(sTamper->Trigger)); + assert_param(IS_RTC_TAMPER_ERASE_MODE(sTamper->NoErase)); + assert_param(IS_RTC_TAMPER_MASKFLAG_STATE(sTamper->MaskFlag)); + assert_param(IS_RTC_TAMPER_FILTER(sTamper->Filter)); + assert_param(IS_RTC_TAMPER_FILTER_CONFIG_CORRECT(sTamper->Filter, sTamper->Trigger)); + assert_param(IS_RTC_TAMPER_SAMPLING_FREQ(sTamper->SamplingFrequency)); + assert_param(IS_RTC_TAMPER_PRECHARGE_DURATION(sTamper->PrechargeDuration)); + assert_param(IS_RTC_TAMPER_PULLUP_STATE(sTamper->TamperPullUp)); + assert_param(IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION(sTamper->TimeStampOnTamperDetection)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Copy control register into temporary variable */ + tmpreg = hrtc->Instance->TAMPCR; + + /* Enable selected tamper */ + tmpreg |= (sTamper->Tamper); + + /* Configure the tamper trigger bit (this bit is just on the right of the + tamper enable bit, hence the one-time right shift before updating it) */ + if (sTamper->Trigger == RTC_TAMPERTRIGGER_FALLINGEDGE) + { + /* Set the tamper trigger bit (case of falling edge or high level) */ + tmpreg |= (uint32_t)(sTamper->Tamper << 1U); + } + else + { + /* Clear the tamper trigger bit (case of rising edge or low level) */ + tmpreg &= (uint32_t)~(sTamper->Tamper << 1U); + } + + /* Configure the backup registers erasure enabling bits */ + if (sTamper->NoErase != RTC_TAMPER_ERASE_BACKUP_ENABLE) + { +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP1NOERASE); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP2NOERASE); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP3NOERASE); + } +#endif /* RTC_TAMPER3_SUPPORT */ + } + else + { +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP1NOERASE); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP2NOERASE); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP3NOERASE); + } +#endif /* RTC_TAMPER3_SUPPORT */ + } + + /* Configure the tamper flags masking bits */ + if (sTamper->MaskFlag != RTC_TAMPERMASK_FLAG_DISABLE) + { +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP1MF); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP2MF); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP3MF); + } +#endif /* RTC_TAMPER3_SUPPORT */ + } + else + { +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP1MF); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP2MF); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP3MF); + } +#endif /* RTC_TAMPER3_SUPPORT */ + } + + /* Clear remaining fields before setting them */ + tmpreg &= ~(RTC_TAMPERFILTER_MASK | \ + RTC_TAMPERSAMPLINGFREQ_RTCCLK_MASK | \ + RTC_TAMPERPRECHARGEDURATION_MASK | \ + RTC_TAMPER_PULLUP_MASK | \ + RTC_TIMESTAMPONTAMPERDETECTION_MASK); + + /* Set remaining parameters of desired configuration into temporary variable */ + tmpreg |= ((uint32_t)sTamper->Filter | \ + (uint32_t)sTamper->SamplingFrequency | \ + (uint32_t)sTamper->PrechargeDuration | \ + (uint32_t)sTamper->TamperPullUp | \ + (uint32_t)sTamper->TimeStampOnTamperDetection); + + /* Disable interrupt on selected tamper in case it is enabled */ +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg &= (uint32_t)~RTC_IT_TAMP1; + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg &= (uint32_t)~RTC_IT_TAMP2; + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg &= (uint32_t)~RTC_IT_TAMP3; + } +#endif /* RTC_TAMPER3_SUPPORT */ + + /* Disable tamper global interrupt in case it is enabled */ + tmpreg &= (uint32_t)~RTC_TAMPCR_TAMPIE; + + /* Copy desired configuration into configuration register */ + hrtc->Instance->TAMPCR = tmpreg; + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Sets Tamper with interrupt. + * @note By setting the tamper global interrupt bit, interrupts will be + * enabled for all tampers. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param sTamper Pointer to RTC Tamper. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef *sTamper) +{ + uint32_t tmpreg = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_TAMPER(sTamper->Tamper)); + assert_param(IS_RTC_TAMPER_INTERRUPT(sTamper->Interrupt)); + assert_param(IS_RTC_TAMPER_TRIGGER(sTamper->Trigger)); + assert_param(IS_RTC_TAMPER_ERASE_MODE(sTamper->NoErase)); + assert_param(IS_RTC_TAMPER_MASKFLAG_STATE(sTamper->MaskFlag)); + assert_param(IS_RTC_TAMPER_FILTER(sTamper->Filter)); + assert_param(IS_RTC_TAMPER_FILTER_CONFIG_CORRECT(sTamper->Filter, sTamper->Trigger)); + assert_param(IS_RTC_TAMPER_SAMPLING_FREQ(sTamper->SamplingFrequency)); + assert_param(IS_RTC_TAMPER_PRECHARGE_DURATION(sTamper->PrechargeDuration)); + assert_param(IS_RTC_TAMPER_PULLUP_STATE(sTamper->TamperPullUp)); + assert_param(IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION(sTamper->TimeStampOnTamperDetection)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Copy control register into temporary variable */ + tmpreg = hrtc->Instance->TAMPCR; + + /* Enable selected tamper */ + tmpreg |= (sTamper->Tamper); + + /* Configure the tamper trigger bit (this bit is just on the right of the + tamper enable bit, hence the one-time right shift before updating it) */ + if (sTamper->Trigger == RTC_TAMPERTRIGGER_FALLINGEDGE) + { + /* Set the tamper trigger bit (case of falling edge or high level) */ + tmpreg |= (uint32_t)(sTamper->Tamper << 1U); + } + else + { + /* Clear the tamper trigger bit (case of rising edge or low level) */ + tmpreg &= (uint32_t)~(sTamper->Tamper << 1U); + } + + /* Configure the backup registers erasure enabling bits */ + if (sTamper->NoErase != RTC_TAMPER_ERASE_BACKUP_ENABLE) + { +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP1NOERASE); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP2NOERASE); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP3NOERASE); + } +#endif /* RTC_TAMPER3_SUPPORT */ + } + else + { +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP1NOERASE); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP2NOERASE); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP3NOERASE); + } +#endif /* RTC_TAMPER3_SUPPORT */ + } + + /* Configure the tamper flags masking bits */ + if (sTamper->MaskFlag != RTC_TAMPERMASK_FLAG_DISABLE) + { +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP1MF); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP2MF); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg |= (uint32_t)(RTC_TAMPCR_TAMP3MF); + } +#endif /* RTC_TAMPER3_SUPPORT */ + } + else + { +#if defined(RTC_TAMPER1_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_1) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP1MF); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((sTamper->Tamper & RTC_TAMPER_2) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP2MF); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((sTamper->Tamper & RTC_TAMPER_3) != 0U) + { + tmpreg &= (uint32_t)~(RTC_TAMPCR_TAMP3MF); + } +#endif /* RTC_TAMPER3_SUPPORT */ + } + + /* Clear remaining fields before setting them */ + tmpreg &= ~(RTC_TAMPERFILTER_MASK | \ + RTC_TAMPERSAMPLINGFREQ_RTCCLK_MASK | \ + RTC_TAMPERPRECHARGEDURATION_MASK | \ + RTC_TAMPER_PULLUP_MASK | \ + RTC_TIMESTAMPONTAMPERDETECTION_MASK); + + /* Set remaining parameters of desired configuration into temporary variable */ + tmpreg |= ((uint32_t)sTamper->Filter | \ + (uint32_t)sTamper->SamplingFrequency | \ + (uint32_t)sTamper->PrechargeDuration | \ + (uint32_t)sTamper->TamperPullUp | \ + (uint32_t)sTamper->TimeStampOnTamperDetection); + + /* Enable interrupt on selected tamper */ + tmpreg |= (uint32_t)sTamper->Interrupt; + + /* Copy desired configuration into configuration register */ + hrtc->Instance->TAMPCR = tmpreg; + + /* Enable and configure the EXTI line associated to the RTC Timestamp and Tamper interrupts */ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT(); + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE(); + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Deactivates Tamper. + * @note By calling this API the tamper global interrupt will be disabled. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Tamper Selected tamper pin. + * This parameter can be any combination of the following values: + * @arg RTC_TAMPER_1: Tamper 1 (*) + * @arg RTC_TAMPER_2: Tamper 2 + * @arg RTC_TAMPER_3: Tamper 3 (*) + * + * (*) value not applicable to all devices. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper(RTC_HandleTypeDef *hrtc, uint32_t Tamper) +{ + assert_param(IS_RTC_TAMPER(Tamper)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the selected Tamper pin */ + hrtc->Instance->TAMPCR &= (uint32_t)~Tamper; + +#if defined(RTC_TAMPER1_SUPPORT) + if ((Tamper & RTC_TAMPER_1) != 0U) + { + /* Disable the Tamper 1 interrupt */ + hrtc->Instance->TAMPCR &= (uint32_t)~(RTC_IT_TAMP | RTC_IT_TAMP1); + } +#endif /* RTC_TAMPER1_SUPPORT */ + if ((Tamper & RTC_TAMPER_2) != 0U) + { + /* Disable the Tamper 2 interrupt */ + hrtc->Instance->TAMPCR &= (uint32_t)~(RTC_IT_TAMP | RTC_IT_TAMP2); + } +#if defined(RTC_TAMPER3_SUPPORT) + if ((Tamper & RTC_TAMPER_3) != 0U) + { + /* Disable the Tamper 3 interrupt */ + hrtc->Instance->TAMPCR &= (uint32_t)~(RTC_IT_TAMP | RTC_IT_TAMP3); + } +#endif /* RTC_TAMPER3_SUPPORT */ + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Handles Timestamp and Tamper interrupt request. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +void HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc) +{ + /* Clear the EXTI flag associated to the RTC Timestamp and Tamper interrupts */ + __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG(); + + /* Get the Timestamp interrupt source enable status */ + if (__HAL_RTC_TIMESTAMP_GET_IT_SOURCE(hrtc, RTC_IT_TS) != 0U) + { + /* Get the pending status of the Timestamp Interrupt */ + if (__HAL_RTC_TIMESTAMP_GET_FLAG(hrtc, RTC_FLAG_TSF) != 0U) + { + /* Timestamp callback */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + hrtc->TimeStampEventCallback(hrtc); +#else + HAL_RTCEx_TimeStampEventCallback(hrtc); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + + /* Clear the Timestamp interrupt pending bit after returning from callback + as RTC_TSTR and RTC_TSDR registers are cleared when TSF bit is reset */ + __HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSF); + } + } + +#if defined(RTC_TAMPER1_SUPPORT) + /* Get the Tamper 1 interrupt source enable status */ + if (__HAL_RTC_TAMPER_GET_IT_SOURCE(hrtc, RTC_IT_TAMP | RTC_IT_TAMP1) != 0U) + { + /* Get the pending status of the Tamper 1 Interrupt */ + if (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP1F) != 0U) + { + /* Clear the Tamper interrupt pending bit */ + __HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP1F); + + /* Tamper callback */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + hrtc->Tamper1EventCallback(hrtc); +#else + HAL_RTCEx_Tamper1EventCallback(hrtc); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + } + } +#endif /* RTC_TAMPER1_SUPPORT */ + + /* Get the Tamper 2 interrupt source enable status */ + if (__HAL_RTC_TAMPER_GET_IT_SOURCE(hrtc, RTC_IT_TAMP | RTC_IT_TAMP2) != 0U) + { + /* Get the pending status of the Tamper 2 Interrupt */ + if (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP2F) != 0U) + { + /* Clear the Tamper interrupt pending bit */ + __HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP2F); + + /* Tamper callback */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + hrtc->Tamper2EventCallback(hrtc); +#else + HAL_RTCEx_Tamper2EventCallback(hrtc); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + } + } + +#if defined(RTC_TAMPER3_SUPPORT) + /* Get the Tamper 3 interrupt source enable status */ + if (__HAL_RTC_TAMPER_GET_IT_SOURCE(hrtc, RTC_IT_TAMP | RTC_IT_TAMP3) != 0U) + { + /* Get the pending status of the Tamper 3 Interrupt */ + if (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP3F) != 0U) + { + /* Clear the Tamper interrupt pending bit */ + __HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP3F); + + /* Tamper callback */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + hrtc->Tamper3EventCallback(hrtc); +#else + HAL_RTCEx_Tamper3EventCallback(hrtc); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + } + } +#endif /* RTC_TAMPER3_SUPPORT */ + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; +} + +/** + * @brief Timestamp callback. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTCEx_TimeStampEventCallback(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTCEx_TimeStampEventCallback could be implemented in the user file + */ +} + +#if defined(RTC_TAMPER1_SUPPORT) +/** + * @brief Tamper 1 callback. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTCEx_Tamper1EventCallback(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTCEx_Tamper1EventCallback could be implemented in the user file + */ +} +#endif /* RTC_TAMPER1_SUPPORT */ + +/** + * @brief Tamper 2 callback. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTCEx_Tamper2EventCallback(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTCEx_Tamper2EventCallback could be implemented in the user file + */ +} + +#if defined(RTC_TAMPER3_SUPPORT) +/** + * @brief Tamper 3 callback. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTCEx_Tamper3EventCallback(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTCEx_Tamper3EventCallback could be implemented in the user file + */ +} +#endif /* RTC_TAMPER3_SUPPORT */ + +/** + * @brief Handles Timestamp polling request. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout) +{ + uint32_t tickstart = 0U; + + /* Get tick */ + tickstart = HAL_GetTick(); + + while (__HAL_RTC_TIMESTAMP_GET_FLAG(hrtc, RTC_FLAG_TSF) == 0U) + { + if (Timeout != HAL_MAX_DELAY) + { + if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout)) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + + if (__HAL_RTC_TIMESTAMP_GET_FLAG(hrtc, RTC_FLAG_TSOVF) != 0U) + { + /* Clear the Timestamp Overrun Flag */ + __HAL_RTC_TIMESTAMP_CLEAR_FLAG(hrtc, RTC_FLAG_TSOVF); + + /* Change Timestamp state */ + hrtc->State = HAL_RTC_STATE_ERROR; + + return HAL_ERROR; + } + } + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + return HAL_OK; +} + +#if defined(RTC_TAMPER1_SUPPORT) +/** + * @brief Handles Tamper 1 Polling. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout) +{ + uint32_t tickstart = 0U; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Get the status of the Interrupt */ + while (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP1F) == 0U) + { + if (Timeout != HAL_MAX_DELAY) + { + if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout)) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + } + + /* Clear the Tamper Flag */ + __HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP1F); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + return HAL_OK; +} +#endif /* RTC_TAMPER1_SUPPORT */ + +/** + * @brief Handles Tamper 2 Polling. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout) +{ + uint32_t tickstart = 0U; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Get the status of the Interrupt */ + while (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP2F) == 0U) + { + if (Timeout != HAL_MAX_DELAY) + { + if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout)) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + } + + /* Clear the Tamper Flag */ + __HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP2F); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + return HAL_OK; +} + +#if defined(RTC_TAMPER3_SUPPORT) +/** + * @brief Handles Tamper 3 Polling. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_PollForTamper3Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout) +{ + uint32_t tickstart = HAL_GetTick(); + + /* Get the status of the Interrupt */ + while (__HAL_RTC_TAMPER_GET_FLAG(hrtc, RTC_FLAG_TAMP3F) == 0U) + { + if (Timeout != HAL_MAX_DELAY) + { + if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout)) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + } + + /* Clear the Tamper Flag */ + __HAL_RTC_TAMPER_CLEAR_FLAG(hrtc, RTC_FLAG_TAMP3F); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + return HAL_OK; +} +#endif /* RTC_TAMPER3_SUPPORT */ + +/** + * @} + */ + +/** @defgroup RTCEx_Exported_Functions_Group2 RTC Wakeup functions + * @brief RTC Wakeup functions + * +@verbatim + =============================================================================== + ##### RTC Wakeup functions ##### + =============================================================================== + + [..] This section provides functions allowing to configure Wakeup feature + +@endverbatim + * @{ + */ + +/** + * @brief Sets wakeup timer. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param WakeUpCounter Wakeup counter + * @param WakeUpClock Wakeup clock + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock) +{ + uint32_t tickstart = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock)); + assert_param(IS_RTC_WAKEUP_COUNTER(WakeUpCounter)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Check RTC WUTWF flag is reset only when wakeup timer enabled*/ + if ((hrtc->Instance->CR & RTC_CR_WUTE) != 0U) + { + tickstart = HAL_GetTick(); + + /* Wait till RTC WUTWF flag is reset and if timeout is reached exit */ + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) != 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + } + + /* Disable the Wakeup timer */ + __HAL_RTC_WAKEUPTIMER_DISABLE(hrtc); + + /* Clear the Wakeup flag */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(hrtc, RTC_FLAG_WUTF); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC WUTWF flag is set and if timeout is reached exit */ + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) == 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + + /* Clear the Wakeup Timer clock source bits in CR register */ + hrtc->Instance->CR &= (uint32_t)~RTC_CR_WUCKSEL; + + /* Configure the clock source */ + hrtc->Instance->CR |= (uint32_t)WakeUpClock; + + /* Configure the Wakeup Timer counter */ + hrtc->Instance->WUTR = (uint32_t)WakeUpCounter; + + /* Enable the Wakeup Timer */ + __HAL_RTC_WAKEUPTIMER_ENABLE(hrtc); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Sets wakeup timer with interrupt. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param WakeUpCounter Wakeup counter + * @param WakeUpClock Wakeup clock + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock) +{ + __IO uint32_t count = RTC_TIMEOUT_VALUE * (SystemCoreClock / 32U / 1000U); + + /* Check the parameters */ + assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock)); + assert_param(IS_RTC_WAKEUP_COUNTER(WakeUpCounter)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Check RTC WUTWF flag is reset only when wakeup timer enabled */ + if ((hrtc->Instance->CR & RTC_CR_WUTE) != 0U) + { + /* Wait till RTC WUTWF flag is reset and if timeout is reached exit */ + do + { + count = count - 1U; + if (count == 0U) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) != 0U); + } + + /* Disable the Wakeup timer */ + __HAL_RTC_WAKEUPTIMER_DISABLE(hrtc); + + /* Clear the Wakeup flag */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(hrtc, RTC_FLAG_WUTF); + + /* Reload the counter */ + count = RTC_TIMEOUT_VALUE * (SystemCoreClock / 32U / 1000U); + + /* Wait till RTC WUTWF flag is set and if timeout is reached exit */ + do + { + count = count - 1U; + if (count == 0U) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) == 0U); + + /* Clear the Wakeup Timer clock source bits in CR register */ + hrtc->Instance->CR &= (uint32_t)~RTC_CR_WUCKSEL; + + /* Configure the clock source */ + hrtc->Instance->CR |= (uint32_t)WakeUpClock; + + /* Configure the Wakeup Timer counter */ + hrtc->Instance->WUTR = (uint32_t)WakeUpCounter; + + /* Enable and configure the EXTI line associated to the RTC Wakeup Timer interrupt */ + __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT(); + __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE(); + + /* Configure the interrupt in the RTC_CR register */ + __HAL_RTC_WAKEUPTIMER_ENABLE_IT(hrtc, RTC_IT_WUT); + + /* Enable the Wakeup Timer */ + __HAL_RTC_WAKEUPTIMER_ENABLE(hrtc); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Deactivates wakeup timer counter. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_DeactivateWakeUpTimer(RTC_HandleTypeDef *hrtc) +{ + uint32_t tickstart = 0U; + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Disable the Wakeup Timer */ + __HAL_RTC_WAKEUPTIMER_DISABLE(hrtc); + + /* In case interrupt mode is used, the interrupt source must disabled */ + __HAL_RTC_WAKEUPTIMER_DISABLE_IT(hrtc, RTC_IT_WUT); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC WUTWF flag is set and if timeout is reached exit */ + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTWF) == 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Gets wakeup timer counter. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval Counter value + */ +uint32_t HAL_RTCEx_GetWakeUpTimer(RTC_HandleTypeDef *hrtc) +{ + /* Get the counter value */ + return ((uint32_t)(hrtc->Instance->WUTR & RTC_WUTR_WUT)); +} + +/** + * @brief Handles Wakeup Timer interrupt request. + * @note Unlike alarm interrupt line (shared by Alarms A and B) or tamper + * interrupt line (shared by timestamp and tampers) wakeup timer + * interrupt line is exclusive to the wakeup timer. + * There is no need in this case to check on the interrupt enable + * status via __HAL_RTC_WAKEUPTIMER_GET_IT_SOURCE(). + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +void HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc) +{ + /* Clear the EXTI flag associated to the RTC Wakeup Timer interrupt */ + __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); + + /* Get the pending status of the Wakeup timer Interrupt */ + if (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTF) != 0U) + { + /* Clear the Wakeup timer interrupt pending bit */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(hrtc, RTC_FLAG_WUTF); + + /* Wakeup timer callback */ +#if (USE_HAL_RTC_REGISTER_CALLBACKS == 1) + hrtc->WakeUpTimerEventCallback(hrtc); +#else + HAL_RTCEx_WakeUpTimerEventCallback(hrtc); +#endif /* USE_HAL_RTC_REGISTER_CALLBACKS */ + } + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; +} + +/** + * @brief Wakeup Timer callback. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTCEx_WakeUpTimerEventCallback could be implemented in the user file + */ +} + +/** + * @brief Handles Wakeup Timer Polling. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout) +{ + uint32_t tickstart = 0U; + + /* Get tick */ + tickstart = HAL_GetTick(); + + while (__HAL_RTC_WAKEUPTIMER_GET_FLAG(hrtc, RTC_FLAG_WUTF) == 0U) + { + if (Timeout != HAL_MAX_DELAY) + { + if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout)) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + } + + /* Clear the Wakeup timer Flag */ + __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(hrtc, RTC_FLAG_WUTF); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + return HAL_OK; +} + +/** + * @} + */ + +/** @defgroup RTCEx_Exported_Functions_Group3 Extended Peripheral Control functions + * @brief Extended Peripheral Control functions + * +@verbatim + =============================================================================== + ##### Extended Peripheral Control functions ##### + =============================================================================== + [..] + This subsection provides functions allowing to + (+) Write a data in a specified RTC Backup data register + (+) Read a data in a specified RTC Backup data register + (+) Set the Smooth calibration parameters. + (+) Configure the Synchronization Shift Control Settings. + (+) Configure the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz). + (+) Deactivate the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz). + (+) Enable the RTC reference clock detection. + (+) Disable the RTC reference clock detection. + (+) Enable the Bypass Shadow feature. + (+) Disable the Bypass Shadow feature. + +@endverbatim + * @{ + */ + +/** + * @brief Writes a data in a specified RTC Backup data register. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param BackupRegister RTC Backup data Register number. + * This parameter can be: RTC_BKP_DRx (where x can be from 0 to 19) + * to specify the register. + * @param Data Data to be written in the specified RTC Backup data register. + * @retval None + */ +void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data) +{ + uint32_t tmp = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_BKP(BackupRegister)); + + tmp = (uint32_t) &(hrtc->Instance->BKP0R); + tmp += (BackupRegister * 4U); + + /* Write the specified register */ + *(__IO uint32_t *)tmp = (uint32_t)Data; +} + +/** + * @brief Reads data from the specified RTC Backup data Register. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param BackupRegister RTC Backup data Register number. + * This parameter can be: RTC_BKP_DRx (where x can be from 0 to 19) + * to specify the register. + * @retval Read value + */ +uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister) +{ + uint32_t tmp = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_BKP(BackupRegister)); + + tmp = (uint32_t) &(hrtc->Instance->BKP0R); + tmp += (BackupRegister * 4U); + + /* Read the specified register */ + return (*(__IO uint32_t *)tmp); +} + +/** + * @brief Sets the Smooth calibration parameters. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param SmoothCalibPeriod Select the Smooth Calibration Period. + * This parameter can be can be one of the following values: + * @arg RTC_SMOOTHCALIB_PERIOD_32SEC: The smooth calibration period is 32s. + * @arg RTC_SMOOTHCALIB_PERIOD_16SEC: The smooth calibration period is 16s. + * @arg RTC_SMOOTHCALIB_PERIOD_8SEC: The smooth calibration period is 8s. + * @param SmoothCalibPlusPulses Select to Set or reset the CALP bit. + * This parameter can be one of the following values: + * @arg RTC_SMOOTHCALIB_PLUSPULSES_SET: Add one RTCCLK pulse every 2*11 pulses. + * @arg RTC_SMOOTHCALIB_PLUSPULSES_RESET: No RTCCLK pulses are added. + * @param SmoothCalibMinusPulsesValue Select the value of CALM[8:0] bits. + * This parameter can be one any value from 0 to 0x000001FF. + * @note To deactivate the smooth calibration, the field SmoothCalibPlusPulses + * must be equal to SMOOTHCALIB_PLUSPULSES_RESET and the field + * SmoothCalibMinusPulsesValue must be equal to 0. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib(RTC_HandleTypeDef *hrtc, uint32_t SmoothCalibPeriod, uint32_t SmoothCalibPlusPulses, uint32_t SmoothCalibMinusPulsesValue) +{ + uint32_t tickstart = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_SMOOTH_CALIB_PERIOD(SmoothCalibPeriod)); + assert_param(IS_RTC_SMOOTH_CALIB_PLUS(SmoothCalibPlusPulses)); + assert_param(IS_RTC_SMOOTH_CALIB_MINUS(SmoothCalibMinusPulsesValue)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* check if a calibration is pending*/ + if ((hrtc->Instance->ISR & RTC_ISR_RECALPF) != 0U) + { + /* Get tick */ + tickstart = HAL_GetTick(); + + /* check if a calibration is pending*/ + while ((hrtc->Instance->ISR & RTC_ISR_RECALPF) != 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + } + + /* Configure the Smooth calibration settings */ + hrtc->Instance->CALR = (uint32_t)((uint32_t)SmoothCalibPeriod | \ + (uint32_t)SmoothCalibPlusPulses | \ + (uint32_t)SmoothCalibMinusPulsesValue); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Configures the Synchronization Shift Control Settings. + * @note When REFCKON is set, firmware must not write to Shift control register. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param ShiftAdd1S Select to add or not 1 second to the time calendar. + * This parameter can be one of the following values: + * @arg RTC_SHIFTADD1S_SET: Add one second to the clock calendar. + * @arg RTC_SHIFTADD1S_RESET: No effect. + * @param ShiftSubFS Select the number of Second Fractions to substitute. + * This parameter can be one any value from 0 to 0x7FFF. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift(RTC_HandleTypeDef *hrtc, uint32_t ShiftAdd1S, uint32_t ShiftSubFS) +{ + uint32_t tickstart = 0U; + + /* Check the parameters */ + assert_param(IS_RTC_SHIFT_ADD1S(ShiftAdd1S)); + assert_param(IS_RTC_SHIFT_SUBFS(ShiftSubFS)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait until the shift is completed */ + while ((hrtc->Instance->ISR & RTC_ISR_SHPF) != 0U) + { + if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_TIMEOUT; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_TIMEOUT; + } + } + + /* Check if the reference clock detection is disabled */ + if ((hrtc->Instance->CR & RTC_CR_REFCKON) == 0U) + { + /* Configure the Shift settings */ + hrtc->Instance->SHIFTR = (uint32_t)(uint32_t)(ShiftSubFS) | (uint32_t)(ShiftAdd1S); + + /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ + if ((hrtc->Instance->CR & RTC_CR_BYPSHAD) == 0U) + { + if (HAL_RTC_WaitForSynchro(hrtc) != HAL_OK) + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + hrtc->State = HAL_RTC_STATE_ERROR; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_ERROR; + } + } + } + else + { + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_ERROR; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_ERROR; + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Configures the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz). + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param CalibOutput Select the Calibration output Selection. + * This parameter can be one of the following values: + * @arg RTC_CALIBOUTPUT_512HZ: A signal has a regular waveform at 512Hz. + * @arg RTC_CALIBOUTPUT_1HZ: A signal has a regular waveform at 1Hz. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut(RTC_HandleTypeDef *hrtc, uint32_t CalibOutput) +{ + /* Check the parameters */ + assert_param(IS_RTC_CALIB_OUTPUT(CalibOutput)); + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Clear flags before config */ + hrtc->Instance->CR &= (uint32_t)~RTC_CR_COSEL; + + /* Configure the RTC_CR register */ + hrtc->Instance->CR |= (uint32_t)CalibOutput; + + __HAL_RTC_CALIBRATION_OUTPUT_ENABLE(hrtc); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Deactivates the Calibration Pinout (RTC_CALIB) Selection (1Hz or 512Hz). + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut(RTC_HandleTypeDef *hrtc) +{ + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + __HAL_RTC_CALIBRATION_OUTPUT_DISABLE(hrtc); + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Enables the RTC reference clock detection. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef *hrtc) +{ + HAL_StatusTypeDef status; + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + + if (status == HAL_OK) + { + /* Enable the reference clock detection */ + __HAL_RTC_CLOCKREF_DETECTION_ENABLE(hrtc); + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + } + + if (status == HAL_OK) + { + hrtc->State = HAL_RTC_STATE_READY; + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return status; +} + +/** + * @brief Disable the RTC reference clock detection. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef *hrtc) +{ + HAL_StatusTypeDef status; + + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Enter Initialization mode */ + status = RTC_EnterInitMode(hrtc); + + if (status == HAL_OK) + { + /* Disable the reference clock detection */ + __HAL_RTC_CLOCKREF_DETECTION_DISABLE(hrtc); + + /* Exit Initialization mode */ + status = RTC_ExitInitMode(hrtc); + } + + if (status == HAL_OK) + { + hrtc->State = HAL_RTC_STATE_READY; + } + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return status; +} + +/** + * @brief Enables the Bypass Shadow feature. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @note When the Bypass Shadow is enabled the calendar value are taken + * directly from the Calendar counter. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow(RTC_HandleTypeDef *hrtc) +{ + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Set the BYPSHAD bit */ + hrtc->Instance->CR |= (uint32_t)RTC_CR_BYPSHAD; + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @brief Disables the Bypass Shadow feature. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @note When the Bypass Shadow is enabled the calendar value are taken + * directly from the Calendar counter. + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef *hrtc) +{ + /* Process Locked */ + __HAL_LOCK(hrtc); + + hrtc->State = HAL_RTC_STATE_BUSY; + + /* Disable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_DISABLE(hrtc); + + /* Reset the BYPSHAD bit */ + hrtc->Instance->CR &= (uint32_t)~RTC_CR_BYPSHAD; + + /* Enable the write protection for RTC registers */ + __HAL_RTC_WRITEPROTECTION_ENABLE(hrtc); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + /* Process Unlocked */ + __HAL_UNLOCK(hrtc); + + return HAL_OK; +} + +/** + * @} + */ + +/** @defgroup RTCEx_Exported_Functions_Group4 Extended features functions + * @brief Extended features functions + * +@verbatim + =============================================================================== + ##### Extended features functions ##### + =============================================================================== + [..] This section provides functions allowing to: + (+) RTC Alarm B callback + (+) RTC Poll for Alarm B request + +@endverbatim + * @{ + */ + +/** + * @brief Alarm B callback. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @retval None + */ +__weak void HAL_RTCEx_AlarmBEventCallback(RTC_HandleTypeDef *hrtc) +{ + /* Prevent unused argument(s) compilation warning */ + UNUSED(hrtc); + + /* NOTE: This function should not be modified, when the callback is needed, + the HAL_RTCEx_AlarmBEventCallback could be implemented in the user file + */ +} + +/** + * @brief Handles Alarm B Polling request. + * @param hrtc pointer to a RTC_HandleTypeDef structure that contains + * the configuration information for RTC. + * @param Timeout Timeout duration + * @retval HAL status + */ +HAL_StatusTypeDef HAL_RTCEx_PollForAlarmBEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout) +{ + uint32_t tickstart = 0U; + + /* Get tick */ + tickstart = HAL_GetTick(); + + /* Wait till RTC ALRBF flag is set and if timeout is reached exit */ + while (__HAL_RTC_ALARM_GET_FLAG(hrtc, RTC_FLAG_ALRBF) == 0U) + { + if (Timeout != HAL_MAX_DELAY) + { + if ((Timeout == 0U) || ((HAL_GetTick() - tickstart) > Timeout)) + { + hrtc->State = HAL_RTC_STATE_TIMEOUT; + return HAL_TIMEOUT; + } + } + } + + /* Clear the Alarm flag */ + __HAL_RTC_ALARM_CLEAR_FLAG(hrtc, RTC_FLAG_ALRBF); + + /* Change RTC state */ + hrtc->State = HAL_RTC_STATE_READY; + + return HAL_OK; +} + +/** + * @} + */ + +/** + * @} + */ + +#endif /* HAL_RTC_MODULE_ENABLED */ +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c new file mode 100644 index 0000000..0219ee8 --- /dev/null +++ b/firmware/memory_chip_gone/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_rcc.c @@ -0,0 +1,1361 @@ +/** + ****************************************************************************** + * @file stm32wbxx_ll_rcc.c + * @author MCD Application Team + * @brief RCC LL module driver. + ****************************************************************************** + * @attention + * + * Copyright (c) 2019 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. + * + ****************************************************************************** + */ +#if defined(USE_FULL_LL_DRIVER) + +/* Includes ------------------------------------------------------------------*/ +#include "stm32wbxx_ll_rcc.h" +#ifdef USE_FULL_ASSERT +#include "stm32_assert.h" +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +/** @addtogroup STM32WBxx_LL_Driver + * @{ + */ + +#if defined(RCC) + +/** @addtogroup RCC_LL + * @{ + */ + +/* Private types -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private constants ---------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/** @addtogroup RCC_LL_Private_Macros + * @{ + */ +#define IS_LL_RCC_USART_CLKSOURCE(__VALUE__) ((__VALUE__) == LL_RCC_USART1_CLKSOURCE) + +#if defined(LPUART1) +#define IS_LL_RCC_LPUART_CLKSOURCE(__VALUE__) ((__VALUE__) == LL_RCC_LPUART1_CLKSOURCE) +#endif /* LPUART1 */ + +#if defined(I2C3) +#define IS_LL_RCC_I2C_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_I2C1_CLKSOURCE) \ + || ((__VALUE__) == LL_RCC_I2C3_CLKSOURCE)) +#else +#define IS_LL_RCC_I2C_CLKSOURCE(__VALUE__) ((__VALUE__) == LL_RCC_I2C1_CLKSOURCE) +#endif /* I2C3 */ + +#define IS_LL_RCC_LPTIM_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_LPTIM1_CLKSOURCE) \ + || ((__VALUE__) == LL_RCC_LPTIM2_CLKSOURCE)) + +#if defined(SAI1) +#define IS_LL_RCC_SAI_CLKSOURCE(__VALUE__) ((__VALUE__) == LL_RCC_SAI1_CLKSOURCE) +#endif /* SAI1 */ + +#define IS_LL_RCC_RNG_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_RNG_CLKSOURCE)) + +#define IS_LL_RCC_CLK48_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_CLK48_CLKSOURCE)) + +#if defined(USB) +#define IS_LL_RCC_USB_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_USB_CLKSOURCE)) +#endif /* USB */ + +#define IS_LL_RCC_ADC_CLKSOURCE(__VALUE__) (((__VALUE__) == LL_RCC_ADC_CLKSOURCE)) + +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup RCC_LL_Private_Functions RCC Private functions + * @{ + */ +static uint32_t RCC_PLL_GetFreqDomain_SYS(void); +#if defined(SAI1) +static uint32_t RCC_PLL_GetFreqDomain_SAI(void); +#endif /* SAI1 */ +static uint32_t RCC_PLL_GetFreqDomain_ADC(void); +static uint32_t RCC_PLL_GetFreqDomain_48M(void); + +#if defined(SAI1) +static uint32_t RCC_PLLSAI1_GetFreqDomain_SAI(void); +static uint32_t RCC_PLLSAI1_GetFreqDomain_48M(void); +static uint32_t RCC_PLLSAI1_GetFreqDomain_ADC(void); +#endif /* SAI1 */ + + +static uint32_t RCC_GetSystemClockFreq(void); + + +static uint32_t RCC_GetHCLK1ClockFreq(uint32_t SYSCLK_Frequency); +static uint32_t RCC_GetHCLK2ClockFreq(uint32_t SYSCLK_Frequency); +static uint32_t RCC_GetHCLK4ClockFreq(uint32_t SYSCLK_Frequency); +static uint32_t RCC_GetHCLK5ClockFreq(void); + + +static uint32_t RCC_GetPCLK1ClockFreq(uint32_t HCLK_Frequency); +static uint32_t RCC_GetPCLK2ClockFreq(uint32_t HCLK_Frequency); +/** + * @} + */ + + +/* Exported functions --------------------------------------------------------*/ +/** @addtogroup RCC_LL_Exported_Functions + * @{ + */ + +/** @addtogroup RCC_LL_EF_Init + * @{ + */ + +/** + * @brief Reset the RCC clock to the default reset state. + * @note The default reset state of the clock configuration is given below: + * - MSI ON and used as system clock source + * - HSE, HSI, HSI48, PLL and PLLSAI1 Source OFF + * - CPU1, CPU2, AHB4, APB1 and APB2 prescaler set to 1. + * - CSS, MCO OFF + * - All interrupts disabled + * @note This function doesn't modify the configuration of the + * - Peripheral clocks + * - LSI, LSE and RTC clocks + * @retval An ErrorStatus enumeration value: + * - SUCCESS: RCC registers are de-initialized + * - ERROR: not applicable + */ +ErrorStatus LL_RCC_DeInit(void) +{ + uint32_t vl_mask; + + /* Set MSION bit */ + LL_RCC_MSI_Enable(); + + /* Insure MSIRDY bit is set before writing default MSIRANGE value */ + while (LL_RCC_MSI_IsReady() == 0U) + {} + + /* Set MSIRANGE default value */ + LL_RCC_MSI_SetRange(LL_RCC_MSIRANGE_6); + + /* Set MSITRIM bits to the reset value*/ + LL_RCC_MSI_SetCalibTrimming(0); + + /* Set HSITRIM bits to the reset value*/ + LL_RCC_HSI_SetCalibTrimming(0x40U); + + /* Reset CFGR register */ + LL_RCC_WriteReg(CFGR, 0x00070000U); /* MSI selected as System Clock and all prescaler to not divided */ + + /* Wait for MSI oscillator used as system clock */ + while (LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_MSI) + {} + + /* Write new mask in CR register */ + LL_RCC_WriteReg(CR, 0x00000061); + + /* Wait for PLL READY bit to be reset */ + while (LL_RCC_PLL_IsReady() != 0U) + {} + + /* Reset PLLCFGR register */ + LL_RCC_WriteReg(PLLCFGR, 0x22041000U); + +#if defined(SAI1) + /* Wait for PLLSAI READY bit to be reset */ + while (LL_RCC_PLLSAI1_IsReady() != 0U) + {} + + /* Reset PLLSAI1CFGR register */ + LL_RCC_WriteReg(PLLSAI1CFGR, 0x22041000U); +#endif /* SAI1 */ + + /* Disable all interrupts */ + LL_RCC_WriteReg(CIER, 0x00000000U); + + /* Clear all interrupt flags */ + vl_mask = RCC_CICR_LSI1RDYC | RCC_CICR_LSERDYC | RCC_CICR_MSIRDYC | RCC_CICR_HSIRDYC | RCC_CICR_HSERDYC | + RCC_CICR_PLLRDYC | RCC_CICR_CSSC | RCC_CICR_LSECSSC | RCC_CICR_LSI2RDYC; + +#if defined(SAI1) + vl_mask |= RCC_CICR_PLLSAI1RDYC; +#endif /* SAI1 */ + +#if defined(RCC_HSI48_SUPPORT) + vl_mask |= RCC_CICR_HSI48RDYC; +#endif /* RCC_HSI48_SUPPORT */ + + LL_RCC_WriteReg(CICR, vl_mask); + + /* Clear reset flags */ + LL_RCC_ClearResetFlags(); + +#if defined(RCC_SMPS_SUPPORT) + /* SMPS reset */ + LL_RCC_WriteReg(SMPSCR, 0x00000301U); /* MSI default clock source */ +#endif /* RCC_SMPS_SUPPORT */ + + /* RF Wakeup Clock Source selection */ + LL_RCC_SetRFWKPClockSource(LL_RCC_RFWKP_CLKSOURCE_NONE); + +#if defined(RCC_HSI48_SUPPORT) + /* HSI48 reset */ + LL_RCC_HSI48_Disable(); +#endif /* RCC_HSI48_SUPPORT */ + + /* HSECR register write unlock & then reset*/ + LL_RCC_WriteReg(HSECR, HSE_CONTROL_UNLOCK_KEY); + LL_RCC_WriteReg(HSECR, LL_RCC_HSE_CURRENTMAX_3); /* HSEGMC set to default value 011, current max limit 1.13 mA/V */ + + /* EXTCFGR reset*/ + LL_RCC_WriteReg(EXTCFGR, 0x00030000U); + + return SUCCESS; +} + +/** + * @} + */ + +/** @addtogroup RCC_LL_EF_Get_Freq + * @brief Return the frequencies of different on chip clocks; System, AHB, APB1 and APB2 buses clocks + * and different peripheral clocks available on the device. + * @note If SYSCLK source is MSI, function returns values based on MSI values(*) + * @note If SYSCLK source is HSI, function returns values based on HSI_VALUE(**) + * @note If SYSCLK source is HSE, function returns values based on HSE_VALUE(***) + * @note If SYSCLK source is PLL, function returns values based on HSE_VALUE(***) + * or HSI_VALUE(**) or MSI values(*) multiplied/divided by the PLL factors. + * @note (*) MSI values are retrieved thanks to __LL_RCC_CALC_MSI_FREQ macro + * @note (**) HSI_VALUE is a constant defined in this file (default value + * 16 MHz) but the real value may vary depending on the variations + * in voltage and temperature. + * @note (***) HSE_VALUE is a constant defined in this file (default value + * 32 MHz), user has to ensure that HSE_VALUE is same as the real + * frequency of the crystal used. Otherwise, this function may + * have wrong result. + * @note The result of this function could be incorrect when using fractional + * value for HSE crystal. + * @note This function can be used by the user application to compute the + * baud-rate for the communication peripherals or configure other parameters. + * @{ + */ + +/** + * @brief Return the frequencies of different on chip clocks; System, AHB, APB1 and APB2 buses clocks + * @note Each time SYSCLK, HCLK, PCLK1 and/or PCLK2 clock changes, this function + * must be called to update structure fields. Otherwise, any + * configuration based on this function will be incorrect. + * @param RCC_Clocks pointer to a @ref LL_RCC_ClocksTypeDef structure which will hold the clocks frequencies + * @retval None + */ +void LL_RCC_GetSystemClocksFreq(LL_RCC_ClocksTypeDef *RCC_Clocks) +{ + /* Get SYSCLK frequency */ + RCC_Clocks->SYSCLK_Frequency = RCC_GetSystemClockFreq(); + + /* HCLK1 clock frequency */ + RCC_Clocks->HCLK1_Frequency = RCC_GetHCLK1ClockFreq(RCC_Clocks->SYSCLK_Frequency); + + /* HCLK2 clock frequency */ + RCC_Clocks->HCLK2_Frequency = RCC_GetHCLK2ClockFreq(RCC_Clocks->SYSCLK_Frequency); + + /* HCLK4 clock frequency */ + RCC_Clocks->HCLK4_Frequency = RCC_GetHCLK4ClockFreq(RCC_Clocks->SYSCLK_Frequency); + + /* HCLK5 clock frequency */ + RCC_Clocks->HCLK5_Frequency = RCC_GetHCLK5ClockFreq(); + + /* PCLK1 clock frequency */ + RCC_Clocks->PCLK1_Frequency = RCC_GetPCLK1ClockFreq(RCC_Clocks->HCLK1_Frequency); + + /* PCLK2 clock frequency */ + RCC_Clocks->PCLK2_Frequency = RCC_GetPCLK2ClockFreq(RCC_Clocks->HCLK1_Frequency); +} + +#if defined(RCC_SMPS_SUPPORT) +/** + * @brief Return SMPS clock frequency + * @note This function is only applicable when CPU runs, + * When waking up from Standby mode and powering on the VCODE supply, the HSI is + * selected as SMPS Step Down converter clock, independent from the selection in + * SMPSSEL. + * @retval SMPS clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (HSI or LSE) is not ready + */ +uint32_t LL_RCC_GetSMPSClockFreq(void) +{ + uint32_t smps_frequency; + uint32_t smps_prescaler_index = ((LL_RCC_GetSMPSPrescaler()) >> RCC_SMPSCR_SMPSDIV_Pos); + uint32_t smpsClockSource = LL_RCC_GetSMPSClockSource(); + + if (smpsClockSource == LL_RCC_SMPS_CLKSOURCE_STATUS_HSI) /* SMPS Clock source is HSI Osc. */ + { + if (LL_RCC_HSI_IsReady() == 1U) + { + smps_frequency = HSI_VALUE / SmpsPrescalerTable[smps_prescaler_index][0]; + } + else + { + smps_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + } + } + else if (smpsClockSource == LL_RCC_SMPS_CLKSOURCE_STATUS_HSE) /* SMPS Clock source is HSE Osc. */ + { + if (LL_RCC_HSE_IsReady() == 1U) + { + smps_frequency = HSE_VALUE / SmpsPrescalerTable[smps_prescaler_index][5]; + } + else + { + smps_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + } + } + else if (smpsClockSource == LL_RCC_SMPS_CLKSOURCE_STATUS_MSI) /* SMPS Clock source is MSI Osc. */ + { + uint32_t msiRange = LL_RCC_MSI_GetRange(); + + if (msiRange == LL_RCC_MSIRANGE_8) + { + smps_frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSIRANGE_8) / SmpsPrescalerTable[smps_prescaler_index][4]; + } + else if (msiRange == LL_RCC_MSIRANGE_9) + { + smps_frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSIRANGE_9) / SmpsPrescalerTable[smps_prescaler_index][3]; + } + else if (msiRange == LL_RCC_MSIRANGE_10) + { + smps_frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSIRANGE_10) / SmpsPrescalerTable[smps_prescaler_index][2]; + } + else if (msiRange == LL_RCC_MSIRANGE_11) + { + smps_frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSIRANGE_11) / SmpsPrescalerTable[smps_prescaler_index][1]; + } + else + { + smps_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + } + } + else /* SMPS has no Clock */ + { + smps_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + } + + if (smps_frequency != LL_RCC_PERIPH_FREQUENCY_NO) + { + /* Systematic div by 2 */ + smps_frequency = smps_frequency >> 1U; + } + + return smps_frequency; +} +#endif /* RCC_SMPS_SUPPORT */ + +/** + * @brief Return USARTx clock frequency + * @param USARTxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_USART1_CLKSOURCE + * @retval USART clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (HSI or LSE) is not ready + */ +uint32_t LL_RCC_GetUSARTClockFreq(uint32_t USARTxSource) +{ + uint32_t usart_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + + /* Check parameter */ + assert_param(IS_LL_RCC_USART_CLKSOURCE(USARTxSource)); + + /* USART1CLK clock frequency */ + switch (LL_RCC_GetUSARTClockSource(USARTxSource)) + { + case LL_RCC_USART1_CLKSOURCE_SYSCLK: /* USART1 Clock is System Clock */ + usart_frequency = RCC_GetSystemClockFreq(); + break; + + case LL_RCC_USART1_CLKSOURCE_HSI: /* USART1 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + usart_frequency = HSI_VALUE; + } + break; + + case LL_RCC_USART1_CLKSOURCE_LSE: /* USART1 Clock is LSE Osc. */ + if (LL_RCC_LSE_IsReady() == 1U) + { + usart_frequency = LSE_VALUE; + } + break; + + case LL_RCC_USART1_CLKSOURCE_PCLK2: /* USART1 Clock is PCLK2 */ + default: + usart_frequency = RCC_GetPCLK2ClockFreq(RCC_GetHCLK1ClockFreq(RCC_GetSystemClockFreq())); + break; + } + return usart_frequency; +} + +/** + * @brief Return I2Cx clock frequency + * @param I2CxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_I2C1_CLKSOURCE + * @arg @ref LL_RCC_I2C3_CLKSOURCE (*) + * @note (*) Value not defined for all devices + * @retval I2C clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that HSI oscillator is not ready + */ +uint32_t LL_RCC_GetI2CClockFreq(uint32_t I2CxSource) +{ + uint32_t i2c_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + + /* Check parameter */ + assert_param(IS_LL_RCC_I2C_CLKSOURCE(I2CxSource)); + + if (I2CxSource == LL_RCC_I2C1_CLKSOURCE) + { + /* I2C1 CLK clock frequency */ + switch (LL_RCC_GetI2CClockSource(I2CxSource)) + { + case LL_RCC_I2C1_CLKSOURCE_SYSCLK: /* I2C1 Clock is System Clock */ + i2c_frequency = RCC_GetSystemClockFreq(); + break; + + case LL_RCC_I2C1_CLKSOURCE_HSI: /* I2C1 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + i2c_frequency = HSI_VALUE; + } + break; + + case LL_RCC_I2C1_CLKSOURCE_PCLK1: /* I2C1 Clock is PCLK1 */ + default: + i2c_frequency = RCC_GetPCLK1ClockFreq(RCC_GetHCLK1ClockFreq(RCC_GetSystemClockFreq())); + break; + } + } +#if defined(I2C3) + else + { + /* I2C3 CLK clock frequency */ + switch (LL_RCC_GetI2CClockSource(I2CxSource)) + { + case LL_RCC_I2C3_CLKSOURCE_SYSCLK: /* I2C3 Clock is System Clock */ + i2c_frequency = RCC_GetSystemClockFreq(); + break; + + case LL_RCC_I2C3_CLKSOURCE_HSI: /* I2C3 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + i2c_frequency = HSI_VALUE; + } + break; + + case LL_RCC_I2C3_CLKSOURCE_PCLK1: /* I2C3 Clock is PCLK1 */ + default: + i2c_frequency = RCC_GetPCLK1ClockFreq(RCC_GetHCLK1ClockFreq(RCC_GetSystemClockFreq())); + break; + } + } +#endif /* I2C3 */ + + return i2c_frequency; +} + +#if defined(LPUART1) +/** + * @brief Return LPUARTx clock frequency + * @param LPUARTxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_LPUART1_CLKSOURCE + * @retval LPUART clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (HSI or LSE) is not ready + */ +uint32_t LL_RCC_GetLPUARTClockFreq(uint32_t LPUARTxSource) +{ + uint32_t lpuart_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + + /* Check parameter */ + assert_param(IS_LL_RCC_LPUART_CLKSOURCE(LPUARTxSource)); + + /* LPUART1CLK clock frequency */ + switch (LL_RCC_GetLPUARTClockSource(LPUARTxSource)) + { + case LL_RCC_LPUART1_CLKSOURCE_SYSCLK: /* LPUART1 Clock is System Clock */ + lpuart_frequency = RCC_GetSystemClockFreq(); + break; + + case LL_RCC_LPUART1_CLKSOURCE_HSI: /* LPUART1 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + lpuart_frequency = HSI_VALUE; + } + break; + + case LL_RCC_LPUART1_CLKSOURCE_LSE: /* LPUART1 Clock is LSE Osc. */ + if (LL_RCC_LSE_IsReady() == 1U) + { + lpuart_frequency = LSE_VALUE; + } + break; + + case LL_RCC_LPUART1_CLKSOURCE_PCLK1: /* LPUART1 Clock is PCLK1 */ + default: + lpuart_frequency = RCC_GetPCLK1ClockFreq(RCC_GetHCLK1ClockFreq(RCC_GetSystemClockFreq())); + break; + } + + return lpuart_frequency; +} +#endif /* LPUART1 */ + +/** + * @brief Return LPTIMx clock frequency + * @param LPTIMxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_LPTIM1_CLKSOURCE + * @arg @ref LL_RCC_LPTIM2_CLKSOURCE + * @retval LPTIM clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (HSI, LSI or LSE) is not ready + */ +uint32_t LL_RCC_GetLPTIMClockFreq(uint32_t LPTIMxSource) +{ + uint32_t lptim_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + uint32_t temp = LL_RCC_LSI2_IsReady(); + + /* Check parameter */ + assert_param(IS_LL_RCC_LPTIM_CLKSOURCE(LPTIMxSource)); + + if (LPTIMxSource == LL_RCC_LPTIM1_CLKSOURCE) + { + /* LPTIM1CLK clock frequency */ + switch (LL_RCC_GetLPTIMClockSource(LPTIMxSource)) + { + case LL_RCC_LPTIM1_CLKSOURCE_LSI: /* LPTIM1 Clock is LSI Osc. */ + if ((LL_RCC_LSI1_IsReady() == 1UL) || (temp == 1UL)) + { + lptim_frequency = LSI_VALUE; + } + break; + + case LL_RCC_LPTIM1_CLKSOURCE_HSI: /* LPTIM1 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + lptim_frequency = HSI_VALUE; + } + break; + + case LL_RCC_LPTIM1_CLKSOURCE_LSE: /* LPTIM1 Clock is LSE Osc. */ + if (LL_RCC_LSE_IsReady() == 1U) + { + lptim_frequency = LSE_VALUE; + } + break; + + case LL_RCC_LPTIM1_CLKSOURCE_PCLK1: /* LPTIM1 Clock is PCLK1 */ + default: + lptim_frequency = RCC_GetPCLK1ClockFreq(RCC_GetHCLK1ClockFreq(RCC_GetSystemClockFreq())); + break; + } + } + else + { + /* LPTIM2CLK clock frequency */ + switch (LL_RCC_GetLPTIMClockSource(LPTIMxSource)) + { + case LL_RCC_LPTIM2_CLKSOURCE_LSI: /* LPTIM2 Clock is LSI Osc. */ + if ((LL_RCC_LSI1_IsReady() == 1UL) || (temp == 1UL)) + { + lptim_frequency = LSI_VALUE; + } + break; + + case LL_RCC_LPTIM2_CLKSOURCE_HSI: /* LPTIM2 Clock is HSI Osc. */ + if (LL_RCC_HSI_IsReady() == 1U) + { + lptim_frequency = HSI_VALUE; + } + break; + + case LL_RCC_LPTIM2_CLKSOURCE_LSE: /* LPTIM2 Clock is LSE Osc. */ + if (LL_RCC_LSE_IsReady() == 1U) + { + lptim_frequency = LSE_VALUE; + } + break; + + case LL_RCC_LPTIM2_CLKSOURCE_PCLK1: /* LPTIM2 Clock is PCLK1 */ + default: + lptim_frequency = RCC_GetPCLK1ClockFreq(RCC_GetHCLK1ClockFreq(RCC_GetSystemClockFreq())); + break; + } + } + + return lptim_frequency; +} + +#if defined(SAI1) +/** + * @brief Return SAIx clock frequency + * @param SAIxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_SAI1_CLKSOURCE + * + * @retval SAI clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that PLL is not ready + * - @ref LL_RCC_PERIPH_FREQUENCY_NA indicates that external clock is used + */ +uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource) +{ + uint32_t sai_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + + /* Check parameter */ + assert_param(IS_LL_RCC_SAI_CLKSOURCE(SAIxSource)); + + switch (LL_RCC_GetSAIClockSource(SAIxSource)) + { + case LL_RCC_SAI1_CLKSOURCE_HSI: /* HSI clock used as SAI1 clock source */ + if (LL_RCC_HSI_IsReady() == 1U) + { + sai_frequency = HSI_VALUE; + } + break; + + case LL_RCC_SAI1_CLKSOURCE_PLLSAI1: /* PLLSAI1 clock used as SAI1 clock source */ + if (LL_RCC_PLLSAI1_IsReady() == 1U) + { + if (LL_RCC_PLLSAI1_IsEnabledDomain_SAI() == 1U) + { + sai_frequency = RCC_PLLSAI1_GetFreqDomain_SAI(); + } + } + break; + + case LL_RCC_SAI1_CLKSOURCE_PLL: /* PLL clock used as SAI1 clock source */ + if (LL_RCC_PLL_IsReady() == 1U) + { + if (LL_RCC_PLL_IsEnabledDomain_SAI() == 1U) + { + sai_frequency = RCC_PLL_GetFreqDomain_SAI(); + } + } + break; + + case LL_RCC_SAI1_CLKSOURCE_PIN: /* External input clock used as SAI1 clock source */ + default: + sai_frequency = LL_RCC_PERIPH_FREQUENCY_NA; + break; + } + return sai_frequency; +} +#endif /* SAI1 */ + +/** + * @brief Return CLK48x clock frequency + * @param CLK48xSource This parameter can be one of the following values: + * @arg @ref LL_RCC_CLK48_CLKSOURCE + * @retval USB clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (MSI or HSI48) or PLLs (PLL or PLLSAI1) + * is not ready + */ +uint32_t LL_RCC_GetCLK48ClockFreq(uint32_t CLK48xSource) +{ + uint32_t clk48_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + + /* Check parameter */ + assert_param(IS_LL_RCC_CLK48_CLKSOURCE(CLK48xSource)); + + /* CLK48CLK clock frequency */ + switch (LL_RCC_GetCLK48ClockSource(CLK48xSource)) + { +#if defined(SAI1) + case LL_RCC_CLK48_CLKSOURCE_PLLSAI1: /* PLLSAI1 clock used as CLK48 clock source */ + if (LL_RCC_PLLSAI1_IsReady() == 1U) + { + if (LL_RCC_PLLSAI1_IsEnabledDomain_48M() == 1U) + { + clk48_frequency = RCC_PLLSAI1_GetFreqDomain_48M(); + } + } + break; +#endif /* SAI1 */ + + case LL_RCC_CLK48_CLKSOURCE_PLL: /* PLL clock used as CLK48 clock source */ + if (LL_RCC_PLL_IsReady() == 1U) + { + if (LL_RCC_PLL_IsEnabledDomain_48M() == 1U) + { + clk48_frequency = RCC_PLL_GetFreqDomain_48M(); + } + } + break; + + case LL_RCC_CLK48_CLKSOURCE_MSI: /* MSI clock used as CLK48 clock source */ + if (LL_RCC_MSI_IsReady() == 1U) + { + clk48_frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + } + break; + +#if defined(RCC_HSI48_SUPPORT) + case LL_RCC_CLK48_CLKSOURCE_HSI48: /* HSI48 clock used as CLK48 clock source */ + default: + if (LL_RCC_HSI48_IsReady() == 1U) + { + clk48_frequency = HSI48_VALUE; + } + break; +#else + default: + /* Nothing to do */ + break; +#endif /* RCC_HSI48_SUPPORT */ + } + + return clk48_frequency; +} + +#if defined(USB) +/** + * @brief Return USBx clock frequency + * @param USBxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_CLK48_CLKSOURCE + * @retval USB clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (MSI or HSI48) or PLLs (PLL or PLLSAI1) + * is not ready + */ +uint32_t LL_RCC_GetUSBClockFreq(uint32_t USBxSource) +{ + return LL_RCC_GetCLK48ClockFreq(USBxSource); +} +#endif /* USB */ + +/** + * @brief Return RNGx clock frequency + * @param RNGxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_RNG_CLKSOURCE + * @retval RNG clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (MSI or HSI48) or PLLs (PLL or PLLSAI1) + * is not ready + */ +uint32_t LL_RCC_GetRNGClockFreq(uint32_t RNGxSource) +{ + uint32_t rng_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + uint32_t rngClockSource = LL_RCC_GetRNGClockSource(RNGxSource); + + /* Check parameter */ + assert_param(IS_LL_RCC_RNG_CLKSOURCE(RNGxSource)); + + /* RNGCLK clock frequency */ + if (rngClockSource == LL_RCC_RNG_CLKSOURCE_LSI) /* LSI clock used as RNG clock source */ + { + const uint32_t temp_lsi1Status = LL_RCC_LSI1_IsReady(); + const uint32_t temp_lsi2Status = LL_RCC_LSI2_IsReady(); + if ((temp_lsi1Status == 1U) || (temp_lsi2Status == 1U)) + { + rng_frequency = LSI_VALUE; + } + } + else if (rngClockSource == LL_RCC_RNG_CLKSOURCE_LSE) /* LSE clock used as RNG clock source */ + { + if (LL_RCC_LSE_IsReady() == 1U) + { + rng_frequency = LSE_VALUE; + } + } + else /* CLK48 clock used as RNG clock source */ + { + /* Systematic Div by 3 */ + rng_frequency = LL_RCC_GetCLK48ClockFreq(LL_RCC_CLK48_CLKSOURCE) / 3U; + } + return rng_frequency; +} + +/** + * @brief Return ADCx clock frequency + * @param ADCxSource This parameter can be one of the following values: + * @arg @ref LL_RCC_ADC_CLKSOURCE + * @retval ADC clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (MSI) or PLL is not ready + * - @ref LL_RCC_PERIPH_FREQUENCY_NA indicates that no clock source selected + */ +uint32_t LL_RCC_GetADCClockFreq(uint32_t ADCxSource) +{ + uint32_t adc_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + + /* Check parameter */ + assert_param(IS_LL_RCC_ADC_CLKSOURCE(ADCxSource)); + + /* ADCCLK clock frequency */ + switch (LL_RCC_GetADCClockSource(ADCxSource)) + { +#if defined(SAI1) + case LL_RCC_ADC_CLKSOURCE_PLLSAI1: /* PLLSAI1 clock used as ADC clock source */ + if (LL_RCC_PLLSAI1_IsReady() == 1U) + { + if (LL_RCC_PLLSAI1_IsEnabledDomain_ADC() == 1U) + { + adc_frequency = RCC_PLLSAI1_GetFreqDomain_ADC(); + } + } + break; +#endif /* SAI1 */ + + case LL_RCC_ADC_CLKSOURCE_SYSCLK: /* SYSCLK clock used as ADC clock source */ + adc_frequency = RCC_GetSystemClockFreq(); + break; + + case LL_RCC_ADC_CLKSOURCE_PLL: /* PLL clock used as ADC clock source */ + if (LL_RCC_PLL_IsReady() == 1U) + { + if (LL_RCC_PLL_IsEnabledDomain_ADC() == 1U) + { + adc_frequency = RCC_PLL_GetFreqDomain_ADC(); + } + } + break; + + case LL_RCC_ADC_CLKSOURCE_NONE: /* No clock used as ADC clock source */ + default: + adc_frequency = LL_RCC_PERIPH_FREQUENCY_NA; + break; + } + + return adc_frequency; +} + +/** + * @brief Return RTC & LCD clock frequency + * @retval RTC clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillators (LSI, LSE or HSE) are not ready + * - @ref LL_RCC_PERIPH_FREQUENCY_NA indicates that no clock source selected + */ +uint32_t LL_RCC_GetRTCClockFreq(void) +{ + uint32_t rtc_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + uint32_t temp = LL_RCC_LSI2_IsReady(); + + /* RTCCLK clock frequency */ + switch (LL_RCC_GetRTCClockSource()) + { + case LL_RCC_RTC_CLKSOURCE_LSE: /* LSE clock used as RTC clock source */ + if (LL_RCC_LSE_IsReady() == 1U) + { + rtc_frequency = LSE_VALUE; + } + break; + + case LL_RCC_RTC_CLKSOURCE_LSI: /* LSI clock used as RTC clock source */ + + if ((LL_RCC_LSI1_IsReady() == 1UL) || (temp == 1UL)) + { + rtc_frequency = LSI_VALUE; + } + break; + + case LL_RCC_RTC_CLKSOURCE_HSE_DIV32: /* HSE clock used as ADC clock source */ + rtc_frequency = HSE_VALUE / 32U; + break; + + case LL_RCC_RTC_CLKSOURCE_NONE: /* No clock used as RTC clock source */ + default: + rtc_frequency = LL_RCC_PERIPH_FREQUENCY_NA; + break; + } + + return rtc_frequency; +} + +/** + * @brief Return RF Wakeup clock frequency + * @retval RFWKP clock frequency (in Hz) + * - @ref LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillators (LSI, LSE or HSE) are not ready + * - @ref LL_RCC_PERIPH_FREQUENCY_NA indicates that no clock source selected + */ +uint32_t LL_RCC_GetRFWKPClockFreq(void) +{ + uint32_t rfwkp_frequency = LL_RCC_PERIPH_FREQUENCY_NO; + + /* RTCCLK clock frequency */ + switch (LL_RCC_GetRFWKPClockSource()) + { + case LL_RCC_RFWKP_CLKSOURCE_LSE: /* LSE clock used as RF Wakeup clock source */ + if (LL_RCC_LSE_IsReady() == 1U) + { + rfwkp_frequency = LSE_VALUE; + } + break; + + case LL_RCC_RFWKP_CLKSOURCE_HSE_DIV1024: /* HSE clock used as RF Wakeup clock source */ + rfwkp_frequency = HSE_VALUE / 1024U; + break; + + case LL_RCC_RFWKP_CLKSOURCE_NONE: /* No clock used as RF Wakeup clock source */ + default: + rfwkp_frequency = LL_RCC_PERIPH_FREQUENCY_NA; + break; + } + + return rfwkp_frequency; +} + +/** + * @} + */ + +/** + * @} + */ + +/** @addtogroup RCC_LL_Private_Functions + * @{ + */ + +/** + * @brief Return SYSTEM clock (SYSCLK) frequency + * @retval SYSTEM clock frequency (in Hz) + */ +static uint32_t RCC_GetSystemClockFreq(void) +{ + uint32_t frequency; + + /* Get SYSCLK source -------------------------------------------------------*/ + switch (LL_RCC_GetSysClkSource()) + { + case LL_RCC_SYS_CLKSOURCE_STATUS_MSI: /* MSI used as system clock source */ + frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_SYS_CLKSOURCE_STATUS_HSI: /* HSI used as system clock source */ + frequency = HSI_VALUE; + break; + + case LL_RCC_SYS_CLKSOURCE_STATUS_HSE: /* HSE used as system clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + frequency = HSE_VALUE / 2U; + } + else + { + frequency = HSE_VALUE; + } + break; + + case LL_RCC_SYS_CLKSOURCE_STATUS_PLL: /* PLL used as system clock source */ + frequency = RCC_PLL_GetFreqDomain_SYS(); + break; + + default: + frequency = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + + return frequency; +} + +/** + * @brief Return HCLK1 clock frequency + * @param SYSCLK_Frequency SYSCLK clock frequency + * @retval HCLK1 clock frequency (in Hz) + */ +static uint32_t RCC_GetHCLK1ClockFreq(uint32_t SYSCLK_Frequency) +{ + /* HCLK clock frequency */ + return __LL_RCC_CALC_HCLK1_FREQ(SYSCLK_Frequency, LL_RCC_GetAHBPrescaler()); +} + +/** + * @brief Return HCLK2 clock frequency + * @param SYSCLK_Frequency SYSCLK clock frequency + * @retval HCLK2 clock frequency (in Hz) + */ +static uint32_t RCC_GetHCLK2ClockFreq(uint32_t SYSCLK_Frequency) +{ + /* HCLK clock frequency */ + return __LL_RCC_CALC_HCLK2_FREQ(SYSCLK_Frequency, LL_C2_RCC_GetAHBPrescaler()); +} + +/** + * @brief Return HCLK clock frequency + * @param SYSCLK_Frequency SYSCLK clock frequency + * @retval HCLK4 clock frequency (in Hz) + */ +static uint32_t RCC_GetHCLK4ClockFreq(uint32_t SYSCLK_Frequency) +{ + /* HCLK clock frequency */ + return __LL_RCC_CALC_HCLK4_FREQ(SYSCLK_Frequency, LL_RCC_GetAHB4Prescaler()); +} + +/** + * @brief Return HCLK5 clock frequency + * @retval HCLK5 clock frequency (in Hz) + */ +static uint32_t RCC_GetHCLK5ClockFreq(void) +{ + uint32_t frequency; + + /* Get SYSCLK source -------------------------------------------------------*/ + switch (LL_RCC_GetRFClockSource()) + { + case LL_RCC_RF_CLKSOURCE_HSI: /* HSI used as system clock source */ + frequency = HSI_VALUE; + break; + + case LL_RCC_RF_CLKSOURCE_HSE_DIV2: /* HSE Div2 used as system clock source */ + frequency = HSE_VALUE / 2U; + break; + + default: + frequency = HSI_VALUE; + break; + } + + return frequency; +} + +/** + * @brief Return PCLK1 clock frequency + * @param HCLK_Frequency HCLK clock frequency + * @retval PCLK1 clock frequency (in Hz) + */ +static uint32_t RCC_GetPCLK1ClockFreq(uint32_t HCLK_Frequency) +{ + /* PCLK1 clock frequency */ + return __LL_RCC_CALC_PCLK1_FREQ(HCLK_Frequency, LL_RCC_GetAPB1Prescaler()); +} + +/** + * @brief Return PCLK2 clock frequency + * @param HCLK_Frequency HCLK clock frequency + * @retval PCLK2 clock frequency (in Hz) + */ +static uint32_t RCC_GetPCLK2ClockFreq(uint32_t HCLK_Frequency) +{ + /* PCLK2 clock frequency */ + return __LL_RCC_CALC_PCLK2_FREQ(HCLK_Frequency, LL_RCC_GetAPB2Prescaler()); +} + +/** + * @brief Return PLL clock (PLLRCLK) frequency used for system domain + * @retval PLLRCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLL_GetFreqDomain_SYS(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLN + SYSCLK = PLL_VCO / PLLR + */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLCLK_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLL_GetN(), LL_RCC_PLL_GetR()); +} + +#if defined(SAI1) +/** + * @brief Return PLL clock (PLLPCLK) frequency used for SAI domain + * @retval PLLPCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLL_GetFreqDomain_SAI(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI Value / PLLM) * PLLN + SAI Domain clock = PLL_VCO / PLLP + */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLCLK_SAI_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLL_GetN(), LL_RCC_PLL_GetP()); +} +#endif /* SAI1 */ + +/** + * @brief Return PLL clock (PLLPCLK) frequency used for ADC domain + * @retval PLLPCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLL_GetFreqDomain_ADC(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI Value / PLLM) * PLLN + SAI Domain clock = PLL_VCO / PLLP + */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLCLK_ADC_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLL_GetN(), LL_RCC_PLL_GetP()); +} + +/** + * @brief Return PLL clock (PLLQCLK) frequency used for 48 MHz domain + * @retval PLLQCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLL_GetFreqDomain_48M(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLN + 48M Domain clock = PLL_VCO / PLLQ + */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLL clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLCLK_48M_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLL_GetN(), LL_RCC_PLL_GetQ()); +} + +#if defined(SAI1) +/** + * @brief Return PLLSAI1 clock (PLLSAI1PCLK) frequency used for SAI domain + * @retval PLLSAI1PCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLLSAI1_GetFreqDomain_SAI(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLLSAI1_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLSAI1N */ + /* SAI Domain clock = PLLSAI1_VCO / PLLSAI1P */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLLSAI1 clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLLSAI1 clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLLSAI1 clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLSAI1_SAI_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLLSAI1_GetN(), LL_RCC_PLLSAI1_GetP()); +} + +/** + * @brief Return PLLSAI1 clock (PLLSAI1QCLK) frequency used for 48Mhz domain + * @retval PLLSAI1QCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLLSAI1_GetFreqDomain_48M(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLLSAI1_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLSAI1N */ + /* 48M Domain clock = PLLSAI1_VCO / PLLSAI1Q */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLLSAI1 clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLLSAI1 clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLLSAI1 clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLSAI1_48M_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLLSAI1_GetN(), LL_RCC_PLLSAI1_GetQ()); +} + +/** + * @brief Return PLLSAI1 clock (PLLSAI1RCLK) frequency used for ADC domain + * @retval PLLSAI1RCLK clock frequency (in Hz) + */ +static uint32_t RCC_PLLSAI1_GetFreqDomain_ADC(void) +{ + uint32_t pllinputfreq; + uint32_t pllsource; + + /* PLLSAI1_VCO = (HSE_VALUE or HSI_VALUE or MSI Value/ PLLM) * PLLSAI1N */ + /* 48M Domain clock = PLLSAI1_VCO / PLLSAI1R */ + pllsource = LL_RCC_PLL_GetMainSource(); + + switch (pllsource) + { + case LL_RCC_PLLSOURCE_MSI: /* MSI used as PLLSAI1 clock source */ + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + + case LL_RCC_PLLSOURCE_HSI: /* HSI used as PLLSAI1 clock source */ + pllinputfreq = HSI_VALUE; + break; + + case LL_RCC_PLLSOURCE_HSE: /* HSE used as PLLSAI1 clock source */ + if (LL_RCC_HSE_IsEnabledDiv2() == 1U) + { + pllinputfreq = HSE_VALUE / 2U; + } + else + { + pllinputfreq = HSE_VALUE; + } + break; + + default: + pllinputfreq = __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_GetRange()); + break; + } + return __LL_RCC_CALC_PLLSAI1_ADC_FREQ(pllinputfreq, LL_RCC_PLL_GetDivider(), + LL_RCC_PLLSAI1_GetN(), LL_RCC_PLLSAI1_GetR()); +} +#endif /* SAI1 */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /* RCC */ + +/** + * @} + */ + +#endif /* USE_FULL_LL_DRIVER */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/ble.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/ble.h new file mode 100644 index 0000000..378a14c --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/ble.h @@ -0,0 +1,88 @@ +/** + ****************************************************************************** + * @file ble.h + * @author MCD Application Team + * @brief BLE interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __BLE_H +#define __BLE_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Includes ------------------------------------------------------------------*/ +#include "ble_conf.h" +#include "ble_dbg_conf.h" + +/**< core */ +#include "core/ble_core.h" +#include "core/ble_bufsize.h" +#include "core/ble_defs.h" +#include "core/auto/ble_vs_codes.h" +#include "core/ble_legacy.h" +#include "core/ble_std.h" + +/**< blesvc */ +#include "svc/Inc/bas.h" +#include "svc/Inc/bls.h" +#include "svc/Inc/crs_stm.h" +#include "svc/Inc/dis.h" +#include "svc/Inc/eds_stm.h" +#include "svc/Inc/hids.h" +#include "svc/Inc/hrs.h" +#include "svc/Inc/hts.h" +#include "svc/Inc/ias.h" +#include "svc/Inc/lls.h" +#include "svc/Inc/tps.h" +#include "svc/Inc/motenv_stm.h" +#include "svc/Inc/p2p_stm.h" +#include "svc/Inc/zdd_stm.h" +#include "svc/Inc/otas_stm.h" +#include "svc/Inc/mesh.h" +#include "svc/Inc/template_stm.h" + +#include "svc/Inc/svc_ctl.h" + +#include "svc/Inc/uuid.h" + + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ + /* -------------------------------- * + * [retrieved from ble_legacy file] + * Macro to get RSSI from advertising report #0. + * "p" must be a pointer to the event parameters buffer + * -------------------------------- */ +#define HCI_LE_ADVERTISING_REPORT_RSSI_0(p) \ + (*(int8_t*)((&((hci_le_advertising_report_event_rp0*)(p))-> \ + Advertising_Report[0].Length_Data) + 1 + \ + ((hci_le_advertising_report_event_rp0*)(p))-> \ + Advertising_Report[0].Length_Data)) + +/* Exported functions ------------------------------------------------------- */ + +#ifdef __cplusplus +} +#endif + +#endif /*__BLE_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/ble_common.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/ble_common.h new file mode 100644 index 0000000..d4bb83c --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/ble_common.h @@ -0,0 +1,117 @@ +/** + ****************************************************************************** + * @file ble_common.h + * @author MCD Application Team + * @brief Common file to BLE Middleware + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __BLE_COMMON_H +#define __BLE_COMMON_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include + +#include "ble_conf.h" +#include "ble_dbg_conf.h" + +/* Event types copied from MW Legacy file*/ +#include "tl.h" + +/* -------------------------------- * + * Basic definitions * + * -------------------------------- */ + +#undef NULL +#define NULL 0 + +#undef FALSE +#define FALSE 0 + +#undef TRUE +#define TRUE (!0) + + +/* -------------------------------- * + * Macro delimiters * + * -------------------------------- */ + +#define M_BEGIN do { + +#define M_END } while(0) + + +/* -------------------------------- * + * Some useful macro definitions * + * -------------------------------- */ + +#ifndef MAX +#define MAX( a, b ) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef MIN +#define MIN( a, b ) (((a) < (b)) ? (a) : (b)) +#endif + +#define MODINC( a, m ) M_BEGIN (a)++; if ((a)>=(m)) (a)=0; M_END + +#define MODDEC( a, m ) M_BEGIN if ((a)==0) (a)=(m); (a)--; M_END + +#define MODADD( a, b, m ) M_BEGIN (a)+=(b); if ((a)>=(m)) (a)-=(m); M_END + +#define MODSUB( a, b, m ) MODADD( a, (m)-(b), m ) + +#ifdef WIN32 +#define ALIGN(n) +#else +#define ALIGN(n) __attribute__((aligned(n))) +#endif + +#define PAUSE( t ) M_BEGIN \ + volatile int _i; \ + for ( _i = t; _i > 0; _i -- ); \ + M_END + +#define DIVF( x, y ) ((x)/(y)) + +#define DIVC( x, y ) (((x)+(y)-1)/(y)) + +#define DIVR( x, y ) (((x)+((y)/2))/(y)) + +#define SHRR( x, n ) ((((x)>>((n)-1))+1)>>1) + +#define BITN( w, n ) (((w)[(n)/32] >> ((n)%32)) & 1) + +#define BITNSET( w, n, b ) M_BEGIN (w)[(n)/32] |= ((U32)(b))<<((n)%32); M_END + + /* -------------------------------- * + * Compiler * + * -------------------------------- */ +#define PLACE_IN_SECTION( __x__ ) __attribute__((section (__x__))) + +#ifdef __cplusplus +} +#endif + +#endif /*__BLE_COMMON_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h new file mode 100644 index 0000000..b9a1a5a --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_events.h @@ -0,0 +1,2008 @@ +/***************************************************************************** + * @file ble_events.h + * @brief STM32WB BLE API (event callbacks) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_EVENTS_H__ +#define BLE_EVENTS_H__ + + +#include "auto/ble_types.h" + +#define HCI_EVENT_TABLE_SIZE 6 +#define HCI_LE_EVENT_TABLE_SIZE 16 +#define HCI_VS_EVENT_TABLE_SIZE 54 + +typedef struct +{ + uint16_t evt_code; + void (*process)( const uint8_t* in ); +} hci_event_table_t; + +extern const hci_event_table_t hci_event_table[HCI_EVENT_TABLE_SIZE]; +extern const hci_event_table_t hci_le_event_table[HCI_LE_EVENT_TABLE_SIZE]; +extern const hci_event_table_t hci_vs_event_table[HCI_VS_EVENT_TABLE_SIZE]; + +/* HCI events */ + +/** + * @brief HCI_DISCONNECTION_COMPLETE_EVENT + * This event occurs when a connection is terminated. The status parameter + * indicates if the disconnection was successful or not. The reason parameter + * indicates the reason for the disconnection if the disconnection was + * successful. If the disconnection was not successful, the value of the reason + * parameter shall be ignored by the Host. + * Note: if the connection is terminated by the remote device, the reason + * parameter of this event is set to the reason specified by the remote device + * only if it has an allowed value, otherwise the reason is forced to Remote + * User Terminated Connection error code (0x13). Allowed remote reason values + * are: Authentication Failure error code (0x05), Other End Terminated + * Connection error codes (0x13 to 0x15), Unsupported Remote Feature error code + * (0x1A), and Unacceptable Connection Parameters error code (0x3B). + * See Core Specification [Vol 4, Part E, 7.7.5]. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Reason Reason for disconnection (see Core Specification [Vol 1, Part + * F] Error Codes). + * @return None + */ +void hci_disconnection_complete_event( uint8_t Status, + uint16_t Connection_Handle, + uint8_t Reason ); + +/** + * @brief HCI_ENCRYPTION_CHANGE_EVENT + * The Encryption Change event is used to indicate that the change of the + * encryption mode has been completed. The Connection_Handle will be a + * Connection_Handle for an ACL connection. The Encryption_Enabled event + * parameter specifies the new Encryption_Enabled parameter for the + * Connection_Handle specified by the Connection_Handle event parameter. This + * event will occur on both devices to notify the Hosts when Encryption has + * changed for the specified Connection_Handle between two devices. Note: This + * event shall not be generated if encryption is paused or resumed; during a + * role switch, for example. + * The meaning of the Encryption_Enabled parameter depends on whether the Host + * has indicated support for Secure Connections in the + * Secure_Connections_Host_Support parameter. When + * Secure_Connections_Host_Support is 'disabled' or the Connection_Handle + * refers to an LE link, the Controller shall only use Encryption_Enabled + * values 0x00 (OFF) and 0x01 (ON). + * See Core Specification [Vol 4, Part E, 7.7.8]. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Encryption_Enabled Link Level Encryption. + * Values: + * - 0x00: Link Level Encryption OFF + * - 0x01: Link Level Encryption is ON with AES-CCM + * @return None + */ +void hci_encryption_change_event( uint8_t Status, + uint16_t Connection_Handle, + uint8_t Encryption_Enabled ); + +/** + * @brief HCI_READ_REMOTE_VERSION_INFORMATION_COMPLETE_EVENT + * The Read Remote Version Information Complete event is used to indicate the + * completion of the process obtaining the version information of the remote + * Controller specified by the Connection_Handle event parameter. The + * Connection_Handle shall be for an ACL connection. + * The Version event parameter defines the specification version of the LE + * Controller. + * The Manufacturer_Name event parameter indicates the manufacturer of the + * remote Controller. The Subversion event parameter is controlled by the + * manufacturer and is implementation dependent. The Subversion event parameter + * defines the various revisions that each version of the BLE hardware will go + * through as design processes change and errors are fixed. This allows the + * software to determine what BLE hardware is being used and, if necessary, to + * work around various bugs in the hardware. + * When the Connection_Handle is associated with an LE-U logical link, the + * Version event parameter shall be Link Layer VersNr parameter, the + * Manufacturer_Name event parameter shall be the CompId parameter, and the + * Subversion event parameter shall be the SubVersNr parameter. + * See Core Specification [Vol 4, Part E, 7.7.12]. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Version Version of the Current LMP in the remote Controller + * @param Manufacturer_Name Manufacturer Name of the remote Controller + * @param Subversion Subversion of the LMP in the remote Controller + * @return None + */ +void hci_read_remote_version_information_complete_event( uint8_t Status, + uint16_t Connection_Handle, + uint8_t Version, + uint16_t Manufacturer_Name, + uint16_t Subversion ); + +/** + * @brief HCI_HARDWARE_ERROR_EVENT + * This event is used to notify the Host that a hardware failure has occurred + * in the Controller. + * Refer to Annex for details on the possible values of Hardware_Code. + * + * @param Hardware_Code Implementation-specific hardware code. + * @return None + */ +void hci_hardware_error_event( uint8_t Hardware_Code ); + +/** + * @brief HCI_NUMBER_OF_COMPLETED_PACKETS_EVENT + * This event is used by the Controller to indicate to the Host how many HCI + * Data Packets have been completed (transmitted or flushed) for each + * Connection_Handle since the previous Number Of Completed Packets event was + * sent to the Host. This means that the corresponding buffer space has been + * freed in the Controller. Based on this information, and the + * HC_Total_Num_ACL_Data_Packets and HC_Total_Num_Synchronous_Data_Packets + * return parameter of the Read_Buffer_Size command, the Host can determine for + * which Connection_Handles the following HCI Data Packets should be sent to + * the Controller. The Number Of Completed Packets event must not be sent + * before the corresponding Connection Complete event. While the Controller has + * HCI data packets in its buffer, it must keep sending the Number Of Completed + * Packets event to the Host at least periodically, until it finally reports + * that all the pending ACL Data Packets have been transmitted or flushed. + * + * @param Number_of_Handles The number of Connection_Handles and + * Num_HCI_Data_Packets parameters pairs contained in this event + * @param Handle_Packets_Pair_Entry See @ref Handle_Packets_Pair_Entry_t + * @return None + */ +void hci_number_of_completed_packets_event( uint8_t Number_of_Handles, + const Handle_Packets_Pair_Entry_t* Handle_Packets_Pair_Entry ); + +/** + * @brief HCI_ENCRYPTION_KEY_REFRESH_COMPLETE_EVENT + * This event is used to indicate to the Host that the encryption key was + * refreshed on the given Connection_Handle. The Controller sends this event + * when the encryption key has been refreshed due to encryption being started + * or resumed. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @return None + */ +void hci_encryption_key_refresh_complete_event( uint8_t Status, + uint16_t Connection_Handle ); + +/* HCI LE events */ + +/** + * @brief HCI_LE_CONNECTION_COMPLETE_EVENT + * This event indicates to both of the Hosts forming the connection that a new + * connection has been created. Upon the creation of the connection a + * Connection_Handle shall be assigned by the Controller, and passed to the + * Host in this event. If the connection establishment fails this event shall + * be provided to the Host that had issued the LE_Create_Connection command. + * This event indicates to the Host which issued a LE_Create_Connection command + * and received a Command Status event if the connection establishment failed + * or was successful. + * The Central_Clock_Accuracy parameter is only valid for a Peripheral. On a + * Central, this parameter is set to 0x00. + * See Core Specification [Vol 4, Part E, 7.7.65.1]. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Role Role of the local device in the connection. + * Values: + * - 0x00: Central + * - 0x01: Peripheral + * @param Peer_Address_Type The address type of the peer device. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * @param Peer_Address Public Device Address or Random Device Address of the + * peer device + * @param Conn_Interval Connection interval used on this connection. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Latency Maximum Peripheral latency for the connection in number + * of connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Supervision_Timeout Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + * @param Central_Clock_Accuracy Central clock accuracy. Only valid for a + * Peripheral. + * Values: + * - 0x00: 500 ppm + * - 0x01: 250 ppm + * - 0x02: 150 ppm + * - 0x03: 100 ppm + * - 0x04: 75 ppm + * - 0x05: 50 ppm + * - 0x06: 30 ppm + * - 0x07: 20 ppm + * @return None + */ +void hci_le_connection_complete_event( uint8_t Status, + uint16_t Connection_Handle, + uint8_t Role, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint16_t Conn_Interval, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint8_t Central_Clock_Accuracy ); + +/** + * @brief HCI_LE_ADVERTISING_REPORT_EVENT + * This event indicates that a device or multiple devices have responded to an + * active scan or received some information during a passive scan. The + * Controller may queue these advertising reports and send information from + * multiple devices in one LE Advertising Report event. + * See Core Specification [Vol 4, Part E, 7.7.65.2]. + * Note: in the current BLE stack version, only one report is sent per event + * (Num_Reports = 1). + * + * @param Num_Reports Number of responses in this event. + * Values: + * - 0x01 + * @param Advertising_Report See @ref Advertising_Report_t + * @return None + */ +void hci_le_advertising_report_event( uint8_t Num_Reports, + const Advertising_Report_t* Advertising_Report ); + +/** + * @brief HCI_LE_CONNECTION_UPDATE_COMPLETE_EVENT + * This event is used to indicate that the Controller process to update the + * connection has completed. + * See Core Specification [Vol 4, Part E, 7.7.65.3]. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Conn_Interval Connection interval used on this connection. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Latency Maximum Peripheral latency for the connection in number + * of connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Supervision_Timeout Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + * @return None + */ +void hci_le_connection_update_complete_event( uint8_t Status, + uint16_t Connection_Handle, + uint16_t Conn_Interval, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout ); + +/** + * @brief HCI_LE_READ_REMOTE_FEATURES_PAGE_0_COMPLETE_EVENT + * This event is used to indicate the completion of the process of the + * Controller obtaining page 0 of the features used on the connection and the + * features supported by the remote BLE device specified by the + * Connection_Handle parameter. + * See Core Specification [Vol 4, Part E, 7.7.65.4]. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param LE_Features Bit Mask List of page 0 of the supported LE features. See + * Core Specification [Vol 6, Part B, 4.6]. + * @return None + */ +void hci_le_read_remote_features_page_0_complete_event( uint8_t Status, + uint16_t Connection_Handle, + const uint8_t* LE_Features ); + +/** + * @brief HCI_LE_LONG_TERM_KEY_REQUEST_EVENT + * This event indicates that the Central is attempting to encrypt or re-encrypt + * the link and is requesting the Long Term Key from the Host. + * See Core Specification [Vol 6, Part B, 5.1.3] and [Vol 4, Part E, 7.7.65.5]. + * + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Random_Number 64-bit random number + * @param Encrypted_Diversifier 16-bit encrypted diversifier + * @return None + */ +void hci_le_long_term_key_request_event( uint16_t Connection_Handle, + const uint8_t* Random_Number, + uint16_t Encrypted_Diversifier ); + +/** + * @brief HCI_LE_DATA_LENGTH_CHANGE_EVENT + * This event notifies the Host of a change to either the maximum Payload + * length or the maximum transmission time of packets in either direction. The + * values reported are the maximum that will actually be used on the connection + * following the change, except that on the LE Coded PHY a packet taking up to + * 2704 us to transmit may be sent even though the corresponding parameter has + * a lower value. + * See Core Specification [Vol 4, Part E, 7.7.65.7] and [Vol 6, Part B, + * 4.5.10]. + * + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param MaxTxOctets The maximum number of payload octets in a Link Layer + * packet that the local Controller will send on this connection + * (connEffectiveMaxTxOctets). + * Values: + * - 0x001B ... 0x00FB + * @param MaxTxTime The maximum time that the local Controller will take to + * send a Link Layer packet on this connection (connEffectiveMaxTxTime). + * Values: + * - 0x0148 ... 0x4290 + * @param MaxRxOctets The maximum number of payload octets in a Link Layer + * packet that the local Controller expects to receive on this + * connection (connEffectiveMaxRxOctets). + * Values: + * - 0x001B ... 0x00FB + * @param MaxRxTime The maximum time that the local Controller expects to take + * to receive a Link Layer packet on this connection + * (connEffectiveMaxRxTime). + * Values: + * - 0x0148 ... 0x4290 + * @return None + */ +void hci_le_data_length_change_event( uint16_t Connection_Handle, + uint16_t MaxTxOctets, + uint16_t MaxTxTime, + uint16_t MaxRxOctets, + uint16_t MaxRxTime ); + +/** + * @brief HCI_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE_EVENT + * This event is generated when local P-256 key generation is complete. + * See Core Specification [Vol 4, Part E, 7.7.65.8]. + * + * @param Status Status error code. + * @param Local_P256_Public_Key Local P-256 public key. + * @return None + */ +void hci_le_read_local_p256_public_key_complete_event( uint8_t Status, + const uint8_t* Local_P256_Public_Key ); + +/** + * @brief HCI_LE_GENERATE_DHKEY_COMPLETE_EVENT + * This event indicates that LE Diffie Hellman key generation has been + * completed by the Controller. + * See Core Specification [Vol 4, Part E, 7.7.65.9]. + * + * @param Status Status error code. + * @param DHKey Diffie Hellman Key + * @return None + */ +void hci_le_generate_dhkey_complete_event( uint8_t Status, + const uint8_t* DHKey ); + +/** + * @brief HCI_LE_ENHANCED_CONNECTION_COMPLETE_EVENT + * This event indicates to both of the Hosts forming the connection that a new + * connection has been created. Upon the creation of the connection a + * Connection_Handle shall be assigned by the Controller, and passed to the + * Host in this event. If the connection establishment fails, this event shall + * be provided to the Host that had issued the LE_Create_Connection command. + * If this event is unmasked and LE Connection Complete event is unmasked, only + * the LE Enhanced Connection Complete event is sent when a new connection has + * been completed. + * This event indicates to the Host that issued a LE_Create_Connection command + * and received a Command Status event if the connection establishment failed + * or was successful. + * The Central_Clock_Accuracy parameter is only valid for a Peripheral. On a + * Central, this parameter is set to 0x00. + * See Core Specification [Vol 4, Part E, 7.7.65.10]. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Role Role of the local device in the connection. + * Values: + * - 0x00: Central + * - 0x01: Peripheral + * @param Peer_Address_Type Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Public Identity Address (corresponds to the Resolved Private + * Address) + * - 0x03: Random (static) Identity Address (corresponds to the Resolved + * Private Address) + * @param Peer_Address Public Device Address, Random Device Address, Public + * Identity Address or Random (static) Identity Address of the device to + * be connected. + * @param Local_Resolvable_Private_Address Resolvable Private Address being + * used by the local device for this connection. + * This is only valid when the Own_Address_Type is set to 0x02 or 0x03. + * For other Own_Address_Type values, the Controller shall return all + * zeros. + * @param Peer_Resolvable_Private_Address Resolvable Private Address being used + * by the peer device for this connection. + * This is only valid for Peer_Address_Type 0x02 and 0x03. For other + * Peer_Address_Type values, the Controller shall return all zeros. + * @param Conn_Interval Connection interval used on this connection. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Latency Maximum Peripheral latency for the connection in number + * of connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Supervision_Timeout Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + * @param Central_Clock_Accuracy Central clock accuracy. Only valid for a + * Peripheral. + * Values: + * - 0x00: 500 ppm + * - 0x01: 250 ppm + * - 0x02: 150 ppm + * - 0x03: 100 ppm + * - 0x04: 75 ppm + * - 0x05: 50 ppm + * - 0x06: 30 ppm + * - 0x07: 20 ppm + * @return None + */ +void hci_le_enhanced_connection_complete_event( uint8_t Status, + uint16_t Connection_Handle, + uint8_t Role, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + const uint8_t* Local_Resolvable_Private_Address, + const uint8_t* Peer_Resolvable_Private_Address, + uint16_t Conn_Interval, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint8_t Central_Clock_Accuracy ); + +/** + * @brief HCI_LE_DIRECTED_ADVERTISING_REPORT_EVENT + * This event indicates that directed advertisements have been received where + * the advertiser is using a resolvable private address for the InitA field in + * the ADV_DIRECT_IND PDU and the Scanning_Filter_Policy is equal to 0x02 or + * 0x03, see HCI_LE_Set_Scan_Parameters. + * Direct_Address_Type and Direct_Address specify the address the directed + * advertisements are being directed to. Address_Type and Address specify the + * address of the advertiser sending the directed advertisements. + * See Core Specification [Vol 4, Part E, 7.7.65.11]. + * + * @param Num_Reports Number of responses in this event. + * Values: + * - 0x01 + * @param Direct_Advertising_Report See @ref Direct_Advertising_Report_t + * @return None + */ +void hci_le_directed_advertising_report_event( uint8_t Num_Reports, + const Direct_Advertising_Report_t* Direct_Advertising_Report ); + +/** + * @brief HCI_LE_PHY_UPDATE_COMPLETE_EVENT + * This event is used to indicate that the Controller has changed the + * transmitter PHY or receiver PHY in use. + * If the Controller changes the transmitter PHY, the receiver PHY, or both + * PHYs, this event shall be issued. + * If an LE_Set_PHY command was sent and the Controller determines that neither + * PHY will change as a result, it issues this event immediately. + * See Core Specification [Vol 4, Part E, 7.7.65.12]. + * + * @param Status Status error code. + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param TX_PHY Transmitter PHY in use. + * Values: + * - 0x01: The transmitter PHY for the connection is LE 1M + * - 0x02: The transmitter PHY for the connection is LE 2M + * @param RX_PHY Receiver PHY in use. + * Values: + * - 0x01: The receiver PHY for the connection is LE 1M + * - 0x02: The receiver PHY for the connection is LE 2M + * @return None + */ +void hci_le_phy_update_complete_event( uint8_t Status, + uint16_t Connection_Handle, + uint8_t TX_PHY, + uint8_t RX_PHY ); + +/** + * @brief HCI_LE_EXTENDED_ADVERTISING_REPORT_EVENT + * This event indicates that a BLE device has responded to an active scan or + * has broadcast advertisements that were received during a passive scan. + * See Core Specification [Vol 4, Part E, 7.7.65.13]. + * + * @param Num_Reports Number of responses in this event. + * Values: + * - 0x01 + * @param Event_Type Event type. + * Flags: + * - 0x0001: Connectable advertising + * - 0x0002: Scannable advertising + * - 0x0004: Directed advertising + * - 0x0008: Scan response + * - 0x0010: Legacy advertising PDUs used + * - 0x0020: Incomplete, more data to come + * - 0x0040: Incomplete, data truncated, no more to come + * @param Address_Type Address type of the advertising device. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Public Identity Address (corresponds to Resolved Private + * Address) + * - 0x03: Random (static) Identity Address (corresponds to Resolved + * Private Address) + * - 0xFF: No address provided (anonymous advertisement) + * @param Address Public Device Address, Random Device Address, Public Identity + * Address, or Random (static) Identity Address of the advertising + * device. + * @param Primary_PHY Primary advertising PHY. + * Values: + * - 0x01: Advertiser PHY is LE 1M + * @param Secondary_PHY Secondary advertising PHY. + * Values: + * - 0x00: No packets on the secondary advertising physical channel + * - 0x01: Advertiser PHY is LE 1M + * - 0x02: Advertiser PHY is LE 2M + * - 0x03: Advertiser PHY is LE Coded + * @param Advertising_SID Value of the Advertising SID subfield in the ADI + * field of the PDU or, for scan responses, in the ADI field of the + * original scannable. + * Values: + * - 0xFF: No ADI field provided + * - 0x00 ... 0x0F: Advertising SID subfield + * @param TX_Power Tx Power (signed integer). + * Units: dBm. + * Values: + * - 127: Tx power information not available + * - -127 ... 20: Tx power + * @param RSSI RSSI (signed integer). + * Units: dBm. + * Values: + * - 127: RSSI not available + * - -127 ... 20 + * @param Periodic_Adv_Interval Interval of the periodic advertising. + * Values: + * - 0x0000: No periodic advertising + * @param Direct_Address_Type Target device address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Public Identity Address (Corresponds to Resolved Private + * Address) + * - 0x03: Random (static) Identity Address (Corresponds to Resolved + * Private Address) + * - 0xFE: Random Device Address (Controller unable to resolve) + * @param Direct_Address Public Device Address, Random Device Address, Public + * Identity Address, or Random (static) Identity Address of the target + * device. + * @param Data_Length Length of Data + * @param Data Octets of advertising or scan response data formatted as defined + * in Core Specification [Vol 3, Part C, 11]. + * @return None + */ +void hci_le_extended_advertising_report_event( uint8_t Num_Reports, + uint16_t Event_Type, + uint8_t Address_Type, + const uint8_t* Address, + uint8_t Primary_PHY, + uint8_t Secondary_PHY, + uint8_t Advertising_SID, + uint8_t TX_Power, + uint8_t RSSI, + uint16_t Periodic_Adv_Interval, + uint8_t Direct_Address_Type, + const uint8_t* Direct_Address, + uint8_t Data_Length, + const uint8_t* Data ); + +/** + * @brief HCI_LE_SCAN_TIMEOUT_EVENT + * This event indicates that scanning has ended because the duration has + * expired. + * See Core Specification [Vol 4, Part E, 7.7.65.17]. + * + * @return None + */ +void hci_le_scan_timeout_event( void ); + +/** + * @brief HCI_LE_ADVERTISING_SET_TERMINATED_EVENT + * This event indicates that the Controller has terminated advertising in the + * advertising sets specified by the Advertising_Handle parameter. + * See Core Specification [Vol 4, Part E, 7.7.65.18]. + * + * @param Status Status error code. + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Num_Completed_Ext_Adv_Events Number of completed extended advertising + * events transmitted by the Controller. + * Values: + * - 0x00 ... 0xFF + * @return None + */ +void hci_le_advertising_set_terminated_event( uint8_t Status, + uint8_t Advertising_Handle, + uint16_t Connection_Handle, + uint8_t Num_Completed_Ext_Adv_Events ); + +/** + * @brief HCI_LE_SCAN_REQUEST_RECEIVED_EVENT + * This event indicates that a SCAN_REQ PDU or an AUX_SCAN_REQ PDU has been + * received by the advertiser. The request contains a device address from a + * scanner that is allowed by the advertising filter policy. The advertising + * set is identified by Advertising_Handle. + * See Core Specification [Vol 4, Part E, 7.7.65.19]. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Scanner_Address_Type Scanner address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Public Identity Address (corresponds to Resolved Private + * Address) + * - 0x03: Random (static) Identity Address (corresponds to Resolved + * Private Address) + * @param Scanner_Address Public Device Address, Random Device Address, Public + * Identity Address, or Random (static) Identity Address of the scanner + * device. + * @return None + */ +void hci_le_scan_request_received_event( uint8_t Advertising_Handle, + uint8_t Scanner_Address_Type, + const uint8_t* Scanner_Address ); + +/** + * @brief HCI_LE_CHANNEL_SELECTION_ALGORITHM_EVENT + * This event indicates which channel selection algorithm is used on a data + * physical channel connection. + * See Core Specification [Vol 4, Part E, 7.7.65.20]. + * + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Channel_Selection_Algorithm LE Channel Selection Algorithm. + * Values: + * - 0x00: Algorithm #1 is used + * - 0x01: Algorithm #2 is used + * @return None + */ +void hci_le_channel_selection_algorithm_event( uint16_t Connection_Handle, + uint8_t Channel_Selection_Algorithm ); + +/* ACI General events */ + +/** + * @brief ACI_WARNING_EVENT + * This event is generated to report warning information. + * + * @param Warning_Type Warning type + * Values: + * - 0x01: L2CAP recombination failure + * - 0x02: GATT unexpected peer message + * - 0x03: NVM almost full + * - 0x04: COC RX data length too large + * - 0x05: COC already assigned DCID + * - 0x06: SMP unexpected LTK request + * - 0x07: GATT bearer not allocated + * @param Data_Length Length of Data in octets + * @param Data Debug information. + * @return None + */ +void aci_warning_event( uint8_t Warning_Type, + uint8_t Data_Length, + const uint8_t* Data ); + +/* ACI GAP events */ + +/** + * @brief ACI_GAP_LIMITED_DISCOVERABLE_EVENT + * This event is generated by the controller when the limited discoverable mode + * ends due to timeout. The timeout is 180 seconds. + * + * @return None + */ +void aci_gap_limited_discoverable_event( void ); + +/** + * @brief ACI_GAP_PAIRING_COMPLETE_EVENT + * This event is generated when the pairing process has completed successfully + * or a pairing procedure timeout has occurred or the pairing has failed. This + * is to notify the application that we have paired with a remote device so + * that it can take further actions or to notify that a timeout has occurred so + * that the upper layer can decide to disconnect the link. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Status Pairing status + * Values: + * - 0x00: Success + * - 0x01: SMP timeout + * - 0x02: Pairing failed + * - 0x03: Encryption failed + * @param Reason Pairing failed reason code (valid in case of pairing failed + * status) + * Values: + * - 0x01: Passkey Entry Failed + * - 0x02: OOB Not Available + * - 0x03: Authentication Requirements + * - 0x04: Confirm Value Failed + * - 0x05: Pairing Not Supported + * - 0x06: Encryption Key Size + * - 0x07: Command Not Supported + * - 0x08: Unspecified Reason + * - 0x09: Repeated Attempts + * - 0x0A: Invalid Parameters + * - 0x0B: DHKey Check Failed + * - 0x0C: Numeric Comparison Failed + * - 0x0F: Key Rejected + * - 0x10: Busy + * @return None + */ +void aci_gap_pairing_complete_event( uint16_t Connection_Handle, + uint8_t Status, + uint8_t Reason ); + +/** + * @brief ACI_GAP_PASS_KEY_REQ_EVENT + * This event is generated by the Security manager to the application when a + * passkey is required for pairing. When this event is received, the + * application has to respond with the ACI_GAP_PASS_KEY_RESP command. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @return None + */ +void aci_gap_pass_key_req_event( uint16_t Connection_Handle ); + +/** + * @brief ACI_GAP_AUTHORIZATION_REQ_EVENT + * This event is generated by the Security manager to the application when the + * application has set that authorization is required for reading/writing of + * attributes. This event will be generated as soon as the pairing is complete. + * When this event is received, ACI_GAP_AUTHORIZATION_RESP command should be + * used to respond by the application. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @return None + */ +void aci_gap_authorization_req_event( uint16_t Connection_Handle ); + +/** + * @brief ACI_GAP_BOND_LOST_EVENT + * This event is generated when a pairing request is issued in response to a + * Peripheral Security Request from a Central which has previously bonded with + * the Peripheral. When this event is received, the upper layer has to issue + * the command ACI_GAP_ALLOW_REBOND in order to allow the Peripheral to + * continue the pairing process with the Central. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @return None + */ +void aci_gap_bond_lost_event( uint16_t Connection_Handle ); + +/** + * @brief ACI_GAP_PROC_COMPLETE_EVENT + * This event is sent by the GAP to the upper layers when a procedure + * previously started has been terminated by the upper layer or has completed + * for any other reason + * + * @param Procedure_Code Terminated procedure. + * Values: + * - 0x01: GAP_LIMITED_DISCOVERY_PROC + * - 0x02: GAP_GENERAL_DISCOVERY_PROC + * - 0x08: GAP_AUTO_CONNECTION_ESTABLISHMENT_PROC + * - 0x10: GAP_GENERAL_CONNECTION_ESTABLISHMENT_PROC + * - 0x20: GAP_SELECTIVE_CONNECTION_ESTABLISHMENT_PROC + * - 0x40: GAP_DIRECT_CONNECTION_ESTABLISHMENT_PROC + * - 0x80: GAP_OBSERVATION_PROC + * @param Status Status error code. + * @param Data_Length Length of Data in octets + * @param Data Procedure Specific Data. + * @return None + */ +void aci_gap_proc_complete_event( uint8_t Procedure_Code, + uint8_t Status, + uint8_t Data_Length, + const uint8_t* Data ); + +/** + * @brief ACI_GAP_ADDR_NOT_RESOLVED_EVENT + * This event is sent only by a privacy enabled peripheral with a non-empty + * bonded device list. The event is sent to the application when the peripheral + * is unsuccessful in resolving the resolvable address of the peer device after + * connecting to it. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @return None + */ +void aci_gap_addr_not_resolved_event( uint16_t Connection_Handle ); + +/** + * @brief ACI_GAP_NUMERIC_COMPARISON_VALUE_EVENT + * This event is sent only during SC Pairing, when Numeric Comparison + * Association model is selected, in order to show the Numeric Value generated, + * and to ask for Confirmation to the User. When this event is received, the + * application has to respond with the ACI_GAP_NUMERIC_COMPARISON_RESP command. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Numeric_Value Generated numeric value. + * @return None + */ +void aci_gap_numeric_comparison_value_event( uint16_t Connection_Handle, + uint32_t Numeric_Value ); + +/** + * @brief ACI_GAP_KEYPRESS_NOTIFICATION_EVENT + * This event is sent only during SC Pairing, when Keypress Notifications are + * supported, in order to show the input type signaled by the peer device, + * having Keyboard only I/O capabilities. When this event is received, no + * action is required to the User. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Notification_Type Type of Keypress input notified/signaled by peer + * device (having Keyboard only I/O capabilities. + * @return None + */ +void aci_gap_keypress_notification_event( uint16_t Connection_Handle, + uint8_t Notification_Type ); + +/** + * @brief ACI_GAP_PAIRING_REQUEST_EVENT + * This event is sent only when SMP mode bit 3 is configured to 1. With this + * configuration, it is generated in two cases: + * - in Peripheral case, when a Pairing Request is received; + * - in Central case, when a Security Request is received that leads to the + * sending of a Pairing Request. + * The application shall respond to this event with + * ACI_GAP_PAIRING_REQUEST_REPLY command. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Bonded Indicates if the peer device is already bonded or not. + * Values: + * - 0x00: The device is not already bonded + * - 0x01: The device is already bonded + * @param Auth_Req AuthReq field from Pairing Request (see Core Specification + * [Vol 3, Part H, 3.5.1]) or Security Request (see Core Specification + * [Vol 3, Part H, 3.6.7]). + * @return None + */ +void aci_gap_pairing_request_event( uint16_t Connection_Handle, + uint8_t Bonded, + uint8_t Auth_Req ); + +/* ACI GATT/ATT events */ + +/** + * @brief ACI_GATT_ATTRIBUTE_MODIFIED_EVENT + * This event is generated to the application by the GATT server when a client + * modifies any attribute on the server, as consequence of one of the following + * GATT procedures: + * - write without response + * - signed write without response + * - write characteristic value + * - write long characteristic value + * - reliable write. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the attribute that was modified. + * @param Offset Bits 14-0: offset from which the write has been performed by + * the peer device. Bit 15 is used as flag: when set to 1 it indicates + * that more data are to come (fragmented event in case of long + * attribute data). + * @param Attr_Data_Length Length of Attr_Data in octets + * @param Attr_Data The modified value + * @return None + */ +void aci_gatt_attribute_modified_event( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Offset, + uint16_t Attr_Data_Length, + const uint8_t* Attr_Data ); + +/** + * @brief ACI_GATT_PROC_TIMEOUT_EVENT + * This event is generated by the client/server to the application on a GATT + * timeout (30 seconds). This is a critical event that should not happen during + * normal operating conditions. It is an indication of either a major + * disruption in the communication link or a mistake in the application which + * does not provide a reply to GATT procedures. After this event, the GATT + * channel is closed and no more GATT communication can be performed. The + * application is expected to issue an ACI_GAP_TERMINATE to disconnect from the + * peer device. It is important to leave a 100 ms blank window before sending + * the ACI_GAP_TERMINATE, since immediately after this event, system could save + * important information in non-volatile memory. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @return None + */ +void aci_gatt_proc_timeout_event( uint16_t Connection_Handle ); + +/** + * @brief ACI_ATT_EXCHANGE_MTU_RESP_EVENT + * This event is generated in response to an Exchange MTU request. See + * ACI_GATT_EXCHANGE_CONFIG. + * + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Server_RX_MTU Attribute server receive MTU size + * @return None + */ +void aci_att_exchange_mtu_resp_event( uint16_t Connection_Handle, + uint16_t Server_RX_MTU ); + +/** + * @brief ACI_ATT_FIND_INFO_RESP_EVENT + * This event is generated in response to a Find Information Request. See + * ACI_ATT_FIND_INFO_REQ and Find Information Response in Core Specification. + * This event is also generated in response to ACI_GATT_DISC_ALL_CHAR_DESC + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Format Format of the handle-UUID pairs + * @param Event_Data_Length Length of Handle_UUID_Pair in octets + * @param Handle_UUID_Pair A sequence of handle-uuid pairs. if format=1, each + * pair is:[2 octets for handle, 2 octets for UUIDs], if format=2, each + * pair is:[2 octets for handle, 16 octets for UUIDs] + * @return None + */ +void aci_att_find_info_resp_event( uint16_t Connection_Handle, + uint8_t Format, + uint8_t Event_Data_Length, + const uint8_t* Handle_UUID_Pair ); + +/** + * @brief ACI_ATT_FIND_BY_TYPE_VALUE_RESP_EVENT + * This event is generated in response to a ACI_ATT_FIND_BY_TYPE_VALUE_REQ + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Num_of_Handle_Pair Number of attribute, group handle pairs + * @param Attribute_Group_Handle_Pair See @ref Attribute_Group_Handle_Pair_t + * @return None + */ +void aci_att_find_by_type_value_resp_event( uint16_t Connection_Handle, + uint8_t Num_of_Handle_Pair, + const Attribute_Group_Handle_Pair_t* Attribute_Group_Handle_Pair ); + +/** + * @brief ACI_ATT_READ_BY_TYPE_RESP_EVENT + * This event is generated in response to a ACI_ATT_READ_BY_TYPE_REQ. See + * ACI_GATT_FIND_INCLUDED_SERVICES and ACI_GATT_DISC_ALL_CHAR_DESC. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Handle_Value_Pair_Length The size of each attribute handle-value pair + * @param Data_Length Length of Handle_Value_Pair_Data in octets + * @param Handle_Value_Pair_Data Attribute Data List as defined in Core + * Specification. A sequence of handle-value pairs: [2 octets for + * Attribute Handle, (Handle_Value_Pair_Length - 2 octets) for Attribute + * Value] + * @return None + */ +void aci_att_read_by_type_resp_event( uint16_t Connection_Handle, + uint8_t Handle_Value_Pair_Length, + uint8_t Data_Length, + const uint8_t* Handle_Value_Pair_Data ); + +/** + * @brief ACI_ATT_READ_RESP_EVENT + * This event is generated in response to a Read Request. See + * ACI_GATT_READ_CHAR_VALUE. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Event_Data_Length Length of following data + * @param Attribute_Value The value of the attribute. + * @return None + */ +void aci_att_read_resp_event( uint16_t Connection_Handle, + uint8_t Event_Data_Length, + const uint8_t* Attribute_Value ); + +/** + * @brief ACI_ATT_READ_BLOB_RESP_EVENT + * This event can be generated during a read long characteristic value + * procedure. See ACI_GATT_READ_LONG_CHAR_VALUE. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Event_Data_Length Length of following data + * @param Attribute_Value Part of the attribute value. + * @return None + */ +void aci_att_read_blob_resp_event( uint16_t Connection_Handle, + uint8_t Event_Data_Length, + const uint8_t* Attribute_Value ); + +/** + * @brief ACI_ATT_READ_MULTIPLE_RESP_EVENT + * This event is generated in response to a Read Multiple Characteristic Values + * Request or a Read Multiple Variable Length Characteristic Values Request. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Event_Data_Length Length of following data + * @param Set_Of_Values A set of two or more values. + * A concatenation of attribute values for each of the attribute handles + * in the request in the order that they were requested. + * @return None + */ +void aci_att_read_multiple_resp_event( uint16_t Connection_Handle, + uint8_t Event_Data_Length, + const uint8_t* Set_Of_Values ); + +/** + * @brief ACI_ATT_READ_BY_GROUP_TYPE_RESP_EVENT + * This event is generated in response to a Read By Group Type Request. See + * ACI_GATT_DISC_ALL_PRIMARY_SERVICES. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Data_Length The size of each attribute data + * @param Data_Length Length of Attribute_Data_List in octets + * @param Attribute_Data_List Attribute Data List as defined in Core + * Specification. A sequence of attribute handle, end group handle, + * attribute value tuples: [2 octets for Attribute Handle, 2 octets End + * Group Handle, (Attribute_Data_Length - 4 octets) for Attribute Value] + * @return None + */ +void aci_att_read_by_group_type_resp_event( uint16_t Connection_Handle, + uint8_t Attribute_Data_Length, + uint8_t Data_Length, + const uint8_t* Attribute_Data_List ); + +/** + * @brief ACI_ATT_PREPARE_WRITE_RESP_EVENT + * This event is generated in response to a ACI_ATT_PREPARE_WRITE_REQ. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute to be written + * @param Offset The offset of the first octet to be written. + * @param Part_Attribute_Value_Length Length of Part_Attribute_Value in octets + * @param Part_Attribute_Value The value of the attribute to be written + * @return None + */ +void aci_att_prepare_write_resp_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint16_t Offset, + uint8_t Part_Attribute_Value_Length, + const uint8_t* Part_Attribute_Value ); + +/** + * @brief ACI_ATT_EXEC_WRITE_RESP_EVENT + * This event is generated in response to an Execute Write Request. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @return None + */ +void aci_att_exec_write_resp_event( uint16_t Connection_Handle ); + +/** + * @brief ACI_GATT_INDICATION_EVENT + * This event is generated when an indication is received from the server. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute + * @param Attribute_Value_Length Length of Attribute_Value in octets + * @param Attribute_Value The current value of the attribute + * @return None + */ +void aci_gatt_indication_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint8_t Attribute_Value_Length, + const uint8_t* Attribute_Value ); + +/** + * @brief ACI_GATT_NOTIFICATION_EVENT + * This event is generated when a notification is received from the server. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute + * @param Attribute_Value_Length Length of Attribute_Value in octets + * @param Attribute_Value The current value of the attribute + * @return None + */ +void aci_gatt_notification_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint8_t Attribute_Value_Length, + const uint8_t* Attribute_Value ); + +/** + * @brief ACI_GATT_PROC_COMPLETE_EVENT + * This event is generated when a GATT client procedure completes either with + * error or successfully. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Error_Code Indicates whether the procedure completed with an error or + * was successful (see "Status error codes" section) + * @return None + */ +void aci_gatt_proc_complete_event( uint16_t Connection_Handle, + uint8_t Error_Code ); + +/** + * @brief ACI_GATT_ERROR_RESP_EVENT + * This event is generated when an Error Response is received from the server. + * The error response can be given by the server at the end of one of the GATT + * discovery procedures. This does not mean that the procedure ended with an + * error, but this error event is part of the procedure itself. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Req_Opcode The request that generated this error response + * @param Attribute_Handle The attribute handle that generated this error + * response + * @param Error_Code The reason why the request has generated an error response + * (ATT error codes) + * Values: + * - 0x01: Invalid handle + * - 0x02: Read not permitted + * - 0x03: Write not permitted + * - 0x04: Invalid PDU + * - 0x05: Insufficient authentication + * - 0x06: Request not supported + * - 0x07: Invalid offset + * - 0x08: Insufficient authorization + * - 0x09: Prepare queue full + * - 0x0A: Attribute not found + * - 0x0B: Attribute not long + * - 0x0C: Insufficient encryption key size + * - 0x0D: Invalid attribute value length + * - 0x0E: Unlikely error + * - 0x0F: Insufficient encryption + * - 0x10: Unsupported group type + * - 0x11: Insufficient resources + * - 0x12: Database Out Of Sync + * - 0x13: Value Not Allowed + * @return None + */ +void aci_gatt_error_resp_event( uint16_t Connection_Handle, + uint8_t Req_Opcode, + uint16_t Attribute_Handle, + uint8_t Error_Code ); + +/** + * @brief ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_EVENT + * This event can be generated during a "Discover Characteristics By UUID" + * procedure or a "Read using Characteristic UUID" procedure. + * The attribute value will be a service declaration as defined in Core + * Specification [Vol 3, Part G, 3.3.1], when a "Discover Characteristics By + * UUID" has been started. It will be the value of the Characteristic if a* + * "Read using Characteristic UUID" has been performed. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute + * @param Attribute_Value_Length Length of Attribute_Value in octets + * @param Attribute_Value The attribute value will be a service declaration as + * defined in Core Specification [Vol 3, Part G, 3.3.1], when a + * "Discover Characteristics By UUID" has been started. + * It will be the value of the Characteristic if a "Read using + * Characteristic UUID" has been performed. + * @return None + */ +void aci_gatt_disc_read_char_by_uuid_resp_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint8_t Attribute_Value_Length, + const uint8_t* Attribute_Value ); + +/** + * @brief ACI_GATT_WRITE_PERMIT_REQ_EVENT + * This event is given to the application when a write request, write command + * or signed write command is received by the server from the client. This + * event will be given to the application only if the event bit for this event + * generation is set when the characteristic was added. + * When this event is received, the application has to check whether the value + * being requested for write can be allowed to be written and respond with the + * command ACI_GATT_WRITE_RESP. + * The details of the parameters of the command can be found. Based on the + * response from the application, the attribute value will be modified by the + * stack. If the write is rejected by the application, then the value of the + * attribute will not be modified. In case of a write REQ, an error response + * will be sent to the client, with the error code as specified by the + * application. + * In case of write/signed write commands, no response is sent to the client + * but the attribute is not modified. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute + * @param Data_Length Length of Data field + * @param Data The data that the client has requested to write + * @return None + */ +void aci_gatt_write_permit_req_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint8_t Data_Length, + const uint8_t* Data ); + +/** + * @brief ACI_GATT_READ_PERMIT_REQ_EVENT + * This event is given to the application when a read request or read blob + * request is received by the server from the client. This event will be given + * to the application only if the event bit for this event generation is set + * when the characteristic was added. + * On receiving this event, the application can update the value of the handle + * if it desires and when done, it must send the ACI_GATT_ALLOW_READ command to + * indicate to the stack that it can send the response to the client. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute + * @param Offset Contains the offset from which the read has been requested + * @return None + */ +void aci_gatt_read_permit_req_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint16_t Offset ); + +/** + * @brief ACI_GATT_READ_MULTI_PERMIT_REQ_EVENT + * This event is given to the application when a read multiple request or read + * by type request is received by the server from the client. This event will + * be given to the application only if the event bit for this event generation + * is set when the characteristic was added. + * On receiving this event, the application can update the values of the + * handles if it desires and when done, it must send the ACI_GATT_ALLOW_READ + * command to indicate to the stack that it can send the response to the + * client. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Handle_Item See @ref Handle_Item_t + * @return None + */ +void aci_gatt_read_multi_permit_req_event( uint16_t Connection_Handle, + uint8_t Number_of_Handles, + const Handle_Item_t* Handle_Item ); + +/** + * @brief ACI_GATT_TX_POOL_AVAILABLE_EVENT + * Each time one of the following GATT commands raises the error code + * BLE_STATUS_INSUFFICIENT_RESOURCES, the ACI_GATT_TX_POOL_AVAILABLE_EVENT + * event is generated as soon as there is at least one buffer (with a size of + * ATT_MTU) available in the TX pool: + * - ACI_GATT_UPDATE_CHAR_VALUE, + * - ACI_GATT_UPDATE_CHAR_VALUE_EXT, + * - ACI_GATT_SEND_MULT_NOTIFICATION, + * - ACI_GATT_WRITE_WITHOUT_RESP, + * - ACI_GATT_SIGNED_WRITE_WITHOUT_RESP. + * + * @param Connection_Handle Not used. + * @param Available_Buffers Number of buffers available. + * @return None + */ +void aci_gatt_tx_pool_available_event( uint16_t Connection_Handle, + uint16_t Available_Buffers ); + +/** + * @brief ACI_GATT_SERVER_CONFIRMATION_EVENT + * This event is generated when the client has sent the confirmation to a + * previously sent indication + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @return None + */ +void aci_gatt_server_confirmation_event( uint16_t Connection_Handle ); + +/** + * @brief ACI_GATT_PREPARE_WRITE_PERMIT_REQ_EVENT + * This event is given to the application when a prepare write request is + * received by the server from the client. This event will be given to the + * application only if the event bit for this event generation is set when the + * characteristic was added. + * When this event is received, the application has to check whether the value + * being requested for write can be allowed to be written and respond with the + * command ACI_GATT_WRITE_RESP. Based on the response from the application, the + * attribute value will be modified by the stack. + * If the write is rejected by the application, then the value of the attribute + * will not be modified and an error response will be sent to the client, with + * the error code as specified by the application. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute + * @param Offset The offset from which the prepare write has been requested + * @param Data_Length Length of Data field + * @param Data The data that the client has requested to write + * @return None + */ +void aci_gatt_prepare_write_permit_req_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint16_t Offset, + uint8_t Data_Length, + const uint8_t* Data ); + +/** + * @brief ACI_GATT_EATT_BEARER_EVENT + * This event informs the application of a change in status of the Enhanced ATT + * bearer handled by the specified L2CAP channel. + * + * @param Connection_Handle Connection handle for which the event applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Channel_Index Index of the connection-oriented channel for which the + * primitive applies. + * @param EAB_State Enhanced ATT bearer state. + * Values: + * - 0x00: Enhanced ATT bearer created + * - 0x01: Enhanced ATT bearer terminated + * - 0x02: Enhanced ATT bearer reconfigured + * @param MTU ATT_MTU value used on the bearer. + * Values: + * - 64 ... 246 + * @return None + */ +void aci_gatt_eatt_bearer_event( uint16_t Connection_Handle, + uint8_t Channel_Index, + uint8_t EAB_State, + uint16_t MTU ); + +/** + * @brief ACI_GATT_MULT_NOTIFICATION_EVENT + * This event is generated when a Multiple Handle Value notification is + * received from the server. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Offset Bits 14-0: offset in octets from which Attribute_Value data + * starts. Bit 15 is used as flag: when set to 1 it indicates that more + * data are to come (fragmented event in case of long attribute data). + * @param Data_Length Length of Data in bytes + * @param Data List of "Handle Length Value" tuples as defined in Core + * Specification + * @return None + */ +void aci_gatt_mult_notification_event( uint16_t Connection_Handle, + uint16_t Offset, + uint16_t Data_Length, + const uint8_t* Data ); + +/** + * @brief ACI_GATT_NOTIFICATION_COMPLETE_EVENT + * This event is generated on server side after the transmission of all + * notifications linked with a local update of a characteristic value (if it is + * enabled at the creation of the characteristic with + * GATT_NOTIFY_NOTIFICATION_COMPLETION mask and if the characteristic supports + * notifications). + * + * @param Attr_Handle Handle of the updated characteristic value + * @return None + */ +void aci_gatt_notification_complete_event( uint16_t Attr_Handle ); + +/** + * @brief ACI_GATT_READ_EXT_EVENT + * When it is enabled with ACI_GATT_SET_EVENT_MASK, this event is generated + * instead of ACI_ATT_READ_RESP_EVENT / ACI_ATT_READ_BLOB_RESP_EVENT / + * ACI_ATT_READ_MULTIPLE_RESP_EVENT. + * This event should be used instead of those events when ATT_MTU > + * (BLE_EVT_MAX_PARAM_LEN - 4) i.e. ATT_MTU > 251 for BLE_EVT_MAX_PARAM_LEN + * default value. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Offset Bits 14-0: offset in octets from which Attribute_Value data + * starts. Bit 15 is used as flag: when set to 1 it indicates that more + * data are to come (fragmented event in case of long attribute data). + * @param Event_Data_Length Length of following data + * @param Attribute_Value The value of the attribute(s). + * @return None + */ +void aci_gatt_read_ext_event( uint16_t Connection_Handle, + uint16_t Offset, + uint16_t Event_Data_Length, + const uint8_t* Attribute_Value ); + +/** + * @brief ACI_GATT_INDICATION_EXT_EVENT + * When it is enabled with ACI_GATT_SET_EVENT_MASK and when an indication is + * received from the server, this event is generated instead of + * ACI_GATT_INDICATION_EVENT. + * This event should be used instead of ACI_GATT_INDICATION_EVENT when ATT_MTU + * > (BLE_EVT_MAX_PARAM_LEN - 4) i.e. ATT_MTU > 251 for BLE_EVT_MAX_PARAM_LEN + * default value. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute + * @param Offset Bits 14-0: offset in octets from which Attribute_Value data + * starts. Bit 15 is used as flag: when set to 1 it indicates that more + * data are to come (fragmented event in case of long attribute data). + * @param Attribute_Value_Length Length of Attribute_Value in octets + * @param Attribute_Value The current value of the attribute + * @return None + */ +void aci_gatt_indication_ext_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint16_t Offset, + uint16_t Attribute_Value_Length, + const uint8_t* Attribute_Value ); + +/** + * @brief ACI_GATT_NOTIFICATION_EXT_EVENT + * When it is enabled with ACI_GATT_SET_EVENT_MASK and when a notification is + * received from the server, this event is generated instead of + * ACI_GATT_NOTIFICATION_EVENT. + * This event should be used instead of ACI_GATT_NOTIFICATION_EVENT when + * ATT_MTU > (BLE_EVT_MAX_PARAM_LEN - 4) i.e. ATT_MTU > 251 for + * BLE_EVT_MAX_PARAM_LEN default value. + * + * @param Connection_Handle Specifies the ATT bearer for which the event + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attribute_Handle The handle of the attribute + * @param Offset Bits 14-0: offset in octets from which Attribute_Value data + * starts. Bit 15 is used as flag: when set to 1 it indicates that more + * data are to come (fragmented event in case of long attribute data). + * @param Attribute_Value_Length Length of Attribute_Value in octets + * @param Attribute_Value The current value of the attribute + * @return None + */ +void aci_gatt_notification_ext_event( uint16_t Connection_Handle, + uint16_t Attribute_Handle, + uint16_t Offset, + uint16_t Attribute_Value_Length, + const uint8_t* Attribute_Value ); + +/* ACI L2CAP events */ + +/** + * @brief ACI_L2CAP_CONNECTION_UPDATE_RESP_EVENT + * This event is generated when the Central responds to the connection update + * request packet with a connection update response packet. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Result Result field from the response packet. + * Values: + * - 0x0000: Connection Parameters accepted + * - 0x0001: Connection Parameters rejected + * @return None + */ +void aci_l2cap_connection_update_resp_event( uint16_t Connection_Handle, + uint16_t Result ); + +/** + * @brief ACI_L2CAP_PROC_TIMEOUT_EVENT + * This event is generated when the Central does not respond to the connection + * update request packet with a connection update response packet or a command + * reject packet within 30 seconds. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Data_Length Length of following data + * Values: + * - 0x00 + * @param Data Not used + * @return None + */ +void aci_l2cap_proc_timeout_event( uint16_t Connection_Handle, + uint8_t Data_Length, + const uint8_t* Data ); + +/** + * @brief ACI_L2CAP_CONNECTION_UPDATE_REQ_EVENT + * The event is given by the L2CAP layer when a connection update request is + * received from the Peripheral. The upper layer which receives this event has + * to respond by sending a ACI_L2CAP_CONNECTION_PARAMETER_UPDATE_RESP command. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Identifier Received identifier. + * @param L2CAP_Length Length of the L2CAP connection update request. + * @param Interval_Min Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Interval_Max Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Latency Maximum Peripheral latency for the connection in number of + * connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Timeout_Multiplier Defines connection timeout parameter in the + * following manner: Timeout Multiplier * 10ms. + * @return None + */ +void aci_l2cap_connection_update_req_event( uint16_t Connection_Handle, + uint8_t Identifier, + uint16_t L2CAP_Length, + uint16_t Interval_Min, + uint16_t Interval_Max, + uint16_t Latency, + uint16_t Timeout_Multiplier ); + +/** + * @brief ACI_L2CAP_COMMAND_REJECT_EVENT + * This event is generated upon receipt of a valid L2CAP Command Reject packet + * (e.g. when the Central responds to the Connection Update Request packet with + * a L2CAP Command Reject packet). + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Identifier Received identifier. + * @param Reason Describes why the request packet was rejected. + * Values: + * - 0x0000: Command not understood + * - 0x0001: Signaling MTU exceeded + * - 0x0002: Invalid CID in request + * @param Data_Length Length of following data + * @param Data Data field associated with Reason (see Core Specification [Vol + * 3, Part A, 4.1]) + * @return None + */ +void aci_l2cap_command_reject_event( uint16_t Connection_Handle, + uint8_t Identifier, + uint16_t Reason, + uint8_t Data_Length, + const uint8_t* Data ); + +/** + * @brief ACI_L2CAP_COC_CONNECT_EVENT + * This event is generated when receiving a valid Credit Based Connection + * Request packet. + * See Core Specification [Vol 3, Part A]. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param SPSM Simplified Protocol/Service Multiplexer. + * Values: + * - 0x0001 ... 0x00FF + * @param MTU Maximum Transmission Unit. + * Values: + * - 23 ... 65535 + * - 64 ... 246: for Enhanced ATT + * @param MPS Maximum payload size (in octets). + * Values: + * - 23 ... 248 + * - 64 ... 248: for Enhanced ATT + * @param Initial_Credits Number of K-frames that can be received on the + * created channel(s) by the L2CAP layer entity sending this packet. + * Values: + * - 0 ... 65535 + * @param Channel_Number Number of channels to be created. If this parameter is + * set to 0, it requests the creation of one LE credit based connection- + * oriented channel. Otherwise, it requests the creation of one or more + * enhanced credit based connection-oriented channels. + * Values: + * - 0 ... 5 + * @return None + */ +void aci_l2cap_coc_connect_event( uint16_t Connection_Handle, + uint16_t SPSM, + uint16_t MTU, + uint16_t MPS, + uint16_t Initial_Credits, + uint8_t Channel_Number ); + +/** + * @brief ACI_L2CAP_COC_CONNECT_CONFIRM_EVENT + * This event is generated when receiving a valid Credit Based Connection + * Response packet. + * See Core Specification [Vol 3, Part A]. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param MTU Maximum Transmission Unit. + * Values: + * - 23 ... 65535 + * - 64 ... 246: for Enhanced ATT + * @param MPS Maximum payload size (in octets). + * Values: + * - 23 ... 248 + * - 64 ... 248: for Enhanced ATT + * @param Initial_Credits Number of K-frames that can be received on the + * created channel(s) by the L2CAP layer entity sending this packet. + * Values: + * - 0 ... 65535 + * @param Result Indicates the outcome of the request. See Core Specification + * [Vol 3, Part A, Table 4.16] for LE credit based connection-oriented + * channels, or [Vol 3, Part A, Table 4.17] for enhanced credit based + * connection-oriented channels. + * Values: + * - 0x0000 ... 0x000F + * @param Channel_Number Number of created channels. It is the length of + * Channel_Index_List. + * Values: + * - 0 ... 5 + * @param Channel_Index_List List of channel indexes for which the primitive + * applies. + * @return None + */ +void aci_l2cap_coc_connect_confirm_event( uint16_t Connection_Handle, + uint16_t MTU, + uint16_t MPS, + uint16_t Initial_Credits, + uint16_t Result, + uint8_t Channel_Number, + const uint8_t* Channel_Index_List ); + +/** + * @brief ACI_L2CAP_COC_RECONF_EVENT + * This event is generated when receiving a valid Credit Based Reconfigure + * Request packet. + * See Core Specification [Vol 3, Part A]. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param MTU Maximum Transmission Unit. + * Values: + * - 23 ... 65535 + * - 64 ... 246: for Enhanced ATT + * @param MPS Maximum payload size (in octets). + * Values: + * - 23 ... 248 + * - 64 ... 248: for Enhanced ATT + * @param Channel_Number Number of created channels. It is the length of + * Channel_Index_List. + * Values: + * - 1 ... 5 + * @param Channel_Index_List List of channel indexes for which the primitive + * applies. + * @return None + */ +void aci_l2cap_coc_reconf_event( uint16_t Connection_Handle, + uint16_t MTU, + uint16_t MPS, + uint8_t Channel_Number, + const uint8_t* Channel_Index_List ); + +/** + * @brief ACI_L2CAP_COC_RECONF_CONFIRM_EVENT + * This event is generated when receiving a valid Credit Based Reconfigure + * Response packet. + * See Core Specification [Vol 3, Part A]. + * + * @param Connection_Handle Handle of the connection where this event occurred. + * Values: + * - 0x0000 ... 0x0EFF + * @param Result Indicates the outcome of the request. See Core Specification + * [Vol 3, Part A, Table 4.18]. + * Values: + * - 0x0000 ... 0x0004 + * @return None + */ +void aci_l2cap_coc_reconf_confirm_event( uint16_t Connection_Handle, + uint16_t Result ); + +/** + * @brief ACI_L2CAP_COC_DISCONNECT_EVENT + * This event is generated when a connection-oriented channel is disconnected + * following an L2CAP channel termination procedure. + * See Core Specification [Vol 3, Part A]. + * + * @param Channel_Index Index of the connection-oriented channel for which the + * primitive applies. + * @return None + */ +void aci_l2cap_coc_disconnect_event( uint8_t Channel_Index ); + +/** + * @brief ACI_L2CAP_COC_FLOW_CONTROL_EVENT + * This event is generated when receiving a valid Flow Control Credit signaling + * packet. + * See Core Specification [Vol 3, Part A]. + * + * @param Channel_Index Index of the connection-oriented channel for which the + * primitive applies. + * @param Credits Number of credits the receiving device can increment, + * corresponding to the number of K-frames that can be sent to the peer + * device sending the Flow Control Credit packet. + * Values: + * - 1 ... 65535 + * @return None + */ +void aci_l2cap_coc_flow_control_event( uint8_t Channel_Index, + uint16_t Credits ); + +/** + * @brief ACI_L2CAP_COC_RX_DATA_EVENT + * This event is generated when receiving a valid K-frame packet on a + * connection-oriented channel. + * See Core Specification [Vol 3, Part A]. + * Note: for the first K-frame of the SDU, the Information data contains the + * L2CAP SDU Length coded on two octets followed by the K-frame information + * payload. For the next K-frames of the SDU, the Information data only + * contains the K-frame information payload. + * + * @param Channel_Index Index of the connection-oriented channel for which the + * primitive applies. + * @param Length Length of Data (in octets) + * @param Data Information data + * @return None + */ +void aci_l2cap_coc_rx_data_event( uint8_t Channel_Index, + uint16_t Length, + const uint8_t* Data ); + +/** + * @brief ACI_L2CAP_COC_TX_POOL_AVAILABLE_EVENT + * Each time ACI_L2CAP_COC_TX_DATA raises the error code + * BLE_STATUS_INSUFFICIENT_RESOURCES, the ACI_L2CAP_COC_TX_POOL_AVAILABLE_EVENT + * event is generated as soon as there is a free buffer available for sending + * K-frames. + * + * @return None + */ +void aci_l2cap_coc_tx_pool_available_event( void ); + +/* ACI HAL events */ + +/** + * @brief ACI_HAL_END_OF_RADIO_ACTIVITY_EVENT + * This event is generated when the device completes a radio activity and + * provide information when a new radio activity will be performed. + * Information provided includes type of radio activity and absolute time in + * system ticks when a new radio activity is schedule, if any. Application can + * use this information to schedule user activities synchronous to selected + * radio activities. A command ACI_HAL_SET_RADIO_ACTIVITY_MASK is provided to + * enable radio activity events of user interests, by default no events are + * enabled. + * User should take into account that enabling radio events in application with + * intense radio activity could lead to a fairly high rate of events generated. + * Application use cases includes synchronizing notification with connection + * interval, switching antenna at the end of advertising or performing flash + * erase operation while radio is idle. + * + * @param Last_State Completed radio event + * Values: + * - 0x00: Idle + * - 0x01: Advertising + * - 0x02: Peripheral connection + * - 0x03: Scanning + * - 0x05: Central connection + * - 0x06: TX test mode + * - 0x07: RX test mode + * @param Next_State Incoming radio event + * Values: + * - 0x00: Idle + * - 0x01: Advertising + * - 0x02: Peripheral connection + * - 0x03: Scanning + * - 0x05: Central connection + * - 0x06: TX test mode + * - 0x07: RX test mode + * @param Next_State_SysTime 32-bit absolute current time expressed in internal + * time units. + * @param Last_State_Slot Slot number of completed radio event. + * Values: + * - 0xFF: Idle + * - 0x00 ... 0x07 + * @param Next_State_Slot Slot number of incoming radio event. + * Values: + * - 0xFF: Idle + * - 0x00 ... 0x07 + * @return None + */ +void aci_hal_end_of_radio_activity_event( uint8_t Last_State, + uint8_t Next_State, + uint32_t Next_State_SysTime, + uint8_t Last_State_Slot, + uint8_t Next_State_Slot ); + +/** + * @brief ACI_HAL_SCAN_REQ_REPORT_EVENT + * This event is reported to the application after a scan request is received + * and a scan response is scheduled to be transmitted. + * Note: RSSI in this event is valid only when privacy is not used. + * + * @param RSSI RSSI (signed integer). + * Units: dBm. + * Values: + * - 127: RSSI not available + * - -127 ... 20 + * @param Peer_Address_Type Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Public Identity Address (corresponds to the Resolved Private + * Address) + * - 0x03: Random (static) Identity Address (corresponds to the Resolved + * Private Address) + * @param Peer_Address Public Device Address or Random Device Address of the + * peer device + * @return None + */ +void aci_hal_scan_req_report_event( uint8_t RSSI, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address ); + + +#endif /* BLE_EVENTS_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c new file mode 100644 index 0000000..0ab1958 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.c @@ -0,0 +1,1661 @@ +/***************************************************************************** + * @file ble_gap_aci.c + * @brief STM32WB BLE API (gap_aci) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#include "auto/ble_gap_aci.h" + +tBleStatus aci_gap_set_non_discoverable( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x081; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_limited_discoverable( uint8_t Advertising_Type, + uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Own_Address_Type, + uint8_t Advertising_Filter_Policy, + uint8_t Local_Name_Length, + const uint8_t* Local_Name, + uint8_t Service_Uuid_length, + const uint8_t* Service_Uuid_List, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_limited_discoverable_cp0 *cp0 = (aci_gap_set_limited_discoverable_cp0*)(cmd_buffer); + aci_gap_set_limited_discoverable_cp1 *cp1 = (aci_gap_set_limited_discoverable_cp1*)(cmd_buffer + 1 + 2 + 2 + 1 + 1 + 1 + Local_Name_Length * (sizeof(uint8_t))); + aci_gap_set_limited_discoverable_cp2 *cp2 = (aci_gap_set_limited_discoverable_cp2*)(cmd_buffer + 1 + 2 + 2 + 1 + 1 + 1 + Local_Name_Length * (sizeof(uint8_t)) + 1 + Service_Uuid_length * (sizeof(uint8_t))); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Type = Advertising_Type; + index_input += 1; + cp0->Advertising_Interval_Min = Advertising_Interval_Min; + index_input += 2; + cp0->Advertising_Interval_Max = Advertising_Interval_Max; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Advertising_Filter_Policy = Advertising_Filter_Policy; + index_input += 1; + cp0->Local_Name_Length = Local_Name_Length; + index_input += 1; + /* var_len_data input */ + { + Osal_MemCpy( (void*)&cp0->Local_Name, (const void*)Local_Name, Local_Name_Length ); + index_input += Local_Name_Length; + { + cp1->Service_Uuid_length = Service_Uuid_length; + } + index_input += 1; + Osal_MemCpy( (void*)&cp1->Service_Uuid_List, (const void*)Service_Uuid_List, Service_Uuid_length ); + index_input += Service_Uuid_length; + { + cp2->Conn_Interval_Min = Conn_Interval_Min; + } + index_input += 2; + { + cp2->Conn_Interval_Max = Conn_Interval_Max; + } + index_input += 2; + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x082; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_discoverable( uint8_t Advertising_Type, + uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Own_Address_Type, + uint8_t Advertising_Filter_Policy, + uint8_t Local_Name_Length, + const uint8_t* Local_Name, + uint8_t Service_Uuid_length, + const uint8_t* Service_Uuid_List, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_discoverable_cp0 *cp0 = (aci_gap_set_discoverable_cp0*)(cmd_buffer); + aci_gap_set_discoverable_cp1 *cp1 = (aci_gap_set_discoverable_cp1*)(cmd_buffer + 1 + 2 + 2 + 1 + 1 + 1 + Local_Name_Length * (sizeof(uint8_t))); + aci_gap_set_discoverable_cp2 *cp2 = (aci_gap_set_discoverable_cp2*)(cmd_buffer + 1 + 2 + 2 + 1 + 1 + 1 + Local_Name_Length * (sizeof(uint8_t)) + 1 + Service_Uuid_length * (sizeof(uint8_t))); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Type = Advertising_Type; + index_input += 1; + cp0->Advertising_Interval_Min = Advertising_Interval_Min; + index_input += 2; + cp0->Advertising_Interval_Max = Advertising_Interval_Max; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Advertising_Filter_Policy = Advertising_Filter_Policy; + index_input += 1; + cp0->Local_Name_Length = Local_Name_Length; + index_input += 1; + /* var_len_data input */ + { + Osal_MemCpy( (void*)&cp0->Local_Name, (const void*)Local_Name, Local_Name_Length ); + index_input += Local_Name_Length; + { + cp1->Service_Uuid_length = Service_Uuid_length; + } + index_input += 1; + Osal_MemCpy( (void*)&cp1->Service_Uuid_List, (const void*)Service_Uuid_List, Service_Uuid_length ); + index_input += Service_Uuid_length; + { + cp2->Conn_Interval_Min = Conn_Interval_Min; + } + index_input += 2; + { + cp2->Conn_Interval_Max = Conn_Interval_Max; + } + index_input += 2; + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x083; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_direct_connectable( uint8_t Own_Address_Type, + uint8_t Directed_Advertising_Type, + uint8_t Direct_Address_Type, + const uint8_t* Direct_Address, + uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_direct_connectable_cp0 *cp0 = (aci_gap_set_direct_connectable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Directed_Advertising_Type = Directed_Advertising_Type; + index_input += 1; + cp0->Direct_Address_Type = Direct_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Direct_Address, (const void*)Direct_Address, 6 ); + index_input += 6; + cp0->Advertising_Interval_Min = Advertising_Interval_Min; + index_input += 2; + cp0->Advertising_Interval_Max = Advertising_Interval_Max; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x084; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_io_capability( uint8_t IO_Capability ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_io_capability_cp0 *cp0 = (aci_gap_set_io_capability_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->IO_Capability = IO_Capability; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x085; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_authentication_requirement( uint8_t Bonding_Mode, + uint8_t MITM_Mode, + uint8_t SC_Support, + uint8_t KeyPress_Notification_Support, + uint8_t Min_Encryption_Key_Size, + uint8_t Max_Encryption_Key_Size, + uint8_t Use_Fixed_Pin, + uint32_t Fixed_Pin, + uint8_t Identity_Address_Type ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_authentication_requirement_cp0 *cp0 = (aci_gap_set_authentication_requirement_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Bonding_Mode = Bonding_Mode; + index_input += 1; + cp0->MITM_Mode = MITM_Mode; + index_input += 1; + cp0->SC_Support = SC_Support; + index_input += 1; + cp0->KeyPress_Notification_Support = KeyPress_Notification_Support; + index_input += 1; + cp0->Min_Encryption_Key_Size = Min_Encryption_Key_Size; + index_input += 1; + cp0->Max_Encryption_Key_Size = Max_Encryption_Key_Size; + index_input += 1; + cp0->Use_Fixed_Pin = Use_Fixed_Pin; + index_input += 1; + cp0->Fixed_Pin = Fixed_Pin; + index_input += 4; + cp0->Identity_Address_Type = Identity_Address_Type; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x086; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_authorization_requirement( uint16_t Connection_Handle, + uint8_t Authorization_Enable ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_authorization_requirement_cp0 *cp0 = (aci_gap_set_authorization_requirement_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Authorization_Enable = Authorization_Enable; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x087; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_pass_key_resp( uint16_t Connection_Handle, + uint32_t Pass_Key ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_pass_key_resp_cp0 *cp0 = (aci_gap_pass_key_resp_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Pass_Key = Pass_Key; + index_input += 4; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x088; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_authorization_resp( uint16_t Connection_Handle, + uint8_t Authorize ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_authorization_resp_cp0 *cp0 = (aci_gap_authorization_resp_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Authorize = Authorize; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x089; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_init( uint8_t Role, + uint8_t privacy_enabled, + uint8_t device_name_char_len, + uint16_t* Service_Handle, + uint16_t* Dev_Name_Char_Handle, + uint16_t* Appearance_Char_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_init_cp0 *cp0 = (aci_gap_init_cp0*)(cmd_buffer); + aci_gap_init_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Role = Role; + index_input += 1; + cp0->privacy_enabled = privacy_enabled; + index_input += 1; + cp0->device_name_char_len = device_name_char_len; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x08a; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Service_Handle = resp.Service_Handle; + *Dev_Name_Char_Handle = resp.Dev_Name_Char_Handle; + *Appearance_Char_Handle = resp.Appearance_Char_Handle; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gap_set_non_connectable( uint8_t Advertising_Event_Type, + uint8_t Own_Address_Type ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_non_connectable_cp0 *cp0 = (aci_gap_set_non_connectable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Event_Type = Advertising_Event_Type; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x08b; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_undirected_connectable( uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Own_Address_Type, + uint8_t Adv_Filter_Policy ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_undirected_connectable_cp0 *cp0 = (aci_gap_set_undirected_connectable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Interval_Min = Advertising_Interval_Min; + index_input += 2; + cp0->Advertising_Interval_Max = Advertising_Interval_Max; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Adv_Filter_Policy = Adv_Filter_Policy; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x08c; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_peripheral_security_req( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_peripheral_security_req_cp0 *cp0 = (aci_gap_peripheral_security_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x08d; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_update_adv_data( uint8_t AdvDataLen, + const uint8_t* AdvData ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_update_adv_data_cp0 *cp0 = (aci_gap_update_adv_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->AdvDataLen = AdvDataLen; + index_input += 1; + Osal_MemCpy( (void*)&cp0->AdvData, (const void*)AdvData, AdvDataLen ); + index_input += AdvDataLen; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x08e; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_delete_ad_type( uint8_t ADType ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_delete_ad_type_cp0 *cp0 = (aci_gap_delete_ad_type_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->ADType = ADType; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x08f; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_get_security_level( uint16_t Connection_Handle, + uint8_t* Security_Mode, + uint8_t* Security_Level ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_get_security_level_cp0 *cp0 = (aci_gap_get_security_level_cp0*)(cmd_buffer); + aci_gap_get_security_level_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x090; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Security_Mode = resp.Security_Mode; + *Security_Level = resp.Security_Level; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gap_set_event_mask( uint16_t GAP_Evt_Mask ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_event_mask_cp0 *cp0 = (aci_gap_set_event_mask_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->GAP_Evt_Mask = GAP_Evt_Mask; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x091; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_configure_filter_accept_list( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x092; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_terminate( uint16_t Connection_Handle, + uint8_t Reason ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_terminate_cp0 *cp0 = (aci_gap_terminate_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Reason = Reason; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x093; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_clear_security_db( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x094; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_allow_rebond( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_allow_rebond_cp0 *cp0 = (aci_gap_allow_rebond_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x095; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_start_limited_discovery_proc( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Filter_Duplicates ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_start_limited_discovery_proc_cp0 *cp0 = (aci_gap_start_limited_discovery_proc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Filter_Duplicates = Filter_Duplicates; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x096; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_start_general_discovery_proc( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Filter_Duplicates ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_start_general_discovery_proc_cp0 *cp0 = (aci_gap_start_general_discovery_proc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Filter_Duplicates = Filter_Duplicates; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x097; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_start_auto_connection_establish_proc( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length, + uint8_t Num_of_Peer_Entries, + const Peer_Entry_t* Peer_Entry ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_start_auto_connection_establish_proc_cp0 *cp0 = (aci_gap_start_auto_connection_establish_proc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Conn_Interval_Min = Conn_Interval_Min; + index_input += 2; + cp0->Conn_Interval_Max = Conn_Interval_Max; + index_input += 2; + cp0->Conn_Latency = Conn_Latency; + index_input += 2; + cp0->Supervision_Timeout = Supervision_Timeout; + index_input += 2; + cp0->Minimum_CE_Length = Minimum_CE_Length; + index_input += 2; + cp0->Maximum_CE_Length = Maximum_CE_Length; + index_input += 2; + cp0->Num_of_Peer_Entries = Num_of_Peer_Entries; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Entry, (const void*)Peer_Entry, Num_of_Peer_Entries * (sizeof(Peer_Entry_t)) ); + index_input += Num_of_Peer_Entries * (sizeof(Peer_Entry_t)); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x099; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_start_general_connection_establish_proc( uint8_t LE_Scan_Type, + uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Scanning_Filter_Policy, + uint8_t Filter_Duplicates ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_start_general_connection_establish_proc_cp0 *cp0 = (aci_gap_start_general_connection_establish_proc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Type = LE_Scan_Type; + index_input += 1; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Scanning_Filter_Policy = Scanning_Filter_Policy; + index_input += 1; + cp0->Filter_Duplicates = Filter_Duplicates; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x09a; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_start_selective_connection_establish_proc( uint8_t LE_Scan_Type, + uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Scanning_Filter_Policy, + uint8_t Filter_Duplicates, + uint8_t Num_of_Peer_Entries, + const Peer_Entry_t* Peer_Entry ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_start_selective_connection_establish_proc_cp0 *cp0 = (aci_gap_start_selective_connection_establish_proc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Type = LE_Scan_Type; + index_input += 1; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Scanning_Filter_Policy = Scanning_Filter_Policy; + index_input += 1; + cp0->Filter_Duplicates = Filter_Duplicates; + index_input += 1; + cp0->Num_of_Peer_Entries = Num_of_Peer_Entries; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Entry, (const void*)Peer_Entry, Num_of_Peer_Entries * (sizeof(Peer_Entry_t)) ); + index_input += Num_of_Peer_Entries * (sizeof(Peer_Entry_t)); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x09b; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_create_connection( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Own_Address_Type, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_create_connection_cp0 *cp0 = (aci_gap_create_connection_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->Peer_Address_Type = Peer_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Address, (const void*)Peer_Address, 6 ); + index_input += 6; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Conn_Interval_Min = Conn_Interval_Min; + index_input += 2; + cp0->Conn_Interval_Max = Conn_Interval_Max; + index_input += 2; + cp0->Conn_Latency = Conn_Latency; + index_input += 2; + cp0->Supervision_Timeout = Supervision_Timeout; + index_input += 2; + cp0->Minimum_CE_Length = Minimum_CE_Length; + index_input += 2; + cp0->Maximum_CE_Length = Maximum_CE_Length; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x09c; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_terminate_gap_proc( uint8_t Procedure_Code ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_terminate_gap_proc_cp0 *cp0 = (aci_gap_terminate_gap_proc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Procedure_Code = Procedure_Code; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x09d; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_start_connection_update( uint16_t Connection_Handle, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_start_connection_update_cp0 *cp0 = (aci_gap_start_connection_update_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Conn_Interval_Min = Conn_Interval_Min; + index_input += 2; + cp0->Conn_Interval_Max = Conn_Interval_Max; + index_input += 2; + cp0->Conn_Latency = Conn_Latency; + index_input += 2; + cp0->Supervision_Timeout = Supervision_Timeout; + index_input += 2; + cp0->Minimum_CE_Length = Minimum_CE_Length; + index_input += 2; + cp0->Maximum_CE_Length = Maximum_CE_Length; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x09e; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_send_pairing_req( uint16_t Connection_Handle, + uint8_t Force_Rebond ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_send_pairing_req_cp0 *cp0 = (aci_gap_send_pairing_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Force_Rebond = Force_Rebond; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x09f; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_set_broadcast_mode( uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Advertising_Type, + uint8_t Own_Address_Type, + uint8_t Adv_Data_Length, + const uint8_t* Adv_Data, + uint8_t Num_of_Peer_Entries, + const Peer_Entry_t* Peer_Entry ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_broadcast_mode_cp0 *cp0 = (aci_gap_set_broadcast_mode_cp0*)(cmd_buffer); + aci_gap_set_broadcast_mode_cp1 *cp1 = (aci_gap_set_broadcast_mode_cp1*)(cmd_buffer + 2 + 2 + 1 + 1 + 1 + Adv_Data_Length * (sizeof(uint8_t))); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Interval_Min = Advertising_Interval_Min; + index_input += 2; + cp0->Advertising_Interval_Max = Advertising_Interval_Max; + index_input += 2; + cp0->Advertising_Type = Advertising_Type; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Adv_Data_Length = Adv_Data_Length; + index_input += 1; + /* var_len_data input */ + { + Osal_MemCpy( (void*)&cp0->Adv_Data, (const void*)Adv_Data, Adv_Data_Length ); + index_input += Adv_Data_Length; + { + cp1->Num_of_Peer_Entries = Num_of_Peer_Entries; + } + index_input += 1; + Osal_MemCpy( (void*)&cp1->Peer_Entry, (const void*)Peer_Entry, Num_of_Peer_Entries * (sizeof(Peer_Entry_t)) ); + index_input += Num_of_Peer_Entries * (sizeof(Peer_Entry_t)); + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0a1; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_start_observation_proc( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t LE_Scan_Type, + uint8_t Own_Address_Type, + uint8_t Filter_Duplicates, + uint8_t Scanning_Filter_Policy ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_start_observation_proc_cp0 *cp0 = (aci_gap_start_observation_proc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->LE_Scan_Type = LE_Scan_Type; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Filter_Duplicates = Filter_Duplicates; + index_input += 1; + cp0->Scanning_Filter_Policy = Scanning_Filter_Policy; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0a2; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_get_bonded_devices( uint8_t* Num_of_Addresses, + Bonded_Device_Entry_t* Bonded_Device_Entry ) +{ + struct hci_request rq; + aci_gap_get_bonded_devices_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0a3; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Num_of_Addresses = resp.Num_of_Addresses; + Osal_MemCpy( (void*)Bonded_Device_Entry, (const void*)resp.Bonded_Device_Entry, *Num_of_Addresses * (sizeof(Bonded_Device_Entry_t)) ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gap_check_bonded_device( uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t* Id_Address_Type, + uint8_t* Id_Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_check_bonded_device_cp0 *cp0 = (aci_gap_check_bonded_device_cp0*)(cmd_buffer); + aci_gap_check_bonded_device_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Peer_Address_Type = Peer_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Address, (const void*)Peer_Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0a4; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Id_Address_Type = resp.Id_Address_Type; + Osal_MemCpy( (void*)Id_Address, (const void*)resp.Id_Address, 6 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gap_numeric_comparison_value_confirm_yesno( uint16_t Connection_Handle, + uint8_t Confirm_Yes_No ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_numeric_comparison_value_confirm_yesno_cp0 *cp0 = (aci_gap_numeric_comparison_value_confirm_yesno_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Confirm_Yes_No = Confirm_Yes_No; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0a5; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_passkey_input( uint16_t Connection_Handle, + uint8_t Input_Type ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_passkey_input_cp0 *cp0 = (aci_gap_passkey_input_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Input_Type = Input_Type; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0a6; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_get_oob_data( uint8_t OOB_Data_Type, + uint8_t* Address_Type, + uint8_t* Address, + uint8_t* OOB_Data_Len, + uint8_t* OOB_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_get_oob_data_cp0 *cp0 = (aci_gap_get_oob_data_cp0*)(cmd_buffer); + aci_gap_get_oob_data_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->OOB_Data_Type = OOB_Data_Type; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0a7; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Address_Type = resp.Address_Type; + Osal_MemCpy( (void*)Address, (const void*)resp.Address, 6 ); + *OOB_Data_Len = resp.OOB_Data_Len; + Osal_MemCpy( (void*)OOB_Data, (const void*)resp.OOB_Data, 16 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gap_set_oob_data( uint8_t Device_Type, + uint8_t Address_Type, + const uint8_t* Address, + uint8_t OOB_Data_Type, + uint8_t OOB_Data_Len, + const uint8_t* OOB_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_set_oob_data_cp0 *cp0 = (aci_gap_set_oob_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Device_Type = Device_Type; + index_input += 1; + cp0->Address_Type = Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Address, (const void*)Address, 6 ); + index_input += 6; + cp0->OOB_Data_Type = OOB_Data_Type; + index_input += 1; + cp0->OOB_Data_Len = OOB_Data_Len; + index_input += 1; + Osal_MemCpy( (void*)&cp0->OOB_Data, (const void*)OOB_Data, 16 ); + index_input += 16; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0a8; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_remove_bonded_device( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_remove_bonded_device_cp0 *cp0 = (aci_gap_remove_bonded_device_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Peer_Identity_Address_Type = Peer_Identity_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Identity_Address, (const void*)Peer_Identity_Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0aa; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_add_devices_to_list( uint8_t Num_of_List_Entries, + const List_Entry_t* List_Entry, + uint8_t Mode ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_add_devices_to_list_cp0 *cp0 = (aci_gap_add_devices_to_list_cp0*)(cmd_buffer); + aci_gap_add_devices_to_list_cp1 *cp1 = (aci_gap_add_devices_to_list_cp1*)(cmd_buffer + 1 + Num_of_List_Entries * (sizeof(List_Entry_t))); + tBleStatus status = 0; + int index_input = 0; + cp0->Num_of_List_Entries = Num_of_List_Entries; + index_input += 1; + /* var_len_data input */ + { + Osal_MemCpy( (void*)&cp0->List_Entry, (const void*)List_Entry, Num_of_List_Entries * (sizeof(List_Entry_t)) ); + index_input += Num_of_List_Entries * (sizeof(List_Entry_t)); + { + cp1->Mode = Mode; + } + index_input += 1; + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0ab; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_pairing_request_reply( uint16_t Connection_Handle, + uint8_t Accept ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_pairing_request_reply_cp0 *cp0 = (aci_gap_pairing_request_reply_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Accept = Accept; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0ad; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_additional_beacon_start( uint16_t Adv_Interval_Min, + uint16_t Adv_Interval_Max, + uint8_t Adv_Channel_Map, + uint8_t Own_Address_Type, + const uint8_t* Own_Address, + uint8_t PA_Level ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_additional_beacon_start_cp0 *cp0 = (aci_gap_additional_beacon_start_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Adv_Interval_Min = Adv_Interval_Min; + index_input += 2; + cp0->Adv_Interval_Max = Adv_Interval_Max; + index_input += 2; + cp0->Adv_Channel_Map = Adv_Channel_Map; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Own_Address, (const void*)Own_Address, 6 ); + index_input += 6; + cp0->PA_Level = PA_Level; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0b0; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_additional_beacon_stop( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0b1; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_additional_beacon_set_data( uint8_t Adv_Data_Length, + const uint8_t* Adv_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_additional_beacon_set_data_cp0 *cp0 = (aci_gap_additional_beacon_set_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Adv_Data_Length = Adv_Data_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Adv_Data, (const void*)Adv_Data, Adv_Data_Length ); + index_input += Adv_Data_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0b2; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_adv_set_configuration( uint8_t Adv_Mode, + uint8_t Advertising_Handle, + uint16_t Adv_Event_Properties, + uint32_t Primary_Adv_Interval_Min, + uint32_t Primary_Adv_Interval_Max, + uint8_t Primary_Adv_Channel_Map, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Adv_Filter_Policy, + uint8_t Adv_TX_Power, + uint8_t Secondary_Adv_Max_Skip, + uint8_t Secondary_Adv_PHY, + uint8_t Adv_SID, + uint8_t Scan_Req_Notification_Enable ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_adv_set_configuration_cp0 *cp0 = (aci_gap_adv_set_configuration_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Adv_Mode = Adv_Mode; + index_input += 1; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + cp0->Adv_Event_Properties = Adv_Event_Properties; + index_input += 2; + cp0->Primary_Adv_Interval_Min = Primary_Adv_Interval_Min; + index_input += 4; + cp0->Primary_Adv_Interval_Max = Primary_Adv_Interval_Max; + index_input += 4; + cp0->Primary_Adv_Channel_Map = Primary_Adv_Channel_Map; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Peer_Address_Type = Peer_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Address, (const void*)Peer_Address, 6 ); + index_input += 6; + cp0->Adv_Filter_Policy = Adv_Filter_Policy; + index_input += 1; + cp0->Adv_TX_Power = Adv_TX_Power; + index_input += 1; + cp0->Secondary_Adv_Max_Skip = Secondary_Adv_Max_Skip; + index_input += 1; + cp0->Secondary_Adv_PHY = Secondary_Adv_PHY; + index_input += 1; + cp0->Adv_SID = Adv_SID; + index_input += 1; + cp0->Scan_Req_Notification_Enable = Scan_Req_Notification_Enable; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0c0; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_adv_set_enable( uint8_t Enable, + uint8_t Num_Sets, + const Adv_Set_t* Adv_Set ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_adv_set_enable_cp0 *cp0 = (aci_gap_adv_set_enable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Enable = Enable; + index_input += 1; + cp0->Num_Sets = Num_Sets; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Adv_Set, (const void*)Adv_Set, Num_Sets * (sizeof(Adv_Set_t)) ); + index_input += Num_Sets * (sizeof(Adv_Set_t)); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0c1; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_adv_set_adv_data( uint8_t Advertising_Handle, + uint8_t Operation, + uint8_t Fragment_Preference, + uint8_t Advertising_Data_Length, + const uint8_t* Advertising_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_adv_set_adv_data_cp0 *cp0 = (aci_gap_adv_set_adv_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + cp0->Operation = Operation; + index_input += 1; + cp0->Fragment_Preference = Fragment_Preference; + index_input += 1; + cp0->Advertising_Data_Length = Advertising_Data_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Advertising_Data, (const void*)Advertising_Data, Advertising_Data_Length ); + index_input += Advertising_Data_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0c2; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_adv_set_scan_resp_data( uint8_t Advertising_Handle, + uint8_t Operation, + uint8_t Fragment_Preference, + uint8_t Scan_Response_Data_Length, + const uint8_t* Scan_Response_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_adv_set_scan_resp_data_cp0 *cp0 = (aci_gap_adv_set_scan_resp_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + cp0->Operation = Operation; + index_input += 1; + cp0->Fragment_Preference = Fragment_Preference; + index_input += 1; + cp0->Scan_Response_Data_Length = Scan_Response_Data_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Scan_Response_Data, (const void*)Scan_Response_Data, Scan_Response_Data_Length ); + index_input += Scan_Response_Data_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0c3; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_adv_remove_set( uint8_t Advertising_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_adv_remove_set_cp0 *cp0 = (aci_gap_adv_remove_set_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0c4; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_adv_clear_sets( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0c5; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_adv_set_random_address( uint8_t Advertising_Handle, + const uint8_t* Random_Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_adv_set_random_address_cp0 *cp0 = (aci_gap_adv_set_random_address_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Random_Address, (const void*)Random_Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0c6; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_ext_start_scan( uint8_t Scan_Mode, + uint8_t Procedure, + uint8_t Own_Address_Type, + uint8_t Filter_Duplicates, + uint16_t Duration, + uint16_t Period, + uint8_t Scanning_Filter_Policy, + uint8_t Scanning_PHYs, + const Scan_Param_Phy_t* Scan_Param_Phy ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_ext_start_scan_cp0 *cp0 = (aci_gap_ext_start_scan_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Scan_Mode = Scan_Mode; + index_input += 1; + cp0->Procedure = Procedure; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Filter_Duplicates = Filter_Duplicates; + index_input += 1; + cp0->Duration = Duration; + index_input += 2; + cp0->Period = Period; + index_input += 2; + cp0->Scanning_Filter_Policy = Scanning_Filter_Policy; + index_input += 1; + cp0->Scanning_PHYs = Scanning_PHYs; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Scan_Param_Phy, (const void*)Scan_Param_Phy, 10 ); + index_input += 10; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0d0; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gap_ext_create_connection( uint8_t Initiating_Mode, + uint8_t Procedure, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Advertising_Handle, + uint8_t Subevent, + uint8_t Initiator_Filter_Policy, + uint8_t Initiating_PHYs, + const Init_Param_Phy_t* Init_Param_Phy ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gap_ext_create_connection_cp0 *cp0 = (aci_gap_ext_create_connection_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Initiating_Mode = Initiating_Mode; + index_input += 1; + cp0->Procedure = Procedure; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Peer_Address_Type = Peer_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Address, (const void*)Peer_Address, 6 ); + index_input += 6; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + cp0->Subevent = Subevent; + index_input += 1; + cp0->Initiator_Filter_Policy = Initiator_Filter_Policy; + index_input += 1; + cp0->Initiating_PHYs = Initiating_PHYs; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Init_Param_Phy, (const void*)Init_Param_Phy, 48 ); + index_input += 48; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x0d1; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h new file mode 100644 index 0000000..76a451e --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gap_aci.h @@ -0,0 +1,1931 @@ +/***************************************************************************** + * @file ble_gap_aci.h + * @brief STM32WB BLE API (GAP_ACI) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_GAP_ACI_H__ +#define BLE_GAP_ACI_H__ + + +#include "auto/ble_types.h" + +/** + * @brief ACI_GAP_SET_NON_DISCOVERABLE + * This command stops advertising. + * Note: this command only supports legacy advertising. For extended + * advertising, refer to ACI_GAP_ADV_SET_ENABLE. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_non_discoverable( void ); + +/** + * @brief ACI_GAP_SET_LIMITED_DISCOVERABLE + * Puts the device in limited discoverable mode (as defined in Core + * Specification [Vol 3, Part C, 9.2.3]). The device will be discoverable for + * maximum period of TGAP (lim_adv_timeout) = 180 seconds (from errata). The + * advertising can be disabled at any time by issuing + * ACI_GAP_SET_NON_DISCOVERABLE command. + * The Adv_Interval_Min and Adv_Interval_Max parameters are optional. If both + * are set to 0, the GAP will use default values for adv intervals for limited + * discoverable mode (250 ms and 500 ms respectively). + * To allow a fast connection, the host can set Local_Name, Service_Uuid_List, + * Conn_Interval_Min and Conn_Interval_Max. If provided, these data will be + * inserted into the advertising packet payload as AD data. These parameters + * are optional in this command. These values can be set in advertised data + * using ACI_GAP_UPDATE_ADV_DATA command separately. + * The total size of data in advertising packet cannot exceed 31 bytes. + * With this command, the BLE Stack will also add automatically the following + * standard AD types: + * - AD Flags + * - Power Level + * When advertising timeout happens (i.e. limited discovery period has + * elapsed), controller generates ACI_GAP_LIMITED_DISCOVERABLE_EVENT event. + * Note: this command only supports legacy advertising For extended + * advertising, refer to ACI_GAP_ADV_SET_CONFIGURATION and + * ACI_GAP_ADV_SET_ENABLE.. + * + * @param Advertising_Type Advertising type + * Values: + * - 0x00: ADV_IND (Connectable undirected advertising) + * - 0x02: ADV_SCAN_IND (Scannable undirected advertising) + * - 0x03: ADV_NONCONN_IND (Non connectable undirected advertising) + * @param Advertising_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Advertising_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Advertising_Filter_Policy Advertising filter policy: not applicable + * (the value of Advertising_Filter_Policy parameter is not used inside + * the Stack) + * @param Local_Name_Length Length of the local_name field in octets. + * If length is set to 0x00, Local_Name parameter is not used. + * @param Local_Name Local name of the device. First byte must be 0x08 for + * Shortened Local Name or 0x09 for Complete Local Name. No NULL + * character at the end. + * @param Service_Uuid_length Length of the Service Uuid List in octets. + * If there is no service to be advertised, set this field to 0x00. + * @param Service_Uuid_List This is the list of the UUIDs as defined in Volume + * 3, Section 11 of GAP Specification. First byte is the AD Type. + * @param Conn_Interval_Min Connection interval minimum value suggested by + * Peripheral. + * If Conn_Interval_Min and Conn_Interval_Max are not 0x0000, Peripheral + * Connection Interval Range AD structure will be added in advertising + * data. + * Connection interval is defined in the following manner: + * connIntervalmin = Conn_Interval_Min x 1.25ms. + * Values: + * - 0x0000 (NaN) + * - 0xFFFF (NaN) : No specific minimum + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Connection interval maximum value suggested by + * Peripheral. + * If Conn_Interval_Min and Conn_Interval_Max are not 0x0000, Peripheral + * Connection Interval Range AD structure will be added in advertising + * data. + * Connection interval is defined in the following manner: + * connIntervalmax = Conn_Interval_Max x 1.25ms + * Values: + * - 0x0000 (NaN) + * - 0xFFFF (NaN) : No specific maximum + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_limited_discoverable( uint8_t Advertising_Type, + uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Own_Address_Type, + uint8_t Advertising_Filter_Policy, + uint8_t Local_Name_Length, + const uint8_t* Local_Name, + uint8_t Service_Uuid_length, + const uint8_t* Service_Uuid_List, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max ); + +/** + * @brief ACI_GAP_SET_DISCOVERABLE + * Puts the device in general discoverable mode (as defined in Core + * Specification [Vol 3, Part C, 9.2.4]). The device will be discoverable until + * the host issues the ACI_GAP_SET_NON_DISCOVERABLE command. The + * Adv_Interval_Min and Adv_Interval_Max parameters are optional. If both are + * set to 0, the GAP uses the default values for adv intervals for general + * discoverable mode. + * When using connectable undirected advertising events: + * - Adv_Interval_Min = 30 ms + * - Adv_Interval_Max = 60 ms + * When using non-connectable advertising events or scannable undirected + * advertising events: + * - Adv_Interval_Min = 100 ms + * - Adv_Interval_Max = 150 ms + * Host can set the Local Name, a Service UUID list and the Peripheral + * Connection Interval Range. + * If provided, these data will be inserted into the advertising packet payload + * as AD data. + * These parameters are optional in this command. These values can be also set + * using ACI_GAP_UPDATE_ADV_DATA command separately. + * The total size of data in advertising packet cannot exceed 31 bytes. + * With this command, the BLE Stack will also add automatically the following + * standard AD types: + * - AD Flags + * - TX Power Level + * Note: this command only supports legacy advertising. For extended + * advertising, refer to ACI_GAP_ADV_SET_CONFIGURATION and + * ACI_GAP_ADV_SET_ENABLE. + * + * @param Advertising_Type Advertising type + * Values: + * - 0x00: ADV_IND (Connectable undirected advertising) + * - 0x02: ADV_SCAN_IND (Scannable undirected advertising) + * - 0x03: ADV_NONCONN_IND (Non connectable undirected advertising) + * @param Advertising_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Advertising_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Advertising_Filter_Policy Advertising filter policy: not applicable + * (the value of Advertising_Filter_Policy parameter is not used inside + * the Stack) + * @param Local_Name_Length Length of the local_name field in octets. + * If length is set to 0x00, Local_Name parameter is not used. + * @param Local_Name Local name of the device. First byte must be 0x08 for + * Shortened Local Name or 0x09 for Complete Local Name. No NULL + * character at the end. + * @param Service_Uuid_length Length of the Service Uuid List in octets. + * If there is no service to be advertised, set this field to 0x00. + * @param Service_Uuid_List This is the list of the UUIDs as defined in Volume + * 3, Section 11 of GAP Specification. First byte is the AD Type. + * @param Conn_Interval_Min Connection interval minimum value suggested by + * Peripheral. + * If Conn_Interval_Min and Conn_Interval_Max are not 0x0000, Peripheral + * Connection Interval Range AD structure will be added in advertising + * data. + * Connection interval is defined in the following manner: + * connIntervalmin = Conn_Interval_Min x 1.25ms. + * Values: + * - 0x0000 (NaN) + * - 0xFFFF (NaN) : No specific minimum + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Connection interval maximum value suggested by + * Peripheral. + * If Conn_Interval_Min and Conn_Interval_Max are not 0x0000, Peripheral + * Connection Interval Range AD structure will be added in advertising + * data. + * Connection interval is defined in the following manner: + * connIntervalmax = Conn_Interval_Max x 1.25ms + * Values: + * - 0x0000 (NaN) + * - 0xFFFF (NaN) : No specific maximum + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_discoverable( uint8_t Advertising_Type, + uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Own_Address_Type, + uint8_t Advertising_Filter_Policy, + uint8_t Local_Name_Length, + const uint8_t* Local_Name, + uint8_t Service_Uuid_length, + const uint8_t* Service_Uuid_List, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max ); + +/** + * @brief ACI_GAP_SET_DIRECT_CONNECTABLE + * Sets the device in directed connectable mode (as defined in Core + * Specification [Vol 3, Part C, 9.3.3]). In this mode, the device advertises + * using high duty cycle connectable directed advertising events or low duty + * cycle connectable directed advertising events. + * The device's own address used in advertising packets is defined by the + * Own_Address_Type parameter depending on whether privacy is enabled or not. + * When using high duty cycle connectable directed advertising events, the + * device stays in directed connectable mode only for 1.28 seconds. If no + * connection is established within this duration, the device enters non + * discoverable mode and advertising has to be again enabled explicitly. + * The controller generates a HCI_LE_CONNECTION_COMPLETE_EVENT event with the + * status set to HCI_ADVERTISING_TIMEOUT_ERR_CODE if the connection was not + * established and BLE_STATUS_SUCCESS (0x00) if the connection was successfully + * established. + * Note: this command only supports legacy advertising. For extended + * advertising, refer to ACI_GAP_ADV_SET_CONFIGURATION and + * ACI_GAP_ADV_SET_ENABLE. + * + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * @param Directed_Advertising_Type Advertising type + * Values: + * - 0x01: High Duty Cycle Directed Advertising + * - 0x04: Low Duty Cycle Directed Advertising + * @param Direct_Address_Type The address type of the peer device. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * @param Direct_Address Initiator address + * @param Advertising_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0006 (3.750 ms) : for High Duty Cycle Directed Advertising + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) : for Low Duty Cycle + * Directed Advertising + * @param Advertising_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0006 (3.750 ms) : for High Duty Cycle Directed Advertising + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) : for Low Duty Cycle + * Directed Advertising + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_direct_connectable( uint8_t Own_Address_Type, + uint8_t Directed_Advertising_Type, + uint8_t Direct_Address_Type, + const uint8_t* Direct_Address, + uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max ); + +/** + * @brief ACI_GAP_SET_IO_CAPABILITY + * Sets the IO capabilities of the device. This command has to be given only + * when the device is not in a connected state. + * + * @param IO_Capability IO capability of the device. + * Values: + * - 0x00: IO_CAP_DISPLAY_ONLY + * - 0x01: IO_CAP_DISPLAY_YES_NO + * - 0x02: IO_CAP_KEYBOARD_ONLY + * - 0x03: IO_CAP_NO_INPUT_NO_OUTPUT + * - 0x04: IO_CAP_KEYBOARD_DISPLAY + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_io_capability( uint8_t IO_Capability ); + +/** + * @brief ACI_GAP_SET_AUTHENTICATION_REQUIREMENT + * Sets the authentication requirements for the device. This command has to be + * given only when the device is not in a connected state. + * + * @param Bonding_Mode Bonding mode. + * Only if bonding is enabled (0x01), the bonding information is stored + * in flash + * Values: + * - 0x00: No-bonding mode + * - 0x01: Bonding mode + * @param MITM_Mode MITM mode. + * Values: + * - 0x00: MITM protection not required + * - 0x01: MITM protection required + * @param SC_Support LE Secure connections support + * Values: + * - 0x00: Secure Connections Pairing not supported + * - 0x01: Secure Connections Pairing supported but optional + * - 0x02: Secure Connections Pairing supported and mandatory (SC Only + * Mode) + * @param KeyPress_Notification_Support Keypress notification support + * Values: + * - 0x00: Keypress notification not supported + * - 0x01: Keypress notification supported + * @param Min_Encryption_Key_Size Minimum encryption key size to be used during + * pairing. + * @param Max_Encryption_Key_Size Maximum encryption key size to be used during + * pairing. + * @param Use_Fixed_Pin Use or not fixed pin. If set to 0x00, then during the + * pairing process the application will not be requested for a pin + * (Fixed_Pin will be used). + * If set to 0x01, then during pairing process if a passkey is required + * the application will be notified + * Values: + * - 0x00: use a fixed pin + * - 0x01: do not use a fixed pin + * @param Fixed_Pin Fixed pin to be used during pairing if MITM protection is + * enabled. + * Any random value between 0 to 999999 + * Values: + * - 0 ... 999999 + * @param Identity_Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_authentication_requirement( uint8_t Bonding_Mode, + uint8_t MITM_Mode, + uint8_t SC_Support, + uint8_t KeyPress_Notification_Support, + uint8_t Min_Encryption_Key_Size, + uint8_t Max_Encryption_Key_Size, + uint8_t Use_Fixed_Pin, + uint32_t Fixed_Pin, + uint8_t Identity_Address_Type ); + +/** + * @brief ACI_GAP_SET_AUTHORIZATION_REQUIREMENT + * Sets the authorization requirements of the device. This command has to be + * given when connected to a device if authorization is required to access + * services which require authorization. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Authorization_Enable Enable the authorization in the device and when + * a remote device tries to read/write a characteristic with + * authorization requirements, the stack will send back an error + * response with "Insufficient authorization" error code. After pairing + * is complete an ACI_GAP_AUTHORIZATION_REQ_EVENT will be sent to the + * Host. + * Values: + * - 0x00: Authorization not required + * - 0x01: Authorization required + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_authorization_requirement( uint16_t Connection_Handle, + uint8_t Authorization_Enable ); + +/** + * @brief ACI_GAP_PASS_KEY_RESP + * This command should be sent by the host in response to + * ACI_GAP_PASS_KEY_REQ_EVENT event. The command parameter contains the pass + * key which will be used during the pairing process. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Pass_Key Pass key that will be used during the pairing process. + * Must be a six-digit decimal number. + * Values: + * - 0 ... 999999 + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_pass_key_resp( uint16_t Connection_Handle, + uint32_t Pass_Key ); + +/** + * @brief ACI_GAP_AUTHORIZATION_RESP + * Authorizes a device to access attributes. This command should be sent by the + * host in response to ACI_GAP_AUTHORIZATION_REQ_EVENT event. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Authorize Authorization response. + * Values: + * - 0x01: Authorize + * - 0x02: Reject + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_authorization_resp( uint16_t Connection_Handle, + uint8_t Authorize ); + +/** + * @brief ACI_GAP_INIT + * Initializes the GAP layer. Register the GAP service with the GATT. + * All the standard GAP characteristics will also be added: + * - Device Name + * - Appearance + * - Peripheral Preferred Connection Parameters (peripheral role only). + * Note that if the Peripheral Preferred Connection Parameters characteristic + * is added, its handle is equal to the Appearance characteristic handle plus + * 2. + * Note also that if privacy is enabled, this command automatically unmasks the + * HCI_LE_ENHANCED_CONNECTION_COMPLETE_EVENT event. + * + * @param Role Bitmap of allowed roles. + * Flags: + * - 0x01: Peripheral + * - 0x02: Broadcaster + * - 0x04: Central + * - 0x08: Observer + * @param privacy_enabled This parameter specifies if Privacy is enabled or + * not. N.B.: only Controller Privacy is supported. + * Values: + * - 0x00: Privacy disabled + * - 0x02: Privacy enabled + * @param device_name_char_len Length of the device name characteristic + * @param[out] Service_Handle Handle of the GAP service + * @param[out] Dev_Name_Char_Handle Device Name Characteristic handle + * @param[out] Appearance_Char_Handle Appearance Characteristic handle + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_init( uint8_t Role, + uint8_t privacy_enabled, + uint8_t device_name_char_len, + uint16_t* Service_Handle, + uint16_t* Dev_Name_Char_Handle, + uint16_t* Appearance_Char_Handle ); + +/** + * @brief ACI_GAP_SET_NON_CONNECTABLE + * This command starts advertising in non connectable mode (i.e., this mode + * does not support connection). + * Advertiser filter policy is internally set to 0 (i.e., the Filter Accept + * List is not in use). + * Note: this command only supports legacy advertising. For extended + * advertising, refer to ACI_GAP_ADV_SET_CONFIGURATION and + * ACI_GAP_ADV_SET_ENABLE. + * + * @param Advertising_Event_Type Advertising type + * Values: + * - 0x02: ADV_SCAN_IND (Scannable undirected advertising) + * - 0x03: ADV_NONCONN_IND (Non connectable undirected advertising) + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_non_connectable( uint8_t Advertising_Event_Type, + uint8_t Own_Address_Type ); + +/** + * @brief ACI_GAP_SET_UNDIRECTED_CONNECTABLE + * This command starts advertising in undirected connectable mode. + * If privacy is enabled in the device, a resolvable private address is + * generated and used as the advertiser's address. If not, the address of the + * type specified in Own_Address_Type is used for advertising. + * Note: this command only supports legacy advertising. For extended + * advertising, refer to ACI_GAP_ADV_SET_CONFIGURATION and + * ACI_GAP_ADV_SET_ENABLE. + * + * @param Advertising_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Advertising_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * @param Adv_Filter_Policy Advertising filter policy. + * Values: + * - 0x00: Allow Scan Request from Any, Allow Connect Request from Any + * - 0x03: Allow Scan Request from Filter Accept List Only, Allow + * Connect Request from Filter Accept List Only + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_undirected_connectable( uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Own_Address_Type, + uint8_t Adv_Filter_Policy ); + +/** + * @brief ACI_GAP_PERIPHERAL_SECURITY_REQ + * Sends a Peripheral Security Request to the Central. + * This command has to be issued to notify the Central of the security + * requirements of the Peripheral. The Central may encrypt the link, initiate + * the pairing procedure, or reject the request. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_peripheral_security_req( uint16_t Connection_Handle ); + +/** + * @brief ACI_GAP_UPDATE_ADV_DATA + * This command can be used to update the advertising data for particular AD + * types. The data argument shall consist of valid advertising data composed of + * one or more AD types. If one of the specified AD types does not exist in the + * current advertising data, then it is added to the advertising data; while + * the AD types already present in the current advertising data are updated + * with the new values. If the overall advertising data length is more than 31 + * octets after the update, then the command is rejected and the old data is + * retained. + * Note: this command only supports legacy advertising. For extended + * advertising, refer to ACI_GAP_ADV_SET_ADV_DATA. + * + * @param AdvDataLen Length of AdvData in octets + * @param AdvData Advertising data used by the device while advertising. + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_update_adv_data( uint8_t AdvDataLen, + const uint8_t* AdvData ); + +/** + * @brief ACI_GAP_DELETE_AD_TYPE + * This command can be used to delete the specified AD type from the + * advertisement data if present. + * Note: this command only supports legacy advertising. For extended + * advertising, refer to ACI_GAP_ADV_SET_ADV_DATA. + * + * @param ADType One of the AD types as in Core Specification [Vol 3, Part C, + * 11]. + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_delete_ad_type( uint8_t ADType ); + +/** + * @brief ACI_GAP_GET_SECURITY_LEVEL + * This command can be used to get the current security settings of the device. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param[out] Security_Mode Security mode. + * Values: + * - 0x01: Security Mode 1 + * @param[out] Security_Level Security Level. + * Values: + * - 0x01: Security Level 1 + * - 0x02: Security Level 2 + * - 0x03: Security Level 3 + * - 0x04: Security Level 4 + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_get_security_level( uint16_t Connection_Handle, + uint8_t* Security_Mode, + uint8_t* Security_Level ); + +/** + * @brief ACI_GAP_SET_EVENT_MASK + * It allows masking events from the GAP. If the bit in the GAP_Evt_Mask is set + * to a one, then the event associated with that bit will be enabled. + * + * @param GAP_Evt_Mask ACI GAP/L2CAP event mask. Default: 0xFFFF. + * Flags: + * - 0x0000: No events + * - 0x0001: ACI_GAP_LIMITED_DISCOVERABLE_EVENT + * - 0x0002: ACI_GAP_PAIRING_COMPLETE_EVENT + * - 0x0004: ACI_GAP_PASS_KEY_REQ_EVENT + * - 0x0008: ACI_GAP_AUTHORIZATION_REQ_EVENT + * - 0x0020: ACI_GAP_BOND_LOST_EVENT + * - 0x0080: ACI_GAP_PROC_COMPLETE_EVENT + * - 0x0100: ACI_L2CAP_CONNECTION_UPDATE_REQ_EVENT + * - 0x0200: ACI_L2CAP_CONNECTION_UPDATE_RESP_EVENT + * - 0x0400: ACI_L2CAP_PROC_TIMEOUT_EVENT + * - 0x0800: ACI_GAP_ADDR_NOT_RESOLVED_EVENT + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_event_mask( uint16_t GAP_Evt_Mask ); + +/** + * @brief ACI_GAP_CONFIGURE_FILTER_ACCEPT_LIST + * This command adds addresses of bonded devices into the controller's Filter + * Accept List, which is cleared first. It returns an error if it was unable to + * add all bonded devices into the Filter Accept List. + * This command shall not be used when the device is advertising, scanning or + * initiating with a filter policy using the Filter Accept List. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_configure_filter_accept_list( void ); + +/** + * @brief ACI_GAP_TERMINATE + * Commands the controller to terminate the connection. A + * HCI_DISCONNECTION_COMPLETE_EVENT event is generated when the link is + * disconnected. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Reason The reason for ending the connection. + * Values: + * - 0x05: Authentication Failure + * - 0x13: Remote User Terminated Connection + * - 0x14: Remote Device Terminated Connection due to Low Resources + * - 0x15: Remote Device Terminated Connection due to Power Off + * - 0x1A: Unsupported Remote Feature + * - 0x3B: Unacceptable Connection Parameters + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_terminate( uint16_t Connection_Handle, + uint8_t Reason ); + +/** + * @brief ACI_GAP_CLEAR_SECURITY_DB + * Clears the bonding table. All the devices in the bonding table are removed. + * See also ACI_GAP_REMOVE_BONDED_DEVICE to remove only one device. + * Note: as a fallback mode, in case the bonding table is full, the BLE stack + * automatically clears the bonding table just before putting into it + * information about a new bonded device. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_clear_security_db( void ); + +/** + * @brief ACI_GAP_ALLOW_REBOND + * Allows the security manager to complete the pairing procedure and re-bond + * with the Central. This command should be given by the application when it + * receives the ACI_GAP_BOND_LOST_EVENT if it wants the re-bonding to happen + * successfully. If this command is not given on receiving the event, the + * bonding procedure will timeout. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_allow_rebond( uint16_t Connection_Handle ); + +/** + * @brief ACI_GAP_START_LIMITED_DISCOVERY_PROC + * Starts the limited discovery procedure. The controller is commanded to start + * active scanning. + * When this procedure is started, only the devices in limited discoverable + * mode are returned to the upper layers. + * The procedure is terminated when either the upper layers issue a command to + * terminate the procedure by issuing the command ACI_GAP_TERMINATE_GAP_PROC + * with the procedure code set to 0x01 or a timeout happens (the timeout value + * is fixed at 10.24 s.). When the procedure is terminated due to any of the + * above reasons, ACI_GAP_PROC_COMPLETE_EVENT event is returned with the + * procedure code set to 0x01. + * The device found when the procedure is ongoing is returned to the upper + * layers through the event HCI_LE_ADVERTISING_REPORT_EVENT (or via + * HCI_LE_EXTENDED_ADVERTISING_REPORT_EVENT when the extended advertising + * feature is supported). + * + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Filter_Duplicates Enable/disable duplicate filtering. + * Values: + * - 0x00: Duplicate filtering disabled + * - 0x01: Duplicate filtering enabled + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_start_limited_discovery_proc( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Filter_Duplicates ); + +/** + * @brief ACI_GAP_START_GENERAL_DISCOVERY_PROC + * Starts the general discovery procedure. The controller is commanded to start + * active scanning. The procedure is terminated when either the upper layers + * issue a command to terminate the procedure by issuing the command + * ACI_GAP_TERMINATE_GAP_PROC with the procedure code set to 0x02 or a timeout + * happens (the timeout value is fixed at 10.24 s.). When the procedure is + * terminated due to any of the above reasons, ACI_GAP_PROC_COMPLETE_EVENT + * event is returned with the procedure code set to 0x02. + * The devices found when the procedure is ongoing are returned via + * HCI_LE_ADVERTISING_REPORT_EVENT (or via + * HCI_LE_EXTENDED_ADVERTISING_REPORT_EVENT when the extended advertising + * feature is supported). + * + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Filter_Duplicates Enable/disable duplicate filtering. + * Values: + * - 0x00: Duplicate filtering disabled + * - 0x01: Duplicate filtering enabled + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_start_general_discovery_proc( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Filter_Duplicates ); + +/** + * @brief ACI_GAP_START_AUTO_CONNECTION_ESTABLISH_PROC + * Starts the auto connection establishment procedure. The devices specified + * are added to the Filter Accept List of the controller and a + * LE_Create_Connection call will be made to the controller by GAP with the + * initiator filter policy set to "Filter Accept List is used to determine + * which advertiser to connect to". When a command is issued to terminate the + * procedure by upper layer, a LE_Create_Connection_Cancel call will be made to + * the controller by GAP. + * The procedure is terminated when either a connection is successfully + * established with one of the specified devices in the Filter Accept List or + * the procedure is explicitly terminated by issuing the command + * ACI_GAP_TERMINATE_GAP_PROC with the procedure code set to 0x08. A + * ACI_GAP_PROC_COMPLETE_EVENT event is returned with the procedure code set to + * 0x08. + * If privacy is enabled and the peer device (advertiser) is in the resolving + * list then the link layer generates a RPA. + * + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * @param Conn_Interval_Min Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Latency Maximum Peripheral latency for the connection in number + * of connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Supervision_Timeout Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + * @param Minimum_CE_Length Information parameter about the minimum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @param Maximum_CE_Length Information parameter about the maximum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @param Num_of_Peer_Entries Number of devices that have to be added to the + * Filter Accept List. Each device is defined by Peer_Address_Type and + * Peer_Address. + * @param Peer_Entry See @ref Peer_Entry_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_start_auto_connection_establish_proc( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length, + uint8_t Num_of_Peer_Entries, + const Peer_Entry_t* Peer_Entry ); + +/** + * @brief ACI_GAP_START_GENERAL_CONNECTION_ESTABLISH_PROC + * Starts a general connection establishment procedure. The host enables + * scanning in the controller with the scanner filter policy set to "accept all + * advertising packets" and from the scanning results, all the devices are sent + * to the upper layer by the event HCI_LE_ADVERTISING_REPORT_EVENT (or by the + * event HCI_LE_EXTENDED_ADVERTISING_REPORT_EVENT when the extended advertising + * feature is supported). The upper layer then has to select one of the devices + * to which it wants to connect by issuing the command + * ACI_GAP_CREATE_CONNECTION. If privacy is enabled, then either a private + * resolvable address or a non-resolvable address, based on the address type + * specified in the command is set as the scanner address but the gap create + * connection always uses a private resolvable address if the general + * connection establishment procedure is active. + * Before the call to ACI_GAP_CREATE_CONNECTION, the procedure can be + * terminated by issuing the command ACI_GAP_TERMINATE_GAP_PROC with the + * procedure code set to 0x10. + * After the call to ACI_GAP_CREATE_CONNECTION, the procedure is terminated + * when a connection is established, or the upper layer terminates the + * procedure by issuing the command ACI_GAP_TERMINATE_GAP_PROC with the + * procedure code set to 0x40. On completion of the procedure a + * ACI_GAP_PROC_COMPLETE_EVENT event is generated with the procedure code set + * to 0x40. + * If privacy is enabled and the peer device (advertiser) is in the resolving + * list then the link layer generates a RPA. + * + * @param LE_Scan_Type Passive or active scanning. With passive scanning, no + * scan request PDUs are sent. + * Values: + * - 0x00: Passive scanning + * - 0x01: Active scanning + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Scanning_Filter_Policy The scanning filter policy determines how the + * scanner's Link Layer processes advertising and scan response PDUs. + * There is a choice of two primary filter policies: unfiltered and + * filtered. + * Unfiltered: the Link Layer processes all advertising and scan + * response PDUs (i.e., the Filter Accept List is not used). + * Filtered: the Link Layer processes advertising and scan response PDUs + * only from devices in the Filter Accept List. + * With extended scanning filter policies, a directed advertising PDU + * accepted by the primary filter policy shall nevertheless be ignored + * unless either the TargetA field is identical to the scanner's device + * address, or TargetA field is a resolvable private address. + * Values: + * - 0x00: Basic unfiltered scanning filter policy + * - 0x01: Basic filtered scanning filter policy + * - 0x02: Extended unfiltered scanning filter policy + * - 0x03: Extended filtered scanning filter policy + * @param Filter_Duplicates Enable/disable duplicate filtering. + * Values: + * - 0x00: Duplicate filtering disabled + * - 0x01: Duplicate filtering enabled + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_start_general_connection_establish_proc( uint8_t LE_Scan_Type, + uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Scanning_Filter_Policy, + uint8_t Filter_Duplicates ); + +/** + * @brief ACI_GAP_START_SELECTIVE_CONNECTION_ESTABLISH_PROC + * Starts a selective connection establishment procedure. The GAP adds the + * specified device addresses into Filter Accept List and enables scanning in + * the controller with a scanning filter policy that should be set to + * "filtered". All the devices found are sent to the upper layer by the event + * HCI_LE_ADVERTISING_REPORT_EVENT (or by the event + * HCI_LE_EXTENDED_ADVERTISING_REPORT_EVENT when the extended advertising + * feature is supported). The upper layer then has to select one of the devices + * to which it wants to connect by issuing the command + * ACI_GAP_CREATE_CONNECTION. + * Before the call to ACI_GAP_CREATE_CONNECTION, the procedure can be + * terminated by issuing the command ACI_GAP_TERMINATE_GAP_PROC with the + * procedure code set to 0x20. + * After the call to ACI_GAP_CREATE_CONNECTION, the procedure is terminated + * when a connection is established, or the upper layer terminates the + * procedure by issuing the command ACI_GAP_TERMINATE_GAP_PROC with the + * procedure code set to 0x40. On completion of the procedure a + * ACI_GAP_PROC_COMPLETE_EVENT event is generated with the procedure code set + * to 0x40. + * If privacy is enabled and the peer device (advertiser) is in the resolving + * list then the link layer generates a RPA. + * + * @param LE_Scan_Type Passive or active scanning. With passive scanning, no + * scan request PDUs are sent. + * Values: + * - 0x00: Passive scanning + * - 0x01: Active scanning + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Scanning_Filter_Policy The scanning filter policy determines how the + * scanner's Link Layer processes advertising and scan response PDUs. + * There is a choice of two primary filter policies: unfiltered and + * filtered. + * Unfiltered: the Link Layer processes all advertising and scan + * response PDUs (i.e., the Filter Accept List is not used). + * Filtered: the Link Layer processes advertising and scan response PDUs + * only from devices in the Filter Accept List. + * With extended scanning filter policies, a directed advertising PDU + * accepted by the primary filter policy shall nevertheless be ignored + * unless either the TargetA field is identical to the scanner's device + * address, or TargetA field is a resolvable private address. + * Values: + * - 0x00: Basic unfiltered scanning filter policy + * - 0x01: Basic filtered scanning filter policy + * - 0x02: Extended unfiltered scanning filter policy + * - 0x03: Extended filtered scanning filter policy + * @param Filter_Duplicates Enable/disable duplicate filtering. + * Values: + * - 0x00: Duplicate filtering disabled + * - 0x01: Duplicate filtering enabled + * @param Num_of_Peer_Entries Number of devices that have to be added to the + * Filter Accept List. Each device is defined by Peer_Address_Type and + * Peer_Address. + * @param Peer_Entry See @ref Peer_Entry_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_start_selective_connection_establish_proc( uint8_t LE_Scan_Type, + uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Scanning_Filter_Policy, + uint8_t Filter_Duplicates, + uint8_t Num_of_Peer_Entries, + const Peer_Entry_t* Peer_Entry ); + +/** + * @brief ACI_GAP_CREATE_CONNECTION + * Starts the direct connection establishment procedure. A LE_Create_Connection + * call will be made to the controller by GAP with the initiator filter policy + * set to "Filter Accept List is not used to determine which advertiser to + * connect to". The procedure can be terminated explicitly by the upper layer + * by issuing the command ACI_GAP_TERMINATE_GAP_PROC. When a command is issued + * to terminate the procedure by upper layer, a HCI_LE_CREATE_CONNECTION_CANCEL + * call will be made to the controller by GAP. + * On termination of the procedure, a HCI_LE_CONNECTION_COMPLETE_EVENT (or + * HCI_LE_ENHANCED_CONNECTION_COMPLETE_EVENT if privacy or extended advertising + * is used) is returned. The procedure can be explicitly terminated by the + * upper layer by issuing the command ACI_GAP_TERMINATE_GAP_PROC with the + * Procedure_Code set to 0x40. + * If privacy is enabled and the peer device (advertiser) is in the resolving + * list then the link layer generates a RPA. + * + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param Peer_Address_Type The address type of the peer device. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * @param Peer_Address Public Device Address or Random Device Address of the + * device to be connected. + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * @param Conn_Interval_Min Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Latency Maximum Peripheral latency for the connection in number + * of connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Supervision_Timeout Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + * @param Minimum_CE_Length Information parameter about the minimum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @param Maximum_CE_Length Information parameter about the maximum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_create_connection( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Own_Address_Type, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length ); + +/** + * @brief ACI_GAP_TERMINATE_GAP_PROC + * Terminates the specified GAP procedure. An ACI_GAP_PROC_COMPLETE_EVENT event + * is returned with the procedure code set to the corresponding procedure. + * Note: in case of GAP procedure started with ACI_GAP_CREATE_CONNECTION or + * ACI_GAP_START_AUTO_CONNECTION_ESTABLISH_PROC, a + * HCI_LE_CREATE_CONNECTION_CANCEL is issued to the Controller. + * + * @param Procedure_Code GAP procedure bitmap. + * Values: + * - 0x00: No events + * - 0x01: GAP_LIMITED_DISCOVERY_PROC + * - 0x02: GAP_GENERAL_DISCOVERY_PROC + * - 0x08: GAP_AUTO_CONNECTION_ESTABLISHMENT_PROC + * - 0x10: GAP_GENERAL_CONNECTION_ESTABLISHMENT_PROC + * - 0x20: GAP_SELECTIVE_CONNECTION_ESTABLISHMENT_PROC + * - 0x40: GAP_DIRECT_CONNECTION_ESTABLISHMENT_PROC + * - 0x80: GAP_OBSERVATION_PROC + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_terminate_gap_proc( uint8_t Procedure_Code ); + +/** + * @brief ACI_GAP_START_CONNECTION_UPDATE + * Starts the connection update procedure (only when role is Central). A + * HCI_LE_CONNECTION_UPDATE is called. + * On completion of the procedure, an HCI_LE_CONNECTION_UPDATE_COMPLETE_EVENT + * event is returned to the upper layer. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Conn_Interval_Min Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Latency Maximum Peripheral latency for the connection in number + * of connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Supervision_Timeout Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + * @param Minimum_CE_Length Information parameter about the minimum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @param Maximum_CE_Length Information parameter about the maximum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_start_connection_update( uint16_t Connection_Handle, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length ); + +/** + * @brief ACI_GAP_SEND_PAIRING_REQ + * Sends the SM pairing request to start a pairing process. The authentication + * requirements and IO capabilities should be set before issuing this command + * using the ACI_GAP_SET_IO_CAPABILITY and + * ACI_GAP_SET_AUTHENTICATION_REQUIREMENT commands. + * A ACI_GAP_PAIRING_COMPLETE_EVENT event is returned after the pairing process + * is completed. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Force_Rebond If 1, Pairing request will be sent even if the device + * was previously bonded, otherwise pairing request is not sent. + * Values: + * - 0x00: NO + * - 0x01: YES + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_send_pairing_req( uint16_t Connection_Handle, + uint8_t Force_Rebond ); + +/** + * @brief ACI_GAP_SET_BROADCAST_MODE + * This command puts the device into broadcast mode. A privacy enabled device + * uses either a resolvable private address or a non-resolvable private address + * as specified in the Own_Address_Type parameter of the command. + * Note: this command only supports legacy advertising. For extended + * advertising, refer to ACI_GAP_ADV_SET_CONFIGURATION and + * ACI_GAP_ADV_SET_ENABLE. + * + * @param Advertising_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Advertising_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Advertising_Type Advertising type + * Values: + * - 0x02: ADV_SCAN_IND (Scannable undirected advertising) + * - 0x03: ADV_NONCONN_IND (Non connectable undirected advertising) + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Adv_Data_Length Length of the advertising data in the advertising + * packet. + * @param Adv_Data Advertising data used by the device while advertising. + * @param Num_of_Peer_Entries Number of devices that have to be added to the + * Filter Accept List. Each device is defined by Peer_Address_Type and + * Peer_Address. + * @param Peer_Entry See @ref Peer_Entry_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_broadcast_mode( uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Advertising_Type, + uint8_t Own_Address_Type, + uint8_t Adv_Data_Length, + const uint8_t* Adv_Data, + uint8_t Num_of_Peer_Entries, + const Peer_Entry_t* Peer_Entry ); + +/** + * @brief ACI_GAP_START_OBSERVATION_PROC + * Starts an Observation procedure when the device is in Observer Role. The + * host enables scanning in the controller. The advertising reports are sent to + * the upper layer using standard LE Advertising Report Event. + * If privacy is enabled and the peer device (advertiser) is in the resolving + * list then the link layer will generate a RPA, if it is not then the RPA/NRPA + * generated by the Host will be used. + * + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) : legacy advertising + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : extended advertising + * @param LE_Scan_Type Passive or active scanning. With passive scanning, no + * scan request PDUs are sent. + * Values: + * - 0x00: Passive scanning + * - 0x01: Active scanning + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Filter_Duplicates Enable/disable duplicate filtering. + * Values: + * - 0x00: Duplicate filtering disabled + * - 0x01: Duplicate filtering enabled + * @param Scanning_Filter_Policy The scanning filter policy determines how the + * scanner's Link Layer processes advertising and scan response PDUs. + * There is a choice of two primary filter policies: unfiltered and + * filtered. + * Unfiltered: the Link Layer processes all advertising and scan + * response PDUs (i.e., the Filter Accept List is not used). + * Filtered: the Link Layer processes advertising and scan response PDUs + * only from devices in the Filter Accept List. + * With extended scanning filter policies, a directed advertising PDU + * accepted by the primary filter policy shall nevertheless be ignored + * unless either the TargetA field is identical to the scanner's device + * address, or TargetA field is a resolvable private address. + * Values: + * - 0x00: Basic unfiltered scanning filter policy + * - 0x01: Basic filtered scanning filter policy + * - 0x02: Extended unfiltered scanning filter policy + * - 0x03: Extended filtered scanning filter policy + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_start_observation_proc( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t LE_Scan_Type, + uint8_t Own_Address_Type, + uint8_t Filter_Duplicates, + uint8_t Scanning_Filter_Policy ); + +/** + * @brief ACI_GAP_GET_BONDED_DEVICES + * This command gets the list of the devices which are present in the bonding + * table. It returns the number of addresses and the corresponding address + * types and values. + * + * @param[out] Num_of_Addresses The number of bonded devices + * @param[out] Bonded_Device_Entry See @ref Bonded_Device_Entry_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_get_bonded_devices( uint8_t* Num_of_Addresses, + Bonded_Device_Entry_t* Bonded_Device_Entry ); + +/** + * @brief ACI_GAP_CHECK_BONDED_DEVICE + * The command finds whether the device, whose address is specified in the + * command, is present in the bonding table. If the device is found, the + * command returns "Success". + * Note: the specified address can be a Resolvable Private Address (RPA). In + * this case, even if privacy is not enabled, this address is resolved to check + * the presence of the peer device in the bonding table. If the address is + * resolved successfully with any one of the IRKs present in the database, the + * command returns success and also the corresponding public or static random + * address stored with the IRK in the database (i.e. the peer device identity + * address distributed during bonding). + * + * @param Peer_Address_Type The address type of the peer device. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * @param Peer_Address Public Device Address or Random Device Address of the + * peer device + * @param[out] Id_Address_Type The address type of the peer device, distributed + * during pairing phase. + * @param[out] Id_Address The public or static random address of the peer + * device, distributed during pairing phase. + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_check_bonded_device( uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t* Id_Address_Type, + uint8_t* Id_Address ); + +/** + * @brief ACI_GAP_NUMERIC_COMPARISON_VALUE_CONFIRM_YESNO + * This command allows the User to validate/confirm or not the Numeric + * Comparison value showed through the ACI_GAP_NUMERIC_COMPARISON_VALUE_EVENT. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Confirm_Yes_No Indicates if the numeric values showed on both local + * and peer device are different or equal + * Values: + * - 0x00: No (numeric values are different) + * - 0x01: Yes (numeric values are equal) + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_numeric_comparison_value_confirm_yesno( uint16_t Connection_Handle, + uint8_t Confirm_Yes_No ); + +/** + * @brief ACI_GAP_PASSKEY_INPUT + * This command permits to signal to the Stack the input type detected during + * Passkey input. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Input_Type Passkey input type detected + * Values: + * - 0x00: Passkey entry started + * - 0x01: Passkey digit entered + * - 0x02: Passkey digit erased + * - 0x03: Passkey cleared + * - 0x04: Passkey entry completed + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_passkey_input( uint16_t Connection_Handle, + uint8_t Input_Type ); + +/** + * @brief ACI_GAP_GET_OOB_DATA + * This command is sent by the User to get (i.e. to extract from the Stack) the + * OOB data generated by the Stack itself. + * + * @param OOB_Data_Type Type of OOB data + * Values: + * - 0x00: TK (Legacy pairing) + * - 0x01: Random (SC) + * - 0x02: Confirm (SC) + * @param[out] Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @param[out] Address Public or Random (static) address of this device + * @param[out] OOB_Data_Len Length of OOB data + * Values: + * - 16 + * @param[out] OOB_Data Local OOB data + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_get_oob_data( uint8_t OOB_Data_Type, + uint8_t* Address_Type, + uint8_t* Address, + uint8_t* OOB_Data_Len, + uint8_t* OOB_Data ); + +/** + * @brief ACI_GAP_SET_OOB_DATA + * This command is sent (by the User) to input the OOB data arrived via OOB + * communication. + * + * @param Device_Type OOB Device type + * Values: + * - 0x00: Local device (Address_Type and Address are not used) + * - 0x01: Remote device + * @param Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @param Address Public or Random (static) Identity Address of the peer device + * @param OOB_Data_Type Type of OOB data + * Values: + * - 0x00: TK (Legacy pairing) + * - 0x01: Random (SC) + * - 0x02: Confirm (SC) + * @param OOB_Data_Len Length of OOB data + * Values: + * - 0: SC Random/Confirm generation (OOB_Data and OOB_Data_Type are not + * used) + * - 16 + * @param OOB_Data Either local OOB data or remote OOB data received through + * OOB from peer device (see Device_Type) + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_set_oob_data( uint8_t Device_Type, + uint8_t Address_Type, + const uint8_t* Address, + uint8_t OOB_Data_Type, + uint8_t OOB_Data_Len, + const uint8_t* OOB_Data ); + +/** + * @brief ACI_GAP_REMOVE_BONDED_DEVICE + * This command removes a specified device from bonding table; i.e. it removes + * from bonding table all security and GATT information related to the + * specified device. + * + * @param Peer_Identity_Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @param Peer_Identity_Address Public or Random (static) Identity Address of + * the peer device + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_remove_bonded_device( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address ); + +/** + * @brief ACI_GAP_ADD_DEVICES_TO_LIST + * This command is used to add specific device addresses to the Filter Accept + * List and/or resolving list. + * + * @param Num_of_List_Entries Number of devices that have to be added to the + * list. + * @param List_Entry See @ref List_Entry_t + * @param Mode Mode used for adding devices in the lists. + * Values: + * - 0x00: Append to the resolving list only + * - 0x01: Clear and set the resolving list only + * - 0x02: Append to the Filter Accept List only + * - 0x03: Clear and set the Filter Accept List only + * - 0x04: Append to both resolving list and Filter Accept List + * - 0x05: Clear and set both resolving list and Filter Accept List + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_add_devices_to_list( uint8_t Num_of_List_Entries, + const List_Entry_t* List_Entry, + uint8_t Mode ); + +/** + * @brief ACI_GAP_PAIRING_REQUEST_REPLY + * This command is used to reply to ACI_GAP_PAIRING_REQUEST_EVENT. It enables + * to allow or reject either the Pairing Request from the Central or the + * Security Request from the Peripheral. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Accept Enables to accept or reject the pairing request. + * Values: + * - 0x00: Reject + * - 0x01: Accept + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_pairing_request_reply( uint16_t Connection_Handle, + uint8_t Accept ); + +/** + * @brief ACI_GAP_ADDITIONAL_BEACON_START + * This command starts an advertising beacon. It allows additional advertising + * packets to be transmitted independently of the packets transmitted with GAP + * advertising commands such as ACI_GAP_SET_DISCOVERABLE or + * ACI_GAP_SET_LIMITED_DISCOVERABLE. + * + * @param Adv_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Adv_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Adv_Channel_Map Advertising channel map. + * Flags: + * - 0x01: Channel 37 shall be used + * - 0x02: Channel 38 shall be used + * - 0x04: Channel 39 shall be used + * @param Own_Address_Type Own address type: public or static random. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * @param Own_Address Public Device Address or Random Device Address. + * @param PA_Level Power amplifier output level. + * Values: + * - 0x00 ... 0x23 + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_additional_beacon_start( uint16_t Adv_Interval_Min, + uint16_t Adv_Interval_Max, + uint8_t Adv_Channel_Map, + uint8_t Own_Address_Type, + const uint8_t* Own_Address, + uint8_t PA_Level ); + +/** + * @brief ACI_GAP_ADDITIONAL_BEACON_STOP + * This command stops the advertising beacon started with + * ACI_GAP_ADDITIONAL_BEACON_START. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_additional_beacon_stop( void ); + +/** + * @brief ACI_GAP_ADDITIONAL_BEACON_SET_DATA + * This command sets the data transmitted by the advertising beacon started + * with ACI_GAP_ADDITIONAL_BEACON_START. If the advertising beacon is already + * started, the new data is used in subsequent beacon advertising events. + * + * @param Adv_Data_Length Length of Adv_Data in octets + * @param Adv_Data Advertising data used by the device while advertising. + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_additional_beacon_set_data( uint8_t Adv_Data_Length, + const uint8_t* Adv_Data ); + +/** + * @brief ACI_GAP_ADV_SET_CONFIGURATION + * This command is used to set the extended advertising configuration for one + * advertising set. + * This command, in association with ACI_GAP_ADV_SET_SCAN_RESP_DATA, + * ACI_GAP_ADV_SET_ADV_DATA and ACI_GAP_ADV_SET_ENABLE, enables to start + * extended advertising. These commands must be used in replacement of + * ACI_GAP_SET_DISCOVERABLE, ACI_GAP_SET_LIMITED_DISCOVERABLE, + * ACI_GAP_SET_DIRECT_CONNECTABLE, ACI_GAP_SET_NON_CONNECTABLE, + * ACI_GAP_SET_UNDIRECTED_CONNECTABLE and ACI_GAP_SET_BROADCAST_MODE that only + * support legacy advertising. + * If bit 0 of Adv_Mode is set, the Own_Address_Type parameter is ignored and + * the own address shall be set with the ACI_GAP_ADV_SET_RANDOM_ADDRESS + * command. This mode is only valid for non-connectable advertising. + * + * @param Adv_Mode Bitmap of extended advertising modes + * Flags: + * - 0x01: Use specific random address + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Adv_Event_Properties Type of advertising event. + * Flags: + * - 0x0001: Connectable advertising + * - 0x0002: Scannable advertising + * - 0x0004: Directed advertising + * - 0x0008: High Duty Cycle Directed Connectable advertising + * - 0x0010: Use legacy advertising PDUs + * - 0x0020: Anonymous advertising + * - 0x0040: Include TxPower in at least one advertising PDU + * @param Primary_Adv_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x00000020 (20.000 ms) ... 0x00FFFFFF (10485759.375 ms) + * @param Primary_Adv_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x00000020 (20.000 ms) ... 0x00FFFFFF (10485759.375 ms) + * @param Primary_Adv_Channel_Map Advertising channel map. + * Flags: + * - 0x01: Channel 37 shall be used + * - 0x02: Channel 38 shall be used + * - 0x04: Channel 39 shall be used + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Peer_Address_Type Address type of the peer device. + * Values: + * - 0x00: Public Device Address or Public Identity Address + * - 0x01: Random Device Address or Random (static) Identity Address + * @param Peer_Address Public Device Address, Random Device Address, Public + * Identity Address, or Random (static) Identity Address of the device + * to be connected. + * @param Adv_Filter_Policy Advertising filter policy + * Values: + * - 0x00: Process scan and connection requests from all devices (i.e., + * the Filter Accept List is not in use) + * - 0x01: Process connection requests from all devices and scan + * requests only from devices that are in the Filter Accept List. + * - 0x02: Process scan requests from all devices and connection + * requests only from devices that are in the Filter Accept List. + * - 0x03: Process scan and connection requests only from devices in the + * Filter Accept List. + * @param Adv_TX_Power Advertising TX power. Units: dBm. + * Values: + * - 127: Host has no preference + * - -127 ... 20 + * @param Secondary_Adv_Max_Skip Secondary advertising maximum skip. + * Values: + * - 0x00: AUX_ADV_IND shall be sent prior to the next advertising event + * - 0x01 ... 0xFF: Maximum advertising events the Controller can skip + * before sending the AUX_ADV_IND packets on the secondary advertising + * physical channel + * @param Secondary_Adv_PHY Secondary advertising PHY. + * Values: + * - 0x01: Secondary advertisement PHY is LE 1M + * - 0x02: Secondary advertisement PHY is LE 2M + * @param Adv_SID Value of the Advertising SID subfield in the ADI field of the + * PDU. + * Values: + * - 0x00 ... 0x0F + * @param Scan_Req_Notification_Enable Scan request notifications. + * Values: + * - 0x00: Scan request notifications disabled + * - 0x01: Scan request notifications enabled + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_adv_set_configuration( uint8_t Adv_Mode, + uint8_t Advertising_Handle, + uint16_t Adv_Event_Properties, + uint32_t Primary_Adv_Interval_Min, + uint32_t Primary_Adv_Interval_Max, + uint8_t Primary_Adv_Channel_Map, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Adv_Filter_Policy, + uint8_t Adv_TX_Power, + uint8_t Secondary_Adv_Max_Skip, + uint8_t Secondary_Adv_PHY, + uint8_t Adv_SID, + uint8_t Scan_Req_Notification_Enable ); + +/** + * @brief ACI_GAP_ADV_SET_ENABLE + * This command is used to request the Controller to enable or disable one or + * more extended advertising sets. + * + * @param Enable Enable/disable advertising. + * Values: + * - 0x00: Advertising is disabled + * - 0x01: Advertising is enabled + * @param Num_Sets Number of advertising sets. + * Values: + * - 0x00: Disable all advertising sets + * - 0x01 ... 0x3F: Number of advertising sets to enable or disable + * @param Adv_Set See @ref Adv_Set_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_adv_set_enable( uint8_t Enable, + uint8_t Num_Sets, + const Adv_Set_t* Adv_Set ); + +/** + * @brief ACI_GAP_ADV_SET_ADV_DATA + * This command is used to set the data used in extended advertising PDUs that + * have a data field. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Operation Advertising operation. + * Values: + * - 0x00: Intermediate fragment of fragmented extended advertising data + * - 0x01: First fragment of fragmented extended advertising data + * - 0x02: Last fragment of fragmented extended advertising data + * - 0x03: Complete extended advertising data + * - 0x04: Unchanged data (just update the Advertising DID) + * @param Fragment_Preference Fragment preference. + * Values: + * - 0x00: The Controller may fragment all data + * - 0x01: The Controller should not fragment or should minimize + * fragmentation of data + * @param Advertising_Data_Length Length of Advertising_Data in octets + * @param Advertising_Data Data formatted as defined in Core Specification [Vol + * 3, Part C, 11]. + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_adv_set_adv_data( uint8_t Advertising_Handle, + uint8_t Operation, + uint8_t Fragment_Preference, + uint8_t Advertising_Data_Length, + const uint8_t* Advertising_Data ); + +/** + * @brief ACI_GAP_ADV_SET_SCAN_RESP_DATA + * This command is used to provide scan response data used during extended + * advertising. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Operation Scan response operation. + * Values: + * - 0x00: Intermediate fragment of fragmented scan response data + * - 0x01: First fragment of fragmented scan response data + * - 0x02: Last fragment of fragmented scan response data + * - 0x03: Complete scan response data + * @param Fragment_Preference Fragment preference. + * Values: + * - 0x00: The Controller may fragment all data + * - 0x01: The Controller should not fragment or should minimize + * fragmentation of data + * @param Scan_Response_Data_Length Length of Scan_Response_Data in octets + * @param Scan_Response_Data Data formatted as defined in Core Specification + * [Vol 3, Part C, 11]. + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_adv_set_scan_resp_data( uint8_t Advertising_Handle, + uint8_t Operation, + uint8_t Fragment_Preference, + uint8_t Scan_Response_Data_Length, + const uint8_t* Scan_Response_Data ); + +/** + * @brief ACI_GAP_ADV_REMOVE_SET + * This command is used to remove an advertising set from the Controller. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_adv_remove_set( uint8_t Advertising_Handle ); + +/** + * @brief ACI_GAP_ADV_CLEAR_SETS + * This command is used to remove all existing advertising sets from the + * Controller. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_adv_clear_sets( void ); + +/** + * @brief ACI_GAP_ADV_SET_RANDOM_ADDRESS + * This command is used to set the random device address of an advertising set + * configured to use specific random address. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Random_Address Random Device Address. + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_adv_set_random_address( uint8_t Advertising_Handle, + const uint8_t* Random_Address ); + +/** + * @brief ACI_GAP_EXT_START_SCAN + * This command is used to start a scanning procedure when the extended + * advertising feature is supported. + * The Scanning_PHYs and subsequent parameters are used to specify the scanning + * parameters as defined for HCI_LE_SET_EXTENDED_SCAN_PARAMETERS: for more + * details, refer to Core Specification [Vol 4, Part E, 7.8.64]. + * Note: this more generic command can be used instead of + * ACI_GAP_START_LIMITED_DISCOVERY_PROC, ACI_GAP_START_GENERAL_DISCOVERY_PROC, + * ACI_GAP_START_GENERAL_CONNECTION_ESTABLISH_PROC, + * ACI_GAP_START_SELECTIVE_CONNECTION_ESTABLISH_PROC or + * ACI_GAP_START_OBSERVATION_PROC. + * + * @param Scan_Mode Reserved, shall be set to 0. + * Values: + * - 0x00 + * @param Procedure Scan procedure. + * Values: + * - 0x01: GAP_LIMITED_DISCOVERY_PROC + * - 0x02: GAP_GENERAL_DISCOVERY_PROC + * - 0x10: GAP_GENERAL_CONNECTION_ESTABLISHMENT_PROC + * - 0x20: GAP_SELECTIVE_CONNECTION_ESTABLISHMENT_PROC + * - 0x80: GAP_OBSERVATION_PROC + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address or a non-resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * - 0x03: Non-resolvable private address + * @param Filter_Duplicates Duplicate filtering. + * Values: + * - 0x00: Duplicate filtering disabled + * - 0x01: Duplicate filtering enabled + * - 0x02: Duplicate filtering enabled, reset for each scan period + * @param Duration Scan duration. + * Time = N * 10 ms. + * Values: + * - 0x0000 (0 ms) : Scan continuously until explicitly disable + * - 0x0001 (10 ms) ... 0xFFFF (655350 ms) : Scan duration + * @param Period Scan period. + * Time = N * 1.28 s. + * Values: + * - 0x0000 (0 ms) : Scan continuously + * - 0x0001 (1280 ms) ... 0xFFFF (83884800 ms) : Time interval from + * when the Controller started its last Scan_Duration until it begins + * the subsequent Scan_Duration + * @param Scanning_Filter_Policy The scanning filter policy determines how the + * scanner's Link Layer processes advertising and scan response PDUs. + * There is a choice of two primary filter policies: unfiltered and + * filtered. + * Unfiltered: the Link Layer processes all advertising and scan + * response PDUs (i.e., the Filter Accept List is not used). + * Filtered: the Link Layer processes advertising and scan response PDUs + * only from devices in the Filter Accept List. + * With extended scanning filter policies, a directed advertising PDU + * accepted by the primary filter policy shall nevertheless be ignored + * unless either the TargetA field is identical to the scanner's device + * address, or TargetA field is a resolvable private address. + * Values: + * - 0x00: Basic unfiltered scanning filter policy + * - 0x01: Basic filtered scanning filter policy + * - 0x02: Extended unfiltered scanning filter policy + * - 0x03: Extended filtered scanning filter policy + * @param Scanning_PHYs Scan PHYs. + * Flags: + * - 0x01: Scan advertisements on the LE 1M PHY + * @param Scan_Param_Phy See @ref Scan_Param_Phy_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_ext_start_scan( uint8_t Scan_Mode, + uint8_t Procedure, + uint8_t Own_Address_Type, + uint8_t Filter_Duplicates, + uint16_t Duration, + uint16_t Period, + uint8_t Scanning_Filter_Policy, + uint8_t Scanning_PHYs, + const Scan_Param_Phy_t* Scan_Param_Phy ); + +/** + * @brief ACI_GAP_EXT_CREATE_CONNECTION + * This command is used to create a connection with the local device in the + * Central role to an advertiser when the extended advertising feature is + * supported. + * The Advertising_Handle and Subevent parameters are ignored. + * The Initiating_PHYs and subsequent parameters are used to specify the + * initiating parameters as defined for HCI_LE_EXTENDED_CREATE_CONNECTION: for + * more details, refer to Core Specification [Vol 4, Part E, 7.8.66]. + * Note: this more generic command can be used instead of + * ACI_GAP_CREATE_CONNECTION or ACI_GAP_START_AUTO_CONNECTION_ESTABLISH_PROC. + * + * @param Initiating_Mode Reserved, shall be set to 0. + * Values: + * - 0x00 + * @param Procedure Connection procedure. + * Values: + * - 0x08: GAP_AUTO_CONNECTION_ESTABLISHMENT_PROC + * - 0x40: GAP_DIRECT_CONNECTION_ESTABLISHMENT_PROC + * @param Own_Address_Type Own address type: if Privacy is disabled, the + * address can be public or static random; otherwise, it can be a + * resolvable private address. + * Values: + * - 0x00: Public address + * - 0x01: Static random address + * - 0x02: Resolvable private address + * @param Peer_Address_Type The address type of the peer device. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * @param Peer_Address Public Device Address or Random Device Address of the + * device to be connected. + * @param Advertising_Handle Used to identify the subevent where a connection + * request shall be initiated from a periodic advertising train. + * Values: + * - 0xFF: Parameter not used + * - 0x00 ... 0xEF + * @param Subevent Subevent where the connection request is to be sent. + * Values: + * - 0xFF: Parameter not used + * - 0x00 ... 0x7F + * @param Initiator_Filter_Policy Initiator filter policy. + * Values: + * - 0x00: Filter Accept List is not used to determine which advertiser + * to connect to + * - 0x01: Filter Accept List is used to determine which advertiser to + * connect to (Peer_Address_Type and Peer_Address are ignored) + * @param Initiating_PHYs Initiating PHYs. + * Flags: + * - 0x01: Scan connectable advertisements on the LE 1M PHY- Connection + * parameters for the LE 1M PHY + * - 0x02: Connection parameters for the LE 2M PHY + * @param Init_Param_Phy See @ref Init_Param_Phy_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gap_ext_create_connection( uint8_t Initiating_Mode, + uint8_t Procedure, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Advertising_Handle, + uint8_t Subevent, + uint8_t Initiator_Filter_Policy, + uint8_t Initiating_PHYs, + const Init_Param_Phy_t* Init_Param_Phy ); + + +#endif /* BLE_GAP_ACI_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c new file mode 100644 index 0000000..90d18ef --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.c @@ -0,0 +1,1521 @@ +/***************************************************************************** + * @file ble_gatt_aci.c + * @brief STM32WB BLE API (gatt_aci) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#include "auto/ble_gatt_aci.h" + +tBleStatus aci_gatt_init( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x101; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_add_service( uint8_t Service_UUID_Type, + const Service_UUID_t* Service_UUID, + uint8_t Service_Type, + uint8_t Max_Attribute_Records, + uint16_t* Service_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_add_service_cp0 *cp0 = (aci_gatt_add_service_cp0*)(cmd_buffer); + aci_gatt_add_service_cp1 *cp1 = (aci_gatt_add_service_cp1*)(cmd_buffer + 1 + (Service_UUID_Type == 1 ? 2 : (Service_UUID_Type == 2 ? 16 : 0))); + aci_gatt_add_service_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Service_UUID_Type = Service_UUID_Type; + index_input += 1; + /* var_len_data input */ + { + uint8_t size; + switch ( Service_UUID_Type ) + { + case 1: size = 2; break; + case 2: size = 16; break; + default: return BLE_STATUS_ERROR; + } + Osal_MemCpy( (void*)&cp0->Service_UUID, (const void*)Service_UUID, size ); + index_input += size; + { + cp1->Service_Type = Service_Type; + } + index_input += 1; + { + cp1->Max_Attribute_Records = Max_Attribute_Records; + } + index_input += 1; + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x102; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Service_Handle = resp.Service_Handle; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gatt_include_service( uint16_t Service_Handle, + uint16_t Include_Start_Handle, + uint16_t Include_End_Handle, + uint8_t Include_UUID_Type, + const Include_UUID_t* Include_UUID, + uint16_t* Include_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_include_service_cp0 *cp0 = (aci_gatt_include_service_cp0*)(cmd_buffer); + aci_gatt_include_service_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + int uuid_size = (Include_UUID_Type == 2) ? 16 : 2; + cp0->Service_Handle = Service_Handle; + index_input += 2; + cp0->Include_Start_Handle = Include_Start_Handle; + index_input += 2; + cp0->Include_End_Handle = Include_End_Handle; + index_input += 2; + cp0->Include_UUID_Type = Include_UUID_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Include_UUID, (const void*)Include_UUID, uuid_size ); + index_input += uuid_size; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x103; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Include_Handle = resp.Include_Handle; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gatt_add_char( uint16_t Service_Handle, + uint8_t Char_UUID_Type, + const Char_UUID_t* Char_UUID, + uint16_t Char_Value_Length, + uint8_t Char_Properties, + uint8_t Security_Permissions, + uint8_t GATT_Evt_Mask, + uint8_t Enc_Key_Size, + uint8_t Is_Variable, + uint16_t* Char_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_add_char_cp0 *cp0 = (aci_gatt_add_char_cp0*)(cmd_buffer); + aci_gatt_add_char_cp1 *cp1 = (aci_gatt_add_char_cp1*)(cmd_buffer + 2 + 1 + (Char_UUID_Type == 1 ? 2 : (Char_UUID_Type == 2 ? 16 : 0))); + aci_gatt_add_char_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Service_Handle = Service_Handle; + index_input += 2; + cp0->Char_UUID_Type = Char_UUID_Type; + index_input += 1; + /* var_len_data input */ + { + uint8_t size; + switch ( Char_UUID_Type ) + { + case 1: size = 2; break; + case 2: size = 16; break; + default: return BLE_STATUS_ERROR; + } + Osal_MemCpy( (void*)&cp0->Char_UUID, (const void*)Char_UUID, size ); + index_input += size; + { + cp1->Char_Value_Length = Char_Value_Length; + } + index_input += 2; + { + cp1->Char_Properties = Char_Properties; + } + index_input += 1; + { + cp1->Security_Permissions = Security_Permissions; + } + index_input += 1; + { + cp1->GATT_Evt_Mask = GATT_Evt_Mask; + } + index_input += 1; + { + cp1->Enc_Key_Size = Enc_Key_Size; + } + index_input += 1; + { + cp1->Is_Variable = Is_Variable; + } + index_input += 1; + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x104; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Char_Handle = resp.Char_Handle; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gatt_add_char_desc( uint16_t Service_Handle, + uint16_t Char_Handle, + uint8_t Char_Desc_Uuid_Type, + const Char_Desc_Uuid_t* Char_Desc_Uuid, + uint8_t Char_Desc_Value_Max_Len, + uint8_t Char_Desc_Value_Length, + const uint8_t* Char_Desc_Value, + uint8_t Security_Permissions, + uint8_t Access_Permissions, + uint8_t GATT_Evt_Mask, + uint8_t Enc_Key_Size, + uint8_t Is_Variable, + uint16_t* Char_Desc_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_add_char_desc_cp0 *cp0 = (aci_gatt_add_char_desc_cp0*)(cmd_buffer); + aci_gatt_add_char_desc_cp1 *cp1 = (aci_gatt_add_char_desc_cp1*)(cmd_buffer + 2 + 2 + 1 + (Char_Desc_Uuid_Type == 1 ? 2 : (Char_Desc_Uuid_Type == 2 ? 16 : 0))); + aci_gatt_add_char_desc_cp2 *cp2 = (aci_gatt_add_char_desc_cp2*)(cmd_buffer + 2 + 2 + 1 + (Char_Desc_Uuid_Type == 1 ? 2 : (Char_Desc_Uuid_Type == 2 ? 16 : 0)) + 1 + 1 + Char_Desc_Value_Length * (sizeof(uint8_t))); + aci_gatt_add_char_desc_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Service_Handle = Service_Handle; + index_input += 2; + cp0->Char_Handle = Char_Handle; + index_input += 2; + cp0->Char_Desc_Uuid_Type = Char_Desc_Uuid_Type; + index_input += 1; + /* var_len_data input */ + { + uint8_t size; + switch ( Char_Desc_Uuid_Type ) + { + case 1: size = 2; break; + case 2: size = 16; break; + default: return BLE_STATUS_ERROR; + } + Osal_MemCpy( (void*)&cp0->Char_Desc_Uuid, (const void*)Char_Desc_Uuid, size ); + index_input += size; + { + cp1->Char_Desc_Value_Max_Len = Char_Desc_Value_Max_Len; + } + index_input += 1; + { + cp1->Char_Desc_Value_Length = Char_Desc_Value_Length; + } + index_input += 1; + Osal_MemCpy( (void*)&cp1->Char_Desc_Value, (const void*)Char_Desc_Value, Char_Desc_Value_Length ); + index_input += Char_Desc_Value_Length; + { + cp2->Security_Permissions = Security_Permissions; + } + index_input += 1; + { + cp2->Access_Permissions = Access_Permissions; + } + index_input += 1; + { + cp2->GATT_Evt_Mask = GATT_Evt_Mask; + } + index_input += 1; + { + cp2->Enc_Key_Size = Enc_Key_Size; + } + index_input += 1; + { + cp2->Is_Variable = Is_Variable; + } + index_input += 1; + } + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x105; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Char_Desc_Handle = resp.Char_Desc_Handle; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gatt_update_char_value( uint16_t Service_Handle, + uint16_t Char_Handle, + uint8_t Val_Offset, + uint8_t Char_Value_Length, + const uint8_t* Char_Value ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_update_char_value_cp0 *cp0 = (aci_gatt_update_char_value_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Service_Handle = Service_Handle; + index_input += 2; + cp0->Char_Handle = Char_Handle; + index_input += 2; + cp0->Val_Offset = Val_Offset; + index_input += 1; + cp0->Char_Value_Length = Char_Value_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Char_Value, (const void*)Char_Value, Char_Value_Length ); + index_input += Char_Value_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x106; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_del_char( uint16_t Serv_Handle, + uint16_t Char_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_del_char_cp0 *cp0 = (aci_gatt_del_char_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Serv_Handle = Serv_Handle; + index_input += 2; + cp0->Char_Handle = Char_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x107; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_del_service( uint16_t Serv_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_del_service_cp0 *cp0 = (aci_gatt_del_service_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Serv_Handle = Serv_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x108; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_del_include_service( uint16_t Serv_Handle, + uint16_t Include_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_del_include_service_cp0 *cp0 = (aci_gatt_del_include_service_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Serv_Handle = Serv_Handle; + index_input += 2; + cp0->Include_Handle = Include_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x109; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_set_event_mask( uint32_t GATT_Evt_Mask ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_set_event_mask_cp0 *cp0 = (aci_gatt_set_event_mask_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->GATT_Evt_Mask = GATT_Evt_Mask; + index_input += 4; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x10a; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_exchange_config( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_exchange_config_cp0 *cp0 = (aci_gatt_exchange_config_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x10b; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_att_find_info_req( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_att_find_info_req_cp0 *cp0 = (aci_att_find_info_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Start_Handle = Start_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x10c; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_att_find_by_type_value_req( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint16_t UUID, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_att_find_by_type_value_req_cp0 *cp0 = (aci_att_find_by_type_value_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Start_Handle = Start_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + cp0->UUID = UUID; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x10d; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_att_read_by_type_req( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_att_read_by_type_req_cp0 *cp0 = (aci_att_read_by_type_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + int uuid_size = (UUID_Type == 2) ? 16 : 2; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Start_Handle = Start_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + cp0->UUID_Type = UUID_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->UUID, (const void*)UUID, uuid_size ); + index_input += uuid_size; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x10e; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_att_read_by_group_type_req( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_att_read_by_group_type_req_cp0 *cp0 = (aci_att_read_by_group_type_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + int uuid_size = (UUID_Type == 2) ? 16 : 2; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Start_Handle = Start_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + cp0->UUID_Type = UUID_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->UUID, (const void*)UUID, uuid_size ); + index_input += uuid_size; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x10f; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_att_prepare_write_req( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_att_prepare_write_req_cp0 *cp0 = (aci_att_prepare_write_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Val_Offset = Val_Offset; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x110; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_att_execute_write_req( uint16_t Connection_Handle, + uint8_t Execute ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_att_execute_write_req_cp0 *cp0 = (aci_att_execute_write_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Execute = Execute; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x111; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_disc_all_primary_services( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_disc_all_primary_services_cp0 *cp0 = (aci_gatt_disc_all_primary_services_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x112; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_disc_primary_service_by_uuid( uint16_t Connection_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_disc_primary_service_by_uuid_cp0 *cp0 = (aci_gatt_disc_primary_service_by_uuid_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + int uuid_size = (UUID_Type == 2) ? 16 : 2; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->UUID_Type = UUID_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->UUID, (const void*)UUID, uuid_size ); + index_input += uuid_size; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x113; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_find_included_services( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_find_included_services_cp0 *cp0 = (aci_gatt_find_included_services_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Start_Handle = Start_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x114; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_disc_all_char_of_service( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_disc_all_char_of_service_cp0 *cp0 = (aci_gatt_disc_all_char_of_service_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Start_Handle = Start_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x115; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_disc_char_by_uuid( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_disc_char_by_uuid_cp0 *cp0 = (aci_gatt_disc_char_by_uuid_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + int uuid_size = (UUID_Type == 2) ? 16 : 2; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Start_Handle = Start_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + cp0->UUID_Type = UUID_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->UUID, (const void*)UUID, uuid_size ); + index_input += uuid_size; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x116; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_disc_all_char_desc( uint16_t Connection_Handle, + uint16_t Char_Handle, + uint16_t End_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_disc_all_char_desc_cp0 *cp0 = (aci_gatt_disc_all_char_desc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Char_Handle = Char_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x117; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_read_char_value( uint16_t Connection_Handle, + uint16_t Attr_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_read_char_value_cp0 *cp0 = (aci_gatt_read_char_value_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x118; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_read_using_char_uuid( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_read_using_char_uuid_cp0 *cp0 = (aci_gatt_read_using_char_uuid_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + int uuid_size = (UUID_Type == 2) ? 16 : 2; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Start_Handle = Start_Handle; + index_input += 2; + cp0->End_Handle = End_Handle; + index_input += 2; + cp0->UUID_Type = UUID_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->UUID, (const void*)UUID, uuid_size ); + index_input += uuid_size; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x119; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_read_long_char_value( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_read_long_char_value_cp0 *cp0 = (aci_gatt_read_long_char_value_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Val_Offset = Val_Offset; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x11a; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_read_multiple_char_value( uint16_t Connection_Handle, + uint8_t Number_of_Handles, + const Handle_Entry_t* Handle_Entry ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_read_multiple_char_value_cp0 *cp0 = (aci_gatt_read_multiple_char_value_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Number_of_Handles = Number_of_Handles; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Handle_Entry, (const void*)Handle_Entry, Number_of_Handles * (sizeof(Handle_Entry_t)) ); + index_input += Number_of_Handles * (sizeof(Handle_Entry_t)); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x11b; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_write_char_value( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_write_char_value_cp0 *cp0 = (aci_gatt_write_char_value_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x11c; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_write_long_char_value( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_write_long_char_value_cp0 *cp0 = (aci_gatt_write_long_char_value_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Val_Offset = Val_Offset; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x11d; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_write_char_reliable( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_write_char_reliable_cp0 *cp0 = (aci_gatt_write_char_reliable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Val_Offset = Val_Offset; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x11e; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_write_long_char_desc( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_write_long_char_desc_cp0 *cp0 = (aci_gatt_write_long_char_desc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Val_Offset = Val_Offset; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x11f; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_read_long_char_desc( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_read_long_char_desc_cp0 *cp0 = (aci_gatt_read_long_char_desc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Val_Offset = Val_Offset; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x120; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_write_char_desc( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_write_char_desc_cp0 *cp0 = (aci_gatt_write_char_desc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x121; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_read_char_desc( uint16_t Connection_Handle, + uint16_t Attr_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_read_char_desc_cp0 *cp0 = (aci_gatt_read_char_desc_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x122; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_write_without_resp( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_write_without_resp_cp0 *cp0 = (aci_gatt_write_without_resp_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x123; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_signed_write_without_resp( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_signed_write_without_resp_cp0 *cp0 = (aci_gatt_signed_write_without_resp_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x124; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_confirm_indication( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_confirm_indication_cp0 *cp0 = (aci_gatt_confirm_indication_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x125; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_write_resp( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Write_status, + uint8_t Error_Code, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_write_resp_cp0 *cp0 = (aci_gatt_write_resp_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Write_status = Write_status; + index_input += 1; + cp0->Error_Code = Error_Code; + index_input += 1; + cp0->Attribute_Val_Length = Attribute_Val_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Attribute_Val, (const void*)Attribute_Val, Attribute_Val_Length ); + index_input += Attribute_Val_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x126; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_allow_read( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_allow_read_cp0 *cp0 = (aci_gatt_allow_read_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x127; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_set_security_permission( uint16_t Serv_Handle, + uint16_t Attr_Handle, + uint8_t Security_Permissions ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_set_security_permission_cp0 *cp0 = (aci_gatt_set_security_permission_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Serv_Handle = Serv_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Security_Permissions = Security_Permissions; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x128; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_set_desc_value( uint16_t Serv_Handle, + uint16_t Char_Handle, + uint16_t Char_Desc_Handle, + uint16_t Val_Offset, + uint8_t Char_Desc_Value_Length, + const uint8_t* Char_Desc_Value ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_set_desc_value_cp0 *cp0 = (aci_gatt_set_desc_value_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Serv_Handle = Serv_Handle; + index_input += 2; + cp0->Char_Handle = Char_Handle; + index_input += 2; + cp0->Char_Desc_Handle = Char_Desc_Handle; + index_input += 2; + cp0->Val_Offset = Val_Offset; + index_input += 2; + cp0->Char_Desc_Value_Length = Char_Desc_Value_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Char_Desc_Value, (const void*)Char_Desc_Value, Char_Desc_Value_Length ); + index_input += Char_Desc_Value_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x129; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_read_handle_value( uint16_t Attr_Handle, + uint16_t Offset, + uint16_t Value_Length_Requested, + uint16_t* Length, + uint16_t* Value_Length, + uint8_t* Value ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_read_handle_value_cp0 *cp0 = (aci_gatt_read_handle_value_cp0*)(cmd_buffer); + aci_gatt_read_handle_value_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Offset = Offset; + index_input += 2; + cp0->Value_Length_Requested = Value_Length_Requested; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x12a; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Length = resp.Length; + *Value_Length = resp.Value_Length; + Osal_MemCpy( (void*)Value, (const void*)resp.Value, *Value_Length); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_gatt_update_char_value_ext( uint16_t Conn_Handle_To_Notify, + uint16_t Service_Handle, + uint16_t Char_Handle, + uint8_t Update_Type, + uint16_t Char_Length, + uint16_t Value_Offset, + uint8_t Value_Length, + const uint8_t* Value ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_update_char_value_ext_cp0 *cp0 = (aci_gatt_update_char_value_ext_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Conn_Handle_To_Notify = Conn_Handle_To_Notify; + index_input += 2; + cp0->Service_Handle = Service_Handle; + index_input += 2; + cp0->Char_Handle = Char_Handle; + index_input += 2; + cp0->Update_Type = Update_Type; + index_input += 1; + cp0->Char_Length = Char_Length; + index_input += 2; + cp0->Value_Offset = Value_Offset; + index_input += 2; + cp0->Value_Length = Value_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Value, (const void*)Value, Value_Length ); + index_input += Value_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x12c; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_deny_read( uint16_t Connection_Handle, + uint8_t Error_Code ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_deny_read_cp0 *cp0 = (aci_gatt_deny_read_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Error_Code = Error_Code; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x12d; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_set_access_permission( uint16_t Serv_Handle, + uint16_t Attr_Handle, + uint8_t Access_Permissions ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_set_access_permission_cp0 *cp0 = (aci_gatt_set_access_permission_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Serv_Handle = Serv_Handle; + index_input += 2; + cp0->Attr_Handle = Attr_Handle; + index_input += 2; + cp0->Access_Permissions = Access_Permissions; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x12e; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_store_db( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x130; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_send_mult_notification( uint16_t Connection_Handle, + uint8_t Number_of_Handles, + const Handle_Entry_t* Handle_Entry ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_send_mult_notification_cp0 *cp0 = (aci_gatt_send_mult_notification_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Number_of_Handles = Number_of_Handles; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Handle_Entry, (const void*)Handle_Entry, Number_of_Handles * (sizeof(Handle_Entry_t)) ); + index_input += Number_of_Handles * (sizeof(Handle_Entry_t)); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x131; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_gatt_read_multiple_var_char_value( uint16_t Connection_Handle, + uint8_t Number_of_Handles, + const Handle_Entry_t* Handle_Entry ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_gatt_read_multiple_var_char_value_cp0 *cp0 = (aci_gatt_read_multiple_var_char_value_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Number_of_Handles = Number_of_Handles; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Handle_Entry, (const void*)Handle_Entry, Number_of_Handles * (sizeof(Handle_Entry_t)) ); + index_input += Number_of_Handles * (sizeof(Handle_Entry_t)); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x132; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h new file mode 100644 index 0000000..302a53a --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_gatt_aci.h @@ -0,0 +1,1281 @@ +/***************************************************************************** + * @file ble_gatt_aci.h + * @brief STM32WB BLE API (GATT_ACI) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_GATT_ACI_H__ +#define BLE_GATT_ACI_H__ + + +#include "auto/ble_types.h" + +/** + * @brief ACI_GATT_INIT + * Initializes the GATT layer for server and client roles. It also adds the + * GATT service with Service Changed Characteristic. + * Until this command is issued the GATT channel does not process any commands + * even if the connection is opened. This command has to be given before using + * any of the GAP features. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_init( void ); + +/** + * @brief ACI_GATT_ADD_SERVICE + * Add a service to GATT Server. When a service is created in the server, the + * host needs to reserve the handle ranges for this service using + * Max_Attribute_Records parameter. This parameter specifies the maximum number + * of attribute records that can be added to this service (including the + * service attribute, include attribute, characteristic attribute, + * characteristic value attribute and characteristic descriptor attribute). + * Handle of the created service is returned in command complete event. Service + * declaration is taken from the service pool. + * The attributes for characteristics and descriptors are allocated from the + * attribute pool. + * + * @param Service_UUID_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 + * bits UUID + * @param Service_UUID See @ref Service_UUID_t + * @param Service_Type Service type. + * Values: + * - 0x01: Primary Service + * - 0x02: Secondary Service + * @param Max_Attribute_Records Maximum number of attribute records that can be + * added to this service + * @param[out] Service_Handle Handle of the Service. + * When this service is added, a handle is allocated by the server for + * this service. + * Server also allocates a range of handles for this service from + * serviceHandle to + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_add_service( uint8_t Service_UUID_Type, + const Service_UUID_t* Service_UUID, + uint8_t Service_Type, + uint8_t Max_Attribute_Records, + uint16_t* Service_Handle ); + +/** + * @brief ACI_GATT_INCLUDE_SERVICE + * Include a service given by Include_Start_Handle and Include_End_Handle to + * another service given by Service_Handle. Attribute server creates an INCLUDE + * definition attribute and return the handle of this attribute in + * Included_handle. + * + * @param Service_Handle Handle of the Service to which another service has to + * be included. + * @param Include_Start_Handle Start Handle of the Service which has to be + * included in service + * @param Include_End_Handle End Handle of the Service which has to be included + * in service + * @param Include_UUID_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 + * bits UUID + * @param Include_UUID See @ref Include_UUID_t + * @param[out] Include_Handle Handle of the include declaration + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_include_service( uint16_t Service_Handle, + uint16_t Include_Start_Handle, + uint16_t Include_End_Handle, + uint8_t Include_UUID_Type, + const Include_UUID_t* Include_UUID, + uint16_t* Include_Handle ); + +/** + * @brief ACI_GATT_ADD_CHAR + * Adds a characteristic to a service. + * The command returns the handle of the declaration attribute. The attribute + * that holds the Characteristic Value is always allocated at the next handle + * (Char_Handle + 1). The Characteristic Value is immediately followed, in + * order, by: + * - the Server Characteristic Configuration descriptor if CHAR_PROP_BROADCAST + * is selected; + * - the Client Characteristic Configuration descriptor if CHAR_PROP_NOTIFY or + * CHAR_PROP_INDICATE properties is selected; + * - the Characteristic Extended Properties descriptor if CHAR_PROP_EXT is + * selected. + * For instance, if CHAR_PROP_NOTIFY is selected but not CHAR_PROP_BROADCAST + * nor CHAR_PROP_EXT, then the Client Characteristic Configuration attribute + * handle is Char_Handle + 2. + * Additional descriptors can be added to the characteristic by calling the + * ACI_GATT_ADD_CHAR_DESC command immediately after calling this command. + * + * @param Service_Handle Handle of the Service to which the characteristic will + * be added + * @param Char_UUID_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 bits + * UUID + * @param Char_UUID See @ref Char_UUID_t + * @param Char_Value_Length Maximum length of the characteristic value. + * @param Char_Properties Characteristic Properties (Core Specification [Vol 3, + * Part G, 3.3.1.1]) + * Flags: + * - 0x00: CHAR_PROP_NONE + * - 0x01: CHAR_PROP_BROADCAST (Broadcast) + * - 0x02: CHAR_PROP_READ (Read) + * - 0x04: CHAR_PROP_WRITE_WITHOUT_RESP (Write w/o resp) + * - 0x08: CHAR_PROP_WRITE (Write) + * - 0x10: CHAR_PROP_NOTIFY (Notify) + * - 0x20: CHAR_PROP_INDICATE (Indicate) + * - 0x40: CHAR_PROP_SIGNED_WRITE (Authenticated Signed Writes) + * - 0x80: CHAR_PROP_EXT (Extended Properties) + * @param Security_Permissions Security permission flags. + * Flags: + * - 0x00: None + * - 0x01: AUTHEN_READ (Need authentication to read) + * - 0x02: AUTHOR_READ (Need authorization to read) + * - 0x04: ENCRY_READ (Need encryption to read) + * - 0x08: AUTHEN_WRITE (need authentication to write) + * - 0x10: AUTHOR_WRITE (need authorization to write) + * - 0x20: ENCRY_WRITE (need encryption to write) + * @param GATT_Evt_Mask GATT event mask. + * Flags: + * - 0x00: GATT_DONT_NOTIFY_EVENTS + * - 0x01: GATT_NOTIFY_ATTRIBUTE_WRITE + * - 0x02: GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP + * - 0x04: GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP + * - 0x08: GATT_NOTIFY_NOTIFICATION_COMPLETION + * @param Enc_Key_Size Minimum encryption key size required to read the + * characteristic. + * Values: + * - 0x07 ... 0x10 + * @param Is_Variable Specify if the characteristic value has a fixed length or + * a variable length. + * Values: + * - 0x00: Fixed length + * - 0x01: Variable length + * @param[out] Char_Handle Handle of the characteristic that has been added (it + * is the handle of the characteristic declaration). + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_add_char( uint16_t Service_Handle, + uint8_t Char_UUID_Type, + const Char_UUID_t* Char_UUID, + uint16_t Char_Value_Length, + uint8_t Char_Properties, + uint8_t Security_Permissions, + uint8_t GATT_Evt_Mask, + uint8_t Enc_Key_Size, + uint8_t Is_Variable, + uint16_t* Char_Handle ); + +/** + * @brief ACI_GATT_ADD_CHAR_DESC + * Adds a characteristic descriptor to a service. + * Note that this command allocates the new handle for the descriptor after the + * currently allocated handles. It is therefore advisable to call this command + * following the call of the command ACI_GATT_ADD_CHAR which created the + * characteristic containing this descriptor. + * + * @param Service_Handle Handle of service to which the characteristic belongs + * @param Char_Handle Handle of the characteristic to which description has to + * be added + * @param Char_Desc_Uuid_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 + * bits UUID + * @param Char_Desc_Uuid See @ref Char_Desc_Uuid_t + * @param Char_Desc_Value_Max_Len The maximum length of the descriptor value + * @param Char_Desc_Value_Length Current Length of the characteristic + * descriptor value + * @param Char_Desc_Value Value of the characteristic description + * @param Security_Permissions Security permission flags. + * Flags: + * - 0x00: None + * - 0x01: AUTHEN_READ (Need authentication to read) + * - 0x02: AUTHOR_READ (Need authorization to read) + * - 0x04: ENCRY_READ (Need encryption to read) + * - 0x08: AUTHEN_WRITE (need authentication to write) + * - 0x10: AUTHOR_WRITE (need authorization to write) + * - 0x20: ENCRY_WRITE (need encryption to write) + * @param Access_Permissions Access permission + * Flags: + * - 0x00: None + * - 0x01: READ + * - 0x02: WRITE + * - 0x04: WRITE_WO_RESP + * - 0x08: SIGNED_WRITE + * @param GATT_Evt_Mask GATT event mask. + * Flags: + * - 0x00: GATT_DONT_NOTIFY_EVENTS + * - 0x01: GATT_NOTIFY_ATTRIBUTE_WRITE + * - 0x02: GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP + * - 0x04: GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP + * @param Enc_Key_Size Minimum encryption key size required to read the + * characteristic. + * Values: + * - 0x07 ... 0x10 + * @param Is_Variable Specify if the characteristic value has a fixed length or + * a variable length. + * Values: + * - 0x00: Fixed length + * - 0x01: Variable length + * @param[out] Char_Desc_Handle Handle of the characteristic descriptor + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_add_char_desc( uint16_t Service_Handle, + uint16_t Char_Handle, + uint8_t Char_Desc_Uuid_Type, + const Char_Desc_Uuid_t* Char_Desc_Uuid, + uint8_t Char_Desc_Value_Max_Len, + uint8_t Char_Desc_Value_Length, + const uint8_t* Char_Desc_Value, + uint8_t Security_Permissions, + uint8_t Access_Permissions, + uint8_t GATT_Evt_Mask, + uint8_t Enc_Key_Size, + uint8_t Is_Variable, + uint16_t* Char_Desc_Handle ); + +/** + * @brief ACI_GATT_UPDATE_CHAR_VALUE + * Updates a characteristic value in a service. If notifications (or + * indications) are enabled on that characteristic, a notification (or + * indication) is sent to any client that has registered for notifications (or + * indications) via the Client Characteristic Configuration. + * Notes: + * - The command is disallowed if it would cause the generation of an + * indication on a bearer which is still awaiting confirmation of a previous + * indication. + * - The command does not execute and returns BLE_STATUS_BUSY if notifications + * from a previous call are not completed. The application can enable and wait + * for the event ACI_GATT_NOTIFICATION_COMPLETE_EVENT to avoid this case. + * - The command does not execute and returns BLE_STATUS_INSUFFICIENT_RESOURCES + * if there is no more room in the TX pool to allocate notification (or + * indication) packets. This happens if notifications (or indications) are + * enabled and the application calls this command at an higher rate than what + * is allowed by the link. Throughput on BLE link depends on connection + * interval and connection length parameters (decided by the Central, see + * ACI_L2CAP_CONNECTION_PARAMETER_UPDATE_REQ for more information on how to + * suggest new connection parameters from a Peripheral). The application can + * wait for the event ACI_GATT_TX_POOL_AVAILABLE_EVENT before retrying a call + * to this command. It can also retry the call until it does not return + * BLE_STATUS_INSUFFICIENT_RESOURCES anymore. + * - When calling this command, the characteristic value is updated only if the + * command returns BLE_STATUS_SUCCESS or BLE_STATUS_SEC_PERMISSION_ERROR. The + * security permission error means that at least one client has not been + * notified due to security requirements not met. + * + * @param Service_Handle Handle of service to which the characteristic belongs + * @param Char_Handle Handle of the characteristic declaration + * @param Val_Offset The offset from which the attribute value has to be + * updated. + * If this is set to 0 and the attribute value is of variable length, + * then the length of the attribute will be set to the + * Char_Value_Length. + * If the Val_Offset is set to a value greater than 0, then the length + * of the attribute will be set to the maximum length as specified for + * the attribute while adding the characteristic. + * @param Char_Value_Length Length of the Char_Value parameter in octets. + * This value must not exceed (BLE_CMD_MAX_PARAM_LEN - 6) i.e. 249 for + * BLE_CMD_MAX_PARAM_LEN default value. + * @param Char_Value Characteristic value + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_update_char_value( uint16_t Service_Handle, + uint16_t Char_Handle, + uint8_t Val_Offset, + uint8_t Char_Value_Length, + const uint8_t* Char_Value ); + +/** + * @brief ACI_GATT_DEL_CHAR + * Deletes the specified characteristic from the service. + * + * @param Serv_Handle Handle of service to which the characteristic belongs + * @param Char_Handle Handle of the characteristic which has to be deleted + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_del_char( uint16_t Serv_Handle, + uint16_t Char_Handle ); + +/** + * @brief ACI_GATT_DEL_SERVICE + * Deletes the specified service from the GATT server database. + * + * @param Serv_Handle Handle of the service to be deleted + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_del_service( uint16_t Serv_Handle ); + +/** + * @brief ACI_GATT_DEL_INCLUDE_SERVICE + * Deletes the Include definition from the service. + * + * @param Serv_Handle Handle of the service to which the include service + * belongs + * @param Include_Handle Handle of the included service which has to be deleted + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_del_include_service( uint16_t Serv_Handle, + uint16_t Include_Handle ); + +/** + * @brief ACI_GATT_SET_EVENT_MASK + * Masks events from the GATT. If the bit in the GATT_Evt_Mask is set to a one, + * then the event associated with that bit will be enabled. + * + * @param GATT_Evt_Mask ACI GATT/ATT event mask. Default: 0x000FFFFF. + * Values: + * - 0x00000001: ACI_GATT_ATTRIBUTE_MODIFIED_EVENT + * - 0x00000002: ACI_GATT_PROC_TIMEOUT_EVENT + * - 0x00000004: ACI_ATT_EXCHANGE_MTU_RESP_EVENT + * - 0x00000008: ACI_ATT_FIND_INFO_RESP_EVENT + * - 0x00000010: ACI_ATT_FIND_BY_TYPE_VALUE_RESP_EVENT + * - 0x00000020: ACI_ATT_READ_BY_TYPE_RESP_EVENT + * - 0x00000040: ACI_ATT_READ_RESP_EVENT + * - 0x00000080: ACI_ATT_READ_BLOB_RESP_EVENT + * - 0x00000100: ACI_ATT_READ_MULTIPLE_RESP_EVENT + * - 0x00000200: ACI_ATT_READ_BY_GROUP_TYPE_RESP_EVENT + * - 0x00000800: ACI_ATT_PREPARE_WRITE_RESP_EVENT + * - 0x00001000: ACI_ATT_EXEC_WRITE_RESP_EVENT + * - 0x00002000: ACI_GATT_INDICATION_EVENT + * - 0x00004000: ACI_GATT_NOTIFICATION_EVENT + * - 0x00008000: ACI_GATT_ERROR_RESP_EVENT + * - 0x00010000: ACI_GATT_PROC_COMPLETE_EVENT + * - 0x00020000: ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_EVENT + * - 0x00040000: ACI_GATT_TX_POOL_AVAILABLE_EVENT + * - 0x00100000: ACI_GATT_READ_EXT_EVENT + * - 0x00200000: ACI_GATT_INDICATION_EXT_EVENT + * - 0x00400000: ACI_GATT_NOTIFICATION_EXT_EVENT + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_set_event_mask( uint32_t GATT_Evt_Mask ); + +/** + * @brief ACI_GATT_EXCHANGE_CONFIG + * Performs an ATT MTU exchange procedure. + * When the ATT MTU exchange procedure is completed, a + * ACI_ATT_EXCHANGE_MTU_RESP_EVENT event is generated. A + * ACI_GATT_PROC_COMPLETE_EVENT event is also generated to indicate the end of + * the procedure. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_exchange_config( uint16_t Connection_Handle ); + +/** + * @brief ACI_ATT_FIND_INFO_REQ + * Sends a Find Information Request. + * This command is used to obtain the mapping of attribute handles with their + * associated types. The responses of the procedure are given through the + * ACI_ATT_FIND_INFO_RESP_EVENT event. The end of the procedure is indicated by + * a ACI_GATT_PROC_COMPLETE_EVENT event. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Start_Handle First requested handle number + * @param End_Handle Last requested handle number + * @return Value indicating success or error code. + */ +tBleStatus aci_att_find_info_req( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle ); + +/** + * @brief ACI_ATT_FIND_BY_TYPE_VALUE_REQ + * Sends a Find By Type Value Request + * The Find By Type Value Request is used to obtain the handles of attributes + * that have a given 16-bit UUID attribute type and a given attribute value. + * The responses of the procedure are given through the + * ACI_ATT_FIND_BY_TYPE_VALUE_RESP_EVENT event. + * The end of the procedure is indicated by a ACI_GATT_PROC_COMPLETE_EVENT + * event. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Start_Handle First requested handle number + * @param End_Handle Last requested handle number + * @param UUID 2 octet UUID to find (little-endian) + * @param Attribute_Val_Length Length of attribute value (maximum value is + * ATT_MTU - 7). + * @param Attribute_Val Attribute value to find + * @return Value indicating success or error code. + */ +tBleStatus aci_att_find_by_type_value_req( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint16_t UUID, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_ATT_READ_BY_TYPE_REQ + * Sends a Read By Type Request. + * The Read By Type Request is used to obtain the values of attributes where + * the attribute type is known but the handle is not known. + * The responses are given through the ACI_ATT_READ_BY_TYPE_RESP_EVENT event. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Start_Handle First requested handle number + * @param End_Handle Last requested handle number + * @param UUID_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 bits UUID + * @param UUID See @ref UUID_t + * @return Value indicating success or error code. + */ +tBleStatus aci_att_read_by_type_req( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ); + +/** + * @brief ACI_ATT_READ_BY_GROUP_TYPE_REQ + * Sends a Read By Group Type Request. + * The Read By Group Type Request is used to obtain the values of grouping + * attributes where the attribute type is known but the handle is not known. + * Grouping attributes are defined at GATT layer. The grouping attribute types + * are: "Primary Service", "Secondary Service" and "Characteristic". + * The responses of the procedure are given through the + * ACI_ATT_READ_BY_GROUP_TYPE_RESP_EVENT event. + * The end of the procedure is indicated by a ACI_GATT_PROC_COMPLETE_EVENT. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Start_Handle First requested handle number + * @param End_Handle Last requested handle number + * @param UUID_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 bits UUID + * @param UUID See @ref UUID_t + * @return Value indicating success or error code. + */ +tBleStatus aci_att_read_by_group_type_req( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ); + +/** + * @brief ACI_ATT_PREPARE_WRITE_REQ + * Sends a Prepare Write Request. + * The Prepare Write Request is used to request the server to prepare to write + * the value of an attribute. + * The responses of the procedure are given through the + * ACI_ATT_PREPARE_WRITE_RESP_EVENT event. + * The end of the procedure is indicated by a ACI_GATT_PROC_COMPLETE_EVENT. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Attr_Handle Handle of the attribute to be written + * @param Val_Offset The offset of the first octet to be written + * @param Attribute_Val_Length Length of attribute value (maximum value is + * ATT_MTU - 5). + * @param Attribute_Val The value of the attribute to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_att_prepare_write_req( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_ATT_EXECUTE_WRITE_REQ + * Sends an Execute Write Request. + * The Execute Write Request is used to request the server to write or cancel + * the write of all the prepared values currently held in the prepare queue + * from this client. + * The result of the procedure is given through the + * ACI_ATT_EXEC_WRITE_RESP_EVENT event. + * The end of the procedure is indicated by a ACI_GATT_PROC_COMPLETE_EVENT + * event. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Execute Execute or cancel writes. + * Values: + * - 0x00: Cancel all prepared writes + * - 0x01: Immediately write all pending prepared values + * @return Value indicating success or error code. + */ +tBleStatus aci_att_execute_write_req( uint16_t Connection_Handle, + uint8_t Execute ); + +/** + * @brief ACI_GATT_DISC_ALL_PRIMARY_SERVICES + * Starts the GATT client procedure to discover all primary services on the + * server. + * The responses of the procedure are given through the + * ACI_ATT_READ_BY_GROUP_TYPE_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_disc_all_primary_services( uint16_t Connection_Handle ); + +/** + * @brief ACI_GATT_DISC_PRIMARY_SERVICE_BY_UUID + * Starts the procedure to discover the primary services of the specified UUID + * on the server. + * The responses of the procedure are given through the + * ACI_ATT_FIND_BY_TYPE_VALUE_RESP_EVENT event. + * The end of the procedure is indicated by a ACI_GATT_PROC_COMPLETE_EVENT + * event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param UUID_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 bits UUID + * @param UUID See @ref UUID_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_disc_primary_service_by_uuid( uint16_t Connection_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ); + +/** + * @brief ACI_GATT_FIND_INCLUDED_SERVICES + * Starts the procedure to find all included services. + * The responses of the procedure are given through the + * ACI_ATT_READ_BY_TYPE_RESP_EVENT event. + * The end of the procedure is indicated by a ACI_GATT_PROC_COMPLETE_EVENT + * event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Start_Handle Start attribute handle of the service + * @param End_Handle End attribute handle of the service + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_find_included_services( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle ); + +/** + * @brief ACI_GATT_DISC_ALL_CHAR_OF_SERVICE + * Starts the procedure to discover all the characteristics of a given service. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion the response packets are given + * through ACI_ATT_READ_BY_TYPE_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Start_Handle Start attribute handle of the service + * @param End_Handle End attribute handle of the service + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_disc_all_char_of_service( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle ); + +/** + * @brief ACI_GATT_DISC_CHAR_BY_UUID + * Starts the procedure to discover all the characteristics specified by a + * UUID. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion the response packets are given + * through ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Start_Handle Start attribute handle of the service + * @param End_Handle End attribute handle of the service + * @param UUID_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 bits UUID + * @param UUID See @ref UUID_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_disc_char_by_uuid( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ); + +/** + * @brief ACI_GATT_DISC_ALL_CHAR_DESC + * Starts the procedure to discover all characteristic descriptors within a + * characteristic definition. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion the response packets are given + * through ACI_ATT_FIND_INFO_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Char_Handle Handle of the characteristic value + * @param End_Handle End handle of the characteristic + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_disc_all_char_desc( uint16_t Connection_Handle, + uint16_t Char_Handle, + uint16_t End_Handle ); + +/** + * @brief ACI_GATT_READ_CHAR_VALUE + * Starts the procedure to read the attribute value. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion the response packet is given through + * ACI_ATT_READ_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the characteristic value to be read + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_read_char_value( uint16_t Connection_Handle, + uint16_t Attr_Handle ); + +/** + * @brief ACI_GATT_READ_USING_CHAR_UUID + * This command sends a Read By Type Request packet to the server in order to + * read the value attribute of the characteristics specified by the UUID. + * When the procedure is completed, an ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion, the response packet is given through + * one ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_EVENT event per reported attribute. + * Note: the number of bytes of a value reported by + * ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_EVENT event cannot exceed + * BLE_EVT_MAX_PARAM_LEN - 7 i.e. 248 bytes for default value of + * BLE_EVT_MAX_PARAM_LEN. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Start_Handle Starting handle of the range to be searched + * @param End_Handle End handle of the range to be searched + * @param UUID_Type UUID type: 0x01 = 16 bits UUID while 0x02 = 128 bits UUID + * @param UUID See @ref UUID_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_read_using_char_uuid( uint16_t Connection_Handle, + uint16_t Start_Handle, + uint16_t End_Handle, + uint8_t UUID_Type, + const UUID_t* UUID ); + +/** + * @brief ACI_GATT_READ_LONG_CHAR_VALUE + * Starts the procedure to read a long characteristic value. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion the response packets are given + * through ACI_ATT_READ_BLOB_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the characteristic value to be read + * @param Val_Offset Offset from which the value needs to be read + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_read_long_char_value( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset ); + +/** + * @brief ACI_GATT_READ_MULTIPLE_CHAR_VALUE + * Starts a procedure to read multiple characteristic values from a server. + * The command must specify the handles of the characteristic values to be + * read. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion the response packets are given + * through ACI_ATT_READ_MULTIPLE_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Number_of_Handles Number of handles in the following table + * Values: + * - 0x02 ... 0x7E + * @param Handle_Entry See @ref Handle_Entry_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_read_multiple_char_value( uint16_t Connection_Handle, + uint8_t Number_of_Handles, + const Handle_Entry_t* Handle_Entry ); + +/** + * @brief ACI_GATT_WRITE_CHAR_VALUE + * Starts the procedure to write a characteristic value. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. + * The length of the value to be written must not exceed (ATT_MTU - 3). + * It must also not exceed (BLE_CMD_MAX_PARAM_LEN - 5) i.e. 250 for + * BLE_CMD_MAX_PARAM_LEN default value. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the characteristic value to be written + * @param Attribute_Val_Length Length of the value to be written + * @param Attribute_Val Value to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_write_char_value( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_GATT_WRITE_LONG_CHAR_VALUE + * Starts the procedure to write a long characteristic value. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. During the procedure, ACI_ATT_PREPARE_WRITE_RESP_EVENT and + * ACI_ATT_EXEC_WRITE_RESP_EVENT events are raised. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the characteristic value to be written + * @param Val_Offset Offset at which the attribute has to be written + * @param Attribute_Val_Length Length of the value to be written. + * This value must not exceed (BLE_CMD_MAX_PARAM_LEN - 7) i.e. 248 for + * BLE_CMD_MAX_PARAM_LEN default value. + * @param Attribute_Val Value to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_write_long_char_value( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_GATT_WRITE_CHAR_RELIABLE + * Starts the procedure to write a characteristic reliably. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. During the procedure, ACI_ATT_PREPARE_WRITE_RESP_EVENT and + * ACI_ATT_EXEC_WRITE_RESP_EVENT events are raised. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the attribute to be written + * @param Val_Offset Offset at which the attribute has to be written + * @param Attribute_Val_Length Length of the value to be written. + * This value must not exceed (BLE_CMD_MAX_PARAM_LEN - 7) i.e. 248 for + * BLE_CMD_MAX_PARAM_LEN default value. + * @param Attribute_Val Value to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_write_char_reliable( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_GATT_WRITE_LONG_CHAR_DESC + * Starts the procedure to write a long characteristic descriptor. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. During the procedure, ACI_ATT_PREPARE_WRITE_RESP_EVENT and + * ACI_ATT_EXEC_WRITE_RESP_EVENT events are raised. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the attribute to be written + * @param Val_Offset Offset at which the attribute has to be written + * @param Attribute_Val_Length Length of the value to be written. + * This value must not exceed (BLE_CMD_MAX_PARAM_LEN - 7) i.e. 248 for + * BLE_CMD_MAX_PARAM_LEN default value. + * @param Attribute_Val Value to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_write_long_char_desc( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_GATT_READ_LONG_CHAR_DESC + * Starts the procedure to read a long characteristic value. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion the response packets are given + * through ACI_ATT_READ_BLOB_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the characteristic descriptor + * @param Val_Offset Offset from which the value needs to be read + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_read_long_char_desc( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint16_t Val_Offset ); + +/** + * @brief ACI_GATT_WRITE_CHAR_DESC + * Starts the procedure to write a characteristic descriptor. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. + * The length of the value to be written must not exceed (ATT_MTU - 3). + * It must also not exceed (BLE_CMD_MAX_PARAM_LEN - 5) i.e. 250 for + * BLE_CMD_MAX_PARAM_LEN default value. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the attribute to be written + * @param Attribute_Val_Length Length of the value to be written + * @param Attribute_Val Value to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_write_char_desc( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_GATT_READ_CHAR_DESC + * Starts the procedure to read the descriptor specified. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. + * Before procedure completion the response packet is given through + * ACI_ATT_READ_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the descriptor to be read + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_read_char_desc( uint16_t Connection_Handle, + uint16_t Attr_Handle ); + +/** + * @brief ACI_GATT_WRITE_WITHOUT_RESP + * Starts the procedure to write a characteristic value without waiting for any + * response from the server. No events are generated after this command is + * executed. + * The length of the value to be written must not exceed (ATT_MTU - 3). + * It must also not exceed (BLE_CMD_MAX_PARAM_LEN - 5) i.e. 250 for + * BLE_CMD_MAX_PARAM_LEN default value. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the characteristic value to be written + * @param Attribute_Val_Length Length of the value to be written + * @param Attribute_Val Value to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_write_without_resp( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_GATT_SIGNED_WRITE_WITHOUT_RESP + * Starts a signed write without response from the server. + * The procedure is used to write a characteristic value with an authentication + * signature without waiting for any response from the server. It cannot be + * used when the link is encrypted. + * The length of the value to be written must not exceed (ATT_MTU - 15). + * It must also not exceed (BLE_CMD_MAX_PARAM_LEN - 5) i.e. 250 for + * BLE_CMD_MAX_PARAM_LEN default value. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Attr_Handle Handle of the characteristic value to be written + * @param Attribute_Val_Length Length of the value to be written + * @param Attribute_Val Value to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_signed_write_without_resp( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_GATT_CONFIRM_INDICATION + * Allow application to confirm indication. This command has to be sent when + * the application receives the event ACI_GATT_INDICATION_EVENT. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_confirm_indication( uint16_t Connection_Handle ); + +/** + * @brief ACI_GATT_WRITE_RESP + * Allow or reject a write request from a client. + * This command has to be sent by the application when it receives the + * ACI_GATT_WRITE_PERMIT_REQ_EVENT. If the write can be allowed, then the + * status and error code have to be set to 0. If the write cannot be allowed, + * then the status has to be set to 1 and the error code has to be set to the + * error code that has to be passed to the client. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Attr_Handle Handle of the attribute that was passed in the event + * ACI_GATT_WRITE_PERMIT_REQ_EVENT + * @param Write_status If the value can be written or not. + * Values: + * - 0x00: The value can be written to the attribute specified by + * attr_handle + * - 0x01: The value cannot be written to the attribute specified by the + * attr_handle + * @param Error_Code The error code that has to be passed to the client in case + * the write has to be rejected + * @param Attribute_Val_Length Length of the value to be written as passed in + * the event ACI_GATT_WRITE_PERMIT_REQ_EVENT + * @param Attribute_Val Value as passed in the event + * ACI_GATT_WRITE_PERMIT_REQ_EVENT + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_write_resp( uint16_t Connection_Handle, + uint16_t Attr_Handle, + uint8_t Write_status, + uint8_t Error_Code, + uint8_t Attribute_Val_Length, + const uint8_t* Attribute_Val ); + +/** + * @brief ACI_GATT_ALLOW_READ + * Allow the GATT server to send a response to a read request from a client. + * The application has to send this command when it receives the + * ACI_GATT_READ_PERMIT_REQ_EVENT or ACI_GATT_READ_MULTI_PERMIT_REQ_EVENT. This + * command indicates to the stack that the response can be sent to the client. + * So if the application wishes to update any of the attributes before they are + * read by the client, it must update the characteristic values using the + * ACI_GATT_UPDATE_CHAR_VALUE and then give this command. The application + * should perform the required operations within 30 seconds. Otherwise the GATT + * procedure will be timeout. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_allow_read( uint16_t Connection_Handle ); + +/** + * @brief ACI_GATT_SET_SECURITY_PERMISSION + * This command sets the security permission flags for the attribute handle + * specified. It can be used to change the default value of these flags after + * an attribute has been created. + * + * @param Serv_Handle Handle of the service which contains the attribute whose + * permission has to be modified + * @param Attr_Handle Handle of the attribute whose permission has to be + * modified + * @param Security_Permissions Security permission flags. + * Flags: + * - 0x00: None + * - 0x01: AUTHEN_READ (Need authentication to read) + * - 0x02: AUTHOR_READ (Need authorization to read) + * - 0x04: ENCRY_READ (Need encryption to read) + * - 0x08: AUTHEN_WRITE (need authentication to write) + * - 0x10: AUTHOR_WRITE (need authorization to write) + * - 0x20: ENCRY_WRITE (need encryption to write) + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_set_security_permission( uint16_t Serv_Handle, + uint16_t Attr_Handle, + uint8_t Security_Permissions ); + +/** + * @brief ACI_GATT_SET_DESC_VALUE + * This command sets the value of the descriptor specified by Char_Desc_Handle. + * + * @param Serv_Handle Handle of the service which contains the characteristic + * descriptor + * @param Char_Handle Handle of the characteristic which contains the + * descriptor + * @param Char_Desc_Handle Handle of the descriptor whose value has to be set + * @param Val_Offset Offset from which the descriptor value has to be updated + * @param Char_Desc_Value_Length Length of the descriptor value + * @param Char_Desc_Value Descriptor value + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_set_desc_value( uint16_t Serv_Handle, + uint16_t Char_Handle, + uint16_t Char_Desc_Handle, + uint16_t Val_Offset, + uint8_t Char_Desc_Value_Length, + const uint8_t* Char_Desc_Value ); + +/** + * @brief ACI_GATT_READ_HANDLE_VALUE + * Reads the value of the attribute handle specified from the local GATT + * database. + * + * @param Attr_Handle Handle of the attribute to read + * @param Offset Offset from which the value needs to be read + * @param Value_Length_Requested Maximum number of octets to be returned as + * attribute value + * @param[out] Length Length of the attribute value + * @param[out] Value_Length Length in octets of the Value parameter + * @param[out] Value Attribute value + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_read_handle_value( uint16_t Attr_Handle, + uint16_t Offset, + uint16_t Value_Length_Requested, + uint16_t* Length, + uint16_t* Value_Length, + uint8_t* Value ); + +/** + * @brief ACI_GATT_UPDATE_CHAR_VALUE_EXT + * This command is a more flexible version of ACI_GATT_UPDATE_CHAR_VALUE to + * support update of long attribute up to 512 bytes and indicate selectively + * the generation of Indication/Notification. + * The description notes for the ACI_GATT_UPDATE_CHAR_VALUE command also apply + * here. + * + * @param Conn_Handle_To_Notify Specifies the client(s) to be notified. + * Values: + * - 0x0000: Notify all subscribed clients on their unenhanced ATT + * bearer + * - 0x0001 ... 0x0EFF: Notify one client on the specified unenhanced + * ATT bearer (the parameter is the connection handle) + * - 0xEA00 ... 0xEA3F: Notify one client on the specified enhanced ATT + * bearer (the LSB-byte of the parameter is the connection-oriented + * channel index) + * @param Service_Handle Handle of service to which the characteristic belongs + * @param Char_Handle Handle of the characteristic declaration + * @param Update_Type Allow Notification or Indication generation, if enabled + * in the client characteristic configuration descriptor + * Flags: + * - 0x00: Do not notify + * - 0x01: Notification + * - 0x02: Indication + * @param Char_Length Total length of the characteristic value. + * In case of a variable size characteristic, this field specifies the + * new length of the characteristic value after the update; in case of + * fixed length characteristic this field is ignored. + * @param Value_Offset The offset from which the attribute value has to be + * updated. + * @param Value_Length Length of the Value parameter in octets. + * This value must not exceed (BLE_CMD_MAX_PARAM_LEN - 12) i.e. 243 for + * BLE_CMD_MAX_PARAM_LEN default value. + * @param Value Updated characteristic value + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_update_char_value_ext( uint16_t Conn_Handle_To_Notify, + uint16_t Service_Handle, + uint16_t Char_Handle, + uint8_t Update_Type, + uint16_t Char_Length, + uint16_t Value_Offset, + uint8_t Value_Length, + const uint8_t* Value ); + +/** + * @brief ACI_GATT_DENY_READ + * This command is used to deny the GATT server to send a response to a read + * request from a client. + * The application may send this command when it receives the + * ACI_GATT_READ_PERMIT_REQ_EVENT or ACI_GATT_READ_MULTI_PERMIT_REQ_EVENT. + * This command indicates to the stack that the client is not allowed to read + * the requested characteristic due to e.g. application restrictions. + * The Error code shall be either 0x08 (Insufficient Authorization) or a value + * in the range 0x80-0x9F (Application Error). + * The application should issue the ACI_GATT_DENY_READ or ACI_GATT_ALLOW_READ + * command within 30 seconds from the reception of the + * ACI_GATT_READ_PERMIT_REQ_EVENT or ACI_GATT_READ_MULTI_PERMIT_REQ_EVENT + * events; otherwise the GATT procedure issues a timeout. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Error_Code Error code for the command + * Values: + * - 0x08: Insufficient Authorization + * - 0x80 ... 0x9F: Application Error + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_deny_read( uint16_t Connection_Handle, + uint8_t Error_Code ); + +/** + * @brief ACI_GATT_SET_ACCESS_PERMISSION + * This command sets the access permission for the attribute handle specified. + * + * @param Serv_Handle Handle of the service which contains the attribute whose + * permission has to be modified + * @param Attr_Handle Handle of the attribute whose permission has to be + * modified + * @param Access_Permissions Access permission + * Flags: + * - 0x00: None + * - 0x01: READ + * - 0x02: WRITE + * - 0x04: WRITE_WO_RESP + * - 0x08: SIGNED_WRITE + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_set_access_permission( uint16_t Serv_Handle, + uint16_t Attr_Handle, + uint8_t Access_Permissions ); + +/** + * @brief ACI_GATT_STORE_DB + * This command forces the saving of the GATT database for all active + * connections. Note that, by default, the GATT database is saved per active + * connection at the time of disconnection. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_store_db( void ); + +/** + * @brief ACI_GATT_SEND_MULT_NOTIFICATION + * This command sends a Multiple Handle Value Notification over the ATT bearer + * specified in parameter. The handles provided as parameters must be the + * handles of the characteristic declarations. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Number_of_Handles Number of handles in the following table + * Values: + * - 0x02 ... 0x7E + * @param Handle_Entry See @ref Handle_Entry_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_send_mult_notification( uint16_t Connection_Handle, + uint8_t Number_of_Handles, + const Handle_Entry_t* Handle_Entry ); + +/** + * @brief ACI_GATT_READ_MULTIPLE_VAR_CHAR_VALUE + * Starts a procedure to read multiple variable length characteristic values + * from a server. + * The command must specify the handles of the characteristic values to be + * read. + * When the procedure is completed, a ACI_GATT_PROC_COMPLETE_EVENT event is + * generated. Before procedure completion the response packets are given + * through ACI_ATT_READ_MULTIPLE_RESP_EVENT event. + * + * @param Connection_Handle Specifies the ATT bearer for which the command + * applies. + * Values: + * - 0x0000 ... 0x0EFF: Unenhanced ATT bearer (the parameter is the + * connection handle) + * - 0xEA00 ... 0xEA3F: Enhanced ATT bearer (the LSB-byte of the + * parameter is the connection-oriented channel index) + * @param Number_of_Handles Number of handles in the following table + * Values: + * - 0x02 ... 0x7E + * @param Handle_Entry See @ref Handle_Entry_t + * @return Value indicating success or error code. + */ +tBleStatus aci_gatt_read_multiple_var_char_value( uint16_t Connection_Handle, + uint8_t Number_of_Handles, + const Handle_Entry_t* Handle_Entry ); + + +#endif /* BLE_GATT_ACI_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c new file mode 100644 index 0000000..eeb59f0 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.c @@ -0,0 +1,519 @@ +/***************************************************************************** + * @file ble_hal_aci.c + * @brief STM32WB BLE API (hal_aci) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#include "auto/ble_hal_aci.h" + +tBleStatus aci_hal_write_config_data( uint8_t Offset, + uint8_t Length, + const uint8_t* Value ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_write_config_data_cp0 *cp0 = (aci_hal_write_config_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Offset = Offset; + index_input += 1; + cp0->Length = Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Value, (const void*)Value, Length ); + index_input += Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x00c; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_read_config_data( uint8_t Offset, + uint8_t* Data_Length, + uint8_t* Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_read_config_data_cp0 *cp0 = (aci_hal_read_config_data_cp0*)(cmd_buffer); + aci_hal_read_config_data_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Offset = Offset; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x00d; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Data_Length = resp.Data_Length; + Osal_MemCpy( (void*)Data, (const void*)resp.Data, *Data_Length); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_set_tx_power_level( uint8_t En_High_Power, + uint8_t PA_Level ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_set_tx_power_level_cp0 *cp0 = (aci_hal_set_tx_power_level_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->En_High_Power = En_High_Power; + index_input += 1; + cp0->PA_Level = PA_Level; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x00f; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_le_tx_test_packet_number( uint32_t* Number_Of_Packets ) +{ + struct hci_request rq; + aci_hal_le_tx_test_packet_number_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x014; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Number_Of_Packets = resp.Number_Of_Packets; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_tone_start( uint8_t RF_Channel, + uint8_t Freq_offset ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_tone_start_cp0 *cp0 = (aci_hal_tone_start_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->RF_Channel = RF_Channel; + index_input += 1; + cp0->Freq_offset = Freq_offset; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x015; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_tone_stop( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x016; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_get_link_status( uint8_t* Link_Status, + uint16_t* Link_Connection_Handle ) +{ + struct hci_request rq; + aci_hal_get_link_status_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x017; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)Link_Status, (const void*)resp.Link_Status, 8 ); + Osal_MemCpy( (void*)Link_Connection_Handle, (const void*)resp.Link_Connection_Handle, 16 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_set_radio_activity_mask( uint16_t Radio_Activity_Mask ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_set_radio_activity_mask_cp0 *cp0 = (aci_hal_set_radio_activity_mask_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Radio_Activity_Mask = Radio_Activity_Mask; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x018; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_get_anchor_period( uint32_t* Anchor_Period, + uint32_t* Max_Free_Slot ) +{ + struct hci_request rq; + aci_hal_get_anchor_period_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x019; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Anchor_Period = resp.Anchor_Period; + *Max_Free_Slot = resp.Max_Free_Slot; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_set_event_mask( uint32_t Event_Mask ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_set_event_mask_cp0 *cp0 = (aci_hal_set_event_mask_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Event_Mask = Event_Mask; + index_input += 4; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x01a; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_set_peripheral_latency( uint8_t Enable ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_set_peripheral_latency_cp0 *cp0 = (aci_hal_set_peripheral_latency_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Enable = Enable; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x020; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_read_rssi( uint8_t* RSSI ) +{ + struct hci_request rq; + aci_hal_read_rssi_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x022; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *RSSI = resp.RSSI; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_ead_encrypt_decrypt( uint8_t Mode, + const uint8_t* Key, + const uint8_t* IV, + uint16_t In_Data_Length, + const uint8_t* In_Data, + uint16_t* Out_Data_Length, + uint8_t* Out_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_ead_encrypt_decrypt_cp0 *cp0 = (aci_hal_ead_encrypt_decrypt_cp0*)(cmd_buffer); + aci_hal_ead_encrypt_decrypt_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Mode = Mode; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Key, (const void*)Key, 16 ); + index_input += 16; + Osal_MemCpy( (void*)&cp0->IV, (const void*)IV, 8 ); + index_input += 8; + cp0->In_Data_Length = In_Data_Length; + index_input += 2; + Osal_MemCpy( (void*)&cp0->In_Data, (const void*)In_Data, In_Data_Length ); + index_input += In_Data_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x02f; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Out_Data_Length = resp.Out_Data_Length; + Osal_MemCpy( (void*)Out_Data, (const void*)resp.Out_Data, *Out_Data_Length); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_read_radio_reg( uint8_t Register_Address, + uint8_t* reg_val ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_read_radio_reg_cp0 *cp0 = (aci_hal_read_radio_reg_cp0*)(cmd_buffer); + aci_hal_read_radio_reg_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Register_Address = Register_Address; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x030; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *reg_val = resp.reg_val; + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_write_radio_reg( uint8_t Register_Address, + uint8_t Register_Value ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_write_radio_reg_cp0 *cp0 = (aci_hal_write_radio_reg_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Register_Address = Register_Address; + index_input += 1; + cp0->Register_Value = Register_Value; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x031; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_read_raw_rssi( uint8_t* Value ) +{ + struct hci_request rq; + aci_hal_read_raw_rssi_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x032; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)Value, (const void*)resp.Value, 3 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_hal_rx_start( uint8_t RF_Channel ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_hal_rx_start_cp0 *cp0 = (aci_hal_rx_start_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->RF_Channel = RF_Channel; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x033; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_hal_rx_stop( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x034; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_reset( uint8_t Mode, + uint32_t Options ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_reset_cp0 *cp0 = (aci_reset_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Mode = Mode; + index_input += 1; + cp0->Options = Options; + index_input += 4; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x300; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_get_information( uint32_t* Version, + uint32_t* Options, + uint32_t* Debug_Info ) +{ + struct hci_request rq; + aci_get_information_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x301; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)Version, (const void*)resp.Version, 8 ); + *Options = resp.Options; + Osal_MemCpy( (void*)Debug_Info, (const void*)resp.Debug_Info, 12 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_write_config_data( uint8_t Offset, + uint8_t Length, + const uint8_t* Value ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_write_config_data_cp0 *cp0 = (aci_write_config_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Offset = Offset; + index_input += 1; + cp0->Length = Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Value, (const void*)Value, Length ); + index_input += Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x302; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_read_config_data( uint8_t Offset, + uint8_t* Data_Length, + uint8_t* Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_read_config_data_cp0 *cp0 = (aci_read_config_data_cp0*)(cmd_buffer); + aci_read_config_data_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Offset = Offset; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x303; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Data_Length = resp.Data_Length; + Osal_MemCpy( (void*)Data, (const void*)resp.Data, *Data_Length); + return BLE_STATUS_SUCCESS; +} + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h new file mode 100644 index 0000000..fd2660d --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hal_aci.h @@ -0,0 +1,478 @@ +/***************************************************************************** + * @file ble_hal_aci.h + * @brief STM32WB BLE API (HAL_ACI) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_HAL_ACI_H__ +#define BLE_HAL_ACI_H__ + + +#include "auto/ble_types.h" + +/** + * @brief ACI_HAL_WRITE_CONFIG_DATA + * This command writes a value to a configure data structure. It is useful to + * setup directly some parameters for the BLE stack. + * Refer to Annex for details on the different parameters that can be + * configured. + * Note: this command is an alias of ACI_WRITE_CONFIG_DATA. + * + * @param Offset Offset of the element in the configuration data structure + * which has to be written. + * Values: + * - 0x00: CONFIG_DATA_PUBLIC_ADDRESS_OFFSET; + * Bluetooth public address; 6 bytes + * - 0x08: CONFIG_DATA_ER_OFFSET; + * Encryption root key; 16 bytes + * - 0x18: CONFIG_DATA_IR_OFFSET; + * Identity root key; 16 bytes + * - 0x2E: CONFIG_DATA_RANDOM_ADDRESS_OFFSET; + * Static Random Address; 6 bytes + * - 0x34: CONFIG_DATA_GAP_ADD_REC_NBR_OFFSET; + * GAP service additional record number; 1 byte + * - 0x35: CONFIG_DATA_SC_KEY_TYPE_OFFSET; + * Secure Connections key type; 1 byte + * - 0xB0: CONFIG_DATA_SMP_MODE_OFFSET; + * SMP mode; 1 byte + * - 0xC0: CONFIG_DATA_LL_SCAN_CHAN_MAP_OFFSET; + * LL scan channel map; 1 byte + * - 0xC1: CONFIG_DATA_LL_BG_SCAN_MODE_OFFSET; + * LL background scan mode; 1 byte + * - 0xC3: CONFIG_DATA_LL_RPA_MODE_OFFSET; + * LL RPA mode; 1 byte + * - 0xD1: CONFIG_DATA_LL_MAX_DATA_EXT_OFFSET [only for full stack]; + * LL maximum data length extension; 8 bytes + * @param Length Length of data to be written + * @param Value Data to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_write_config_data( uint8_t Offset, + uint8_t Length, + const uint8_t* Value ); + +/** + * @brief ACI_HAL_READ_CONFIG_DATA + * This command requests the value in the configure data structure. The number + * of read bytes changes for different Offset. + * Note: this command is an alias of ACI_READ_CONFIG_DATA. + * + * @param Offset Offset of the element in the configuration data structure + * which has to be read. + * Values: + * - 0x00: CONFIG_DATA_PUBLIC_ADDRESS_OFFSET; + * Bluetooth public address; 6 bytes + * - 0x08: CONFIG_DATA_ER_OFFSET; + * Encryption root key used to derive LTK (legacy) and CSRK; 16 bytes + * - 0x18: CONFIG_DATA_IR_OFFSET + * Identity root key used to derive DHK (legacy) and IRK; 16 bytes + * - 0x2E: CONFIG_DATA_RANDOM_ADDRESS_OFFSET; + * Static Random Address; 6 bytes + * @param[out] Data_Length Length of Data in octets + * @param[out] Data Data field associated with Offset parameter + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_read_config_data( uint8_t Offset, + uint8_t* Data_Length, + uint8_t* Data ); + +/** + * @brief ACI_HAL_SET_TX_POWER_LEVEL + * This command sets the TX power level of the device. By controlling the PA + * level, that determines the output power level (dBm) at the IC pin. + * When the system starts up or reboots, the default TX power level is used, + * which is the maximum value. Once this command is given, the output power + * changes instantly, regardless if there is BLE communication going on or not. + * For example, for debugging purpose, the device can be set to advertise all + * the time. By using this command, one can then observe the evolution of the + * TX signal strength. + * The system keeps the last received TX power level from the command, i.e. the + * 2nd command overwrites the previous TX power level. The new TX power level + * remains until another ACI_HAL_SET_TX_POWER_LEVEL command, or the system + * reboots. However, note that the advertising extensions commands allow, per + * advertising set, to override the value of TX power determined by + * ACI_HAL_SET_TX_POWER_LEVEL command (e.g. see ACI_GAP_ADV_SET_CONFIGURATION). + * Refer to Annex for the dBm corresponding values of PA_Level parameter. + * + * @param En_High_Power Enable High Power mode - Deprecated and ignored + * Values: + * - 0x00: Standard Power + * - 0x01: High Power + * @param PA_Level Power amplifier output level. + * Values: + * - 0x00 ... 0x23 + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_set_tx_power_level( uint8_t En_High_Power, + uint8_t PA_Level ); + +/** + * @brief ACI_HAL_LE_TX_TEST_PACKET_NUMBER + * This command returns the number of packets sent in Direct Test Mode. + * When the Direct TX test is started, a 16-bit counter is used to count how + * many packets have been transmitted. + * This command can be used to check how many packets have been sent during the + * Direct TX test. + * The counter starts from 0 and counts upwards. The counter can wrap and start + * from 0 again. The counter is not cleared until the next Direct TX test + * starts. + * + * @param[out] Number_Of_Packets Number of packets sent during the last Direct + * TX test. + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_le_tx_test_packet_number( uint32_t* Number_Of_Packets ); + +/** + * @brief ACI_HAL_TONE_START + * This command starts a carrier frequency, i.e. a tone, on a specific channel. + * The frequency sine wave at the specific channel may be used for debugging + * purpose only. The channel ID is a parameter from 0x00 to 0x27 for the 40 BLE + * channels, e.g. 0x00 for 2.402 GHz, 0x01 for 2.404 GHz etc. + * This command should not be used when normal BLE activities are ongoing. + * The tone should be stopped by ACI_HAL_TONE_STOP command. + * + * @param RF_Channel BLE Channel ID, from 0x00 to 0x27 meaning (2.402 + + * 0.002*0xXX) GHz + * Device will continuously emit 0s, that means that the tone will be at + * the channel center frequency minus the maximum frequency deviation + * (250 kHz). + * Values: + * - 0x00 ... 0x27 + * @param Freq_offset Frequency Offset for tone channel + * Values: + * - 0x00 ... 0xFF + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_tone_start( uint8_t RF_Channel, + uint8_t Freq_offset ); + +/** + * @brief ACI_HAL_TONE_STOP + * This command is used to stop the previously started ACI_HAL_TONE_START + * command. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_tone_stop( void ); + +/** + * @brief ACI_HAL_GET_LINK_STATUS + * This command returns the status of the 8 BLE links managed by the device. + * + * @param[out] Link_Status Array of link status (8 links). Each link status is + * 1 byte. + * Values: + * - 0x00: Idle + * - 0x01: Advertising + * - 0x02: Connected in Peripheral role + * - 0x03: Scanning + * - 0x04: Reserved + * - 0x05: Connected in Central role + * - 0x06: TX test mode + * - 0x07: RX test mode + * - 0x81: Advertising with Additional Beacon + * @param[out] Link_Connection_Handle Array of connection handles (2 bytes) for + * 8 links. Valid only if the link status is "connected" (0x02 or 0x05) + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_get_link_status( uint8_t* Link_Status, + uint16_t* Link_Connection_Handle ); + +/** + * @brief ACI_HAL_SET_RADIO_ACTIVITY_MASK + * This command set the bitmask associated to + * ACI_HAL_END_OF_RADIO_ACTIVITY_EVENT. + * Only the radio activities enabled in the mask will be reported to + * application by ACI_HAL_END_OF_RADIO_ACTIVITY_EVENT + * + * @param Radio_Activity_Mask Bitmask of radio events + * Flags: + * - 0x0001: Idle + * - 0x0002: Advertising + * - 0x0004: Peripheral connection + * - 0x0008: Scanning + * - 0x0020: Central connection + * - 0x0040: TX test mode + * - 0x0080: RX test mode + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_set_radio_activity_mask( uint16_t Radio_Activity_Mask ); + +/** + * @brief ACI_HAL_GET_ANCHOR_PERIOD + * This command returns information about the Anchor Period to help application + * in selecting slot timings when operating in multi-link scenarios. + * + * @param[out] Anchor_Period Current anchor period. + * T = N * 0.625 ms. + * @param[out] Max_Free_Slot Maximum available time that can be allocated for a + * new slot. + * T = N * 0.625 ms. + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_get_anchor_period( uint32_t* Anchor_Period, + uint32_t* Max_Free_Slot ); + +/** + * @brief ACI_HAL_SET_EVENT_MASK + * This command is used to enable/disable the generation of HAL events. If the + * bit in the Event_Mask is set to a one, then the event associated with that + * bit will be enabled. + * + * @param Event_Mask ACI HAL event mask. Default: 0x00000000. + * Flags: + * - 0x00000000: No events specified (Default) + * - 0x00000001: ACI_HAL_SCAN_REQ_REPORT_EVENT + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_set_event_mask( uint32_t Event_Mask ); + +/** + * @brief ACI_HAL_SET_PERIPHERAL_LATENCY + * This command is used to disable/enable the Peripheral latency feature during + * a connection. Note that, by default, the Peripheral latency is enabled at + * connection time. + * + * @param Enable Enable/disable Peripheral latency. + * Values: + * - 0x00: Peripheral latency is disabled + * - 0x01: Peripheral latency is enabled + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_set_peripheral_latency( uint8_t Enable ); + +/** + * @brief ACI_HAL_READ_RSSI + * This command returns the value of the RSSI. + * + * @param[out] RSSI RSSI (signed integer). + * Units: dBm. + * Values: + * - 127: RSSI not available + * - -127 ... 20 + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_read_rssi( uint8_t* RSSI ); + +/** + * @brief ACI_HAL_EAD_ENCRYPT_DECRYPT + * This command encrypts or decrypts data following the Encrypted Advertising + * Data scheme. + * When encryption mode is selected, In_Data shall only contain the Payload + * field to encrypt. The command adds the Randomizer and MIC fields in the + * result. The result data length (Out_Data_Length) is equal to the input + * length plus 9. + * When decryption mode is selected, In_Data shall contain the full Encrypted + * Data (Randomizer + Payload + MIC). The result data length (Out_Data_Length) + * is equal to the input length minus 9. + * If the decryption fails, the returned status is BLE_STATUS_FAILED, otherwise + * it is BLE_STATUS_SUCCESS. + * Note: the In_Data_Length value must not exceed (BLE_CMD_MAX_PARAM_LEN - 27) + * i.e. 228 for BLE_CMD_MAX_PARAM_LEN default value. + * + * @param Mode EAD operation mode: encryption or decryption. + * Values: + * - 0x00: Encryption + * - 0x01: Decryption + * @param Key Session key used for EAD operation (in Little Endian format). + * @param IV Initialization vector used for EAD operation (in Little Endian + * format). + * @param In_Data_Length Length of input data + * @param In_Data Input data + * @param[out] Out_Data_Length Length of result data + * @param[out] Out_Data Result data + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_ead_encrypt_decrypt( uint8_t Mode, + const uint8_t* Key, + const uint8_t* IV, + uint16_t In_Data_Length, + const uint8_t* In_Data, + uint16_t* Out_Data_Length, + uint8_t* Out_Data ); + +/** + * @brief ACI_HAL_READ_RADIO_REG + * This command Reads Register value from the RF module. + * + * @param Register_Address Address of the register to be read + * @param[out] reg_val Register value + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_read_radio_reg( uint8_t Register_Address, + uint8_t* reg_val ); + +/** + * @brief ACI_HAL_WRITE_RADIO_REG + * This command writes Register value to the RF module. + * + * @param Register_Address Address of the register to be written + * @param Register_Value Value to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_write_radio_reg( uint8_t Register_Address, + uint8_t Register_Value ); + +/** + * @brief ACI_HAL_READ_RAW_RSSI + * This command returns the raw value of the RSSI. + * + * @param[out] Value RAW RSSI value + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_read_raw_rssi( uint8_t* Value ); + +/** + * @brief ACI_HAL_RX_START + * This command does set up the RF to listen to a specific RF channel. + * + * @param RF_Channel BLE Channel ID, from 0x00 to 0x27 meaning (2.402 + + * 0.002*0xXX) GHz + * Device will continuously emit 0s, that means that the tone will be at + * the channel center frequency minus the maximum frequency deviation + * (250 kHz). + * Values: + * - 0x00 ... 0x27 + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_rx_start( uint8_t RF_Channel ); + +/** + * @brief ACI_HAL_RX_STOP + * This command stops a previous ACI_HAL_RX_START command. + * + * @return Value indicating success or error code. + */ +tBleStatus aci_hal_rx_stop( void ); + +/** + * @brief ACI_RESET + * This command resets the BLE stack (Host and LE Controller). + * + * @param Mode ACI reset mode. + * Values: + * - 0x00: Reset without BLE stack options change + * - 0x01: Reset with BLE stack option changes + * @param Options New BLE stack options to set at ACI reset (a bit set to 1 + * means that the corresponding optional feature is activated). + * Flags: + * - 0x00000001: LL only mode + * - 0x00000002: No service change description + * - 0x00000004: Device Name is read-only + * - 0x00000008: Support of Extended Advertising + * - 0x00000010: Support of Channel Selection Algorithm #2 + * - 0x00000020: Reduced GATT database in NVM + * - 0x00000040: Support of GATT caching + * - 0x00000080: Support of LE Power Class 1 (flag not available in RCP + * mode) + * - 0x00000100: Appearance is writable + * - 0x00000200: Support of Enhanced ATT + * @return Value indicating success or error code. + */ +tBleStatus aci_reset( uint8_t Mode, + uint32_t Options ); + +/** + * @brief ACI_GET_INFORMATION + * This command reads the local ACI information. + * + * @param[out] Version BLE stack version. + * @param[out] Options Current BLE stack options (a bit set to 1 means that the + * corresponding optional feature is activated). + * Flags: + * - 0x00000001: LL only mode + * - 0x00000002: No service change description + * - 0x00000004: Device Name is read-only + * - 0x00000008: Support of Extended Advertising + * - 0x00000010: Support of Channel Selection Algorithm #2 + * - 0x00000020: Reduced GATT database in NVM + * - 0x00000040: Support of GATT caching + * - 0x00000080: Support of LE Power Class 1 (flag not available in RCP + * mode) + * - 0x00000100: Appearance is writable + * - 0x00000200: Support of Enhanced ATT + * @param[out] Debug_Info BLE stack debug information. + * @return Value indicating success or error code. + */ +tBleStatus aci_get_information( uint32_t* Version, + uint32_t* Options, + uint32_t* Debug_Info ); + +/** + * @brief ACI_WRITE_CONFIG_DATA + * This command writes a value to a configure data structure. It is useful to + * setup directly some parameters for the BLE stack. + * Refer to Annex for details on the different parameters that can be + * configured. + * + * @param Offset Offset of the element in the configuration data structure + * which has to be written. + * Values: + * - 0x00: CONFIG_DATA_PUBLIC_ADDRESS_OFFSET; + * Bluetooth public address; 6 bytes + * - 0x08: CONFIG_DATA_ER_OFFSET; + * Encryption root key; 16 bytes + * - 0x18: CONFIG_DATA_IR_OFFSET; + * Identity root key; 16 bytes + * - 0x2E: CONFIG_DATA_RANDOM_ADDRESS_OFFSET; + * Static Random Address; 6 bytes + * - 0x34: CONFIG_DATA_GAP_ADD_REC_NBR_OFFSET; + * GAP service additional record number; 1 byte + * - 0x35: CONFIG_DATA_SC_KEY_TYPE_OFFSET; + * Secure Connections key type; 1 byte + * - 0xB0: CONFIG_DATA_SMP_MODE_OFFSET; + * SMP mode; 1 byte + * - 0xC0: CONFIG_DATA_LL_SCAN_CHAN_MAP_OFFSET; + * LL scan channel map; 1 byte + * - 0xC1: CONFIG_DATA_LL_BG_SCAN_MODE_OFFSET; + * LL background scan mode; 1 byte + * - 0xC3: CONFIG_DATA_LL_RPA_MODE_OFFSET; + * LL RPA mode; 1 byte + * - 0xD1: CONFIG_DATA_LL_MAX_DATA_EXT_OFFSET [only for full stack]; + * LL maximum data length extension; 8 bytes + * @param Length Length of data to be written + * @param Value Data to be written + * @return Value indicating success or error code. + */ +tBleStatus aci_write_config_data( uint8_t Offset, + uint8_t Length, + const uint8_t* Value ); + +/** + * @brief ACI_READ_CONFIG_DATA + * This command requests the value in the configure data structure. The number + * of read bytes changes for different Offset. + * + * @param Offset Offset of the element in the configuration data structure + * which has to be read. + * Values: + * - 0x00: CONFIG_DATA_PUBLIC_ADDRESS_OFFSET; + * Bluetooth public address; 6 bytes + * - 0x08: CONFIG_DATA_ER_OFFSET; + * Encryption root key used to derive LTK (legacy) and CSRK; 16 bytes + * - 0x18: CONFIG_DATA_IR_OFFSET + * Identity root key used to derive DHK (legacy) and IRK; 16 bytes + * - 0x2E: CONFIG_DATA_RANDOM_ADDRESS_OFFSET; + * Static Random Address; 6 bytes + * @param[out] Data_Length Length of Data in octets + * @param[out] Data Data field associated with Offset parameter + * @return Value indicating success or error code. + */ +tBleStatus aci_read_config_data( uint8_t Offset, + uint8_t* Data_Length, + uint8_t* Data ); + + +#endif /* BLE_HAL_ACI_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c new file mode 100644 index 0000000..56572a3 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.c @@ -0,0 +1,2008 @@ +/***************************************************************************** + * @file ble_hci_le.c + * @brief STM32WB BLE API (hci_le) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#include "auto/ble_hci_le.h" + +tBleStatus hci_disconnect( uint16_t Connection_Handle, + uint8_t Reason ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_disconnect_cp0 *cp0 = (hci_disconnect_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Reason = Reason; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x01; + rq.ocf = 0x006; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_read_remote_version_information( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_read_remote_version_information_cp0 *cp0 = (hci_read_remote_version_information_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x01; + rq.ocf = 0x01d; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_set_event_mask( const uint8_t* Event_Mask ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_set_event_mask_cp0 *cp0 = (hci_set_event_mask_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + Osal_MemCpy( (void*)&cp0->Event_Mask, (const void*)Event_Mask, 8 ); + index_input += 8; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x03; + rq.ocf = 0x001; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_reset( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x03; + rq.ocf = 0x003; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_read_transmit_power_level( uint16_t Connection_Handle, + uint8_t Type, + uint8_t* Transmit_Power_Level ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_read_transmit_power_level_cp0 *cp0 = (hci_read_transmit_power_level_cp0*)(cmd_buffer); + hci_read_transmit_power_level_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Type = Type; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x03; + rq.ocf = 0x02d; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Transmit_Power_Level = resp.Transmit_Power_Level; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_set_controller_to_host_flow_control( uint8_t Flow_Control_Enable ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_set_controller_to_host_flow_control_cp0 *cp0 = (hci_set_controller_to_host_flow_control_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Flow_Control_Enable = Flow_Control_Enable; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x03; + rq.ocf = 0x031; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_host_buffer_size( uint16_t Host_ACL_Data_Packet_Length, + uint8_t Host_Synchronous_Data_Packet_Length, + uint16_t Host_Total_Num_ACL_Data_Packets, + uint16_t Host_Total_Num_Synchronous_Data_Packets ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_host_buffer_size_cp0 *cp0 = (hci_host_buffer_size_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Host_ACL_Data_Packet_Length = Host_ACL_Data_Packet_Length; + index_input += 2; + cp0->Host_Synchronous_Data_Packet_Length = Host_Synchronous_Data_Packet_Length; + index_input += 1; + cp0->Host_Total_Num_ACL_Data_Packets = Host_Total_Num_ACL_Data_Packets; + index_input += 2; + cp0->Host_Total_Num_Synchronous_Data_Packets = Host_Total_Num_Synchronous_Data_Packets; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x03; + rq.ocf = 0x033; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_host_number_of_completed_packets( uint8_t Number_Of_Handles, + const Host_Nb_Of_Completed_Pkt_Pair_t* Host_Nb_Of_Completed_Pkt_Pair ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_host_number_of_completed_packets_cp0 *cp0 = (hci_host_number_of_completed_packets_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Number_Of_Handles = Number_Of_Handles; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Host_Nb_Of_Completed_Pkt_Pair, (const void*)Host_Nb_Of_Completed_Pkt_Pair, Number_Of_Handles * (sizeof(Host_Nb_Of_Completed_Pkt_Pair_t)) ); + index_input += Number_Of_Handles * (sizeof(Host_Nb_Of_Completed_Pkt_Pair_t)); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x03; + rq.ocf = 0x035; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_read_local_version_information( uint8_t* HCI_Version, + uint16_t* HCI_Subversion, + uint8_t* LMP_Version, + uint16_t* Company_Identifier, + uint16_t* LMP_Subversion ) +{ + struct hci_request rq; + hci_read_local_version_information_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x04; + rq.ocf = 0x001; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *HCI_Version = resp.HCI_Version; + *HCI_Subversion = resp.HCI_Subversion; + *LMP_Version = resp.LMP_Version; + *Company_Identifier = resp.Company_Identifier; + *LMP_Subversion = resp.LMP_Subversion; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_read_local_supported_commands( uint8_t* Supported_Commands ) +{ + struct hci_request rq; + hci_read_local_supported_commands_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x04; + rq.ocf = 0x002; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)Supported_Commands, (const void*)resp.Supported_Commands, 64 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_read_local_supported_features( uint8_t* LMP_Features ) +{ + struct hci_request rq; + hci_read_local_supported_features_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x04; + rq.ocf = 0x003; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)LMP_Features, (const void*)resp.LMP_Features, 8 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_read_bd_addr( uint8_t* BD_ADDR ) +{ + struct hci_request rq; + hci_read_bd_addr_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x04; + rq.ocf = 0x009; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)BD_ADDR, (const void*)resp.BD_ADDR, 6 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_read_rssi( uint16_t Connection_Handle, + uint8_t* RSSI ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_read_rssi_cp0 *cp0 = (hci_read_rssi_cp0*)(cmd_buffer); + hci_read_rssi_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x05; + rq.ocf = 0x005; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *RSSI = resp.RSSI; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_set_event_mask( const uint8_t* LE_Event_Mask ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_event_mask_cp0 *cp0 = (hci_le_set_event_mask_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + Osal_MemCpy( (void*)&cp0->LE_Event_Mask, (const void*)LE_Event_Mask, 8 ); + index_input += 8; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x001; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_buffer_size( uint16_t* HC_LE_ACL_Data_Packet_Length, + uint8_t* HC_Total_Num_LE_ACL_Data_Packets ) +{ + struct hci_request rq; + hci_le_read_buffer_size_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x002; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *HC_LE_ACL_Data_Packet_Length = resp.HC_LE_ACL_Data_Packet_Length; + *HC_Total_Num_LE_ACL_Data_Packets = resp.HC_Total_Num_LE_ACL_Data_Packets; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_local_supported_features_page_0( uint8_t* LE_Features ) +{ + struct hci_request rq; + hci_le_read_local_supported_features_page_0_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x003; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)LE_Features, (const void*)resp.LE_Features, 8 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_set_random_address( const uint8_t* Random_Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_random_address_cp0 *cp0 = (hci_le_set_random_address_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + Osal_MemCpy( (void*)&cp0->Random_Address, (const void*)Random_Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x005; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_advertising_parameters( uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Advertising_Type, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Advertising_Channel_Map, + uint8_t Advertising_Filter_Policy ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_advertising_parameters_cp0 *cp0 = (hci_le_set_advertising_parameters_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Interval_Min = Advertising_Interval_Min; + index_input += 2; + cp0->Advertising_Interval_Max = Advertising_Interval_Max; + index_input += 2; + cp0->Advertising_Type = Advertising_Type; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Peer_Address_Type = Peer_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Address, (const void*)Peer_Address, 6 ); + index_input += 6; + cp0->Advertising_Channel_Map = Advertising_Channel_Map; + index_input += 1; + cp0->Advertising_Filter_Policy = Advertising_Filter_Policy; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x006; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_advertising_physical_channel_tx_power( uint8_t* Transmit_Power_Level ) +{ + struct hci_request rq; + hci_le_read_advertising_physical_channel_tx_power_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x007; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Transmit_Power_Level = resp.Transmit_Power_Level; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_set_advertising_data( uint8_t Advertising_Data_Length, + const uint8_t* Advertising_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_advertising_data_cp0 *cp0 = (hci_le_set_advertising_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Data_Length = Advertising_Data_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Advertising_Data, (const void*)Advertising_Data, 31 ); + index_input += 31; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x008; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_scan_response_data( uint8_t Scan_Response_Data_Length, + const uint8_t* Scan_Response_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_scan_response_data_cp0 *cp0 = (hci_le_set_scan_response_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Scan_Response_Data_Length = Scan_Response_Data_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Scan_Response_Data, (const void*)Scan_Response_Data, 31 ); + index_input += 31; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x009; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_advertising_enable( uint8_t Advertising_Enable ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_advertising_enable_cp0 *cp0 = (hci_le_set_advertising_enable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Enable = Advertising_Enable; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x00a; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_scan_parameters( uint8_t LE_Scan_Type, + uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Scanning_Filter_Policy ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_scan_parameters_cp0 *cp0 = (hci_le_set_scan_parameters_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Type = LE_Scan_Type; + index_input += 1; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Scanning_Filter_Policy = Scanning_Filter_Policy; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x00b; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_scan_enable( uint8_t LE_Scan_Enable, + uint8_t Filter_Duplicates ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_scan_enable_cp0 *cp0 = (hci_le_set_scan_enable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Enable = LE_Scan_Enable; + index_input += 1; + cp0->Filter_Duplicates = Filter_Duplicates; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x00c; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_create_connection( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Initiator_Filter_Policy, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Own_Address_Type, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_create_connection_cp0 *cp0 = (hci_le_create_connection_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->LE_Scan_Interval = LE_Scan_Interval; + index_input += 2; + cp0->LE_Scan_Window = LE_Scan_Window; + index_input += 2; + cp0->Initiator_Filter_Policy = Initiator_Filter_Policy; + index_input += 1; + cp0->Peer_Address_Type = Peer_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Address, (const void*)Peer_Address, 6 ); + index_input += 6; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Conn_Interval_Min = Conn_Interval_Min; + index_input += 2; + cp0->Conn_Interval_Max = Conn_Interval_Max; + index_input += 2; + cp0->Conn_Latency = Conn_Latency; + index_input += 2; + cp0->Supervision_Timeout = Supervision_Timeout; + index_input += 2; + cp0->Minimum_CE_Length = Minimum_CE_Length; + index_input += 2; + cp0->Maximum_CE_Length = Maximum_CE_Length; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x00d; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_create_connection_cancel( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x00e; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_filter_accept_list_size( uint8_t* Filter_Accept_List_Size ) +{ + struct hci_request rq; + hci_le_read_filter_accept_list_size_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x00f; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Filter_Accept_List_Size = resp.Filter_Accept_List_Size; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_clear_filter_accept_list( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x010; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_add_device_to_filter_accept_list( uint8_t Address_Type, + const uint8_t* Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_add_device_to_filter_accept_list_cp0 *cp0 = (hci_le_add_device_to_filter_accept_list_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Address_Type = Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Address, (const void*)Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x011; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_remove_device_from_filter_accept_list( uint8_t Address_Type, + const uint8_t* Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_remove_device_from_filter_accept_list_cp0 *cp0 = (hci_le_remove_device_from_filter_accept_list_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Address_Type = Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Address, (const void*)Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x012; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_connection_update( uint16_t Connection_Handle, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_connection_update_cp0 *cp0 = (hci_le_connection_update_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Conn_Interval_Min = Conn_Interval_Min; + index_input += 2; + cp0->Conn_Interval_Max = Conn_Interval_Max; + index_input += 2; + cp0->Conn_Latency = Conn_Latency; + index_input += 2; + cp0->Supervision_Timeout = Supervision_Timeout; + index_input += 2; + cp0->Minimum_CE_Length = Minimum_CE_Length; + index_input += 2; + cp0->Maximum_CE_Length = Maximum_CE_Length; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x013; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_host_channel_classification( const uint8_t* LE_Channel_Map ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_host_channel_classification_cp0 *cp0 = (hci_le_set_host_channel_classification_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + Osal_MemCpy( (void*)&cp0->LE_Channel_Map, (const void*)LE_Channel_Map, 5 ); + index_input += 5; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x014; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_channel_map( uint16_t Connection_Handle, + uint8_t* LE_Channel_Map ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_read_channel_map_cp0 *cp0 = (hci_le_read_channel_map_cp0*)(cmd_buffer); + hci_le_read_channel_map_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x015; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)LE_Channel_Map, (const void*)resp.LE_Channel_Map, 5 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_remote_features_page_0( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_read_remote_features_page_0_cp0 *cp0 = (hci_le_read_remote_features_page_0_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x016; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_encrypt( const uint8_t* Key, + const uint8_t* Plaintext_Data, + uint8_t* Encrypted_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_encrypt_cp0 *cp0 = (hci_le_encrypt_cp0*)(cmd_buffer); + hci_le_encrypt_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + Osal_MemCpy( (void*)&cp0->Key, (const void*)Key, 16 ); + index_input += 16; + Osal_MemCpy( (void*)&cp0->Plaintext_Data, (const void*)Plaintext_Data, 16 ); + index_input += 16; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x017; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)Encrypted_Data, (const void*)resp.Encrypted_Data, 16 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_rand( uint8_t* Random_Number ) +{ + struct hci_request rq; + hci_le_rand_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x018; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)Random_Number, (const void*)resp.Random_Number, 8 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_enable_encryption( uint16_t Connection_Handle, + const uint8_t* Random_Number, + uint16_t Encrypted_Diversifier, + const uint8_t* Long_Term_Key ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_enable_encryption_cp0 *cp0 = (hci_le_enable_encryption_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemCpy( (void*)&cp0->Random_Number, (const void*)Random_Number, 8 ); + index_input += 8; + cp0->Encrypted_Diversifier = Encrypted_Diversifier; + index_input += 2; + Osal_MemCpy( (void*)&cp0->Long_Term_Key, (const void*)Long_Term_Key, 16 ); + index_input += 16; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x019; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_long_term_key_request_reply( uint16_t Connection_Handle, + const uint8_t* Long_Term_Key ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_long_term_key_request_reply_cp0 *cp0 = (hci_le_long_term_key_request_reply_cp0*)(cmd_buffer); + hci_le_long_term_key_request_reply_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemCpy( (void*)&cp0->Long_Term_Key, (const void*)Long_Term_Key, 16 ); + index_input += 16; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x01a; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_long_term_key_request_negative_reply( uint16_t Connection_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_long_term_key_request_negative_reply_cp0 *cp0 = (hci_le_long_term_key_request_negative_reply_cp0*)(cmd_buffer); + hci_le_long_term_key_request_negative_reply_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x01b; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_supported_states( uint8_t* LE_States ) +{ + struct hci_request rq; + hci_le_read_supported_states_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x01c; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)LE_States, (const void*)resp.LE_States, 8 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_receiver_test( uint8_t RX_Frequency ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_receiver_test_cp0 *cp0 = (hci_le_receiver_test_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->RX_Frequency = RX_Frequency; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x01d; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_transmitter_test( uint8_t TX_Frequency, + uint8_t Length_Of_Test_Data, + uint8_t Packet_Payload ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_transmitter_test_cp0 *cp0 = (hci_le_transmitter_test_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->TX_Frequency = TX_Frequency; + index_input += 1; + cp0->Length_Of_Test_Data = Length_Of_Test_Data; + index_input += 1; + cp0->Packet_Payload = Packet_Payload; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x01e; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_test_end( uint16_t* Number_Of_Packets ) +{ + struct hci_request rq; + hci_le_test_end_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x01f; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Number_Of_Packets = resp.Number_Of_Packets; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_set_data_length( uint16_t Connection_Handle, + uint16_t TxOctets, + uint16_t TxTime ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_data_length_cp0 *cp0 = (hci_le_set_data_length_cp0*)(cmd_buffer); + hci_le_set_data_length_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->TxOctets = TxOctets; + index_input += 2; + cp0->TxTime = TxTime; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x022; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_suggested_default_data_length( uint16_t* SuggestedMaxTxOctets, + uint16_t* SuggestedMaxTxTime ) +{ + struct hci_request rq; + hci_le_read_suggested_default_data_length_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x023; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *SuggestedMaxTxOctets = resp.SuggestedMaxTxOctets; + *SuggestedMaxTxTime = resp.SuggestedMaxTxTime; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_write_suggested_default_data_length( uint16_t SuggestedMaxTxOctets, + uint16_t SuggestedMaxTxTime ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_write_suggested_default_data_length_cp0 *cp0 = (hci_le_write_suggested_default_data_length_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->SuggestedMaxTxOctets = SuggestedMaxTxOctets; + index_input += 2; + cp0->SuggestedMaxTxTime = SuggestedMaxTxTime; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x024; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_local_p256_public_key( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x025; + rq.event = 0x0F; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_generate_dhkey( const uint8_t* Remote_P256_Public_Key ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_generate_dhkey_cp0 *cp0 = (hci_le_generate_dhkey_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + Osal_MemCpy( (void*)&cp0->Remote_P256_Public_Key, (const void*)Remote_P256_Public_Key, 64 ); + index_input += 64; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x026; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_add_device_to_resolving_list( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address, + const uint8_t* Peer_IRK, + const uint8_t* Local_IRK ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_add_device_to_resolving_list_cp0 *cp0 = (hci_le_add_device_to_resolving_list_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Peer_Identity_Address_Type = Peer_Identity_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Identity_Address, (const void*)Peer_Identity_Address, 6 ); + index_input += 6; + Osal_MemCpy( (void*)&cp0->Peer_IRK, (const void*)Peer_IRK, 16 ); + index_input += 16; + Osal_MemCpy( (void*)&cp0->Local_IRK, (const void*)Local_IRK, 16 ); + index_input += 16; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x027; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_remove_device_from_resolving_list( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_remove_device_from_resolving_list_cp0 *cp0 = (hci_le_remove_device_from_resolving_list_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Peer_Identity_Address_Type = Peer_Identity_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Identity_Address, (const void*)Peer_Identity_Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x028; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_clear_resolving_list( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x029; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_resolving_list_size( uint8_t* Resolving_List_Size ) +{ + struct hci_request rq; + hci_le_read_resolving_list_size_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x02a; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Resolving_List_Size = resp.Resolving_List_Size; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_peer_resolvable_address( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address, + uint8_t* Peer_Resolvable_Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_read_peer_resolvable_address_cp0 *cp0 = (hci_le_read_peer_resolvable_address_cp0*)(cmd_buffer); + hci_le_read_peer_resolvable_address_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Peer_Identity_Address_Type = Peer_Identity_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Identity_Address, (const void*)Peer_Identity_Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x02b; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)Peer_Resolvable_Address, (const void*)resp.Peer_Resolvable_Address, 6 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_local_resolvable_address( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address, + uint8_t* Local_Resolvable_Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_read_local_resolvable_address_cp0 *cp0 = (hci_le_read_local_resolvable_address_cp0*)(cmd_buffer); + hci_le_read_local_resolvable_address_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Peer_Identity_Address_Type = Peer_Identity_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Identity_Address, (const void*)Peer_Identity_Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x02c; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + Osal_MemCpy( (void*)Local_Resolvable_Address, (const void*)resp.Local_Resolvable_Address, 6 ); + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_set_address_resolution_enable( uint8_t Address_Resolution_Enable ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_address_resolution_enable_cp0 *cp0 = (hci_le_set_address_resolution_enable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Address_Resolution_Enable = Address_Resolution_Enable; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x02d; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_resolvable_private_address_timeout( uint16_t RPA_Timeout ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_resolvable_private_address_timeout_cp0 *cp0 = (hci_le_set_resolvable_private_address_timeout_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->RPA_Timeout = RPA_Timeout; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x02e; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_maximum_data_length( uint16_t* supportedMaxTxOctets, + uint16_t* supportedMaxTxTime, + uint16_t* supportedMaxRxOctets, + uint16_t* supportedMaxRxTime ) +{ + struct hci_request rq; + hci_le_read_maximum_data_length_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x02f; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *supportedMaxTxOctets = resp.supportedMaxTxOctets; + *supportedMaxTxTime = resp.supportedMaxTxTime; + *supportedMaxRxOctets = resp.supportedMaxRxOctets; + *supportedMaxRxTime = resp.supportedMaxRxTime; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_phy( uint16_t Connection_Handle, + uint8_t* TX_PHY, + uint8_t* RX_PHY ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_read_phy_cp0 *cp0 = (hci_le_read_phy_cp0*)(cmd_buffer); + hci_le_read_phy_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x030; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *TX_PHY = resp.TX_PHY; + *RX_PHY = resp.RX_PHY; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_set_default_phy( uint8_t ALL_PHYS, + uint8_t TX_PHYS, + uint8_t RX_PHYS ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_default_phy_cp0 *cp0 = (hci_le_set_default_phy_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->ALL_PHYS = ALL_PHYS; + index_input += 1; + cp0->TX_PHYS = TX_PHYS; + index_input += 1; + cp0->RX_PHYS = RX_PHYS; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x031; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_phy( uint16_t Connection_Handle, + uint8_t ALL_PHYS, + uint8_t TX_PHYS, + uint8_t RX_PHYS, + uint16_t PHY_options ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_phy_cp0 *cp0 = (hci_le_set_phy_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->ALL_PHYS = ALL_PHYS; + index_input += 1; + cp0->TX_PHYS = TX_PHYS; + index_input += 1; + cp0->RX_PHYS = RX_PHYS; + index_input += 1; + cp0->PHY_options = PHY_options; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x032; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_receiver_test_v2( uint8_t RX_Frequency, + uint8_t PHY, + uint8_t Modulation_Index ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_receiver_test_v2_cp0 *cp0 = (hci_le_receiver_test_v2_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->RX_Frequency = RX_Frequency; + index_input += 1; + cp0->PHY = PHY; + index_input += 1; + cp0->Modulation_Index = Modulation_Index; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x033; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_transmitter_test_v2( uint8_t TX_Frequency, + uint8_t Length_Of_Test_Data, + uint8_t Packet_Payload, + uint8_t PHY ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_transmitter_test_v2_cp0 *cp0 = (hci_le_transmitter_test_v2_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->TX_Frequency = TX_Frequency; + index_input += 1; + cp0->Length_Of_Test_Data = Length_Of_Test_Data; + index_input += 1; + cp0->Packet_Payload = Packet_Payload; + index_input += 1; + cp0->PHY = PHY; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x034; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_advertising_set_random_address( uint8_t Advertising_Handle, + const uint8_t* Random_Address ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_advertising_set_random_address_cp0 *cp0 = (hci_le_set_advertising_set_random_address_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Random_Address, (const void*)Random_Address, 6 ); + index_input += 6; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x035; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_extended_advertising_parameters( uint8_t Advertising_Handle, + uint16_t Adv_Event_Properties, + const uint8_t* Primary_Adv_Interval_Min, + const uint8_t* Primary_Adv_Interval_Max, + uint8_t Primary_Adv_Channel_Map, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Adv_Filter_Policy, + uint8_t Adv_TX_Power, + uint8_t Primary_Adv_PHY, + uint8_t Secondary_Adv_Max_Skip, + uint8_t Secondary_Adv_PHY, + uint8_t Adv_SID, + uint8_t Scan_Req_Notification_Enable, + uint8_t* Selected_TX_Power ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_extended_advertising_parameters_cp0 *cp0 = (hci_le_set_extended_advertising_parameters_cp0*)(cmd_buffer); + hci_le_set_extended_advertising_parameters_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + cp0->Adv_Event_Properties = Adv_Event_Properties; + index_input += 2; + Osal_MemCpy( (void*)&cp0->Primary_Adv_Interval_Min, (const void*)Primary_Adv_Interval_Min, 3 ); + index_input += 3; + Osal_MemCpy( (void*)&cp0->Primary_Adv_Interval_Max, (const void*)Primary_Adv_Interval_Max, 3 ); + index_input += 3; + cp0->Primary_Adv_Channel_Map = Primary_Adv_Channel_Map; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Peer_Address_Type = Peer_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Address, (const void*)Peer_Address, 6 ); + index_input += 6; + cp0->Adv_Filter_Policy = Adv_Filter_Policy; + index_input += 1; + cp0->Adv_TX_Power = Adv_TX_Power; + index_input += 1; + cp0->Primary_Adv_PHY = Primary_Adv_PHY; + index_input += 1; + cp0->Secondary_Adv_Max_Skip = Secondary_Adv_Max_Skip; + index_input += 1; + cp0->Secondary_Adv_PHY = Secondary_Adv_PHY; + index_input += 1; + cp0->Adv_SID = Adv_SID; + index_input += 1; + cp0->Scan_Req_Notification_Enable = Scan_Req_Notification_Enable; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x036; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Selected_TX_Power = resp.Selected_TX_Power; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_set_extended_advertising_data( uint8_t Advertising_Handle, + uint8_t Operation, + uint8_t Fragment_Preference, + uint8_t Advertising_Data_Length, + const uint8_t* Advertising_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_extended_advertising_data_cp0 *cp0 = (hci_le_set_extended_advertising_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + cp0->Operation = Operation; + index_input += 1; + cp0->Fragment_Preference = Fragment_Preference; + index_input += 1; + cp0->Advertising_Data_Length = Advertising_Data_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Advertising_Data, (const void*)Advertising_Data, Advertising_Data_Length ); + index_input += Advertising_Data_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x037; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_extended_scan_response_data( uint8_t Advertising_Handle, + uint8_t Operation, + uint8_t Fragment_Preference, + uint8_t Scan_Response_Data_Length, + const uint8_t* Scan_Response_Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_extended_scan_response_data_cp0 *cp0 = (hci_le_set_extended_scan_response_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + cp0->Operation = Operation; + index_input += 1; + cp0->Fragment_Preference = Fragment_Preference; + index_input += 1; + cp0->Scan_Response_Data_Length = Scan_Response_Data_Length; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Scan_Response_Data, (const void*)Scan_Response_Data, Scan_Response_Data_Length ); + index_input += Scan_Response_Data_Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x038; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_extended_advertising_enable( uint8_t Enable, + uint8_t Num_Sets, + const Adv_Set_t* Adv_Set ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_extended_advertising_enable_cp0 *cp0 = (hci_le_set_extended_advertising_enable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Enable = Enable; + index_input += 1; + cp0->Num_Sets = Num_Sets; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Adv_Set, (const void*)Adv_Set, Num_Sets * (sizeof(Adv_Set_t)) ); + index_input += Num_Sets * (sizeof(Adv_Set_t)); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x039; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_maximum_advertising_data_length( uint16_t* Max_Advertising_Data_Length ) +{ + struct hci_request rq; + hci_le_read_maximum_advertising_data_length_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x03a; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Max_Advertising_Data_Length = resp.Max_Advertising_Data_Length; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_number_of_supported_advertising_sets( uint8_t* Num_Supported_Advertising_Sets ) +{ + struct hci_request rq; + hci_le_read_number_of_supported_advertising_sets_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x03b; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Num_Supported_Advertising_Sets = resp.Num_Supported_Advertising_Sets; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_remove_advertising_set( uint8_t Advertising_Handle ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_remove_advertising_set_cp0 *cp0 = (hci_le_remove_advertising_set_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Advertising_Handle = Advertising_Handle; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x03c; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_clear_advertising_sets( void ) +{ + struct hci_request rq; + tBleStatus status = 0; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x03d; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_extended_scan_parameters( uint8_t Own_Address_Type, + uint8_t Scanning_Filter_Policy, + uint8_t Scanning_PHYs, + const Scan_Param_Phy_t* Scan_Param_Phy ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_extended_scan_parameters_cp0 *cp0 = (hci_le_set_extended_scan_parameters_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Scanning_Filter_Policy = Scanning_Filter_Policy; + index_input += 1; + cp0->Scanning_PHYs = Scanning_PHYs; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Scan_Param_Phy, (const void*)Scan_Param_Phy, 10 ); + index_input += 10; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x041; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_extended_scan_enable( uint8_t Enable, + uint8_t Filter_Duplicates, + uint16_t Duration, + uint16_t Period ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_extended_scan_enable_cp0 *cp0 = (hci_le_set_extended_scan_enable_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Enable = Enable; + index_input += 1; + cp0->Filter_Duplicates = Filter_Duplicates; + index_input += 1; + cp0->Duration = Duration; + index_input += 2; + cp0->Period = Period; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x042; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_extended_create_connection( uint8_t Initiator_Filter_Policy, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Initiating_PHYs, + const Init_Param_Phy_t* Init_Param_Phy ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_extended_create_connection_cp0 *cp0 = (hci_le_extended_create_connection_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Initiator_Filter_Policy = Initiator_Filter_Policy; + index_input += 1; + cp0->Own_Address_Type = Own_Address_Type; + index_input += 1; + cp0->Peer_Address_Type = Peer_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Address, (const void*)Peer_Address, 6 ); + index_input += 6; + cp0->Initiating_PHYs = Initiating_PHYs; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Init_Param_Phy, (const void*)Init_Param_Phy, 48 ); + index_input += 48; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x043; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_read_transmit_power( uint8_t* Min_TX_Power, + uint8_t* Max_TX_Power ) +{ + struct hci_request rq; + hci_le_read_transmit_power_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x04b; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Min_TX_Power = resp.Min_TX_Power; + *Max_TX_Power = resp.Max_TX_Power; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_read_rf_path_compensation( uint16_t* RF_TX_Path_Compensation, + uint16_t* RF_RX_Path_Compensation ) +{ + struct hci_request rq; + hci_le_read_rf_path_compensation_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x04c; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *RF_TX_Path_Compensation = resp.RF_TX_Path_Compensation; + *RF_RX_Path_Compensation = resp.RF_RX_Path_Compensation; + return BLE_STATUS_SUCCESS; +} + +tBleStatus hci_le_write_rf_path_compensation( uint16_t RF_TX_Path_Compensation, + uint16_t RF_RX_Path_Compensation ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_write_rf_path_compensation_cp0 *cp0 = (hci_le_write_rf_path_compensation_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->RF_TX_Path_Compensation = RF_TX_Path_Compensation; + index_input += 2; + cp0->RF_RX_Path_Compensation = RF_RX_Path_Compensation; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x04d; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_privacy_mode( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address, + uint8_t Privacy_Mode ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_privacy_mode_cp0 *cp0 = (hci_le_set_privacy_mode_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Peer_Identity_Address_Type = Peer_Identity_Address_Type; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Peer_Identity_Address, (const void*)Peer_Identity_Address, 6 ); + index_input += 6; + cp0->Privacy_Mode = Privacy_Mode; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x04e; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_generate_dhkey_v2( const uint8_t* Remote_P256_Public_Key, + uint8_t Key_Type ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_generate_dhkey_v2_cp0 *cp0 = (hci_le_generate_dhkey_v2_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + Osal_MemCpy( (void*)&cp0->Remote_P256_Public_Key, (const void*)Remote_P256_Public_Key, 64 ); + index_input += 64; + cp0->Key_Type = Key_Type; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x05e; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus hci_le_set_resolvable_private_address_timeout_v2( uint16_t RPA_Timeout_Min, + uint16_t RPA_Timeout_Max ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + hci_le_set_resolvable_private_address_timeout_v2_cp0 *cp0 = (hci_le_set_resolvable_private_address_timeout_v2_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->RPA_Timeout_Min = RPA_Timeout_Min; + index_input += 2; + cp0->RPA_Timeout_Max = RPA_Timeout_Max; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x08; + rq.ocf = 0x09e; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h new file mode 100644 index 0000000..501d24b --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_hci_le.h @@ -0,0 +1,2263 @@ +/***************************************************************************** + * @file ble_hci_le.h + * @brief STM32WB BLE API (HCI_LE) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_HCI_LE_H__ +#define BLE_HCI_LE_H__ + + +#include "auto/ble_types.h" + +/** + * @brief HCI_DISCONNECT + * The HCI_DISCONNECT is used to terminate an existing connection. The + * Connection_Handle command parameter indicates which connection is to be + * disconnected. The Reason command parameter indicates the reason for ending + * the connection. The remote Controller will receive the Reason command + * parameter in the HCI_DISCONNECTION_COMPLETE_EVENT event. All synchronous + * connections on a physical link should be disconnected before the ACL + * connection on the same physical connection is disconnected. + * See Core Specification [Vol 4, Part E, 7.1.6]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Reason The reason for ending the connection. + * Values: + * - 0x05: Authentication Failure + * - 0x13: Remote User Terminated Connection + * - 0x14: Remote Device Terminated Connection due to Low Resources + * - 0x15: Remote Device Terminated Connection due to Power Off + * - 0x1A: Unsupported Remote Feature + * - 0x3B: Unacceptable Connection Parameters + * @return Value indicating success or error code. + */ +tBleStatus hci_disconnect( uint16_t Connection_Handle, + uint8_t Reason ); + +/** + * @brief HCI_READ_REMOTE_VERSION_INFORMATION + * This command will obtain the values for the version information for the + * remote device identified by the Connection_Handle parameter. The + * Connection_Handle must be a Connection_Handle for an ACL or LE connection. + * See Core Specification [Vol 4, Part E, 7.1.23]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @return Value indicating success or error code. + */ +tBleStatus hci_read_remote_version_information( uint16_t Connection_Handle ); + +/** + * @brief HCI_SET_EVENT_MASK + * The Set_Event_Mask command is used to control which events are generated by + * the HCI for the Host. If the bit in the Event_Mask is set to a one, then the + * event associated with that bit will be enabled. For an LE Controller, the LE + * Meta Event bit in the Event_Mask shall enable or disable all LE events in + * the LE Meta Event. The Host has to deal with each event that occurs. The + * event mask allows the Host to control how much it is interrupted. + * See Core Specification [Vol 4, Part E, 7.3.1]. + * + * @param Event_Mask Event mask. Default: 0x2000FFFFFFFFFFFF + * Flags: + * - 0x0000000000000000: No events specified + * - 0x0000000000000010: Disconnection Complete Event + * - 0x0000000000000080: Encryption Change Event + * - 0x0000000000000800: Read Remote Version Information Complete Event + * - 0x0000000000008000: Hardware Error Event + * - 0x0000800000000000: Encryption Key Refresh Complete Event + * - 0x2000000000000000: LE Meta-Event + * @return Value indicating success or error code. + */ +tBleStatus hci_set_event_mask( const uint8_t* Event_Mask ); + +/** + * @brief HCI_RESET + * The Reset command resets the Link Layer on an LE Controller. The Reset + * command shall not affect the used HCI transport layer since the HCI + * transport layers may have reset mechanisms of their own. After the reset is + * completed, the current operational state is lost, the Controller enters + * standby mode and the Controller automatically reverts to the default values + * for the parameters for which default values are defined in the + * specification. + * Note: The Reset command does not necessarily perform a hardware reset. This + * is implementation defined. + * The Host shall not send additional HCI commands before the Command Complete + * event related to the Reset command has been received. + * See Core Specification [Vol 4, Part E, 7.3.2]. + * + * @return Value indicating success or error code. + */ +tBleStatus hci_reset( void ); + +/** + * @brief HCI_READ_TRANSMIT_POWER_LEVEL + * This command reads the values for the Transmit_Power_Level parameter for the + * specified Connection_Handle. The Connection_Handle shall be a + * Connection_Handle for an ACL connection. + * See Core Specification [Vol 4, Part E, 7.3.35]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Type Current or maximum transmit power level. + * Values: + * - 0x00: Read Current Transmit Power Level. + * - 0x01: Read Maximum Transmit Power Level. + * @param[out] Transmit_Power_Level Size: 1 Octet (signed integer). + * Units: dBm. + * Values: + * - -30 ... 20 + * @return Value indicating success or error code. + */ +tBleStatus hci_read_transmit_power_level( uint16_t Connection_Handle, + uint8_t Type, + uint8_t* Transmit_Power_Level ); + +/** + * @brief HCI_SET_CONTROLLER_TO_HOST_FLOW_CONTROL + * This command is used by the Host to turn flow control on or off for data + * and/or voice sent in the direction from the Controller to the Host. If flow + * control is turned off, the Host should not send the + * Host_Number_Of_Completed_Packets command. That command will be ignored by + * the Controller if it is sent by the Host and flow control is off. If flow + * control is turned on for HCI ACL Data Packets and off for HCI synchronous + * Data Packets, Host_Number_Of_Completed_Packets commands sent by the Host + * should only contain Connection_Handles for ACL connections. If flow control + * is turned off for HCI ACL Data Packets and on for HCI synchronous Data + * Packets, Host_Number_Of_Completed_Packets commands sent by the Host should + * only contain Connection_Handles for synchronous connections. If flow control + * is turned on for HCI ACL Data Packets and HCI synchronous Data Packets, the + * Host will send Host_Number_Of_Completed_Packets commands both for ACL + * connections and synchronous connections. + * The Flow_Control_Enable parameter shall only be changed if no connections + * exist. + * See Core Specification [Vol 4, Part E, 7.3.38]. + * + * @param Flow_Control_Enable Enable/Disable the Flow Control + * Values: + * - 0x00: Flow control off in direction from Controller to Host. + * Default. + * - 0x01: Flow control on for HCI ACL Data Packets and off for HCI + * synchronous.Data Packets in direction from Controller to Host. + * - 0x02: Flow control off for HCI ACL Data Packets and on for HCI + * synchronous.Data Packets in direction from Controller to Host. + * - 0x03: Flow control on both for HCI ACL Data Packets and HCI + * synchronous.Data Packets in direction from Controller to Host. + * @return Value indicating success or error code. + */ +tBleStatus hci_set_controller_to_host_flow_control( uint8_t Flow_Control_Enable ); + +/** + * @brief HCI_HOST_BUFFER_SIZE + * The Host_Buffer_Size command is used by the Host to notify the Controller + * about the maximum size of the data portion of HCI ACL and synchronous Data + * Packets sent from the Controller to the Host. The Controller shall segment + * the data to be transmitted from the Controller to the Host according to + * these sizes, so that the HCI Data Packets will contain data with up to these + * sizes. The Host_Buffer_Size command also notifies the Controller about the + * total number of HCI ACL and synchronous Data Packets that can be stored in + * the data buffers of the Host. If flow control from the Controller to the + * Host is turned off, and the Host_Buffer_Size command has not been issued by + * the Host, this means that the Controller will send HCI Data Packets to the + * Host with any lengths the Controller wants to use, and it is assumed that + * the data buffer sizes of the Host are unlimited. If flow control from the + * Controller to the Host is turned on, the Host_Buffer_Size command shall + * after a power-on or a reset always be sent by the Host before the first + * Host_Number_Of_Completed_Packets command is sent. + * The Set Controller To Host Flow Control Command is used to turn flow control + * on or off. + * The Host_ACL_Data_Packet_Length command parameter will be used to determine + * the size of the L2CAP segments contained in ACL Data Packets, which are + * transferred from the Controller to the Host. + * The Host_Synchronous_Data_Packet_Length command parameter is used to + * determine the maximum size of HCI synchronous Data Packets. Both the Host + * and the Controller shall support command and event packets, where the data + * portion (excluding header) contained in the packets is 255 octets in size. + * The Host_Total_Num_ACL_Data_Packets command parameter contains the total + * number of HCI ACL Data Packets that can be stored in the data buffers of the + * Host. The Controller will determine how the buffers are to be divided + * between different Connection_Handles. + * The Host_Total_Num_Synchronous_Data_Packets command parameter gives the same + * information for HCI synchronous Data Packets. + * Note: The Host_ACL_Data_Packet_Length and + * Host_Synchronous_Data_Packet_Length command parameters do not include the + * length of the HCI Data Packet header. + * See Core Specification [Vol 4, Part E, 7.3.39]. + * + * @param Host_ACL_Data_Packet_Length Maximum length (in octets) of the data + * portion of each HCI ACL Data Packet that the Host is able to accept. + * Values: + * - 251 ... 65535 + * @param Host_Synchronous_Data_Packet_Length Maximum length (in octets) of the + * data portion of each HCI synchronous Data Packet that the Host is + * able to accept. Not used. + * @param Host_Total_Num_ACL_Data_Packets Total number of HCI ACL Data Packets + * that can be stored in the data buffers of the Host. + * Values: + * - 1 ... 65535 + * @param Host_Total_Num_Synchronous_Data_Packets Total number of HCI + * synchronous Data Packets that can be stored in the data buffers of + * the Host. Not used. + * @return Value indicating success or error code. + */ +tBleStatus hci_host_buffer_size( uint16_t Host_ACL_Data_Packet_Length, + uint8_t Host_Synchronous_Data_Packet_Length, + uint16_t Host_Total_Num_ACL_Data_Packets, + uint16_t Host_Total_Num_Synchronous_Data_Packets ); + +/** + * @brief HCI_HOST_NUMBER_OF_COMPLETED_PACKETS + * The Host_Number_Of_Completed_Packets command is used by the Host to indicate + * to the Controller the number of HCI Data Packets that have been completed + * for each Connection_Handle since the previous + * Host_Number_Of_Completed_Packets command was sent to the Controller. This + * means that the corresponding buffer space has been freed in the Host. Based + * on this information, and the Host_Total_Num_ACL_Data_Packets and + * Host_Total_Num_Synchronous_Data_Packets command parameters of the + * Host_Buffer_Size command, the Controller can determine for which + * Connection_Handles the following HCI Data Packets should be sent to the + * Host. The command should only be issued by the Host if flow control in the + * direction from the Controller to the Host is on and there is at least one + * connection, or if the Controller is in local loopback mode. Otherwise, the + * command will be ignored by the Controller. When the Host has completed one + * or more HCI Data Packet(s) it shall send a Host_Number_Of_Completed_Packets + * command to the Controller, until it finally reports that all pending HCI + * Data Packets have been completed. The frequency at which this command is + * sent is manufacturer specific. + * The Set Controller To Host Flow Control Command is used to turn flow control + * on or off. If flow control from the Controller to the Host is turned on, the + * Host_Buffer_Size command shall always be sent by the Host after a power-on + * or a reset before the first Host_Number_Of_Completed_Packets command is + * sent. + * Note: The Host_Number_Of_Completed_Packets command is a special command in + * the sense that no event is normally generated after the command has + * completed. The command may be sent at any time by the Host when there is at + * least one connection, or if the Controller is in local loopback mode + * independent of other commands. The normal flow control for commands is not + * used for the Host_Number_Of_Completed_Packets command. + * See Core Specification [Vol 4, Part E, 7.3.40]. + * + * @param Number_Of_Handles The number of Connection_Handles and + * Host_Num_Of_Completed_Packets parameters pairs contained in this + * command. + * Values: + * - 0 ... 255 + * @param Host_Nb_Of_Completed_Pkt_Pair See @ref + * Host_Nb_Of_Completed_Pkt_Pair_t + * @return Value indicating success or error code. + */ +tBleStatus hci_host_number_of_completed_packets( uint8_t Number_Of_Handles, + const Host_Nb_Of_Completed_Pkt_Pair_t* Host_Nb_Of_Completed_Pkt_Pair ); + +/** + * @brief HCI_READ_LOCAL_VERSION_INFORMATION + * This command reads the values for the version information for the local + * Controller. + * See Core Specification [Vol 4, Part E, 7.4.1]. + * + * @param[out] HCI_Version Version of the HCI Specification supported by the + * Controller. See Bluetooth Assigned Numbers. + * @param[out] HCI_Subversion Revision of the HCI implementation in the + * Controller. This value is vendor-specific. + * @param[out] LMP_Version Version of the Current LMP supported by the + * Controller. See Bluetooth Assigned Numbers. + * @param[out] Company_Identifier Company identifier for the manufacturer of + * the Controller. See Bluetooth Assigned Numbers. + * @param[out] LMP_Subversion Subversion of the Current LMP in the Controller. + * This value is vendor-specific. + * @return Value indicating success or error code. + */ +tBleStatus hci_read_local_version_information( uint8_t* HCI_Version, + uint16_t* HCI_Subversion, + uint8_t* LMP_Version, + uint16_t* Company_Identifier, + uint16_t* LMP_Subversion ); + +/** + * @brief HCI_READ_LOCAL_SUPPORTED_COMMANDS + * This command reads the list of HCI commands supported for the local + * Controller. This command shall return the Supported_Commands configuration + * parameter. It is implied that if a command is listed as supported, the + * feature underlying that command is also supported. + * See Core Specification [Vol 4, Part E, 7.4.2]. + * + * @param[out] Supported_Commands Bit mask for each HCI Command. If a bit is 1, + * the Controller supports the corresponding command and the features + * required for the command. + * Unsupported or undefined commands shall be set to 0. + * @return Value indicating success or error code. + */ +tBleStatus hci_read_local_supported_commands( uint8_t* Supported_Commands ); + +/** + * @brief HCI_READ_LOCAL_SUPPORTED_FEATURES + * This command requests a list of the supported features for the local + * Controller. This command will return a list of the LMP features. For details + * see Part C, Link Manager Protocol Specification. + * See Core Specification [Vol 4, Part E, 7.4.3]. + * + * @param[out] LMP_Features Bit Mask List of LMP features. + * @return Value indicating success or error code. + */ +tBleStatus hci_read_local_supported_features( uint8_t* LMP_Features ); + +/** + * @brief HCI_READ_BD_ADDR + * On an LE Controller, this command shall read the Public Device Address. + * See Core Specification [Vol 4, Part E, 7.4.6]. + * + * @param[out] BD_ADDR BD_ADDR (Bluetooth Device Address) of the device. + * @return Value indicating success or error code. + */ +tBleStatus hci_read_bd_addr( uint8_t* BD_ADDR ); + +/** + * @brief HCI_READ_RSSI + * This command reads the Received Signal Strength Indication (RSSI) value from + * a Controller. For an LE transport, a Connection_Handle is used as the Handle + * command parameter and return parameter. The meaning of the RSSI metric is an + * absolute receiver signal strength value in dBm to +/- 6 dB accuracy. If the + * RSSI cannot be read, the RSSI metric shall be set to 127. + * See Core Specification [Vol 4, Part E, 7.5.4]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param[out] RSSI RSSI (signed integer). + * Units: dBm. + * Values: + * - 127: RSSI not available + * - -127 ... 20 + * @return Value indicating success or error code. + */ +tBleStatus hci_read_rssi( uint16_t Connection_Handle, + uint8_t* RSSI ); + +/** + * @brief HCI_LE_SET_EVENT_MASK + * The LE_Set_Event_Mask command is used to control which LE events are + * generated by the HCI for the Host. If the bit in the LE_Event_Mask is set to + * a one, then the event associated with that bit will be enabled. The Host has + * to deal with each event that is generated by an LE Controller. The event + * mask allows the Host to control which events will interrupt it. + * For LE events to be generated, the LE Meta-Event bit in the Event_Mask shall + * also be set. If that bit is not set, then LE events shall not be generated, + * regardless of how the LE_Event_Mask is set. + * See Core Specification [Vol 4, Part E, 7.8.1]. + * + * @param LE_Event_Mask LE event mask. Default: 0x000000C7FFF7F85F. Note that + * the BLE stack ignores the bits which represent events it does not + * support (according to its variant). + * Flags: + * - 0x0000000000000000: No LE events specified + * - 0x0000000000000001: LE Connection Complete event + * - 0x0000000000000002: LE Advertising Report event + * - 0x0000000000000004: LE Connection Update Complete event + * - 0x0000000000000008: LE Read Remote Features Complete event + * - 0x0000000000000010: LE Long Term Key Request event + * - 0x0000000000000020: LE Remote Connection Parameter Request event + * - 0x0000000000000040: LE Data Length Change event + * - 0x0000000000000080: LE Read Local P-256 Public Key Complete event + * - 0x0000000000000100: LE Generate DHKey Complete event + * - 0x0000000000000200: LE Enhanced Connection Complete event + * - 0x0000000000000400: LE Directed Advertising Report event + * - 0x0000000000000800: LE PHY Update Complete event + * - 0x0000000000001000: LE Extended Advertising Report event + * - 0x0000000000002000: LE Periodic Advertising Sync Established event + * - 0x0000000000004000: LE Periodic Advertising Report event + * - 0x0000000000008000: LE Periodic Advertising Sync Lost event + * - 0x0000000000010000: LE Scan Timeout event + * - 0x0000000000020000: LE Advertising Set Terminated event + * - 0x0000000000040000: LE Scan Request Received event + * - 0x0000000000080000: LE Channel Selection Algorithm event + * - 0x0000000000100000: LE Connectionless IQ Report event + * - 0x0000000000200000: LE Connection IQ Report event + * - 0x0000000000400000: LE CTE Request Failed event + * - 0x0000000000800000: LE Periodic Advertising Sync Transfer Received + * event + * - 0x0000000001000000: LE CIS Established event + * - 0x0000000002000000: LE CIS Request event + * - 0x0000000004000000: LE Create BIG Complete event + * - 0x0000000008000000: LE Terminate BIG Complete event + * - 0x0000000010000000: LE BIG Sync Established event + * - 0x0000000020000000: LE BIG Sync Lost event + * - 0x0000000040000000: LE Request Peer SCA Complete event + * - 0x0000000080000000: LE Path Loss Threshold event + * - 0x0000000100000000: LE Transmit Power Reporting event + * - 0x0000000200000000: LE BIGInfo Advertising Report event + * - 0x0000000400000000: LE Subrate Change event + * - 0x0000000800000000: LE Periodic Advertising Sync Established event + * [v2] + * - 0x0000001000000000: LE Periodic Advertising Report event [v2] + * - 0x0000002000000000: LE Periodic Advertising Sync Transfer Received + * event [v2] + * - 0x0000004000000000: LE Periodic Advertising Subevent Data Request + * event + * - 0x0000008000000000: LE Periodic Advertising Response Report event + * - 0x0000010000000000: LE Enhanced Connection Complete event [v2] + * - 0x0000020000000000: LE CIS Established event [v2] + * - 0x0000040000000000: LE Read All Remote Features Complete event + * - 0x0000080000000000: LE CS Read Remote Supported Capabilities + * Complete event + * - 0x0000100000000000: LE CS Read Remote FAE Table Complete event + * - 0x0000200000000000: LE CS Security Enable Complete event + * - 0x0000400000000000: LE CS Config Complete event + * - 0x0000800000000000: LE CS Procedure Enable Complete event + * - 0x0001000000000000: LE CS Subevent Result event + * - 0x0002000000000000: LE CS Subevent Result Continue event + * - 0x0004000000000000: LE CS Test End Complete event + * - 0x0008000000000000: LE Monitored Advertisers Report event + * - 0x0010000000000000: LE Frame Space Update Complete event + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_event_mask( const uint8_t* LE_Event_Mask ); + +/** + * @brief HCI_LE_READ_BUFFER_SIZE + * The LE_Read_Buffer_Size command is used to read the maximum size of the data + * portion of HCI LE ACL Data Packets sent from the Host to the Controller. + * The Host will segment the data transmitted to the Controller according to + * these values, so that the HCI Data Packets will contain data with up to this + * size. The LE_Read_Buffer_Size command also returns the total number of HCI + * LE ACL Data Packets that can be stored in the data buffers of the + * Controller. The LE_Read_Buffer_Size command must be issued by the Host + * before it sends any data to an LE Controller (see Section 4.1.1). + * If the Controller returns a length value of zero, the Host shall use the + * Read_Buffer_Size command to determine the size of the data buffers. + * Note: Both the Read_Buffer_Size and LE_Read_Buffer_Size commands may return + * buffer length and number of packets parameter values that are nonzero. + * The HC_LE_ACL_Data_Packet_Length return parameter shall be used to determine + * the size of the L2CAP PDU segments contained in ACL Data Packets, which are + * transferred from the Host to the Controller to be broken up into packets by + * the Link Layer. Both the Host and the Controller shall support command and + * event packets, where the data portion (excluding header) contained in the + * packets is 255 octets in size. The HC_Total_Num_LE_ACL_Data_Packets return + * parameter contains the total number of HCI ACL Data Packets that can be + * stored in the data buffers of the Controller. The Host determines how the + * buffers are to be divided between different Connection Handles. + * Note: The HC_LE_ACL_Data_Packet_Length return parameter does not include the + * length of the HCI Data Packet header. + * See Core Specification [Vol 4, Part E, 7.8.2]. + * + * @param[out] HC_LE_ACL_Data_Packet_Length Used to determine the maximum size + * of the L2CAP PDU segments that are contained in ACL data packets, and + * which are transferred from the Host to the Controller to be broken up + * into packets by the Link Layer. + * Values: + * - 0x0000: No dedicated LE Buffer exists. + * - 0x001B ... 0x00FF: Maximum length (in octets) of the data portion + * of each HCI ACL data packet. + * @param[out] HC_Total_Num_LE_ACL_Data_Packets Contains the total number of + * HCI ACL Data packets that can be stored in the data buffers of the + * Controller. + * Values: + * - 0x00: No dedicated LE Buffer exists. + * - 0x01 ... 0xFF: The total number of HCI ACL data packets that can be + * stored in the data buffers of the Controller. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_buffer_size( uint16_t* HC_LE_ACL_Data_Packet_Length, + uint8_t* HC_Total_Num_LE_ACL_Data_Packets ); + +/** + * @brief HCI_LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0 + * This command requests page 0 of the list of the supported LE features for + * the Controller. + * See Core Specification [Vol 4, Part E, 7.8.3]. + * + * @param[out] LE_Features Bit Mask List of page 0 of the supported LE + * features. See Core Specification [Vol 6, Part B, 4.6]. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_local_supported_features_page_0( uint8_t* LE_Features ); + +/** + * @brief HCI_LE_SET_RANDOM_ADDRESS + * The LE_Set_Random_Address command is used by the Host to set the LE Random + * Device Address in the Controller (see [Vol 6] Part B, Section 1.3). + * See Core Specification [Vol 4, Part E, 7.8.4]. + * + * @param Random_Address Random Device Address. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_random_address( const uint8_t* Random_Address ); + +/** + * @brief HCI_LE_SET_ADVERTISING_PARAMETERS + * The LE_Set_Advertising_Parameters command is used by the Host to set the + * advertising parameters. + * The Advertising_Interval_Min shall be less than or equal to the + * Advertising_Interval_Max. + * The Advertising_Interval_Min and Advertising_Interval_Max should not be the + * same value to enable the Controller to determine the best advertising + * interval given other activities. + * For high duty cycle directed advertising, i.e. when Advertising_Type is 0x01 + * (ADV_DIRECT_IND, high duty cycle), the Advertising_Interval_Min and + * Advertising_Interval_Max parameters are not used and shall be ignored. + * The Advertising_Type is used to determine the packet type that is used for + * advertising when advertising is enabled. + * The Advertising_Interval_Min and Advertising_Interval_Max shall not be set + * to less than 0x00A0 (100 ms) if the Advertising_Type is set to 0x02 + * (ADV_SCAN_IND) or 0x03 (ADV_NONCONN_IND). The Own_Address_Type determines if + * the advertising packets are identified with the Public Device Address of the + * device, or a Random Device Address as written by the LE_Set_Random_Address + * command. + * If directed advertising is performed, i.e. when Advertising_Type is set to + * 0x01 (ADV_DIRECT_IND, high duty cycle) or 0x04 (ADV_DIRECT_IND, low duty + * cycle mode), then the Direct_Address_Type and Direct_Address shall be valid, + * otherwise they shall be ignored by the Controller and not used. + * The Advertising_Channel_Map is a bit field that indicates the advertising + * channels that shall be used when transmitting advertising packets. At least + * one channel bit shall be set in the Advertising_Channel_Map parameter. + * The Advertising_Filter_Policy parameter shall be ignored when directed + * advertising is enabled. + * The Host shall not issue this command when advertising is enabled in the + * Controller; if it is the Command Disallowed error code shall be used. + * See Core Specification [Vol 4, Part E, 7.8.5]. + * + * @param Advertising_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Advertising_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0020 (20.000 ms) ... 0x4000 (10240.000 ms) + * @param Advertising_Type Advertising type. + * Values: + * - 0x00: ADV_IND (Connectable undirected advertising) + * - 0x01: ADV_DIRECT_IND, high duty cycle (Connectable high duty cycle + * directed advertising) + * - 0x02: ADV_SCAN_IND (Scannable undirected advertising) + * - 0x03: ADV_NONCONN_IND (Non connectable undirected advertising) + * - 0x04: ADV_DIRECT_IND_LDC, low duty cycle (Connectable low duty + * cycle directed advertising) + * @param Own_Address_Type Own address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Resolvable Private Address if available, otherwise Public + * Address + * - 0x03: Resolvable Private Address if available, otherwise Random + * Address + * @param Peer_Address_Type Address type of the peer device. + * Values: + * - 0x00: Public Device Address or Public Identity Address + * - 0x01: Random Device Address or Random (static) Identity Address + * @param Peer_Address Public Device Address, Random Device Address, Public + * Identity Address, or Random (static) Identity Address of the device + * to be connected. + * @param Advertising_Channel_Map Advertising channel map. + * Flags: + * - 0x01: Channel 37 shall be used + * - 0x02: Channel 38 shall be used + * - 0x04: Channel 39 shall be used + * @param Advertising_Filter_Policy Advertising filter policy. + * Values: + * - 0x00: Allow Scan Request from Any, Allow Connect Request from Any + * - 0x01: Allow Scan Request from Filter Accept List Only, Allow + * Connect Request from Any + * - 0x02: Allow Scan Request from Any, Allow Connect Request from + * Filter Accept List Only + * - 0x03: Allow Scan Request from Filter Accept List Only, Allow + * Connect Request from Filter Accept List Only + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_advertising_parameters( uint16_t Advertising_Interval_Min, + uint16_t Advertising_Interval_Max, + uint8_t Advertising_Type, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Advertising_Channel_Map, + uint8_t Advertising_Filter_Policy ); + +/** + * @brief HCI_LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER + * The LE_Read_Advertising_Physical_Channel_Tx_Power command is used by the + * Host to read the transmit power level used for LE advertising physical + * channel packets. + * See Core Specification [Vol 4, Part E, 7.8.6]. + * + * @param[out] Transmit_Power_Level Size: 1 Octet (signed integer) + * Units: dBm + * Accuracy: +/- 4 dBm + * Values: + * - -20 ... 10 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_advertising_physical_channel_tx_power( uint8_t* Transmit_Power_Level ); + +/** + * @brief HCI_LE_SET_ADVERTISING_DATA + * The LE_Set_Advertising_Data command is used to set the data used in + * advertising packets that have a data field. + * Only the significant part of the Advertising_Data is transmitted in the + * advertising packets, as defined in [Vol 3] Part C, Section 11., + * See Core Specification [Vol 4, Part E, 7.8.7]. + * + * @param Advertising_Data_Length The number of significant octets in the + * following data field + * @param Advertising_Data 31 octets of data formatted as defined in [Vol 3] + * Part C, Section 11. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_advertising_data( uint8_t Advertising_Data_Length, + const uint8_t* Advertising_Data ); + +/** + * @brief HCI_LE_SET_SCAN_RESPONSE_DATA + * This command is used to provide data used in Scanning Packets that have a + * data field. + * Only the significant part of the Scan_Response_Data is transmitted in the + * Scanning Packets, as defined in [Vol 3] Part C, Section 11. + * See Core Specification [Vol 4, Part E, 7.8.8]. + * + * @param Scan_Response_Data_Length The number of significant octets in the + * following data field + * @param Scan_Response_Data 31 octets of data formatted as defined in [Vol 3] + * Part C, Section 11. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_scan_response_data( uint8_t Scan_Response_Data_Length, + const uint8_t* Scan_Response_Data ); + +/** + * @brief HCI_LE_SET_ADVERTISING_ENABLE + * The LE_Set_Advertising_Enable command is used to request the Controller to + * start or stop advertising. The Controller manages the timing of + * advertisements as per the advertising parameters given in the + * LE_Set_Advertising_Parameters command. + * The Controller shall continue advertising until the Host issues an + * LE_Set_Advertising_Enable command with Advertising_Enable set to 0x00 + * (Advertising is disabled) or until a connection is created or until the + * Advertising is timed out due to high duty cycle Directed Advertising. In + * these cases, advertising is then disabled. + * See Core Specification [Vol 4, Part E, 7.8.9]. + * + * @param Advertising_Enable Enable/disable advertising. + * Values: + * - 0x00: Advertising is disabled + * - 0x01: Advertising is enabled + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_advertising_enable( uint8_t Advertising_Enable ); + +/** + * @brief HCI_LE_SET_SCAN_PARAMETERS + * The LE_Set_Scan_Parameters command is used to set the scan parameters. + * The LE_Scan_Type parameter controls the type of scan to perform. + * The LE_Scan_Interval and LE_Scan_Window parameters are recommendations from + * the Host on how long (LE_Scan_Window) and how frequently (LE_Scan_Interval) + * the Controller should scan (See [Vol 6] Part B, Section 4.4.3). The + * LE_Scan_Window parameter shall always be set to a value smaller or equal to + * the value set for the LE_Scan_Interval parameter. If they are set to the + * same value scanning should be run continuously. + * The Own_Address_Type parameter determines the address used (Public or Random + * Device Address) when performing active scan. + * The Host shall not issue this command when scanning is enabled in the + * Controller; if it is the Command Disallowed error code shall be used. + * See Core Specification [Vol 4, Part E, 7.8.10]. + * + * @param LE_Scan_Type Passive or active scanning. With passive scanning, no + * scan request PDUs are sent. + * Values: + * - 0x00: Passive scanning + * - 0x01: Active scanning + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) + * @param Own_Address_Type Own address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Resolvable Private Address if available, otherwise Public + * Address + * - 0x03: Resolvable Private Address if available, otherwise Random + * Address + * @param Scanning_Filter_Policy The scanning filter policy determines how the + * scanner's Link Layer processes advertising and scan response PDUs. + * There is a choice of two primary filter policies: unfiltered and + * filtered. + * Unfiltered: the Link Layer processes all advertising and scan + * response PDUs (i.e., the Filter Accept List is not used). + * Filtered: the Link Layer processes advertising and scan response PDUs + * only from devices in the Filter Accept List. + * With extended scanning filter policies, a directed advertising PDU + * accepted by the primary filter policy shall nevertheless be ignored + * unless either the TargetA field is identical to the scanner's device + * address, or TargetA field is a resolvable private address. + * Values: + * - 0x00: Basic unfiltered scanning filter policy + * - 0x01: Basic filtered scanning filter policy + * - 0x02: Extended unfiltered scanning filter policy + * - 0x03: Extended filtered scanning filter policy + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_scan_parameters( uint8_t LE_Scan_Type, + uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Own_Address_Type, + uint8_t Scanning_Filter_Policy ); + +/** + * @brief HCI_LE_SET_SCAN_ENABLE + * The LE_Set_Scan_Enable command is used to start scanning. Scanning is used + * to discover advertising devices nearby. + * The Filter_Duplicates parameter controls whether the Link Layer shall filter + * duplicate advertising reports to the Host, or if the Link Layer should + * generate advertising reports for each packet received. + * See Core Specification [Vol 4, Part E, 7.8.11]. + * + * @param LE_Scan_Enable Enable/disable scan. + * Values: + * - 0x00: Scanning disabled + * - 0x01: Scanning enabled + * @param Filter_Duplicates Enable/disable duplicate filtering. + * Values: + * - 0x00: Duplicate filtering disabled + * - 0x01: Duplicate filtering enabled + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_scan_enable( uint8_t LE_Scan_Enable, + uint8_t Filter_Duplicates ); + +/** + * @brief HCI_LE_CREATE_CONNECTION + * The LE_Create_Connection command is used to create a Link Layer connection + * to a connectable advertiser. + * The LE_Scan_Interval and LE_Scan_Window parameters are recommendations from + * the Host on how long (LE_Scan_Window) and how frequently (LE_Scan_Interval) + * the Controller should scan. The LE_Scan_Window parameter shall be set to a + * value smaller or equal to the value set for the LE_Scan_Interval parameter. + * If both are set to the same value, scanning should run continuously. + * The Initiator_Filter_Policy is used to determine whether the Filter Accept + * List is used. If the Filter Accept List is not used, the Peer_Address_Type + * and the Peer_Address parameters specify the address type and address of the + * advertising device to connect to. + * The Link Layer shall set the address in the CONNECT_REQ packets to either + * the Public Device Address or the Random Device Addressed based on the + * Own_Address_Type parameter. + * The Conn_Interval_Min and Conn_Interval_Max parameters define the minimum + * and maximum allowed connection interval. The Conn_Interval_Min parameter + * shall not be greater than the Conn_Interval_Max parameter. + * The Conn_Latency parameter defines the maximum allowed connection latency. + * The Supervision_Timeout parameter defines the link supervision timeout for + * the connection. The Supervision_Timeout in milliseconds shall be larger than + * (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given + * in milliseconds. + * The Minimum_CE_Length and Maximum_CE_Length parameters are informative + * parameters providing the Controller with the expected minimum and maximum + * length of the connection events. The Minimum_CE_Length parameter shall be + * less than or equal to the Maximum_CE_Length parameter. + * The Host shall not issue this command when another LE_Create_Connection is + * pending in the Controller; if this does occur the Controller shall return + * the Command Disallowed error code shall be used. + * See Core Specification [Vol 4, Part E, 7.8.12]. + * + * @param LE_Scan_Interval This is defined as the time interval from when the + * Controller started its last LE scan until it begins the subsequent LE + * scan. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) + * @param LE_Scan_Window Amount of time for the duration of the LE scan. + * LE_Scan_Window shall be less than or equal to LE_Scan_Interval. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x4000 (10240.000 ms) + * @param Initiator_Filter_Policy Initiator filter policy. + * Values: + * - 0x00: Filter Accept List is not used to determine which advertiser + * to connect to + * - 0x01: Filter Accept List is used to determine which advertiser to + * connect to (Peer_Address_Type and Peer_Address are ignored) + * @param Peer_Address_Type Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Public Identity Address (corresponds to the Resolved Private + * Address) + * - 0x03: Random (static) Identity Address (corresponds to the Resolved + * Private Address) + * @param Peer_Address Public Device Address or Random Device Address of the + * device to be connected. + * @param Own_Address_Type Own address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Resolvable Private Address if available, otherwise Public + * Address + * - 0x03: Resolvable Private Address if available, otherwise Random + * Address + * @param Conn_Interval_Min Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Latency Maximum Peripheral latency for the connection in number + * of connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Supervision_Timeout Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + * @param Minimum_CE_Length Information parameter about the minimum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @param Maximum_CE_Length Information parameter about the maximum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @return Value indicating success or error code. + */ +tBleStatus hci_le_create_connection( uint16_t LE_Scan_Interval, + uint16_t LE_Scan_Window, + uint8_t Initiator_Filter_Policy, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Own_Address_Type, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length ); + +/** + * @brief HCI_LE_CREATE_CONNECTION_CANCEL + * The LE_Create_Connection_Cancel command is used to cancel the + * LE_Create_Connection command. This command shall only be issued after the + * LE_Create_Connection command has been issued, a Command Status event has + * been received for the LE Create Connection command and before the LE + * Connection Complete event. + * See Core Specification [Vol 4, Part E, 7.8.13]. + * + * @return Value indicating success or error code. + */ +tBleStatus hci_le_create_connection_cancel( void ); + +/** + * @brief HCI_LE_READ_FILTER_ACCEPT_LIST_SIZE + * This command is used to read the total number of Filter Accept List entries + * that can be stored in the Controller. + * See Core Specification [Vol 4, Part E, 7.8.14]. + * + * @param[out] Filter_Accept_List_Size Total number of Filter Accept List + * entries that can be stored in the Controller. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_filter_accept_list_size( uint8_t* Filter_Accept_List_Size ); + +/** + * @brief HCI_LE_CLEAR_FILTER_ACCEPT_LIST + * This command is used to clear the Filter Accept List stored in the + * Controller. + * This command can be used at any time except when: + * - the advertising filter policy uses the Filter Accept List and advertising + * is enabled. + * - the scanning filter policy uses the Filter Accept List and scanning is + * enabled. + * - the initiator filter policy uses the Filter Accept List and an + * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection command is + * pending. + * See Core Specification [Vol 4, Part E, 7.8.15]. + * + * @return Value indicating success or error code. + */ +tBleStatus hci_le_clear_filter_accept_list( void ); + +/** + * @brief HCI_LE_ADD_DEVICE_TO_FILTER_ACCEPT_LIST + * This command is used to add a single device to the Filter Accept List stored + * in the Controller. + * This command can be used at any time except when: + * - the advertising filter policy uses the Filter Accept List and advertising + * is enabled. + * - the scanning filter policy uses the Filter Accept List and scanning is + * enabled. + * - the initiator filter policy uses the Filter Accept List and an + * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection command is + * pending. + * See Core Specification [Vol 4, Part E, 7.8.16]. + * + * @param Address_Type Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0xFF: Devices sending anonymous advertisements + * @param Address Public Device Address or Random Device Address. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_add_device_to_filter_accept_list( uint8_t Address_Type, + const uint8_t* Address ); + +/** + * @brief HCI_LE_REMOVE_DEVICE_FROM_FILTER_ACCEPT_LIST + * This command is used to remove a single device from the Filter Accept List + * stored in the Controller. + * This command can be used at any time except when: + * - the advertising filter policy uses the Filter Accept List and advertising + * is enabled. + * - the scanning filter policy uses the Filter Accept List and scanning is + * enabled. + * - the initiator filter policy uses the Filter Accept List and an + * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection command is + * pending. + * See Core Specification [Vol 4, Part E, 7.8.17]. + * + * @param Address_Type Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0xFF: Devices sending anonymous advertisements + * @param Address Public Device Address or Random Device Address. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_remove_device_from_filter_accept_list( uint8_t Address_Type, + const uint8_t* Address ); + +/** + * @brief HCI_LE_CONNECTION_UPDATE + * The LE_Connection_Update command is used to change the Link Layer connection + * parameters of a connection. This command is supported only on Central side. + * The Conn_Interval_Min and Conn_Interval_Max parameters are used to define + * the minimum and maximum allowed connection interval. The Conn_Interval_Min + * parameter shall not be greater than the Conn_Interval_Max parameter. + * The Conn_Latency parameter shall define the maximum allowed connection + * latency. + * The Supervision_Timeout parameter shall define the link supervision timeout + * for the LE link. The Supervision_Timeout in milliseconds shall be larger + * than (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is + * given in milliseconds. + * The Minimum_CE_Length and Maximum_CE_Length are information parameters + * providing the Controller with a hint about the expected minimum and maximum + * length of the connection events. The Minimum_CE_Length shall be less than or + * equal to the Maximum_CE_Length. + * The actual parameter values selected by the Link Layer may be different from + * the parameter values provided by the Host through this command. + * See Core Specification [Vol 4, Part E, 7.8.18]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Conn_Interval_Min Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Latency Maximum Peripheral latency for the connection in number + * of connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Supervision_Timeout Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + * @param Minimum_CE_Length Information parameter about the minimum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @param Maximum_CE_Length Information parameter about the maximum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @return Value indicating success or error code. + */ +tBleStatus hci_le_connection_update( uint16_t Connection_Handle, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Conn_Latency, + uint16_t Supervision_Timeout, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length ); + +/** + * @brief HCI_LE_SET_HOST_CHANNEL_CLASSIFICATION + * The LE_Set_Host_Channel_Classification command allows the Host to specify a + * channel classification for data channels based on its "local information". + * This classification persists until overwritten with a subsequent + * LE_Set_Host_Channel_Classification command or until the Controller is reset + * using the Reset command (see [Vol 6] Part B, Section 4.5.8.1). + * If this command is used, the Host should send it within 10 seconds of + * knowing that the channel classification has changed. The interval between + * two successive commands sent shall be at least one second. + * This command shall only be used when the local device supports the Central + * role. + * See Core Specification [Vol 4, Part E, 7.8.19]. + * + * @param LE_Channel_Map This parameter contains 37 1-bit fields. + * The nth such field (in the range 0 to 36) contains the value for the + * link layer channel index n. + * Channel n is bad = 0. + * Channel n is unknown = 1. + * The most significant bits are reserved and shall be set to 0. + * At least one channel shall be marked as unknown. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_host_channel_classification( const uint8_t* LE_Channel_Map ); + +/** + * @brief HCI_LE_READ_CHANNEL_MAP + * The LE_Read_Channel_Map command returns the current Channel_Map for the + * specified Connection_Handle. The returned value indicates the state of the + * Channel_Map specified by the last transmitted or received Channel_Map (in a + * CONNECT_REQ or LL_CHANNEL_MAP_REQ message) for the specified + * Connection_Handle, regardless of whether the Central has received an + * acknowledgment. + * See Core Specification [Vol 4, Part E, 7.8.20]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param[out] LE_Channel_Map This parameter contains 37 1-bit fields. + * The nth such field (in the range 0 to 36) contains the value for the + * link layer channel index n. + * Channel n is unused = 0. + * Channel n is used = 1. + * The most significant bits are reserved and shall be set to 0. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_channel_map( uint16_t Connection_Handle, + uint8_t* LE_Channel_Map ); + +/** + * @brief HCI_LE_READ_REMOTE_FEATURES_PAGE_0 + * This command requests, from the remote device identified by the + * Connection_Handle, page 0 of the features used on the connection and the + * features supported by the remote device. + * This command may be issued on both the Central and Peripheral. + * See Core Specification [Vol 4, Part E, 7.8.21]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_remote_features_page_0( uint16_t Connection_Handle ); + +/** + * @brief HCI_LE_ENCRYPT + * The LE_Encrypt command is used to request the Controller to encrypt the + * Plaintext_Data in the command using the Key given in the command and returns + * the Encrypted_Data to the Host. The AES-128 bit block cypher is defined in + * NIST Publication FIPS-197 + * (http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf). + * See Core Specification [Vol 4, Part E, 7.8.22]. + * + * @param Key 128 bit key for the encryption of the data given in the command. + * @param Plaintext_Data 128 bit data block that is requested to be encrypted. + * @param[out] Encrypted_Data 128 bit encrypted data block. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_encrypt( const uint8_t* Key, + const uint8_t* Plaintext_Data, + uint8_t* Encrypted_Data ); + +/** + * @brief HCI_LE_RAND + * The LE_Rand command is used to request the Controller to generate 8 octets + * of random data to be sent to the Host. The Random_Number shall be generated + * according to [Vol 2] Part H, Section 2 if the LE Feature (LL Encryption) is + * supported. + * See Core Specification [Vol 4, Part E, 7.8.23]. + * + * @param[out] Random_Number Random Number + * @return Value indicating success or error code. + */ +tBleStatus hci_le_rand( uint8_t* Random_Number ); + +/** + * @brief HCI_LE_ENABLE_ENCRYPTION + * The LE_Enable_Encryption command is used to authenticate the given + * encryption key associated with the remote device specified by the connection + * handle, and once authenticated will encrypt the connection. The parameters + * are as defined in [Vol 3] Part H, Section 2.4.4. + * If the connection is already encrypted then the Controller shall pause + * connection encryption before attempting to authenticate the given encryption + * key, and then re-encrypt the connection. While encryption is paused no user + * data shall be transmitted. + * On an authentication failure, the connection shall be automatically + * disconnected by the Link Layer. If this command succeeds, then the + * connection shall be encrypted. + * This command shall only be used when the local device's role is Central. + * See Core Specification [Vol 4, Part E, 7.8.24]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Random_Number 64 bit random number. + * @param Encrypted_Diversifier 16 bit encrypted diversifier. + * @param Long_Term_Key 128 bit long term key. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_enable_encryption( uint16_t Connection_Handle, + const uint8_t* Random_Number, + uint16_t Encrypted_Diversifier, + const uint8_t* Long_Term_Key ); + +/** + * @brief HCI_LE_LONG_TERM_KEY_REQUEST_REPLY + * The LE_Long_Term_Key_Request_Reply command is used to reply to an LE Long + * Term Key Request event from the Controller, and specifies the Long_Term_Key + * parameter that shall be used for this Connection_Handle. The Long_Term_Key + * is used as defined in [Vol 6] Part B, Section 5.1.3. + * See Core Specification [Vol 4, Part E, 7.8.25]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Long_Term_Key 128 bit long term key. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_long_term_key_request_reply( uint16_t Connection_Handle, + const uint8_t* Long_Term_Key ); + +/** + * @brief HCI_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY + * The LE_Long_Term_Key_Request_Negative_Reply command is used to reply to an + * LE Long Term Key Request event from the Controller if the Host cannot + * provide a Long Term Key for this Connection_Handle. + * See Core Specification [Vol 4, Part E, 7.8.26]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @return Value indicating success or error code. + */ +tBleStatus hci_le_long_term_key_request_negative_reply( uint16_t Connection_Handle ); + +/** + * @brief HCI_LE_READ_SUPPORTED_STATES + * The LE_Read_Supported_States command reads the states and state combinations + * that the link layer supports. See [Vol 6] Part B, Section 1.1.1. + * LE_States is an 8-octet bit field. If a bit is set to 1 then this state or + * state combination is supported by the Controller. Multiple bits in LE_States + * may be set to 1 to indicate support for multiple state and state + * combinations. + * All the Advertising type with the Initiate State combinations shall be set + * only if the corresponding Advertising types and Central role combination are + * set. + * All the Scanning types and the Initiate State combinations shall be set only + * if the corresponding Scanning types and Central role combination are set. + * See Core Specification [Vol 4, Part E, 7.8.27]. + * + * @param[out] LE_States State or state combination is supported by the + * Controller. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_supported_states( uint8_t* LE_States ); + +/** + * @brief HCI_LE_RECEIVER_TEST + * This command is used to start a test where the DUT receives test reference + * packets at a fixed interval. The tester generates the test reference + * packets. + * See Core Specification [Vol 4, Part E, 7.8.28]. + * + * @param RX_Frequency N = (F - 2402) / 2 + * Frequency Range : 2402 MHz to 2480 MHz + * Values: + * - 0x00 ... 0x27 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_receiver_test( uint8_t RX_Frequency ); + +/** + * @brief HCI_LE_TRANSMITTER_TEST + * This command is used to start a test where the DUT generates test reference + * packets at a fixed interval. + * See Core Specification [Vol 4, Part E, 7.8.29]. + * + * @param TX_Frequency N = (F - 2402) / 2 + * Frequency Range : 2402 MHz to 2480 MHz + * Values: + * - 0x00 ... 0x27 + * @param Length_Of_Test_Data Length in bytes of payload data in each packet. + * Values: + * - 0x00 ... 0x25: for BO variant + * - 0x00 ... 0xFF: otherwise + * @param Packet_Payload Type of packet payload. + * Values: + * - 0x00: Pseudo-Random bit sequence 9 + * - 0x01: Pattern of alternating bits '11110000' + * - 0x02: Pattern of alternating bits '10101010' + * - 0x03: Pseudo-Random bit sequence 15 + * - 0x04: Pattern of All '1' bits + * - 0x05: Pattern of All '0' bits + * - 0x06: Pattern of alternating bits '00001111' + * - 0x07: Pattern of alternating bits '0101' + * @return Value indicating success or error code. + */ +tBleStatus hci_le_transmitter_test( uint8_t TX_Frequency, + uint8_t Length_Of_Test_Data, + uint8_t Packet_Payload ); + +/** + * @brief HCI_LE_TEST_END + * This command is used to stop any test which is in progress. The + * Number_Of_Packets for a transmitter test is reported as 0x0000. The + * Number_Of_Packets is an unsigned number and contains the number of received + * packets. + * See Core Specification [Vol 4, Part E, 7.8.30]. + * + * @param[out] Number_Of_Packets Number of packets received + * @return Value indicating success or error code. + */ +tBleStatus hci_le_test_end( uint16_t* Number_Of_Packets ); + +/** + * @brief HCI_LE_SET_DATA_LENGTH + * The LE_Set_Data_Length command allows the Host to suggest maximum + * transmission packet size and maximum packet transmission time + * (connMaxTxOctets and connMaxTxTime - see Core Specification [Vol 6, Part B, + * 4.5.10]) to be used for a given connection. The Controller may use smaller + * or larger values based on local information. + * See Core Specification [Vol 4, Part E, 7.8.33]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param TxOctets Preferred maximum number of payload octets that the local + * Controller should include in a single Link Layer packet on this + * connection. + * Values: + * - 0x001B ... 0x00FB + * @param TxTime Preferred maximum number of microseconds that the local + * Controller should use to transmit a single Link Layer packet on this + * connection. + * Values: + * - 0x0148 ... 0x4290 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_data_length( uint16_t Connection_Handle, + uint16_t TxOctets, + uint16_t TxTime ); + +/** + * @brief HCI_LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH + * This command allows the Host to read the Host's suggested values + * (SuggestedMaxTxOctets and SuggestedMaxTxTime) for the Controller's maximum + * transmitted number of payload octets and maximum packet transmission time to + * be used for new connections. + * See Core Specification [Vol 4, Part E, 7.8.34]. + * + * @param[out] SuggestedMaxTxOctets The Host's suggested value for the + * Controller's maximum transmitted number of payload octets to be used + * for new connections. + * Values: + * - 0x001B ... 0x00FB + * @param[out] SuggestedMaxTxTime The Host's suggested value for the + * Controller's maximum packet transmission time to be used for new + * connections. + * Values: + * - 0x0148 ... 0x4290 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_suggested_default_data_length( uint16_t* SuggestedMaxTxOctets, + uint16_t* SuggestedMaxTxTime ); + +/** + * @brief HCI_LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH + * This command allows the Host to specify its suggested values for the + * Controller's maximum transmission number of payload octets and maximum + * packet transmission time to be used for new connections. The Controller may + * use smaller or larger values for connInitialMaxTxOctets and + * connInitialMaxTxTime based on local information. + * See Core Specification [Vol 4, Part E, 7.8.35]. + * + * @param SuggestedMaxTxOctets The Host's suggested value for the Controller's + * maximum transmitted number of payload octets to be used for new + * connections. + * Values: + * - 0x001B ... 0x00FB + * @param SuggestedMaxTxTime The Host's suggested value for the Controller's + * maximum packet transmission time to be used for new connections. + * Values: + * - 0x0148 ... 0x4290 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_write_suggested_default_data_length( uint16_t SuggestedMaxTxOctets, + uint16_t SuggestedMaxTxTime ); + +/** + * @brief HCI_LE_READ_LOCAL_P256_PUBLIC_KEY + * This command is used to return the local P-256 public key from the + * Controller. The Controller shall generate a new P-256 public/private key + * pair upon receipt of this command. + * See Core Specification [Vol 4, Part E, 7.8.36]. + * + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_local_p256_public_key( void ); + +/** + * @brief HCI_LE_GENERATE_DHKEY + * This command is used to initiate generation of a Diffie-Hellman key in the + * Controller for use over the LE transport. This command takes the remote + * P-256 public key as input. The Diffie-Hellman key generation uses the + * private key generated by LE_Read_Local_P256_Public_Key command. + * See Core Specification [Vol 4, Part E, 7.8.37]. + * + * @param Remote_P256_Public_Key The remote P-256 public key in X, Y format: + * Octets 31-0: X coordinate + * Octets 63-32: Y coordinate + * Little Endian Format + * @return Value indicating success or error code. + */ +tBleStatus hci_le_generate_dhkey( const uint8_t* Remote_P256_Public_Key ); + +/** + * @brief HCI_LE_ADD_DEVICE_TO_RESOLVING_LIST + * This command is used to add one device to the list of address translations + * used to resolve Resolvable Private Addresses in the Controller. + * This command cannot be used when address translation is enabled in the + * Controller and: + * - Advertising is enabled + * - Scanning is enabled + * - Create connection command is outstanding + * This command can be used at any time when address translation is disabled in + * the Controller. + * When a Controller cannot add a device to the resolving list because the list + * is full, it shall respond with error code 0x07 (Memory Capacity Exceeded). + * See Core Specification [Vol 4, Part E, 7.8.38]. + * + * @param Peer_Identity_Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @param Peer_Identity_Address Public or Random (static) Identity Address of + * the peer device + * @param Peer_IRK IRK of the peer device + * @param Local_IRK IRK of the local device + * @return Value indicating success or error code. + */ +tBleStatus hci_le_add_device_to_resolving_list( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address, + const uint8_t* Peer_IRK, + const uint8_t* Local_IRK ); + +/** + * @brief HCI_LE_REMOVE_DEVICE_FROM_RESOLVING_LIST + * This command is used to remove one device from the list of address + * translations used to resolve Resolvable Private Addresses in the controller. + * This command cannot be used when address translation is enabled in the + * Controller and: + * - Advertising is enabled + * - Scanning is enabled + * - Create connection command is outstanding + * This command can be used at any time when address translation is disabled in + * the Controller. + * When a Controller cannot remove a device from the resolving list because it + * is not found, it shall respond with error code 0x02 (Unknown Connection + * Identifier). + * See Core Specification [Vol 4, Part E, 7.8.39]. + * + * @param Peer_Identity_Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @param Peer_Identity_Address Public or Random (static) Identity Address of + * the peer device + * @return Value indicating success or error code. + */ +tBleStatus hci_le_remove_device_from_resolving_list( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address ); + +/** + * @brief HCI_LE_CLEAR_RESOLVING_LIST + * This command is used to remove all devices from the list of address + * translations used to resolve Resolvable Private Addresses in the Controller. + * This command cannot be used when address translation is enabled in the + * Controller and: + * - Advertising is enabled + * - Scanning is enabled + * - Create connection command is outstanding + * This command can be used at any time when address translation is disabled in + * the Controller. + * See Core Specification [Vol 4, Part E, 7.8.40]. + * + * @return Value indicating success or error code. + */ +tBleStatus hci_le_clear_resolving_list( void ); + +/** + * @brief HCI_LE_READ_RESOLVING_LIST_SIZE + * This command is used to read the total number of address translation entries + * in the resolving list that can be stored in the Controller. + * See Core Specification [Vol 4, Part E, 7.8.41]. + * + * @param[out] Resolving_List_Size Number of address translation entries in the + * resolving list + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_resolving_list_size( uint8_t* Resolving_List_Size ); + +/** + * @brief HCI_LE_READ_PEER_RESOLVABLE_ADDRESS + * This command is used to get the current peer Resolvable Private Address + * being used for the corresponding peer Public and Random (static) Identity + * Address. The peer's resolvable address being used may change after the + * command is called. + * This command can be used at any time. + * When a Controller cannot find a Resolvable Private Address associated with + * the Peer Identity Address, it shall respond with error code 0x02 (Unknown + * Connection Identifier). + * See Core Specification [Vol 4, Part E, 7.8.42]. + * + * @param Peer_Identity_Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @param Peer_Identity_Address Public or Random (static) Identity Address of + * the peer device + * @param[out] Peer_Resolvable_Address Resolvable Private Address being used by + * the peer device + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_peer_resolvable_address( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address, + uint8_t* Peer_Resolvable_Address ); + +/** + * @brief HCI_LE_READ_LOCAL_RESOLVABLE_ADDRESS + * This command is used to get the current local Resolvable Private Address + * being used for the corresponding peer Identity Address. The local's + * resolvable address being used may change after the command is called. + * This command can be used at any time. + * When a Controller cannot find a Resolvable Private Address associated with + * the Peer Identity Address, it shall respond with error code 0x02 (Unknown + * Connection Identifier). + * See Core Specification [Vol 4, Part E, 7.8.43]. + * + * @param Peer_Identity_Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @param Peer_Identity_Address Public or Random (static) Identity Address of + * the peer device + * @param[out] Local_Resolvable_Address Resolvable Private Address being used + * by the local device + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_local_resolvable_address( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address, + uint8_t* Local_Resolvable_Address ); + +/** + * @brief HCI_LE_SET_ADDRESS_RESOLUTION_ENABLE + * This command is used to enable resolution of Resolvable Private Addresses in + * the Controller. This causes the Controller to use the resolving list + * whenever the Controller receives a local or peer Resolvable Private Address. + * This command can be used at any time except when: + * - Advertising is enabled + * - Scanning is enabled + * - Create connection command is outstanding + * See Core Specification [Vol 4, Part E, 7.8.44]. + * + * @param Address_Resolution_Enable Enable/disable address resolution in the + * controller. + * 0x00: Address Resolution in controller disabled (default), + * 0x01: Address Resolution in controller enabled + * Values: + * - 0x00: Address Resolution in controller disabled (default) + * - 0x01: Address Resolution in controller enabled + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_address_resolution_enable( uint8_t Address_Resolution_Enable ); + +/** + * @brief HCI_LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT + * This command sets the length of time the Controller uses a Resolvable + * Private Address before a new Resolvable Private Address is generated and + * starts being used. This timeout applies to all resolvable private addresses + * generated by the Controller. + * See Core Specification [Vol 4, Part E, 7.8.45]. + * + * @param RPA_Timeout RPA_Timeout in seconds. + * Time range: 1 s to 1 hour. + * Default: 0x0384 (900 s or 15 minutes) + * Values: + * - 0x0001 ... 0x0E10 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_resolvable_private_address_timeout( uint16_t RPA_Timeout ); + +/** + * @brief HCI_LE_READ_MAXIMUM_DATA_LENGTH + * This command allows the Host to read the Controller's maximum supported + * payload octets and packet duration times for transmission and reception + * (supportedMaxTxOctets and supportedMaxTxTime, supportedMaxRxOctets, and + * supportedMaxRxTime. + * See Core Specification [Vol 4, Part E, 7.8.46]. + * + * @param[out] supportedMaxTxOctets Maximum number of payload octets that the + * local Controller supports for transmission of a single Link Layer + * packet on a data connection. + * Values: + * - 0x001B ... 0x00FB + * @param[out] supportedMaxTxTime Maximum time, in microseconds, that the local + * Controller supports for transmission of a single Link Layer packet on + * a data connection. + * Values: + * - 0x0148 ... 0x4290 + * @param[out] supportedMaxRxOctets Maximum number of payload octets that the + * local Controller supports for reception of a single Link Layer packet + * on a data connection. + * Values: + * - 0x001B ... 0x00FB + * @param[out] supportedMaxRxTime Maximum time, in microseconds, that the local + * Controller supports for reception of a single Link Layer packet on a + * data connection. + * Values: + * - 0x0148 ... 0x4290 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_maximum_data_length( uint16_t* supportedMaxTxOctets, + uint16_t* supportedMaxTxTime, + uint16_t* supportedMaxRxOctets, + uint16_t* supportedMaxRxTime ); + +/** + * @brief HCI_LE_READ_PHY + * This command is used to read the current transmitter PHY and receiver PHY on + * the connection identified by the Connection_Handle. + * See Core Specification [Vol 4, Part E, 7.8.47]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param[out] TX_PHY Transmitter PHY in use. + * Values: + * - 0x01: The transmitter PHY for the connection is LE 1M + * - 0x02: The transmitter PHY for the connection is LE 2M + * @param[out] RX_PHY Receiver PHY in use. + * Values: + * - 0x01: The receiver PHY for the connection is LE 1M + * - 0x02: The receiver PHY for the connection is LE 2M + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_phy( uint16_t Connection_Handle, + uint8_t* TX_PHY, + uint8_t* RX_PHY ); + +/** + * @brief HCI_LE_SET_DEFAULT_PHY + * This command allows the Host to specify its preferred values for the + * transmitter PHY and receiver PHY to be used for all subsequent connections + * over the LE transport. + * The ALL_PHYS parameter is a bit field that allows the Host to specify, for + * each + * direction, whether it has no preference among the PHYs that the Controller + * supports in a given direction or whether it has specified particular PHYs + * that it prefers in the TX_PHYS or RX_PHYS parameter. + * The TX_PHYS parameter is a bit field that indicates the transmitter PHYs + * that the Host prefers the Controller to use. If the ALL_PHYS parameter + * specifies that the Host has no preference, the TX_PHYS parameter is ignored; + * otherwise at least one bit shall be set to 1. + * The RX_PHYS parameter is a bit field that indicates the receiver PHYs that + * the Host prefers the Controller to use. If the ALL_PHYS parameter specifies + * that the Host has no preference, the RX_PHYS parameter is ignored; otherwise + * at least one bit shall be set to 1. + * See Core Specification [Vol 4, Part E, 7.8.48]. + * + * @param ALL_PHYS Preferences for TX PHY and RX PHY. + * Flags: + * - 0x01: The Host has no preference among the transmitter PHYs + * supported by the Controller + * - 0x02: The Host has no preference among the receiver PHYs supported + * by the Controller + * @param TX_PHYS Preferences for TX PHY. + * Flags: + * - 0x01: The Host prefers to use the LE 1M transmitter PHY (possibly + * among others) + * - 0x02: The Host prefers to use the LE 2M transmitter PHY (possibly + * among others) + * @param RX_PHYS Preferences for RX PHY. + * Flags: + * - 0x01: The Host prefers to use the LE 1M receiver PHY (possibly + * among others) + * - 0x02: The Host prefers to use the LE 2M receiver PHY (possibly + * among others) + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_default_phy( uint8_t ALL_PHYS, + uint8_t TX_PHYS, + uint8_t RX_PHYS ); + +/** + * @brief HCI_LE_SET_PHY + * This command is used to set the PHY preferences for the connection + * identified by the Connection_Handle. The Controller might not be able to + * make the change (e.g. because the peer does not support the requested PHY) + * or may decide that the current PHY is preferable. + * The ALL_PHYS parameter is a bit field that allows the Host to specify, for + * each direction, whether it has no preference among the PHYs that the + * Controller supports in a given direction or whether it has specified + * particular PHYs that it prefers in the TX_PHYS or RX_PHYS parameter. + * The TX_PHYS parameter is a bit field that indicates the transmitter PHYs + * that the Host prefers the Controller to use. If the ALL_PHYS parameter + * specifies that the Host has no preference, the TX_PHYS parameter is ignored; + * otherwise at least one bit shall be set to 1. + * The RX_PHYS parameter is a bit field that indicates the receiver PHYs that + * the Host prefers the Controller to use. If the ALL_PHYS parameter specifies + * that the Host has no preference, the RX_PHYS parameter is ignored; otherwise + * at least one bit shall be set to 1. + * If, for at least one direction, the Host has specified a preference and the + * current PHY is not one of those preferred, the Controller shall request a + * change. Otherwise the Controller may, but need not, request a change. + * The PHY preferences provided by the LE Set PHY command override those + * provided via the LE Set Default PHY command (Section 7.8.48) or any + * preferences previously set using the LE Set PHY command on the same + * connection. + * The PHY_options parameter is a bit field that allows the Host to specify + * options for PHYs. The default value for a new connection shall be all zero + * bits. The Controller may override any preferred coding for transmitting on + * the LE Coded PHY. + * The Host may specify a preferred coding even if it prefers not to use the LE + * Coded transmitter PHY since the Controller may override the PHY preference. + * See Core Specification [Vol 4, Part E, 7.8.49]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param ALL_PHYS Preferences for TX PHY and RX PHY. + * Flags: + * - 0x01: The Host has no preference among the transmitter PHYs + * supported by the Controller + * - 0x02: The Host has no preference among the receiver PHYs supported + * by the Controller + * @param TX_PHYS Preferences for TX PHY. + * Flags: + * - 0x01: The Host prefers to use the LE 1M transmitter PHY (possibly + * among others) + * - 0x02: The Host prefers to use the LE 2M transmitter PHY (possibly + * among others) + * @param RX_PHYS Preferences for RX PHY. + * Flags: + * - 0x01: The Host prefers to use the LE 1M receiver PHY (possibly + * among others) + * - 0x02: The Host prefers to use the LE 2M receiver PHY (possibly + * among others) + * @param PHY_options Not used. + * Values: + * - 0x0000: the Host has no preferred coding when transmitting on the + * LE Coded PHY + * - 0x0001: the Host prefers that S=2 coding be used when transmitting + * on the LE Coded PHY + * - 0x0002: the Host prefers that S=8 coding be used when transmitting + * on the LE Coded PHY + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_phy( uint16_t Connection_Handle, + uint8_t ALL_PHYS, + uint8_t TX_PHYS, + uint8_t RX_PHYS, + uint16_t PHY_options ); + +/** + * @brief HCI_LE_RECEIVER_TEST_V2 + * This command is used to start a test where the DUT receives test reference + * packets at a fixed interval. The tester generates the test reference + * packets. + * See Core Specification [Vol 4, Part E, 7.8.28]. + * + * @param RX_Frequency N = (F - 2402) / 2 + * Frequency Range : 2402 MHz to 2480 MHz + * Values: + * - 0x00 ... 0x27 + * @param PHY PHY to be used by the receiver. + * Values: + * - 0x01: Receiver set to use the LE 1M PHY + * - 0x02: Receiver set to use the LE 2M PHY + * @param Modulation_Index Modulation index capability of the transmitter + * Values: + * - 0x00: Assume transmitter will have a standard modulation index + * - 0x01: Assume transmitter will have a stable modulation index + * @return Value indicating success or error code. + */ +tBleStatus hci_le_receiver_test_v2( uint8_t RX_Frequency, + uint8_t PHY, + uint8_t Modulation_Index ); + +/** + * @brief HCI_LE_TRANSMITTER_TEST_V2 + * This command is used to start a test where the DUT generates test reference + * packets at a fixed interval. + * See Core Specification [Vol 4, Part E, 7.8.29]. + * + * @param TX_Frequency N = (F - 2402) / 2 + * Frequency Range : 2402 MHz to 2480 MHz + * Values: + * - 0x00 ... 0x27 + * @param Length_Of_Test_Data Length in bytes of payload data in each packet. + * Values: + * - 0x00 ... 0x25: for BO variant + * - 0x00 ... 0xFF: otherwise + * @param Packet_Payload Type of packet payload. + * Values: + * - 0x00: Pseudo-Random bit sequence 9 + * - 0x01: Pattern of alternating bits '11110000' + * - 0x02: Pattern of alternating bits '10101010' + * - 0x03: Pseudo-Random bit sequence 15 + * - 0x04: Pattern of All '1' bits + * - 0x05: Pattern of All '0' bits + * - 0x06: Pattern of alternating bits '00001111' + * - 0x07: Pattern of alternating bits '0101' + * @param PHY PHY to use for test packet + * Values: + * - 0x01: Transmitter set to use the LE 1M PHY + * - 0x02: Transmitter set to use the LE 2M PHY + * @return Value indicating success or error code. + */ +tBleStatus hci_le_transmitter_test_v2( uint8_t TX_Frequency, + uint8_t Length_Of_Test_Data, + uint8_t Packet_Payload, + uint8_t PHY ); + +/** + * @brief HCI_LE_SET_ADVERTISING_SET_RANDOM_ADDRESS + * This command is used by the Host to set the random device address specified + * by the Random_Address parameter. + * See Core Specification [Vol 4, Part E, 7.8.52]. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Random_Address Random Device Address. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_advertising_set_random_address( uint8_t Advertising_Handle, + const uint8_t* Random_Address ); + +/** + * @brief HCI_LE_SET_EXTENDED_ADVERTISING_PARAMETERS + * This command is used by the Host to set the extended advertising parameters. + * See Core Specification [Vol 4, Part E, 7.8.53]. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Adv_Event_Properties Type of advertising event. + * Flags: + * - 0x0001: Connectable advertising + * - 0x0002: Scannable advertising + * - 0x0004: Directed advertising + * - 0x0008: High Duty Cycle Directed Connectable advertising + * - 0x0010: Use legacy advertising PDUs + * - 0x0020: Anonymous advertising + * - 0x0040: Include TxPower in at least one advertising PDU + * @param Primary_Adv_Interval_Min Minimum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x000020 (20.000 ms) ... 0xFFFFFF (10485759.375 ms) + * @param Primary_Adv_Interval_Max Maximum advertising interval. + * Time = N * 0.625 ms. + * Values: + * - 0x000020 (20.000 ms) ... 0xFFFFFF (10485759.375 ms) + * @param Primary_Adv_Channel_Map Advertising channel map. + * Flags: + * - 0x01: Channel 37 shall be used + * - 0x02: Channel 38 shall be used + * - 0x04: Channel 39 shall be used + * @param Own_Address_Type Own address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Resolvable Private Address if available, otherwise Public + * Address + * - 0x03: Resolvable Private Address if available, otherwise Random + * Address + * @param Peer_Address_Type Address type of the peer device. + * Values: + * - 0x00: Public Device Address or Public Identity Address + * - 0x01: Random Device Address or Random (static) Identity Address + * @param Peer_Address Public Device Address, Random Device Address, Public + * Identity Address, or Random (static) Identity Address of the device + * to be connected. + * @param Adv_Filter_Policy Advertising filter policy + * Values: + * - 0x00: Process scan and connection requests from all devices (i.e., + * the Filter Accept List is not in use) + * - 0x01: Process connection requests from all devices and scan + * requests only from devices that are in the Filter Accept List. + * - 0x02: Process scan requests from all devices and connection + * requests only from devices that are in the Filter Accept List. + * - 0x03: Process scan and connection requests only from devices in the + * Filter Accept List. + * @param Adv_TX_Power Advertising TX power. Units: dBm. + * Values: + * - 127: Host has no preference + * - -127 ... 20 + * @param Primary_Adv_PHY Primary advertising PHY. + * Values: + * - 0x01: Primary advertisement PHY is LE 1M + * @param Secondary_Adv_Max_Skip Secondary advertising maximum skip. + * Values: + * - 0x00: AUX_ADV_IND shall be sent prior to the next advertising event + * - 0x01 ... 0xFF: Maximum advertising events the Controller can skip + * before sending the AUX_ADV_IND packets on the secondary advertising + * physical channel + * @param Secondary_Adv_PHY Secondary advertising PHY. + * Values: + * - 0x01: Secondary advertisement PHY is LE 1M + * - 0x02: Secondary advertisement PHY is LE 2M + * @param Adv_SID Value of the Advertising SID subfield in the ADI field of the + * PDU. + * Values: + * - 0x00 ... 0x0F + * @param Scan_Req_Notification_Enable Scan request notifications. + * Values: + * - 0x00: Scan request notifications disabled + * - 0x01: Scan request notifications enabled + * @param[out] Selected_TX_Power Power level selected by the Controller. Units: + * dBm. + * Values: + * - -127 ... 20 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_extended_advertising_parameters( uint8_t Advertising_Handle, + uint16_t Adv_Event_Properties, + const uint8_t* Primary_Adv_Interval_Min, + const uint8_t* Primary_Adv_Interval_Max, + uint8_t Primary_Adv_Channel_Map, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Adv_Filter_Policy, + uint8_t Adv_TX_Power, + uint8_t Primary_Adv_PHY, + uint8_t Secondary_Adv_Max_Skip, + uint8_t Secondary_Adv_PHY, + uint8_t Adv_SID, + uint8_t Scan_Req_Notification_Enable, + uint8_t* Selected_TX_Power ); + +/** + * @brief HCI_LE_SET_EXTENDED_ADVERTISING_DATA + * This command is used to set the data used in extended advertising PDUs that + * have a data field. + * See Core Specification [Vol 4, Part E, 7.8.54]. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Operation Advertising operation. + * Values: + * - 0x00: Intermediate fragment of fragmented extended advertising data + * - 0x01: First fragment of fragmented extended advertising data + * - 0x02: Last fragment of fragmented extended advertising data + * - 0x03: Complete extended advertising data + * - 0x04: Unchanged data (just update the Advertising DID) + * @param Fragment_Preference Fragment preference. + * Values: + * - 0x00: The Controller may fragment all data + * - 0x01: The Controller should not fragment or should minimize + * fragmentation of data + * @param Advertising_Data_Length Length of Advertising_Data in octets + * @param Advertising_Data Data formatted as defined in Core Specification [Vol + * 3, Part C, 11]. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_extended_advertising_data( uint8_t Advertising_Handle, + uint8_t Operation, + uint8_t Fragment_Preference, + uint8_t Advertising_Data_Length, + const uint8_t* Advertising_Data ); + +/** + * @brief HCI_LE_SET_EXTENDED_SCAN_RESPONSE_DATA + * This command is used to provide scan response data used in scanning response + * PDUs during extended advertising. + * See Core Specification [Vol 4, Part E, 7.8.55]. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @param Operation Scan response operation. + * Values: + * - 0x00: Intermediate fragment of fragmented scan response data + * - 0x01: First fragment of fragmented scan response data + * - 0x02: Last fragment of fragmented scan response data + * - 0x03: Complete scan response data + * @param Fragment_Preference Fragment preference. + * Values: + * - 0x00: The Controller may fragment all data + * - 0x01: The Controller should not fragment or should minimize + * fragmentation of data + * @param Scan_Response_Data_Length Length of Scan_Response_Data in octets + * @param Scan_Response_Data Data formatted as defined in Core Specification + * [Vol 3, Part C, 11]. + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_extended_scan_response_data( uint8_t Advertising_Handle, + uint8_t Operation, + uint8_t Fragment_Preference, + uint8_t Scan_Response_Data_Length, + const uint8_t* Scan_Response_Data ); + +/** + * @brief HCI_LE_SET_EXTENDED_ADVERTISING_ENABLE + * This command is used to request the Controller to enable or disable one or + * more advertising sets using the advertising sets identified by the + * Advertising_Handle[i] parameter. + * See Core Specification [Vol 4, Part E, 7.8.56]. + * + * @param Enable Enable/disable advertising. + * Values: + * - 0x00: Advertising is disabled + * - 0x01: Advertising is enabled + * @param Num_Sets Number of advertising sets. + * Values: + * - 0x00: Disable all advertising sets + * - 0x01 ... 0x3F: Number of advertising sets to enable or disable + * @param Adv_Set See @ref Adv_Set_t + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_extended_advertising_enable( uint8_t Enable, + uint8_t Num_Sets, + const Adv_Set_t* Adv_Set ); + +/** + * @brief HCI_LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH + * This command is used to read the maximum length of data supported by the + * Controller for use as advertisement data or scan response data in an + * extended advertising event. + * See Core Specification [Vol 4, Part E, 7.8.57]. + * + * @param[out] Max_Advertising_Data_Length Maximum supported advertising data + * length. + * Values: + * - 0x001F ... 0x0672 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_maximum_advertising_data_length( uint16_t* Max_Advertising_Data_Length ); + +/** + * @brief HCI_LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS + * This command is used to read the maximum number of advertising sets + * supported by the Controller at the same time during extended advertising. + * See Core Specification [Vol 4, Part E, 7.8.58]. + * + * @param[out] Num_Supported_Advertising_Sets Number of advertising sets + * supported at the same time. + * Values: + * - 0x01 ... 0xF0 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_number_of_supported_advertising_sets( uint8_t* Num_Supported_Advertising_Sets ); + +/** + * @brief HCI_LE_REMOVE_ADVERTISING_SET + * This command is used to remove an advertising set from the Controller. + * See Core Specification [Vol 4, Part E, 7.8.59]. + * + * @param Advertising_Handle Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + * @return Value indicating success or error code. + */ +tBleStatus hci_le_remove_advertising_set( uint8_t Advertising_Handle ); + +/** + * @brief HCI_LE_CLEAR_ADVERTISING_SETS + * This command is used to remove all existing advertising sets from the + * Controller. + * See Core Specification [Vol 4, Part E, 7.8.60]. + * + * @return Value indicating success or error code. + */ +tBleStatus hci_le_clear_advertising_sets( void ); + +/** + * @brief HCI_LE_SET_EXTENDED_SCAN_PARAMETERS + * This command is used to set the extended scan parameters to be used on the + * advertising physical channels. + * See Core Specification [Vol 4, Part E, 7.8.64]. + * + * @param Own_Address_Type Own address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Resolvable Private Address if available, otherwise Public + * Address + * - 0x03: Resolvable Private Address if available, otherwise Random + * Address + * @param Scanning_Filter_Policy The scanning filter policy determines how the + * scanner's Link Layer processes advertising and scan response PDUs. + * There is a choice of two primary filter policies: unfiltered and + * filtered. + * Unfiltered: the Link Layer processes all advertising and scan + * response PDUs (i.e., the Filter Accept List is not used). + * Filtered: the Link Layer processes advertising and scan response PDUs + * only from devices in the Filter Accept List. + * With extended scanning filter policies, a directed advertising PDU + * accepted by the primary filter policy shall nevertheless be ignored + * unless either the TargetA field is identical to the scanner's device + * address, or TargetA field is a resolvable private address. + * Flags: + * - 0x01: 0 = unfiltered scanning policy; 1 = filtered scanning policy + * - 0x02: 0 = Basic filter policy; 1 = Extended filter policy + * - 0x04: Decision scanning filter policy mode - bit 0 (not supported) + * - 0x08: Decision scanning filter policy mode - bit 1 (not supported) + * @param Scanning_PHYs Scan PHYs. + * Flags: + * - 0x01: Scan advertisements on the LE 1M PHY + * @param Scan_Param_Phy See @ref Scan_Param_Phy_t + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_extended_scan_parameters( uint8_t Own_Address_Type, + uint8_t Scanning_Filter_Policy, + uint8_t Scanning_PHYs, + const Scan_Param_Phy_t* Scan_Param_Phy ); + +/** + * @brief HCI_LE_SET_EXTENDED_SCAN_ENABLE + * This command is used to enable or disable extended scanning. + * See Core Specification [Vol 4, Part E, 7.8.65]. + * + * @param Enable Enable/disable scan. + * Values: + * - 0x00: Scanning disabled + * - 0x01: Scanning enabled + * @param Filter_Duplicates Duplicate filtering. + * Values: + * - 0x00: Duplicate filtering disabled + * - 0x01: Duplicate filtering enabled + * - 0x02: Duplicate filtering enabled, reset for each scan period + * @param Duration Scan duration. + * Time = N * 10 ms. + * Values: + * - 0x0000 (0 ms) : Scan continuously until explicitly disable + * - 0x0001 (10 ms) ... 0xFFFF (655350 ms) : Scan duration + * @param Period Scan period. + * Time = N * 1.28 s. + * Values: + * - 0x0000 (0 ms) : Scan continuously + * - 0x0001 (1280 ms) ... 0xFFFF (83884800 ms) : Time interval from + * when the Controller started its last Scan_Duration until it begins + * the subsequent Scan_Duration + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_extended_scan_enable( uint8_t Enable, + uint8_t Filter_Duplicates, + uint16_t Duration, + uint16_t Period ); + +/** + * @brief HCI_LE_EXTENDED_CREATE_CONNECTION + * This command is used to create an ACL connection to a connectable advertiser + * by means of extended scanning. + * See Core Specification [Vol 4, Part E, 7.8.66]. + * + * @param Initiator_Filter_Policy Initiator filter policy. + * Values: + * - 0x00: Filter Accept List is not used to determine which advertiser + * to connect to + * - 0x01: Filter Accept List is used to determine which advertiser to + * connect to (Peer_Address_Type and Peer_Address are ignored) + * @param Own_Address_Type Own address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Resolvable Private Address if available, otherwise Public + * Address + * - 0x03: Resolvable Private Address if available, otherwise Random + * Address + * @param Peer_Address_Type Address type of the peer device. + * Values: + * - 0x00: Public Device Address or Public Identity Address + * - 0x01: Random Device Address or Random (static) Identity Address + * @param Peer_Address Public Device Address, Random Device Address, Public + * Identity Address, or Random (static) Identity Address of the device + * to be connected. + * @param Initiating_PHYs Initiating PHYs. + * Flags: + * - 0x01: Scan connectable advertisements on the LE 1M PHY- Connection + * parameters for the LE 1M PHY + * - 0x02: Connection parameters for the LE 2M PHY + * @param Init_Param_Phy See @ref Init_Param_Phy_t + * @return Value indicating success or error code. + */ +tBleStatus hci_le_extended_create_connection( uint8_t Initiator_Filter_Policy, + uint8_t Own_Address_Type, + uint8_t Peer_Address_Type, + const uint8_t* Peer_Address, + uint8_t Initiating_PHYs, + const Init_Param_Phy_t* Init_Param_Phy ); + +/** + * @brief HCI_LE_READ_TRANSMIT_POWER + * This command is used to read the minimum and maximum transmit powers + * supported by the Controller. + * See Core Specification [Vol 4, Part E, 7.8.74]. + * + * @param[out] Min_TX_Power Signed integer. + * Units: dBm. + * Values: + * - -127 ... 20 + * @param[out] Max_TX_Power Signed integer. + * Units: dBm. + * Values: + * - -127 ... 20 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_transmit_power( uint8_t* Min_TX_Power, + uint8_t* Max_TX_Power ); + +/** + * @brief HCI_LE_READ_RF_PATH_COMPENSATION + * This command is used to read the RF path compensation value parameters used + * in the Tx power level and RSSI calculation. + * See Core Specification [Vol 4, Part E, 7.8.75]. + * + * @param[out] RF_TX_Path_Compensation RF TX Path Compensation Value (16-bit + * signed integer). + * Units: 0.1 dB. + * Values: + * - -1280 ... 1280 + * @param[out] RF_RX_Path_Compensation RF RX Path Compensation Value (16-bit + * signed integer). + * Units: 0.1 dB. + * Values: + * - -1280 ... 1280 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_read_rf_path_compensation( uint16_t* RF_TX_Path_Compensation, + uint16_t* RF_RX_Path_Compensation ); + +/** + * @brief HCI_LE_WRITE_RF_PATH_COMPENSATION + * This command is used to indicate the RF path gain or loss between the RF + * transceiver and the antenna contributed by intermediate components. A + * positive value means a net RF path gain and a negative value means a net RF + * path loss. + * See Core Specification [Vol 4, Part E, 7.8.76]. + * + * @param RF_TX_Path_Compensation RF TX Path Compensation Value (16-bit signed + * integer). + * Units: 0.1 dB. + * Values: + * - -1280 ... 1280 + * @param RF_RX_Path_Compensation RF RX Path Compensation Value (16-bit signed + * integer). + * Units: 0.1 dB. + * Values: + * - -1280 ... 1280 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_write_rf_path_compensation( uint16_t RF_TX_Path_Compensation, + uint16_t RF_RX_Path_Compensation ); + +/** + * @brief HCI_LE_SET_PRIVACY_MODE + * This command is used to allow the Host to specify the privacy mode to be + * used for a given entry on the resolving list. + * See Core Specification [Vol 4, Part E, 7.8.77]. + * + * @param Peer_Identity_Address_Type Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + * @param Peer_Identity_Address Public or Random (static) Identity Address of + * the peer device + * @param Privacy_Mode Privacy Mode. + * Values: + * - 0x00: Use Network Privacy Mode + * - 0x01: Use Device Privacy Mode + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_privacy_mode( uint8_t Peer_Identity_Address_Type, + const uint8_t* Peer_Identity_Address, + uint8_t Privacy_Mode ); + +/** + * @brief HCI_LE_GENERATE_DHKEY_V2 + * This command is used to initiate generation of a Diffie-Hellman key in the + * Controller for use over the LE transport. This command takes the remote + * P-256 public key as input. The Diffie-Hellman key generation uses the + * private key generated by the HCI_LE_Read_Local_P-256_Public_Key command or + * the private debug key. + * See Core Specification [Vol 4, Part E, 7.8.37]. + * + * @param Remote_P256_Public_Key The remote P-256 public key in X, Y format: + * Octets 31-0: X coordinate + * Octets 63-32: Y coordinate + * Little Endian Format + * @param Key_Type Type of private key used for the Diffie-Hellman key + * generation. + * Values: + * - 0x00: Use the generated private key + * - 0x01: Use the debug private key + * @return Value indicating success or error code. + */ +tBleStatus hci_le_generate_dhkey_v2( const uint8_t* Remote_P256_Public_Key, + uint8_t Key_Type ); + +/** + * @brief HCI_LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT_V2 + * This command sets the range of time the Controller uses a Resolvable Private + * Address before a new Resolvable Private Address is generated and starts + * being used. + * After a call to this command, when the BLE stack needs to set a new timeout + * (e.g., when the RPA is set for the first time, or when the current timeout + * expires), the new timeout is set as a random value between RPA_Timeout_Min + * and RPA_Timeout_Max. + * See Core Specification [Vol 4, Part E, 7.8.45]. + * + * @param RPA_Timeout_Min Minimum RPA timeout, in seconds. + * Time range: 1 s to 1 hour. + * Default: 0x01E0 (480 s or 8 minutes) + * Values: + * - 0x0001 ... 0x0E10 + * @param RPA_Timeout_Max Maximum RPA timeout, in seconds. + * Time range: 1 s to 1 hour. + * Default: 0x0384 (900 s or 15 minutes) + * Values: + * - 0x0001 ... 0x0E10 + * @return Value indicating success or error code. + */ +tBleStatus hci_le_set_resolvable_private_address_timeout_v2( uint16_t RPA_Timeout_Min, + uint16_t RPA_Timeout_Max ); + + +#endif /* BLE_HCI_LE_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c new file mode 100644 index 0000000..5360484 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.c @@ -0,0 +1,306 @@ +/***************************************************************************** + * @file ble_l2cap_aci.c + * @brief STM32WB BLE API (l2cap_aci) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#include "auto/ble_l2cap_aci.h" + +tBleStatus aci_l2cap_connection_parameter_update_req( uint16_t Connection_Handle, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Latency, + uint16_t Timeout_Multiplier ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_connection_parameter_update_req_cp0 *cp0 = (aci_l2cap_connection_parameter_update_req_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Conn_Interval_Min = Conn_Interval_Min; + index_input += 2; + cp0->Conn_Interval_Max = Conn_Interval_Max; + index_input += 2; + cp0->Latency = Latency; + index_input += 2; + cp0->Timeout_Multiplier = Timeout_Multiplier; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x181; + rq.event = 0x0F; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_l2cap_connection_parameter_update_resp( uint16_t Connection_Handle, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Latency, + uint16_t Timeout_Multiplier, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length, + uint8_t Identifier, + uint8_t Accept ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_connection_parameter_update_resp_cp0 *cp0 = (aci_l2cap_connection_parameter_update_resp_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Conn_Interval_Min = Conn_Interval_Min; + index_input += 2; + cp0->Conn_Interval_Max = Conn_Interval_Max; + index_input += 2; + cp0->Latency = Latency; + index_input += 2; + cp0->Timeout_Multiplier = Timeout_Multiplier; + index_input += 2; + cp0->Minimum_CE_Length = Minimum_CE_Length; + index_input += 2; + cp0->Maximum_CE_Length = Maximum_CE_Length; + index_input += 2; + cp0->Identifier = Identifier; + index_input += 1; + cp0->Accept = Accept; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x182; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_l2cap_coc_connect( uint16_t Connection_Handle, + uint16_t SPSM, + uint16_t MTU, + uint16_t MPS, + uint16_t Initial_Credits, + uint8_t Channel_Number ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_coc_connect_cp0 *cp0 = (aci_l2cap_coc_connect_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->SPSM = SPSM; + index_input += 2; + cp0->MTU = MTU; + index_input += 2; + cp0->MPS = MPS; + index_input += 2; + cp0->Initial_Credits = Initial_Credits; + index_input += 2; + cp0->Channel_Number = Channel_Number; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x188; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_l2cap_coc_connect_confirm( uint16_t Connection_Handle, + uint16_t MTU, + uint16_t MPS, + uint16_t Initial_Credits, + uint16_t Result, + uint8_t Max_Channel_Number, + uint8_t* Channel_Number, + uint8_t* Channel_Index_List ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_coc_connect_confirm_cp0 *cp0 = (aci_l2cap_coc_connect_confirm_cp0*)(cmd_buffer); + aci_l2cap_coc_connect_confirm_rp0 resp; + Osal_MemSet( &resp, 0, sizeof(resp) ); + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->MTU = MTU; + index_input += 2; + cp0->MPS = MPS; + index_input += 2; + cp0->Initial_Credits = Initial_Credits; + index_input += 2; + cp0->Result = Result; + index_input += 2; + cp0->Max_Channel_Number = Max_Channel_Number; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x189; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &resp; + rq.rlen = sizeof(resp); + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + if ( resp.Status ) + return resp.Status; + *Channel_Number = resp.Channel_Number; + Osal_MemCpy( (void*)Channel_Index_List, (const void*)resp.Channel_Index_List, *Channel_Number); + return BLE_STATUS_SUCCESS; +} + +tBleStatus aci_l2cap_coc_reconf( uint16_t Connection_Handle, + uint16_t MTU, + uint16_t MPS, + uint8_t Channel_Number, + const uint8_t* Channel_Index_List ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_coc_reconf_cp0 *cp0 = (aci_l2cap_coc_reconf_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->MTU = MTU; + index_input += 2; + cp0->MPS = MPS; + index_input += 2; + cp0->Channel_Number = Channel_Number; + index_input += 1; + Osal_MemCpy( (void*)&cp0->Channel_Index_List, (const void*)Channel_Index_List, Channel_Number ); + index_input += Channel_Number; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x18a; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_l2cap_coc_reconf_confirm( uint16_t Connection_Handle, + uint16_t Result ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_coc_reconf_confirm_cp0 *cp0 = (aci_l2cap_coc_reconf_confirm_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Connection_Handle = Connection_Handle; + index_input += 2; + cp0->Result = Result; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x18b; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_l2cap_coc_disconnect( uint8_t Channel_Index ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_coc_disconnect_cp0 *cp0 = (aci_l2cap_coc_disconnect_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Channel_Index = Channel_Index; + index_input += 1; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x18c; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_l2cap_coc_flow_control( uint8_t Channel_Index, + uint16_t Credits ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_coc_flow_control_cp0 *cp0 = (aci_l2cap_coc_flow_control_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Channel_Index = Channel_Index; + index_input += 1; + cp0->Credits = Credits; + index_input += 2; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x18d; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + +tBleStatus aci_l2cap_coc_tx_data( uint8_t Channel_Index, + uint16_t Length, + const uint8_t* Data ) +{ + struct hci_request rq; + uint8_t cmd_buffer[BLE_CMD_MAX_PARAM_LEN]; + aci_l2cap_coc_tx_data_cp0 *cp0 = (aci_l2cap_coc_tx_data_cp0*)(cmd_buffer); + tBleStatus status = 0; + int index_input = 0; + cp0->Channel_Index = Channel_Index; + index_input += 1; + cp0->Length = Length; + index_input += 2; + Osal_MemCpy( (void*)&cp0->Data, (const void*)Data, Length ); + index_input += Length; + Osal_MemSet( &rq, 0, sizeof(rq) ); + rq.ogf = 0x3f; + rq.ocf = 0x18e; + rq.cparam = cmd_buffer; + rq.clen = index_input; + rq.rparam = &status; + rq.rlen = 1; + if ( hci_send_req(&rq, FALSE) < 0 ) + return BLE_STATUS_TIMEOUT; + return status; +} + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h new file mode 100644 index 0000000..1613c58 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_l2cap_aci.h @@ -0,0 +1,304 @@ +/***************************************************************************** + * @file ble_l2cap_aci.h + * @brief STM32WB BLE API (L2CAP_ACI) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_L2CAP_ACI_H__ +#define BLE_L2CAP_ACI_H__ + + +#include "auto/ble_types.h" + +/** + * @brief ACI_L2CAP_CONNECTION_PARAMETER_UPDATE_REQ + * Sends an L2CAP connection parameter update request from the Peripheral to + * the Central. + * An ACI_L2CAP_CONNECTION_UPDATE_RESP_EVENT event is raised when the Central + * responds to the request (accepts or rejects). + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Conn_Interval_Min Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Latency Maximum Peripheral latency for the connection in number of + * connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Timeout_Multiplier Defines connection timeout parameter in the + * following manner: Timeout Multiplier * 10ms. + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_connection_parameter_update_req( uint16_t Connection_Handle, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Latency, + uint16_t Timeout_Multiplier ); + +/** + * @brief ACI_L2CAP_CONNECTION_PARAMETER_UPDATE_RESP + * Accepts or rejects a connection update. This command should be sent in + * response to an ACI_L2CAP_CONNECTION_UPDATE_REQ_EVENT event from the + * controller. The accept parameter has to be set if the connection parameters + * given in the event are acceptable. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Conn_Interval_Min Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Conn_Interval_Max Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + * @param Latency Maximum Peripheral latency for the connection in number of + * connection events. + * Values: + * - 0x0000 ... 0x01F3 + * @param Timeout_Multiplier Defines connection timeout parameter in the + * following manner: Timeout Multiplier * 10ms. + * @param Minimum_CE_Length Information parameter about the minimum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @param Maximum_CE_Length Information parameter about the maximum length of + * connection needed for this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + * @param Identifier Received identifier. + * @param Accept Specify if connection update parameters are acceptable or not. + * Values: + * - 0x00: Reject + * - 0x01: Accept + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_connection_parameter_update_resp( uint16_t Connection_Handle, + uint16_t Conn_Interval_Min, + uint16_t Conn_Interval_Max, + uint16_t Latency, + uint16_t Timeout_Multiplier, + uint16_t Minimum_CE_Length, + uint16_t Maximum_CE_Length, + uint8_t Identifier, + uint8_t Accept ); + +/** + * @brief ACI_L2CAP_COC_CONNECT + * This command sends a Credit Based Connection Request packet on the specified + * connection. See Core Specification [Vol 3, Part A]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param SPSM Simplified Protocol/Service Multiplexer. + * Values: + * - 0x0001 ... 0x00FF + * @param MTU Maximum Transmission Unit. + * Values: + * - 23 ... 65535 + * - 64 ... 246: for Enhanced ATT + * @param MPS Maximum payload size (in octets). + * Values: + * - 23 ... 248 + * - 64 ... 248: for Enhanced ATT + * @param Initial_Credits Number of K-frames that can be received on the + * created channel(s) by the L2CAP layer entity sending this packet. + * Values: + * - 0 ... 65535 + * @param Channel_Number Number of channels to be created. If this parameter is + * set to 0, it requests the creation of one LE credit based connection- + * oriented channel. Otherwise, it requests the creation of one or more + * enhanced credit based connection-oriented channels. + * Values: + * - 0 ... 5 + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_coc_connect( uint16_t Connection_Handle, + uint16_t SPSM, + uint16_t MTU, + uint16_t MPS, + uint16_t Initial_Credits, + uint8_t Channel_Number ); + +/** + * @brief ACI_L2CAP_COC_CONNECT_CONFIRM + * This command sends a Credit Based Connection Response packet. It must be + * used upon receipt of a connection request through an + * ACI_L2CAP_COC_CONNECT_EVENT event. + * By setting the Result parameter to 0x0000, the application can accept all + * connections or only some. In this case, the number of accepted connections + * depends on the Max_Channel_Number parameter. Note that if some connections + * are refused, the Result parameter is automatically modified by the BLE + * stack. + * By setting the Result parameter to a non-zero value, the application can + * refuse all connections. The Result value shall then be one of the + * "Connection refused" or "All connections refused" values. + * See Core Specification [Vol 3, Part A]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param MTU Maximum Transmission Unit. + * Values: + * - 23 ... 65535 + * - 64 ... 246: for Enhanced ATT + * @param MPS Maximum payload size (in octets). + * Values: + * - 23 ... 248 + * - 64 ... 248: for Enhanced ATT + * @param Initial_Credits Number of K-frames that can be received on the + * created channel(s) by the L2CAP layer entity sending this packet. + * Values: + * - 0 ... 65535 + * @param Result Indicates the outcome of the request. See Core Specification + * [Vol 3, Part A, Table 4.16] for LE credit based connection-oriented + * channels, or [Vol 3, Part A, Table 4.17] for enhanced credit based + * connection-oriented channels. + * Values: + * - 0x0000 ... 0x000F + * @param Max_Channel_Number Indicates the maximum number of channels that can + * be created. + * Values: + * - 0x01 ... 0x05 + * @param[out] Channel_Number Number of created channels. It is the length of + * Channel_Index_List. + * Values: + * - 0 ... 5 + * @param[out] Channel_Index_List List of channel indexes for which the + * primitive applies. + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_coc_connect_confirm( uint16_t Connection_Handle, + uint16_t MTU, + uint16_t MPS, + uint16_t Initial_Credits, + uint16_t Result, + uint8_t Max_Channel_Number, + uint8_t* Channel_Number, + uint8_t* Channel_Index_List ); + +/** + * @brief ACI_L2CAP_COC_RECONF + * This command sends a Credit Based Reconfigure Request packet on the + * specified connection. See Core Specification [Vol 3, Part A]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param MTU Maximum Transmission Unit. + * Values: + * - 23 ... 65535 + * - 64 ... 246: for Enhanced ATT + * @param MPS Maximum payload size (in octets). + * Values: + * - 23 ... 248 + * - 64 ... 248: for Enhanced ATT + * @param Channel_Number Number of created channels. It is the length of + * Channel_Index_List. + * Values: + * - 1 ... 5 + * @param Channel_Index_List List of channel indexes for which the primitive + * applies. + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_coc_reconf( uint16_t Connection_Handle, + uint16_t MTU, + uint16_t MPS, + uint8_t Channel_Number, + const uint8_t* Channel_Index_List ); + +/** + * @brief ACI_L2CAP_COC_RECONF_CONFIRM + * This command sends a Credit Based Reconfigure Response packet. It must be + * used upon receipt of a Credit Based Reconfigure Request through an + * ACI_L2CAP_COC_RECONF_EVENT event. A Result value of 0x0000 indicates success + * while a non-zero value indicates the request is refused. + * See Core Specification [Vol 3, Part A]. + * + * @param Connection_Handle Connection handle for which the command applies. + * Values: + * - 0x0000 ... 0x0EFF + * @param Result Indicates the outcome of the request. See Core Specification + * [Vol 3, Part A, Table 4.18]. + * Values: + * - 0x0000 ... 0x0004 + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_coc_reconf_confirm( uint16_t Connection_Handle, + uint16_t Result ); + +/** + * @brief ACI_L2CAP_COC_DISCONNECT + * This command sends a Disconnection Request signaling packet on the specified + * connection-oriented channel. See Core Specification [Vol 3, Part A]. + * The ACI_L2CAP_COC_DISCONNECT_EVENT event is received when the disconnection + * of the channel is effective. + * + * @param Channel_Index Index of the connection-oriented channel for which the + * primitive applies. + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_coc_disconnect( uint8_t Channel_Index ); + +/** + * @brief ACI_L2CAP_COC_FLOW_CONTROL + * This command sends a Flow Control Credit signaling packet on the specified + * connection-oriented channel. See Core Specification [Vol 3, Part A]. + * + * @param Channel_Index Index of the connection-oriented channel for which the + * primitive applies. + * @param Credits Number of credits the receiving device can increment, + * corresponding to the number of K-frames that can be sent to the peer + * device sending the Flow Control Credit packet. + * Values: + * - 1 ... 65535 + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_coc_flow_control( uint8_t Channel_Index, + uint16_t Credits ); + +/** + * @brief ACI_L2CAP_COC_TX_DATA + * This command sends a K-frame packet on the specified connection-oriented + * channel. See Core Specification [Vol 3, Part A]. + * Note: for the first K-frame of the SDU, the Information data shall contain + * the L2CAP SDU Length coded on two octets followed by the K-frame information + * payload. For the next K-frames of the SDU, the Information data shall only + * contain the K-frame information payload. + * The Length value must not exceed (BLE_CMD_MAX_PARAM_LEN - 3) i.e. 252 for + * BLE_CMD_MAX_PARAM_LEN default value. + * + * @param Channel_Index Index of the connection-oriented channel for which the + * primitive applies. + * @param Length Length of Data (in octets) + * @param Data Information data + * @return Value indicating success or error code. + */ +tBleStatus aci_l2cap_coc_tx_data( uint8_t Channel_Index, + uint16_t Length, + const uint8_t* Data ); + + +#endif /* BLE_L2CAP_ACI_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h new file mode 100644 index 0000000..673803a --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_types.h @@ -0,0 +1,3459 @@ +/***************************************************************************** + * @file ble_types.h + * @brief STM32WB BLE command/event types + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_TYPES_H__ +#define BLE_TYPES_H__ + + +#include +#include "ble_const.h" + +/* Type used for function return value */ +typedef uint8_t tBleStatus; + +/* Definition of Host_Nb_Of_Completed_Pkt_Pair_t */ +typedef __PACKED_STRUCT +{ + /** + * Connection_Handle[i]. + * Values: + * - 0x0000 ... 0x0EFF + */ + uint16_t Connection_Handle; + /** + * The number of HCI Data Packets [i] that have been completed for the + * associated Connection_Handle since the previous time the event was + * returned. + * Values: + * - 0x0000 ... 0xFFFF + */ + uint16_t Host_Num_Of_Completed_Packets; +} Host_Nb_Of_Completed_Pkt_Pair_t; + +/* Definition of Adv_Set_t */ +typedef __PACKED_STRUCT +{ + /** + * Used to identify an advertising set. + * Values: + * - 0x00 ... 0xEF + */ + uint8_t Advertising_Handle; + /** + * Duration of advertising set. + * Time = N * 10 ms. + * Values: + * - 0x0000 (0 ms) : No advertising duration. + * - 0x0001 (10 ms) ... 0xFFFF (655350 ms) : Advertising duration + */ + uint16_t Duration; + /** + * Maximum number of advertising events. + * Values: + * - 0x00: No maximum number of advertising events + * - 0x01 ... 0xFF: Maximum number of extended advertising events the + * Controller shall attempt to send prior to terminating the extended + * advertising + */ + uint8_t Max_Extended_Advertising_Events; +} Adv_Set_t; + +/* Definition of Scan_Param_Phy_t */ +typedef __PACKED_STRUCT +{ + /** + * Passive or active scanning. With passive scanning, no scan request PDUs + * are sent. + * Values: + * - 0x00: Passive scanning + * - 0x01: Active scanning + */ + uint8_t Scan_Type; + /** + * Time interval from when the Controller started its last scan until it + * begins the subsequent scan on the primary advertising physical channel. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : only supported range + */ + uint16_t Scan_Interval; + /** + * Duration of the scan on the primary advertising physical channel. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : only supported range + */ + uint16_t Scan_Window; +} Scan_Param_Phy_t; + +/* Definition of Init_Param_Phy_t */ +typedef __PACKED_STRUCT +{ + /** + * Time interval from when the Controller started its last scan until it + * begins the subsequent scan on the primary advertising physical channel. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : only supported range + */ + uint16_t Scan_Interval; + /** + * Duration of the scan on the primary advertising physical channel. + * Time = N * 0.625 ms. + * Values: + * - 0x0004 (2.500 ms) ... 0x5DC0 (15000.000 ms) : only supported range + */ + uint16_t Scan_Window; + /** + * Minimum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + */ + uint16_t Conn_Interval_Min; + /** + * Maximum value for the connection event interval. + * Time = N * 1.25 ms. + * Values: + * - 0x0006 (7.50 ms) ... 0x0C80 (4000.00 ms) + */ + uint16_t Conn_Interval_Max; + /** + * Maximum Peripheral latency for the connection in number of connection + * events. + * Values: + * - 0x0000 ... 0x01F3 + */ + uint16_t Conn_Latency; + /** + * Supervision timeout for the LE Link. + * It shall be a multiple of 10 ms and larger than (1 + + * connPeripheralLatency) * connInterval * 2. + * Time = N * 10 ms. + * Values: + * - 0x000A (100 ms) ... 0x0C80 (32000 ms) + */ + uint16_t Supervision_Timeout; + /** + * Information parameter about the minimum length of connection needed for + * this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + */ + uint16_t Min_CE_Length; + /** + * Information parameter about the maximum length of connection needed for + * this LE connection. + * Time = N * 0.625 ms. + * Values: + * - 0x0000 (0.000 ms) ... 0xFFFF (40959.375 ms) + */ + uint16_t Max_CE_Length; +} Init_Param_Phy_t; + +/* Definition of Peer_Entry_t */ +typedef __PACKED_STRUCT +{ + /** + * Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + */ + uint8_t Peer_Address_Type; + /** + * Public Device Address or Random Device Address. + */ + uint8_t Peer_Address[6]; +} Peer_Entry_t; + +/* Definition of Bonded_Device_Entry_t */ +typedef __PACKED_STRUCT +{ + /** + * Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + */ + uint8_t Address_Type; + /** + * Public Device Address or Random Device Address. + */ + uint8_t Address[6]; +} Bonded_Device_Entry_t; + +/* Definition of List_Entry_t */ +typedef __PACKED_STRUCT +{ + /** + * Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + */ + uint8_t Address_Type; + /** + * Public Device Address or Random Device Address. + */ + uint8_t Address[6]; +} List_Entry_t; + +/* Definition of Service_UUID_t */ +typedef __PACKED_UNION +{ + /** + * 16-bit UUID + */ + uint16_t Service_UUID_16; + /** + * 128-bit UUID + */ + uint8_t Service_UUID_128[16]; +} Service_UUID_t; + +/* Definition of Include_UUID_t */ +typedef __PACKED_UNION +{ + /** + * 16-bit UUID + */ + uint16_t Include_UUID_16; + /** + * 128-bit UUID + */ + uint8_t Include_UUID_128[16]; +} Include_UUID_t; + +/* Definition of Char_UUID_t */ +typedef __PACKED_UNION +{ + /** + * 16-bit UUID + */ + uint16_t Char_UUID_16; + /** + * 128-bit UUID + */ + uint8_t Char_UUID_128[16]; +} Char_UUID_t; + +/* Definition of Char_Desc_Uuid_t */ +typedef __PACKED_UNION +{ + /** + * 16-bit UUID + */ + uint16_t Char_UUID_16; + /** + * 128-bit UUID + */ + uint8_t Char_UUID_128[16]; +} Char_Desc_Uuid_t; + +/* Definition of UUID_t */ +typedef __PACKED_UNION +{ + /** + * 16-bit UUID + */ + uint16_t UUID_16; + /** + * 128-bit UUID + */ + uint8_t UUID_128[16]; +} UUID_t; + +/* Definition of Handle_Entry_t */ +typedef __PACKED_STRUCT +{ + /** + * Attribute handle + */ + uint16_t Handle; +} Handle_Entry_t; + +/* Definition of Handle_Packets_Pair_Entry_t */ +typedef __PACKED_STRUCT +{ + /** + * Connection handle + */ + uint16_t Connection_Handle; + /** + * The number of HCI Data Packets that have been completed (transmitted or + * flushed) for the associated Connection_Handle since the previous time the + * event was returned. + */ + uint16_t HC_Num_Of_Completed_Packets; +} Handle_Packets_Pair_Entry_t; + +/* Definition of Advertising_Report_t */ +typedef __PACKED_STRUCT +{ + /** + * Type of advertising report event: + * ADV_IND: Connectable undirected advertising', + * ADV_DIRECT_IND: Connectable directed advertising, + * ADV_SCAN_IND: Scannable undirected advertising, + * ADV_NONCONN_IND: Non connectable undirected advertising, + * SCAN_RSP: Scan response. + * Values: + * - 0x00: ADV_IND + * - 0x01: ADV_DIRECT_IND + * - 0x02: ADV_SCAN_IND + * - 0x03: ADV_NONCONN_IND + * - 0x04: SCAN_RSP + */ + uint8_t Event_Type; + /** + * Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Public Identity Address (corresponds to the Resolved Private + * Address) + * - 0x03: Random (static) Identity Address (corresponds to the Resolved + * Private Address) + */ + uint8_t Address_Type; + /** + * Public Device Address or Random Device Address of the device to be + * connected. + */ + uint8_t Address[6]; + /** + * Length of the Data field for each device which responded. + * Values: + * - 0 ... 31 + */ + uint8_t Length_Data; + /** + * Octets of advertising or scan response data formatted as defined in Core + * Specification [Vol 3, Part C, 11]. + */ + const uint8_t* Data; + /** + * RSSI (signed integer). + * Units: dBm. + * Values: + * - 127: RSSI not available + * - -127 ... 20 + */ + uint8_t RSSI; +} Advertising_Report_t; + +/* Definition of Direct_Advertising_Report_t */ +typedef __PACKED_STRUCT +{ + /** + * Advertising type + * Values: + * - 0x01: Connectable directed advertising (ADV_DIRECT_IND) + */ + uint8_t Event_Type; + /** + * Address type. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * - 0x02: Public Identity Address (corresponds to the Resolved Private + * Address) + * - 0x03: Random (static) Identity Address (corresponds to the Resolved + * Private Address) + */ + uint8_t Address_Type; + /** + * Public Device Address, Random Device Address, Public Identity Address or + * Random (static) Identity Address of the advertising device. + */ + uint8_t Address[6]; + /** + * 0x01 Random Device Address + * Values: + * - 0x01: Random Device Address + */ + uint8_t Direct_Address_Type; + /** + * Random Device Address + */ + uint8_t Direct_Address[6]; + /** + * RSSI (signed integer). + * Units: dBm. + * Values: + * - 127: RSSI not available + * - -127 ... 20 + */ + uint8_t RSSI; +} Direct_Advertising_Report_t; + +/* Definition of Attribute_Group_Handle_Pair_t */ +typedef __PACKED_STRUCT +{ + /** + * Found Attribute handle + */ + uint16_t Found_Attribute_Handle; + /** + * Group End handle + */ + uint16_t Group_End_Handle; +} Attribute_Group_Handle_Pair_t; + +/* Definition of Handle_Item_t */ +typedef __PACKED_STRUCT +{ + uint16_t Handle; +} Handle_Item_t; + +/* Internal types used by process functions */ + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Reason; +} hci_disconnect_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_disconnect_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} hci_read_remote_version_information_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_read_remote_version_information_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Event_Mask[8]; +} hci_set_event_mask_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_set_event_mask_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_reset_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Type; +} hci_read_transmit_power_level_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t Transmit_Power_Level; +} hci_read_transmit_power_level_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Flow_Control_Enable; +} hci_set_controller_to_host_flow_control_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_set_controller_to_host_flow_control_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Host_ACL_Data_Packet_Length; + uint8_t Host_Synchronous_Data_Packet_Length; + uint16_t Host_Total_Num_ACL_Data_Packets; + uint16_t Host_Total_Num_Synchronous_Data_Packets; +} hci_host_buffer_size_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_host_buffer_size_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Number_Of_Handles; + Host_Nb_Of_Completed_Pkt_Pair_t Host_Nb_Of_Completed_Pkt_Pair[(BLE_CMD_MAX_PARAM_LEN - 1)/sizeof(Host_Nb_Of_Completed_Pkt_Pair_t)]; +} hci_host_number_of_completed_packets_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_host_number_of_completed_packets_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t HCI_Version; + uint16_t HCI_Subversion; + uint8_t LMP_Version; + uint16_t Company_Identifier; + uint16_t LMP_Subversion; +} hci_read_local_version_information_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Supported_Commands[64]; +} hci_read_local_supported_commands_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t LMP_Features[8]; +} hci_read_local_supported_features_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t BD_ADDR[6]; +} hci_read_bd_addr_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} hci_read_rssi_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t RSSI; +} hci_read_rssi_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t LE_Event_Mask[8]; +} hci_le_set_event_mask_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_event_mask_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t HC_LE_ACL_Data_Packet_Length; + uint8_t HC_Total_Num_LE_ACL_Data_Packets; +} hci_le_read_buffer_size_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t LE_Features[8]; +} hci_le_read_local_supported_features_page_0_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Random_Address[6]; +} hci_le_set_random_address_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_random_address_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Advertising_Interval_Min; + uint16_t Advertising_Interval_Max; + uint8_t Advertising_Type; + uint8_t Own_Address_Type; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint8_t Advertising_Channel_Map; + uint8_t Advertising_Filter_Policy; +} hci_le_set_advertising_parameters_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_advertising_parameters_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Transmit_Power_Level; +} hci_le_read_advertising_physical_channel_tx_power_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Data_Length; + uint8_t Advertising_Data[31]; +} hci_le_set_advertising_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_advertising_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Scan_Response_Data_Length; + uint8_t Scan_Response_Data[31]; +} hci_le_set_scan_response_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_scan_response_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Enable; +} hci_le_set_advertising_enable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_advertising_enable_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t LE_Scan_Type; + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t Own_Address_Type; + uint8_t Scanning_Filter_Policy; +} hci_le_set_scan_parameters_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_scan_parameters_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t LE_Scan_Enable; + uint8_t Filter_Duplicates; +} hci_le_set_scan_enable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_scan_enable_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t Initiator_Filter_Policy; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint8_t Own_Address_Type; + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; + uint16_t Conn_Latency; + uint16_t Supervision_Timeout; + uint16_t Minimum_CE_Length; + uint16_t Maximum_CE_Length; +} hci_le_create_connection_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_create_connection_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_create_connection_cancel_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Filter_Accept_List_Size; +} hci_le_read_filter_accept_list_size_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_clear_filter_accept_list_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Address_Type; + uint8_t Address[6]; +} hci_le_add_device_to_filter_accept_list_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_add_device_to_filter_accept_list_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Address_Type; + uint8_t Address[6]; +} hci_le_remove_device_from_filter_accept_list_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_remove_device_from_filter_accept_list_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; + uint16_t Conn_Latency; + uint16_t Supervision_Timeout; + uint16_t Minimum_CE_Length; + uint16_t Maximum_CE_Length; +} hci_le_connection_update_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_connection_update_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t LE_Channel_Map[5]; +} hci_le_set_host_channel_classification_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_host_channel_classification_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} hci_le_read_channel_map_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t LE_Channel_Map[5]; +} hci_le_read_channel_map_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} hci_le_read_remote_features_page_0_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_read_remote_features_page_0_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Key[16]; + uint8_t Plaintext_Data[16]; +} hci_le_encrypt_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Encrypted_Data[16]; +} hci_le_encrypt_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Random_Number[8]; +} hci_le_rand_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Random_Number[8]; + uint16_t Encrypted_Diversifier; + uint8_t Long_Term_Key[16]; +} hci_le_enable_encryption_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_enable_encryption_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Long_Term_Key[16]; +} hci_le_long_term_key_request_reply_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; +} hci_le_long_term_key_request_reply_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} hci_le_long_term_key_request_negative_reply_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; +} hci_le_long_term_key_request_negative_reply_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t LE_States[8]; +} hci_le_read_supported_states_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t RX_Frequency; +} hci_le_receiver_test_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_receiver_test_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t TX_Frequency; + uint8_t Length_Of_Test_Data; + uint8_t Packet_Payload; +} hci_le_transmitter_test_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_transmitter_test_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Number_Of_Packets; +} hci_le_test_end_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t TxOctets; + uint16_t TxTime; +} hci_le_set_data_length_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; +} hci_le_set_data_length_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t SuggestedMaxTxOctets; + uint16_t SuggestedMaxTxTime; +} hci_le_read_suggested_default_data_length_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t SuggestedMaxTxOctets; + uint16_t SuggestedMaxTxTime; +} hci_le_write_suggested_default_data_length_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_write_suggested_default_data_length_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_read_local_p256_public_key_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Remote_P256_Public_Key[64]; +} hci_le_generate_dhkey_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_generate_dhkey_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Peer_Identity_Address_Type; + uint8_t Peer_Identity_Address[6]; + uint8_t Peer_IRK[16]; + uint8_t Local_IRK[16]; +} hci_le_add_device_to_resolving_list_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_add_device_to_resolving_list_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Peer_Identity_Address_Type; + uint8_t Peer_Identity_Address[6]; +} hci_le_remove_device_from_resolving_list_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_remove_device_from_resolving_list_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_clear_resolving_list_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Resolving_List_Size; +} hci_le_read_resolving_list_size_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Peer_Identity_Address_Type; + uint8_t Peer_Identity_Address[6]; +} hci_le_read_peer_resolvable_address_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Peer_Resolvable_Address[6]; +} hci_le_read_peer_resolvable_address_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Peer_Identity_Address_Type; + uint8_t Peer_Identity_Address[6]; +} hci_le_read_local_resolvable_address_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Local_Resolvable_Address[6]; +} hci_le_read_local_resolvable_address_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Address_Resolution_Enable; +} hci_le_set_address_resolution_enable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_address_resolution_enable_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t RPA_Timeout; +} hci_le_set_resolvable_private_address_timeout_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_resolvable_private_address_timeout_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t supportedMaxTxOctets; + uint16_t supportedMaxTxTime; + uint16_t supportedMaxRxOctets; + uint16_t supportedMaxRxTime; +} hci_le_read_maximum_data_length_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} hci_le_read_phy_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t TX_PHY; + uint8_t RX_PHY; +} hci_le_read_phy_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t ALL_PHYS; + uint8_t TX_PHYS; + uint8_t RX_PHYS; +} hci_le_set_default_phy_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_default_phy_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t ALL_PHYS; + uint8_t TX_PHYS; + uint8_t RX_PHYS; + uint16_t PHY_options; +} hci_le_set_phy_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_phy_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t RX_Frequency; + uint8_t PHY; + uint8_t Modulation_Index; +} hci_le_receiver_test_v2_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_receiver_test_v2_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t TX_Frequency; + uint8_t Length_Of_Test_Data; + uint8_t Packet_Payload; + uint8_t PHY; +} hci_le_transmitter_test_v2_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_transmitter_test_v2_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; + uint8_t Random_Address[6]; +} hci_le_set_advertising_set_random_address_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_advertising_set_random_address_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; + uint16_t Adv_Event_Properties; + uint8_t Primary_Adv_Interval_Min[3]; + uint8_t Primary_Adv_Interval_Max[3]; + uint8_t Primary_Adv_Channel_Map; + uint8_t Own_Address_Type; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint8_t Adv_Filter_Policy; + uint8_t Adv_TX_Power; + uint8_t Primary_Adv_PHY; + uint8_t Secondary_Adv_Max_Skip; + uint8_t Secondary_Adv_PHY; + uint8_t Adv_SID; + uint8_t Scan_Req_Notification_Enable; +} hci_le_set_extended_advertising_parameters_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Selected_TX_Power; +} hci_le_set_extended_advertising_parameters_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; + uint8_t Operation; + uint8_t Fragment_Preference; + uint8_t Advertising_Data_Length; + uint8_t Advertising_Data[BLE_CMD_MAX_PARAM_LEN - 4]; +} hci_le_set_extended_advertising_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_extended_advertising_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; + uint8_t Operation; + uint8_t Fragment_Preference; + uint8_t Scan_Response_Data_Length; + uint8_t Scan_Response_Data[BLE_CMD_MAX_PARAM_LEN - 4]; +} hci_le_set_extended_scan_response_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_extended_scan_response_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Enable; + uint8_t Num_Sets; + Adv_Set_t Adv_Set[(BLE_CMD_MAX_PARAM_LEN - 2)/sizeof(Adv_Set_t)]; +} hci_le_set_extended_advertising_enable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_extended_advertising_enable_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Max_Advertising_Data_Length; +} hci_le_read_maximum_advertising_data_length_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Num_Supported_Advertising_Sets; +} hci_le_read_number_of_supported_advertising_sets_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; +} hci_le_remove_advertising_set_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_remove_advertising_set_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_clear_advertising_sets_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Own_Address_Type; + uint8_t Scanning_Filter_Policy; + uint8_t Scanning_PHYs; + Scan_Param_Phy_t Scan_Param_Phy[2]; +} hci_le_set_extended_scan_parameters_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_extended_scan_parameters_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Enable; + uint8_t Filter_Duplicates; + uint16_t Duration; + uint16_t Period; +} hci_le_set_extended_scan_enable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_extended_scan_enable_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Initiator_Filter_Policy; + uint8_t Own_Address_Type; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint8_t Initiating_PHYs; + Init_Param_Phy_t Init_Param_Phy[3]; +} hci_le_extended_create_connection_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_extended_create_connection_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Min_TX_Power; + uint8_t Max_TX_Power; +} hci_le_read_transmit_power_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t RF_TX_Path_Compensation; + uint16_t RF_RX_Path_Compensation; +} hci_le_read_rf_path_compensation_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t RF_TX_Path_Compensation; + uint16_t RF_RX_Path_Compensation; +} hci_le_write_rf_path_compensation_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_write_rf_path_compensation_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Peer_Identity_Address_Type; + uint8_t Peer_Identity_Address[6]; + uint8_t Privacy_Mode; +} hci_le_set_privacy_mode_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_privacy_mode_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Remote_P256_Public_Key[64]; + uint8_t Key_Type; +} hci_le_generate_dhkey_v2_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_generate_dhkey_v2_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t RPA_Timeout_Min; + uint16_t RPA_Timeout_Max; +} hci_le_set_resolvable_private_address_timeout_v2_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} hci_le_set_resolvable_private_address_timeout_v2_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Offset; + uint8_t Length; + uint8_t Value[BLE_CMD_MAX_PARAM_LEN - 2]; +} aci_hal_write_config_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_write_config_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Offset; +} aci_hal_read_config_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 3) - 2]; +} aci_hal_read_config_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t En_High_Power; + uint8_t PA_Level; +} aci_hal_set_tx_power_level_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_set_tx_power_level_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint32_t Number_Of_Packets; +} aci_hal_le_tx_test_packet_number_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t RF_Channel; + uint8_t Freq_offset; +} aci_hal_tone_start_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_tone_start_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_tone_stop_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Link_Status[8]; + uint16_t Link_Connection_Handle[8]; +} aci_hal_get_link_status_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Radio_Activity_Mask; +} aci_hal_set_radio_activity_mask_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_set_radio_activity_mask_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint32_t Anchor_Period; + uint32_t Max_Free_Slot; +} aci_hal_get_anchor_period_rp0; + +typedef __PACKED_STRUCT +{ + uint32_t Event_Mask; +} aci_hal_set_event_mask_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_set_event_mask_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Enable; +} aci_hal_set_peripheral_latency_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_set_peripheral_latency_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t RSSI; +} aci_hal_read_rssi_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Mode; + uint8_t Key[16]; + uint8_t IV[8]; + uint16_t In_Data_Length; + uint8_t In_Data[BLE_CMD_MAX_PARAM_LEN - 27]; +} aci_hal_ead_encrypt_decrypt_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Out_Data_Length; + uint8_t Out_Data[(BLE_EVT_MAX_PARAM_LEN - 3) - 3]; +} aci_hal_ead_encrypt_decrypt_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Register_Address; +} aci_hal_read_radio_reg_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t reg_val; +} aci_hal_read_radio_reg_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Register_Address; + uint8_t Register_Value; +} aci_hal_write_radio_reg_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_write_radio_reg_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Value[3]; +} aci_hal_read_raw_rssi_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t RF_Channel; +} aci_hal_rx_start_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_rx_start_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_hal_rx_stop_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_non_discoverable_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Type; + uint16_t Advertising_Interval_Min; + uint16_t Advertising_Interval_Max; + uint8_t Own_Address_Type; + uint8_t Advertising_Filter_Policy; + uint8_t Local_Name_Length; + uint8_t Local_Name[BLE_CMD_MAX_PARAM_LEN - 13]; +} aci_gap_set_limited_discoverable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Service_Uuid_length; + uint8_t Service_Uuid_List[BLE_CMD_MAX_PARAM_LEN - 13]; +} aci_gap_set_limited_discoverable_cp1; + +typedef __PACKED_STRUCT +{ + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; +} aci_gap_set_limited_discoverable_cp2; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_limited_discoverable_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Type; + uint16_t Advertising_Interval_Min; + uint16_t Advertising_Interval_Max; + uint8_t Own_Address_Type; + uint8_t Advertising_Filter_Policy; + uint8_t Local_Name_Length; + uint8_t Local_Name[BLE_CMD_MAX_PARAM_LEN - 13]; +} aci_gap_set_discoverable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Service_Uuid_length; + uint8_t Service_Uuid_List[BLE_CMD_MAX_PARAM_LEN - 13]; +} aci_gap_set_discoverable_cp1; + +typedef __PACKED_STRUCT +{ + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; +} aci_gap_set_discoverable_cp2; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_discoverable_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Own_Address_Type; + uint8_t Directed_Advertising_Type; + uint8_t Direct_Address_Type; + uint8_t Direct_Address[6]; + uint16_t Advertising_Interval_Min; + uint16_t Advertising_Interval_Max; +} aci_gap_set_direct_connectable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_direct_connectable_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t IO_Capability; +} aci_gap_set_io_capability_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_io_capability_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Bonding_Mode; + uint8_t MITM_Mode; + uint8_t SC_Support; + uint8_t KeyPress_Notification_Support; + uint8_t Min_Encryption_Key_Size; + uint8_t Max_Encryption_Key_Size; + uint8_t Use_Fixed_Pin; + uint32_t Fixed_Pin; + uint8_t Identity_Address_Type; +} aci_gap_set_authentication_requirement_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_authentication_requirement_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Authorization_Enable; +} aci_gap_set_authorization_requirement_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_authorization_requirement_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint32_t Pass_Key; +} aci_gap_pass_key_resp_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_pass_key_resp_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Authorize; +} aci_gap_authorization_resp_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_authorization_resp_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Role; + uint8_t privacy_enabled; + uint8_t device_name_char_len; +} aci_gap_init_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Service_Handle; + uint16_t Dev_Name_Char_Handle; + uint16_t Appearance_Char_Handle; +} aci_gap_init_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Event_Type; + uint8_t Own_Address_Type; +} aci_gap_set_non_connectable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_non_connectable_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Advertising_Interval_Min; + uint16_t Advertising_Interval_Max; + uint8_t Own_Address_Type; + uint8_t Adv_Filter_Policy; +} aci_gap_set_undirected_connectable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_undirected_connectable_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gap_peripheral_security_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_peripheral_security_req_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t AdvDataLen; + uint8_t AdvData[BLE_CMD_MAX_PARAM_LEN - 1]; +} aci_gap_update_adv_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_update_adv_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t ADType; +} aci_gap_delete_ad_type_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_delete_ad_type_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gap_get_security_level_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Security_Mode; + uint8_t Security_Level; +} aci_gap_get_security_level_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t GAP_Evt_Mask; +} aci_gap_set_event_mask_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_event_mask_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_configure_filter_accept_list_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Reason; +} aci_gap_terminate_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_terminate_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_clear_security_db_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gap_allow_rebond_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_allow_rebond_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t Own_Address_Type; + uint8_t Filter_Duplicates; +} aci_gap_start_limited_discovery_proc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_start_limited_discovery_proc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t Own_Address_Type; + uint8_t Filter_Duplicates; +} aci_gap_start_general_discovery_proc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_start_general_discovery_proc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t Own_Address_Type; + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; + uint16_t Conn_Latency; + uint16_t Supervision_Timeout; + uint16_t Minimum_CE_Length; + uint16_t Maximum_CE_Length; + uint8_t Num_of_Peer_Entries; + Peer_Entry_t Peer_Entry[(BLE_CMD_MAX_PARAM_LEN - 18)/sizeof(Peer_Entry_t)]; +} aci_gap_start_auto_connection_establish_proc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_start_auto_connection_establish_proc_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t LE_Scan_Type; + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t Own_Address_Type; + uint8_t Scanning_Filter_Policy; + uint8_t Filter_Duplicates; +} aci_gap_start_general_connection_establish_proc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_start_general_connection_establish_proc_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t LE_Scan_Type; + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t Own_Address_Type; + uint8_t Scanning_Filter_Policy; + uint8_t Filter_Duplicates; + uint8_t Num_of_Peer_Entries; + Peer_Entry_t Peer_Entry[(BLE_CMD_MAX_PARAM_LEN - 9)/sizeof(Peer_Entry_t)]; +} aci_gap_start_selective_connection_establish_proc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_start_selective_connection_establish_proc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint8_t Own_Address_Type; + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; + uint16_t Conn_Latency; + uint16_t Supervision_Timeout; + uint16_t Minimum_CE_Length; + uint16_t Maximum_CE_Length; +} aci_gap_create_connection_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_create_connection_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Procedure_Code; +} aci_gap_terminate_gap_proc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_terminate_gap_proc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; + uint16_t Conn_Latency; + uint16_t Supervision_Timeout; + uint16_t Minimum_CE_Length; + uint16_t Maximum_CE_Length; +} aci_gap_start_connection_update_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_start_connection_update_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Force_Rebond; +} aci_gap_send_pairing_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_send_pairing_req_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Advertising_Interval_Min; + uint16_t Advertising_Interval_Max; + uint8_t Advertising_Type; + uint8_t Own_Address_Type; + uint8_t Adv_Data_Length; + uint8_t Adv_Data[BLE_CMD_MAX_PARAM_LEN - 8]; +} aci_gap_set_broadcast_mode_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Num_of_Peer_Entries; + Peer_Entry_t Peer_Entry[(BLE_CMD_MAX_PARAM_LEN - 8)/sizeof(Peer_Entry_t)]; +} aci_gap_set_broadcast_mode_cp1; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_broadcast_mode_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t LE_Scan_Interval; + uint16_t LE_Scan_Window; + uint8_t LE_Scan_Type; + uint8_t Own_Address_Type; + uint8_t Filter_Duplicates; + uint8_t Scanning_Filter_Policy; +} aci_gap_start_observation_proc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_start_observation_proc_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Num_of_Addresses; + Bonded_Device_Entry_t Bonded_Device_Entry[((BLE_EVT_MAX_PARAM_LEN - 3) - 2)/sizeof(Bonded_Device_Entry_t)]; +} aci_gap_get_bonded_devices_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; +} aci_gap_check_bonded_device_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Id_Address_Type; + uint8_t Id_Address[6]; +} aci_gap_check_bonded_device_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Confirm_Yes_No; +} aci_gap_numeric_comparison_value_confirm_yesno_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_numeric_comparison_value_confirm_yesno_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Input_Type; +} aci_gap_passkey_input_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_passkey_input_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t OOB_Data_Type; +} aci_gap_get_oob_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Address_Type; + uint8_t Address[6]; + uint8_t OOB_Data_Type; + uint8_t OOB_Data_Len; + uint8_t OOB_Data[16]; +} aci_gap_get_oob_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Device_Type; + uint8_t Address_Type; + uint8_t Address[6]; + uint8_t OOB_Data_Type; + uint8_t OOB_Data_Len; + uint8_t OOB_Data[16]; +} aci_gap_set_oob_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_set_oob_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Peer_Identity_Address_Type; + uint8_t Peer_Identity_Address[6]; +} aci_gap_remove_bonded_device_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_remove_bonded_device_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Num_of_List_Entries; + List_Entry_t List_Entry[(BLE_CMD_MAX_PARAM_LEN - 2)/sizeof(List_Entry_t)]; +} aci_gap_add_devices_to_list_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Mode; +} aci_gap_add_devices_to_list_cp1; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_add_devices_to_list_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Accept; +} aci_gap_pairing_request_reply_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_pairing_request_reply_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Adv_Interval_Min; + uint16_t Adv_Interval_Max; + uint8_t Adv_Channel_Map; + uint8_t Own_Address_Type; + uint8_t Own_Address[6]; + uint8_t PA_Level; +} aci_gap_additional_beacon_start_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_additional_beacon_start_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_additional_beacon_stop_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Adv_Data_Length; + uint8_t Adv_Data[BLE_CMD_MAX_PARAM_LEN - 1]; +} aci_gap_additional_beacon_set_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_additional_beacon_set_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Adv_Mode; + uint8_t Advertising_Handle; + uint16_t Adv_Event_Properties; + uint32_t Primary_Adv_Interval_Min; + uint32_t Primary_Adv_Interval_Max; + uint8_t Primary_Adv_Channel_Map; + uint8_t Own_Address_Type; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint8_t Adv_Filter_Policy; + uint8_t Adv_TX_Power; + uint8_t Secondary_Adv_Max_Skip; + uint8_t Secondary_Adv_PHY; + uint8_t Adv_SID; + uint8_t Scan_Req_Notification_Enable; +} aci_gap_adv_set_configuration_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_adv_set_configuration_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Enable; + uint8_t Num_Sets; + Adv_Set_t Adv_Set[(BLE_CMD_MAX_PARAM_LEN - 2)/sizeof(Adv_Set_t)]; +} aci_gap_adv_set_enable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_adv_set_enable_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; + uint8_t Operation; + uint8_t Fragment_Preference; + uint8_t Advertising_Data_Length; + uint8_t Advertising_Data[BLE_CMD_MAX_PARAM_LEN - 4]; +} aci_gap_adv_set_adv_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_adv_set_adv_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; + uint8_t Operation; + uint8_t Fragment_Preference; + uint8_t Scan_Response_Data_Length; + uint8_t Scan_Response_Data[BLE_CMD_MAX_PARAM_LEN - 4]; +} aci_gap_adv_set_scan_resp_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_adv_set_scan_resp_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; +} aci_gap_adv_remove_set_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_adv_remove_set_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_adv_clear_sets_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; + uint8_t Random_Address[6]; +} aci_gap_adv_set_random_address_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_adv_set_random_address_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Scan_Mode; + uint8_t Procedure; + uint8_t Own_Address_Type; + uint8_t Filter_Duplicates; + uint16_t Duration; + uint16_t Period; + uint8_t Scanning_Filter_Policy; + uint8_t Scanning_PHYs; + Scan_Param_Phy_t Scan_Param_Phy[2]; +} aci_gap_ext_start_scan_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_ext_start_scan_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Initiating_Mode; + uint8_t Procedure; + uint8_t Own_Address_Type; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint8_t Advertising_Handle; + uint8_t Subevent; + uint8_t Initiator_Filter_Policy; + uint8_t Initiating_PHYs; + Init_Param_Phy_t Init_Param_Phy[3]; +} aci_gap_ext_create_connection_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gap_ext_create_connection_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_init_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Service_UUID_Type; + Service_UUID_t Service_UUID; +} aci_gatt_add_service_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Service_Type; + uint8_t Max_Attribute_Records; +} aci_gatt_add_service_cp1; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Service_Handle; +} aci_gatt_add_service_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Service_Handle; + uint16_t Include_Start_Handle; + uint16_t Include_End_Handle; + uint8_t Include_UUID_Type; + Include_UUID_t Include_UUID; +} aci_gatt_include_service_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Include_Handle; +} aci_gatt_include_service_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Service_Handle; + uint8_t Char_UUID_Type; + Char_UUID_t Char_UUID; +} aci_gatt_add_char_cp0; + +typedef __PACKED_STRUCT +{ + uint16_t Char_Value_Length; + uint8_t Char_Properties; + uint8_t Security_Permissions; + uint8_t GATT_Evt_Mask; + uint8_t Enc_Key_Size; + uint8_t Is_Variable; +} aci_gatt_add_char_cp1; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Char_Handle; +} aci_gatt_add_char_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Service_Handle; + uint16_t Char_Handle; + uint8_t Char_Desc_Uuid_Type; + Char_Desc_Uuid_t Char_Desc_Uuid; +} aci_gatt_add_char_desc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Char_Desc_Value_Max_Len; + uint8_t Char_Desc_Value_Length; + uint8_t Char_Desc_Value[BLE_CMD_MAX_PARAM_LEN - 12]; +} aci_gatt_add_char_desc_cp1; + +typedef __PACKED_STRUCT +{ + uint8_t Security_Permissions; + uint8_t Access_Permissions; + uint8_t GATT_Evt_Mask; + uint8_t Enc_Key_Size; + uint8_t Is_Variable; +} aci_gatt_add_char_desc_cp2; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Char_Desc_Handle; +} aci_gatt_add_char_desc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Service_Handle; + uint16_t Char_Handle; + uint8_t Val_Offset; + uint8_t Char_Value_Length; + uint8_t Char_Value[BLE_CMD_MAX_PARAM_LEN - 6]; +} aci_gatt_update_char_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_update_char_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Serv_Handle; + uint16_t Char_Handle; +} aci_gatt_del_char_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_del_char_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Serv_Handle; +} aci_gatt_del_service_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_del_service_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Serv_Handle; + uint16_t Include_Handle; +} aci_gatt_del_include_service_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_del_include_service_rp0; + +typedef __PACKED_STRUCT +{ + uint32_t GATT_Evt_Mask; +} aci_gatt_set_event_mask_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_set_event_mask_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gatt_exchange_config_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_exchange_config_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Start_Handle; + uint16_t End_Handle; +} aci_att_find_info_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_att_find_info_req_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Start_Handle; + uint16_t End_Handle; + uint16_t UUID; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 9]; +} aci_att_find_by_type_value_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_att_find_by_type_value_req_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Start_Handle; + uint16_t End_Handle; + uint8_t UUID_Type; + UUID_t UUID; +} aci_att_read_by_type_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_att_read_by_type_req_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Start_Handle; + uint16_t End_Handle; + uint8_t UUID_Type; + UUID_t UUID; +} aci_att_read_by_group_type_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_att_read_by_group_type_req_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint16_t Val_Offset; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 7]; +} aci_att_prepare_write_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_att_prepare_write_req_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Execute; +} aci_att_execute_write_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_att_execute_write_req_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gatt_disc_all_primary_services_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_disc_all_primary_services_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t UUID_Type; + UUID_t UUID; +} aci_gatt_disc_primary_service_by_uuid_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_disc_primary_service_by_uuid_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Start_Handle; + uint16_t End_Handle; +} aci_gatt_find_included_services_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_find_included_services_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Start_Handle; + uint16_t End_Handle; +} aci_gatt_disc_all_char_of_service_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_disc_all_char_of_service_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Start_Handle; + uint16_t End_Handle; + uint8_t UUID_Type; + UUID_t UUID; +} aci_gatt_disc_char_by_uuid_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_disc_char_by_uuid_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Char_Handle; + uint16_t End_Handle; +} aci_gatt_disc_all_char_desc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_disc_all_char_desc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; +} aci_gatt_read_char_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_read_char_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Start_Handle; + uint16_t End_Handle; + uint8_t UUID_Type; + UUID_t UUID; +} aci_gatt_read_using_char_uuid_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_read_using_char_uuid_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint16_t Val_Offset; +} aci_gatt_read_long_char_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_read_long_char_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Number_of_Handles; + Handle_Entry_t Handle_Entry[(BLE_CMD_MAX_PARAM_LEN - 3)/sizeof(Handle_Entry_t)]; +} aci_gatt_read_multiple_char_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_read_multiple_char_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 5]; +} aci_gatt_write_char_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_write_char_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint16_t Val_Offset; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 7]; +} aci_gatt_write_long_char_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_write_long_char_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint16_t Val_Offset; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 7]; +} aci_gatt_write_char_reliable_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_write_char_reliable_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint16_t Val_Offset; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 7]; +} aci_gatt_write_long_char_desc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_write_long_char_desc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint16_t Val_Offset; +} aci_gatt_read_long_char_desc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_read_long_char_desc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 5]; +} aci_gatt_write_char_desc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_write_char_desc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; +} aci_gatt_read_char_desc_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_read_char_desc_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 5]; +} aci_gatt_write_without_resp_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_write_without_resp_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 5]; +} aci_gatt_signed_write_without_resp_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_signed_write_without_resp_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gatt_confirm_indication_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_confirm_indication_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint8_t Write_status; + uint8_t Error_Code; + uint8_t Attribute_Val_Length; + uint8_t Attribute_Val[BLE_CMD_MAX_PARAM_LEN - 7]; +} aci_gatt_write_resp_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_write_resp_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gatt_allow_read_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_allow_read_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Serv_Handle; + uint16_t Attr_Handle; + uint8_t Security_Permissions; +} aci_gatt_set_security_permission_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_set_security_permission_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Serv_Handle; + uint16_t Char_Handle; + uint16_t Char_Desc_Handle; + uint16_t Val_Offset; + uint8_t Char_Desc_Value_Length; + uint8_t Char_Desc_Value[BLE_CMD_MAX_PARAM_LEN - 9]; +} aci_gatt_set_desc_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_set_desc_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Attr_Handle; + uint16_t Offset; + uint16_t Value_Length_Requested; +} aci_gatt_read_handle_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Length; + uint16_t Value_Length; + uint8_t Value[(BLE_EVT_MAX_PARAM_LEN - 3) - 5]; +} aci_gatt_read_handle_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Conn_Handle_To_Notify; + uint16_t Service_Handle; + uint16_t Char_Handle; + uint8_t Update_Type; + uint16_t Char_Length; + uint16_t Value_Offset; + uint8_t Value_Length; + uint8_t Value[BLE_CMD_MAX_PARAM_LEN - 12]; +} aci_gatt_update_char_value_ext_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_update_char_value_ext_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Error_Code; +} aci_gatt_deny_read_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_deny_read_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Serv_Handle; + uint16_t Attr_Handle; + uint8_t Access_Permissions; +} aci_gatt_set_access_permission_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_set_access_permission_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_store_db_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Number_of_Handles; + Handle_Entry_t Handle_Entry[(BLE_CMD_MAX_PARAM_LEN - 3)/sizeof(Handle_Entry_t)]; +} aci_gatt_send_mult_notification_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_send_mult_notification_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Number_of_Handles; + Handle_Entry_t Handle_Entry[(BLE_CMD_MAX_PARAM_LEN - 3)/sizeof(Handle_Entry_t)]; +} aci_gatt_read_multiple_var_char_value_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_gatt_read_multiple_var_char_value_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; + uint16_t Latency; + uint16_t Timeout_Multiplier; +} aci_l2cap_connection_parameter_update_req_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_l2cap_connection_parameter_update_req_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Conn_Interval_Min; + uint16_t Conn_Interval_Max; + uint16_t Latency; + uint16_t Timeout_Multiplier; + uint16_t Minimum_CE_Length; + uint16_t Maximum_CE_Length; + uint8_t Identifier; + uint8_t Accept; +} aci_l2cap_connection_parameter_update_resp_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_l2cap_connection_parameter_update_resp_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t SPSM; + uint16_t MTU; + uint16_t MPS; + uint16_t Initial_Credits; + uint8_t Channel_Number; +} aci_l2cap_coc_connect_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_l2cap_coc_connect_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t MTU; + uint16_t MPS; + uint16_t Initial_Credits; + uint16_t Result; + uint8_t Max_Channel_Number; +} aci_l2cap_coc_connect_confirm_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Channel_Number; + uint8_t Channel_Index_List[(BLE_EVT_MAX_PARAM_LEN - 3) - 2]; +} aci_l2cap_coc_connect_confirm_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t MTU; + uint16_t MPS; + uint8_t Channel_Number; + uint8_t Channel_Index_List[BLE_CMD_MAX_PARAM_LEN - 7]; +} aci_l2cap_coc_reconf_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_l2cap_coc_reconf_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Result; +} aci_l2cap_coc_reconf_confirm_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_l2cap_coc_reconf_confirm_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Channel_Index; +} aci_l2cap_coc_disconnect_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_l2cap_coc_disconnect_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Channel_Index; + uint16_t Credits; +} aci_l2cap_coc_flow_control_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_l2cap_coc_flow_control_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Channel_Index; + uint16_t Length; + uint8_t Data[BLE_CMD_MAX_PARAM_LEN - 3]; +} aci_l2cap_coc_tx_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_l2cap_coc_tx_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Mode; + uint32_t Options; +} aci_reset_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_reset_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint32_t Version[2]; + uint32_t Options; + uint32_t Debug_Info[3]; +} aci_get_information_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Offset; + uint8_t Length; + uint8_t Value[BLE_CMD_MAX_PARAM_LEN - 2]; +} aci_write_config_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; +} aci_write_config_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Offset; +} aci_read_config_data_cp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 3) - 2]; +} aci_read_config_data_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t Reason; +} hci_disconnection_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t Encryption_Enabled; +} hci_encryption_change_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t Version; + uint16_t Manufacturer_Name; + uint16_t Subversion; +} hci_read_remote_version_information_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Hardware_Code; +} hci_hardware_error_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Number_of_Handles; + Handle_Packets_Pair_Entry_t Handle_Packets_Pair_Entry[(BLE_EVT_MAX_PARAM_LEN - 1)/sizeof(Handle_Packets_Pair_Entry_t)]; +} hci_number_of_completed_packets_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; +} hci_encryption_key_refresh_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t Role; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint16_t Conn_Interval; + uint16_t Conn_Latency; + uint16_t Supervision_Timeout; + uint8_t Central_Clock_Accuracy; +} hci_le_connection_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Num_Reports; + Advertising_Report_t Advertising_Report[((BLE_EVT_MAX_PARAM_LEN - 1) - 1)/sizeof(Advertising_Report_t)]; +} hci_le_advertising_report_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint16_t Conn_Interval; + uint16_t Conn_Latency; + uint16_t Supervision_Timeout; +} hci_le_connection_update_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t LE_Features[8]; +} hci_le_read_remote_features_page_0_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Random_Number[8]; + uint16_t Encrypted_Diversifier; +} hci_le_long_term_key_request_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t MaxTxOctets; + uint16_t MaxTxTime; + uint16_t MaxRxOctets; + uint16_t MaxRxTime; +} hci_le_data_length_change_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Local_P256_Public_Key[64]; +} hci_le_read_local_p256_public_key_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t DHKey[32]; +} hci_le_generate_dhkey_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t Role; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; + uint8_t Local_Resolvable_Private_Address[6]; + uint8_t Peer_Resolvable_Private_Address[6]; + uint16_t Conn_Interval; + uint16_t Conn_Latency; + uint16_t Supervision_Timeout; + uint8_t Central_Clock_Accuracy; +} hci_le_enhanced_connection_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Num_Reports; + Direct_Advertising_Report_t Direct_Advertising_Report[((BLE_EVT_MAX_PARAM_LEN - 1) - 1)/sizeof(Direct_Advertising_Report_t)]; +} hci_le_directed_advertising_report_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint16_t Connection_Handle; + uint8_t TX_PHY; + uint8_t RX_PHY; +} hci_le_phy_update_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Num_Reports; + uint16_t Event_Type; + uint8_t Address_Type; + uint8_t Address[6]; + uint8_t Primary_PHY; + uint8_t Secondary_PHY; + uint8_t Advertising_SID; + uint8_t TX_Power; + uint8_t RSSI; + uint16_t Periodic_Adv_Interval; + uint8_t Direct_Address_Type; + uint8_t Direct_Address[6]; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 1) - 25]; +} hci_le_extended_advertising_report_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Status; + uint8_t Advertising_Handle; + uint16_t Connection_Handle; + uint8_t Num_Completed_Ext_Adv_Events; +} hci_le_advertising_set_terminated_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Advertising_Handle; + uint8_t Scanner_Address_Type; + uint8_t Scanner_Address[6]; +} hci_le_scan_request_received_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Channel_Selection_Algorithm; +} hci_le_channel_selection_algorithm_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Last_State; + uint8_t Next_State; + uint32_t Next_State_SysTime; + uint8_t Last_State_Slot; + uint8_t Next_State_Slot; +} aci_hal_end_of_radio_activity_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t RSSI; + uint8_t Peer_Address_Type; + uint8_t Peer_Address[6]; +} aci_hal_scan_req_report_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Warning_Type; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 2]; +} aci_warning_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Status; + uint8_t Reason; +} aci_gap_pairing_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gap_pass_key_req_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gap_authorization_req_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gap_bond_lost_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Procedure_Code; + uint8_t Status; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 3]; +} aci_gap_proc_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gap_addr_not_resolved_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint32_t Numeric_Value; +} aci_gap_numeric_comparison_value_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Notification_Type; +} aci_gap_keypress_notification_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Bonded; + uint8_t Auth_Req; +} aci_gap_pairing_request_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Result; +} aci_l2cap_connection_update_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 3]; +} aci_l2cap_proc_timeout_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Identifier; + uint16_t L2CAP_Length; + uint16_t Interval_Min; + uint16_t Interval_Max; + uint16_t Latency; + uint16_t Timeout_Multiplier; +} aci_l2cap_connection_update_req_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Identifier; + uint16_t Reason; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 6]; +} aci_l2cap_command_reject_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t SPSM; + uint16_t MTU; + uint16_t MPS; + uint16_t Initial_Credits; + uint8_t Channel_Number; +} aci_l2cap_coc_connect_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t MTU; + uint16_t MPS; + uint16_t Initial_Credits; + uint16_t Result; + uint8_t Channel_Number; + uint8_t Channel_Index_List[(BLE_EVT_MAX_PARAM_LEN - 2) - 11]; +} aci_l2cap_coc_connect_confirm_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t MTU; + uint16_t MPS; + uint8_t Channel_Number; + uint8_t Channel_Index_List[(BLE_EVT_MAX_PARAM_LEN - 2) - 7]; +} aci_l2cap_coc_reconf_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Result; +} aci_l2cap_coc_reconf_confirm_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Channel_Index; +} aci_l2cap_coc_disconnect_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Channel_Index; + uint16_t Credits; +} aci_l2cap_coc_flow_control_event_rp0; + +typedef __PACKED_STRUCT +{ + uint8_t Channel_Index; + uint16_t Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 3]; +} aci_l2cap_coc_rx_data_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attr_Handle; + uint16_t Offset; + uint16_t Attr_Data_Length; + uint8_t Attr_Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 8]; +} aci_gatt_attribute_modified_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gatt_proc_timeout_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Server_RX_MTU; +} aci_att_exchange_mtu_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Format; + uint8_t Event_Data_Length; + uint8_t Handle_UUID_Pair[(BLE_EVT_MAX_PARAM_LEN - 2) - 4]; +} aci_att_find_info_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Num_of_Handle_Pair; + Attribute_Group_Handle_Pair_t Attribute_Group_Handle_Pair[((BLE_EVT_MAX_PARAM_LEN - 2) - 3)/sizeof(Attribute_Group_Handle_Pair_t)]; +} aci_att_find_by_type_value_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Handle_Value_Pair_Length; + uint8_t Data_Length; + uint8_t Handle_Value_Pair_Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 4]; +} aci_att_read_by_type_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Event_Data_Length; + uint8_t Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 3]; +} aci_att_read_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Event_Data_Length; + uint8_t Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 3]; +} aci_att_read_blob_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Event_Data_Length; + uint8_t Set_Of_Values[(BLE_EVT_MAX_PARAM_LEN - 2) - 3]; +} aci_att_read_multiple_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Attribute_Data_Length; + uint8_t Data_Length; + uint8_t Attribute_Data_List[(BLE_EVT_MAX_PARAM_LEN - 2) - 4]; +} aci_att_read_by_group_type_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint16_t Offset; + uint8_t Part_Attribute_Value_Length; + uint8_t Part_Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 7]; +} aci_att_prepare_write_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_att_exec_write_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint8_t Attribute_Value_Length; + uint8_t Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 5]; +} aci_gatt_indication_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint8_t Attribute_Value_Length; + uint8_t Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 5]; +} aci_gatt_notification_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Error_Code; +} aci_gatt_proc_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Req_Opcode; + uint16_t Attribute_Handle; + uint8_t Error_Code; +} aci_gatt_error_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint8_t Attribute_Value_Length; + uint8_t Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 5]; +} aci_gatt_disc_read_char_by_uuid_resp_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 5]; +} aci_gatt_write_permit_req_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint16_t Offset; +} aci_gatt_read_permit_req_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Number_of_Handles; + Handle_Item_t Handle_Item[((BLE_EVT_MAX_PARAM_LEN - 2) - 3)/sizeof(Handle_Item_t)]; +} aci_gatt_read_multi_permit_req_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Available_Buffers; +} aci_gatt_tx_pool_available_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; +} aci_gatt_server_confirmation_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint16_t Offset; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 7]; +} aci_gatt_prepare_write_permit_req_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint8_t Channel_Index; + uint8_t EAB_State; + uint16_t MTU; +} aci_gatt_eatt_bearer_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Offset; + uint16_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 6]; +} aci_gatt_mult_notification_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Attr_Handle; +} aci_gatt_notification_complete_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Offset; + uint16_t Event_Data_Length; + uint8_t Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 6]; +} aci_gatt_read_ext_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint16_t Offset; + uint16_t Attribute_Value_Length; + uint8_t Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 8]; +} aci_gatt_indication_ext_event_rp0; + +typedef __PACKED_STRUCT +{ + uint16_t Connection_Handle; + uint16_t Attribute_Handle; + uint16_t Offset; + uint16_t Attribute_Value_Length; + uint8_t Attribute_Value[(BLE_EVT_MAX_PARAM_LEN - 2) - 8]; +} aci_gatt_notification_ext_event_rp0; + + +#endif /* BLE_TYPES_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h new file mode 100644 index 0000000..9dd46b0 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/auto/ble_vs_codes.h @@ -0,0 +1,200 @@ +/***************************************************************************** + * @file ble_vs_codes.h + * @brief STM32WB BLE API (vendor specific event codes) + * Auto-generated file: do not edit! + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_VS_CODES_H__ +#define BLE_VS_CODES_H__ + + +/* Vendor specific codes of ACI General events + */ + +/* ACI_WARNING_EVENT code */ +#define ACI_WARNING_VSEVT_CODE 0x0006U + +/* Vendor specific codes of ACI GAP events + */ + +/* ACI_GAP_LIMITED_DISCOVERABLE_EVENT code */ +#define ACI_GAP_LIMITED_DISCOVERABLE_VSEVT_CODE 0x0400U + +/* ACI_GAP_PAIRING_COMPLETE_EVENT code */ +#define ACI_GAP_PAIRING_COMPLETE_VSEVT_CODE 0x0401U + +/* ACI_GAP_PASS_KEY_REQ_EVENT code */ +#define ACI_GAP_PASS_KEY_REQ_VSEVT_CODE 0x0402U + +/* ACI_GAP_AUTHORIZATION_REQ_EVENT code */ +#define ACI_GAP_AUTHORIZATION_REQ_VSEVT_CODE 0x0403U + +/* ACI_GAP_BOND_LOST_EVENT code */ +#define ACI_GAP_BOND_LOST_VSEVT_CODE 0x0405U + +/* ACI_GAP_PROC_COMPLETE_EVENT code */ +#define ACI_GAP_PROC_COMPLETE_VSEVT_CODE 0x0407U + +/* ACI_GAP_ADDR_NOT_RESOLVED_EVENT code */ +#define ACI_GAP_ADDR_NOT_RESOLVED_VSEVT_CODE 0x0408U + +/* ACI_GAP_NUMERIC_COMPARISON_VALUE_EVENT code */ +#define ACI_GAP_NUMERIC_COMPARISON_VALUE_VSEVT_CODE 0x0409U + +/* ACI_GAP_KEYPRESS_NOTIFICATION_EVENT code */ +#define ACI_GAP_KEYPRESS_NOTIFICATION_VSEVT_CODE 0x040AU + +/* ACI_GAP_PAIRING_REQUEST_EVENT code */ +#define ACI_GAP_PAIRING_REQUEST_VSEVT_CODE 0x040BU + +/* Vendor specific codes of ACI GATT/ATT events + */ + +/* ACI_GATT_ATTRIBUTE_MODIFIED_EVENT code */ +#define ACI_GATT_ATTRIBUTE_MODIFIED_VSEVT_CODE 0x0C01U + +/* ACI_GATT_PROC_TIMEOUT_EVENT code */ +#define ACI_GATT_PROC_TIMEOUT_VSEVT_CODE 0x0C02U + +/* ACI_ATT_EXCHANGE_MTU_RESP_EVENT code */ +#define ACI_ATT_EXCHANGE_MTU_RESP_VSEVT_CODE 0x0C03U + +/* ACI_ATT_FIND_INFO_RESP_EVENT code */ +#define ACI_ATT_FIND_INFO_RESP_VSEVT_CODE 0x0C04U + +/* ACI_ATT_FIND_BY_TYPE_VALUE_RESP_EVENT code */ +#define ACI_ATT_FIND_BY_TYPE_VALUE_RESP_VSEVT_CODE 0x0C05U + +/* ACI_ATT_READ_BY_TYPE_RESP_EVENT code */ +#define ACI_ATT_READ_BY_TYPE_RESP_VSEVT_CODE 0x0C06U + +/* ACI_ATT_READ_RESP_EVENT code */ +#define ACI_ATT_READ_RESP_VSEVT_CODE 0x0C07U + +/* ACI_ATT_READ_BLOB_RESP_EVENT code */ +#define ACI_ATT_READ_BLOB_RESP_VSEVT_CODE 0x0C08U + +/* ACI_ATT_READ_MULTIPLE_RESP_EVENT code */ +#define ACI_ATT_READ_MULTIPLE_RESP_VSEVT_CODE 0x0C09U + +/* ACI_ATT_READ_BY_GROUP_TYPE_RESP_EVENT code */ +#define ACI_ATT_READ_BY_GROUP_TYPE_RESP_VSEVT_CODE 0x0C0AU + +/* ACI_ATT_PREPARE_WRITE_RESP_EVENT code */ +#define ACI_ATT_PREPARE_WRITE_RESP_VSEVT_CODE 0x0C0CU + +/* ACI_ATT_EXEC_WRITE_RESP_EVENT code */ +#define ACI_ATT_EXEC_WRITE_RESP_VSEVT_CODE 0x0C0DU + +/* ACI_GATT_INDICATION_EVENT code */ +#define ACI_GATT_INDICATION_VSEVT_CODE 0x0C0EU + +/* ACI_GATT_NOTIFICATION_EVENT code */ +#define ACI_GATT_NOTIFICATION_VSEVT_CODE 0x0C0FU + +/* ACI_GATT_PROC_COMPLETE_EVENT code */ +#define ACI_GATT_PROC_COMPLETE_VSEVT_CODE 0x0C10U + +/* ACI_GATT_ERROR_RESP_EVENT code */ +#define ACI_GATT_ERROR_RESP_VSEVT_CODE 0x0C11U + +/* ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_EVENT code */ +#define ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_VSEVT_CODE 0x0C12U + +/* ACI_GATT_WRITE_PERMIT_REQ_EVENT code */ +#define ACI_GATT_WRITE_PERMIT_REQ_VSEVT_CODE 0x0C13U + +/* ACI_GATT_READ_PERMIT_REQ_EVENT code */ +#define ACI_GATT_READ_PERMIT_REQ_VSEVT_CODE 0x0C14U + +/* ACI_GATT_READ_MULTI_PERMIT_REQ_EVENT code */ +#define ACI_GATT_READ_MULTI_PERMIT_REQ_VSEVT_CODE 0x0C15U + +/* ACI_GATT_TX_POOL_AVAILABLE_EVENT code */ +#define ACI_GATT_TX_POOL_AVAILABLE_VSEVT_CODE 0x0C16U + +/* ACI_GATT_SERVER_CONFIRMATION_EVENT code */ +#define ACI_GATT_SERVER_CONFIRMATION_VSEVT_CODE 0x0C17U + +/* ACI_GATT_PREPARE_WRITE_PERMIT_REQ_EVENT code */ +#define ACI_GATT_PREPARE_WRITE_PERMIT_REQ_VSEVT_CODE 0x0C18U + +/* ACI_GATT_EATT_BEARER_EVENT code */ +#define ACI_GATT_EATT_BEARER_VSEVT_CODE 0x0C19U + +/* ACI_GATT_MULT_NOTIFICATION_EVENT code */ +#define ACI_GATT_MULT_NOTIFICATION_VSEVT_CODE 0x0C1AU + +/* ACI_GATT_NOTIFICATION_COMPLETE_EVENT code */ +#define ACI_GATT_NOTIFICATION_COMPLETE_VSEVT_CODE 0x0C1BU + +/* ACI_GATT_READ_EXT_EVENT code */ +#define ACI_GATT_READ_EXT_VSEVT_CODE 0x0C1DU + +/* ACI_GATT_INDICATION_EXT_EVENT code */ +#define ACI_GATT_INDICATION_EXT_VSEVT_CODE 0x0C1EU + +/* ACI_GATT_NOTIFICATION_EXT_EVENT code */ +#define ACI_GATT_NOTIFICATION_EXT_VSEVT_CODE 0x0C1FU + +/* Vendor specific codes of ACI L2CAP events + */ + +/* ACI_L2CAP_CONNECTION_UPDATE_RESP_EVENT code */ +#define ACI_L2CAP_CONNECTION_UPDATE_RESP_VSEVT_CODE 0x0800U + +/* ACI_L2CAP_PROC_TIMEOUT_EVENT code */ +#define ACI_L2CAP_PROC_TIMEOUT_VSEVT_CODE 0x0801U + +/* ACI_L2CAP_CONNECTION_UPDATE_REQ_EVENT code */ +#define ACI_L2CAP_CONNECTION_UPDATE_REQ_VSEVT_CODE 0x0802U + +/* ACI_L2CAP_COMMAND_REJECT_EVENT code */ +#define ACI_L2CAP_COMMAND_REJECT_VSEVT_CODE 0x080AU + +/* ACI_L2CAP_COC_CONNECT_EVENT code */ +#define ACI_L2CAP_COC_CONNECT_VSEVT_CODE 0x0810U + +/* ACI_L2CAP_COC_CONNECT_CONFIRM_EVENT code */ +#define ACI_L2CAP_COC_CONNECT_CONFIRM_VSEVT_CODE 0x0811U + +/* ACI_L2CAP_COC_RECONF_EVENT code */ +#define ACI_L2CAP_COC_RECONF_VSEVT_CODE 0x0812U + +/* ACI_L2CAP_COC_RECONF_CONFIRM_EVENT code */ +#define ACI_L2CAP_COC_RECONF_CONFIRM_VSEVT_CODE 0x0813U + +/* ACI_L2CAP_COC_DISCONNECT_EVENT code */ +#define ACI_L2CAP_COC_DISCONNECT_VSEVT_CODE 0x0814U + +/* ACI_L2CAP_COC_FLOW_CONTROL_EVENT code */ +#define ACI_L2CAP_COC_FLOW_CONTROL_VSEVT_CODE 0x0815U + +/* ACI_L2CAP_COC_RX_DATA_EVENT code */ +#define ACI_L2CAP_COC_RX_DATA_VSEVT_CODE 0x0816U + +/* ACI_L2CAP_COC_TX_POOL_AVAILABLE_EVENT code */ +#define ACI_L2CAP_COC_TX_POOL_AVAILABLE_VSEVT_CODE 0x0817U + +/* Vendor specific codes of ACI HAL events + */ + +/* ACI_HAL_END_OF_RADIO_ACTIVITY_EVENT code */ +#define ACI_HAL_END_OF_RADIO_ACTIVITY_VSEVT_CODE 0x0004U + +/* ACI_HAL_SCAN_REQ_REPORT_EVENT code */ +#define ACI_HAL_SCAN_REQ_REPORT_VSEVT_CODE 0x0005U + + +#endif /* BLE_VS_CODES_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h new file mode 100644 index 0000000..a46a9dd --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_bufsize.h @@ -0,0 +1,182 @@ +/***************************************************************************** + * @file ble_bufsize.h + * + * @brief Definition of BLE stack buffers size + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_BUFSIZE_H__ +#define BLE_BUFSIZE_H__ + + +/* + * BLE_DEFAULT_ATT_MTU: minimum MTU value that GATT must support. + */ +#define BLE_DEFAULT_ATT_MTU 23 + +/* + * BLE_DEFAULT_MAX_ATT_SIZE: maximum attribute size. + */ +#define BLE_DEFAULT_MAX_ATT_SIZE 512 + +/* + * BLE_PREP_WRITE_X_ATT: compute how many Prepare Write Request are needed to + * write a characteristic with size 'max_att' when the used ATT_MTU value is + * equal to BLE_DEFAULT_ATT_MTU (23). + */ +#define BLE_PREP_WRITE_X_ATT(max_att) \ + (DIVC(max_att, BLE_DEFAULT_ATT_MTU - 5) * 2) + +/* + * BLE_DEFAULT_PREP_WRITE_LIST_SIZE: default minimum Prepare Write List size. + */ +#define BLE_DEFAULT_PREP_WRITE_LIST_SIZE \ + BLE_PREP_WRITE_X_ATT(BLE_DEFAULT_MAX_ATT_SIZE) + +/* + * BLE_MEM_BLOCK_X_MTU: compute how many memory blocks are needed to compose + * an ATT packet with ATT_MTU=mtu. + */ +#define BLE_MEM_BLOCK_SIZE 32 + +#if (SLAVE_ONLY != 0) || (BASIC_FEATURES != 0) +#define BLE_MEM_BLOCK_X_PTX(n_link) 0 +#else +#define BLE_MEM_BLOCK_X_PTX(n_link) (n_link) +#endif + +#define BLE_MEM_BLOCK_X_TX(mtu) \ + (DIVC((mtu) + 4U, BLE_MEM_BLOCK_SIZE) + 1) + +#define BLE_MEM_BLOCK_X_RX(mtu, n_link) \ + ((DIVC((mtu) + 4U, BLE_MEM_BLOCK_SIZE) + 2U) * (n_link) + 1) + +#define BLE_MEM_BLOCK_X_MTU(mtu, n_link) \ + (BLE_MEM_BLOCK_X_TX(mtu) + BLE_MEM_BLOCK_X_PTX(n_link) + \ + BLE_MEM_BLOCK_X_RX(mtu, n_link)) + +/* + * BLE_MBLOCKS_SECURE_CONNECTIONS: minimum number of blocks required for + * secure connections + */ +#define BLE_MBLOCKS_SECURE_CONNECTIONS 4 + +/* + * BLE_MBLOCKS_CALC: minimum number of buffers needed by the stack. + * This is the minimum racomanded value and depends on: + * - pw: size of Prepare Write List + * - mtu: ATT_MTU size + * - n_link: maximum number of simultaneous connections + */ +#define BLE_MBLOCKS_CALC(pw, mtu, n_link) \ + ((pw) + MAX(BLE_MEM_BLOCK_X_MTU(mtu, n_link), \ + BLE_MBLOCKS_SECURE_CONNECTIONS)) + +/* + * BLE_FIXED_BUFFER_SIZE_BYTES: + * A part of the RAM, is dynamically allocated by initializing all the pointers + * defined in a global context variable "mem_alloc_ctx_p". + * This initialization is made in the Dynamic_allocator functions, which + * assign a portion of RAM given by the external application to the above + * mentioned "global pointers". + * + * The size of this Dynamic RAM is made of 2 main components: + * - a part that is parameters-dependent (num of links, GATT buffers, ...), + * and which value is made explicit by the following macro; + * - a part, that may be considered "fixed", i.e. independent from the above + * mentioned parameters. +*/ +#if (BEACON_ONLY != 0) +#define BLE_FIXED_BUFFER_SIZE_BYTES 4200 /* Beacon only */ +#elif (LL_ONLY_BASIC != 0) +#define BLE_FIXED_BUFFER_SIZE_BYTES 5960 /* LL only Basic*/ +#elif (LL_ONLY != 0) +#define BLE_FIXED_BUFFER_SIZE_BYTES 6288 /* LL only Full */ +#elif (SLAVE_ONLY != 0) +#define BLE_FIXED_BUFFER_SIZE_BYTES 6408 /* Peripheral only */ +#elif (BASIC_FEATURES != 0) +#define BLE_FIXED_BUFFER_SIZE_BYTES 7184 /* Basic Features */ +#else +#define BLE_FIXED_BUFFER_SIZE_BYTES 7468 /* Full stack */ +#endif + +/* + * BLE_PER_LINK_SIZE_BYTES: additional memory size used per link + */ +#if (BEACON_ONLY != 0) +#define BLE_PER_LINK_SIZE_BYTES 76 /* Beacon only */ +#elif (LL_ONLY_BASIC != 0) +#define BLE_PER_LINK_SIZE_BYTES 244 /* LL only Basic */ +#elif (LL_ONLY != 0) +#define BLE_PER_LINK_SIZE_BYTES 244 /* LL only Full */ +#elif (SLAVE_ONLY != 0) +#define BLE_PER_LINK_SIZE_BYTES 392 /* Peripheral only */ +#elif (BASIC_FEATURES != 0) +#define BLE_PER_LINK_SIZE_BYTES 420 /* Basic Features */ +#else +#define BLE_PER_LINK_SIZE_BYTES 432 /* Full stack */ +#endif + +/* + * BLE_TOTAL_BUFFER_SIZE: this macro returns the amount of memory, in bytes, + * needed for the storage of data structures (except GATT database elements) + * whose size depends on the number of supported connections. + * + * @param n_link: Maximum number of simultaneous connections that the device + * will support. Valid values are from 1 to 8. + * + * @param mblocks_count: Number of memory blocks allocated for packets. + */ +#define BLE_TOTAL_BUFFER_SIZE(n_link, mblocks_count) \ + (16 + BLE_FIXED_BUFFER_SIZE_BYTES + \ + (BLE_PER_LINK_SIZE_BYTES * (n_link)) + \ + ((BLE_MEM_BLOCK_SIZE + 8) * (mblocks_count))) + +/* + * BLE_EXT_ADV_BUFFER_SIZE + * additional memory size used for Extended advertising; + * It has to be added to BLE_TOTAL_BUFFER_SIZE() if the Extended advertising + * feature is used. + * + * @param set_nbr: Maximum number of advertising sets. + * Valid values are from 1 to 8. + * + * @param data_len: Maximum size of advertising data. + * Valid values are from 31 to 1650. + */ +#define BLE_EXT_ADV_BUFFER_SIZE(set_nbr, data_len) \ + (2512 + ((892 + (DIVC(data_len, 207) * 244)) * (set_nbr))) + +/* + * BLE_TOTAL_BUFFER_SIZE_GATT: this macro returns the amount of memory, + * in bytes, needed for the storage of GATT database elements. + * + * @param num_gatt_attributes: Maximum number of Attributes (i.e. the number + * of characteristic + the number of characteristic values + the number of + * descriptors, excluding the services) that can be stored in the GATT + * database. Note that certain characteristics and relative descriptors are + * added automatically during device initialization so this parameters should + * be 9 plus the number of user Attributes + * + * @param num_gatt_services: Maximum number of Services that can be stored in + * the GATT database. Note that the GAP and GATT services are automatically + * added so this parameter should be 2 plus the number of user services + * + * @param att_value_array_size: Size of the storage area for Attribute values. + */ +#define BLE_TOTAL_BUFFER_SIZE_GATT(num_gatt_attributes, num_gatt_services, att_value_array_size) \ + (((((att_value_array_size) - 1) | 3) + 1) + \ + (40 * (num_gatt_attributes)) + (48 * (num_gatt_services))) + + +#endif /* BLE_BUFSIZE_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_core.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_core.h new file mode 100644 index 0000000..a0cba9e --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_core.h @@ -0,0 +1,42 @@ +/***************************************************************************** + * @file ble_core.h + * + * @brief This file contains the definitions for BLE stack + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_CORE_H__ +#define BLE_CORE_H__ + + +/* BLE standard definitions */ +#include "ble_std.h" + +/* BLE stack API definitions */ +#include "ble_defs.h" +#include "auto/ble_vs_codes.h" +#include "auto/ble_gap_aci.h" +#include "auto/ble_gatt_aci.h" +#include "auto/ble_hal_aci.h" +#include "auto/ble_hci_le.h" +#include "auto/ble_l2cap_aci.h" +#include "auto/ble_events.h" + +/* BLE stack buffer size definitions */ +#include "ble_bufsize.h" + +/* BLE stack legacy definitions */ +#include "ble_legacy.h" + + +#endif /* BLE_CORE_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h new file mode 100644 index 0000000..76dc75b --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_defs.h @@ -0,0 +1,507 @@ +/***************************************************************************** + * @file ble_defs.h + * + * @brief This file contains definitions used for BLE Stack interface. + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_DEFS_H__ +#define BLE_DEFS_H__ + + +/* ------------------------------------------------------------------------- */ + +/* Status codes */ + +/* Returned when the command has completed with success + */ +#define BLE_STATUS_SUCCESS 0x00U + +/* The remote device in in the Blacklist and the pairing operation it requested + * cannot be performed. + */ +#define BLE_STATUS_DEV_IN_BLACKLIST 0x59U + +/* CSRK not found during validation of an incoming signed packet + */ +#define BLE_STATUS_CSRK_NOT_FOUND 0x5AU + +/* IRK not found (Currently not used) + */ +#define BLE_STATUS_IRK_NOT_FOUND 0x5BU + +/* A search for a specific remote device was unsuccessful because no entry + * exists either into NVM Database or in volatile database. + */ +#define BLE_STATUS_DEV_NOT_FOUND 0x5CU + +/* The remote device is not bonded, and no operations related to bonded devices + * may be performed (e.g. writing Gatt Client data). + */ +#define BLE_STATUS_DEV_NOT_BONDED 0x5EU + +/* The attribute handle is invalid. + */ +#define BLE_STATUS_INVALID_HANDLE 0x60U + +/* There aren't sufficient Attributes handles available for allocation during + * creation of Services, Characteristics or Descriptors. + */ +#define BLE_STATUS_OUT_OF_HANDLE 0x61U + +/* The requested GATT operation is not allowed in this context/status or using + * the provided parameters. + * This is a specific GATT error, different from generic Not Allowed error, + * because it refers to specific GATT specifications/rules. + */ +#define BLE_STATUS_INVALID_OPERATION 0x62U + +/* The requested operation failed for a temporary lack of resources + * (e.g. packet pool or timers), but it may be retried later when resources may + * become available (packets or timers may have been released by other + * consumers). + */ +#define BLE_STATUS_INSUFFICIENT_RESOURCES 0x64U + +/* Notification/Indication can't be sent to the requested remote device because + * it doesn't satisfy the needed security permission. + */ +#define BLE_STATUS_SEC_PERMISSION_ERROR 0x65U + +/* The address of the device could not be resolved using the IRK stored\n + */ +#define BLE_STATUS_ADDRESS_NOT_RESOLVED 0x70U + +/* Returned when no valid slots are available + * (e.g. when there are no available state machines). + */ +#define BLE_STATUS_NO_VALID_SLOT 0x82U + +/* The only slot available is not long enough to satisfy scan window request. + */ +#define BLE_STATUS_SCAN_WINDOW_SHORT 0x83U + +/* Returned when the maximum requested interval to be allocated is shorter + * then the current anchor period and there is no submultiple for the + * current anchor period that is between the minimum and the maximum requested + * intervals. + */ +#define BLE_STATUS_NEW_INTERVAL_FAILED 0x84U + +/* Returned when the maximum requested interval to be allocated is greater + * than the current anchor period and there is no multiple of the anchor + * period that is between the minimum and the maximum requested intervals. + */ +#define BLE_STATUS_INTERVAL_TOO_LARGE 0x85U + +/* Returned when the current anchor period or a new one can be found that + * is compatible to the interval range requested by the new slot but the + * maximum available length that can be allocated is less than the minimum + * requested slot length. + */ +#define BLE_STATUS_LENGTH_FAILED 0x86U + +/* The Host failed while performing the requested operation. + */ +#define BLE_STATUS_FAILED 0x91U + +/* Invalid parameters in Host commands + */ +#define BLE_STATUS_INVALID_PARAMS 0x92U + +/* The Host is already processing another request received in advance. + */ +#define BLE_STATUS_BUSY 0x93U + +/* The operation requested cannot be completed immediately by the Host + * (usually because of lack of resources). + * The operation is generally put on hold by the caller and it's usually + * retried on later time. + */ +#define BLE_STATUS_PENDING 0x95U + +/* The requested operation violates the logic of the called layer/function or + * the format of the data to be processed during the operation. + */ +#define BLE_STATUS_ERROR 0x97U + +/* The requested operation failed because of lack of memory. + * Out of memory shall be returned for situations where memory will never + * become available again (e.g. ATT database) + */ +#define BLE_STATUS_OUT_OF_MEMORY 0x98U + +/* Returned when a timeout occurs at BLE application interface + */ +#define BLE_STATUS_TIMEOUT 0xFFU + +/* ------------------------------------------------------------------------- */ + +/* BLE stack options (Options) + * (ACI_RESET) + */ +#define BLE_OPTIONS_LL_ONLY 0x00000001UL +#define BLE_OPTIONS_NO_SVC_CHANGE_DESC 0x00000002UL +#define BLE_OPTIONS_DEV_NAME_READ_ONLY 0x00000004UL +#define BLE_OPTIONS_EXTENDED_ADV 0x00000008UL +#define BLE_OPTIONS_CS_ALGO_2 0x00000010UL +#define BLE_OPTIONS_REDUCED_DB_IN_NVM 0x00000020UL +#define BLE_OPTIONS_GATT_CACHING 0x00000040UL +#define BLE_OPTIONS_POWER_CLASS_1 0x00000080UL +#define BLE_OPTIONS_APPEARANCE_WRITABLE 0x00000100UL +#define BLE_OPTIONS_ENHANCED_ATT 0x00000200UL + +/* ------------------------------------------------------------------------- */ + +/* Characteristic value lengths + */ +#define DEVICE_NAME_CHARACTERISTIC_LEN 8 +#define APPEARANCE_CHARACTERISTIC_LEN 2 +#define PERIPHERAL_PRIVACY_CHARACTERISTIC_LEN 1 +#define RECONNECTION_ADDR_CHARACTERISTIC_LEN 6 +#define PERIPHERAL_PREF_CONN_PARAMS_CHARACTERISTIC_LEN 8 + +/* Adv. lengths + */ +#define MAX_ADV_DATA_LEN 31 +#define BD_ADDR_SIZE 6 + +/* Privacy flag values + */ +#define PRIVACY_DISABLED 0x00 +#define PRIVACY_ENABLED 0x02 + +/* Intervals in terms of 625 micro sec + */ +#define DIR_CONN_ADV_INT_MIN 0x190U /* 250 ms */ +#define DIR_CONN_ADV_INT_MAX 0x320U /* 500 ms */ +#define UNDIR_CONN_ADV_INT_MIN 0x800U /* 1.28 s */ +#define UNDIR_CONN_ADV_INT_MAX 0x1000U /* 2.56 s */ +#define LIM_DISC_ADV_INT_MIN 0x190U /* 250 ms */ +#define LIM_DISC_ADV_INT_MAX 0x320U /* 500 ms */ +#define GEN_DISC_ADV_INT_MIN 0x800U /* 1.28 s */ +#define GEN_DISC_ADV_INT_MAX 0x1000U /* 2.56 s */ + +/* GAP Roles + */ +#define GAP_PERIPHERAL_ROLE 0x01U +#define GAP_BROADCASTER_ROLE 0x02U +#define GAP_CENTRAL_ROLE 0x04U +#define GAP_OBSERVER_ROLE 0x08U + +/* GAP procedure codes + * Procedure codes for ACI_GAP_PROC_COMPLETE_EVENT event + * and ACI_GAP_TERMINATE_GAP_PROC command. + */ +#define GAP_LIMITED_DISCOVERY_PROC 0x01U +#define GAP_GENERAL_DISCOVERY_PROC 0x02U +#define GAP_PERIODIC_ADVERTISING_CONNECTION_PROC 0x04U +#define GAP_AUTO_CONNECTION_ESTABLISHMENT_PROC 0x08U +#define GAP_GENERAL_CONNECTION_ESTABLISHMENT_PROC 0x10U +#define GAP_SELECTIVE_CONNECTION_ESTABLISHMENT_PROC 0x20U +#define GAP_DIRECT_CONNECTION_ESTABLISHMENT_PROC 0x40U +#define GAP_OBSERVATION_PROC 0x80U + +/* GAP Address Type + */ +#define GAP_PUBLIC_ADDR 0x00U +#define GAP_STATIC_RANDOM_ADDR 0x01U +#define GAP_RESOLVABLE_PRIVATE_ADDR 0x02U +#define GAP_NON_RESOLVABLE_PRIVATE_ADDR 0x03U + +/* Bitmap definitions for Mode of ACI_GAP_ADD_DEVICES_TO_LIST + */ +#define GAP_ADD_DEV_MODE_RESOLVING_LIST_ONLY 0x00U +#define GAP_ADD_DEV_MODE_CLEAR 0x01U +#define GAP_ADD_DEV_MODE_FILTER_ACC_LIST_ONLY 0x02U +#define GAP_ADD_DEV_MODE_BOTH_LISTS 0x04U + +/* ------------------------------------------------------------------------- */ + +/* IO capabilities + * (ACI_GAP_SET_IO_CAPABILITY) + */ +#define IO_CAP_DISPLAY_ONLY 0x00U +#define IO_CAP_DISPLAY_YES_NO 0x01U +#define IO_CAP_KEYBOARD_ONLY 0x02U +#define IO_CAP_NO_INPUT_NO_OUTPUT 0x03U +#define IO_CAP_KEYBOARD_DISPLAY 0x04U + +/* Bonding mode + * (ACI_GAP_SET_AUTHENTICATION_REQUIREMENT) + */ +#define NO_BONDING 0x00U +#define BONDING 0x01U + +/* MITM protection + * (ACI_GAP_SET_AUTHENTICATION_REQUIREMENT) + */ +#define MITM_PROTECTION_NOT_REQUIRED 0x00U +#define MITM_PROTECTION_REQUIRED 0x01U + +/* LE Secure Connections support + * (ACI_GAP_SET_AUTHENTICATION_REQUIREMENT) + */ +#define SC_PAIRING_UNSUPPORTED 0x00U +#define SC_PAIRING_OPTIONAL 0x01U +#define SC_PAIRING_ONLY 0x02U + +/* Keypress notification support + * (ACI_GAP_SET_AUTHENTICATION_REQUIREMENT) + */ +#define KEYPRESS_NOT_SUPPORTED 0x00U +#define KEYPRESS_SUPPORTED 0x01U + +/* Use fixed pin + * (ACI_GAP_SET_AUTHENTICATION_REQUIREMENT) + */ +#define USE_FIXED_PIN_FOR_PAIRING_ALLOWED 0x00U +#define USE_FIXED_PIN_FOR_PAIRING_FORBIDDEN 0x01U + +/* Authorization requirements + * (ACI_GAP_SET_AUTHORIZATION_REQUIREMENT) + */ +#define AUTHORIZATION_NOT_REQUIRED 0x00U +#define AUTHORIZATION_REQUIRED 0x01U + +/* Connection authorization response + * (ACI_GAP_AUTHORIZATION_RESP) + */ +#define CONNECTION_AUTHORIZED 0x01U +#define CONNECTION_REJECTED 0x02U + +/* SMP pairing status + * (ACI_GAP_PAIRING_COMPLETE_EVENT) + */ +#define SMP_PAIRING_STATUS_SUCCESS 0x00U +#define SMP_PAIRING_STATUS_SMP_TIMEOUT 0x01U +#define SMP_PAIRING_STATUS_PAIRING_FAILED 0x02U +#define SMP_PAIRING_STATUS_ENCRYPT_FAILED 0x03U + +/* SMP pairing failed reason code + * (ACI_GAP_PAIRING_COMPLETE_EVENT) + */ +#define REASON_PASSKEY_ENTRY_FAILED 0x01U +#define REASON_OOB_NOT_AVAILABLE 0x02U +#define REASON_AUTHENTICATION_REQ 0x03U +#define REASON_CONFIRM_VALUE_FAILED 0x04U +#define REASON_PAIRING_NOT_SUPPORTED 0x05U +#define REASON_ENCRYPTION_KEY_SIZE 0x06U +#define REASON_COMMAND_NOT_SUPPORTED 0x07U +#define REASON_UNSPECIFIED_REASON 0x08U +#define REASON_REPEATED_ATTEMPTS 0x09U +#define REASON_INVALID_PARAMETERS 0x0AU +#define REASON_DHKEY_CHECK_FAILED 0x0BU +#define REASON_NUM_COMPARISON_FAILED 0x0CU +#define REASON_KEY_REJECTED 0x0FU +#define REASON_BUSY 0x10U + +/* Passkey input type detected + * (ACI_GAP_PASSKEY_INPUT) + */ +#define PASSKEY_ENTRY_STARTED 0x00U +#define PASSKEY_DIGIT_ENTERED 0x01U +#define PASSKEY_DIGIT_ERASED 0x02U +#define PASSKEY_CLEARED 0x03U +#define PASSKEY_ENTRY_COMPLETED 0x04U + +/* Numeric Comparison Confirm Value + * (ACI_GAP_NUMERIC_COMPARISON_VALUE_CONFIRM_YESNO) + */ +#define NUMERIC_COMPARISON_CONFIRM_NO 0x00U +#define NUMERIC_COMPARISON_CONFIRM_YES 0x01U + +/* OOB Device Type + * (ACI_GAP_SET_OOB_DATA) + */ +#define OOB_DEVICE_TYPE_LOCAL 0x00U +#define OOB_DEVICE_TYPE_REMOTE 0x01U + +/* OOB Data Type + * (ACI_GAP_GET_OOB_DATA, ACI_GAP_SET_OOB_DATA) + */ +#define OOB_DATA_TYPE_LP_TK 0x00U +#define OOB_DATA_TYPE_SC_RANDOM 0x01U +#define OOB_DATA_TYPE_SC_CONFIRM 0x02U + +/* ------------------------------------------------------------------------- */ + +/* Access permissions for an attribute + */ +#define ATTR_NO_ACCESS 0x00U +#define ATTR_ACCESS_READ_ONLY 0x01U +#define ATTR_ACCESS_WRITE_REQ_ONLY 0x02U +#define ATTR_ACCESS_READ_WRITE 0x03U +#define ATTR_ACCESS_WRITE_WITHOUT_RESPONSE 0x04U +#define ATTR_ACCESS_SIGNED_WRITE_ALLOWED 0x08U +#define ATTR_ACCESS_WRITE_ANY 0x0EU +#define ATTR_ACCESS_ANY 0x0FU + +/* Characteristic properties + */ +#define CHAR_PROP_NONE 0x00U +#define CHAR_PROP_BROADCAST 0x01U +#define CHAR_PROP_READ 0x02U +#define CHAR_PROP_WRITE_WITHOUT_RESP 0x04U +#define CHAR_PROP_WRITE 0x08U +#define CHAR_PROP_NOTIFY 0x10u +#define CHAR_PROP_INDICATE 0x20U +#define CHAR_PROP_SIGNED_WRITE 0x40U +#define CHAR_PROP_EXT 0x80U + +/* Security permissions for an attribute + */ +#define ATTR_PERMISSION_NONE 0x00U /* No security. */ +#define ATTR_PERMISSION_AUTHEN_READ 0x01U /* Need authentication to read */ +#define ATTR_PERMISSION_AUTHOR_READ 0x02U /* Need authorization to read */ +#define ATTR_PERMISSION_ENCRY_READ 0x04U /* Need encryption to read */ +#define ATTR_PERMISSION_AUTHEN_WRITE 0x08U /* Need authentication to write */ +#define ATTR_PERMISSION_AUTHOR_WRITE 0x10U /* Need authorization to write */ +#define ATTR_PERMISSION_ENCRY_WRITE 0x20U /* Need encryption to write */ + +/* Type of UUID (16 bit or 128 bit) + */ +#define UUID_TYPE_16 0x01U +#define UUID_TYPE_128 0x02U + +/* Type of service (primary or secondary) + */ +#define PRIMARY_SERVICE 0x01U +#define SECONDARY_SERVICE 0x02U + +/* Gatt Event Mask + * Type of event generated by GATT server + * See aci_gatt_add_char. + */ +#define GATT_DONT_NOTIFY_EVENTS 0x00U +#define GATT_NOTIFY_ATTRIBUTE_WRITE 0x01U +#define GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP 0x02U +#define GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP 0x04U +#define GATT_NOTIFY_NOTIFICATION_COMPLETION 0x08U + +/* Type of characteristic length (see ACI_GATT_ADD_CHAR) + */ +#define CHAR_VALUE_LEN_CONSTANT 0x00 +#define CHAR_VALUE_LEN_VARIABLE 0x01 + +/* Encryption key size + */ +#define MIN_ENCRY_KEY_SIZE 7 +#define MAX_ENCRY_KEY_SIZE 16 + +/* Format + */ +#define FORMAT_UINT8 0x04U +#define FORMAT_UINT16 0x06U +#define FORMAT_SINT16 0x0EU +#define FORMAT_SINT24 0x0FU + +/* Unit + */ +#define UNIT_UNITLESS 0x2700 +#define UNIT_TEMP_CELSIUS 0x272F +#define UNIT_PRESSURE_BAR 0x2780 + +/* Update_Type definitions for ACI_GATT_UPDATE_CHAR_VALUE_EXT + */ +#define GATT_CHAR_UPDATE_LOCAL_ONLY 0x00U +#define GATT_CHAR_UPDATE_SEND_NOTIFICATION 0x01U +#define GATT_CHAR_UPDATE_SEND_INDICATION 0x02U + +/* ------------------------------------------------------------------------- */ + +/* Advertising Type + */ +#define ADV_IND 0 +#define ADV_DIRECT_IND 1 +#define ADV_SCAN_IND 2 +#define ADV_NONCONN_IND 3 +#define ADV_DIRECT_IND_LDC 4 +#define SCAN_RSP 4 + +/* Advertising channels + */ +#define ADV_CH_37 0x01 +#define ADV_CH_38 0x02 +#define ADV_CH_39 0x04 + +/* ------------------------------------------------------------------------- */ + +/* Definitions for Radio_Activity_Mask + * (ACI_HAL_SET_RADIO_ACTIVITY_MASK) + */ +#define RADIO_ACT_MASK_IDLE 0x0001U +#define RADIO_ACT_MASK_ADVERTISING 0x0002U +#define RADIO_ACT_MASK_PERIPH_CONNECT 0x0004U +#define RADIO_ACT_MASK_SCANNING 0x0008U +#define RADIO_ACT_MASK_CENTR_CONNECT 0x0020U +#define RADIO_ACT_MASK_TX_TEST 0x0040U +#define RADIO_ACT_MASK_RX_TEST 0x0080U +#define RADIO_ACT_MASK_PERIOD_ADVERTISING 0x0200U +#define RADIO_ACT_MASK_PERIOD_SYNC 0x0400U +#define RADIO_ACT_MASK_ISO_BROADCAST 0x0800U +#define RADIO_ACT_MASK_ISO_SYNC 0x1000U +#define RADIO_ACT_MASK_ISO_PERIPH_CONNECT 0x2000U +#define RADIO_ACT_MASK_ISO_CENTR_CONNECT 0x4000U + +/* ------------------------------------------------------------------------- */ + +/* Definitions for Warning_Type + * (ACI_WARNING_EVENT) + */ +#define WARNING_L2CAP_RECOMBINATION_FAILURE 0x01U +#define WARNING_GATT_UNEXPECTED_PEER_MESSAGE 0x02U +#define WARNING_NVM_ALMOST_FULL 0x03U +#define WARNING_COC_RX_DATA_LENGTH_TOO_LARGE 0x04U +#define WARNING_COC_ALREADY_ASSIGNED_DCID 0x05U +#define WARNING_SMP_UNEXPECTED_LTK_REQUEST 0x06U +#define WARNING_GATT_BEARER_NOT_ALLOCATED 0x07U + +/* ------------------------------------------------------------------------- */ + +/* Offset for configuration values (see ACI_HAL_WRITE_CONFIG_DATA) + */ +#define CONFIG_DATA_PUBLIC_ADDRESS_OFFSET 0x00U +#define CONFIG_DATA_ER_OFFSET 0x08U +#define CONFIG_DATA_IR_OFFSET 0x18U +#define CONFIG_DATA_RANDOM_ADDRESS_OFFSET 0x2EU +#define CONFIG_DATA_GAP_ADD_REC_NBR_OFFSET 0x34U +#define CONFIG_DATA_SC_KEY_TYPE_OFFSET 0x35U +#define CONFIG_DATA_SMP_MODE_OFFSET 0xB0U +#define CONFIG_DATA_LL_SCAN_CHAN_MAP_OFFSET 0xC0U +#define CONFIG_DATA_LL_BG_SCAN_MODE_OFFSET 0xC1U +#define CONFIG_DATA_LL_RSSI_GOLDEN_RANGE_OFFSET 0xC2U +#define CONFIG_DATA_LL_RPA_MODE_OFFSET 0xC3U +#define CONFIG_DATA_LL_RX_ACL_CTRL_OFFSET 0xC4U +#define CONFIG_DATA_LL_MAX_DATA_EXT_OFFSET 0xD1U + +/* Length for configuration values (see ACI_HAL_WRITE_CONFIG_DATA) + */ +#define CONFIG_DATA_PUBLIC_ADDRESS_LEN 6 +#define CONFIG_DATA_ER_LEN 16 +#define CONFIG_DATA_IR_LEN 16 +#define CONFIG_DATA_RANDOM_ADDRESS_LEN 6 +#define CONFIG_DATA_GAP_ADD_REC_NBR_LEN 1 +#define CONFIG_DATA_SC_KEY_TYPE_LEN 1 +#define CONFIG_DATA_SMP_MODE_LEN 1 +#define CONFIG_DATA_LL_SCAN_CHAN_MAP_LEN 1 +#define CONFIG_DATA_LL_BG_SCAN_MODE_LEN 1 +#define CONFIG_DATA_LL_RSSI_GOLDEN_RANGE_LEN 2 +#define CONFIG_DATA_LL_RPA_MODE_LEN 1 +#define CONFIG_DATA_LL_RX_ACL_CTRL_LEN 2 +#define CONFIG_DATA_LL_MAX_DATA_EXT_LEN 8 + +/* ------------------------------------------------------------------------- */ + + +#endif /* BLE_DEFS_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h new file mode 100644 index 0000000..3b197b8 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_legacy.h @@ -0,0 +1,282 @@ +/***************************************************************************** + * @file ble_legacy.h + * + * @brief This file contains legacy definitions used for BLE. + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_LEGACY_H__ +#define BLE_LEGACY_H__ + + +/* Various obsolete definitions + */ + +#define PERIPHERAL_PRIVACY_FLAG_UUID 0x2A02U +#define RECONNECTION_ADDR_UUID 0x2A03U + +#define OOB_AUTH_DATA_ABSENT 0x00U +#define OOB_AUTH_DATA_PRESENT 0x01U + +#define BLE_STATUS_SEC_DB_FULL 0x5DU +#define BLE_STATUS_INSUFFICIENT_ENC_KEYSIZE 0x5FU +#define BLE_STATUS_CHARAC_ALREADY_EXISTS 0x63U + +#define GAP_NAME_DISCOVERY_PROC 0x04U + +/* Deprecated names for ACI/HCI commands and events + */ + +#define hci_le_read_local_supported_features \ + hci_le_read_local_supported_features_page_0 +#define hci_le_read_remote_features \ + hci_le_read_remote_features_page_0 + +#define aci_gap_configure_whitelist \ + aci_gap_configure_filter_accept_list +#define aci_gap_slave_security_req \ + aci_gap_peripheral_security_req +#define aci_hal_set_slave_latency \ + aci_hal_set_peripheral_latency +#define aci_gap_slave_security_initiated_event \ + aci_gap_peripheral_security_initiated_event + +typedef __PACKED_STRUCT +{ + /** + * Identity address type + * Values: + * - 0x00: Public Identity Address + * - 0x01: Random (static) Identity Address + */ + uint8_t Peer_Identity_Address_Type; + /** + * Public or Random (static) Identity Address of the peer device + */ + uint8_t Peer_Identity_Address[6]; +} Identity_Entry_t; + +#define Whitelist_Entry_t \ + Peer_Entry_t +#define Whitelist_Identity_Entry_t \ + Identity_Entry_t + +#define HCI_LE_READ_REMOTE_FEATURES_COMPLETE_SUBEVT_CODE \ + HCI_LE_READ_REMOTE_FEATURES_PAGE_0_COMPLETE_SUBEVT_CODE + +#define hci_le_read_remote_features_complete_event_rp0 \ + hci_le_read_remote_features_page_0_complete_event_rp0 + +#define ACI_GAP_SLAVE_SECURITY_INITIATED_VSEVT_CODE \ + ACI_GAP_PERIPHERAL_SECURITY_INITIATED_VSEVT_CODE + +#define ACI_HAL_FW_ERROR_VSEVT_CODE \ + ACI_WARNING_VSEVT_CODE + +#define ACI_HAL_WARNING_VSEVT_CODE \ + ACI_WARNING_VSEVT_CODE + +typedef __PACKED_STRUCT +{ + uint8_t FW_Error_Type; + uint8_t Data_Length; + uint8_t Data[(BLE_EVT_MAX_PARAM_LEN - 2) - 2]; +} aci_hal_fw_error_event_rp0; + +#define aci_hal_warning_event_rp0 \ + aci_warning_event_rp0 + +#define aci_hal_warning_event \ + aci_warning_event + +/* Other deprecated names + */ + +#define HCI_ADV_FILTER_WHITELIST_SCAN \ + HCI_ADV_FILTER_ACC_LIST_USED_FOR_SCAN +#define HCI_ADV_FILTER_WHITELIST_CONNECT \ + HCI_ADV_FILTER_ACC_LIST_USED_FOR_CONNECT +#define HCI_ADV_FILTER_WHITELIST_SCAN_CONNECT \ + HCI_ADV_FILTER_ACC_LIST_USED_FOR_ALL +#define NO_WHITE_LIST_USE \ + HCI_ADV_FILTER_NO +#define WHITE_LIST_FOR_ONLY_SCAN \ + HCI_ADV_FILTER_ACC_LIST_USED_FOR_SCAN +#define WHITE_LIST_FOR_ONLY_CONN \ + HCI_ADV_FILTER_ACC_LIST_USED_FOR_CONNECT +#define WHITE_LIST_FOR_ALL \ + HCI_ADV_FILTER_ACC_LIST_USED_FOR_ALL + +#define HCI_SCAN_FILTER_WHITELIST \ + HCI_SCAN_FILTER_ACC_LIST_USED +#define HCI_SCAN_FILTER_NO_EVEN_RPA \ + HCI_SCAN_FILTER_NO_EXT +#define HCI_SCAN_FILTER_WHITELIST_BUT_RPA \ + HCI_SCAN_FILTER_ACC_LIST_USED_EXT + +#define HCI_INIT_FILTER_WHITELIST \ + HCI_INIT_FILTER_ACC_LIST_USED + +#define AD_TYPE_SLAVE_CONN_INTERVAL \ + AD_TYPE_PERIPHERAL_CONN_INTERVAL + +#define OOB_NOT_AVAILABLE REASON_OOB_NOT_AVAILABLE +#define AUTH_REQ_CANNOT_BE_MET REASON_AUTHENTICATION_REQ +#define CONFIRM_VALUE_FAILED REASON_CONFIRM_VALUE_FAILED +#define PAIRING_NOT_SUPPORTED REASON_PAIRING_NOT_SUPPORTED +#define INSUFF_ENCRYPTION_KEY_SIZE REASON_ENCRYPTION_KEY_SIZE +#define CMD_NOT_SUPPORTED REASON_COMMAND_NOT_SUPPORTED +#define UNSPECIFIED_REASON REASON_UNSPECIFIED_REASON +#define VERY_EARLY_NEXT_ATTEMPT REASON_REPEATED_ATTEMPTS +#define SM_INVALID_PARAMS REASON_INVALID_PARAMETERS +#define SMP_SC_DHKEY_CHECK_FAILED REASON_DHKEY_CHECK_FAILED +#define SMP_SC_NUMCOMPARISON_FAILED REASON_NUM_COMPARISON_FAILED + +#define CONFIG_DATA_PUBADDR_OFFSET CONFIG_DATA_PUBLIC_ADDRESS_OFFSET +#define CONFIG_DATA_PUBADDR_LEN CONFIG_DATA_PUBLIC_ADDRESS_LEN + +#define FW_L2CAP_RECOMBINATION_ERROR 0x01U +#define FW_GATT_UNEXPECTED_PEER_MESSAGE 0x02U +#define FW_NVM_LEVEL_WARNING 0x03U +#define FW_COC_RX_DATA_LENGTH_TOO_LARGE 0x04U +#define FW_ECOC_CONN_RSP_ALREADY_ASSIGNED_DCID 0x05U + +/* Deprecated commands + */ + +/** + * @brief ACI_GAP_RESOLVE_PRIVATE_ADDR + * This command tries to resolve the address provided with the IRKs present in + * its database. If the address is resolved successfully with any one of the + * IRKs present in the database, it returns success and also the corresponding + * public/static random address stored with the IRK in the database. + * + * @param Address Address to be resolved + * @param[out] Actual_Address The public or static random address of the peer + * device, distributed during pairing phase. + * @return Value indicating success or error code. + */ +__STATIC_INLINE +tBleStatus aci_gap_resolve_private_addr( const uint8_t* Address, + uint8_t* Actual_Address ) +{ + uint8_t type; + return aci_gap_check_bonded_device( 1, Address, &type, Actual_Address ); +} + +/** + * @brief ACI_GAP_IS_DEVICE_BONDED + * The command finds whether the device, whose address is specified in the + * command, is present in the bonding table. If the device is found, the + * command returns "Success". + * Note: the specified address can be a RPA. In this case, even if privacy is + * not enabled, this address is resolved to check the presence of the peer + * device in the bonding table. + * + * @param Peer_Address_Type The address type of the peer device. + * Values: + * - 0x00: Public Device Address + * - 0x01: Random Device Address + * @param Peer_Address Public Device Address or Random Device Address of the + * peer device + * @return Value indicating success or error code. + */ +__STATIC_INLINE +tBleStatus aci_gap_is_device_bonded( uint8_t Peer_Address_Type, + const uint8_t* Peer_Address ) +{ + uint8_t type, address[6]; + return aci_gap_check_bonded_device( Peer_Address_Type, Peer_Address, + &type, address ); +} + +/** + * @brief ACI_GAP_ADD_DEVICES_TO_RESOLVING_LIST + * This command is used to add devices to the list of address translations + * used to resolve Resolvable Private Addresses in the Controller. + * + * @param Num_of_Resolving_list_Entries Number of devices that have to be added + * to the list. + * @param Identity_Entry See @ref Identity_Entry_t + * @param Clear_Resolving_List Clear the resolving list + * Values: + * - 0x00: Do not clear + * - 0x01: Clear before adding + * @return Value indicating success or error code. + */ +__STATIC_INLINE +tBleStatus aci_gap_add_devices_to_resolving_list( uint8_t Num_of_Resolving_list_Entries, + const Identity_Entry_t* Identity_Entry, + uint8_t Clear_Resolving_List ) +{ + return aci_gap_add_devices_to_list( Num_of_Resolving_list_Entries, + (const List_Entry_t*)Identity_Entry, + Clear_Resolving_List ); +} + +/** + * @brief ACI_HAL_GET_FW_BUILD_NUMBER + * This command returns the build number associated with the firmware version + * currently running + * + * @param[out] Build_Number Build number of the firmware. + * @return Value indicating success or error code. + */ +__STATIC_INLINE +tBleStatus aci_hal_get_fw_build_number( uint16_t* Build_Number ) +{ + uint32_t version[2], options[1], debug_info[3]; + tBleStatus status = aci_get_information( version, options, debug_info ); + *Build_Number = (uint16_t)(version[1] >> 16); + return status; +} + +/** + * @brief ACI_HAL_GET_PM_DEBUG_INFO + * This command is used to retrieve TX, RX and total buffer count allocated for + * ACL packets. + * + * @param[out] Allocated_For_TX MBlocks allocated for TXing + * @param[out] Allocated_For_RX MBlocks allocated for RXing + * @param[out] Allocated_MBlocks Overall allocated MBlocks + * @return Value indicating success or error code. + */ +__STATIC_INLINE +tBleStatus aci_hal_get_pm_debug_info( uint8_t* Allocated_For_TX, + uint8_t* Allocated_For_RX, + uint8_t* Allocated_MBlocks ) +{ + uint32_t version[2], options[1], debug_info[3]; + tBleStatus status = aci_get_information( version, options, debug_info ); + *Allocated_For_TX = ((uint8_t)(((uint16_t*)debug_info)[2]) + + (uint8_t)(((uint16_t*)debug_info)[3])); + *Allocated_For_RX = (uint8_t)(((uint16_t*)debug_info)[1]); + *Allocated_MBlocks = (*Allocated_For_TX) + (*Allocated_For_RX); + return status; +} + +/** + * @brief ACI_HAL_STACK_RESET + * This command is equivalent to HCI_RESET but ensures the sleep mode is + * entered immediately after its completion. + * + * @return Value indicating success or error code. + */ +__STATIC_INLINE +tBleStatus aci_hal_stack_reset( void ) +{ + return aci_reset( 0, 0 ); +} + + +#endif /* BLE_LEGACY_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_std.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_std.h new file mode 100644 index 0000000..a39c233 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/ble_std.h @@ -0,0 +1,387 @@ +/****************************************************************************** + * @file ble_std.h + * + * @brief BLE standard definitions + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_STD_H__ +#define BLE_STD_H__ + + +/* HCI packet type */ +#define HCI_COMMAND_PKT_TYPE 0x01U +#define HCI_ACLDATA_PKT_TYPE 0x02U +#define HCI_EVENT_PKT_TYPE 0x04U +#define HCI_ISODATA_PKT_TYPE 0x05U + +/* HCI packet header size */ +#define HCI_COMMAND_HDR_SIZE 4 +#define HCI_ACLDATA_HDR_SIZE 5 +#define HCI_EVENT_HDR_SIZE 3 +#define HCI_ISODATA_HDR_SIZE 5 + +/* HCI parameters length */ +#define HCI_COMMAND_MAX_PARAM_LEN 255 +#define HCI_ACLDATA_MAX_DATA_LEN 251 /* LE_ACL_Data_Packet_Length */ +#define HCI_EVENT_MAX_PARAM_LEN 255 +#define HCI_ISODATA_MAX_DATA_LEN 300 /* ISO_Data_Packet_Length */ + +/* HCI packet maximum size */ +#define HCI_COMMAND_PKT_MAX_SIZE \ + (HCI_COMMAND_HDR_SIZE + HCI_COMMAND_MAX_PARAM_LEN) +#define HCI_ACLDATA_PKT_MAX_SIZE \ + (HCI_ACLDATA_HDR_SIZE + HCI_ACLDATA_MAX_DATA_LEN) +#define HCI_EVENT_PKT_MAX_SIZE \ + (HCI_EVENT_HDR_SIZE + HCI_EVENT_MAX_PARAM_LEN) +#define HCI_ISODATA_PKT_MAX_SIZE \ + (HCI_ISODATA_HDR_SIZE + HCI_ISODATA_MAX_DATA_LEN) + +/* HCI event code */ +#define HCI_DISCONNECTION_COMPLETE_EVT_CODE 0x05U +#define HCI_ENCRYPTION_CHANGE_EVT_CODE 0x08U +#define HCI_READ_REMOTE_VERSION_INFORMATION_COMPLETE_EVT_CODE 0x0CU +#define HCI_COMMAND_COMPLETE_EVT_CODE 0x0EU +#define HCI_COMMAND_STATUS_EVT_CODE 0x0FU +#define HCI_HARDWARE_ERROR_EVT_CODE 0x10U +#define HCI_NUMBER_OF_COMPLETED_PACKETS_EVT_CODE 0x13U +#define HCI_DATA_BUFFER_OVERFLOW_EVT_CODE 0x1AU +#define HCI_ENCRYPTION_KEY_REFRESH_COMPLETE_EVT_CODE 0x30U +#define HCI_LE_META_EVT_CODE 0x3EU +#define HCI_AUTHENTICATED_PAYLOAD_TIMEOUT_EXPIRED_EVT_CODE 0x57U +#define HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE 0xFFU + +/* HCI LE subevent code */ +#define HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE 0x01U +#define HCI_LE_ADVERTISING_REPORT_SUBEVT_CODE 0x02U +#define HCI_LE_CONNECTION_UPDATE_COMPLETE_SUBEVT_CODE 0x03U +#define HCI_LE_READ_REMOTE_FEATURES_PAGE_0_COMPLETE_SUBEVT_CODE 0x04U +#define HCI_LE_LONG_TERM_KEY_REQUEST_SUBEVT_CODE 0x05U +#define HCI_LE_REMOTE_CONNECTION_PARAMETER_REQUEST_SUBEVT_CODE 0x06U +#define HCI_LE_DATA_LENGTH_CHANGE_SUBEVT_CODE 0x07U +#define HCI_LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE_SUBEVT_CODE 0x08U +#define HCI_LE_GENERATE_DHKEY_COMPLETE_SUBEVT_CODE 0x09U +#define HCI_LE_ENHANCED_CONNECTION_COMPLETE_SUBEVT_CODE 0x0AU +#define HCI_LE_DIRECTED_ADVERTISING_REPORT_SUBEVT_CODE 0x0BU +#define HCI_LE_PHY_UPDATE_COMPLETE_SUBEVT_CODE 0x0CU +#define HCI_LE_EXTENDED_ADVERTISING_REPORT_SUBEVT_CODE 0x0DU +#define HCI_LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_SUBEVT_CODE 0x0EU +#define HCI_LE_PERIODIC_ADVERTISING_REPORT_SUBEVT_CODE 0x0FU +#define HCI_LE_PERIODIC_ADVERTISING_SYNC_LOST_SUBEVT_CODE 0x10U +#define HCI_LE_SCAN_TIMEOUT_SUBEVT_CODE 0x11U +#define HCI_LE_ADVERTISING_SET_TERMINATED_SUBEVT_CODE 0x12U +#define HCI_LE_SCAN_REQUEST_RECEIVED_SUBEVT_CODE 0x13U +#define HCI_LE_CHANNEL_SELECTION_ALGORITHM_SUBEVT_CODE 0x14U +#define HCI_LE_CONNECTIONLESS_IQ_REPORT_SUBEVT_CODE 0x15U +#define HCI_LE_CONNECTION_IQ_REPORT_SUBEVT_CODE 0x16U +#define HCI_LE_CTE_REQUEST_FAILED_SUBEVT_CODE 0x17U +#define HCI_LE_PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED_SUBEVT_CODE 0x18U +#define HCI_LE_CIS_ESTABLISHED_SUBEVT_CODE 0x19U +#define HCI_LE_CIS_REQUEST_SUBEVT_CODE 0x1AU +#define HCI_LE_CREATE_BIG_COMPLETE_SUBEVT_CODE 0x1BU +#define HCI_LE_TERMINATE_BIG_COMPLETE_SUBEVT_CODE 0x1CU +#define HCI_LE_BIG_SYNC_ESTABLISHED_SUBEVT_CODE 0x1DU +#define HCI_LE_BIG_SYNC_LOST_SUBEVT_CODE 0x1EU +#define HCI_LE_REQUEST_PEER_SCA_COMPLETE_SUBEVT_CODE 0x1FU +#define HCI_LE_PATH_LOSS_THRESHOLD_SUBEVT_CODE 0x20U +#define HCI_LE_TRANSMIT_POWER_REPORTING_SUBEVT_CODE 0x21U +#define HCI_LE_BIGINFO_ADVERTISING_REPORT_SUBEVT_CODE 0x22U +#define HCI_LE_SUBRATE_CHANGE_SUBEVT_CODE 0x23U +#define HCI_LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V2_SUBEVT_CODE 0x24U +#define HCI_LE_PERIODIC_ADVERTISING_REPORT_V2_SUBEVT_CODE 0x25U +#define HCI_LE_PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED_V2_SUBEVT_CODE 0x26U +#define HCI_LE_PERIODIC_ADVERTISING_SUBEVENT_DATA_REQUEST_SUBEVT_CODE 0x27U +#define HCI_LE_PERIODIC_ADVERTISING_RESPONSE_REPORT_SUBEVT_CODE 0x28U +#define HCI_LE_ENHANCED_CONNECTION_COMPLETE_V2_SUBEVT_CODE 0x29U +#define HCI_LE_CIS_ESTABLISHED_V2_SUBEVT_CODE 0x2AU +#define HCI_LE_READ_ALL_REMOTE_FEATURES_COMPLETE_SUBEVT_CODE 0x2BU +#define HCI_LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES_COMPLETE_SUBEVT_CODE 0x2CU +#define HCI_LE_CS_READ_REMOTE_FAE_TABLE_COMPLETE_SUBEVT_CODE 0x2DU +#define HCI_LE_CS_SECURITY_ENABLE_COMPLETE_SUBEVT_CODE 0x2EU +#define HCI_LE_CS_CONFIG_COMPLETE_SUBEVT_CODE 0x2FU +#define HCI_LE_CS_PROCEDURE_ENABLE_COMPLETE_SUBEVT_CODE 0x30U +#define HCI_LE_CS_SUBEVENT_RESULT_SUBEVT_CODE 0x31U +#define HCI_LE_CS_SUBEVENT_RESULT_CONTINUE_SUBEVT_CODE 0x32U +#define HCI_LE_CS_TEST_END_COMPLETE_SUBEVT_CODE 0x33U +#define HCI_LE_MONITORED_ADVERTISERS_REPORT_SUBEVT_CODE 0x34U +#define HCI_LE_FRAME_SPACE_UPDATE_COMPLETE_SUBEVT_CODE 0x35U + +/* HCI error code */ +#define HCI_SUCCESS_ERR_CODE 0x00U +#define HCI_UNKNOWN_HCI_COMMAND_ERR_CODE 0x01U +#define HCI_UNKNOWN_CONNECTION_IDENTIFIER_ERR_CODE 0x02U +#define HCI_HARDWARE_FAILURE_ERR_CODE 0x03U +#define HCI_AUTHENTICATION_FAILURE_ERR_CODE 0x05U +#define HCI_PIN_OR_KEY_MISSING_ERR_CODE 0x06U +#define HCI_MEMORY_CAPACITY_EXCEEDED_ERR_CODE 0x07U +#define HCI_CONNECTION_TIMEOUT_ERR_CODE 0x08U +#define HCI_CONNECTION_LIMIT_EXCEEDED_ERR_CODE 0x09U +#define HCI_CONNECTION_ALREADY_EXISTS_ERR_CODE 0x0BU +#define HCI_COMMAND_DISALLOWED_ERR_CODE 0x0CU +#define HCI_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE_ERR_CODE 0x11U +#define HCI_INVALID_HCI_COMMAND_PARAMETERS_ERR_CODE 0x12U +#define HCI_REMOTE_USER_TERMINATED_CONNECTION_ERR_CODE 0x13U +#define HCI_REMOTE_TERMINATED_CONNECTION_DUE_TO_LOW_RESOURCES_ERR_CODE 0x14U +#define HCI_REMOTE_TERMINATED_CONNECTION_DUE_TO_POWER_OFF_ERR_CODE 0x15U +#define HCI_CONNECTION_TERMINATED_BY_LOCAL_HOST_ERR_CODE 0x16U +#define HCI_UNSUPPORTED_REMOTE_FEATURE_ERR_CODE 0x1AU +#define HCI_INVALID_LL_PARAMETERS_ERR_CODE 0x1EU +#define HCI_UNSPECIFIED_ERROR_ERR_CODE 0x1FU +#define HCI_UNSUPPORTED_LL_PARAMETER_VALUE_ERR_CODE 0x20U +#define HCI_LL_RESPONSE_TIMEOUT_ERR_CODE 0x22U +#define HCI_LL_PROCEDURE_COLLISION_ERR_CODE 0x23U +#define HCI_LMP_PDU_NOT_ALLOWED_ERR_CODE 0x24U +#define HCI_INSTANT_PASSED_ERR_CODE 0x28U +#define HCI_DIFFERENT_TRANSACTION_COLLISION_ERR_CODE 0x2AU +#define HCI_PARAMETER_OUT_OF_MANDATORY_RANGE_ERR_CODE 0x30U +#define HCI_HOST_BUSY_PAIRING_ERR_CODE 0x38U +#define HCI_CONTROLLER_BUSY_ERR_CODE 0x3AU +#define HCI_UNACCEPTABLE_CONNECTION_PARAMETERS_ERR_CODE 0x3BU +#define HCI_ADVERTISING_TIMEOUT_ERR_CODE 0x3CU +#define HCI_CONNECTION_TERMINATED_DUE_TO_MIC_FAILURE_ERR_CODE 0x3DU +#define HCI_CONNECTION_FAILED_TO_BE_ESTABLISHED_ERR_CODE 0x3EU +#define HCI_UNKNOWN_ADVERTISING_IDENTIFIER_ERR_CODE 0x42U +#define HCI_ADVERTISING_LIMIT_REACHED_ERR_CODE 0x43U +#define HCI_PACKET_TOO_LONG_ERR_CODE 0x45U + +/* HCI_LE_Set_Advertising_Parameters: Advertising_Type */ +#define HCI_ADV_TYPE_ADV_IND 0x00U +#define HCI_ADV_TYPE_ADV_DIRECT_IND_HDC 0x01U +#define HCI_ADV_TYPE_ADV_SCAN_IND 0x02U +#define HCI_ADV_TYPE_ADV_NONCONN_IND 0x03U +#define HCI_ADV_TYPE_ADV_DIRECT_IND_LDC 0x04U + +/* HCI_LE_Set_Advertising_Parameters: Advertising_Filter_Policy */ +#define HCI_ADV_FILTER_NO 0x00U +#define HCI_ADV_FILTER_ACC_LIST_USED_FOR_SCAN 0x01U +#define HCI_ADV_FILTER_ACC_LIST_USED_FOR_CONNECT 0x02U +#define HCI_ADV_FILTER_ACC_LIST_USED_FOR_ALL 0x03U + +/* HCI_LE_Set_[Advertising/Scan]_Parameters: Own_Address_Type */ +#define HCI_OWN_ADDR_TYPE_PUBLIC 0x00U +#define HCI_OWN_ADDR_TYPE_RANDOM 0x01U +#define HCI_OWN_ADDR_TYPE_RP_OR_PUBLIC 0x02U +#define HCI_OWN_ADDR_TYPE_RP_OR_RANDOM 0x03U + +/* HCI_LE_Set_Scan_Parameters: LE_Scan_Type */ +#define HCI_SCAN_TYPE_PASSIVE 0x00U +#define HCI_SCAN_TYPE_ACTIVE 0x01U + +/* HCI_LE_Set_Scan_Parameters: Scanning_Filter_Policy */ +#define HCI_SCAN_FILTER_NO 0x00U +#define HCI_SCAN_FILTER_ACC_LIST_USED 0x01U +#define HCI_SCAN_FILTER_NO_EXT 0x02U +#define HCI_SCAN_FILTER_ACC_LIST_USED_EXT 0x03U + +/* HCI_LE_Create_Connection: Initiator_Filter_Policy */ +#define HCI_INIT_FILTER_NO 0x00U +#define HCI_INIT_FILTER_ACC_LIST_USED 0x01U + +/* HCI_LE_Read_PHY: TX_PHY */ +#define HCI_TX_PHY_LE_1M 0x01U +#define HCI_TX_PHY_LE_2M 0x02U +#define HCI_TX_PHY_LE_CODED 0x03U + +/* HCI_LE_Read_PHY: RX_PHY */ +#define HCI_RX_PHY_LE_1M 0x01U +#define HCI_RX_PHY_LE_2M 0x02U +#define HCI_RX_PHY_LE_CODED 0x03U + +/* HCI_LE_Set_PHY: ALL_PHYS */ +#define HCI_ALL_PHYS_TX_NO_PREF 0x01U +#define HCI_ALL_PHYS_RX_NO_PREF 0x02U + +/* HCI_LE_Set_PHY: TX_PHYS */ +#define HCI_TX_PHYS_LE_1M_PREF 0x01U +#define HCI_TX_PHYS_LE_2M_PREF 0x02U +#define HCI_TX_PHYS_LE_CODED_PREF 0x04U + +/* HCI_LE_Set_PHY: RX_PHYS */ +#define HCI_RX_PHYS_LE_1M_PREF 0x01U +#define HCI_RX_PHYS_LE_2M_PREF 0x02U +#define HCI_RX_PHYS_LE_CODED_PREF 0x04U + +/* HCI_LE_Set_Extended_Advertising_Parameters: Advertising_Event_Properties */ +#define HCI_ADV_EVENT_PROP_CONNECTABLE 0x0001U +#define HCI_ADV_EVENT_PROP_SCANNABLE 0x0002U +#define HCI_ADV_EVENT_PROP_DIRECTED 0x0004U +#define HCI_ADV_EVENT_PROP_HDC_DIRECTED 0x0008U +#define HCI_ADV_EVENT_PROP_LEGACY 0x0010U +#define HCI_ADV_EVENT_PROP_ANONYMOUS 0x0020U +#define HCI_ADV_EVENT_PROP_TXPOWER_INC 0x0040U + +/* HCI_LE_Set_Extended_Advertising_Parameters: Primary_Advertising_PHY */ +#define HCI_PRIMARY_ADV_PHY_LE_1M 0x01U +#define HCI_PRIMARY_ADV_PHY_LE_CODED 0x03U + +/* HCI_LE_Set_Extended_Advertising_Data: Operation */ +#define HCI_SET_ADV_DATA_OPERATION_INTERMEDIATE 0x00U +#define HCI_SET_ADV_DATA_OPERATION_FIRST 0x01U +#define HCI_SET_ADV_DATA_OPERATION_LAST 0x02U +#define HCI_SET_ADV_DATA_OPERATION_COMPLETE 0x03U +#define HCI_SET_ADV_DATA_OPERATION_UNCHANGED 0x04U + +/* HCI_LE_Advertising_Report: Event_Type */ +#define HCI_ADV_EVT_TYPE_ADV_IND 0x00U +#define HCI_ADV_EVT_TYPE_ADV_DIRECT_IND 0x01U +#define HCI_ADV_EVT_TYPE_ADV_SCAN_IND 0x02U +#define HCI_ADV_EVT_TYPE_ADV_NONCONN_IND 0x03U +#define HCI_ADV_EVT_TYPE_SCAN_RSP 0x04U + +/* HCI_LE_Set_Extended_Scan_Parameters: Scanning_PHYs */ +#define HCI_SCANNING_PHYS_LE_1M 0x01U +#define HCI_SCANNING_PHYS_LE_CODED 0x04U + +/* HCI_LE_Extended_Create_Connection: Initiating_PHYs */ +#define HCI_INIT_PHYS_SCAN_CONN_LE_1M 0x01U +#define HCI_INIT_PHYS_CONN_LE_2M 0x02U +#define HCI_INIT_PHYS_SCAN_CONN_LE_CODED 0x04U + +/* HCI_LE_Receiver_Test/HCI_LE_Transmitter_Test [v2]: PHY */ +#define HCI_TEST_PHY_LE_1M 0x01U +#define HCI_TEST_PHY_LE_2M 0x02U + +/* HCI_LE_Connection_Complete/HCI_LE_Enhanced_Connection_Complete: Role */ +#define HCI_ROLE_CENTRAL 0x00U +#define HCI_ROLE_PERIPHERAL 0x01U + +/* HCI_LE_Set_Privacy_Mode: Privacy_Mode */ +#define HCI_PRIV_MODE_NETWORK 0x00U +#define HCI_PRIV_MODE_DEVICE 0x01U + +/* Bluetooth Core Specification versions + */ +#define BLE_CORE_5_2 11 +#define BLE_CORE_5_3 12 +#define BLE_CORE_5_4 13 +#define BLE_CORE_6_0 14 +#define BLE_CORE_6_1 15 + +/* AD types for advertising data and scan response data + */ +#define AD_TYPE_FLAGS 0x01U +#define AD_TYPE_16_BIT_SERV_UUID 0x02U +#define AD_TYPE_16_BIT_SERV_UUID_CMPLT_LIST 0x03U +#define AD_TYPE_32_BIT_SERV_UUID 0x04U +#define AD_TYPE_32_BIT_SERV_UUID_CMPLT_LIST 0x05U +#define AD_TYPE_128_BIT_SERV_UUID 0x06U +#define AD_TYPE_128_BIT_SERV_UUID_CMPLT_LIST 0x07U +#define AD_TYPE_SHORTENED_LOCAL_NAME 0x08U +#define AD_TYPE_COMPLETE_LOCAL_NAME 0x09U +#define AD_TYPE_TX_POWER_LEVEL 0x0AU +#define AD_TYPE_CLASS_OF_DEVICE 0x0DU +#define AD_TYPE_SEC_MGR_TK_VALUE 0x10U +#define AD_TYPE_SEC_MGR_OOB_FLAGS 0x11U +#define AD_TYPE_PERIPHERAL_CONN_INTERVAL 0x12U +#define AD_TYPE_SERV_SOLICIT_16_BIT_UUID_LIST 0x14U +#define AD_TYPE_SERV_SOLICIT_128_BIT_UUID_LIST 0x15U +#define AD_TYPE_SERVICE_DATA 0x16U +#define AD_TYPE_APPEARANCE 0x19U +#define AD_TYPE_ADVERTISING_INTERVAL 0x1AU +#define AD_TYPE_LE_ROLE 0x1CU +#define AD_TYPE_SERV_SOLICIT_32_BIT_UUID_LIST 0x1FU +#define AD_TYPE_URI 0x24U +#define AD_TYPE_MANUFACTURER_SPECIFIC_DATA 0xFFU + +/* Flag bits for Flags AD Type + */ +#define FLAG_BIT_LE_LIMITED_DISCOVERABLE_MODE 0x01U +#define FLAG_BIT_LE_GENERAL_DISCOVERABLE_MODE 0x02U +#define FLAG_BIT_BR_EDR_NOT_SUPPORTED 0x04U +#define FLAG_BIT_LE_BR_EDR_CONTROLLER 0x08U +#define FLAG_BIT_LE_BR_EDR_HOST 0x10U + +/* Appearance values + */ +#define GAP_APPEARANCE_UNKNOWN 0x0000 +#define GAP_APPEARANCE_GENERIC_PHONE 0x0040 +#define GAP_APPEARANCE_GENERIC_COMPUTER 0x0080 +#define GAP_APPEARANCE_GENERIC_WATCH 0x00C0 +#define GAP_APPEARANCE_WATCH_SPORT_WATCH 0x00C1 +#define GAP_APPEARANCE_GENERIC_CLOCK 0x0100 +#define GAP_APPEARANCE_GENERIC_DISPLAY 0x0140 +#define GAP_APPEARANCE_GENERIC_REMOTE_CONTROL 0x0180 +#define GAP_APPEARANCE_GENERIC_EYE_GLASSES 0x01C0 +#define GAP_APPEARANCE_GENERIC_TAG 0x0200 +#define GAP_APPEARANCE_GENERIC_KEYRING 0x0240 +#define GAP_APPEARANCE_GENERIC_MEDIA_PLAYER 0x0280 +#define GAP_APPEARANCE_GENERIC_BARCODE_SCANNER 0x02C0 +#define GAP_APPEARANCE_GENERIC_THERMOMETER 0x0300 +#define GAP_APPEARANCE_THERMOMETER_EAR 0x0301 +#define GAP_APPEARANCE_GENERIC_HEART_RATE_SENSOR 0x0340 +#define GAP_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 0x0341 +#define GAP_APPEARANCE_GENERIC_BLOOD_PRESSURE 0x0380 +#define GAP_APPEARANCE_BLOOD_PRESSURE_ARM 0x0381 +#define GAP_APPEARANCE_BLOOD_PRESSURE_WRIST 0x0382 +#define GAP_APPEARANCE_HUMAN_INTERFACE_DEVICE 0x03C0 +#define GAP_APPEARANCE_KEYBOARD 0x03C1 +#define GAP_APPEARANCE_MOUSE 0x03C2 +#define GAP_APPEARANCE_JOYSTICK 0x03C3 +#define GAP_APPEARANCE_GAMEPAD 0x03C4 +#define GAP_APPEARANCE_DIGITIZER_TABLET 0x03C5 +#define GAP_APPEARANCE_CARD_READER 0x03C6 +#define GAP_APPEARANCE_DIGITAL_PEN 0x03C7 +#define GAP_APPEARANCE_BARCODE_SCANNER 0x03C8 +#define GAP_APPEARANCE_GENERIC_GLUCOSE_METER 0x0400 +#define GAP_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 0x0440 +#define GAP_APPEARANCE_RUNNING_WALKING_IN_SHOE 0x0441 +#define GAP_APPEARANCE_RUNNING_WALKING_ON_SHOE 0x0442 +#define GAP_APPEARANCE_RUNNING_WALKING_ON_HIP 0x0443 +#define GAP_APPEARANCE_GENERIC_CYCLING 0x0480 +#define GAP_APPEARANCE_CYCLING_CYCLING_COMPUTER 0x0481 +#define GAP_APPEARANCE_CYCLING_SPEED_SENSOR 0x0482 +#define GAP_APPEARANCE_CYCLING_CADENCE_SENSOR 0x0483 +#define GAP_APPEARANCE_CYCLING_POWER_SENSOR 0x0484 +#define GAP_APPEARANCE_CYCLING_SPEED_AND_CADENCE_SENSOR 0x0485 +#define GAP_APPEARANCE_GENERIC_PULSE_OXYMETER 0x0C40 +#define GAP_APPEARANCE_FINGERTIP 0x0C41 +#define GAP_APPEARANCE_WRIST_WORN 0x0C42 +#define GAP_APPEARANCE_GENERIC_WEIGHT_SCALE 0x0C80 +#define GAP_APPEARANCE_GENERIC_OUTDOOR_SPORT_ACTIVITY 0x1440 +#define GAP_APPEARANCE_LOCATION_DISPLAY_DEVICE 0x1441 +#define GAP_APPEARANCE_LOCATION_AND_NAVIGATION_DISPLAY_DEVICE 0x1442 +#define GAP_APPEARANCE_LOCATION_POD 0x1443 +#define GAP_APPEARANCE_LOCATION_AND_NAVIGATION_POD 0x1444 +#define GAP_APPEARANCE_GENERIC_ENVIRONMENTAL_SENSOR 0x1640 + +/* GATT UUIDs + */ +#define GATT_SERVICE_UUID 0x1801U +#define PRIMARY_SERVICE_UUID 0x2800U +#define SECONDARY_SERVICE_UUID 0x2801U +#define INCLUDE_SERVICE_UUID 0x2802U +#define CHARACTERISTIC_UUID 0x2803U +#define CHAR_EXTENDED_PROP_DESC_UUID 0x2900U +#define CHAR_USER_DESC_UUID 0x2901U +#define CHAR_CLIENT_CONFIG_DESC_UUID 0x2902U +#define CHAR_SERVER_CONFIG_DESC_UUID 0x2903U +#define CHAR_FORMAT_DESC_UUID 0x2904U +#define CHAR_AGGR_FMT_DESC_UUID 0x2905U +#define SERVICE_CHANGED_UUID 0x2A05U +#define CLIENT_SUPPORTED_FEATURES_UUID 0X2B29U +#define DATABASE_HASH_UUID 0X2B2AU +#define SERVER_SUPPORTED_FEATURES_UUID 0X2B3AU + +/* GAP UUIDs + */ +#define GAP_SERVICE_UUID 0x1800U +#define DEVICE_NAME_UUID 0x2A00U +#define APPEARANCE_UUID 0x2A01U +#define PERIPHERAL_PREFERRED_CONN_PARAMS_UUID 0x2A04U +#define CENTRAL_ADDRESS_RESOLUTION_UUID 0x2AA6U +#define RESOLVABLE_PRIVATE_ADDRESS_ONLY_UUID 0x2AC9U +#define ENCRYPTED_DATA_KEY_MATERIAL_UUID 0x2B88U +#define LE_GATT_SECURITY_LEVELS_UUID 0x2BF5U + + +#endif /* BLE_STD_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h new file mode 100644 index 0000000..92baada --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/ble_const.h @@ -0,0 +1,129 @@ +/***************************************************************************** + * @file ble_const.h + * + * @brief This file contains the definitions which are compiler dependent. + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef BLE_CONST_H__ +#define BLE_CONST_H__ + + +#include +#include +#include "ble_std.h" +#include "ble_defs.h" +#include "osal.h" +#include "compiler.h" + + +/* Default BLE variant */ +#ifndef BASIC_FEATURES +#define BASIC_FEATURES 0 +#endif +#ifndef SLAVE_ONLY +#define SLAVE_ONLY 0 +#endif +#ifndef LL_ONLY +#define LL_ONLY 0 +#endif +#ifndef LL_ONLY_BASIC +#define LL_ONLY_BASIC 0 +#endif +#ifndef BEACON_ONLY +#define BEACON_ONLY 0 +#endif + +/* Defintion to determine BLE Host stack presence */ +#define BLE_HOST_PRESENT (!(LL_ONLY || LL_ONLY_BASIC || BEACON_ONLY)) + + +/* Size of command/events buffers: + * + * To change the size of commands and events parameters used in the + * auto-generated files, you need to update 2 defines: + * + * - BLE_CMD_MAX_PARAM_LEN + * - BLE_EVT_MAX_PARAM_LEN + * + * These 2 defines are set below with default values and can be changed. + * + * To compute the value to support a characteristic of 512 bytes for a specific + * command or an event, you need to look in "ble_types.h". + * + * Here are 2 examples, one with a command and one with an event: + * + * - aci_gatt_update_char_value_ext_cp0 + * ---------------------------------- + * + * we have in the structure: + * + * uint8_t Value[(BLE_CMD_MAX_PARAM_LEN- 12)/sizeof(uint8_t)]; + * + * so to support a 512 byte value, we need to have + * + * BLE_CMD_MAX_PARAM_LEN at least equal to: 512 + 12 = 524 + * + * - aci_gatt_read_handle_value_rp0 + * ------------------------------ + * + * we have in the structure: + * + * uint8_t Value[((BLE_EVT_MAX_PARAM_LEN - 3) - 5)/sizeof(uint8_t)]; + * + * so to support a 512 byte value, we need to have + * + * BLE_EVT_MAX_PARAM_LEN at least equal to: 512 + 3 + 5 = 520 + * + * If you need several events or commands with 512-size values, you need to + * take the maximum values for BLE_EVT_MAX_PARAM_LEN and BLE_CMD_MAX_PARAM_LEN. + * + */ + +/* Maximum parameter size of BLE commands. + * Change this value if needed. */ +#define BLE_CMD_MAX_PARAM_LEN HCI_COMMAND_MAX_PARAM_LEN + +/* Maximum parameter size of BLE responses/events. + * Change this value if needed. */ +#define BLE_EVT_MAX_PARAM_LEN HCI_EVENT_MAX_PARAM_LEN + + +/* Callback function to send command and receive response */ +struct hci_request +{ + uint16_t ogf; + uint16_t ocf; + int event; + void* cparam; + int clen; + void* rparam; + int rlen; +}; +extern int hci_send_req( struct hci_request* req, uint8_t async ); + + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifndef MIN +#define MIN( a, b ) (((a) < (b)) ? (a) : (b)) +#endif + +#ifndef MAX +#define MAX( a, b ) (((a) > (b)) ? (a) : (b)) +#endif + + +#endif /* BLE_CONST_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h new file mode 100644 index 0000000..c147bbb --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/compiler.h @@ -0,0 +1,160 @@ +/***************************************************************************** + * @file compiler.h + * + * @brief This file contains the definitions which are compiler dependent. + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef COMPILER_H__ +#define COMPILER_H__ + + +#ifndef __PACKED_STRUCT +#define __PACKED_STRUCT PACKED(struct) +#endif + +#ifndef __PACKED_UNION +#define __PACKED_UNION PACKED(union) +#endif + +/** + * @brief This is the section dedicated to IAR toolchain + */ +#if defined(__ICCARM__) || defined(__IAR_SYSTEMS_ASM__) + +#ifndef __WEAK +#define __WEAK __weak +#endif + +#define QUOTE_(a) #a + +/** + * @brief PACKED + * Use the PACKED macro for variables that needs to be packed. + * Usage: PACKED(struct) myStruct_s + * PACKED(union) myStruct_s + */ +#define PACKED(decl) __packed decl + +/** + * @brief SECTION + * Use the SECTION macro to assign data or code in a specific section. + * Usage: SECTION(".my_section") + */ +#define SECTION(name) _Pragma(QUOTE_(location=name)) + +/** + * @brief ALIGN_DEF + * Use the ALIGN_DEF macro to specify the alignment of a variable. + * Usage: ALIGN_DEF(4) + */ +#define ALIGN_DEF(v) _Pragma(QUOTE_(data_alignment=v)) + +/** + * @brief NO_INIT + * Use the NO_INIT macro to declare a not initialized variable. + * Usage: NO_INIT(int my_no_init_var) + * Usage: NO_INIT(uint16_t my_no_init_array[10]) + */ +#define NO_INIT(var) __no_init var + +/** + * @brief This is the section dedicated to GNU toolchain + */ +#else +#ifdef __GNUC__ + +#ifndef __WEAK +#define __WEAK __attribute__((weak)) +#endif + +/** + * @brief PACKED + * Use the PACKED macro for variables that needs to be packed. + * Usage: PACKED(struct) myStruct_s + * PACKED(union) myStruct_s + */ +#define PACKED(decl) decl __attribute__((packed)) + +/** + * @brief SECTION + * Use the SECTION macro to assign data or code in a specific section. + * Usage: SECTION(".my_section") + */ +#define SECTION(name) __attribute__((section(name))) + +/** + * @brief ALIGN_DEF + * Use the ALIGN_DEF macro to specify the alignment of a variable. + * Usage: ALIGN_DEF(4) + */ +#define ALIGN_DEF(N) __attribute__((aligned(N))) + +/** + * @brief NO_INIT + * Use the NO_INIT macro to declare a not initialized variable. + * Usage: NO_INIT(int my_no_init_var) + * Usage: NO_INIT(uint16_t my_no_init_array[10]) + */ +#define NO_INIT(var) var __attribute__((section(".noinit"))) + +/** + * @brief This is the section dedicated to Keil toolchain + */ +#else +#ifdef __CC_ARM + +#ifndef __WEAK +#define __WEAK __weak +#endif + +/** + * @brief PACKED + * Use the PACKED macro for variables that needs to be packed. + * Usage: PACKED(struct) myStruct_s + * PACKED(union) myStruct_s + */ +#define PACKED(decl) decl __attribute__((packed)) + +/** + * @brief SECTION + * Use the SECTION macro to assign data or code in a specific section. + * Usage: SECTION(".my_section") + */ +#define SECTION(name) __attribute__((section(name))) + +/** + * @brief ALIGN_DEF + * Use the ALIGN_DEF macro to specify the alignment of a variable. + * Usage: ALIGN_DEF(4) + */ +#define ALIGN_DEF(N) __attribute__((aligned(N))) + +/** + * @brief NO_INIT + * Use the NO_INIT macro to declare a not initialized variable. + * Usage: NO_INIT(int my_no_init_var) + * Usage: NO_INIT(uint16_t my_no_init_array[10]) + */ +#define NO_INIT(var) var __attribute__((section("NoInit"))) + +#else + +#error Neither ICCARM, CC ARM nor GNUC C detected. Define your macros. + +#endif +#endif +#endif + + +#endif /* COMPILER_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/osal.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/osal.c new file mode 100644 index 0000000..803fae8 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/osal.c @@ -0,0 +1,50 @@ +/***************************************************************************** + * @file osal.c + * + * @brief Implements the interface defined in "osal.h" needed by the stack. + * Actually, only memset, memcpy and memcmp wrappers are implemented. + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#include +#include "osal.h" + + +/** + * Osal_MemCpy + * + */ + +void* Osal_MemCpy( void *dest, const void *src, unsigned int size ) +{ + return memcpy( dest, src, size ); +} + +/** + * Osal_MemSet + * + */ + +void* Osal_MemSet( void *ptr, int value, unsigned int size ) +{ + return memset( ptr, value, size ); +} + +/** + * Osal_MemCmp + * + */ +int Osal_MemCmp( const void *s1, const void *s2, unsigned int size ) +{ + return memcmp( s1, s2, size ); +} diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/osal.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/osal.h new file mode 100644 index 0000000..d8485d0 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/core/template/osal.h @@ -0,0 +1,65 @@ +/***************************************************************************** + * @file osal.h + * + * @brief This header file defines the OS abstraction layer used by + * the BLE stack. OSAL defines the set of functions which needs to be + * ported to target operating system and target platform. + * Actually, only memset, memcpy and memcmp wrappers are defined. + ***************************************************************************** + * @attention + * + * Copyright (c) 2018-2025 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. + * + ***************************************************************************** + */ + +#ifndef OSAL_H__ +#define OSAL_H__ + + +/** + * This function copies size number of bytes from a + * memory location pointed by src to a destination + * memory location pointed by dest + * + * @param[in] dest Destination address + * @param[in] src Source address + * @param[in] size size in the bytes + * + * @return Address of the destination + */ + +extern void* Osal_MemCpy( void *dest, const void *src, unsigned int size ); + +/** + * This function sets first number of bytes, specified + * by size, to the destination memory pointed by ptr + * to the specified value + * + * @param[in] ptr Destination address + * @param[in] value Value to be set + * @param[in] size Size in the bytes + * + * @return Address of the destination + */ + +extern void* Osal_MemSet( void *ptr, int value, unsigned int size ); + +/** + * This function compares n bytes of two regions of memory + * + * @param[in] s1 First buffer to compare. + * @param[in] s2 Second buffer to compare. + * @param[in] size Number of bytes to compare. + * + * @return 0 if the two buffers are equal, 1 otherwise + */ +extern int Osal_MemCmp( const void *s1, const void *s2, unsigned int size ); + + +#endif /* OSAL_H__ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h new file mode 100644 index 0000000..34b581c --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/bas.h @@ -0,0 +1,62 @@ +/** + ****************************************************************************** + * @file bas.h + * @author MCD Application Team + * @brief Header for bas.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __BAS_H +#define __BAS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + BAS_LEVEL_NOT_ENABLED_EVT, + BAS_LEVEL_NOT_DISABLED_EVT, + BAS_LEVEL_READ_EVT +} BAS_Opcode_Notification_evt_t; + +typedef struct +{ + BAS_Opcode_Notification_evt_t BAS_Evt_Opcode; + uint8_t ServiceInstance; +}BAS_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +#define BAS_LEVEL_NOTIFICATION_OPTION 1 + + +/* Exported functions ------------------------------------------------------- */ +void BAS_Init(void); +void BAS_Update_Char(uint16_t UUID, uint8_t service_instance, uint8_t *pPayload); +void BAS_Notification(BAS_Notification_evt_t * pNotification); + +#ifdef __cplusplus +} +#endif + +#endif /*__BAS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h new file mode 100644 index 0000000..fa11cee --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/bls.h @@ -0,0 +1,102 @@ +/** + ****************************************************************************** + * @file bls.h + * @author MCD Application Team + * @brief Header for bls.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __BLS_H +#define __BLS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + NO_FLAG = 0, + VALUE_UNIT_KILO_PASCAL = (1<<0), /*0 -> Blood pressure systolic, diastolic & Mean values in units of mmHg - if 1 -> in units of kPa*/ + TIME_STAMP_PRESENT = (1<<1), + PULSE_RATE_PRESENT = (1<<2), + USER_ID_PRESENT = (1<<3), + MEASUREMENT_STATUS_PRESENT = (1<<4) +} BLS_Measurement_Flags_t; + +typedef enum +{ + BLS_MEASUREMENT_IND_ENABLED_EVT, + BLS_MEASUREMENT_IND_DISABLED_EVT, +#if (BLE_CFG_BLS_INTERMEDIATE_CUFF_PRESSURE != 0) + BLS_INTERMEDIATE_CUFF_PRESSURE_NOTIF_ENABLED_EVT, + BLS_INTERMEDIATE_CUFF_PRESSURE_NOTIF_DISABLED_EVT, +#endif +} BLS_App_Opcode_Notification_evt_t; + +typedef struct +{ + BLS_App_Opcode_Notification_evt_t BLS_Evt_Opcode; +}BLS_App_Notification_evt_t; + +typedef struct +{ + uint16_t Year; + uint8_t Month; + uint8_t Day; + uint8_t Hours; + uint8_t Minutes; + uint8_t Seconds; +}BLS_TimeStamp_t; + +typedef struct +{ + uint16_t MeasurementValue_Systolic; + uint16_t MeasurementValue_Diastolic; + uint16_t MeasurementValue_Mean; +#if (BLE_CFG_BLS_TIME_STAMP_FLAG != 0) + BLS_TimeStamp_t TimeStamp; +#endif +#if (BLE_CFG_BLS_PULSE_RATE_FLAG != 0) + uint16_t PulseRate; +#endif +#if (BLE_CFG_BLS_USER_ID_FLAG != 0) + uint8_t UserID; +#endif +#if (BLE_CFG_BLS_MEASUREMENT_STATUS_FLAG != 0) + uint16_t MeasurementStatus; +#endif + uint8_t Flags; +}BLS_Value_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void BLS_Init(void); +void BLS_Update_Char(uint16_t UUID, uint8_t *pPayload); +void BLS_App_Notification(BLS_App_Notification_evt_t * pNotification); + +#ifdef __cplusplus +} +#endif + +#endif /*__BLS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h new file mode 100644 index 0000000..9761856 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/crs_stm.h @@ -0,0 +1,72 @@ + +/** + ****************************************************************************** + * @file crs_stm.h + * @author MCD Application Team + * @brief Header for crs_stm.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32XX_CRS_H +#define __STM32XX_CRS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + CRS_NOTIFY_ENABLED_EVT, + CRS_NOTIFY_DISABLED_EVT, + CRS_READ_EVT, + CRS_WRITE_EVT, +} CRS_Opcode_evt_t; + +typedef struct +{ + uint8_t * pPayload; + uint8_t Length; +}CRS_Data_t; + +typedef struct +{ + CRS_Opcode_evt_t CRS_Evt_Opcode; + CRS_Data_t DataTransfered; + uint16_t ConnectionHandle; + uint8_t ServiceInstance; +}CRS_STM_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +#define CRS_MAX_DATA_LEN (BLE_DEFAULT_ATT_MTU - 3) /**< Maximum length of data (in bytes) that can be transmitted to the peer. */ + +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void CRS_STM_Init(void); +void CRS_STM_Notification(CRS_STM_Notification_evt_t *p_Notification); +tBleStatus CRS_STM_Update_Char(uint16_t UUID, uint8_t *p_Payload); + + +#ifdef __cplusplus +} +#endif + +#endif /*__STM32XX_CRS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h new file mode 100644 index 0000000..4b430eb --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/dis.h @@ -0,0 +1,52 @@ +/** + ****************************************************************************** + * @file dis.h + * @author MCD Application Team + * @brief Header for dis.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __DIS_H +#define __DIS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Includes ------------------------------------------------------------------*/ +/* Exported types ------------------------------------------------------------*/ +typedef struct +{ + uint8_t *pPayload; + uint8_t Length; +}DIS_Data_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void DIS_Init(void); +tBleStatus DIS_UpdateChar(uint16_t uuid, DIS_Data_t *p_data); + +#ifdef __cplusplus +} +#endif + +#endif /*__DIS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h new file mode 100644 index 0000000..eee5867 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/eds_stm.h @@ -0,0 +1,79 @@ + +/** + ****************************************************************************** + * @file eds_stm.h + * @author MCD Application Team + * @brief Header for stm32xx_enddevicemanagement.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __EDS_STM_H +#define __EDS_STM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + EDS_STM_NOTIFY_DISABLED_EVT, + EDS_STM_NOTIFY_ENABLED_EVT, +} EDS_STM_Opcode_evt_t; + +typedef struct +{ + uint8_t Device1_Status; + uint8_t Device2_Status; + uint8_t Device3_Status; + uint8_t Device4_Status; + uint8_t Device5_Status; + uint8_t Device6_Status; + }EDS_STM_Status_t; + +typedef struct +{ + uint8_t * pPayload; + uint8_t Length; +}EDS_STM_Data_t; + +typedef struct +{ + EDS_STM_Opcode_evt_t EDS_Evt_Opcode; + EDS_STM_Data_t DataTransfered; + uint16_t ConnectionHandle; + }EDS_STM_App_Notification_evt_t; + + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void EDS_STM_Init( void ); +void EDS_STM_App_Notification(EDS_STM_App_Notification_evt_t * pNotification); +tBleStatus EDS_STM_Update_Char(uint16_t UUID, uint8_t *pPayload); + + +#ifdef __cplusplus +} +#endif + +#endif /*__EDS_STM_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h new file mode 100644 index 0000000..02af660 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hids.h @@ -0,0 +1,79 @@ +/** + ****************************************************************************** + * @file hids.h + * @author MCD Application Team + * @brief Header for hids.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __HIDS_H +#define __HIDS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Includes ------------------------------------------------------------------*/ + + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + HIDS_REPORT_NOTIFICATION_ENABLED, + HIDS_REPORT_NOTIFICATION_DISABLED, + HIDS_KEYB_INPUT_NOTIFY_ENABLED, + HIDS_KEYB_INPUT_NOTIFY_DISABLED, + HIDS_MOUSE_INPUT_NOTIFY_ENABLED, + HIDS_MOUSE_INPUT_NOTIFY_DISABLED, + HIDS_OUTPUT_REPORT, + HIDS_KEYBOARD_INPUT_REPORT, + HIDS_KEYBOARD_OUTPUT_REPORT, + HIDS_MOUSE_INPUT_REPORT, + HIDS_CONN_HANDLE_EVT, + HIDS_DISCON_HANDLE_EVT +} HIDS_Opcode_Notification_evt_t; + +typedef struct +{ + HIDS_Opcode_Notification_evt_t HIDS_Evt_Opcode; + uint8_t Instance; + uint8_t Index; + uint8_t ReportLength; + uint8_t *pReport; +} HIDS_App_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void HIDS_Init(void); +tBleStatus HIDS_Update_Char(uint16_t UUID, + uint8_t service_instance, + uint8_t Report_Index, + uint8_t report_size, + uint8_t *pPayload); +void HIDS_Notification(HIDS_App_Notification_evt_t *pNotification); + + +#ifdef __cplusplus +} +#endif + +#endif /*__HIDS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h new file mode 100644 index 0000000..741951d --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hrs.h @@ -0,0 +1,99 @@ +/** + ****************************************************************************** + * @file hrs.h + * @author MCD Application Team + * @brief Header for stm32xx_heartrate.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __HRS_H +#define __HRS_H + +#ifdef __cplusplus +extern "C" { +#endif + + /* Includes ------------------------------------------------------------------*/ + /* Exported types ------------------------------------------------------------*/ + typedef enum + { + HRS_HRM_VALUE_FORMAT_UINT16 = 1, + HRS_HRM_SENSOR_CONTACTS_PRESENT = 2, + HRS_HRM_SENSOR_CONTACTS_SUPPORTED = 4, + HRS_HRM_ENERGY_EXPENDED_PRESENT = 8, + HRS_HRM_RR_INTERVAL_PRESENT = 0x10 + } HRS_HrmFlags_t; + + typedef enum + { + HRS_BODY_SENSOR_LOCATION_OTHER = 0, + HRS_BODY_SENSOR_LOCATION_CHEST = 1, + HRS_BODY_SENSOR_LOCATION_WRIST = 2, + HRS_BODY_SENSOR_LOCATION_FINGER = 3, + HRS_BODY_SENSOR_LOCATION_HAND = 4, + HRS_BODY_SENSOR_LOCATION_EAR_LOBE = 5, + HRS_BODY_SENSOR_LOCATION_FOOT = 6 + } HRS_BodySensorLocation_t; + + typedef enum + { + HRS_RESET_ENERGY_EXPENDED_EVT, + HRS_NOTIFICATION_ENABLED, + HRS_NOTIFICATION_DISABLED, + HRS_STM_BOOT_REQUEST_EVT, + } HRS_NotCode_t; + + typedef struct +{ + uint8_t * pPayload; + uint8_t Length; +}HRS_Data_t; + +typedef struct +{ + HRS_NotCode_t HRS_Evt_Opcode; + HRS_Data_t DataTransfered; + uint16_t ConnectionHandle; + uint8_t ServiceInstance; +}HRS_App_Notification_evt_t; + + typedef struct{ + uint16_t MeasurementValue; +#if (BLE_CFG_HRS_ENERGY_EXPENDED_INFO_FLAG == 1) + uint16_t EnergyExpended; +#endif +#if (BLE_CFG_HRS_ENERGY_RR_INTERVAL_FLAG != 0) + uint16_t aRRIntervalValues[BLE_CFG_HRS_ENERGY_RR_INTERVAL_FLAG + BLE_CFG_HRS_ENERGY_EXPENDED_INFO_FLAG]; + uint8_t NbreOfValidRRIntervalValues; +#endif + uint8_t Flags; + }HRS_MeasVal_t; + + /* Exported constants --------------------------------------------------------*/ + /* External variables --------------------------------------------------------*/ + /* Exported macros -----------------------------------------------------------*/ + /* Exported functions ------------------------------------------------------- */ + void HRS_Init(void); + tBleStatus HRS_UpdateChar(uint16_t uuid, uint8_t *p_payload); + void HRS_Notification(HRS_App_Notification_evt_t *pNotification); + +#ifdef __cplusplus +} +#endif + +#endif /*__HRS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h new file mode 100644 index 0000000..b41f188 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/hts.h @@ -0,0 +1,113 @@ + +/** + ****************************************************************************** + * @file hts.h + * @author MCD Application Team + * @brief Header for shst.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __HTS_H +#define __HTS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Includes ------------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + NO_FLAGS = 0, + VALUE_UNIT_FAHRENHEIT = (1<<0), + SENSOR_TIME_STAMP_PRESENT = (1<<1), + SENSOR_TEMPERATURE_TYPE_PRESENT = (1<<2), +} HTS_TM_Flags_t; + +typedef enum +{ + TT_Armpit = 1, + TT_Body = 2, + TT_Ear = 3, + TT_Finger = 4, + TT_Gastro_intestinal_Tract = 5, + TT_Mouth = 6, + TT_Rectum = 7, + TT_Toe = 8, + TT_Tympanum = 9 +} HTS_Temperature_Type_t; + +typedef enum +{ + HTS_MEASUREMENT_INTERVAL_RECEIVED_EVT, + HTS_MEASUREMENT_IND_ENABLED_EVT, + HTS_MEASUREMENT_IND_DISABLED_EVT, + HTS_MEASUREMENT_INTERVAL_IND_ENABLED_EVT, + HTS_MEASUREMENT_INTERVAL_IND_DISABLED_EVT, + HTS_INTERMEDIATE_TEMPERATURE_NOT_ENABLED_EVT, + HTS_INTERMEDIATE_TEMPERATURE_NOT_DISABLED_EVT, +} HTS_App_Opcode_Notification_evt_t; + +typedef struct +{ + HTS_App_Opcode_Notification_evt_t HTS_Evt_Opcode; +#if (BLE_CFG_HTS_MEASUREMENT_INTERVAL != 0) + uint16_t RangeInterval; +#endif +}HTS_App_Notification_evt_t; + +#if (BLE_CFG_HTS_TIME_STAMP_FLAG != 0) +typedef struct +{ + uint16_t Year; + uint8_t Month; + uint8_t Day; + uint8_t Hours; + uint8_t Minutes; + uint8_t Seconds; +}HTS_TimeStamp_t; +#endif + +typedef struct +{ + uint32_t MeasurementValue; +#if (BLE_CFG_HTS_TIME_STAMP_FLAG != 0) + HTS_TimeStamp_t TimeStamp; +#endif +#if (BLE_CFG_HTS_TEMPERATURE_TYPE_VALUE_STATIC == 0) + HTS_Temperature_Type_t TemperatureType; +#endif + uint8_t Flags; +}HTS_TemperatureValue_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void HTS_Init(void); +tBleStatus HTS_Update_Char(uint16_t UUID, + uint8_t *pPayload); +void HTS_App_Notification(HTS_App_Notification_evt_t * pNotification); + +#ifdef __cplusplus +} +#endif + +#endif /*__HTS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h new file mode 100644 index 0000000..076af5a --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/ias.h @@ -0,0 +1,62 @@ +/** + ****************************************************************************** + * @file ias.h + * @author MCD Application Team + * @brief Header for ias.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __IAS_H +#define __IAS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + + +/* Includes ------------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + IAS_NO_ALERT_EVT, + IAS_MID_ALERT_EVT, + IAS_HIGH_ALERT_EVT +} IAS_App_Opcode_Notification_evt_t; + +typedef struct +{ + IAS_App_Opcode_Notification_evt_t IAS_Evt_Opcode; +}IAS_App_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void IAS_Init(void); +tBleStatus IAS_Update_Char(uint16_t UUID, uint8_t *pPayload); +void IAS_App_Notification(IAS_App_Notification_evt_t *pNotification); + + +#ifdef __cplusplus +} +#endif + +#endif /*__IAS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h new file mode 100644 index 0000000..244af4d --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/lls.h @@ -0,0 +1,63 @@ +/** + ****************************************************************************** + * @file lls.h + * @author MCD Application Team + * @brief Header for lls.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __LLS_H +#define __LLS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Includes ------------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + LLS_NO_ALERT_EVT, + LLS_MID_ALERT_EVT, + LLS_HIGH_ALERT_EVT, + LLS_DISCONNECT_EVT, + LLS_CONNECT_EVT +} LLS_App_Opcode_Notification_evt_t; + +typedef struct +{ + LLS_App_Opcode_Notification_evt_t LLS_Evt_Opcode; +}LLS_App_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void LLS_Init(void); +tBleStatus LLS_Update_Char(uint16_t UUID, uint8_t *pPayload); +void LLS_App_Notification(LLS_App_Notification_evt_t *pNotification); + + +#ifdef __cplusplus +} +#endif + +#endif /*__LLS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h new file mode 100644 index 0000000..03a1cad --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/mesh.h @@ -0,0 +1,43 @@ +/** + ****************************************************************************** + * @file mesh.h + * @author MCD Application Team + * @brief Header for mesh.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MESH_H +#define __MESH_H + +#ifdef __cplusplus +extern "C" +{ +#endif + + /* Includes ------------------------------------------------------------------*/ + /* Exported types ------------------------------------------------------------*/ + /* Exported constants --------------------------------------------------------*/ + /* External variables --------------------------------------------------------*/ + /* Exported macros -----------------------------------------------------------*/ + /* Exported functions ------------------------------------------------------- */ + void MESH_Init(void); + +#ifdef __cplusplus +} +#endif + +#endif /*__MESH_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h new file mode 100644 index 0000000..df9f1b3 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/motenv_stm.h @@ -0,0 +1,177 @@ + +/** + ****************************************************************************** + * @file motenv_stm.h + * @author SRA/AST + * @brief Header for motenv_stm.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2024 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef MOTENV_STM_H +#define MOTENV_STM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +/** + * @brief MOTENV Event Opcode definition + */ +typedef enum +{ + /* HW Service Chars related events */ + HW_MOTION_NOTIFY_ENABLED_EVT, + HW_MOTION_NOTIFY_DISABLED_EVT, + HW_ENV_NOTIFY_ENABLED_EVT, + HW_ENV_NOTIFY_DISABLED_EVT, + HW_ENV_READ_EVT, + HW_ACC_EVENT_NOTIFY_ENABLED_EVT, + HW_ACC_EVENT_NOTIFY_DISABLED_EVT, + HW_ACC_EVENT_READ_EVT, + HW_TOF_NOTIFY_ENABLED_EVT, + HW_TOF_NOTIFY_DISABLED_EVT, + HW_TOF_WRITE_EVT, + /* SW Service Chars related events */ + SW_MOTIONFX_NOTIFY_ENABLED_EVT, + SW_MOTIONFX_NOTIFY_DISABLED_EVT, + SW_ECOMPASS_NOTIFY_ENABLED_EVT, + SW_ECOMPASS_NOTIFY_DISABLED_EVT, + SW_ACTIVITY_REC_NOTIFY_ENABLED_EVT, + SW_ACTIVITY_REC_NOTIFY_DISABLED_EVT, + SW_ACTIVITY_REC_READ_EVT, + SW_CARRY_POSITION_NOTIFY_ENABLED_EVT, + SW_CARRY_POSITION_NOTIFY_DISABLED_EVT, + SW_CARRY_POSITION_READ_EVT, + SW_GESTURE_REC_NOTIFY_ENABLED_EVT, + SW_GESTURE_REC_NOTIFY_DISABLED_EVT, + SW_GESTURE_REC_READ_EVT, + SW_PEDOMETER_NOTIFY_ENABLED_EVT, + SW_PEDOMETER_NOTIFY_DISABLED_EVT, + SW_PEDOMETER_READ_EVT, + SW_INTENSITY_DET_NOTIFY_ENABLED_EVT, + SW_INTENSITY_DET_NOTIFY_DISABLED_EVT, + MOTENV_STM_BOOT_REQUEST_EVT, + /* Config Service Chars related events */ + CONFIG_NOTIFY_ENABLED_EVT, + CONFIG_NOTIFY_DISABLED_EVT, + CONFIG_WRITE_EVT, + /* Console Service Chars related events */ + CONSOLE_TERM_NOTIFY_ENABLED_EVT, + CONSOLE_TERM_NOTIFY_DISABLED_EVT, + CONSOLE_STDERR_NOTIFY_ENABLED_EVT, + CONSOLE_STDERR_NOTIFY_DISABLED_EVT, + CONSOLE_TERM_READ_EVT, + CONSOLE_STDERR_READ_EVT +} MOTENV_STM_Opcode_evt_t; + +/** + * @brief MOTENV Event data structure definition + */ +typedef struct +{ + uint8_t *pPayload; + uint8_t Length; +} MOTENV_STM_Data_t; + +/** + * @brief MOTENV Notification structure definition + */ +typedef struct +{ + MOTENV_STM_Opcode_evt_t Motenv_Evt_Opcode; + MOTENV_STM_Data_t DataTransfered; + uint16_t ConnectionHandle; + uint8_t ServiceInstance; +} MOTENV_STM_App_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +/* Exported Variables ------------------------------------------------------- */ +extern uint8_t ToF_BoardPresent; + +/* Exported macros -----------------------------------------------------------*/ +/** + * @brief Motion (Acc-Gyro-Magneto) Char shortened UUID + */ +#define MOTION_CHAR_UUID (0xE000) +/** + * @brief Environmental (Temp-Humidity-Pressure) Char shortened UUID + */ +#define ENV_CHAR_UUID (0x1D00) +/** + * @brief ToF Char shortened UUID + */ +#define TOF_CHAR_UUID (0x0000) +/** + * @brief Acceleration event Char shortened UUID + */ +#define ACC_EVENT_CHAR_UUID (0x0004) +/** + * @brief Sensor Fusion Char shortened UUID + */ +#define MOTION_FX_CHAR_UUID (0x0100) +/** + * @brief E-Compass event Char shortened UUID + */ +#define ECOMPASS_CHAR_UUID (0x0040) +/** + * @brief Activity Recognition Char event Char shortened UUID + */ +#define ACTIVITY_REC_CHAR_UUID (0x0010) +/** + * @brief Carry Position event Char shortened UUID + */ +#define CARRY_POSITION_CHAR_UUID (0x0008) +/** + * @brief Gesture Recognition event Char shortened UUID + */ +#define GESTURE_REC_CHAR_UUID (0x0200) +/** + * @brief Pedometer Char shortened UUID + */ +#define PEDOMETER_CHAR_UUID (0x0001) +/** + * @brief Intensity Detection Char shortened UUID + */ +#define INTENSITY_DET_CHAR_UUID (0x0020) +/** + * @brief Config Char shortened UUID + */ +#define CONFIG_CHAR_UUID (0x0002) +/** + * @brief Console Terminal Char shortened UUID + */ +#define CONSOLE_TERM_CHAR_UUID (0x010E) +/** + * @brief Cosnole Stderr Char shortened UUID + */ +#define CONSOLE_STDERR_CHAR_UUID (0x020E) + +/* Exported functions ------------------------------------------------------- */ +void MOTENV_STM_Init(void); +void MOTENV_STM_App_Notification(MOTENV_STM_App_Notification_evt_t *pNotification); +tBleStatus MOTENV_STM_App_Update_Char(uint16_t UUID, uint8_t payloadLen, uint8_t *pPayload); + + +#ifdef __cplusplus +} +#endif + +#endif /* MOTENV_STM_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h new file mode 100644 index 0000000..627d593 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/otas_stm.h @@ -0,0 +1,108 @@ +/** + ****************************************************************************** + * @file otas_stm.h + * @author MCD Application Team + * @brief Interface to OTA BLE service + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __OTAS_STM_H +#define __OTAS_STM_H + +#ifdef __cplusplus +extern "C" { +#endif + + /* Includes ------------------------------------------------------------------*/ +#include "stm32_wpan_common.h" + + /* Exported defines -----------------------------------------------------------*/ +#define OTAS_STM_RAW_DATA_SIZE (248) + + /* Exported types ------------------------------------------------------------*/ + typedef enum + { + OTAS_STM_BASE_ADDR_ID, + OTAS_STM_RAW_DATA_ID, + OTAS_STM_CONF_ID, + OTAS_STM_CONF_EVENT_ID, + } OTAS_STM_ChardId_t; + + typedef enum + { + OTAS_STM_STOP_ALL_UPLOAD = 0x00, + OTAS_STM_WIRELESS_FW_UPLOAD = 0x01, + OTAS_STM_APPLICATION_UPLOAD = 0x02, + OTAS_STM_UPLOAD_FINISHED = 0x07, + OTAS_STM_CANCEL_UPLOAD = 0x08, + } OTAS_STM_Command_t; + + typedef enum + { + OTAS_STM_REBOOT_CONFIRMED = 0x01, + } OTAS_STM_Indication_Msg_t; + + typedef struct{ + uint8_t *pPayload; + OTAS_STM_ChardId_t ChardId; + uint8_t ValueLength; + } OTA_STM_Notification_t; + + typedef PACKED_STRUCT{ + OTAS_STM_Command_t Command; /**< [0:7] */ + uint8_t Base_Addr[3]; /**< [8:31] */ + } OTA_STM_Base_Addr_Event_Format_t; + + typedef PACKED_STRUCT{ + uint8_t Raw_Data[OTAS_STM_RAW_DATA_SIZE]; + } OTA_STM_Raw_Data_Event_Format_t; + + typedef PACKED_STRUCT{ + aci_gatt_server_confirmation_event_rp0 Conf_Event; + } OTA_STM_Conf_Event_Format_t; + + typedef PACKED_STRUCT{ + OTAS_STM_Indication_Msg_t Conf_Msg; + } OTA_STM_Conf_Char_Format_t; + + /* Exported constants --------------------------------------------------------*/ + /* External variables --------------------------------------------------------*/ + /* Exported macros -----------------------------------------------------------*/ + /* Exported functions ------------------------------------------------------- */ + void OTAS_STM_Notification( OTA_STM_Notification_t *p_notification ); + + /** + * @brief Service initialization + * @param None + * @retval None + */ + void OTAS_STM_Init(void); + + /** + * @brief Characteristic update + * @param ChardId: Id of the characteristic to be written + * @param p_payload: The new value to be written + * @retval Command status + */ + tBleStatus OTAS_STM_UpdateChar(OTAS_STM_ChardId_t ChardId, uint8_t *p_payload); + +#ifdef __cplusplus +} +#endif + +#endif /*__OTAS_STM_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h new file mode 100644 index 0000000..11c4606 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/p2p_stm.h @@ -0,0 +1,73 @@ + +/** + ****************************************************************************** + * @file p2p_stm.h + * @author MCD Application Team + * @brief Header for p2p_stm.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __P2PS_STM_H +#define __P2PS_STM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + + + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + P2PS_STM__NOTIFY_ENABLED_EVT, + P2PS_STM_NOTIFY_DISABLED_EVT, + P2PS_STM_READ_EVT, + P2PS_STM_WRITE_EVT, + P2PS_STM_BOOT_REQUEST_EVT, +} P2PS_STM_Opcode_evt_t; + +typedef struct +{ + uint8_t * pPayload; + uint8_t Length; +}P2PS_STM_Data_t; + +typedef struct +{ + P2PS_STM_Opcode_evt_t P2P_Evt_Opcode; + P2PS_STM_Data_t DataTransfered; + uint16_t ConnectionHandle; + uint8_t ServiceInstance; +}P2PS_STM_App_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void P2PS_STM_Init( void ); +void P2PS_STM_App_Notification(P2PS_STM_App_Notification_evt_t *pNotification); +tBleStatus P2PS_STM_App_Update_Char(uint16_t UUID, uint8_t *pPayload); + + +#ifdef __cplusplus +} +#endif + +#endif /*__P2PS_STM_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h new file mode 100644 index 0000000..01e921d --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/svc_ctl.h @@ -0,0 +1,171 @@ + +/** + ****************************************************************************** + * @file svc_ctl.h + * @author MCD Application Team + * @brief Header for ble_controller.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/** + * The BLE Controller supports the application to handle services and clients. + * It provides an API to initialize the BLE core Device and a handler mechanism to rout the GATT/GAP events to the + * application. When the ble_controller is used (recommended), the application shall register a callback for each + * Service and each Client implemented. This is already done with the Services and Clients provided in that delivery. + * + A GATT event is relevant to only one Service and/or one Client. When a GATT event is received, it is notified to + * the registered handlers to the BLE controller. When no registered handler acknowledges positively the GATT event, + * it is reported to the application. + * + A GAP event is not relevant to either a Service or a Client. It is sent to the application + * + In case the application does not want to take benefit from the ble_controller, it could bypass it. In that case, + * the application shall: + * - call SVCCTL_Init() to initialize the BLE core device (or implement on its own what is inside that function + * - implement TLHCI_UserEvtRx() which is the notification from the HCI layer to report all events (GATT/GAP). + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __SVCCTL_H +#define __SVCCTL_H + +#ifdef __cplusplus +extern "C" { +#endif + + /* Includes ------------------------------------------------------------------*/ + /* Exported types ------------------------------------------------------------*/ + typedef enum + { + SVCCTL_EvtNotAck, + SVCCTL_EvtAckFlowEnable, + SVCCTL_EvtAckFlowDisable, + } SVCCTL_EvtAckStatus_t; + + typedef enum + { + SVCCTL_UserEvtFlowDisable, + SVCCTL_UserEvtFlowEnable, + } SVCCTL_UserEvtFlowStatus_t; + + typedef SVCCTL_EvtAckStatus_t (*SVC_CTL_p_EvtHandler_t)(void *p_evt); + + /* Exported constants --------------------------------------------------------*/ + /* External variables --------------------------------------------------------*/ + /* Exported macros -----------------------------------------------------------*/ + + /* Exported functions ------------------------------------------------------- */ + /** + * @brief It initializes the BLE core Driver and sends some commands to initialize the BLE core device + * It shall be called before any BLE operation + * + * @param None + * @retval None + */ + void SVCCTL_Init( void ); + + /** + * @brief This API registers a handler to be called when a GATT user event is received from the BLE core device. When + * a Service is created, it shall register a callback to be notified when a GATT event is received from the + * BLE core device. When a GATT event is received, it shall be checked in the handler if the GATT events belongs + * to the Service or not. The handler shall return the correct status depending on the result. As soon as one + * Service handler registered acknowledges positively the GATT event, the ble_controller stops calling the + * registered Service handlers. + * This handler is called in the TL_BLE_HCI_UserEvtProc() context + * + * @param pfBLE_SVC_Service_Event_Handler: This is the Service handler that the ble_controller calls to report a GATT + * event received. If the GATT event belongs to that Service, the callback shall return positively with + * SVCCTL_EvtAckFlowEnable. + * @retval None + */ + void SVCCTL_RegisterSvcHandler( SVC_CTL_p_EvtHandler_t pfBLE_SVC_Service_Event_Handler ); + + /** + * @brief This API registers a handler to be called when a GATT user event is received from the BLE core device. When + * a Client is created, it shall register a callback to be notified when a GATT event is received from the + * BLE core device. When a GATT event is received, it shall be checked in the handler if the GATT events belongs + * to the Client or not. The handler shall return the correct status depending on the result. As soon as one + * Client handler registered acknowledges positively the GATT event, the ble_controller stops calling the + * registered Client handlers. + * This handler is called in the TL_BLE_HCI_UserEvtProc() context + * + * @param pfBLE_SVC_Client_Event_Handler: This is the Client handler that the ble_controller calls to report a GATT + * event received. If the GATT event belongs to that Client, the callback shall return positively with + * SVCCTL_EvtAckFlowEnable. + * @retval None + */ + void SVCCTL_RegisterCltHandler( SVC_CTL_p_EvtHandler_t pfBLE_SVC_Client_Event_Handler ); + + /** + * @brief This API is used to resume the User Event Flow that has been stopped in return of SVCCTL_UserEvtRx() + * + * @param None + * @retval None + */ + void SVCCTL_ResumeUserEventFlow( void ); + + + /** + * @brief This callback is triggered when either + * + a GAP event is received from the BLE core device. + * + a GATT event that has not been positively acknowledged by the registered handler is received from the + * BLE core device. + * The event is returned in a HCI packet. The full HCI packet is stored in a single buffer and is available when + * this callback is triggered. However, an ACI event may be longer than a HCI packet and could be fragmented over + * several HCI packets. The HCI layer only handles HCI packets so when an ACI packet is split over several HCI + * packets, this callback is triggered for each HCI fragment. It is the responsibility of the application to + * reassemble the ACI event. + * This callback is triggered in the TL_BLE_HCI_UserEvtProc() context + * + * @param pckt: The user event received from the BLE core device + * @retval None + */ + SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification( void *pckt ); + + /** + * @brief + * + * + * @param pckt: The user event received from the BLE core device + * @retval SVCCTL_UserEvtFlowStatus_t: SVCCTL_UserEvtFlowEnable when the packet has been processed + * SVCCTL_UserEvtFlowDisable otherwise (the packet is kept in the queue) + */ + SVCCTL_UserEvtFlowStatus_t SVCCTL_UserEvtRx( void *pckt ); + + /** + * @brief This API may be used by the application when the Service Controller is used to add a custom service + * + * + * @param None + * @retval None + */ + void SVCCTL_InitCustomSvc( void ); + + /** + * @brief This API may be overloaded by the application to select a limited list of ble services to initialize. + * It is called by SVCCTL_Init() + * By default, SVCCTL_SvcInit() is implemented to initialize all BLE services which are included in the + * application at build time + * If it is required to initialize only limited part of the BLE service available in the application, + * this API may be used to call the initialization API of the subset of needed services at run time. + * + * @param None + * @retval None + */ + void SVCCTL_SvcInit( void ); + +#ifdef __cplusplus +} +#endif + +#endif /*__SVCCTL_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h new file mode 100644 index 0000000..c7c5c03 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/template_stm.h @@ -0,0 +1,73 @@ + +/** + ****************************************************************************** + * @file template_stm.h + * @author MCD Application Team + * @brief Header for template_stm.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __TEMPLATE_STM_H +#define __TEMPLATE_STM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + + + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + TEMPLATE_STM_NOTIFY_ENABLED_EVT, + TEMPLATE_STM_NOTIFY_DISABLED_EVT, + TEMPLATE_STM_READ_EVT, + TEMPLATE_STM_WRITE_EVT, + TEMPLATE_STM_BOOT_REQUEST_EVT, +} TEMPLATE_STM_Opcode_evt_t; + +typedef struct +{ + uint8_t * pPayload; + uint8_t Length; +}TEMPLATE_STM_Data_t; + +typedef struct +{ + TEMPLATE_STM_Opcode_evt_t Template_Evt_Opcode; + TEMPLATE_STM_Data_t DataTransfered; + uint16_t ConnectionHandle; + uint8_t ServiceInstance; +}TEMPLATE_STM_App_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void TEMPLATE_STM_Init( void ); +void TEMPLATE_STM_App_Notification(TEMPLATE_STM_App_Notification_evt_t *pNotification); +tBleStatus TEMPLATE_STM_App_Update_Char(uint16_t UUID, uint8_t *pPayload); + + +#ifdef __cplusplus +} +#endif + +#endif /*__TEMPLATE_STM_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h new file mode 100644 index 0000000..0e0ebea --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/tps.h @@ -0,0 +1,46 @@ +/** + ****************************************************************************** + * @file tps.h + * @author MCD Application Team + * @brief Header for tps.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __TPS_H +#define __TPS_H + +#ifdef __cplusplus +extern "C" +{ +#endif + + /* Includes ------------------------------------------------------------------*/ + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void TPS_Init(void); +tBleStatus TPS_Update_Char(uint16_t UUID, uint8_t *pPayload); + +#ifdef __cplusplus +} +#endif + +#endif /*__TPS_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h new file mode 100644 index 0000000..0ffb875 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/uuid.h @@ -0,0 +1,328 @@ +/** + ****************************************************************************** + * @file uuid.h.h + * @author MCD Application Team + * @brief Header containing the UUIDs of all the services and caharcteristics + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +#ifndef _UUID_H_ +#define _UUID_H_ + +/* Descriptor UUIDs */ +#define CHAR_EXTENDED_PROPERTIES_DESCRIPTOR_UUID (0x2900) +#define CHAR_USER_DESCRIPTION_DESCRIPTOR_UUID (0x2901) +#define CLIENT_CHAR_CONFIG_DESCRIPTOR_UUID (0x2902) +#define SERVER_CHAR_CONFIG_DESCRIPTOR_UUID (0x2903) +#define CHAR_PRESENTATION_FORMAT_DESCRIPTOR_UUID (0x2904) +#define CHAR_AGGREGATE_FORMAT_DESCRIPTOR_UUID (0x2905) +#define VALID_RANGE_DESCRIPTOR_UUID (0x2906) +#define EXTERNAL_REPORT_REFERENCE_DESCRIPTOR_UUID (0x2907) +#define REPORT_REFERENCE_DESCRIPTOR_UUID (0x2908) +#define NUMBER_OF_DIGITALS_DESCRIPTOR_UUID (0x2909) +#define VALUE_TRIGGER_SETTING_DESCRIPTOR_UUID (0x290A) +#define ES_CONFIGURATION_DESCRIPTOR_UUID (0x290B) +#define ES_MEASUREMENT_DESCRIPTOR_UUID (0x290C) +#define ES_TRIGGER_SETTING_DESCRIPTOR_UUID (0x290D) +#define TIME_TRIGGER_SETTING_DESCRIPTOR_UUID (0x290E) + +/* UUIDs of Generic Attribute service */ +#define GENERIC_ATTRIBUTE_SERVICE_UUID (0x1801) +#define SERVICE_CHANGED_CHARACTERISTIC_UUID (0x2A05) + +/* UUIDs of immediate alert service */ +#define IMMEDIATE_ALERT_SERVICE_UUID (0x1802) +#define ALERT_LEVEL_CHARACTERISTIC_UUID (0x2A06) + +/* UUIDs for Link Loss service */ +#define LINK_LOSS_SERVICE_UUID (0x1803) +#define LINK_LOSS_ALERT_LEVEL_CHARACTERISTIC_UUID (0x2A06) + +/* UUIDs for TX Power service */ +#define TX_POWER_SERVICE_UUID (0x1804) +#define TX_POWER_LEVEL_CHARACTERISTIC_UUID (0x2A07) + +/* UUIDs for Time service */ +#define CURRENT_TIME_SERVICE_UUID (0x1805) +#define CURRENT_TIME_CHAR_UUID (0x2A2B) +#define LOCAL_TIME_INFORMATION_CHAR_UUID (0x2A0F) +#define REFERENCE_TIME_INFORMATION_CHAR_UUID (0x2A14) + +/* UUIDs for Reference Time Update service */ +#define REFERENCE_UPDATE_TIME_SERVICE_UUID (0x1806) +#define TIME_UPDATE_CONTROL_POINT_CHAR_UUID (0x2A16) +#define TIME_UPDATE_STATE_CHAR_UUID (0x2A17) + +/* UUIDs for Next DST Change service */ +#define NEXT_DST_CHANGE_SERVICE_UUID (0x1807) +#define TIME_WITH_DST_CHAR_UUID (0x2A11) + +/* UUIDs for glucose profile */ +#define GLUCOSE_SERVICE_UUID (0x1808) +#define GLUCOSE_MEASUREMENT_CHAR_UUID (0x2A18) +#define GLUCOSE_MEASUREMENT_CONTEXT_CHAR_UUID (0x2A34) +#define GLUCOSE_FEATURE_CHAR_UUID (0x2A51) +/* Record Access Control Point (RACP) */ +#define GLUCOSE_RACP_CHAR_UUID (0x2A52) + +/* UUIDs for health thermometer profile */ +#define HEALTH_THERMOMETER_SERVICE_UUID (0x1809) +#define TEMPERATURE_MEASUREMENT_CHAR_UUID (0x2A1C) +#define TEMPERATURE_TYPE_CHAR_UUID (0x2A1D) +#define INTERMEDIATE_TEMPERATURE_CHAR_UUID (0x2A1E) +#define MEASUREMENT_INTERVAL_CHAR_UUID (0x2A21) + +/* UUIDs for Device Information Service */ +#define DEVICE_INFORMATION_SERVICE_UUID (0x180A) +#define SYSTEM_ID_UUID (0x2A23) +#define MODEL_NUMBER_UUID (0x2A24) +#define SERIAL_NUMBER_UUID (0x2A25) +#define FIRMWARE_REVISION_UUID (0x2A26) +#define HARDWARE_REVISION_UUID (0x2A27) +#define SOFTWARE_REVISION_UUID (0x2A28) +#define MANUFACTURER_NAME_UUID (0x2A29) +#define IEEE_CERTIFICATION_UUID (0x2A2A) +#define PNP_ID_UUID (0x2A50) + +/* UUIDs for Heart Rate Service */ +#define HEART_RATE_SERVICE_UUID (0x180D) +#define CLIENT_CHARACTERISTIC_CONFIG_DESCRIPTOR_UUID (0x2902) +#define HEART_RATE_MEASURMENT_UUID (0x2A37) +#define SENSOR_LOCATION_UUID (0x2A38) +#define CONTROL_POINT_UUID (0x2A39) + +/* UUIDs for Phone Alert status profile */ +#define PHONE_ALERT_SERVICE_UUID (0x180E) +#define PHONE_ALERT_STATUS_CHARAC_UUID (0x2A3F) +#define RINGER_CNTRL_POINT_CHARAC_UUID (0x2A40) +#define RINGER_SETTING_CHARAC_UUID (0x2A41) + +/* UUIDs for battery service */ +#define BATTERY_SERVICE_UUID (0x180F) +#define BATTERY_LEVEL_CHAR_UUID (0x2A19) + +/* UUIDs for Blood Pressure profile */ +#define BLOOD_PRESSURE_SERVICE_UUID (0x1810) +#define BLOOD_PRESSURE_MEASUREMENT_CHAR_UUID (0x2A35) +#define INTERMEDIATE_CUFF_PRESSURE_CHAR_UUID (0x2A36) +#define BLOOD_PRESSURE_FEATURE_CHAR_UUID (0x2A49) + +/* UUIDs for alert notification profile */ +#define ALERT_NOTIFICATION_SERVICE_UUID (0x1811) +#define SUPPORTED_NEW_ALERT_CATEGORY_CHAR_UUID (0x2A47) +#define NEW_ALERT_CHAR_UUID (0x2A46) +#define SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR_UUID (0x2A48) +#define UNREAD_ALERT_STATUS_CHAR_UUID (0x2A45) +#define ALERT_NOTIFICATION_CONTROL_POINT_CHAR_UUID (0x2A44) + +/* UUIDs for human interface device */ +#define HUMAN_INTERFACE_DEVICE_SERVICE_UUID (0x1812) +#define PROTOCOL_MODE_CHAR_UUID (0x2A4E) +#define REPORT_CHAR_UUID (0x2A4D) +#define REPORT_MAP_CHAR_UUID (0x2A4B) +#define BOOT_KEYBOARD_INPUT_REPORT_CHAR_UUID (0x2A22) +#define BOOT_KEYBOARD_OUTPUT_REPORT_CHAR_UUID (0x2A32) +#define BOOT_MOUSE_INPUT_REPORT_CHAR_UUID (0x2A33) +#define HID_INFORMATION_CHAR_UUID (0x2A4A) +#define HID_CONTROL_POINT_CHAR_UUID (0x2A4C) + +/* UUIDs for scan parameter service */ +#define SCAN_PARAMETER_SERVICE_UUID (0x1813) +#define SCAN_INTERVAL_WINDOW_CHAR_UUID (0x2A4F) +#define SCAN_REFRESH_CHAR_UUID (0x2A31) + +/* UUIDs for running speed and cadence service */ +#define RUNNING_SPEED_CADENCE_SERVICE_UUID (0x1814) +#define RUNNING_SPEED_CADENCE_MEASUREMENT_CHAR_UUID (0x2A53) +#define RUNNING_SPEED_CADENCE_FEATURE_CHAR_UUID (0x2A54) + +/* UUIDs for automation IO service */ +#define AUTOMATION_IO_SERVICE_UUID (0x1815) +#define AUTOMATION_IO_DIGITAL_CHAR_UUID (0x2A56) +#define AUTOMATION_IO_ANALOG_CHAR_UUID (0x2A58) +#define AUTOMATION_IO_AGGREGATE_CHAR_UUID (0x2A5A) + +/* UUIDs for cycling speed and cadence service */ +#define CYCLING_SPEED_CADENCE_SERVICE_UUID (0x1816) +#define CYCLING_SPEED_CADENCE_MEASUREMENT_CHAR_UUID (0x2A5B) +#define CYCLING_SPEED_CADENCE_FEATURE_CHAR_UUID (0x2A5C) + +/* UUIDs for cycling power service */ +#define CYCLING_POWER_SERVICE_UUID (0x1818) +#define CYCLING_POWER_MEASUREMENT_CHAR_UUID (0x2A63) +#define CYCLING_POWER_FEATURE_CHAR_UUID (0x2A65) +#define CYCLING_POWER_SENSOR_LOCATION_CHAR_UUID (0x2A5D) + +/* UUIDs for location and navigation device */ +#define LOCATION_NAVIGATION_SERVICE_UUID (0x1819) +#define LN_FEATURE_UUID (0x2A6A) +#define LOCATION_SPEED_UUID (0x2A67) +#define POSITION_QUALITY_UUID (0x2A69) +#define LN_CONTROL_POINT_UUID (0x2A6B) +#define NAVIGATION_UUID (0x2A68) + +/* UUIDs for environmental sensing profile */ +#define ENVIRONMENTAL_SENSING_SERVICE_UUID (0x181A) +#define DESCRIPTOR_VALUE_CHANGED_UUID (0x2A7D) +#define APPARENT_WIND_DIRECTION_UUID (0x2A73) +#define APPARENT_WIND_SPEED_UUID (0x2A72) +#define DEW_POINT_UUID (0x2A7B) +#define ELEVATION_UUID (0x2A6C) +#define GUST_FACTOR_UUID (0x2A74) +#define HEAT_INDEX_UUID (0x2A7A) +#define HUMIDITY_UUID (0x2A6F) +#define IRRADIANCE_UUID (0x2A77) +#define POLLEN_CONCENTRATION_UUID (0x2A75) +#define RAINFALL_UUID (0x2A78) +#define PRESSURE_UUID (0x2A6D) +#define TEMPERATURE_UUID (0x2A6E) +#define TRUE_WIND_DIRECTION_UUID (0x2A71) +#define TRUE_WIND_SPEED_UUID (0x2A70) +#define UV_INDEX_UUID (0x2A76) +#define WIND_CHILL_UUID (0x2A79) +#define BAROMETRIC_PRESSURE_TREND_UUID (0x2AA3) +#define MAGNETIC_DECLINATION_UUID (0x2A2C) +#define MAGNETIC_FLUX_DENSITY_2D_UUID (0x2AA0) +#define MAGNETIC_FLUX_DENSITY_3D_UUID (0x2AA1) + +/* UUIDs for body composition service */ +#define BODY_COMPOSITION_SERVICE_UUID (0x181B) +#define BODY_COMPOSITION_MEASUREMENT_CHAR_UUID (0x2A9C) +#define BODY_COMPOSITION_FEATURE_CHARAC (0x2A9B) + +/* UUIDs for user data service */ +#define USER_DATA_SERVICE_UUID (0x181C) +#define AERO_HR_LOWER_LIMIT_CHAR_UUID (0x2A7E) +#define AEROBIC_THRESHOLD_CHAR_UUID (0x2A7F) +#define AGE_CHAR_UUID (0x2A80) +#define ANAERO_HR_LOWER_LIMIT_CHAR_UUID (0x2A81) +#define ANAERO_HR_UPPER_LIMIT_CHAR_UUID (0x2A82) +#define ANAEROBIC_THRESHOLD_CHAR_UUID (0x2A83) +#define AERO_HR_UPPER_LIMIT_CHAR_UUID (0x2A84) +#define BIRTH_DATE_CHAR_UUID (0x2A85) +#define DATE_THRESHOLD_ASSESSMENT_CHAR_UUID (0x2A86) +#define EMAIL_ADDRESS_CHAR_UUID (0x2A87) +#define FAT_BURN_HR_LOWER_LIMIT_CHAR_UUID (0x2A88) +#define FAT_BURN_HR_UPPER_LIMIT_CHAR_UUID (0x2A89) +#define FIRST_NAME_CHAR_UUID (0x2A8A) +#define FIVE_ZONE_HR_LIMIT_CHAR_UUID (0x2A8B) +#define GENDER_CHAR_UUID (0x2A8C) +#define HEART_RATE_MAX_CHAR_UUID (0x2A8D) +#define HEIGHT_CHAR_UUID (0x2A8E) +#define HIP_CIRC_CHAR_UUID (0x2A8F) +#define LAST_NAME_CHAR_UUID (0x2A90) +#define MAX_RECO_HEART_RATE_CHAR_UUID (0x2A91) +#define RESTING_HEART_RATE_CHAR_UUID (0x2A92) +#define SPORT_TYPE_CHAR_UUID (0x2A93) +#define THREE_ZONE_HR_LIMIT_CHAR_UUID (0x2A94) +#define TWO_ZONE_HR_LIMIT_CHAR_UUID (0x2A95) +#define VO2_MAX_CHAR_UUID (0x2A96) +#define WAIST_CIRC_CHAR_UUID (0x2A97) +#define WEIGHT_CHAR_UUID (0x2A98) +#define DATABASE_CHANGE_INCREMENT_CHAR_UUID (0x2A99) +#define USER_INDEX_CHAR_UUID (0x2A9A) +#define USER_CONTROL_POINT_CHAR_UUID (0x2A9F) +#define LANGUAGE_CHAR_UUID (0x2AA2) + +/* UUIDs for weight scale profile */ +#define WEIGHT_SCALE_SERVICE_UUID (0x181D) +#define WEIGHT_SCALE_MEASUREMENT_CHAR_UUID (0x2A9D) +#define WEIGHT_SCALE_FEATURE_CHAR_UUID (0x2A9E) + +/* UUIDs for weight scale profile */ +#define BOND_MANAGEMENT_SERVICE_UUID (0x181E) +#define BM_CONTROL_POINT_CHAR_UUID (0x2AA4) +#define BM_FEATURE_CHAR_UUID (0x2AA5) + +/* UUIDs for Internet Support Service */ +#define INTERNET_SUPPORT_SERVICE_UUID (0x1820) + +/* UUIDs for Indoor Positioning Service */ +#define INDOOR_POSITIONING_SERVICE_UUID (0x1821) +#define IP_CONFIGURATION_CHAR_UUID (0x2AAD) +#define IP_LATITUDE_CHAR_UUID (0x2AAE) +#define IP_LONGITUDE_CHAR_UUID (0x2AAF) + +/* UUIDs for HTTP proxy Service */ +#define HTTP_PROXY_SERVICE_UUID (0x1823) +#define HTTP_URI_CHAR_UUID (0x2AB6) +#define HTTP_HEADERS_CHAR_UUID (0x2AB7) +#define HTTP_STATUS_CODE_CHAR_UUID (0x2AB8) +#define HTTP_ENTITY_BODY_CHAR_UUID (0x2AB9) +#define HTTP_CONTROL_POINT_CHAR_UUID (0x2ABA) +#define HTTP_SECURITY_CHAR_UUID (0x2ABB) + +/* UUIDs for Object Transfer Service */ +#define OBJECT_TRANSFER_SERVICE_UUID (0x1825) +#define OTS_FEATURE_CHAR_UUID (0x2ABD) +#define OBJECT_NAME_CHAR_UUID (0x2ABE) +#define OBJECT_TYPE_CHAR_UUID (0x2ABF) +#define OBJECT_SIZE_CHAR_UUID (0x2AC0) +#define OBJECT_PROPERTIES_CHAR_UUID (0x2AC4) +#define OBJECT_ACTION_CONTROL_POINT_CHAR_UUID (0x2AC5) +#define OBJECT_LIST_CONTROL_POINT_CHAR_UUID (0x2AC6) + +/* UUIDs for Zigbee Direct Service */ +#define ZIGBEE_DIRECT_COMM_SERVICE_UUID (0xFFF7) + +/* Custom Services*/ +/* UUIDs for data transfer service */ +#define DT_SERVICE_UUID (0xFE80) +#define DT_TX_CHAR_UUID (0xFE81) +#define DT_RX_CHAR_UUID (0xFE82) +#define DT_THROUGHPUT_CHAR_UUID (0xFE83) + +/* UUIDs for custom battery service */ +#define CUSTOM_BATTERY_SERVICE_UUID (0xF2F0) +#define CUSTOM_BATTERY_LEVEL_CHAR_UUID (0xF2F1) + +/* Custom Services*/ +/* UUIDs for data transfer service */ +#define LED_BUTTON_SERVICE_UUID (0x1A30) +#define LED_CHAR_UUID (0x2B50) +#define BUTTON_CHAR_UUID (0x2B51) +/*UUIDs for End Device Management Service*/ +#define END_DEVICE_MGT_SERVICE_UUID (0x1A40) +#define END_DEVICE_STATUS_CHAR_UUID (0x2B60) + +#define P2P_SERVICE_UUID (0xFE40) +#define P2P_WRITE_CHAR_UUID (0xFE41) +#define P2P_NOTIFY_CHAR_UUID (0xFE42) + +#define HOME_SERVICE_UUID (0xFE90) +#define HOME_WRITE_CHAR_UUID (0xFE91) +#define HOME_NOTIFY_CHAR_UUID (0xFE92) + +#define CAM_SERVICE_UUID (0xFEA0) +#define CAM_WRITE_CHAR_UUID (0xFEA1) +#define CAM_NOTIFY_CHAR_UUID (0xFEA2) + +/* UUIDs for Cable Replacement Service */ +#define CRS_SERVICE_UUID (0xFE60) +#define CRS_TX_CHAR_UUID (0xFE61) +#define CRS_RX_CHAR_UUID (0xFE62) + +/* UUIDs for Apple Notification Center Service */ +#define ANCS_SERVICE_UUID (0xF431) +#define ANCS_NOTIFICATION_SOURCE_CHAR_UUID (0x120D) +#define ANCS_CONTROL_POINT_CHAR_UUID (0xD8F3) +#define ANCS_DATA_SOURCE_CHAR_UUID (0xC6E9) + +/* UUIDs for Apple Media Service start from iOS 8*/ +#define AMS_SERVICE_UUID (0x502B) +#define AMS_REMOTE_COMMAND_CHAR_UUID (0x81D8) +#define AMS_ENTITY_UPDATE_CHAR_UUID (0xABCE) +#define AMS_ENTITY_ATTRIBUTE_CHAR_UUID (0xF38C) +#endif /* _UUID_H_ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h new file mode 100644 index 0000000..5d9aa5a --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Inc/zdd_stm.h @@ -0,0 +1,100 @@ + +/** + ****************************************************************************** + * @file zdd_stm.h + * @author MCD Application Team + * @brief Header for zdd_stm.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __ZDD_STM_H +#define __ZDD_STM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + + + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + /* ZDD P2P Events */ + ZDD_P2P_STM__NOTIFY_ENABLED_EVT, + ZDD_P2P_STM_NOTIFY_DISABLED_EVT, + ZDD_P2P_STM_READ_EVT, + ZDD_P2P_STM_WRITE_EVT, + ZDD_P2P_STM_BOOT_REQUEST_EVT, + /* ZDD Security Events */ + ZDD_SEC_P_256_INDICATE_ENABLED_EVT, + ZDD_SEC_P_256_INDICATE_DISABLED_EVT, + ZDD_SEC_P_256_WRITE_EVT, + ZDD_SEC_CURVE25519_INDICATE_ENABLED_EVT, + ZDD_SEC_CURVE25519_INDICATE_DISABLED_EVT, + ZDD_SEC_CURVE25519_WRITE_EVT, + /* ZDD Commissioning Events */ + ZDD_COMM_FORM_NWK_WRITE_EVT, + ZDD_COMM_JOIN_NWK_WRITE_EVT, + ZDD_COMM_PERMIT_JOIN_WRITE_EVT, + ZDD_COMM_LEAVE_NWK_WRITE_EVT, + ZDD_COMM_STATUS_NOTIFY_ENABLED_EVT, + ZDD_COMM_STATUS_NOTIFY_DISABLED_EVT, + ZDD_COMM_STATUS_READ_EVT, + /* ZDD Tunnelling Events */ + ZDD_TUNN_ZDTS_NPDU_INDICATE_ENABLED_EVT, + ZDD_TUNN_ZDTS_NPDU_INDICATE_DISABLED_EVT, + ZDD_TUNN_ZDTS_NPDU_WRITE_EVT + +} ZDD_STM_Opcode_evt_t; + +typedef struct +{ + uint8_t * pPayload; + uint8_t Length; +}ZDD_STM_Data_t; + +typedef struct +{ + ZDD_STM_Opcode_evt_t ZDD_Evt_Opcode; + ZDD_STM_Data_t DataTransfered; + uint16_t ConnectionHandle; + uint8_t ServiceInstance; +}ZDD_STM_App_Notification_evt_t; + + +/* Exported constants --------------------------------------------------------*/ +#define ZDD_P2P_NOTIFY_CHAR_UUID P2P_NOTIFY_CHAR_UUID /* Temp */ +#define ZDD_SEC_P_256_CHAR_UUID (0xAF42) /* P-256 */ +#define ZDD_SEC_CURVE25519_CHAR_UUID (0xAF43) /* Curve25519 */ +#define ZDD_COMM_STATUS_CHAR_UUID (0x377D) /* Commissioning Status */ +#define ZDD_TUNN_ZDTS_NPDU_CHAR_UUID (0x78FD) /* ZDTS-NPDU */ + +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +void ZDD_STM_Init( void ); +void ZDD_STM_App_Notification(ZDD_STM_App_Notification_evt_t *pNotification); +tBleStatus ZDD_STM_App_Update_Char(uint16_t UUID, uint8_t payloadLen, uint8_t *pPayload); + + +#ifdef __cplusplus +} +#endif + +#endif /*__ZDD_STM_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h new file mode 100644 index 0000000..2cf1552 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/common_blesvc.h @@ -0,0 +1,54 @@ + +/** + ****************************************************************************** + * @file common_blesvc.h + * @author MCD Application Team + * @brief Header for ble modules + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __COMMON_BLESVC_H +#define __COMMON_BLESVC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "ble_common.h" +#include "ble.h" +#include "dbg_trace.h" + + + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + COMSVC_Notification = ( 1 << 0 ), + COMSVC_Indication = ( 1 << 1 ), +} COMSVC_ClientCharConfMask_t; + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ + + +#ifdef __cplusplus +} +#endif + +#endif /*__COMMON_BLESVC_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c new file mode 100644 index 0000000..15ec975 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/p2p_stm.c @@ -0,0 +1,295 @@ +/** + ****************************************************************************** + * @file p2p_stm.c + * @author MCD Application Team + * @brief Peer to Peer Service (Custom STM) + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Includes ------------------------------------------------------------------*/ +#include "common_blesvc.h" + +/* Private typedef -----------------------------------------------------------*/ +typedef struct{ + uint16_t PeerToPeerSvcHdle; /**< Service handle */ + uint16_t P2PWriteClientToServerCharHdle; /**< Characteristic handle */ + uint16_t P2PNotifyServerToClientCharHdle; /**< Characteristic handle */ +#if(BLE_CFG_OTA_REBOOT_CHAR != 0) + uint16_t RebootReqCharHdle; /**< Characteristic handle */ +#endif +}PeerToPeerContext_t; + +/* Private defines -----------------------------------------------------------*/ +#define UUID_128_SUPPORTED 1 + +#if (UUID_128_SUPPORTED == 1) +#define BM_UUID_LENGTH UUID_TYPE_128 +#else +#define BM_UUID_LENGTH UUID_TYPE_16 +#endif + +#define BM_REQ_CHAR_SIZE (3) + + +/* Private macros ------------------------------------------------------------*/ + +/* Private variables ---------------------------------------------------------*/ +/** + * Reboot Characteristic UUID + * 0000fe11-8e22-4541-9d4c-21edae82ed19 + */ +#if(BLE_CFG_OTA_REBOOT_CHAR != 0) +#if (UUID_128_SUPPORTED == 1) +static const uint8_t BM_REQ_CHAR_UUID[16] = {0x19, 0xed, 0x82, 0xae, + 0xed, 0x21, 0x4c, 0x9d, + 0x41, 0x45, 0x22, 0x8e, + 0x11, 0xFE, 0x00, 0x00}; +#else +static const uint8_t BM_REQ_CHAR_UUID[2] = {0x11, 0xFE}; +#endif +#endif + +/** + * START of Section BLE_DRIVER_CONTEXT + */ +PLACE_IN_SECTION("BLE_DRIVER_CONTEXT") static PeerToPeerContext_t aPeerToPeerContext; + +/** + * END of Section BLE_DRIVER_CONTEXT + */ +/* Private function prototypes -----------------------------------------------*/ +static SVCCTL_EvtAckStatus_t PeerToPeer_Event_Handler(void *Event); + + +/* Functions Definition ------------------------------------------------------*/ +/* Private functions ----------------------------------------------------------*/ + +#define COPY_UUID_128(uuid_struct, uuid_15, uuid_14, uuid_13, uuid_12, uuid_11, uuid_10, uuid_9, uuid_8, uuid_7, uuid_6, uuid_5, uuid_4, uuid_3, uuid_2, uuid_1, uuid_0) \ +do {\ + uuid_struct[0] = uuid_0; uuid_struct[1] = uuid_1; uuid_struct[2] = uuid_2; uuid_struct[3] = uuid_3; \ + uuid_struct[4] = uuid_4; uuid_struct[5] = uuid_5; uuid_struct[6] = uuid_6; uuid_struct[7] = uuid_7; \ + uuid_struct[8] = uuid_8; uuid_struct[9] = uuid_9; uuid_struct[10] = uuid_10; uuid_struct[11] = uuid_11; \ + uuid_struct[12] = uuid_12; uuid_struct[13] = uuid_13; uuid_struct[14] = uuid_14; uuid_struct[15] = uuid_15; \ +}while(0) + +/* Hardware Characteristics Service */ +/* + The following 128bits UUIDs have been generated from the random UUID + generator: + D973F2E0-B19E-11E2-9E96-0800200C9A66: Service 128bits UUID + D973F2E1-B19E-11E2-9E96-0800200C9A66: Characteristic_1 128bits UUID + D973F2E2-B19E-11E2-9E96-0800200C9A66: Characteristic_2 128bits UUID + */ +#define COPY_P2P_SERVICE_UUID(uuid_struct) COPY_UUID_128(uuid_struct,0x00,0x00,0xfe,0x40,0xcc,0x7a,0x48,0x2a,0x98,0x4a,0x7f,0x2e,0xd5,0xb3,0xe5,0x8f) +#define COPY_P2P_WRITE_CHAR_UUID(uuid_struct) COPY_UUID_128(uuid_struct,0x00,0x00,0xfe,0x41,0x8e,0x22,0x45,0x41,0x9d,0x4c,0x21,0xed,0xae,0x82,0xed,0x19) +#define COPY_P2P_NOTIFY_UUID(uuid_struct) COPY_UUID_128(uuid_struct,0x00,0x00,0xfe,0x42,0x8e,0x22,0x45,0x41,0x9d,0x4c,0x21,0xed,0xae,0x82,0xed,0x19) + + + +/** + * @brief Event handler + * @param Event: Address of the buffer holding the Event + * @retval Ack: Return whether the Event has been managed or not + */ +static SVCCTL_EvtAckStatus_t PeerToPeer_Event_Handler(void *Event) +{ + SVCCTL_EvtAckStatus_t return_value; + hci_event_pckt *event_pckt; + evt_blecore_aci *blecore_evt; + aci_gatt_attribute_modified_event_rp0 * attribute_modified; + P2PS_STM_App_Notification_evt_t Notification; + + return_value = SVCCTL_EvtNotAck; + event_pckt = (hci_event_pckt *)(((hci_uart_pckt*)Event)->data); + + switch(event_pckt->evt) + { + case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE: + { + blecore_evt = (evt_blecore_aci*)event_pckt->data; + switch(blecore_evt->ecode) + { + case ACI_GATT_ATTRIBUTE_MODIFIED_VSEVT_CODE: + { + attribute_modified = (aci_gatt_attribute_modified_event_rp0*)blecore_evt->data; + if(attribute_modified->Attr_Handle == (aPeerToPeerContext.P2PNotifyServerToClientCharHdle + 2)) + { + /** + * Descriptor handle + */ + return_value = SVCCTL_EvtAckFlowEnable; + /** + * Notify to application + */ + if(attribute_modified->Attr_Data[0] & COMSVC_Notification) + { + Notification.P2P_Evt_Opcode = P2PS_STM__NOTIFY_ENABLED_EVT; + P2PS_STM_App_Notification(&Notification); + } + else + { + Notification.P2P_Evt_Opcode = P2PS_STM_NOTIFY_DISABLED_EVT; + P2PS_STM_App_Notification(&Notification); + } + } + + else if(attribute_modified->Attr_Handle == (aPeerToPeerContext.P2PWriteClientToServerCharHdle + 1)) + { + BLE_DBG_P2P_STM_MSG("-- GATT : LED CONFIGURATION RECEIVED\n"); + Notification.P2P_Evt_Opcode = P2PS_STM_WRITE_EVT; + Notification.DataTransfered.Length=attribute_modified->Attr_Data_Length; + Notification.DataTransfered.pPayload=attribute_modified->Attr_Data; + P2PS_STM_App_Notification(&Notification); + } +#if(BLE_CFG_OTA_REBOOT_CHAR != 0) + else if(attribute_modified->Attr_Handle == (aPeerToPeerContext.RebootReqCharHdle + 1)) + { + BLE_DBG_P2P_STM_MSG("-- GATT : REBOOT REQUEST RECEIVED\n"); + Notification.P2P_Evt_Opcode = P2PS_STM_BOOT_REQUEST_EVT; + Notification.DataTransfered.Length=attribute_modified->Attr_Data_Length; + Notification.DataTransfered.pPayload=attribute_modified->Attr_Data; + P2PS_STM_App_Notification(&Notification); + } +#endif + } + break; + + default: + break; + } + } + break; /* HCI_HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE_SPECIFIC */ + + default: + break; + } + + return(return_value); +}/* end SVCCTL_EvtAckStatus_t */ + + +/* Public functions ----------------------------------------------------------*/ + +/** + * @brief Service initialization + * @param None + * @retval None + */ +void P2PS_STM_Init(void) +{ + + Char_UUID_t uuid16; + + /** + * Register the event handler to the BLE controller + */ + SVCCTL_RegisterSvcHandler(PeerToPeer_Event_Handler); + + /** + * Peer To Peer Service + * + * Max_Attribute_Records = 2*no_of_char + 1 + * service_max_attribute_record = 1 for Peer To Peer service + + * 2 for P2P Write characteristic + + * 2 for P2P Notify characteristic + + * 1 for client char configuration descriptor + + * + */ + COPY_P2P_SERVICE_UUID(uuid16.Char_UUID_128); + aci_gatt_add_service(UUID_TYPE_128, + (Service_UUID_t *) &uuid16, + PRIMARY_SERVICE, +#if (BLE_CFG_OTA_REBOOT_CHAR != 0) + 2+ +#endif + 6, + &(aPeerToPeerContext.PeerToPeerSvcHdle)); + + /** + * Add LED Characteristic + */ + COPY_P2P_WRITE_CHAR_UUID(uuid16.Char_UUID_128); + aci_gatt_add_char(aPeerToPeerContext.PeerToPeerSvcHdle, + UUID_TYPE_128, &uuid16, + 2, + CHAR_PROP_WRITE_WITHOUT_RESP|CHAR_PROP_READ, + ATTR_PERMISSION_NONE, + GATT_NOTIFY_ATTRIBUTE_WRITE, /* gattEvtMask */ + 10, /* encryKeySize */ + 1, /* isVariable */ + &(aPeerToPeerContext.P2PWriteClientToServerCharHdle)); + + /** + * Add Button Characteristic + */ + COPY_P2P_NOTIFY_UUID(uuid16.Char_UUID_128); + aci_gatt_add_char(aPeerToPeerContext.PeerToPeerSvcHdle, + UUID_TYPE_128, &uuid16, + 2, + CHAR_PROP_NOTIFY, + ATTR_PERMISSION_NONE, + GATT_NOTIFY_ATTRIBUTE_WRITE, /* gattEvtMask */ + 10, /* encryKeySize */ + 1, /* isVariable: 1 */ + &(aPeerToPeerContext.P2PNotifyServerToClientCharHdle)); + +#if(BLE_CFG_OTA_REBOOT_CHAR != 0) + /** + * Add Boot Request Characteristic + */ + aci_gatt_add_char(aPeerToPeerContext.PeerToPeerSvcHdle, + BM_UUID_LENGTH, + (Char_UUID_t *)BM_REQ_CHAR_UUID, + BM_REQ_CHAR_SIZE, + CHAR_PROP_WRITE_WITHOUT_RESP, + ATTR_PERMISSION_NONE, + GATT_NOTIFY_ATTRIBUTE_WRITE, + 10, + 0, + &(aPeerToPeerContext.RebootReqCharHdle)); +#endif + + + return; +} + +/** + * @brief Characteristic update + * @param UUID: UUID of the characteristic + * @param Service_Instance: Instance of the service to which the characteristic belongs + * + */ +tBleStatus P2PS_STM_App_Update_Char(uint16_t UUID, uint8_t *pPayload) +{ + tBleStatus result = BLE_STATUS_INVALID_PARAMS; + switch(UUID) + { + case P2P_NOTIFY_CHAR_UUID: + + result = aci_gatt_update_char_value(aPeerToPeerContext.PeerToPeerSvcHdle, + aPeerToPeerContext.P2PNotifyServerToClientCharHdle, + 0, /* charValOffset */ + 2, /* charValueLen */ + (uint8_t *) pPayload); + + break; + + default: + break; + } + + return result; +}/* end P2PS_STM_Init() */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c new file mode 100644 index 0000000..bde8a37 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/ble/svc/Src/svc_ctl.c @@ -0,0 +1,330 @@ +/** + ****************************************************************************** + * @file svc_ctl.c + * @author MCD Application Team + * @brief BLE Controller + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Includes ------------------------------------------------------------------*/ +#include "common_blesvc.h" +#include "cmsis_compiler.h" + +/* Private typedef -----------------------------------------------------------*/ +typedef struct +{ +#if (BLE_CFG_SVC_MAX_NBR_CB > 0) +SVC_CTL_p_EvtHandler_t SVCCTL__SvcHandlerTab[BLE_CFG_SVC_MAX_NBR_CB]; +#endif +uint8_t NbreOfRegisteredHandler; +} SVCCTL_EvtHandler_t; + +typedef struct +{ +#if (BLE_CFG_CLT_MAX_NBR_CB > 0) +SVC_CTL_p_EvtHandler_t SVCCTL_CltHandlerTable[BLE_CFG_CLT_MAX_NBR_CB]; +#endif +uint8_t NbreOfRegisteredHandler; +} SVCCTL_CltHandler_t; + +/* Private defines -----------------------------------------------------------*/ +#define SVCCTL_EGID_EVT_MASK 0xFF00 +#define SVCCTL_GATT_EVT_TYPE 0x0C00 +#define SVCCTL_GAP_DEVICE_NAME_LENGTH 7 + +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/** + * START of Section BLE_DRIVER_CONTEXT + */ + +PLACE_IN_SECTION("BLE_DRIVER_CONTEXT") SVCCTL_EvtHandler_t SVCCTL_EvtHandler; +PLACE_IN_SECTION("BLE_DRIVER_CONTEXT") SVCCTL_CltHandler_t SVCCTL_CltHandler; + +/** + * END of Section BLE_DRIVER_CONTEXT + */ + +/* Private functions ----------------------------------------------------------*/ +/* Weak functions ----------------------------------------------------------*/ +void BVOPUS_STM_Init(void); + +__WEAK void BAS_Init( void ) +{ + return; +} + +__WEAK void BLS_Init( void ) +{ + return; +} +__WEAK void CRS_STM_Init( void ) +{ + return; +} +__WEAK void DIS_Init( void ) +{ + return; +} +__WEAK void EDS_STM_Init( void ) +{ + return; +} +__WEAK void HIDS_Init( void ) +{ + return; +} +__WEAK void HRS_Init( void ) +{ + return; +} +__WEAK void HTS_Init( void ) +{ + return; +} +__WEAK void IAS_Init( void ) +{ + return; +} +__WEAK void LLS_Init( void ) +{ + return; +} +__WEAK void TPS_Init( void ) +{ + return; +} +__WEAK void MOTENV_STM_Init( void ) +{ + return; +} +__WEAK void P2PS_STM_Init( void ) +{ + return; +} +__WEAK void ZDD_STM_Init( void ) +{ + return; +} +__WEAK void OTAS_STM_Init( void ) +{ + return; +} +__WEAK void MESH_Init( void ) +{ + return; +} +__WEAK void BVOPUS_STM_Init( void ) +{ + return; +} +__WEAK void SVCCTL_InitCustomSvc( void ) +{ + return; +} + +/* Functions Definition ------------------------------------------------------*/ + +void SVCCTL_Init( void ) +{ + + /** + * Initialize the number of registered Handler + */ + SVCCTL_EvtHandler.NbreOfRegisteredHandler = 0; + SVCCTL_CltHandler.NbreOfRegisteredHandler = 0; + + /** + * Add and Initialize requested services + */ + SVCCTL_SvcInit(); + + return; +} + +__WEAK void SVCCTL_SvcInit(void) +{ + BAS_Init(); + + BLS_Init(); + + CRS_STM_Init(); + + DIS_Init(); + + EDS_STM_Init(); + + HIDS_Init(); + + HRS_Init(); + + HTS_Init(); + + IAS_Init(); + + LLS_Init(); + + TPS_Init(); + + MOTENV_STM_Init(); + + P2PS_STM_Init(); + + ZDD_STM_Init(); + + OTAS_STM_Init(); + + BVOPUS_STM_Init(); + + MESH_Init(); + + SVCCTL_InitCustomSvc(); + + return; +} + +/** + * @brief BLE Controller initialization + * @param None + * @retval None + */ +void SVCCTL_RegisterSvcHandler( SVC_CTL_p_EvtHandler_t pfBLE_SVC_Service_Event_Handler ) +{ +#if (BLE_CFG_SVC_MAX_NBR_CB > 0) + SVCCTL_EvtHandler.SVCCTL__SvcHandlerTab[SVCCTL_EvtHandler.NbreOfRegisteredHandler] = pfBLE_SVC_Service_Event_Handler; + SVCCTL_EvtHandler.NbreOfRegisteredHandler++; +#else + (void)(pfBLE_SVC_Service_Event_Handler); +#endif + + return; +} + +/** + * @brief BLE Controller initialization + * @param None + * @retval None + */ +void SVCCTL_RegisterCltHandler( SVC_CTL_p_EvtHandler_t pfBLE_SVC_Client_Event_Handler ) +{ +#if (BLE_CFG_CLT_MAX_NBR_CB > 0) + SVCCTL_CltHandler.SVCCTL_CltHandlerTable[SVCCTL_CltHandler.NbreOfRegisteredHandler] = pfBLE_SVC_Client_Event_Handler; + SVCCTL_CltHandler.NbreOfRegisteredHandler++; +#else + (void)(pfBLE_SVC_Client_Event_Handler); +#endif + + return; +} + +__WEAK SVCCTL_UserEvtFlowStatus_t SVCCTL_UserEvtRx( void *pckt ) +{ + hci_event_pckt *event_pckt; + evt_blecore_aci *blecore_evt; + SVCCTL_EvtAckStatus_t event_notification_status; + SVCCTL_UserEvtFlowStatus_t return_status; + uint8_t index; + + event_pckt = (hci_event_pckt*) ((hci_uart_pckt *) pckt)->data; + event_notification_status = SVCCTL_EvtNotAck; + + switch (event_pckt->evt) + { + case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE: + { + blecore_evt = (evt_blecore_aci*) event_pckt->data; + + switch ((blecore_evt->ecode) & SVCCTL_EGID_EVT_MASK) + { + case SVCCTL_GATT_EVT_TYPE: +#if (BLE_CFG_SVC_MAX_NBR_CB > 0) + /* For Service event handler */ + for (index = 0; index < SVCCTL_EvtHandler.NbreOfRegisteredHandler; index++) + { + event_notification_status = SVCCTL_EvtHandler.SVCCTL__SvcHandlerTab[index](pckt); + /** + * When a GATT event has been acknowledged by a Service, there is no need to call the other registered handlers + * a GATT event is relevant for only one Service + */ + if (event_notification_status != SVCCTL_EvtNotAck) + { + /** + * The event has been managed. The Event processing should be stopped + */ + break; + } + } +#endif +#if (BLE_CFG_CLT_MAX_NBR_CB > 0) + /* For Client event handler */ + event_notification_status = SVCCTL_EvtNotAck; + for(index = 0; index evtserial.evt.payload))->payload[1]); + } + + return (((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_FwUpgrade( uint32_t fw_src_add, uint32_t fw_dest_add ) +{ + /** + * TL_BLEEVT_CC_BUFFER_SIZE is 16 bytes so it is large enough to hold the 8 bytes of command parameters + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + uint32_t *p_cmd; + uint8_t cmd_length; + + p_cmd = (uint32_t*)local_buffer; + cmd_length = 0; + + if(fw_src_add != 0) + { + *p_cmd = fw_src_add; + cmd_length += 4; + } + + if(fw_dest_add != 0) + { + *(p_cmd+1) = fw_dest_add; + cmd_length += 4; + } + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_FUS_FW_UPGRADE, + cmd_length, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_FwDelete( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_FUS_FW_DELETE, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_UpdateAuthKey( SHCI_C2_FUS_UpdateAuthKey_Cmd_Param_t *pParam ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_FUS_UPDATE_AUTH_KEY, + sizeof( SHCI_C2_FUS_UpdateAuthKey_Cmd_Param_t ), + (uint8_t*)pParam, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_LockAuthKey( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_FUS_LOCK_AUTH_KEY, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_StoreUsrKey( SHCI_C2_FUS_StoreUsrKey_Cmd_Param_t *pParam, uint8_t *p_key_index ) +{ + /** + * Buffer is large enough to hold command complete with payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE + 1]; + TL_EvtPacket_t * p_rsp; + uint8_t local_payload_len; + + if(pParam->KeyType == KEYTYPE_ENCRYPTED) + { + /** + * When the key is encrypted, the 12 bytes IV Key is included in the payload as well + * The IV key is always 12 bytes + */ + local_payload_len = pParam->KeySize + 2 + 12; + } + else + { + local_payload_len = pParam->KeySize + 2; + } + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_FUS_STORE_USR_KEY, + local_payload_len , + (uint8_t*)pParam, + p_rsp ); + + *p_key_index = (((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[1]); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_LoadUsrKey( uint8_t key_index ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = key_index; + + shci_send( SHCI_OPCODE_C2_FUS_LOAD_USR_KEY, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_StartWs( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_FUS_START_WS, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_LockUsrKey( uint8_t key_index ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = key_index; + + shci_send( SHCI_OPCODE_C2_FUS_LOCK_USR_KEY, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_UnloadUsrKey( uint8_t key_index ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = key_index; + + shci_send( SHCI_OPCODE_C2_FUS_UNLOAD_USR_KEY, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FUS_ActivateAntiRollback( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_FUS_ACTIVATE_ANTIROLLBACK, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_BLE_Init( SHCI_C2_Ble_Init_Cmd_Packet_t *pCmdPacket ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_BLE_INIT, + sizeof( SHCI_C2_Ble_Init_Cmd_Param_t ), + (uint8_t*)&pCmdPacket->Param, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_THREAD_Init( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_THREAD_INIT, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_LLDTESTS_Init( uint8_t param_size, uint8_t * p_param ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_LLD_TESTS_INIT, + param_size, + p_param, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_BLE_LLD_Init( uint8_t param_size, uint8_t * p_param ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_BLE_LLD_INIT, + param_size, + p_param, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_ZIGBEE_Init( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_ZIGBEE_INIT, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_DEBUG_Init( SHCI_C2_DEBUG_Init_Cmd_Packet_t *pCmdPacket ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_DEBUG_INIT, + sizeof( SHCI_C2_DEBUG_init_Cmd_Param_t ), + (uint8_t*)&pCmdPacket->Param, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FLASH_EraseActivity( SHCI_EraseActivity_t erase_activity ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = erase_activity; + + shci_send( SHCI_OPCODE_C2_FLASH_ERASE_ACTIVITY, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_CONCURRENT_SetMode( SHCI_C2_CONCURRENT_Mode_Param_t Mode ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = Mode; + + shci_send( SHCI_OPCODE_C2_CONCURRENT_SET_MODE, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_CONCURRENT_GetNextBleEvtTime( SHCI_C2_CONCURRENT_GetNextBleEvtTime_Param_t *pParam ) +{ + /** + * Buffer is large enough to hold command complete with payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE+4]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_CONCURRENT_GET_NEXT_BLE_EVT_TIME, + 0, + 0, + p_rsp ); + + memcpy((void*)&(pParam->relative_time), (void*)&((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[1], sizeof(pParam->relative_time)); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_CONCURRENT_EnableNext_802154_EvtNotification( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_CONCURRENT_ENABLE_NEXT_802154_EVT_NOTIFICATION, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FLASH_StoreData( SHCI_C2_FLASH_Ip_t Ip ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = Ip; + + shci_send( SHCI_OPCODE_C2_FLASH_STORE_DATA, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_FLASH_EraseData( SHCI_C2_FLASH_Ip_t Ip ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = Ip; + + shci_send( SHCI_OPCODE_C2_FLASH_ERASE_DATA, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_RADIO_AllowLowPower( SHCI_C2_FLASH_Ip_t Ip,uint8_t FlagRadioLowPowerOn) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = Ip; + local_buffer[1] = FlagRadioLowPowerOn; + + shci_send( SHCI_OPCODE_C2_RADIO_ALLOW_LOW_POWER, + 2, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_MAC_802_15_4_Init( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_MAC_802_15_4_INIT, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_Reinit( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_REINIT, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_ExtpaConfig(uint32_t gpio_port, uint16_t gpio_pin_number, uint8_t gpio_polarity, uint8_t gpio_status) +{ + /** + * TL_BLEEVT_CC_BUFFER_SIZE is 16 bytes so it is large enough to hold the 8 bytes of command parameters + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + ((SHCI_C2_EXTPA_CONFIG_Cmd_Param_t*)local_buffer)->gpio_port = gpio_port; + ((SHCI_C2_EXTPA_CONFIG_Cmd_Param_t*)local_buffer)->gpio_pin_number = gpio_pin_number; + ((SHCI_C2_EXTPA_CONFIG_Cmd_Param_t*)local_buffer)->gpio_polarity = gpio_polarity; + ((SHCI_C2_EXTPA_CONFIG_Cmd_Param_t*)local_buffer)->gpio_status = gpio_status; + + shci_send( SHCI_OPCODE_C2_EXTPA_CONFIG, + 8, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_SetFlashActivityControl(SHCI_C2_SET_FLASH_ACTIVITY_CONTROL_Source_t Source) +{ + /** + * TL_BLEEVT_CC_BUFFER_SIZE is 16 bytes so it is large enough to hold the 1 byte of command parameter + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = (uint8_t)Source; + + shci_send( SHCI_OPCODE_C2_SET_FLASH_ACTIVITY_CONTROL, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_Config(SHCI_C2_CONFIG_Cmd_Param_t *pCmdPacket) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_CONFIG, + sizeof(SHCI_C2_CONFIG_Cmd_Param_t), + (uint8_t*)pCmdPacket, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_802_15_4_DeInit( void ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + shci_send( SHCI_OPCODE_C2_802_15_4_DEINIT, + 0, + 0, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +SHCI_CmdStatus_t SHCI_C2_SetSystemClock( SHCI_C2_SET_SYSTEM_CLOCK_Cmd_Param_t clockSel ) +{ + /** + * Buffer is large enough to hold command complete without payload + */ + uint8_t local_buffer[TL_BLEEVT_CC_BUFFER_SIZE]; + TL_EvtPacket_t * p_rsp; + + p_rsp = (TL_EvtPacket_t *)local_buffer; + + local_buffer[0] = (uint8_t)clockSel; + + shci_send( SHCI_OPCODE_C2_SET_SYSTEM_CLOCK, + 1, + local_buffer, + p_rsp ); + + return (SHCI_CmdStatus_t)(((TL_CcEvt_t*)(p_rsp->evtserial.evt.payload))->payload[0]); +} + +/** + * Local System COMMAND + * These commands are NOT sent to the CPU2 + */ + +SHCI_CmdStatus_t SHCI_GetWirelessFwInfo( WirelessFwInfo_t* pWirelessInfo ) +{ + uint32_t ipccdba = 0; + MB_RefTable_t * p_RefTable = NULL; + uint32_t wireless_firmware_version = 0; + uint32_t wireless_firmware_memorySize = 0; + uint32_t wireless_firmware_infoStack = 0; + MB_FUS_DeviceInfoTable_t * p_fus_device_info_table = NULL; + uint32_t fus_version = 0; + uint32_t fus_memorySize = 0; + + ipccdba = READ_BIT( FLASH->IPCCBR, FLASH_IPCCBR_IPCCDBA ); + + /** + * The Device Info Table mapping depends on which firmware is running on CPU2. + * If the FUS is running on CPU2, FUS_DEVICE_INFO_TABLE_VALIDITY_KEYWORD shall be written in the table. + * Otherwise, it means the Wireless Firmware is running on the CPU2 + */ + p_fus_device_info_table = (MB_FUS_DeviceInfoTable_t*)(*(uint32_t*)((ipccdba<<2) + SRAM2A_BASE)); + + if(p_fus_device_info_table->DeviceInfoTableState == FUS_DEVICE_INFO_TABLE_VALIDITY_KEYWORD) + { + /* The FUS is running on CPU2 */ + /** + * Retrieve the WirelessFwInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + wireless_firmware_version = p_fus_device_info_table->WirelessStackVersion; + wireless_firmware_memorySize = p_fus_device_info_table->WirelessStackMemorySize; + wireless_firmware_infoStack = p_fus_device_info_table->WirelessFirmwareBleInfo; + + /** + * Retrieve the FusInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + fus_version = p_fus_device_info_table->FusVersion; + fus_memorySize = p_fus_device_info_table->FusMemorySize; + } + else + { + /* The Wireless Firmware is running on CPU2 */ + p_RefTable = (MB_RefTable_t*)((ipccdba<<2) + SRAM2A_BASE); + + /** + * Retrieve the WirelessFwInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + wireless_firmware_version = p_RefTable->p_device_info_table->WirelessFwInfoTable.Version; + wireless_firmware_memorySize = p_RefTable->p_device_info_table->WirelessFwInfoTable.MemorySize; + wireless_firmware_infoStack = p_RefTable->p_device_info_table->WirelessFwInfoTable.InfoStack; + + /** + * Retrieve the FusInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + fus_version = p_RefTable->p_device_info_table->FusInfoTable.Version; + fus_memorySize = p_RefTable->p_device_info_table->FusInfoTable.MemorySize; + } + + /** + * Retrieve the WirelessFwInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + pWirelessInfo->VersionMajor = ((wireless_firmware_version & INFO_VERSION_MAJOR_MASK) >> INFO_VERSION_MAJOR_OFFSET); + pWirelessInfo->VersionMinor = ((wireless_firmware_version & INFO_VERSION_MINOR_MASK) >> INFO_VERSION_MINOR_OFFSET); + pWirelessInfo->VersionSub = ((wireless_firmware_version & INFO_VERSION_SUB_MASK) >> INFO_VERSION_SUB_OFFSET); + pWirelessInfo->VersionBranch = ((wireless_firmware_version & INFO_VERSION_BRANCH_MASK) >> INFO_VERSION_BRANCH_OFFSET); + pWirelessInfo->VersionReleaseType = ((wireless_firmware_version & INFO_VERSION_TYPE_MASK) >> INFO_VERSION_TYPE_OFFSET); + + pWirelessInfo->MemorySizeSram2B = ((wireless_firmware_memorySize & INFO_SIZE_SRAM2B_MASK) >> INFO_SIZE_SRAM2B_OFFSET); + pWirelessInfo->MemorySizeSram2A = ((wireless_firmware_memorySize & INFO_SIZE_SRAM2A_MASK) >> INFO_SIZE_SRAM2A_OFFSET); + pWirelessInfo->MemorySizeSram1 = ((wireless_firmware_memorySize & INFO_SIZE_SRAM1_MASK) >> INFO_SIZE_SRAM1_OFFSET); + pWirelessInfo->MemorySizeFlash = ((wireless_firmware_memorySize & INFO_SIZE_FLASH_MASK) >> INFO_SIZE_FLASH_OFFSET); + + pWirelessInfo->StackType = ((wireless_firmware_infoStack & INFO_STACK_TYPE_MASK) >> INFO_STACK_TYPE_OFFSET); + + /** + * Retrieve the FusInfoTable + * This table is stored in RAM at startup during the TL (transport layer) initialization + */ + pWirelessInfo->FusVersionMajor = ((fus_version & INFO_VERSION_MAJOR_MASK) >> INFO_VERSION_MAJOR_OFFSET); + pWirelessInfo->FusVersionMinor = ((fus_version & INFO_VERSION_MINOR_MASK) >> INFO_VERSION_MINOR_OFFSET); + pWirelessInfo->FusVersionSub = ((fus_version & INFO_VERSION_SUB_MASK) >> INFO_VERSION_SUB_OFFSET); + + pWirelessInfo->FusMemorySizeSram2B = ((fus_memorySize & INFO_SIZE_SRAM2B_MASK) >> INFO_SIZE_SRAM2B_OFFSET); + pWirelessInfo->FusMemorySizeSram2A = ((fus_memorySize & INFO_SIZE_SRAM2A_MASK) >> INFO_SIZE_SRAM2A_OFFSET); + pWirelessInfo->FusMemorySizeFlash = ((fus_memorySize & INFO_SIZE_FLASH_MASK) >> INFO_SIZE_FLASH_OFFSET); + + return (SHCI_Success); +} + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h new file mode 100644 index 0000000..438d4b6 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/shci/shci.h @@ -0,0 +1,1411 @@ +/** + ****************************************************************************** + * @file shci.h + * @author MCD Application Team + * @brief HCI command for the system channel + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __SHCI_H +#define __SHCI_H + +#ifdef __cplusplus +extern "C" { +#endif + + /* Includes ------------------------------------------------------------------*/ +#include "mbox_def.h" /* Requested to expose the MB_WirelessFwInfoTable_t structure */ + + /* Exported types ------------------------------------------------------------*/ + + /* SYSTEM EVENT */ + typedef enum + { + WIRELESS_FW_RUNNING = 0x00, + FUS_FW_RUNNING = 0x01, + } SHCI_SysEvt_Ready_Rsp_t; + + /* ERROR CODES + * + * These error codes are detected on CPU2 side and are send back to the CPU1 via a system + * notification message. It is up to the application running on CPU1 to manage these errors + * + * These errors can be generated by all layers (low level driver, stack, framework infrastructure, etc..) + */ + typedef enum + { + ERR_BLE_INIT = 0, /* This event is currently not reported by the CPU2 */ + ERR_THREAD_LLD_FATAL_ERROR = 125, /* The LLD driver used on 802_15_4 detected a fatal error */ + ERR_THREAD_UNKNOWN_CMD = 126, /* The command send by the CPU1 to control the Thread stack is unknown */ + ERR_ZIGBEE_UNKNOWN_CMD = 200, /* The command send by the CPU1 to control the Zigbee stack is unknown */ + } SCHI_SystemErrCode_t; + +#define SHCI_EVTCODE ( 0xFF ) +#define SHCI_SUB_EVT_CODE_BASE ( 0x9200 ) + + /** + * THE ORDER SHALL NOT BE CHANGED TO GUARANTEE COMPATIBILITY WITH THE CPU1 DEFINITION + */ + typedef enum + { + SHCI_SUB_EVT_CODE_READY = SHCI_SUB_EVT_CODE_BASE, + SHCI_SUB_EVT_ERROR_NOTIF, + SHCI_SUB_EVT_BLE_NVM_RAM_UPDATE, + SHCI_SUB_EVT_THREAD_NVM_RAM_UPDATE, + SHCI_SUB_EVT_NVM_START_WRITE, + SHCI_SUB_EVT_NVM_END_WRITE, + SHCI_SUB_EVT_NVM_START_ERASE, + SHCI_SUB_EVT_NVM_END_ERASE, + SHCI_SUB_EVT_CODE_CONCURRENT_802154_EVT, + } SHCI_SUB_EVT_CODE_t; + + /** + * SHCI_SUB_EVT_CODE_READY + * This notifies the CPU1 that the CPU2 is now ready to receive commands + * It reports as well which firmware is running on CPU2 : The wireless stack of the FUS (previously named RSS) + */ + typedef PACKED_STRUCT{ + SHCI_SysEvt_Ready_Rsp_t sysevt_ready_rsp; + } SHCI_C2_Ready_Evt_t; + + /** + * SHCI_SUB_EVT_ERROR_NOTIF + * This reports to the CPU1 some error form the CPU2 + */ + typedef PACKED_STRUCT{ + SCHI_SystemErrCode_t errorCode; + } SHCI_C2_ErrorNotif_Evt_t; + + /** + * SHCI_SUB_EVT_BLE_NVM_RAM_UPDATE + * This notifies the CPU1 which part of the BLE NVM RAM has been updated so that only the modified + * section could be written in Flash/NVM + * StartAddress : Start address of the section that has been modified + * Size : Size (in bytes) of the section that has been modified + */ + typedef PACKED_STRUCT{ + uint32_t StartAddress; + uint32_t Size; + } SHCI_C2_BleNvmRamUpdate_Evt_t; + + /** + * SHCI_SUB_EVT_THREAD_NVM_RAM_UPDATE + * This notifies the CPU1 which part of the OT NVM RAM has been updated so that only the modified + * section could be written in Flash/NVM + * StartAddress : Start address of the section that has been modified + * Size : Size (in bytes) of the section that has been modified + */ + typedef PACKED_STRUCT{ + uint32_t StartAddress; + uint32_t Size; + } SHCI_C2_ThreadNvmRamUpdate_Evt_t; + + /** + * SHCI_SUB_EVT_NVM_START_WRITE + * This notifies the CPU1 that the CPU2 has started a write procedure in Flash + * NumberOfWords : The number of 64bits data the CPU2 needs to write in Flash. + * For each 64bits data, the algorithm as described in AN5289 is executed. + * When this number is reported to 0, it means the Number of 64bits to be written + * was unknown when the procedure has started. + * When all data are written, the SHCI_SUB_EVT_NVM_END_WRITE event is reported + */ + typedef PACKED_STRUCT{ + uint32_t NumberOfWords; + } SHCI_C2_NvmStartWrite_Evt_t; + + /** + * SHCI_SUB_EVT_NVM_END_WRITE + * This notifies the CPU1 that the CPU2 has written all expected data in Flash + */ + + /** + * SHCI_SUB_EVT_NVM_START_ERASE + * This notifies the CPU1 that the CPU2 has started a erase procedure in Flash + * NumberOfSectors : The number of sectors the CPU2 needs to erase in Flash. + * For each sector, the algorithm as described in AN5289 is executed. + * When this number is reported to 0, it means the Number of sectors to be erased + * was unknown when the procedure has started. + * When all sectors are erased, the SHCI_SUB_EVT_NVM_END_ERASE event is reported + */ + typedef PACKED_STRUCT{ + uint32_t NumberOfSectors; + } SHCI_C2_NvmStartErase_Evt_t; + + /** + * SHCI_SUB_EVT_NVM_END_ERASE + * This notifies the CPU1 that the CPU2 has erased all expected flash sectors + */ + + /* SYSTEM COMMAND */ + typedef PACKED_STRUCT + { + /** + * MetaData holds : + * 2*32bits for chaining list + * 1*32bits with BLE header (type + Opcode + Length) + */ + uint32_t MetaData[3]; + } SHCI_Header_t; + + typedef enum + { + SHCI_Success = 0x00, + SHCI_UNKNOWN_CMD = 0x01, + SHCI_MEMORY_CAPACITY_EXCEEDED_ERR_CODE= 0x07, + SHCI_ERR_UNSUPPORTED_FEATURE = 0x11, + SHCI_ERR_INVALID_HCI_CMD_PARAMS = 0x12, + SHCI_ERR_INVALID_PARAMS = 0x42, /* only used for release < v1.13.0 */ + SHCI_ERR_INVALID_PARAMS_V2 = 0x92, /* available for release >= v1.13.0 */ + SHCI_FUS_CMD_NOT_SUPPORTED = 0xFF, + } SHCI_CmdStatus_t; + + typedef enum + { + SHCI_8BITS = 0x01, + SHCI_16BITS = 0x02, + SHCI_32BITS = 0x04, + } SHCI_Busw_t; + +#define SHCI_OGF ( 0x3F ) +#define SHCI_OCF_BASE ( 0x50 ) + + /** + * THE ORDER SHALL NOT BE CHANGED TO GUARANTEE COMPATIBILITY WITH THE CPU2 DEFINITION + */ + typedef enum + { + SHCI_OCF_C2_RESERVED1 = SHCI_OCF_BASE, + SHCI_OCF_C2_RESERVED2, + SHCI_OCF_C2_FUS_GET_STATE, + SHCI_OCF_C2_FUS_RESERVED1, + SHCI_OCF_C2_FUS_FW_UPGRADE, + SHCI_OCF_C2_FUS_FW_DELETE, + SHCI_OCF_C2_FUS_UPDATE_AUTH_KEY, + SHCI_OCF_C2_FUS_LOCK_AUTH_KEY, + SHCI_OCF_C2_FUS_STORE_USR_KEY, + SHCI_OCF_C2_FUS_LOAD_USR_KEY, + SHCI_OCF_C2_FUS_START_WS, + SHCI_OCF_C2_FUS_RESERVED2, + SHCI_OCF_C2_FUS_RESERVED3, + SHCI_OCF_C2_FUS_LOCK_USR_KEY, + SHCI_OCF_C2_FUS_UNLOAD_USR_KEY, + SHCI_OCF_C2_FUS_ACTIVATE_ANTIROLLBACK, + SHCI_OCF_C2_FUS_RESERVED7, + SHCI_OCF_C2_FUS_RESERVED8, + SHCI_OCF_C2_FUS_RESERVED9, + SHCI_OCF_C2_FUS_RESERVED10, + SHCI_OCF_C2_FUS_RESERVED11, + SHCI_OCF_C2_FUS_RESERVED12, + SHCI_OCF_C2_BLE_INIT, + SHCI_OCF_C2_THREAD_INIT, + SHCI_OCF_C2_DEBUG_INIT, + SHCI_OCF_C2_FLASH_ERASE_ACTIVITY, + SHCI_OCF_C2_CONCURRENT_SET_MODE, + SHCI_OCF_C2_FLASH_STORE_DATA, + SHCI_OCF_C2_FLASH_ERASE_DATA, + SHCI_OCF_C2_RADIO_ALLOW_LOW_POWER, + SHCI_OCF_C2_MAC_802_15_4_INIT, + SHCI_OCF_C2_REINIT, + SHCI_OCF_C2_ZIGBEE_INIT, + SHCI_OCF_C2_LLD_TESTS_INIT, + SHCI_OCF_C2_EXTPA_CONFIG, + SHCI_OCF_C2_SET_FLASH_ACTIVITY_CONTROL, + SHCI_OCF_C2_BLE_LLD_INIT, + SHCI_OCF_C2_CONFIG, + SHCI_OCF_C2_CONCURRENT_GET_NEXT_BLE_EVT_TIME, + SHCI_OCF_C2_CONCURRENT_ENABLE_NEXT_802154_EVT_NOTIFICATION, + SHCI_OCF_C2_802_15_4_DEINIT, + SHCI_OCF_C2_SET_SYSTEM_CLOCK, + } SHCI_OCF_t; + +#define SHCI_OPCODE_C2_FUS_GET_STATE (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_GET_STATE) +/** No command parameters */ +/** Response parameters*/ +/** It responds a 1 byte value holding FUS State error code when the FUS State value is 0xFF (FUS_STATE_VALUE_ERROR) */ + typedef enum + { + FUS_STATE_ERROR_NO_ERROR = 0x00, + FUS_STATE_ERROR_IMG_NOT_FOUND = 0x01, + FUS_STATE_ERROR_IMG_CORRUPT = 0x02, + FUS_STATE_ERROR_IMG_NOT_AUTHENTIC = 0x03, + FUS_STATE_ERROR_IMG_NOT_ENOUGH_SPACE = 0x04, + FUS_STATE_ERROR_IMAGE_USRABORT = 0x05, + FUS_STATE_ERROR_IMAGE_ERSERROR = 0x06, + FUS_STATE_ERROR_IMAGE_WRTERROR = 0x07, + FUS_STATE_ERROR_AUTH_TAG_ST_NOTFOUND = 0x08, + FUS_STATE_ERROR_AUTH_TAG_CUST_NOTFOUND = 0x09, + FUS_STATE_ERROR_AUTH_KEY_LOCKED = 0x0A, + FUS_STATE_ERROR_FW_ROLLBACK_ERROR = 0x11, + FUS_STATE_ERROR_STATE_NOT_RUNNING = 0xFE, + FUS_STATE_ERROR_ERR_UNKNOWN = 0xFF, + } SHCI_FUS_GetState_ErrorCode_t; + + enum + { + FUS_STATE_VALUE_IDLE = 0x00, + FUS_STATE_VALUE_FW_UPGRD_ONGOING = 0x10, + FUS_STATE_VALUE_FW_UPGRD_ONGOING_END = 0x1F, /* All values between 0x10 and 0x1F has the same meaning */ + FUS_STATE_VALUE_FUS_UPGRD_ONGOING = 0x20, + FUS_STATE_VALUE_FUS_UPGRD_ONGOING_END = 0x2F, /* All values between 0x20 and 0x2F has the same meaning */ + FUS_STATE_VALUE_SERVICE_ONGOING = 0x30, + FUS_STATE_VALUE_SERVICE_ONGOING_END = 0x3F, /* All values between 0x30 and 0x3F has the same meaning */ + FUS_STATE_VALUE_ERROR = 0xFF, + }; + +#define SHCI_OPCODE_C2_FUS_RESERVED1 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED1) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_FW_UPGRADE (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_FW_UPGRADE) + /** No structure for command parameters */ + /** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_FW_DELETE (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_FW_DELETE) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_UPDATE_AUTH_KEY (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_UPDATE_AUTH_KEY) + typedef PACKED_STRUCT{ + uint8_t KeySize; + uint8_t KeyData[64]; + } SHCI_C2_FUS_UpdateAuthKey_Cmd_Param_t; + + /** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_LOCK_AUTH_KEY (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_LOCK_AUTH_KEY) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_STORE_USR_KEY (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_STORE_USR_KEY) + /** Command parameters */ + /* List of supported key type */ + enum + { + KEYTYPE_NONE = 0x00, + KEYTYPE_SIMPLE = 0x01, + KEYTYPE_MASTER = 0x02, + KEYTYPE_ENCRYPTED = 0x03, + }; + + /* List of supported key size */ + enum + { + KEYSIZE_16 = 16, + KEYSIZE_32 = 32, + }; + + typedef PACKED_STRUCT{ + uint8_t KeyType; + uint8_t KeySize; + uint8_t KeyData[32 + 12]; + } SHCI_C2_FUS_StoreUsrKey_Cmd_Param_t; + + /** Response parameters*/ + /** It responds a 1 byte value holding the index given for the stored key */ + +#define SHCI_OPCODE_C2_FUS_LOAD_USR_KEY (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_LOAD_USR_KEY) + /** Command parameters */ + /** 1 byte holding the key index value */ + + /** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_START_WS (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_START_WS) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_RESERVED2 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED2) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_RESERVED3 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED3) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_LOCK_USR_KEY (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_LOCK_USR_KEY) + /** Command parameters */ + /** 1 byte holding the key index value */ + + /** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_UNLOAD_USR_KEY (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_UNLOAD_USR_KEY) +/** No command parameters */ +/** 1 byte holding the key index value */ + +#define SHCI_OPCODE_C2_FUS_ACTIVATE_ANTIROLLBACK (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_ACTIVATE_ANTIROLLBACK) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_RESERVED7 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED7) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_RESERVED8 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED8) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_RESERVED9 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED9) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_RESERVED10 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED10) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_RESERVED11 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED11) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_FUS_RESERVED12 (( SHCI_OGF << 10) + SHCI_OCF_C2_FUS_RESERVED12) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_BLE_INIT (( SHCI_OGF << 10) + SHCI_OCF_C2_BLE_INIT) + /** THE ORDER SHALL NOT BE CHANGED */ + typedef PACKED_STRUCT{ + uint8_t* pBleBufferAddress; /**< NOT USED - shall be set to 0 */ + uint32_t BleBufferSize; /**< NOT USED - shall be set to 0 */ + + /** + * NumAttrRecord + * Maximum number of attribute records related to all the required characteristics (excluding the services) + * that can be stored in the GATT database, for the specific BLE user application. + * For each characteristic, the number of attribute records goes from two to five depending on the characteristic properties: + * - minimum of two (one for declaration and one for the value) + * - add one more record for each additional property: notify or indicate, broadcast, extended property. + * The total calculated value must be increased by 9, due to the records related to the standard attribute profile and + * GAP service characteristics, and automatically added when initializing GATT and GAP layers + * - Min value: + 9 + * - Max value: depending on the GATT database defined by user application + */ + uint16_t NumAttrRecord; + + /** + * NumAttrServ + * Defines the maximum number of services that can be stored in the GATT database. Note that the GAP and GATT services + * are automatically added at initialization so this parameter must be the number of user services increased by two. + * - Min value: + 2 + * - Max value: depending GATT database defined by user application + */ + uint16_t NumAttrServ; + + /** + * AttrValueArrSize + * NOTE: This parameter is ignored by the CPU2 when the parameter "Options" is set to "LL_only" ( see Options description in that structure ) + * + * Size of the storage area for the attribute values. + * Each characteristic contributes to the attrValueArrSize value as follows: + * - Characteristic value length plus: + * + 5 bytes if characteristic UUID is 16 bits + * + 19 bytes if characteristic UUID is 128 bits + * + 2 bytes if characteristic has a server configuration descriptor + * + 2 bytes * NumOfLinks if the characteristic has a client configuration descriptor + * + 2 bytes if the characteristic has extended properties + * Each descriptor contributes to the attrValueArrSize value as follows: + * - Descriptor length + */ + uint16_t AttrValueArrSize; + + /** + * NumOfLinks + * Maximum number of BLE links supported + * - Min value: 1 + * - Max value: 8 + */ + uint8_t NumOfLinks; + + /** + * ExtendedPacketLengthEnable + * Disable/enable the extended packet length BLE 5.0 feature + * - Disable: 0 + * - Enable: 1 + */ + uint8_t ExtendedPacketLengthEnable; + + /** + * PrWriteListSize + * NOTE: This parameter is ignored by the CPU2 when the parameter "Options" is set to "LL_only" ( see Options description in that structure ) + * + * Maximum number of supported "prepare write request" + * - Min value: given by the macro DEFAULT_PREP_WRITE_LIST_SIZE + * - Max value: a value higher than the minimum required can be specified, but it is not recommended + */ + uint8_t PrWriteListSize; + + /** + * MblockCount + * NOTE: This parameter is overwritten by the CPU2 with an hardcoded optimal value when the parameter "Options" is set to "LL_only" + * ( see Options description in that structure ) + * + * Number of allocated memory blocks for the BLE stack + * - Min value: given by the macro MBLOCKS_CALC + * - Max value: a higher value can improve data throughput performance, but uses more memory + */ + uint8_t MblockCount; + + /** + * AttMtu + * NOTE: This parameter is ignored by the CPU2 when the parameter "Options" is set to "LL_only" ( see Options description in that structure ) + * + * Maximum ATT MTU size supported + * - Min value: 23 + * - Max value: 512 + */ + uint16_t AttMtu; + + /** + * PeripheralSca + * The sleep clock accuracy (ppm value) that used in BLE connected Peripheral mode to calculate the window widening + * (in combination with the sleep clock accuracy sent by master in CONNECT_REQ PDU), + * refer to BLE 5.0 specifications - Vol 6 - Part B - chap 4.5.7 and 4.2.2 + * - Min value: 0 + * - Max value: 500 (worst possible admitted by specification) + */ + uint16_t PeripheralSca; + + /** + * CentralSca + * The sleep clock accuracy handled in Central mode. It is used to determine the connection and advertising events timing. + * It is transmitted to the slave in CONNEC_REQ PDU used by the slave to calculate the window widening, + * see PeripheralSca and Bluetooth Core Specification v5.0 Vol 6 - Part B - chap 4.5.7 and 4.2.2 + * Possible values: + * - 251 ppm to 500 ppm: 0 + * - 151 ppm to 250 ppm: 1 + * - 101 ppm to 150 ppm: 2 + * - 76 ppm to 100 ppm: 3 + * - 51 ppm to 75 ppm: 4 + * - 31 ppm to 50 ppm: 5 + * - 21 ppm to 30 ppm: 6 + * - 0 ppm to 20 ppm: 7 + */ + uint8_t CentralSca; + + /** + * LsSource + * Some information for Low speed clock mapped in bits field + * - bit 0: 1: Calibration for the RF system wakeup clock source 0: No calibration for the RF system wakeup clock source + * - bit 1: 1: STM32W5M Module device 0: Other devices as STM32WBxx SOC, STM32WB1M module + * - bit 2: 1: HSE/1024 Clock config 0: LSE Clock config + */ + uint8_t LsSource; + + /** + * MaxConnEventLength + * This parameter determines the maximum duration of a slave connection event. When this duration is reached the slave closes + * the current connections event (whatever is the CE_length parameter specified by the master in HCI_CREATE_CONNECTION HCI command), + * expressed in units of 625/256 us (~2.44 us) + * - Min value: 0 (if 0 is specified, the master and slave perform only a single TX-RX exchange per connection event) + * - Max value: 1638400 (4000 ms). A higher value can be specified (max 0xFFFFFFFF) but results in a maximum connection time + * of 4000 ms as specified. In this case the parameter is not applied, and the predicted CE length calculated on slave is not shortened + */ + uint32_t MaxConnEventLength; + + /** + * HsStartupTime + * Startup time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 us (~2.44 us). + * - Min value: 0 + * - Max value: 820 (~2 ms). A higher value can be specified, but the value that implemented in stack is forced to ~2 ms + */ + uint16_t HsStartupTime; + + /** + * ViterbiEnable + * Viterbi implementation in BLE LL reception. + * - 0: Enable + * - 1: Disable + */ + uint8_t ViterbiEnable; + + /** + * Options flags + * - bit 0: 1: LL only 0: LL + host + * - bit 1: 1: no service change desc. 0: with service change desc. + * - bit 2: 1: device name Read-Only 0: device name R/W + * - bit 3: 1: extended advertizing supported 0: extended advertizing not supported + * - bit 4: 1: CS Algo #2 supported 0: CS Algo #2 not supported + * - bit 5: 1: Reduced GATT database in NVM 0: Full GATT database in NVM + * - bit 6: 1: GATT caching is used 0: GATT caching is not used + * - bit 7: 1: LE Power Class 1 0: LE Power Class 2-3 + * - other bits: complete with Options_extension flag + */ + uint8_t Options; + + /** + * HwVersion + * Reserved for future use - shall be set to 0 + */ + uint8_t HwVersion; + + /** + * Maximum number of connection-oriented channels in initiator mode. + * Range: 0 .. 64 + */ + uint8_t max_coc_initiator_nbr; + + /** + * Minimum transmit power in dBm supported by the Controller. + * Range: -127 .. 20 + */ + int8_t min_tx_power; + + /** + * Maximum transmit power in dBm supported by the Controller. + * Range: -127 .. 20 + */ + int8_t max_tx_power; + + /** + * RX model configuration + * - bit 0: 1: agc_rssi model improved vs RF blockers 0: Legacy agc_rssi model + * - other bits: reserved ( shall be set to 0) + */ + uint8_t rx_model_config; + + /** Maximum number of advertising sets. + * Range: 1 .. 8 with limitation: + * This parameter is linked to max_adv_data_len such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based + * on Max Extended advertising configuration supported. + * This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set + */ + uint8_t max_adv_set_nbr; + + /** Maximum advertising data length (in bytes) + * Range: 31 .. 1650 with limitation: + * This parameter is linked to max_adv_set_nbr such as both compliant with allocated Total memory computed with BLE_EXT_ADV_BUFFER_SIZE based + * on Max Extended advertising configuration supported. + * This parameter is considered by the CPU2 when Options has SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV flag set + */ + uint16_t max_adv_data_len; + + /** RF TX Path Compensation Value (16-bit signed integer). Units: 0.1 dB. + * Range: -1280 .. 1280 + */ + int16_t tx_path_compens; + + /** RF RX Path Compensation Value (16-bit signed integer). Units: 0.1 dB. + * Range: -1280 .. 1280 + */ + int16_t rx_path_compens; + + /** BLE core specification version (8-bit unsigned integer). + * values as: 11(5.2), 12(5.3), 13(5.4) + */ + uint8_t ble_core_version; + + /** + * Options flags extension + * - bit 0: 1: appearance Writable 0: appearance Read-Only + * - bit 1: 1: Enhanced ATT supported 0: Enhanced ATT not supported + * - other bits: reserved ( shall be set to 0) + */ + uint8_t Options_extension; + + /** + * MaxAddEattBearers + * + * Maximum number of bearers that can be created for Enhanced ATT + * in addition to the number of links + * - Range: 0 .. 4 + */ + uint8_t MaxAddEattBearers; + + } SHCI_C2_Ble_Init_Cmd_Param_t; + + typedef PACKED_STRUCT{ + SHCI_Header_t Header; /** Does not need to be initialized by the user */ + SHCI_C2_Ble_Init_Cmd_Param_t Param; + } SHCI_C2_Ble_Init_Cmd_Packet_t; + + /** + * Options + * Each definition below may be added together to build the Options value + * WARNING : Only one definition per bit shall be added to build the Options value + */ +#define SHCI_C2_BLE_INIT_OPTIONS_LL_ONLY (1<<0) +#define SHCI_C2_BLE_INIT_OPTIONS_LL_HOST (0<<0) + +#define SHCI_C2_BLE_INIT_OPTIONS_NO_SVC_CHANGE_DESC (1<<1) +#define SHCI_C2_BLE_INIT_OPTIONS_WITH_SVC_CHANGE_DESC (0<<1) + +#define SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RO (1<<2) +#define SHCI_C2_BLE_INIT_OPTIONS_DEVICE_NAME_RW (0<<2) + +#define SHCI_C2_BLE_INIT_OPTIONS_EXT_ADV (1<<3) +#define SHCI_C2_BLE_INIT_OPTIONS_NO_EXT_ADV (0<<3) + +#define SHCI_C2_BLE_INIT_OPTIONS_CS_ALGO2 (1<<4) +#define SHCI_C2_BLE_INIT_OPTIONS_NO_CS_ALGO2 (0<<4) + +#define SHCI_C2_BLE_INIT_OPTIONS_REDUC_GATTDB_NVM (1<<5) +#define SHCI_C2_BLE_INIT_OPTIONS_FULL_GATTDB_NVM (0<<5) + +#define SHCI_C2_BLE_INIT_OPTIONS_GATT_CACHING_USED (1<<6) +#define SHCI_C2_BLE_INIT_OPTIONS_GATT_CACHING_NOTUSED (0<<6) + +#define SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_1 (1<<7) +#define SHCI_C2_BLE_INIT_OPTIONS_POWER_CLASS_2_3 (0<<7) + + /** + * Options extension + * Each definition below may be added together to build the Options value + * WARNING : Only one definition per bit shall be added to build the Options value + */ +#define SHCI_C2_BLE_INIT_OPTIONS_APPEARANCE_WRITABLE (1<<0) +#define SHCI_C2_BLE_INIT_OPTIONS_APPEARANCE_READONLY (0<<0) + +#define SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_SUPPORTED (1<<1) +#define SHCI_C2_BLE_INIT_OPTIONS_ENHANCED_ATT_NOTSUPPORTED (0<<1) + + /** + * RX models configuration + */ +#define SHCI_C2_BLE_INIT_RX_MODEL_AGC_RSSI_LEGACY (0<<0) +#define SHCI_C2_BLE_INIT_RX_MODEL_AGC_RSSI_BLOCKER (1<<0) + + /** + * BLE core version + */ +#define SHCI_C2_BLE_INIT_BLE_CORE_5_2 11 +#define SHCI_C2_BLE_INIT_BLE_CORE_5_3 12 +#define SHCI_C2_BLE_INIT_BLE_CORE_5_4 13 + + /** + * LsSource information + */ +#define SHCI_C2_BLE_INIT_CFG_BLE_LS_NOCALIB (0<<0) +#define SHCI_C2_BLE_INIT_CFG_BLE_LS_CALIB (1<<0) +#define SHCI_C2_BLE_INIT_CFG_BLE_LS_OTHER_DEV (0<<1) +#define SHCI_C2_BLE_INIT_CFG_BLE_LS_MOD5MM_DEV (1<<1) +#define SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_LSE (0<<2) +#define SHCI_C2_BLE_INIT_CFG_BLE_LS_CLK_HSE_1024 (1<<2) + +#define SHCI_OPCODE_C2_THREAD_INIT (( SHCI_OGF << 10) + SHCI_OCF_C2_THREAD_INIT) +/** No command parameters */ +/** No response parameters*/ + +#define SHCI_OPCODE_C2_DEBUG_INIT (( SHCI_OGF << 10) + SHCI_OCF_C2_DEBUG_INIT) + /** Command parameters */ + typedef PACKED_STRUCT + { + uint8_t thread_config; + uint8_t ble_config; + uint8_t mac_802_15_4_config; + uint8_t zigbee_config; + } SHCI_C2_DEBUG_TracesConfig_t; + + typedef PACKED_STRUCT + { + uint8_t ble_dtb_cfg; + /** + * sys_dbg_cfg1 options flag + * - bit 0: 0: IP BLE core in LP mode 1: IP BLE core in run mode (no LP supported) + * - bit 1: 0: CPU2 STOP mode Enable 1: CPU2 STOP mode Disable + * - bit [2-7]: bits reserved ( shall be set to 0) + */ + uint8_t sys_dbg_cfg1; + uint8_t reserved[2]; + uint16_t STBY_DebugGpioaPinList; + uint16_t STBY_DebugGpiobPinList; + uint16_t STBY_DebugGpiocPinList; + uint16_t STBY_DtbGpioaPinList; + uint16_t STBY_DtbGpiobPinList; + } SHCI_C2_DEBUG_GeneralConfig_t; + + typedef PACKED_STRUCT{ + uint8_t *pGpioConfig; + uint8_t *pTracesConfig; + uint8_t *pGeneralConfig; + uint8_t GpioConfigSize; + uint8_t TracesConfigSize; + uint8_t GeneralConfigSize; + } SHCI_C2_DEBUG_init_Cmd_Param_t; + + typedef PACKED_STRUCT{ + SHCI_Header_t Header; /** Does not need to be initialized by the user */ + SHCI_C2_DEBUG_init_Cmd_Param_t Param; + } SHCI_C2_DEBUG_Init_Cmd_Packet_t; + /** No response parameters*/ + + /** + * Options + * Each definition below may be added together to build the Options value + * WARNING : Only one definition per bit shall be added to build the Options value + */ +#define SHCI_C2_DEBUG_OPTIONS_IPCORE_LP (0<<0) +#define SHCI_C2_DEBUG_OPTIONS_IPCORE_NO_LP (1<<0) + +#define SHCI_C2_DEBUG_OPTIONS_CPU2_STOP_EN (0<<1) +#define SHCI_C2_DEBUG_OPTIONS_CPU2_STOP_DIS (1<<1) + + +#define SHCI_OPCODE_C2_FLASH_ERASE_ACTIVITY (( SHCI_OGF << 10) + SHCI_OCF_C2_FLASH_ERASE_ACTIVITY) + /** Command parameters */ + typedef enum + { + ERASE_ACTIVITY_OFF = 0x00, + ERASE_ACTIVITY_ON = 0x01, + } SHCI_EraseActivity_t; + + /** No response parameters*/ + +#define SHCI_OPCODE_C2_CONCURRENT_SET_MODE (( SHCI_OGF << 10) + SHCI_OCF_C2_CONCURRENT_SET_MODE) +/** command parameters */ + typedef enum + { + BLE_ENABLE, + THREAD_ENABLE, + ZIGBEE_ENABLE, + MAC_ENABLE, + } SHCI_C2_CONCURRENT_Mode_Param_t; + /** No response parameters*/ + +#define SHCI_OPCODE_C2_CONCURRENT_GET_NEXT_BLE_EVT_TIME (( SHCI_OGF << 10) + SHCI_OCF_C2_CONCURRENT_GET_NEXT_BLE_EVT_TIME) +/** command parameters */ + typedef PACKED_STRUCT + { + uint32_t relative_time; + } SHCI_C2_CONCURRENT_GetNextBleEvtTime_Param_t; + /** No response parameters*/ + +#define SHCI_OPCODE_C2_CONCURRENT_ENABLE_NEXT_802154_EVT_NOTIFICATION (( SHCI_OGF << 10) + SHCI_OCF_C2_CONCURRENT_ENABLE_NEXT_802154_EVT_NOTIFICATION) + /** No command parameters */ + /** No response parameters*/ + +#define SHCI_OPCODE_C2_FLASH_STORE_DATA (( SHCI_OGF << 10) + SHCI_OCF_C2_FLASH_STORE_DATA) +#define SHCI_OPCODE_C2_FLASH_ERASE_DATA (( SHCI_OGF << 10) + SHCI_OCF_C2_FLASH_ERASE_DATA) +/** command parameters */ + typedef enum + { + BLE_IP, + THREAD_IP, + ZIGBEE_IP, + } SHCI_C2_FLASH_Ip_t; + /** No response parameters*/ + +#define SHCI_OPCODE_C2_RADIO_ALLOW_LOW_POWER (( SHCI_OGF << 10) + SHCI_OCF_C2_RADIO_ALLOW_LOW_POWER) + +#define SHCI_OPCODE_C2_MAC_802_15_4_INIT (( SHCI_OGF << 10) + SHCI_OCF_C2_MAC_802_15_4_INIT) + +#define SHCI_OPCODE_C2_REINIT (( SHCI_OGF << 10) + SHCI_OCF_C2_REINIT) + +#define SHCI_OPCODE_C2_ZIGBEE_INIT (( SHCI_OGF << 10) + SHCI_OCF_C2_ZIGBEE_INIT) + +#define SHCI_OPCODE_C2_LLD_TESTS_INIT (( SHCI_OGF << 10) + SHCI_OCF_C2_LLD_TESTS_INIT) + +#define SHCI_OPCODE_C2_BLE_LLD_INIT (( SHCI_OGF << 10) + SHCI_OCF_C2_BLE_LLD_INIT) + +#define SHCI_OPCODE_C2_EXTPA_CONFIG (( SHCI_OGF << 10) + SHCI_OCF_C2_EXTPA_CONFIG) + /** Command parameters */ + enum + { + EXT_PA_ENABLED_LOW, + EXT_PA_ENABLED_HIGH, + }/* gpio_polarity */; + + enum + { + EXT_PA_DISABLED, + EXT_PA_ENABLED, + }/* gpio_status */; + + typedef PACKED_STRUCT{ + uint32_t gpio_port; + uint16_t gpio_pin_number; + uint8_t gpio_polarity; + uint8_t gpio_status; + } SHCI_C2_EXTPA_CONFIG_Cmd_Param_t; + + /** No response parameters*/ + +#define SHCI_OPCODE_C2_SET_FLASH_ACTIVITY_CONTROL (( SHCI_OGF << 10) + SHCI_OCF_C2_SET_FLASH_ACTIVITY_CONTROL) + /** Command parameters */ + typedef enum + { + FLASH_ACTIVITY_CONTROL_PES, + FLASH_ACTIVITY_CONTROL_SEM7, + }SHCI_C2_SET_FLASH_ACTIVITY_CONTROL_Source_t; + + /** No response parameters*/ + +#define SHCI_OPCODE_C2_CONFIG (( SHCI_OGF << 10) + SHCI_OCF_C2_CONFIG) + + /** Command parameters */ + typedef PACKED_STRUCT{ + uint8_t PayloadCmdSize; + uint8_t Config1; + uint8_t EvtMask1; + uint8_t Spare1; + uint32_t BleNvmRamAddress; + uint32_t ThreadNvmRamAddress; + uint16_t RevisionID; + uint16_t DeviceID; + } SHCI_C2_CONFIG_Cmd_Param_t; + +#define SHCI_OPCODE_C2_802_15_4_DEINIT (( SHCI_OGF << 10) + SHCI_OCF_C2_802_15_4_DEINIT) + +#define SHCI_OPCODE_C2_SET_SYSTEM_CLOCK (( SHCI_OGF << 10) + SHCI_OCF_C2_SET_SYSTEM_CLOCK) + /** Command parameters */ + typedef enum + { + SET_SYSTEM_CLOCK_HSE_TO_PLL, + SET_SYSTEM_CLOCK_PLL_ON_TO_HSE, + SET_SYSTEM_CLOCK_PLL_OFF_TO_HSE, + }SHCI_C2_SET_SYSTEM_CLOCK_Cmd_Param_t; + +/** + * PayloadCmdSize + * Value that shall be used + */ +#define SHCI_C2_CONFIG_PAYLOAD_CMD_SIZE (sizeof(SHCI_C2_CONFIG_Cmd_Param_t) - 1) + +/** + * Device revision ID + */ +#define SHCI_C2_CONFIG_CUT2_0 (0x2000) +#define SHCI_C2_CONFIG_CUT2_1 (0x2001) +#define SHCI_C2_CONFIG_CUT2_2 (0x2003) + +/** + * Device ID + */ +#define SHCI_C2_CONFIG_STM32WB55xx (0x495) +#define SHCI_C2_CONFIG_STM32WB15xx (0x494) + +/** + * Config1 + * Each definition below may be added together to build the Config1 value + * WARNING : Only one definition per bit shall be added to build the Config1 value + */ +#define SHCI_C2_CONFIG_CONFIG1_BIT0_BLE_NVM_DATA_TO_INTERNAL_FLASH (0<<0) +#define SHCI_C2_CONFIG_CONFIG1_BIT0_BLE_NVM_DATA_TO_SRAM (1<<0) +#define SHCI_C2_CONFIG_CONFIG1_BIT1_THREAD_NVM_DATA_TO_INTERNAL_FLASH (0<<1) +#define SHCI_C2_CONFIG_CONFIG1_BIT1_THREAD_NVM_DATA_TO_SRAM (1<<1) +#define SHCI_C2_CONFIG_CONFIG1_BIT2_SET_EUI64_FORMAT (1<<2) + +/** + * EvtMask1 + * Each definition below may be added together to build the EvtMask1 value + */ +#define SHCI_C2_CONFIG_EVTMASK1_BIT0_ERROR_NOTIF_ENABLE (1<<0) +#define SHCI_C2_CONFIG_EVTMASK1_BIT1_BLE_NVM_RAM_UPDATE_ENABLE (1<<1) +#define SHCI_C2_CONFIG_EVTMASK1_BIT2_THREAD_NVM_RAM_UPDATE_ENABLE (1<<2) +#define SHCI_C2_CONFIG_EVTMASK1_BIT3_NVM_START_WRITE_ENABLE (1<<3) +#define SHCI_C2_CONFIG_EVTMASK1_BIT4_NVM_END_WRITE_ENABLE (1<<4) +#define SHCI_C2_CONFIG_EVTMASK1_BIT5_NVM_START_ERASE_ENABLE (1<<5) +#define SHCI_C2_CONFIG_EVTMASK1_BIT6_NVM_END_ERASE_ENABLE (1<<6) + +/** + * BleNvmRamAddress + * The buffer shall have a size of BLE_NVM_SRAM_SIZE number of 32bits + * The buffer shall be allocated in SRAM2 + */ +#define BLE_NVM_SRAM_SIZE (507) + +/** + * ThreadNvmRamAddress + * The buffer shall have a size of THREAD_NVM_SRAM_SIZE number of 32bits + * The buffer shall be allocated in SRAM2 + */ +#define THREAD_NVM_SRAM_SIZE (1016) + + + /** No response parameters*/ + + /* Exported type --------------------------------------------------------*/ +#define FUS_DEVICE_INFO_TABLE_VALIDITY_KEYWORD (0xA94656B9) + +/* + * At startup, the information relative to the wireless binary are stored in RAM through a structure defined by + * MB_WirelessFwInfoTable_t.This structure contains 4 fields (Version,MemorySize, Stack_info and a reserved part) + * each of those coded on 32 bits as shown on the table below: + * + * + * |7 |6 |5 |4 |3 |2 |1 |0 |7 |6 |5 |4 |3 |2 |1 |0 |7 |6 |5 |4 |3 |2 |1 |0 |7 |6 |5 |4 |3 |2 |1 |0 | + * ------------------------------------------------------------------------------------------------- + * Version | Major version | Minor version | Sub version | Branch |ReleaseType| + * ------------------------------------------------------------------------------------------------- + * MemorySize | SRAM2B (kB) | SRAM2A (kB) | SRAM1 (kB) | FLASH (4kb) | + * ------------------------------------------------------------------------------------------------- + * Info stack | Reserved | Reserved | Reserved | Type (MAC,Thread,BLE) | + * ------------------------------------------------------------------------------------------------- + * Reserved | Reserved | Reserved | Reserved | Reserved | + * ------------------------------------------------------------------------------------------------- + * + */ + +/* Field Version */ +#define INFO_VERSION_MAJOR_OFFSET 24 +#define INFO_VERSION_MAJOR_MASK 0xff000000 +#define INFO_VERSION_MINOR_OFFSET 16 +#define INFO_VERSION_MINOR_MASK 0x00ff0000 +#define INFO_VERSION_SUB_OFFSET 8 +#define INFO_VERSION_SUB_MASK 0x0000ff00 +#define INFO_VERSION_BRANCH_OFFSET 4 +#define INFO_VERSION_BRANCH_MASK 0x0000000f0 +#define INFO_VERSION_TYPE_OFFSET 0 +#define INFO_VERSION_TYPE_MASK 0x00000000f + +#define INFO_VERSION_TYPE_RELEASE 1 + +/* Field Memory */ +#define INFO_SIZE_SRAM2B_OFFSET 24 +#define INFO_SIZE_SRAM2B_MASK 0xff000000 +#define INFO_SIZE_SRAM2A_OFFSET 16 +#define INFO_SIZE_SRAM2A_MASK 0x00ff0000 +#define INFO_SIZE_SRAM1_OFFSET 8 +#define INFO_SIZE_SRAM1_MASK 0x0000ff00 +#define INFO_SIZE_FLASH_OFFSET 0 +#define INFO_SIZE_FLASH_MASK 0x000000ff + +/* Field stack information */ +#define INFO_STACK_TYPE_OFFSET 0 +#define INFO_STACK_TYPE_MASK 0x000000ff +#define INFO_STACK_TYPE_NONE 0 + +#define INFO_STACK_TYPE_BLE_FULL 0x01 +#define INFO_STACK_TYPE_BLE_HCI 0x02 +#define INFO_STACK_TYPE_BLE_LIGHT 0x03 +#define INFO_STACK_TYPE_BLE_BEACON 0x04 +#define INFO_STACK_TYPE_BLE_BASIC 0x05 +#define INFO_STACK_TYPE_BLE_FULL_EXT_ADV 0x06 +#define INFO_STACK_TYPE_BLE_HCI_EXT_ADV 0x07 +#define INFO_STACK_TYPE_THREAD_FTD 0x10 +#define INFO_STACK_TYPE_THREAD_MTD 0x11 +#define INFO_STACK_TYPE_ZIGBEE_FFD 0x30 +#define INFO_STACK_TYPE_ZIGBEE_RFD 0x31 +#define INFO_STACK_TYPE_MAC 0x40 +#define INFO_STACK_TYPE_BLE_THREAD_FTD_STATIC 0x50 +#define INFO_STACK_TYPE_BLE_THREAD_FTD_DYNAMIC 0x51 +#define INFO_STACK_TYPE_BLE_THREAD_LIGHT_DYNAMIC 0x52 +#define INFO_STACK_TYPE_802154_LLD_TESTS 0x60 +#define INFO_STACK_TYPE_802154_PHY_VALID 0x61 +#define INFO_STACK_TYPE_BLE_PHY_VALID 0x62 +#define INFO_STACK_TYPE_BLE_LLD_TESTS 0x63 +#define INFO_STACK_TYPE_BLE_RLV 0x64 +#define INFO_STACK_TYPE_802154_RLV 0x65 +#define INFO_STACK_TYPE_BLE_ZIGBEE_FFD_STATIC 0x70 +#define INFO_STACK_TYPE_BLE_ZIGBEE_RFD_STATIC 0x71 +#define INFO_STACK_TYPE_BLE_ZIGBEE_FFD_DYNAMIC 0x78 +#define INFO_STACK_TYPE_BLE_ZIGBEE_RFD_DYNAMIC 0x79 +#define INFO_STACK_TYPE_RLV 0x80 +#define INFO_STACK_TYPE_BLE_MAC_STATIC 0x90 + +typedef struct { +/** + * Wireless Info + */ + uint8_t VersionMajor; + uint8_t VersionMinor; + uint8_t VersionSub; + uint8_t VersionBranch; + uint8_t VersionReleaseType; + uint8_t MemorySizeSram2B; /*< Multiple of 1K */ + uint8_t MemorySizeSram2A; /*< Multiple of 1K */ + uint8_t MemorySizeSram1; /*< Multiple of 1K */ + uint8_t MemorySizeFlash; /*< Multiple of 4K */ + uint8_t StackType; +/** + * Fus Info + */ + uint8_t FusVersionMajor; + uint8_t FusVersionMinor; + uint8_t FusVersionSub; + uint8_t FusMemorySizeSram2B; /*< Multiple of 1K */ + uint8_t FusMemorySizeSram2A; /*< Multiple of 1K */ + uint8_t FusMemorySizeFlash; /*< Multiple of 4K */ +}WirelessFwInfo_t; + + +/* Exported functions ------------------------------------------------------- */ + + /** + * SHCI_C2_FUS_GetState + * @brief Read the FUS State + * If the user is not interested by the Error code response, a null value may + * be passed as parameter + * + * Note: This command is fully supported only by the FUS. + * When the wireless firmware receives that command, it responds SHCI_FUS_CMD_NOT_SUPPORTED the first time. + * When the wireless firmware receives that command a second time, it reboots the full device with the FUS running on CPU2 + * + * @param p_rsp : return the error code when the FUS State Value = 0xFF + * @retval FUS State Values + */ + uint8_t SHCI_C2_FUS_GetState( SHCI_FUS_GetState_ErrorCode_t *p_rsp ); + + /** + * SHCI_C2_FUS_FwUpgrade + * @brief Request the FUS to install the CPU2 firmware update + * Note: This command is only supported by the FUS. + * + * @param fw_src_add: Address of the firmware image location + * @param fw_dest_add: Address of the firmware destination + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_FwUpgrade( uint32_t fw_src_add, uint32_t fw_dest_add ); + + /** + * SHCI_C2_FUS_FwDelete + * @brief Delete the wireless stack on CPU2 + * Note: This command is only supported by the FUS. + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_FwDelete( void ); + + /** + * SHCI_C2_FUS_UpdateAuthKey + * @brief Request the FUS to update the authentication key + * Note: This command is only supported by the FUS. + * + * @param pCmdPacket + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_UpdateAuthKey( SHCI_C2_FUS_UpdateAuthKey_Cmd_Param_t *pParam ); + + /** + * SHCI_C2_FUS_LockAuthKey + * @brief Request the FUS to prevent any future update of the authentication key + * Note: This command is only supported by the FUS. + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_LockAuthKey( void ); + + /** + * SHCI_C2_FUS_StoreUsrKey + * @brief Request the FUS to store the user key + * Note: This command is supported by both the FUS and the wireless stack. + * + * @param pParam : command parameter + * @param p_key_index : Index allocated by the FUS to the stored key + * + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_StoreUsrKey( SHCI_C2_FUS_StoreUsrKey_Cmd_Param_t *pParam, uint8_t *p_key_index ); + + /** + * SHCI_C2_FUS_LoadUsrKey + * @brief Request the FUS to load the user key into the AES + * Note: This command is supported by both the FUS and the wireless stack. + * + * @param key_index : index of the user key to load in AES1 + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_LoadUsrKey( uint8_t key_index ); + + /** + * SHCI_C2_FUS_StartWs + * @brief Request the FUS to reboot on the wireless stack + * Note: This command is only supported by the FUS. + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_StartWs( void ); + + /** + * SHCI_C2_FUS_LockUsrKey + * @brief Request the FUS to lock the user key so that it cannot be updated later on + * Note: This command is supported by both the FUS and the wireless stack. + * + * @param key_index : index of the user key to lock + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_LockUsrKey( uint8_t key_index ); + + /** + * SHCI_C2_FUS_UnloadUsrKey + * @brief Request the FUS to Unload the user key so that the CPU1 may use the AES with another Key + * Note: This command is supported by both the FUS and the wireless stack. + * + * @param key_index : index of the user key to unload + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_UnloadUsrKey( uint8_t key_index ); + + /** + * SHCI_C2_FUS_ActivateAntiRollback + * @brief Request the FUS to enable the AntiRollback feature so that it is not possible to update the wireless firmware + * with an older version than the current one. + * Note: + * - This command is only supported by the FUS. + * - Once this feature is enabled, it is not possible anymore to disable it. + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FUS_ActivateAntiRollback( void ); + + /** + * SHCI_C2_BLE_Init + * @brief Provides parameters and starts the BLE Stack + * + * @param pCmdPacket : Parameters are described SHCI_C2_Ble_Init_Cmd_Packet_t declaration + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_BLE_Init( SHCI_C2_Ble_Init_Cmd_Packet_t *pCmdPacket ); + + /** + * SHCI_C2_THREAD_Init + * @brief Starts the THREAD Stack + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_THREAD_Init( void ); + + /** + * SHCI_C2_LLDTESTS_Init + * @brief Starts the LLD tests CLI + * + * @param param_size : Nb of bytes + * @param p_param : pointer with data to give from M4 to M0 + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_LLDTESTS_Init( uint8_t param_size, uint8_t * p_param ); + + /** + * SHCI_C2_BLE_LLD_Init + * @brief Starts the LLD tests BLE + * + * @param param_size : Nb of bytes + * @param p_param : pointer with data to give from M4 to M0 + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_BLE_LLD_Init( uint8_t param_size, uint8_t * p_param ); + + /** + * SHCI_C2_ZIGBEE_Init + * @brief Starts the Zigbee Stack + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_ZIGBEE_Init( void ); + + /** + * SHCI_C2_DEBUG_Init + * @brief Starts the Traces + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_DEBUG_Init( SHCI_C2_DEBUG_Init_Cmd_Packet_t *pCmdPacket ); + + /** + * SHCI_C2_FLASH_EraseActivity + * @brief Provides the information of the start and the end of a flash erase window on the CPU1 + * The protection will be active until next end of radio event. + * + * @param erase_activity: Start/End of erase activity + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FLASH_EraseActivity( SHCI_EraseActivity_t erase_activity ); + + /** + * SHCI_C2_CONCURRENT_SetMode + * @brief Enable/Disable Thread on CPU2 (M0+) + * + * @param Mode: BLE or Thread enable flag + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_CONCURRENT_SetMode( SHCI_C2_CONCURRENT_Mode_Param_t Mode ); + + /** + * SHCI_C2_CONCURRENT_GetNextBleEvtTime + * @brief Get the next BLE event date (relative time) + * + * @param Command Packet + * @retval None + */ + SHCI_CmdStatus_t SHCI_C2_CONCURRENT_GetNextBleEvtTime( SHCI_C2_CONCURRENT_GetNextBleEvtTime_Param_t *pParam ); + + /** + * SHCI_C2_CONCURRENT_EnableNext_802154_EvtNotification + * @brief Activate the next 802.15.4 event notification (one shot) + * + * @param None + * @retval None + */ + SHCI_CmdStatus_t SHCI_C2_CONCURRENT_EnableNext_802154_EvtNotification( void ); + + /** + * SHCI_C2_FLASH_StoreData + * @brief Store Data in Flash + * + * @param Ip: BLE or THREAD + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FLASH_StoreData( SHCI_C2_FLASH_Ip_t Ip ); + + /** + * SHCI_C2_FLASH_EraseData + * @brief Erase Data in Flash + * + * @param Ip: BLE or THREAD + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_FLASH_EraseData( SHCI_C2_FLASH_Ip_t Ip ); + + /** + * SHCI_C2_RADIO_AllowLowPower + * @brief Allow or forbid IP_radio (802_15_4 or BLE) to enter in low power mode. + * + * @param Ip: BLE or 802_15_5 + * @param FlagRadioLowPowerOn: True or false + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_RADIO_AllowLowPower( SHCI_C2_FLASH_Ip_t Ip,uint8_t FlagRadioLowPowerOn); + + + /** + * SHCI_C2_MAC_802_15_4_Init + * @brief Starts the MAC 802.15.4 on M0 + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_MAC_802_15_4_Init( void ); + + /** + * SHCI_GetWirelessFwInfo + * @brief This function read back the information relative to the wireless binary loaded. + * Refer yourself to MB_WirelessFwInfoTable_t structure to get the significance + * of the different parameters returned. + * @param pWirelessInfo : Pointer to WirelessFwInfo_t. + * + * @retval SHCI_Success + */ + SHCI_CmdStatus_t SHCI_GetWirelessFwInfo( WirelessFwInfo_t* pWirelessInfo ); + + /** + * SHCI_C2_Reinit + * @brief This is required to allow the CPU1 to fake a set C2BOOT when it has already been set. + * In order to fake a C2BOOT, the CPU1 shall : + * - Send SHCI_C2_Reinit() + * - call SEV instruction + * WARNING: + * This function is intended to be used by the SBSFU + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_Reinit( void ); + + /** + * SHCI_C2_ExtpaConfig + * @brief Send the Ext PA configuration + * When the CPU2 receives the command, it controls the Ext PA as requested by the configuration + * This configures only which IO is used to enable/disable the ExtPA and the associated polarity + * This command has no effect on the other IO that is used to control the mode of the Ext PA (Rx/Tx) + * + * @param gpio_port: GPIOx where x can be (A..F) to select the GPIO peripheral for STM32WBxx family + * @param gpio_pin_number: This parameter can be one of GPIO_PIN_x (= LL_GPIO_PIN_x) where x can be (0..15). + * @param gpio_polarity: This parameter can be either + * - EXT_PA_ENABLED_LOW: ExtPA is enabled when GPIO is low + * - EXT_PA_ENABLED_HIGH: ExtPA is enabled when GPIO is high + * @param gpio_status: This parameter can be either + * - EXT_PA_DISABLED: Stop driving the ExtPA + * - EXT_PA_ENABLED: Drive the ExtPA according to radio activity + * (ON before the Event and OFF at the end of the event) + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_ExtpaConfig(uint32_t gpio_port, uint16_t gpio_pin_number, uint8_t gpio_polarity, uint8_t gpio_status); + + /** + * SHCI_C2_SetFlashActivityControl + * @brief Set the mechanism to be used on CPU2 to prevent the CPU1 to either write or erase in flash + * + * @param Source: It can be one of the following list + * - FLASH_ACTIVITY_CONTROL_PES : The CPU2 set the PES bit to prevent the CPU1 to either read or write in flash + * - FLASH_ACTIVITY_CONTROL_SEM7 : The CPU2 gets the semaphore 7 to prevent the CPU1 to either read or write in flash. + * This requires the CPU1 to first get semaphore 7 before erasing or writing the flash. + * + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_SetFlashActivityControl(SHCI_C2_SET_FLASH_ACTIVITY_CONTROL_Source_t Source); + + /** + * SHCI_C2_Config + * @brief Send the system configuration to the CPU2 + * + * @param pCmdPacket: address of the buffer holding following parameters + * uint8_t PayloadCmdSize : Size of the payload - shall be SHCI_C2_CONFIG_PAYLOAD_CMD_SIZE + * uint8_t Config1 : + * - bit0 : 0 - BLE NVM Data data are flushed in internal secure flash + * 1 - BLE NVM Data are written in SRAM cache pointed by BleNvmRamAddress + * - bit1 : 0 - THREAD NVM Data data are flushed in internal secure flash + * 1 - THREAD NVM Data are written in SRAM cache pointed by ThreadNvmRamAddress + * - bit2 : 0 - Thread EUI64 is set to new (and current) format + * 1 - Thread EUI64 is set to old format + * - bit3 to bit7 : Unused, shall be set to 0 + * uint8_t EvtMask1 : + * When a bit is set to 0, the event is not reported + * bit0 : Asynchronous Event with Sub Evt Code 0x9201 (= SHCI_SUB_EVT_ERROR_NOTIF) + * ... + * bit31 : Asynchronous Event with Sub Evt Code 0x9220 + * uint8_t Spare1 : Unused, shall be set to 0 + * uint32_t BleNvmRamAddress : + * Only considered when Config1.bit0 = 1 + * When set to 0, data are kept in internal SRAM on CPU2 + * Otherwise, data are copied in the cache pointed by BleNvmRamAddress + * The size of the buffer shall be BLE_NVM_SRAM_SIZE (number of 32bits) + * The buffer shall be allocated in SRAM2 + * uint32_t ThreadNvmRamAddress : + * Only considered when Config1.bit1 = 1 + * When set to 0, data are kept in internal SRAM on CPU2 + * Otherwise, data are copied in the cache pointed by ThreadNvmRamAddress + * The size of the buffer shall be THREAD_NVM_SRAM_SIZE (number of 32bits) + * The buffer shall be allocated in SRAM1 + * + * Please check macro definition to be used for this function + * They are defined in this file next to the definition of SHCI_OPCODE_C2_CONFIG + * + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_Config(SHCI_C2_CONFIG_Cmd_Param_t *pCmdPacket); + + /** + * SHCI_C2_802_15_4_DeInit + * @brief Deinit 802.15.4 layer (to be used before entering StandBy mode) + * + * @param None + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_802_15_4_DeInit( void ); + + /** + * SHCI_C2_SetSystemClock + * @brief Request CPU2 to change system clock + * + * @param clockSel: It can be one of the following list + * - SET_SYSTEM_CLOCK_HSE_TO_PLL : CPU2 set system clock to PLL, PLL must be configured and started before. + * - SET_SYSTEM_CLOCK_PLL_ON_TO_HSE : CPU2 set System clock to HSE, PLL is still ON after command execution. + * - SET_SYSTEM_CLOCK_PLL_OFF_TO_HSE : CPU2 set System clock to HSE, PLL is turned OFF after command execution. + * + * @retval Status + */ + SHCI_CmdStatus_t SHCI_C2_SetSystemClock( SHCI_C2_SET_SYSTEM_CLOCK_Cmd_Param_t clockSel ); + + +#ifdef __cplusplus +} +#endif + +#endif /*__SHCI_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c new file mode 100644 index 0000000..2786e14 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.c @@ -0,0 +1,308 @@ +/** + ****************************************************************************** + * @file hci_tl.c + * @author MCD Application Team + * @brief Function for managing HCI interface. + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Includes ------------------------------------------------------------------*/ +#include "ble_common.h" +#include "ble_const.h" + +#include "stm_list.h" +#include "tl.h" +#include "hci_tl.h" + +/* Private typedef -----------------------------------------------------------*/ +typedef enum +{ + HCI_TL_CMD_RESP_RELEASE, + HCI_TL_CMD_RESP_WAIT, +} HCI_TL_CmdRespStatus_t; + +/* Private defines -----------------------------------------------------------*/ + +/** + * The default HCI layer timeout is set to 33s + */ +#define HCI_TL_DEFAULT_TIMEOUT (33000) + +/* Private macros ------------------------------------------------------------*/ +/* Public variables ---------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/** + * START of Section BLE_DRIVER_CONTEXT + */ +PLACE_IN_SECTION("BLE_DRIVER_CONTEXT") static volatile uint8_t hci_timer_id; +PLACE_IN_SECTION("BLE_DRIVER_CONTEXT") static tListNode HciAsynchEventQueue; +PLACE_IN_SECTION("BLE_DRIVER_CONTEXT") static TL_CmdPacket_t *pCmdBuffer; +PLACE_IN_SECTION("BLE_DRIVER_CONTEXT") HCI_TL_UserEventFlowStatus_t UserEventFlow; +/** + * END of Section BLE_DRIVER_CONTEXT + */ + +static tHciContext hciContext; +static tListNode HciCmdEventQueue; +static void (* StatusNotCallBackFunction) (HCI_TL_CmdStatus_t status); +static volatile HCI_TL_CmdRespStatus_t CmdRspStatusFlag; + +/* Private function prototypes -----------------------------------------------*/ +static void NotifyCmdStatus(HCI_TL_CmdStatus_t hcicmdstatus); +static void SendCmd(uint16_t opcode, uint8_t plen, void *param); +static void TlEvtReceived(TL_EvtPacket_t *hcievt); +static void TlInit( TL_CmdPacket_t * p_cmdbuffer ); + +/* Interface ------- ---------------------------------------------------------*/ +void hci_init(void(* UserEvtRx)(void* pData), void* pConf) +{ + StatusNotCallBackFunction = ((HCI_TL_HciInitConf_t *)pConf)->StatusNotCallBack; + hciContext.UserEvtRx = UserEvtRx; + + hci_register_io_bus (&hciContext.io); + + TlInit((TL_CmdPacket_t *)(((HCI_TL_HciInitConf_t *)pConf)->p_cmdbuffer)); + + return; +} + +void hci_user_evt_proc(void) +{ + TL_EvtPacket_t *phcievtbuffer; + tHCI_UserEvtRxParam UserEvtRxParam; + + /** + * Up to release version v1.2.0, a while loop was implemented to read out events from the queue as long as + * it is not empty. However, in a bare metal implementation, this leads to calling in a "blocking" mode + * hci_user_evt_proc() as long as events are received without giving the opportunity to run other tasks + * in the background. + * From now, the events are reported one by one. When it is checked there is still an event pending in the queue, + * a request to the user is made to call again hci_user_evt_proc(). + * This gives the opportunity to the application to run other background tasks between each event. + */ + + /** + * It is more secure to use LST_remove_head()/LST_insert_head() compare to LST_get_next_node()/LST_remove_node() + * in case the user overwrite the header where the next/prev pointers are located + */ + + if((LST_is_empty(&HciAsynchEventQueue) == FALSE) && (UserEventFlow != HCI_TL_UserEventFlow_Disable)) + { + LST_remove_head ( &HciAsynchEventQueue, (tListNode **)&phcievtbuffer ); + + if (hciContext.UserEvtRx != NULL) + { + UserEvtRxParam.pckt = phcievtbuffer; + UserEvtRxParam.status = HCI_TL_UserEventFlow_Enable; + hciContext.UserEvtRx((void *)&UserEvtRxParam); + UserEventFlow = UserEvtRxParam.status; + } + else + { + UserEventFlow = HCI_TL_UserEventFlow_Enable; + } + + if(UserEventFlow != HCI_TL_UserEventFlow_Disable) + { + TL_MM_EvtDone( phcievtbuffer ); + } + else + { + /** + * put back the event in the queue + */ + LST_insert_head ( &HciAsynchEventQueue, (tListNode *)phcievtbuffer ); + } + } + + if((LST_is_empty(&HciAsynchEventQueue) == FALSE) && (UserEventFlow != HCI_TL_UserEventFlow_Disable)) + { + hci_notify_asynch_evt((void*) &HciAsynchEventQueue); + } + + + return; +} + +void hci_resume_flow( void ) +{ + UserEventFlow = HCI_TL_UserEventFlow_Enable; + + /** + * It is better to go through the background process as it is not sure from which context this API may + * be called + */ + hci_notify_asynch_evt((void*) &HciAsynchEventQueue); + + return; +} + +int hci_send_req(struct hci_request *p_cmd, uint8_t async) +{ + (void)(async); + uint16_t opcode; + TL_CcEvt_t *pcommand_complete_event; + TL_CsEvt_t *pcommand_status_event; + TL_EvtPacket_t *pevtpacket; + uint8_t hci_cmd_complete_return_parameters_length; + HCI_TL_CmdStatus_t local_cmd_status; + + NotifyCmdStatus(HCI_TL_CmdBusy); + local_cmd_status = HCI_TL_CmdBusy; + opcode = ((p_cmd->ocf) & 0x03ff) | ((p_cmd->ogf) << 10); + + CmdRspStatusFlag = HCI_TL_CMD_RESP_WAIT; + SendCmd(opcode, p_cmd->clen, p_cmd->cparam); + + while(local_cmd_status == HCI_TL_CmdBusy) + { + hci_cmd_resp_wait(HCI_TL_DEFAULT_TIMEOUT); + + /** + * Process Cmd Event + */ + while(LST_is_empty(&HciCmdEventQueue) == FALSE) + { + LST_remove_head (&HciCmdEventQueue, (tListNode **)&pevtpacket); + + if(pevtpacket->evtserial.evt.evtcode == TL_BLEEVT_CS_OPCODE) + { + pcommand_status_event = (TL_CsEvt_t*)pevtpacket->evtserial.evt.payload; + if(pcommand_status_event->cmdcode == opcode) + { + *(uint8_t *)(p_cmd->rparam) = pcommand_status_event->status; + } + + if(pcommand_status_event->numcmd != 0) + { + local_cmd_status = HCI_TL_CmdAvailable; + } + } + else + { + pcommand_complete_event = (TL_CcEvt_t*)pevtpacket->evtserial.evt.payload; + + if(pcommand_complete_event->cmdcode == opcode) + { + hci_cmd_complete_return_parameters_length = pevtpacket->evtserial.evt.plen - TL_EVT_HDR_SIZE; + p_cmd->rlen = MIN(hci_cmd_complete_return_parameters_length, p_cmd->rlen); + memcpy(p_cmd->rparam, pcommand_complete_event->payload, p_cmd->rlen); + } + + if(pcommand_complete_event->numcmd != 0) + { + local_cmd_status = HCI_TL_CmdAvailable; + } + } + } + } + + NotifyCmdStatus(HCI_TL_CmdAvailable); + + return 0; +} + +/* Private functions ---------------------------------------------------------*/ +static void TlInit( TL_CmdPacket_t * p_cmdbuffer ) +{ + TL_BLE_InitConf_t Conf; + + /** + * Always initialize the command event queue + */ + LST_init_head (&HciCmdEventQueue); + + pCmdBuffer = p_cmdbuffer; + + LST_init_head (&HciAsynchEventQueue); + + UserEventFlow = HCI_TL_UserEventFlow_Enable; + + /* Initialize low level driver */ + if (hciContext.io.Init) + { + + Conf.p_cmdbuffer = (uint8_t *)p_cmdbuffer; + Conf.IoBusEvtCallBack = TlEvtReceived; + hciContext.io.Init(&Conf); + } + + return; +} + +static void SendCmd(uint16_t opcode, uint8_t plen, void *param) +{ + pCmdBuffer->cmdserial.cmd.cmdcode = opcode; + pCmdBuffer->cmdserial.cmd.plen = plen; + memcpy( pCmdBuffer->cmdserial.cmd.payload, param, plen ); + + hciContext.io.Send(0,0); + + return; +} + +static void NotifyCmdStatus(HCI_TL_CmdStatus_t hcicmdstatus) +{ + if(hcicmdstatus == HCI_TL_CmdBusy) + { + if(StatusNotCallBackFunction != 0) + { + StatusNotCallBackFunction(HCI_TL_CmdBusy); + } + } + else + { + if(StatusNotCallBackFunction != 0) + { + StatusNotCallBackFunction(HCI_TL_CmdAvailable); + } + } + + return; +} + +static void TlEvtReceived(TL_EvtPacket_t *hcievt) +{ + if ( ((hcievt->evtserial.evt.evtcode) == TL_BLEEVT_CS_OPCODE) || ((hcievt->evtserial.evt.evtcode) == TL_BLEEVT_CC_OPCODE ) ) + { + LST_insert_tail(&HciCmdEventQueue, (tListNode *)hcievt); + hci_cmd_resp_release(0); /**< Notify the application a full Cmd Event has been received */ + } + else + { + LST_insert_tail(&HciAsynchEventQueue, (tListNode *)hcievt); + hci_notify_asynch_evt((void*) &HciAsynchEventQueue); /**< Notify the application a full HCI event has been received */ + } + + return; +} + +/* Weak implementation ----------------------------------------------------------------*/ +__WEAK void hci_cmd_resp_wait(uint32_t timeout) +{ + (void)timeout; + + while(CmdRspStatusFlag != HCI_TL_CMD_RESP_RELEASE); + + return; +} + +__WEAK void hci_cmd_resp_release(uint32_t flag) +{ + (void)flag; + + CmdRspStatusFlag = HCI_TL_CMD_RESP_RELEASE; + + return; +} diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h new file mode 100644 index 0000000..c43c9e0 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl.h @@ -0,0 +1,196 @@ +/** + ****************************************************************************** + * @file hci_tl.h + * @author MCD Application Team + * @brief Constants and functions for HCI layer. See Bluetooth Core + * v 4.0, Vol. 2, Part E. + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +#ifndef __HCI_TL_H_ +#define __HCI_TL_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "stm32_wpan_common.h" +#include "tl.h" + +/* Exported defines -----------------------------------------------------------*/ +typedef enum +{ + HCI_TL_UserEventFlow_Disable, + HCI_TL_UserEventFlow_Enable, +} HCI_TL_UserEventFlowStatus_t; + +typedef enum +{ + HCI_TL_CmdBusy, + HCI_TL_CmdAvailable +} HCI_TL_CmdStatus_t; + +/** + * @brief Structure used to manage the BUS IO operations. + * All the structure fields will point to functions defined at user level. + * @{ + */ +typedef struct +{ + int32_t (* Init) (void* pConf); /**< Pointer to HCI TL function for the IO Bus initialization */ + int32_t (* DeInit) (void); /**< Pointer to HCI TL function for the IO Bus de-initialization */ + int32_t (* Reset) (void); /**< Pointer to HCI TL function for the IO Bus reset */ + int32_t (* Receive) (uint8_t*, uint16_t); /**< Pointer to HCI TL function for the IO Bus data reception */ + int32_t (* Send) (uint8_t*, uint16_t); /**< Pointer to HCI TL function for the IO Bus data transmission */ + int32_t (* DataAck) (uint8_t*, uint16_t* len); /**< Pointer to HCI TL function for the IO Bus data ack reception */ + int32_t (* GetTick) (void); /**< Pointer to BSP function for getting the HAL time base timestamp */ +} tHciIO; +/** + * @} + */ + +/** + * @brief Contain the HCI context + * @{ + */ +typedef struct +{ + tHciIO io; /**< Manage the BUS IO operations */ + void (* UserEvtRx) (void * pData); /**< ACI events callback function pointer */ +} tHciContext; + +typedef struct +{ + HCI_TL_UserEventFlowStatus_t status; + TL_EvtPacket_t *pckt; +} tHCI_UserEvtRxParam; + +typedef struct +{ + uint8_t *p_cmdbuffer; + void (* StatusNotCallBack) (HCI_TL_CmdStatus_t status); +} HCI_TL_HciInitConf_t; + +/** + * @brief Register IO bus services. + * @param fops The HCI IO structure managing the IO BUS + * @retval None + */ +void hci_register_io_bus(tHciIO* fops); + +/** + * @brief This callback is called from either + * - IPCC RX interrupt context + * - hci_user_evt_proc() context. + * - hci_resume_flow() context + * It requests hci_user_evt_proc() to be executed. + * + * @param pdata Packet or event pointer + * @retval None + */ +void hci_notify_asynch_evt(void* pdata); + +/** + * @brief This function resume the User Event Flow which has been stopped on return + * from UserEvtRx() when the User Event has not been processed. + * + * @param None + * @retval None + */ +void hci_resume_flow(void); + + +/** + * @brief This function is called when an ACI/HCI command is sent to the CPU2 and the response is waited. + * It is called from the same context the HCI command has been sent. + * It shall not return until the command response notified by hci_cmd_resp_release() is received. + * A weak implementation is available in hci_tl.c based on polling mechanism + * The user may re-implement this function in the application to improve performance : + * - It may use UTIL_SEQ_WaitEvt() API when using the Sequencer + * - It may use a semaphore when using cmsis_os interface + * + * @param timeout: Waiting timeout + * @retval None + */ +void hci_cmd_resp_wait(uint32_t timeout); + +/** + * @brief This function is called when an ACI/HCI command response is received from the CPU2. + * A weak implementation is available in hci_tl.c based on polling mechanism + * The user may re-implement this function in the application to improve performance : + * - It may use UTIL_SEQ_SetEvt() API when using the Sequencer + * - It may use a semaphore when using cmsis_os interface + * + * @param flag: Release flag + * @retval None + */ +void hci_cmd_resp_release(uint32_t flag); + + + +/** + * END OF SECTION - FUNCTIONS TO BE IMPLEMENTED BY THE APPLICATION + ********************************************************************************************************************* + */ + + +/** + ********************************************************************************************************************* + * START OF SECTION - PROCESS TO BE CALLED BY THE SCHEDULER + */ + +/** + * @brief This process shall be called by the scheduler each time it is requested with hci_notify_asynch_evt() + * This process may send an ACI/HCI command when the svc_ctl.c module is used + * + * @param None + * @retval None + */ + +void hci_user_evt_proc(void); + +/** + * END OF SECTION - PROCESS TO BE CALLED BY THE SCHEDULER + ********************************************************************************************************************* + */ + + +/** + ********************************************************************************************************************* + * START OF SECTION - INTERFACES USED BY THE BLE DRIVER + */ + +/** + * @brief Initialize the Host Controller Interface. + * This function must be called before any data can be received + * from BLE controller. + * + * @param pData: ACI events callback function pointer + * This callback is triggered when an user event is received from + * the BLE core device. + * @param pConf: Configuration structure pointer + * @retval None + */ +void hci_init(void(* UserEvtRx)(void* pData), void* pConf); + +/** + * END OF SECTION - INTERFACES USED BY THE BLE DRIVER + ********************************************************************************************************************* + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __TL_BLE_HCI_H_ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c new file mode 100644 index 0000000..8e57045 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/hci_tl_if.c @@ -0,0 +1,30 @@ +/** + ****************************************************************************** + * @file hci_tl_if.c + * @author MCD Application Team + * @brief Transport layer interface to BLE + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + +#include "hci_tl.h" +#include "tl.h" + + +void hci_register_io_bus(tHciIO* fops) +{ + /* Register IO bus services */ + fops->Init = TL_BLE_Init; + fops->Send = TL_BLE_SendCmd; + + return; +} diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h new file mode 100644 index 0000000..68b71f9 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/mbox_def.h @@ -0,0 +1,280 @@ +/** + ****************************************************************************** + * @file mbox_def.h + * @author MCD Application Team + * @brief Mailbox definition + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MBOX_H +#define __MBOX_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "stm32_wpan_common.h" + + /** + * This file shall be identical between the CPU1 and the CPU2 + */ + + /** + ********************************************************************************* + * TABLES + ********************************************************************************* + */ + + /** + * Version + * [0:3] = Build - 0: Untracked - 15:Released - x: Tracked version + * [4:7] = branch - 0: Mass Market - x: ... + * [8:15] = Subversion + * [16:23] = Version minor + * [24:31] = Version major + * + * Memory Size + * [0:7] = Flash ( Number of 4k sector) + * [8:15] = Reserved ( Shall be set to 0 - may be used as flash extension ) + * [16:23] = SRAM2b ( Number of 1k sector) + * [24:31] = SRAM2a ( Number of 1k sector) + */ + typedef PACKED_STRUCT + { + uint32_t Version; + } MB_SafeBootInfoTable_t; + + typedef PACKED_STRUCT + { + uint32_t Version; + uint32_t MemorySize; + uint32_t FusInfo; + } MB_FusInfoTable_t; + + typedef PACKED_STRUCT + { + uint32_t Version; + uint32_t MemorySize; + uint32_t InfoStack; + uint32_t Reserved; + } MB_WirelessFwInfoTable_t; + + typedef struct + { + MB_SafeBootInfoTable_t SafeBootInfoTable; + MB_FusInfoTable_t FusInfoTable; + MB_WirelessFwInfoTable_t WirelessFwInfoTable; + } MB_DeviceInfoTable_t; + + typedef struct + { + uint8_t *pcmd_buffer; + uint8_t *pcs_buffer; + uint8_t *pevt_queue; + uint8_t *phci_acl_data_buffer; + } MB_BleTable_t; + + typedef struct + { + uint8_t *notack_buffer; + uint8_t *clicmdrsp_buffer; + uint8_t *otcmdrsp_buffer; + uint8_t *clinot_buffer; + } MB_ThreadTable_t; + + typedef struct + { + uint8_t *clicmdrsp_buffer; + uint8_t *m0cmd_buffer; + } MB_LldTestsTable_t; + + typedef struct + { + uint8_t *cmdrsp_buffer; + uint8_t *m0cmd_buffer; + } MB_BleLldTable_t; + + typedef struct + { + uint8_t *notifM0toM4_buffer; + uint8_t *appliCmdM4toM0_buffer; + uint8_t *requestM0toM4_buffer; + } MB_ZigbeeTable_t; + /** + * msg + * [0:7] = cmd/evt + * [8:31] = Reserved + */ + typedef struct + { + uint8_t *pcmd_buffer; + uint8_t *sys_queue; + } MB_SysTable_t; + + typedef struct + { + uint8_t *spare_ble_buffer; + uint8_t *spare_sys_buffer; + uint8_t *blepool; + uint32_t blepoolsize; + uint8_t *pevt_free_buffer_queue; + uint8_t *traces_evt_pool; + uint32_t tracespoolsize; + } MB_MemManagerTable_t; + + typedef struct + { + uint8_t *traces_queue; + } MB_TracesTable_t; + + typedef struct + { + uint8_t *p_cmdrsp_buffer; + uint8_t *p_notack_buffer; + uint8_t *evt_queue; + } MB_Mac_802_15_4_t; + + typedef struct + { + MB_DeviceInfoTable_t *p_device_info_table; + MB_BleTable_t *p_ble_table; + MB_ThreadTable_t *p_thread_table; + MB_SysTable_t *p_sys_table; + MB_MemManagerTable_t *p_mem_manager_table; + MB_TracesTable_t *p_traces_table; + MB_Mac_802_15_4_t *p_mac_802_15_4_table; + MB_ZigbeeTable_t *p_zigbee_table; + MB_LldTestsTable_t *p_lld_tests_table; + MB_BleLldTable_t *p_ble_lld_table; +} MB_RefTable_t; + +/** + * This table shall be used only in the case the CPU2 runs the FUS. + * It is used by the command SHCI_GetWirelessFwInfo() + */ +typedef struct +{ + uint32_t DeviceInfoTableState; + uint8_t Reserved1; + uint8_t LastFusActiveState; + uint8_t LastWirelessStackState; + uint8_t CurrentWirelessStackType; + uint32_t SafeBootVersion; + uint32_t FusVersion; + uint32_t FusMemorySize; + uint32_t WirelessStackVersion; + uint32_t WirelessStackMemorySize; + uint32_t WirelessFirmwareBleInfo; + uint32_t WirelessFirmwareThreadInfo; + uint32_t Reserved2; + uint64_t UID64; + uint16_t DeviceId; +} MB_FUS_DeviceInfoTable_t ; + +#ifdef __cplusplus +} +#endif + +/** + ********************************************************************************* + * IPCC CHANNELS + ********************************************************************************* + */ + +/* CPU1 CPU2 + * | (SYSTEM) | + * |----HW_IPCC_SYSTEM_CMD_RSP_CHANNEL-------------->| + * | | + * |<---HW_IPCC_SYSTEM_EVENT_CHANNEL-----------------| + * | | + * | (ZIGBEE) | + * |----HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL------------>| + * | | + * |----HW_IPCC_ZIGBEE_CMD_CLI_CHANNEL-------------->| + * | | + * |<---HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL-------| + * | | + * |<---HW_IPCC_ZIGBEE_CLI_NOTIF_ACK_CHANNEL---------| + * | | + * | (THREAD) | + * |----HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL----------->| + * | | + * |----HW_IPCC_THREAD_CLI_CMD_CHANNEL-------------->| + * | | + * |<---HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL------| + * | | + * |<---HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL--| + * | | + * | (BLE) | + * |----HW_IPCC_BLE_CMD_CHANNEL--------------------->| + * | | + * |----HW_IPCC_HCI_ACL_DATA_CHANNEL---------------->| + * | | + * |<---HW_IPCC_BLE_EVENT_CHANNEL--------------------| + * | | + * | (BLE LLD) | + * |----HW_IPCC_BLE_LLD_CMD_CHANNEL----------------->| + * | | + * |<---HW_IPCC_BLE_LLD_RSP_CHANNEL------------------| + * | | + * |<---HW_IPCC_BLE_LLD_M0_CMD_CHANNEL---------------| + * | | + * | (MAC) | + * |----HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL-------->| + * | | + * |<---HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL| + * | | + * | (BUFFER) | + * |----HW_IPCC_MM_RELEASE_BUFFER_CHANNE------------>| + * | | + * | (TRACE) | + * |<----HW_IPCC_TRACES_CHANNEL----------------------| + * | | + * + * + * + */ + + + +/** CPU1 */ +#define HW_IPCC_BLE_CMD_CHANNEL LL_IPCC_CHANNEL_1 +#define HW_IPCC_SYSTEM_CMD_RSP_CHANNEL LL_IPCC_CHANNEL_2 +#define HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL LL_IPCC_CHANNEL_3 +#define HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL LL_IPCC_CHANNEL_3 +#define HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL LL_IPCC_CHANNEL_3 +#define HW_IPCC_MM_RELEASE_BUFFER_CHANNEL LL_IPCC_CHANNEL_4 +#define HW_IPCC_THREAD_CLI_CMD_CHANNEL LL_IPCC_CHANNEL_5 +#define HW_IPCC_LLDTESTS_CLI_CMD_CHANNEL LL_IPCC_CHANNEL_5 +#define HW_IPCC_BLE_LLD_CLI_CMD_CHANNEL LL_IPCC_CHANNEL_5 +#define HW_IPCC_BLE_LLD_CMD_CHANNEL LL_IPCC_CHANNEL_5 +#define HW_IPCC_HCI_ACL_DATA_CHANNEL LL_IPCC_CHANNEL_6 + +/** CPU2 */ +#define HW_IPCC_BLE_EVENT_CHANNEL LL_IPCC_CHANNEL_1 +#define HW_IPCC_SYSTEM_EVENT_CHANNEL LL_IPCC_CHANNEL_2 +#define HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL LL_IPCC_CHANNEL_3 +#define HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL LL_IPCC_CHANNEL_3 +#define HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL LL_IPCC_CHANNEL_3 +#define HW_IPCC_LLDTESTS_M0_CMD_CHANNEL LL_IPCC_CHANNEL_3 +#define HW_IPCC_BLE_LLD_M0_CMD_CHANNEL LL_IPCC_CHANNEL_3 +#define HW_IPCC_TRACES_CHANNEL LL_IPCC_CHANNEL_4 +#define HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL LL_IPCC_CHANNEL_5 +#define HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL LL_IPCC_CHANNEL_5 +#define HW_IPCC_BLE_LLD_CLI_RSP_CHANNEL LL_IPCC_CHANNEL_5 +#define HW_IPCC_BLE_LLD_RSP_CHANNEL LL_IPCC_CHANNEL_5 +#define HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL LL_IPCC_CHANNEL_5 +#endif /*__MBOX_H */ + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c new file mode 100644 index 0000000..0936f32 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.c @@ -0,0 +1,254 @@ +/** + ****************************************************************************** + * @file shci.c + * @author MCD Application Team + * @brief System HCI command implementation + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Includes ------------------------------------------------------------------*/ +#include "stm32_wpan_common.h" + +#include "stm_list.h" +#include "shci_tl.h" + +/* Private typedef -----------------------------------------------------------*/ +typedef enum +{ + SHCI_TL_CMD_RESP_RELEASE, + SHCI_TL_CMD_RESP_WAIT, +} SHCI_TL_CmdRespStatus_t; + +/* Private defines -----------------------------------------------------------*/ +/** + * The default System HCI layer timeout is set to 33s + */ +#define SHCI_TL_DEFAULT_TIMEOUT (33000) + +/* Private macros ------------------------------------------------------------*/ +/* Public variables ---------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/** + * START of Section SYSTEM_DRIVER_CONTEXT + */ +PLACE_IN_SECTION("SYSTEM_DRIVER_CONTEXT") static tListNode SHciAsynchEventQueue; +PLACE_IN_SECTION("SYSTEM_DRIVER_CONTEXT") static volatile SHCI_TL_CmdStatus_t SHCICmdStatus; +PLACE_IN_SECTION("SYSTEM_DRIVER_CONTEXT") static TL_CmdPacket_t *pCmdBuffer; +PLACE_IN_SECTION("SYSTEM_DRIVER_CONTEXT") SHCI_TL_UserEventFlowStatus_t SHCI_TL_UserEventFlow; +/** + * END of Section SYSTEM_DRIVER_CONTEXT + */ + +static tSHciContext shciContext; +static void (* StatusNotCallBackFunction) (SHCI_TL_CmdStatus_t status); + +static volatile SHCI_TL_CmdRespStatus_t CmdRspStatusFlag; + +/* Private function prototypes -----------------------------------------------*/ +static void Cmd_SetStatus(SHCI_TL_CmdStatus_t shcicmdstatus); +static void TlCmdEvtReceived(TL_EvtPacket_t *shcievt); +static void TlUserEvtReceived(TL_EvtPacket_t *shcievt); +static void TlInit( TL_CmdPacket_t * p_cmdbuffer ); + +/* Interface ------- ---------------------------------------------------------*/ +void shci_init(void(* UserEvtRx)(void* pData), void* pConf) +{ + StatusNotCallBackFunction = ((SHCI_TL_HciInitConf_t *)pConf)->StatusNotCallBack; + shciContext.UserEvtRx = UserEvtRx; + + shci_register_io_bus (&shciContext.io); + + TlInit((TL_CmdPacket_t *)(((SHCI_TL_HciInitConf_t *)pConf)->p_cmdbuffer)); + + return; +} + +void shci_user_evt_proc(void) +{ + TL_EvtPacket_t *phcievtbuffer; + tSHCI_UserEvtRxParam UserEvtRxParam; + + /** + * Up to release version v1.2.0, a while loop was implemented to read out events from the queue as long as + * it is not empty. However, in a bare metal implementation, this leads to calling in a "blocking" mode + * shci_user_evt_proc() as long as events are received without giving the opportunity to run other tasks + * in the background. + * From now, the events are reported one by one. When it is checked there is still an event pending in the queue, + * a request to the user is made to call again shci_user_evt_proc(). + * This gives the opportunity to the application to run other background tasks between each event. + */ + + /** + * It is more secure to use LST_remove_head()/LST_insert_head() compare to LST_get_next_node()/LST_remove_node() + * in case the user overwrite the header where the next/prev pointers are located + */ + if((LST_is_empty(&SHciAsynchEventQueue) == FALSE) && (SHCI_TL_UserEventFlow != SHCI_TL_UserEventFlow_Disable)) + { + LST_remove_head ( &SHciAsynchEventQueue, (tListNode **)&phcievtbuffer ); + + if (shciContext.UserEvtRx != NULL) + { + UserEvtRxParam.pckt = phcievtbuffer; + UserEvtRxParam.status = SHCI_TL_UserEventFlow_Enable; + shciContext.UserEvtRx((void *)&UserEvtRxParam); + SHCI_TL_UserEventFlow = UserEvtRxParam.status; + } + else + { + SHCI_TL_UserEventFlow = SHCI_TL_UserEventFlow_Enable; + } + + if(SHCI_TL_UserEventFlow != SHCI_TL_UserEventFlow_Disable) + { + TL_MM_EvtDone( phcievtbuffer ); + } + else + { + /** + * put back the event in the queue + */ + LST_insert_head ( &SHciAsynchEventQueue, (tListNode *)phcievtbuffer ); + } + } + + if((LST_is_empty(&SHciAsynchEventQueue) == FALSE) && (SHCI_TL_UserEventFlow != SHCI_TL_UserEventFlow_Disable)) + { + shci_notify_asynch_evt((void*) &SHciAsynchEventQueue); + } + + + return; +} + +void shci_resume_flow( void ) +{ + SHCI_TL_UserEventFlow = SHCI_TL_UserEventFlow_Enable; + + /** + * It is better to go through the background process as it is not sure from which context this API may + * be called + */ + shci_notify_asynch_evt((void*) &SHciAsynchEventQueue); + + return; +} + +void shci_send( uint16_t cmd_code, uint8_t len_cmd_payload, uint8_t * p_cmd_payload, TL_EvtPacket_t * p_rsp ) +{ + Cmd_SetStatus(SHCI_TL_CmdBusy); + + pCmdBuffer->cmdserial.cmd.cmdcode = cmd_code; + pCmdBuffer->cmdserial.cmd.plen = len_cmd_payload; + + memcpy(pCmdBuffer->cmdserial.cmd.payload, p_cmd_payload, len_cmd_payload ); + CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT; + shciContext.io.Send(0,0); + + shci_cmd_resp_wait(SHCI_TL_DEFAULT_TIMEOUT); + + /** + * The command complete of a system command does not have the header + * It starts immediately with the evtserial field + */ + memcpy( &(p_rsp->evtserial), pCmdBuffer, ((TL_EvtSerial_t*)pCmdBuffer)->evt.plen + TL_EVT_HDR_SIZE ); + + Cmd_SetStatus(SHCI_TL_CmdAvailable); + + return; +} + +/* Private functions ---------------------------------------------------------*/ +static void TlInit( TL_CmdPacket_t * p_cmdbuffer ) +{ + TL_SYS_InitConf_t Conf; + + pCmdBuffer = p_cmdbuffer; + + LST_init_head (&SHciAsynchEventQueue); + + Cmd_SetStatus(SHCI_TL_CmdAvailable); + + SHCI_TL_UserEventFlow = SHCI_TL_UserEventFlow_Enable; + + /* Initialize low level driver */ + if (shciContext.io.Init) + { + + Conf.p_cmdbuffer = (uint8_t *)p_cmdbuffer; + Conf.IoBusCallBackCmdEvt = TlCmdEvtReceived; + Conf.IoBusCallBackUserEvt = TlUserEvtReceived; + shciContext.io.Init(&Conf); + } + + return; +} + +static void Cmd_SetStatus(SHCI_TL_CmdStatus_t shcicmdstatus) +{ + if(shcicmdstatus == SHCI_TL_CmdBusy) + { + if(StatusNotCallBackFunction != 0) + { + StatusNotCallBackFunction( SHCI_TL_CmdBusy ); + } + SHCICmdStatus = SHCI_TL_CmdBusy; + } + else + { + SHCICmdStatus = SHCI_TL_CmdAvailable; + if(StatusNotCallBackFunction != 0) + { + StatusNotCallBackFunction( SHCI_TL_CmdAvailable ); + } + } + + return; +} + +static void TlCmdEvtReceived(TL_EvtPacket_t *shcievt) +{ + (void)(shcievt); + shci_cmd_resp_release(0); /**< Notify the application the Cmd response has been received */ + + return; +} + +static void TlUserEvtReceived(TL_EvtPacket_t *shcievt) +{ + LST_insert_tail(&SHciAsynchEventQueue, (tListNode *)shcievt); + shci_notify_asynch_evt((void*) &SHciAsynchEventQueue); /**< Notify the application a full HCI event has been received */ + + return; +} + +/* Weak implementation ----------------------------------------------------------------*/ +__WEAK void shci_cmd_resp_wait(uint32_t timeout) +{ + (void)timeout; + + while(CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE); + + return; +} + +__WEAK void shci_cmd_resp_release(uint32_t flag) +{ + (void)flag; + + CmdRspStatusFlag = SHCI_TL_CMD_RESP_RELEASE; + + return; +} + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h new file mode 100644 index 0000000..74d0ff3 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl.h @@ -0,0 +1,173 @@ +/** + ****************************************************************************** + * @file shci_tl.h + * @author MCD Application Team + * @brief System HCI command header for the system channel + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + +#ifndef __SHCI_TL_H_ +#define __SHCI_TL_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "tl.h" + +/* Exported defines -----------------------------------------------------------*/ +typedef enum +{ + SHCI_TL_UserEventFlow_Disable, + SHCI_TL_UserEventFlow_Enable, +} SHCI_TL_UserEventFlowStatus_t; + +typedef enum +{ + SHCI_TL_CmdBusy, + SHCI_TL_CmdAvailable +} SHCI_TL_CmdStatus_t; + +/** + * @brief Structure used to manage the BUS IO operations. + * All the structure fields will point to functions defined at user level. + * @{ + */ +typedef struct +{ + int32_t (* Init) (void* pConf); /**< Pointer to SHCI TL function for the IO Bus initialization */ + int32_t (* DeInit) (void); /**< Pointer to SHCI TL function for the IO Bus de-initialization */ + int32_t (* Reset) (void); /**< Pointer to SHCI TL function for the IO Bus reset */ + int32_t (* Receive) (uint8_t*, uint16_t); /**< Pointer to SHCI TL function for the IO Bus data reception */ + int32_t (* Send) (uint8_t*, uint16_t); /**< Pointer to SHCI TL function for the IO Bus data transmission */ + int32_t (* DataAck) (uint8_t*, uint16_t* len); /**< Pointer to SHCI TL function for the IO Bus data ack reception */ + int32_t (* GetTick) (void); /**< Pointer to BSP function for getting the HAL time base timestamp */ +} tSHciIO; +/** + * @} + */ + +/** + * @brief Contain the SHCI context + * @{ + */ +typedef struct +{ + tSHciIO io; /**< Manage the BUS IO operations */ + void (* UserEvtRx) (void * pData); /**< User System events callback function pointer */ +} tSHciContext; + +typedef struct +{ + SHCI_TL_UserEventFlowStatus_t status; + TL_EvtPacket_t *pckt; +} tSHCI_UserEvtRxParam; + +typedef struct +{ + uint8_t *p_cmdbuffer; + void (* StatusNotCallBack) (SHCI_TL_CmdStatus_t status); +} SHCI_TL_HciInitConf_t; + +/** + * shci_send + * @brief Send an System HCI Command + * + * @param : cmd_code = Opcode of the command + * @param : len_cmd_payload = Length of the command payload + * @param : p_cmd_payload = Address of the command payload + * @param : p_rsp_status = Address of the full buffer holding the command complete event + * @retval : None + */ +void shci_send( uint16_t cmd_code, uint8_t len_cmd_payload, uint8_t * p_cmd_payload, TL_EvtPacket_t * p_rsp_status ); + +/** + * @brief Register IO bus services. + * @param fops The SHCI IO structure managing the IO BUS + * @retval None + */ +void shci_register_io_bus(tSHciIO* fops); + +/** + * @brief Interrupt service routine that must be called when the system channel + * reports a packet has been received + * + * @param pdata Packet or event pointer + * @retval None + */ +void shci_notify_asynch_evt(void* pdata); + +/** + * @brief This function resume the User Event Flow which has been stopped on return + * from UserEvtRx() when the User Event has not been processed. + * + * @param None + * @retval None + */ +void shci_resume_flow(void); + + +/** + * @brief This function is called when an System HCI Command is sent to the CPU2 and the response is waited. + * It is called from the same context the System HCI command has been sent. + * It shall not return until the command response notified by shci_cmd_resp_release() is received. + * A weak implementation is available in shci_tl.c based on polling mechanism + * The user may re-implement this function in the application to improve performance : + * - It may use UTIL_SEQ_WaitEvt() API when using the Sequencer + * - It may use a semaphore when using cmsis_os interface + * + * @param timeout: Waiting timeout + * @retval None + */ +void shci_cmd_resp_wait(uint32_t timeout); + +/** + * @brief This function is called when an System HCI command is received from the CPU2. + * A weak implementation is available in shci_tl.c based on polling mechanism + * The user may re-implement this function in the application to improve performance : + * - It may use UTIL_SEQ_SetEvt() API when using the Sequencer + * - It may use a semaphore when using cmsis_os interface + * + * + * @param flag: Release flag + * @retval None + */ +void shci_cmd_resp_release(uint32_t flag); + + +/** + * @brief This process shall be called each time the shci_notify_asynch_evt notification is received + * + * @param None + * @retval None + */ + +void shci_user_evt_proc(void); + +/** + * @brief Initialize the System Host Controller Interface. + * This function must be called before any communication on the System Channel + * + * @param UserEvtRx: System events callback function pointer + * This callback is triggered when an user event is received on + * the System Channel from CPU2. + * @param pConf: Configuration structure pointer + * @retval None + */ +void shci_init(void(* UserEvtRx)(void* pData), void* pConf); + +#ifdef __cplusplus +} +#endif + +#endif /* __SHCI_TL_H_ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c new file mode 100644 index 0000000..70a6a2c --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/shci_tl_if.c @@ -0,0 +1,30 @@ +/** + ****************************************************************************** + * @file shci_tl_if.c + * @author MCD Application Team + * @brief Transport layer interface to the system channel + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + +#include "shci_tl.h" +#include "tl.h" + + +void shci_register_io_bus(tSHciIO* fops) +{ + /* Register IO bus services */ + fops->Init = TL_SYS_Init; + fops->Send = TL_SYS_SendCmd; + + return; +} diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h new file mode 100644 index 0000000..280600a --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl.h @@ -0,0 +1,372 @@ +/** + ****************************************************************************** + * @file tl.h + * @author MCD Application Team + * @brief Header for tl module + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __TL_H +#define __TL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Includes ------------------------------------------------------------------*/ +#include "stm32_wpan_common.h" + +/* Exported defines -----------------------------------------------------------*/ +#define TL_BLECMD_PKT_TYPE ( 0x01 ) +#define TL_ACL_DATA_PKT_TYPE ( 0x02 ) +#define TL_BLEEVT_PKT_TYPE ( 0x04 ) +#define TL_OTCMD_PKT_TYPE ( 0x08 ) +#define TL_OTRSP_PKT_TYPE ( 0x09 ) +#define TL_CLICMD_PKT_TYPE ( 0x0A ) +#define TL_OTNOT_PKT_TYPE ( 0x0C ) +#define TL_OTACK_PKT_TYPE ( 0x0D ) +#define TL_CLINOT_PKT_TYPE ( 0x0E ) +#define TL_CLIACK_PKT_TYPE ( 0x0F ) +#define TL_SYSCMD_PKT_TYPE ( 0x10 ) +#define TL_SYSRSP_PKT_TYPE ( 0x11 ) +#define TL_SYSEVT_PKT_TYPE ( 0x12 ) +#define TL_CLIRESP_PKT_TYPE ( 0x15 ) +#define TL_M0CMD_PKT_TYPE ( 0x16 ) +#define TL_LOCCMD_PKT_TYPE ( 0x20 ) +#define TL_LOCRSP_PKT_TYPE ( 0x21 ) +#define TL_TRACES_APP_PKT_TYPE ( 0x40 ) +#define TL_TRACES_WL_PKT_TYPE ( 0x41 ) + +#define TL_CMD_HDR_SIZE (4) +#define TL_EVT_HDR_SIZE (3) +#define TL_EVT_CS_PAYLOAD_SIZE (4) + +#define TL_BLEEVT_CC_OPCODE (0x0E) +#define TL_BLEEVT_CS_OPCODE (0x0F) +#define TL_BLEEVT_VS_OPCODE (0xFF) + +#define TL_BLEEVT_CC_PACKET_SIZE (TL_EVT_HDR_SIZE + sizeof(TL_CcEvt_t)) +#define TL_BLEEVT_CC_BUFFER_SIZE (sizeof(TL_PacketHeader_t) + TL_BLEEVT_CC_PACKET_SIZE) +/* Exported types ------------------------------------------------------------*/ +/**< Packet header */ +typedef PACKED_STRUCT +{ + uint32_t *next; + uint32_t *prev; +} TL_PacketHeader_t; + +/******************************************************************************* + * Event type + */ + +/** + * This the payload of TL_Evt_t for a command status event + */ +typedef PACKED_STRUCT +{ + uint8_t status; + uint8_t numcmd; + uint16_t cmdcode; +} TL_CsEvt_t; + +/** + * This the payload of TL_Evt_t for a command complete event, only used a pointer + */ +typedef PACKED_STRUCT +{ + uint8_t numcmd; + uint16_t cmdcode; + uint8_t payload[2]; +} TL_CcEvt_t; + +/** + * This the payload of TL_Evt_t for an asynchronous event, only used a pointer + */ +typedef PACKED_STRUCT +{ + uint16_t subevtcode; + uint8_t payload[2]; +} TL_AsynchEvt_t; + +/** + * This the payload of TL_Evt_t, only used a pointer + */ +typedef PACKED_STRUCT +{ + uint8_t evtcode; + uint8_t plen; + uint8_t payload[2]; +} TL_Evt_t; + +typedef PACKED_STRUCT +{ + uint8_t type; + TL_Evt_t evt; +} TL_EvtSerial_t; + +/** + * This format shall be used for all events (asynchronous and command response) reported + * by the CPU2 except for the command response of a system command where the header is not there + * and the format to be used shall be TL_EvtSerial_t. + * Note: Be careful that the asynchronous events reported by the CPU2 on the system channel do + * include the header and shall use TL_EvtPacket_t format. Only the command response format on the + * system channel is different. + */ +typedef PACKED_STRUCT +{ + TL_PacketHeader_t header; + TL_EvtSerial_t evtserial; +} TL_EvtPacket_t; + +/***************************************************************************************** + * Command type + */ + +typedef PACKED_STRUCT +{ + uint16_t cmdcode; + uint8_t plen; + uint8_t payload[255]; +} TL_Cmd_t; + +typedef PACKED_STRUCT +{ + uint8_t type; + TL_Cmd_t cmd; +} TL_CmdSerial_t; + +typedef PACKED_STRUCT +{ + TL_PacketHeader_t header; + TL_CmdSerial_t cmdserial; +} TL_CmdPacket_t; + +/***************************************************************************************** + * HCI ACL DATA type + */ +typedef PACKED_STRUCT +{ + uint8_t type; + uint16_t handle; + uint16_t length; + uint8_t acl_data[1]; +} TL_AclDataSerial_t; + +typedef PACKED_STRUCT +{ + TL_PacketHeader_t header; + TL_AclDataSerial_t AclDataSerial; +} TL_AclDataPacket_t; + +typedef struct +{ + uint8_t *p_BleSpareEvtBuffer; + uint8_t *p_SystemSpareEvtBuffer; + uint8_t *p_AsynchEvtPool; + uint32_t AsynchEvtPoolSize; + uint8_t *p_TracesEvtPool; + uint32_t TracesEvtPoolSize; +} TL_MM_Config_t; + +typedef struct +{ + uint8_t *p_ThreadOtCmdRspBuffer; + uint8_t *p_ThreadCliRspBuffer; + uint8_t *p_ThreadNotAckBuffer; + uint8_t *p_ThreadCliNotBuffer; +} TL_TH_Config_t; + +typedef struct +{ + uint8_t *p_LldTestsCliCmdRspBuffer; + uint8_t *p_LldTestsM0CmdBuffer; +} TL_LLD_tests_Config_t; + +typedef struct +{ + uint8_t *p_BleLldCmdRspBuffer; + uint8_t *p_BleLldM0CmdBuffer; +} TL_BLE_LLD_Config_t; + +typedef struct +{ + uint8_t *p_Mac_802_15_4_CmdRspBuffer; + uint8_t *p_Mac_802_15_4_NotAckBuffer; +} TL_MAC_802_15_4_Config_t; + +typedef struct +{ + uint8_t *p_ZigbeeOtCmdRspBuffer; + uint8_t *p_ZigbeeNotAckBuffer; + uint8_t *p_ZigbeeNotifRequestBuffer; +} TL_ZIGBEE_Config_t; + +/** + * @brief Contain the BLE HCI Init Configuration + * @{ + */ +typedef struct +{ + void (* IoBusEvtCallBack) ( TL_EvtPacket_t *phcievt ); + void (* IoBusAclDataTxAck) ( void ); + uint8_t *p_cmdbuffer; + uint8_t *p_AclDataBuffer; +} TL_BLE_InitConf_t; + +/** + * @brief Contain the SYSTEM HCI Init Configuration + * @{ + */ +typedef struct +{ + void (* IoBusCallBackCmdEvt) (TL_EvtPacket_t *phcievt); + void (* IoBusCallBackUserEvt) (TL_EvtPacket_t *phcievt); + uint8_t *p_cmdbuffer; +} TL_SYS_InitConf_t; + +/***************************************************************************************** + * Event type copied from ble_legacy.h + */ + +typedef PACKED_STRUCT +{ + uint8_t type; + uint8_t data[1]; +} hci_uart_pckt; + +typedef PACKED_STRUCT +{ + uint8_t evt; + uint8_t plen; + uint8_t data[1]; +} hci_event_pckt; + +typedef PACKED_STRUCT +{ + uint8_t subevent; + uint8_t data[1]; +} evt_le_meta_event; + +/** + * Vendor specific event for BLE core. + */ +typedef PACKED_STRUCT +{ + uint16_t ecode; /**< One of the BLE core event codes. */ + uint8_t data[1]; +} evt_blecore_aci; + +/* Bluetooth 48 bit address (in little-endian order). + */ +typedef uint8_t tBDAddr[6]; + + +/* Exported constants --------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ + +/****************************************************************************** + * GENERAL + ******************************************************************************/ +void TL_Enable( void ); +void TL_Init( void ); + +/****************************************************************************** + * BLE + ******************************************************************************/ +int32_t TL_BLE_Init( void* pConf ); +int32_t TL_BLE_SendCmd( uint8_t* buffer, uint16_t size ); +int32_t TL_BLE_SendAclData( uint8_t* buffer, uint16_t size ); + +/****************************************************************************** + * SYSTEM + ******************************************************************************/ +int32_t TL_SYS_Init( void* pConf ); +int32_t TL_SYS_SendCmd( uint8_t* buffer, uint16_t size ); + +/****************************************************************************** + * THREAD + ******************************************************************************/ +void TL_THREAD_Init( TL_TH_Config_t *p_Config ); +void TL_OT_SendCmd( void ); +void TL_CLI_SendCmd( void ); +void TL_OT_CmdEvtReceived( TL_EvtPacket_t * Otbuffer ); +void TL_THREAD_NotReceived( TL_EvtPacket_t * Notbuffer ); +void TL_THREAD_SendAck ( void ); +void TL_THREAD_CliSendAck ( void ); +void TL_THREAD_CliNotReceived( TL_EvtPacket_t * Notbuffer ); + +/****************************************************************************** + * LLD TESTS + ******************************************************************************/ +void TL_LLDTESTS_Init( TL_LLD_tests_Config_t *p_Config ); +void TL_LLDTESTS_SendCliCmd( void ); +void TL_LLDTESTS_ReceiveCliRsp( TL_CmdPacket_t * Notbuffer ); +void TL_LLDTESTS_SendCliRspAck( void ); +void TL_LLDTESTS_ReceiveM0Cmd( TL_CmdPacket_t * Notbuffer ); +void TL_LLDTESTS_SendM0CmdAck( void ); + +/****************************************************************************** + * BLE LLD + ******************************************************************************/ +void TL_BLE_LLD_Init( TL_BLE_LLD_Config_t *p_Config ); +void TL_BLE_LLD_SendCliCmd( void ); +void TL_BLE_LLD_ReceiveCliRsp( TL_CmdPacket_t * Notbuffer ); +void TL_BLE_LLD_SendCliRspAck( void ); +void TL_BLE_LLD_ReceiveM0Cmd( TL_CmdPacket_t * Notbuffer ); +void TL_BLE_LLD_SendM0CmdAck( void ); +void TL_BLE_LLD_SendCmd( void ); +void TL_BLE_LLD_ReceiveRsp( TL_CmdPacket_t * Notbuffer ); +void TL_BLE_LLD_SendRspAck( void ); +/****************************************************************************** + * MEMORY MANAGER + ******************************************************************************/ +void TL_MM_Init( TL_MM_Config_t *p_Config ); +void TL_MM_EvtDone( TL_EvtPacket_t * hcievt ); + +/****************************************************************************** + * TRACES + ******************************************************************************/ +void TL_TRACES_Init( void ); +void TL_TRACES_EvtReceived( TL_EvtPacket_t * hcievt ); + +/****************************************************************************** + * MAC 802.15.4 + ******************************************************************************/ +void TL_MAC_802_15_4_Init( TL_MAC_802_15_4_Config_t *p_Config ); +void TL_MAC_802_15_4_SendCmd( void ); +void TL_MAC_802_15_4_CmdEvtReceived( TL_EvtPacket_t * Otbuffer ); +void TL_MAC_802_15_4_NotReceived( TL_EvtPacket_t * Notbuffer ); +void TL_MAC_802_15_4_SendAck ( void ); + +/****************************************************************************** + * ZIGBEE + ******************************************************************************/ +void TL_ZIGBEE_Init( TL_ZIGBEE_Config_t *p_Config ); +void TL_ZIGBEE_SendM4RequestToM0( void ); +void TL_ZIGBEE_SendM4AckToM0Notify ( void ); +void TL_ZIGBEE_NotReceived( TL_EvtPacket_t * Notbuffer ); +void TL_ZIGBEE_CmdEvtReceived( TL_EvtPacket_t * Otbuffer ); +void TL_ZIGBEE_M0RequestReceived(TL_EvtPacket_t * Otbuffer ); +void TL_ZIGBEE_SendM4AckToM0Request(void); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__TL_H */ + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c new file mode 100644 index 0000000..9659ee6 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/interface/patterns/ble_thread/tl/tl_mbox.c @@ -0,0 +1,877 @@ +/** + ****************************************************************************** + * @file tl_mbox.c + * @author MCD Application Team + * @brief Transport layer for the mailbox interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32_wpan_common.h" +#include "hw.h" + +#include "stm_list.h" +#include "tl.h" +#include "mbox_def.h" +#include "tl_dbg_conf.h" + +/* Private typedef -----------------------------------------------------------*/ +typedef enum +{ + TL_MB_MM_RELEASE_BUFFER, + TL_MB_BLE_CMD, + TL_MB_BLE_CMD_RSP, + TL_MB_ACL_DATA, + TL_MB_ACL_DATA_RSP, + TL_MB_BLE_ASYNCH_EVT, + TL_MB_SYS_CMD, + TL_MB_SYS_CMD_RSP, + TL_MB_SYS_ASYNCH_EVT, +} TL_MB_PacketType_t; + +/* Private defines -----------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ + +/**< reference table */ +PLACE_IN_SECTION("MAPPING_TABLE") static volatile MB_RefTable_t TL_RefTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_DeviceInfoTable_t TL_DeviceInfoTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_BleTable_t TL_BleTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_ThreadTable_t TL_ThreadTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_LldTestsTable_t TL_LldTestsTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_BleLldTable_t TL_BleLldTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_SysTable_t TL_SysTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_MemManagerTable_t TL_MemManagerTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_TracesTable_t TL_TracesTable; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_Mac_802_15_4_t TL_Mac_802_15_4_Table; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static MB_ZigbeeTable_t TL_Zigbee_Table; + +/**< tables */ +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static tListNode FreeBufQueue; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static tListNode TracesEvtQueue; +PLACE_IN_SECTION("MB_MEM2") ALIGN(4) static uint8_t CsBuffer[sizeof(TL_PacketHeader_t) + TL_EVT_HDR_SIZE + sizeof(TL_CsEvt_t)]; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static tListNode EvtQueue; +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static tListNode SystemEvtQueue; + + +static tListNode LocalFreeBufQueue; +static void (* BLE_IoBusEvtCallBackFunction) (TL_EvtPacket_t *phcievt); +static void (* BLE_IoBusAclDataTxAck) ( void ); +static void (* SYS_CMD_IoBusCallBackFunction) (TL_EvtPacket_t *phcievt); +static void (* SYS_EVT_IoBusCallBackFunction) (TL_EvtPacket_t *phcievt); + + +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +static void SendFreeBuf( void ); +static void OutputDbgTrace(TL_MB_PacketType_t packet_type, uint8_t* buffer); + +/* Public Functions Definition ------------------------------------------------------*/ + +/****************************************************************************** + * GENERAL - refer to AN5289 for functions description. + ******************************************************************************/ +void TL_Enable( void ) +{ + HW_IPCC_Enable(); + + return; +} + + +void TL_Init( void ) +{ + TL_RefTable.p_device_info_table = &TL_DeviceInfoTable; + TL_RefTable.p_ble_table = &TL_BleTable; + TL_RefTable.p_thread_table = &TL_ThreadTable; + TL_RefTable.p_lld_tests_table = &TL_LldTestsTable; + TL_RefTable.p_ble_lld_table = &TL_BleLldTable; + TL_RefTable.p_sys_table = &TL_SysTable; + TL_RefTable.p_mem_manager_table = &TL_MemManagerTable; + TL_RefTable.p_traces_table = &TL_TracesTable; + TL_RefTable.p_mac_802_15_4_table = &TL_Mac_802_15_4_Table; + TL_RefTable.p_zigbee_table = &TL_Zigbee_Table; + HW_IPCC_Init(); + + return; +} + +/****************************************************************************** + * BLE + ******************************************************************************/ +int32_t TL_BLE_Init( void* pConf ) +{ + MB_BleTable_t * p_bletable; + + TL_BLE_InitConf_t *pInitHciConf = (TL_BLE_InitConf_t *) pConf; + + LST_init_head (&EvtQueue); + + p_bletable = TL_RefTable.p_ble_table; + + p_bletable->pcmd_buffer = pInitHciConf->p_cmdbuffer; + p_bletable->phci_acl_data_buffer = pInitHciConf->p_AclDataBuffer; + p_bletable->pcs_buffer = (uint8_t*)CsBuffer; + p_bletable->pevt_queue = (uint8_t*)&EvtQueue; + + HW_IPCC_BLE_Init(); + + BLE_IoBusEvtCallBackFunction = pInitHciConf->IoBusEvtCallBack; + BLE_IoBusAclDataTxAck = pInitHciConf->IoBusAclDataTxAck; + + return 0; +} + +int32_t TL_BLE_SendCmd( uint8_t* buffer, uint16_t size ) +{ + (void)(buffer); + (void)(size); + + ((TL_CmdPacket_t*)(TL_RefTable.p_ble_table->pcmd_buffer))->cmdserial.type = TL_BLECMD_PKT_TYPE; + + OutputDbgTrace(TL_MB_BLE_CMD, TL_RefTable.p_ble_table->pcmd_buffer); + + HW_IPCC_BLE_SendCmd(); + + return 0; +} + +void HW_IPCC_BLE_RxEvtNot(void) +{ + TL_EvtPacket_t *phcievt; + + while(LST_is_empty(&EvtQueue) == FALSE) + { + LST_remove_head (&EvtQueue, (tListNode **)&phcievt); + + if ( ((phcievt->evtserial.evt.evtcode) == TL_BLEEVT_CS_OPCODE) || ((phcievt->evtserial.evt.evtcode) == TL_BLEEVT_CC_OPCODE ) ) + { + OutputDbgTrace(TL_MB_BLE_CMD_RSP, (uint8_t*)phcievt); + } + else + { + OutputDbgTrace(TL_MB_BLE_ASYNCH_EVT, (uint8_t*)phcievt); + } + + BLE_IoBusEvtCallBackFunction(phcievt); + } + + return; +} + +int32_t TL_BLE_SendAclData( uint8_t* buffer, uint16_t size ) +{ + (void)(buffer); + (void)(size); + + ((TL_AclDataPacket_t *)(TL_RefTable.p_ble_table->phci_acl_data_buffer))->AclDataSerial.type = TL_ACL_DATA_PKT_TYPE; + + OutputDbgTrace(TL_MB_ACL_DATA, TL_RefTable.p_ble_table->phci_acl_data_buffer); + + HW_IPCC_BLE_SendAclData(); + + return 0; +} + +void HW_IPCC_BLE_AclDataAckNot(void) +{ + OutputDbgTrace(TL_MB_ACL_DATA_RSP, (uint8_t*)NULL); + + BLE_IoBusAclDataTxAck( ); + + return; +} + +/****************************************************************************** + * SYSTEM + ******************************************************************************/ +int32_t TL_SYS_Init( void* pConf ) +{ + MB_SysTable_t * p_systable; + + TL_SYS_InitConf_t *pInitHciConf = (TL_SYS_InitConf_t *) pConf; + + LST_init_head (&SystemEvtQueue); + p_systable = TL_RefTable.p_sys_table; + p_systable->pcmd_buffer = pInitHciConf->p_cmdbuffer; + p_systable->sys_queue = (uint8_t*)&SystemEvtQueue; + + HW_IPCC_SYS_Init(); + + SYS_CMD_IoBusCallBackFunction = pInitHciConf->IoBusCallBackCmdEvt; + SYS_EVT_IoBusCallBackFunction = pInitHciConf->IoBusCallBackUserEvt; + + return 0; +} + +int32_t TL_SYS_SendCmd( uint8_t* buffer, uint16_t size ) +{ + (void)(buffer); + (void)(size); + + ((TL_CmdPacket_t *)(TL_RefTable.p_sys_table->pcmd_buffer))->cmdserial.type = TL_SYSCMD_PKT_TYPE; + + OutputDbgTrace(TL_MB_SYS_CMD, TL_RefTable.p_sys_table->pcmd_buffer); + + HW_IPCC_SYS_SendCmd(); + + return 0; +} + +void HW_IPCC_SYS_CmdEvtNot(void) +{ + OutputDbgTrace(TL_MB_SYS_CMD_RSP, (uint8_t*)(TL_RefTable.p_sys_table->pcmd_buffer) ); + + SYS_CMD_IoBusCallBackFunction( (TL_EvtPacket_t*)(TL_RefTable.p_sys_table->pcmd_buffer) ); + + return; +} + +void HW_IPCC_SYS_EvtNot( void ) +{ + TL_EvtPacket_t *p_evt; + + while(LST_is_empty(&SystemEvtQueue) == FALSE) + { + LST_remove_head (&SystemEvtQueue, (tListNode **)&p_evt); + + OutputDbgTrace(TL_MB_SYS_ASYNCH_EVT, (uint8_t*)p_evt ); + + SYS_EVT_IoBusCallBackFunction( p_evt ); + } + + return; +} + +/****************************************************************************** + * THREAD + ******************************************************************************/ +#ifdef THREAD_WB +void TL_THREAD_Init( TL_TH_Config_t *p_Config ) +{ + MB_ThreadTable_t * p_thread_table; + + p_thread_table = TL_RefTable.p_thread_table; + + p_thread_table->clicmdrsp_buffer = p_Config->p_ThreadCliRspBuffer; + p_thread_table->otcmdrsp_buffer = p_Config->p_ThreadOtCmdRspBuffer; + p_thread_table->notack_buffer = p_Config->p_ThreadNotAckBuffer; + p_thread_table->clinot_buffer = p_Config->p_ThreadCliNotBuffer; + + HW_IPCC_THREAD_Init(); + + return; +} + +void TL_OT_SendCmd( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_thread_table->otcmdrsp_buffer))->cmdserial.type = TL_OTCMD_PKT_TYPE; + + HW_IPCC_OT_SendCmd(); + + return; +} + +void TL_CLI_SendCmd( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_thread_table->clicmdrsp_buffer))->cmdserial.type = TL_CLICMD_PKT_TYPE; + + HW_IPCC_CLI_SendCmd(); + + return; +} + +void TL_THREAD_SendAck ( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_thread_table->notack_buffer))->cmdserial.type = TL_OTACK_PKT_TYPE; + + HW_IPCC_THREAD_SendAck(); + + return; +} + +void TL_THREAD_CliSendAck ( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_thread_table->notack_buffer))->cmdserial.type = TL_OTACK_PKT_TYPE; + + HW_IPCC_THREAD_CliSendAck(); + + return; +} + +void HW_IPCC_OT_CmdEvtNot(void) +{ + TL_OT_CmdEvtReceived( (TL_EvtPacket_t*)(TL_RefTable.p_thread_table->otcmdrsp_buffer) ); + + return; +} + +void HW_IPCC_THREAD_EvtNot( void ) +{ + TL_THREAD_NotReceived( (TL_EvtPacket_t*)(TL_RefTable.p_thread_table->notack_buffer) ); + + return; +} + +void HW_IPCC_THREAD_CliEvtNot( void ) +{ + TL_THREAD_CliNotReceived( (TL_EvtPacket_t*)(TL_RefTable.p_thread_table->clinot_buffer) ); + + return; +} + +__WEAK void TL_OT_CmdEvtReceived( TL_EvtPacket_t * Otbuffer ){}; +__WEAK void TL_THREAD_NotReceived( TL_EvtPacket_t * Notbuffer ){}; +__WEAK void TL_THREAD_CliNotReceived( TL_EvtPacket_t * Notbuffer ){}; + +#endif /* THREAD_WB */ + +/****************************************************************************** + * LLD TESTS + ******************************************************************************/ +#ifdef LLD_TESTS_WB +void TL_LLDTESTS_Init( TL_LLD_tests_Config_t *p_Config ) +{ + MB_LldTestsTable_t * p_lld_tests_table; + + p_lld_tests_table = TL_RefTable.p_lld_tests_table; + p_lld_tests_table->clicmdrsp_buffer = p_Config->p_LldTestsCliCmdRspBuffer; + p_lld_tests_table->m0cmd_buffer = p_Config->p_LldTestsM0CmdBuffer; + HW_IPCC_LLDTESTS_Init(); + return; +} + +void TL_LLDTESTS_SendCliCmd( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_lld_tests_table->clicmdrsp_buffer))->cmdserial.type = TL_CLICMD_PKT_TYPE; + HW_IPCC_LLDTESTS_SendCliCmd(); + return; +} + +void HW_IPCC_LLDTESTS_ReceiveCliRsp( void ) +{ + TL_LLDTESTS_ReceiveCliRsp( (TL_CmdPacket_t*)(TL_RefTable.p_lld_tests_table->clicmdrsp_buffer) ); + return; +} + +void TL_LLDTESTS_SendCliRspAck( void ) +{ + HW_IPCC_LLDTESTS_SendCliRspAck(); + return; +} + +void HW_IPCC_LLDTESTS_ReceiveM0Cmd( void ) +{ + TL_LLDTESTS_ReceiveM0Cmd( (TL_CmdPacket_t*)(TL_RefTable.p_lld_tests_table->m0cmd_buffer) ); + return; +} + + +void TL_LLDTESTS_SendM0CmdAck( void ) +{ + HW_IPCC_LLDTESTS_SendM0CmdAck(); + return; +} + +__WEAK void TL_LLDTESTS_ReceiveCliRsp( TL_CmdPacket_t * Notbuffer ){}; +__WEAK void TL_LLDTESTS_ReceiveM0Cmd( TL_CmdPacket_t * Notbuffer ){}; +#endif /* LLD_TESTS_WB */ + +/****************************************************************************** + * BLE LLD + ******************************************************************************/ +#ifdef BLE_LLD_WB +void TL_BLE_LLD_Init( TL_BLE_LLD_Config_t *p_Config ) +{ + MB_BleLldTable_t * p_ble_lld_table; + + p_ble_lld_table = TL_RefTable.p_ble_lld_table; + p_ble_lld_table->cmdrsp_buffer = p_Config->p_BleLldCmdRspBuffer; + p_ble_lld_table->m0cmd_buffer = p_Config->p_BleLldM0CmdBuffer; + HW_IPCC_BLE_LLD_Init(); + return; +} + +void TL_BLE_LLD_SendCliCmd( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_ble_lld_table->cmdrsp_buffer))->cmdserial.type = TL_CLICMD_PKT_TYPE; + HW_IPCC_BLE_LLD_SendCliCmd(); + return; +} + +void HW_IPCC_BLE_LLD_ReceiveCliRsp( void ) +{ + TL_BLE_LLD_ReceiveCliRsp( (TL_CmdPacket_t*)(TL_RefTable.p_ble_lld_table->cmdrsp_buffer) ); + return; +} + +void TL_BLE_LLD_SendCliRspAck( void ) +{ + HW_IPCC_BLE_LLD_SendCliRspAck(); + return; +} + +void HW_IPCC_BLE_LLD_ReceiveM0Cmd( void ) +{ + TL_BLE_LLD_ReceiveM0Cmd( (TL_CmdPacket_t*)(TL_RefTable.p_ble_lld_table->m0cmd_buffer) ); + return; +} + + +void TL_BLE_LLD_SendM0CmdAck( void ) +{ + HW_IPCC_BLE_LLD_SendM0CmdAck(); + return; +} + +__WEAK void TL_BLE_LLD_ReceiveCliRsp( TL_CmdPacket_t * Notbuffer ){}; +__WEAK void TL_BLE_LLD_ReceiveM0Cmd( TL_CmdPacket_t * Notbuffer ){}; + +/* Transparent Mode */ +void TL_BLE_LLD_SendCmd( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_ble_lld_table->cmdrsp_buffer))->cmdserial.type = TL_CLICMD_PKT_TYPE; + HW_IPCC_BLE_LLD_SendCmd(); + return; +} + +void HW_IPCC_BLE_LLD_ReceiveRsp( void ) +{ + TL_BLE_LLD_ReceiveRsp( (TL_CmdPacket_t*)(TL_RefTable.p_ble_lld_table->cmdrsp_buffer) ); + return; +} + +void TL_BLE_LLD_SendRspAck( void ) +{ + HW_IPCC_BLE_LLD_SendRspAck(); + return; +} +#endif /* BLE_LLD_WB */ + +#ifdef MAC_802_15_4_WB +/****************************************************************************** + * MAC 802.15.4 + ******************************************************************************/ +void TL_MAC_802_15_4_Init( TL_MAC_802_15_4_Config_t *p_Config ) +{ + MB_Mac_802_15_4_t * p_mac_802_15_4_table; + + p_mac_802_15_4_table = TL_RefTable.p_mac_802_15_4_table; + + p_mac_802_15_4_table->p_cmdrsp_buffer = p_Config->p_Mac_802_15_4_CmdRspBuffer; + p_mac_802_15_4_table->p_notack_buffer = p_Config->p_Mac_802_15_4_NotAckBuffer; + + HW_IPCC_MAC_802_15_4_Init(); + + return; +} + +void TL_MAC_802_15_4_SendCmd( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_mac_802_15_4_table->p_cmdrsp_buffer))->cmdserial.type = TL_OTCMD_PKT_TYPE; + + HW_IPCC_MAC_802_15_4_SendCmd(); + + return; +} + +void TL_MAC_802_15_4_SendAck ( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_mac_802_15_4_table->p_notack_buffer))->cmdserial.type = TL_OTACK_PKT_TYPE; + + HW_IPCC_MAC_802_15_4_SendAck(); + + return; +} + +void HW_IPCC_MAC_802_15_4_CmdEvtNot(void) +{ + TL_MAC_802_15_4_CmdEvtReceived( (TL_EvtPacket_t*)(TL_RefTable.p_mac_802_15_4_table->p_cmdrsp_buffer) ); + + return; +} + +void HW_IPCC_MAC_802_15_4_EvtNot( void ) +{ + TL_MAC_802_15_4_NotReceived( (TL_EvtPacket_t*)(TL_RefTable.p_mac_802_15_4_table->p_notack_buffer) ); + + return; +} + +__WEAK void TL_MAC_802_15_4_CmdEvtReceived( TL_EvtPacket_t * Otbuffer ){}; +__WEAK void TL_MAC_802_15_4_NotReceived( TL_EvtPacket_t * Notbuffer ){}; +#endif + +#ifdef ZIGBEE_WB +/****************************************************************************** + * ZIGBEE + ******************************************************************************/ +void TL_ZIGBEE_Init( TL_ZIGBEE_Config_t *p_Config ) +{ + MB_ZigbeeTable_t * p_zigbee_table; + + p_zigbee_table = TL_RefTable.p_zigbee_table; + p_zigbee_table->appliCmdM4toM0_buffer = p_Config->p_ZigbeeOtCmdRspBuffer; + p_zigbee_table->notifM0toM4_buffer = p_Config->p_ZigbeeNotAckBuffer; + p_zigbee_table->requestM0toM4_buffer = p_Config->p_ZigbeeNotifRequestBuffer; + + HW_IPCC_ZIGBEE_Init(); + + return; +} + +/* Zigbee M4 to M0 Request */ +void TL_ZIGBEE_SendM4RequestToM0( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_zigbee_table->appliCmdM4toM0_buffer))->cmdserial.type = TL_OTCMD_PKT_TYPE; + + HW_IPCC_ZIGBEE_SendM4RequestToM0(); + + return; +} + +/* Used to receive an ACK from the M0 */ +void HW_IPCC_ZIGBEE_RecvAppliAckFromM0(void) +{ + TL_ZIGBEE_CmdEvtReceived( (TL_EvtPacket_t*)(TL_RefTable.p_zigbee_table->appliCmdM4toM0_buffer) ); + + return; +} + +/* Zigbee notification from M0 to M4 */ +void HW_IPCC_ZIGBEE_RecvM0NotifyToM4( void ) +{ + TL_ZIGBEE_NotReceived( (TL_EvtPacket_t*)(TL_RefTable.p_zigbee_table->notifM0toM4_buffer) ); + + return; +} + +/* Send an ACK to the M0 for a Notification */ +void TL_ZIGBEE_SendM4AckToM0Notify ( void ) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_zigbee_table->notifM0toM4_buffer))->cmdserial.type = TL_OTACK_PKT_TYPE; + + HW_IPCC_ZIGBEE_SendM4AckToM0Notify(); + + return; +} + +/* Zigbee M0 to M4 Request */ +void HW_IPCC_ZIGBEE_RecvM0RequestToM4( void ) +{ + TL_ZIGBEE_M0RequestReceived( (TL_EvtPacket_t*)(TL_RefTable.p_zigbee_table->requestM0toM4_buffer) ); + + return; +} + +/* Send an ACK to the M0 for a Request */ +void TL_ZIGBEE_SendM4AckToM0Request(void) +{ + ((TL_CmdPacket_t *)(TL_RefTable.p_zigbee_table->requestM0toM4_buffer))->cmdserial.type = TL_OTACK_PKT_TYPE; + + HW_IPCC_ZIGBEE_SendM4AckToM0Request(); + + return; +} + + +__WEAK void TL_ZIGBEE_CmdEvtReceived( TL_EvtPacket_t * Otbuffer ){}; +__WEAK void TL_ZIGBEE_NotReceived( TL_EvtPacket_t * Notbuffer ){}; +#endif + + + +/****************************************************************************** + * MEMORY MANAGER + ******************************************************************************/ +void TL_MM_Init( TL_MM_Config_t *p_Config ) +{ + static MB_MemManagerTable_t * p_mem_manager_table; + + LST_init_head (&FreeBufQueue); + LST_init_head (&LocalFreeBufQueue); + + p_mem_manager_table = TL_RefTable.p_mem_manager_table; + + p_mem_manager_table->blepool = p_Config->p_AsynchEvtPool; + p_mem_manager_table->blepoolsize = p_Config->AsynchEvtPoolSize; + p_mem_manager_table->pevt_free_buffer_queue = (uint8_t*)&FreeBufQueue; + p_mem_manager_table->spare_ble_buffer = p_Config->p_BleSpareEvtBuffer; + p_mem_manager_table->spare_sys_buffer = p_Config->p_SystemSpareEvtBuffer; + p_mem_manager_table->traces_evt_pool = p_Config->p_TracesEvtPool; + p_mem_manager_table->tracespoolsize = p_Config->TracesEvtPoolSize; + + return; +} + +void TL_MM_EvtDone(TL_EvtPacket_t * phcievt) +{ + LST_insert_tail(&LocalFreeBufQueue, (tListNode *)phcievt); + + OutputDbgTrace(TL_MB_MM_RELEASE_BUFFER, (uint8_t*)phcievt); + + HW_IPCC_MM_SendFreeBuf( SendFreeBuf ); + + return; +} + +static void SendFreeBuf( void ) +{ + tListNode *p_node; + + while ( FALSE == LST_is_empty (&LocalFreeBufQueue) ) + { + LST_remove_head( &LocalFreeBufQueue, (tListNode **)&p_node ); + LST_insert_tail( (tListNode*)(TL_RefTable.p_mem_manager_table->pevt_free_buffer_queue), p_node ); + } + + return; +} + +/****************************************************************************** + * TRACES + ******************************************************************************/ +void TL_TRACES_Init( void ) +{ + LST_init_head (&TracesEvtQueue); + + TL_RefTable.p_traces_table->traces_queue = (uint8_t*)&TracesEvtQueue; + + HW_IPCC_TRACES_Init(); + + return; +} + +void HW_IPCC_TRACES_EvtNot(void) +{ + TL_EvtPacket_t *phcievt; + + while(LST_is_empty(&TracesEvtQueue) == FALSE) + { + LST_remove_head (&TracesEvtQueue, (tListNode **)&phcievt); + TL_TRACES_EvtReceived( phcievt ); + } + + return; +} + +__WEAK void TL_TRACES_EvtReceived( TL_EvtPacket_t * hcievt ) +{ + (void)(hcievt); +} + +/****************************************************************************** +* DEBUG INFORMATION +******************************************************************************/ +static void OutputDbgTrace(TL_MB_PacketType_t packet_type, uint8_t* buffer) +{ + TL_EvtPacket_t *p_evt_packet; + TL_CmdPacket_t *p_cmd_packet; + TL_AclDataPacket_t *p_acldata_packet; + TL_EvtSerial_t *p_cmd_rsp_packet; + + switch(packet_type) + { + case TL_MB_MM_RELEASE_BUFFER: + p_evt_packet = (TL_EvtPacket_t*)buffer; + switch(p_evt_packet->evtserial.evt.evtcode) + { + case TL_BLEEVT_CS_OPCODE: + TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_MM_DBG_MSG(" cmd opcode: 0x%04X", ((TL_CsEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode); + TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet); + break; + + case TL_BLEEVT_CC_OPCODE: + TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_MM_DBG_MSG(" cmd opcode: 0x%04X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode); + TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet); + break; + + case TL_BLEEVT_VS_OPCODE: + TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_MM_DBG_MSG(" subevtcode: 0x%04X", ((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->subevtcode); + TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet); + break; + + default: + TL_MM_DBG_MSG("mm evt released: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_MM_DBG_MSG(" buffer addr: 0x%08X", p_evt_packet); + break; + } + + TL_MM_DBG_MSG("\r\n"); + break; + + case TL_MB_BLE_CMD: + p_cmd_packet = (TL_CmdPacket_t*)buffer; + TL_HCI_CMD_DBG_MSG("ble cmd: 0x%04X", p_cmd_packet->cmdserial.cmd.cmdcode); + if(p_cmd_packet->cmdserial.cmd.plen != 0) + { + TL_HCI_CMD_DBG_MSG(" payload:"); + TL_HCI_CMD_DBG_BUF(p_cmd_packet->cmdserial.cmd.payload, p_cmd_packet->cmdserial.cmd.plen, ""); + } + TL_HCI_CMD_DBG_MSG("\r\n"); + + TL_HCI_CMD_DBG_RAW(&p_cmd_packet->cmdserial, p_cmd_packet->cmdserial.cmd.plen+TL_CMD_HDR_SIZE); + break; + + case TL_MB_ACL_DATA: + (void)p_acldata_packet; + p_acldata_packet = (TL_AclDataPacket_t*)buffer; + TL_HCI_CMD_DBG_MSG("acl_data: 0x%02X", p_acldata_packet->AclDataSerial.type); + TL_HCI_CMD_DBG_MSG("acl_data: 0x%04X", p_acldata_packet->AclDataSerial.handle); + TL_HCI_CMD_DBG_MSG("acl_data: 0x%04X", p_acldata_packet->AclDataSerial.length); + /*if(p_acldata_packet->AclDataSerial.length != 0) + { + TL_HCI_CMD_DBG_MSG(" payload:"); + TL_HCI_CMD_DBG_BUF(p_acldata_packet->AclDataSerial.acl_data, p_acldata_packet->AclDataSerial.length, ""); + }*/ + TL_HCI_CMD_DBG_MSG("\r\n"); + /*TL_HCI_CMD_DBG_RAW(&p_acldata_packet->AclDataSerial, p_acldata_packet->AclDataSerial.length+TL_CMD_HDR_SIZE);*/ + break; + + case TL_MB_ACL_DATA_RSP: + TL_HCI_CMD_DBG_MSG(" ACL Data Tx Ack received") + TL_HCI_CMD_DBG_MSG("\r\n"); + break; + + case TL_MB_BLE_CMD_RSP: + p_evt_packet = (TL_EvtPacket_t*)buffer; + switch(p_evt_packet->evtserial.evt.evtcode) + { + case TL_BLEEVT_CS_OPCODE: + TL_HCI_CMD_DBG_MSG("ble rsp: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_HCI_CMD_DBG_MSG(" cmd opcode: 0x%04X", ((TL_CsEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode); + TL_HCI_CMD_DBG_MSG(" numhci: 0x%02X", ((TL_CsEvt_t*)(p_evt_packet->evtserial.evt.payload))->numcmd); + TL_HCI_CMD_DBG_MSG(" status: 0x%02X", ((TL_CsEvt_t*)(p_evt_packet->evtserial.evt.payload))->status); + break; + + case TL_BLEEVT_CC_OPCODE: + TL_HCI_CMD_DBG_MSG("ble rsp: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_HCI_CMD_DBG_MSG(" cmd opcode: 0x%04X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->cmdcode); + TL_HCI_CMD_DBG_MSG(" numhci: 0x%02X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->numcmd); + TL_HCI_CMD_DBG_MSG(" status: 0x%02X", ((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload[0]); + if((p_evt_packet->evtserial.evt.plen-4) != 0) + { + TL_HCI_CMD_DBG_MSG(" payload:"); + TL_HCI_CMD_DBG_BUF(&((TL_CcEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload[1], p_evt_packet->evtserial.evt.plen-4, ""); + } + break; + + default: + TL_HCI_CMD_DBG_MSG("unknown ble rsp received: %02X", p_evt_packet->evtserial.evt.evtcode); + break; + } + + TL_HCI_CMD_DBG_MSG("\r\n"); + + TL_HCI_CMD_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE); + break; + + case TL_MB_BLE_ASYNCH_EVT: + p_evt_packet = (TL_EvtPacket_t*)buffer; + if(p_evt_packet->evtserial.evt.evtcode != TL_BLEEVT_VS_OPCODE) + { + TL_HCI_EVT_DBG_MSG("ble evt: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + if((p_evt_packet->evtserial.evt.plen) != 0) + { + TL_HCI_EVT_DBG_MSG(" payload:"); + TL_HCI_EVT_DBG_BUF(p_evt_packet->evtserial.evt.payload, p_evt_packet->evtserial.evt.plen, ""); + } + } + else + { + TL_HCI_EVT_DBG_MSG("ble evt: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_HCI_EVT_DBG_MSG(" subevtcode: 0x%04X", ((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->subevtcode); + if((p_evt_packet->evtserial.evt.plen-2) != 0) + { + TL_HCI_EVT_DBG_MSG(" payload:"); + TL_HCI_EVT_DBG_BUF(((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload, p_evt_packet->evtserial.evt.plen-2, ""); + } + } + + TL_HCI_EVT_DBG_MSG("\r\n"); + + TL_HCI_EVT_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE); + break; + + case TL_MB_SYS_CMD: + p_cmd_packet = (TL_CmdPacket_t*)buffer; + + TL_SHCI_CMD_DBG_MSG("sys cmd: 0x%04X", p_cmd_packet->cmdserial.cmd.cmdcode); + + if(p_cmd_packet->cmdserial.cmd.plen != 0) + { + TL_SHCI_CMD_DBG_MSG(" payload:"); + TL_SHCI_CMD_DBG_BUF(p_cmd_packet->cmdserial.cmd.payload, p_cmd_packet->cmdserial.cmd.plen, ""); + } + TL_SHCI_CMD_DBG_MSG("\r\n"); + + TL_SHCI_CMD_DBG_RAW(&p_cmd_packet->cmdserial, p_cmd_packet->cmdserial.cmd.plen+TL_CMD_HDR_SIZE); + break; + + case TL_MB_SYS_CMD_RSP: + p_cmd_rsp_packet = (TL_EvtSerial_t*)buffer; + switch(p_cmd_rsp_packet->evt.evtcode) + { + case TL_BLEEVT_CC_OPCODE: + TL_SHCI_CMD_DBG_MSG("sys rsp: 0x%02X", p_cmd_rsp_packet->evt.evtcode); + TL_SHCI_CMD_DBG_MSG(" cmd opcode: 0x%02X", ((TL_CcEvt_t*)(p_cmd_rsp_packet->evt.payload))->cmdcode); + TL_SHCI_CMD_DBG_MSG(" status: 0x%02X", ((TL_CcEvt_t*)(p_cmd_rsp_packet->evt.payload))->payload[0]); + if((p_cmd_rsp_packet->evt.plen-4) != 0) + { + TL_SHCI_CMD_DBG_MSG(" payload:"); + TL_SHCI_CMD_DBG_BUF(&((TL_CcEvt_t*)(p_cmd_rsp_packet->evt.payload))->payload[1], p_cmd_rsp_packet->evt.plen-4, ""); + } + break; + + default: + TL_SHCI_CMD_DBG_MSG("unknown sys rsp received: %02X", p_cmd_rsp_packet->evt.evtcode); + break; + } + + TL_SHCI_CMD_DBG_MSG("\r\n"); + + TL_SHCI_CMD_DBG_RAW(&p_cmd_rsp_packet->evt, p_cmd_rsp_packet->evt.plen+TL_EVT_HDR_SIZE); + break; + + case TL_MB_SYS_ASYNCH_EVT: + p_evt_packet = (TL_EvtPacket_t*)buffer; + if(p_evt_packet->evtserial.evt.evtcode != TL_BLEEVT_VS_OPCODE) + { + TL_SHCI_EVT_DBG_MSG("unknown sys evt received: %02X", p_evt_packet->evtserial.evt.evtcode); + } + else + { + TL_SHCI_EVT_DBG_MSG("sys evt: 0x%02X", p_evt_packet->evtserial.evt.evtcode); + TL_SHCI_EVT_DBG_MSG(" subevtcode: 0x%04X", ((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->subevtcode); + if((p_evt_packet->evtserial.evt.plen-2) != 0) + { + TL_SHCI_EVT_DBG_MSG(" payload:"); + TL_SHCI_EVT_DBG_BUF(((TL_AsynchEvt_t*)(p_evt_packet->evtserial.evt.payload))->payload, p_evt_packet->evtserial.evt.plen-2, ""); + } + } + + TL_SHCI_EVT_DBG_MSG("\r\n"); + + TL_SHCI_EVT_DBG_RAW(&p_evt_packet->evtserial, p_evt_packet->evtserial.evt.plen+TL_EVT_HDR_SIZE); + break; + + default: + break; + } + + return; +} + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/stm32_wpan_common.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/stm32_wpan_common.h new file mode 100644 index 0000000..f407bb9 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/stm32_wpan_common.h @@ -0,0 +1,171 @@ +/** + ****************************************************************************** + * @file stm32_wpan_common.h + * @author MCD Application Team + * @brief Common file to utilities + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32_WPAN_COMMON_H +#define __STM32_WPAN_COMMON_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined ( __CC_ARM )||defined (__ARMCC_VERSION) + #define __ASM __asm /*!< asm keyword for ARM Compiler */ + #define __INLINE __inline /*!< inline keyword for ARM Compiler */ + #define __STATIC_INLINE static __inline +#elif defined ( __ICCARM__ ) + #define __ASM __asm /*!< asm keyword for IAR Compiler */ + #define __INLINE inline /*!< inline keyword for IAR Compiler. Only available in High optimization mode! */ + #define __STATIC_INLINE static inline +#elif defined ( __GNUC__ ) + #define __ASM __asm /*!< asm keyword for GNU Compiler */ + #define __INLINE inline /*!< inline keyword for GNU Compiler */ + #define __STATIC_INLINE static inline +#endif + +#include +#include +#include +#include +#include +#include "cmsis_compiler.h" + + /* -------------------------------- * + * Basic definitions * + * -------------------------------- */ + +#undef NULL +#define NULL 0U + +#undef FALSE +#define FALSE 0U + +#undef TRUE +#define TRUE (!0U) + + /* -------------------------------- * + * Critical Section definition * + * -------------------------------- */ +#undef BACKUP_PRIMASK +#define BACKUP_PRIMASK() uint32_t primask_bit= __get_PRIMASK() + +#undef DISABLE_IRQ +#define DISABLE_IRQ() __disable_irq() + +#undef RESTORE_PRIMASK +#define RESTORE_PRIMASK() __set_PRIMASK(primask_bit) + + /* -------------------------------- * + * Macro delimiters * + * -------------------------------- */ +#undef M_BEGIN +#define M_BEGIN do { + +#undef M_END +#define M_END } while(0) + + /* -------------------------------- * + * Some useful macro definitions * + * -------------------------------- */ +#undef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + +#undef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + +#undef MODINC +#define MODINC( a, m ) M_BEGIN (a)++; if ((a)>=(m)) (a)=0; M_END + +#undef MODDEC +#define MODDEC( a, m ) M_BEGIN if ((a)==0) (a)=(m); (a)--; M_END + +#undef MODADD +#define MODADD( a, b, m ) M_BEGIN (a)+=(b); if ((a)>=(m)) (a)-=(m); M_END + +#undef MODSUB +#define MODSUB( a, b, m ) MODADD( a, (m)-(b), m ) + +#undef ALIGN +#ifdef WIN32 +#define ALIGN(n) +#else +#define ALIGN(n) __attribute__((aligned(n))) +#endif + +#undef PAUSE +#define PAUSE( t ) M_BEGIN \ + volatile int _i; \ + for ( _i = t; _i > 0; _i -- ); \ + M_END +#undef DIVF +#define DIVF( x, y ) ((x)/(y)) + +#undef DIVC +#define DIVC( x, y ) (((x)+(y)-1)/(y)) + +#undef DIVR +#define DIVR( x, y ) (((x)+((y)/2))/(y)) + +#undef SHRR +#define SHRR( x, n ) ((((x)>>((n)-1))+1)>>1) + +#undef BITN +#define BITN( w, n ) (((w)[(n)/32] >> ((n)%32)) & 1) + +#undef BITNSET +#define BITNSET( w, n, b ) M_BEGIN (w)[(n)/32] |= ((U32)(b))<<((n)%32); M_END + +/* -------------------------------- * + * Section attribute * + * -------------------------------- */ +#undef PLACE_IN_SECTION +#define PLACE_IN_SECTION( __x__ ) __attribute__((section (__x__))) + +/* ----------------------------------- * + * Packed usage (compiler dependent) * + * ----------------------------------- */ +#undef PACKED__ +#undef PACKED_STRUCT + +#if defined ( __CC_ARM ) + #if defined ( __GNUC__ ) + /* GNU extension */ + #define PACKED__ __attribute__((packed)) + #define PACKED_STRUCT struct PACKED__ + #elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050U) + #define PACKED__ __attribute__((packed)) + #define PACKED_STRUCT struct PACKED__ + #else + #define PACKED__(TYPE) __packed TYPE + #define PACKED_STRUCT PACKED__(struct) + #endif +#elif defined ( __GNUC__ ) + #define PACKED__ __attribute__((packed)) + #define PACKED_STRUCT struct PACKED__ +#elif defined (__ICCARM__) + #define PACKED_STRUCT __packed struct +#else + #define PACKED_STRUCT __packed struct +#endif + +#ifdef __cplusplus +} +#endif + +#endif /*__STM32_WPAN_COMMON_H */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c new file mode 100644 index 0000000..371cfdb --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.c @@ -0,0 +1,360 @@ +/** + ****************************************************************************** + * @file dbg_trace.c + * @author MCD Application Team + * @brief This file contains the Interface with BLE Drivers functions. + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Includes ------------------------------------------------------------------*/ +#include "utilities_common.h" +#include "stm_queue.h" +#include "dbg_trace.h" + +/* Definition of the function */ +#if !defined(__GNUC__) /* SW4STM32 */ +size_t __write(int handle, const unsigned char * buf, size_t bufSize); +#endif + +/** @addtogroup TRACE + * @{ + */ + + +/** @defgroup TRACE_LOG + * @brief TRACE Logging functions + * @{ + */ + +/* Private typedef -----------------------------------------------------------*/ +/** @defgroup TRACE Log private typedef + * @{ + */ + +/** + * @} + */ + +/* Private defines -----------------------------------------------------------*/ +/** @defgroup TRACE Log private defines + * @{ + */ + +/** + * @} + */ + +/* Private macros ------------------------------------------------------------*/ +/** @defgroup TRACE Log private macros + * @{ + */ +/** + * @} + */ + +/* Private variables ---------------------------------------------------------*/ +/** @defgroup TRACE Log private variables + * @{ + */ +#if (( CFG_DEBUG_TRACE_FULL != 0 ) || ( CFG_DEBUG_TRACE_LIGHT != 0 )) +#if (DBG_TRACE_USE_CIRCULAR_QUEUE != 0) +static queue_t MsgDbgTraceQueue; +static uint8_t MsgDbgTraceQueueBuff[DBG_TRACE_MSG_QUEUE_SIZE]; +#endif +__IO ITStatus DbgTracePeripheralReady = SET; +#endif +/** + * @} + */ + +/* Global variables ----------------------------------------------------------*/ +/** @defgroup TRACE Log Global variable + * @{ + */ +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup TRACE Log private function prototypes + * @{ + */ +#if (( CFG_DEBUG_TRACE_FULL != 0 ) || ( CFG_DEBUG_TRACE_LIGHT != 0 )) +static void DbgTrace_TxCpltCallback(void); +#endif + + +/** + * @} + */ + + +/* Private Functions Definition ------------------------------------------------------*/ +/** @defgroup TRACE Log Private function + * @{ + */ + + +/* Functions Definition ------------------------------------------------------*/ +/** @defgroup TRACE Log APIs + * @{ + */ + +/** + * @brief DbgTraceGetFileName: Return filename string extracted from full path information + * @param *fullPath Fullpath string (path + filename) + * @retval char* Pointer on filename string + */ + +const char *DbgTraceGetFileName(const char *fullpath) +{ + const char *ret = fullpath; + + if (strrchr(fullpath, '\\') != NULL) + { + ret = strrchr(fullpath, '\\') + 1; + } + else if (strrchr(fullpath, '/') != NULL) + { + ret = strrchr(fullpath, '/') + 1; + } + + return ret; +} + +/** + * @brief DbgTraceBuffer: Output buffer content information to output Stream + * @param *pBuffer Pointer on buffer to be output + * @param u32Length buffer Size + * @paramt strFormat string as expected by "printf" function. Used to desrcibe buffer content information. + * @param ... Parameters to be "formatted" in strFormat string (if any) + * @retval None + */ + +void DbgTraceBuffer(const void *pBuffer, uint32_t u32Length, const char *strFormat, ...) +{ + va_list vaArgs; + uint32_t u32Index; + va_start(vaArgs, strFormat); + vprintf(strFormat, vaArgs); + va_end(vaArgs); + for (u32Index = 0; u32Index < u32Length; u32Index ++) + { + printf(" %02X", ((const uint8_t *) pBuffer)[u32Index]); + } +} + +#if (( CFG_DEBUG_TRACE_FULL != 0 ) || ( CFG_DEBUG_TRACE_LIGHT != 0 )) +/** + * @brief DBG_TRACE USART Tx Transfer completed callback + * @param UartHandle: UART handle. + * @note Indicate the end of the transmission of a DBG_TRACE trace buffer to DBG_TRACE USART. If queue + * contains new trace data to transmit, start a new transmission. + * @retval None + */ +static void DbgTrace_TxCpltCallback(void) +{ +#if (DBG_TRACE_USE_CIRCULAR_QUEUE != 0) + uint8_t* buf; + uint16_t bufSize; + + BACKUP_PRIMASK(); + + DISABLE_IRQ(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + /* Remove element just sent to UART */ + CircularQueue_Remove(&MsgDbgTraceQueue,&bufSize); + + /* Sense if new data to be sent */ + buf=CircularQueue_Sense(&MsgDbgTraceQueue,&bufSize); + + + if ( buf != NULL) + { + RESTORE_PRIMASK(); + DbgOutputTraces((uint8_t*)buf, bufSize, DbgTrace_TxCpltCallback); + } + else + { + DbgTracePeripheralReady = SET; + RESTORE_PRIMASK(); + } + +#else + BACKUP_PRIMASK(); + + DISABLE_IRQ(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + DbgTracePeripheralReady = SET; + + RESTORE_PRIMASK(); +#endif +} +#endif + +void DbgTraceInit( void ) +{ +#if (( CFG_DEBUG_TRACE_FULL != 0 ) || ( CFG_DEBUG_TRACE_LIGHT != 0 )) + DbgOutputInit(); +#if (DBG_TRACE_USE_CIRCULAR_QUEUE != 0) + CircularQueue_Init(&MsgDbgTraceQueue, MsgDbgTraceQueueBuff, DBG_TRACE_MSG_QUEUE_SIZE, 0, CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG); +#endif +#endif + return; +} + + +#if (( CFG_DEBUG_TRACE_FULL != 0 ) || ( CFG_DEBUG_TRACE_LIGHT != 0 )) +#if defined(__GNUC__) /* SW4STM32 (GCC) */ +/** + * @brief _write: override the __write standard lib function to redirect printf to USART. + * @param handle output handle (STDIO, STDERR...) + * @param buf buffer to write + * @param bufsize buffer size + * @param ...: arguments to be formatted in format string + * @retval none + */ +size_t _write(int handle, const unsigned char * buf, size_t bufSize) +{ + return ( DbgTraceWrite(handle, buf, bufSize) ); +} + +#else +/** + * @brief __write: override the _write standard lib function to redirect printf to USART. + * @param handle output handle (STDIO, STDERR...) + * @param buf buffer to write + * @param bufsize buffer size + * @param ...: arguments to be formatted in format string + * @retval none + */ +size_t __write(int handle, const unsigned char * buf, size_t bufSize) +{ + return ( DbgTraceWrite(handle, buf, bufSize) ); +} +#endif /* #if defined(__GNUC__) */ + +/** + * @brief Override the standard lib function to redirect printf to USART. + * @param handle output handle (STDIO, STDERR...) + * @param buf buffer to write + * @param bufsize buffer size + * @retval Number of elements written + */ +size_t DbgTraceWrite(int handle, const unsigned char * buf, size_t bufSize) +{ + size_t chars_written = 0; + uint8_t* buffer; + + BACKUP_PRIMASK(); + + /* Ignore flushes */ + if ( handle == -1 ) + { + chars_written = ( size_t ) 0; + } + /* Only allow stdout/stderr output */ + else if ( ( handle != 1 ) && ( handle != 2 ) ) + { + chars_written = ( size_t ) - 1; + } + /* Parameters OK, call the low-level character output routine */ + else if (bufSize != 0) + { + chars_written = bufSize; + /* If queue emepty and TX free, send directly */ + /* CS Start */ + +#if (DBG_TRACE_USE_CIRCULAR_QUEUE != 0) + DISABLE_IRQ(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + buffer=CircularQueue_Add(&MsgDbgTraceQueue,(uint8_t*)buf, bufSize,1); + if (buffer && DbgTracePeripheralReady) + { + DbgTracePeripheralReady = RESET; + RESTORE_PRIMASK(); + DbgOutputTraces((uint8_t*)buffer, bufSize, DbgTrace_TxCpltCallback); + } + else + { + RESTORE_PRIMASK(); + } +#else + DISABLE_IRQ(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + DbgTracePeripheralReady = RESET; + RESTORE_PRIMASK(); + + DbgOutputTraces((uint8_t*)buf, bufSize, DbgTrace_TxCpltCallback); + while (!DbgTracePeripheralReady); +#endif + /* CS END */ + } + return ( chars_written ); +} + +#if defined ( __CC_ARM ) || defined (__ARMCC_VERSION) /* Keil */ + +/** + Called from assert() and prints a message on stderr and calls abort(). + + \param[in] expr assert expression that was not TRUE + \param[in] file source file of the assertion + \param[in] line source line of the assertion +*/ +__attribute__((weak,noreturn)) +void __aeabi_assert (const char *expr, const char *file, int line) { + char str[12], *p; + + fputs("*** assertion failed: ", stderr); + fputs(expr, stderr); + fputs(", file ", stderr); + fputs(file, stderr); + fputs(", line ", stderr); + + p = str + sizeof(str); + *--p = '\0'; + *--p = '\n'; + while (line > 0) { + *--p = '0' + (line % 10); + line /= 10; + } + fputs(p, stderr); + + abort(); +} + +/* For KEIL re-implement our own version of fputc */ +int fputc(int ch, FILE *f) +{ + /* temp char avoids endianness issue */ + char tempch = ch; + /* Write one character to Debug Circular Queue */ + DbgTraceWrite(1U, (const unsigned char *) &tempch, 1); + return ch; +} + +#endif /* #if defined ( __CC_ARM ) */ + +#endif /* #if (( CFG_DEBUG_TRACE_FULL != 0 ) || ( CFG_DEBUG_TRACE_LIGHT != 0 )) */ + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h new file mode 100644 index 0000000..bf08e3d --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/dbg_trace.h @@ -0,0 +1,103 @@ +/** + ****************************************************************************** + * @file dbg_trace.h + * @author MCD Application Team + * @brief Header for dbg_trace.c + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __DBG_TRACE_H +#define __DBG_TRACE_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Exported types ------------------------------------------------------------*/ +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ +#if ( ( CFG_DEBUG_TRACE_FULL != 0 ) || ( CFG_DEBUG_TRACE_LIGHT != 0 ) ) +#define PRINT_LOG_BUFF_DBG(...) DbgTraceBuffer(__VA_ARGS__) +#if ( CFG_DEBUG_TRACE_FULL != 0 ) +#define PRINT_MESG_DBG(...) do{printf("\r\n [%s][%s][%d] ", DbgTraceGetFileName(__FILE__),__FUNCTION__,__LINE__);printf(__VA_ARGS__);}while(0); +#else +#define PRINT_MESG_DBG printf +#endif +#else +#define PRINT_LOG_BUFF_DBG(...) +#define PRINT_MESG_DBG(...) +#endif + +#define PRINT_NO_MESG(...) + +/* Exported functions ------------------------------------------------------- */ + + /** + * @brief Request the user to initialize the peripheral to output traces + * + * @param None + * @retval None + */ +extern void DbgOutputInit( void ); + +/** + * @brief Request the user to sent the traces on the output peripheral + * + * @param p_data: Address of the buffer to be sent + * @param size: Size of the data to be sent + * @param cb: Function to be called when the data has been sent + * @retval None + */ +extern void DbgOutputTraces( uint8_t *p_data, uint16_t size, void (*cb)(void) ); + +/** + * @brief DbgTraceInit Initialize Logging feature. + * + * @param: None + * @retval: None + */ +void DbgTraceInit( void ); + +/**********************************************************************************************************************/ +/** This function outputs into the log the buffer (in hex) and the provided format string and arguments. + *********************************************************************************************************************** + * + * @param pBuffer Buffer to be output into the logs. + * @param u32Length Length of the buffer, in bytes. + * @param strFormat The format string in printf() style. + * @param ... Arguments of the format string. + * + **********************************************************************************************************************/ +void DbgTraceBuffer( const void *pBuffer , uint32_t u32Length , const char *strFormat , ... ); + +const char *DbgTraceGetFileName( const char *fullpath ); + +/** + * @brief Override the standard lib function to redirect printf to USART. + * @param handle output handle (STDIO, STDERR...) + * @param buf buffer to write + * @param bufsize buffer size + * @retval Number of elements written + */ +size_t DbgTraceWrite(int handle, const unsigned char * buf, size_t bufSize); + +#ifdef __cplusplus +} +#endif + +#endif /*__DBG_TRACE_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/otp.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/otp.c new file mode 100644 index 0000000..2471bf7 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/otp.c @@ -0,0 +1,52 @@ +/** + ****************************************************************************** + * @file otp.c + * @author MCD Application Team + * @brief OTP manager + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Includes ------------------------------------------------------------------*/ +#include "utilities_common.h" + +#include "otp.h" + +/* Private typedef -----------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Functions Definition ------------------------------------------------------*/ + +uint8_t * OTP_Read( uint8_t id ) +{ + uint8_t *p_id; + + p_id = (uint8_t*)(CFG_OTP_END_ADRESS - 7) ; + + while( ((*( p_id + 7 )) != id) && ( p_id != (uint8_t*)CFG_OTP_BASE_ADDRESS) ) + { + p_id -= 8 ; + } + + if((*( p_id + 7 )) != id) + { + p_id = 0 ; + } + + return p_id ; +} + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/otp.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/otp.h new file mode 100644 index 0000000..c4f2a40 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/otp.h @@ -0,0 +1,65 @@ +/** + ****************************************************************************** + * @file otp.h + * @author MCD Application Team + * @brief OTP manager interface + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __OTP_H +#define __OTP_H + +#ifdef __cplusplus +extern "C" { +#endif + + /* Includes ------------------------------------------------------------------*/ +#include "utilities_common.h" + + /* Exported types ------------------------------------------------------------*/ + typedef PACKED_STRUCT + { + uint8_t bd_address[6]; + uint8_t hse_tuning; + uint8_t id; + } OTP_ID0_t; + + /* Exported constants --------------------------------------------------------*/ + /* External variables --------------------------------------------------------*/ + /* Exported macros -----------------------------------------------------------*/ + /* Exported functions ------------------------------------------------------- */ + + /** + * @brief This API return the address (64 bits aligned) of the ID parameter in the OTP + * It returns the first ID declaration found from the higher address down to the base address + * The user shall fill the OTP from the base address to the top of the OTP so that the more recent + * declaration is returned by the API + * The OTP manager handles only 64bits parameter + * | Id | Parameter | + * | 8bits | 58bits | + * | MSB | LSB | + * + * @param id: ID of the parameter to read from OTP + * @retval Address of the ID in the OTP - returns 0 when no ID found + */ + uint8_t * OTP_Read( uint8_t id ); + +#ifdef __cplusplus +} +#endif + +#endif /*__OTP_H */ + + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_list.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_list.c new file mode 100644 index 0000000..69c8c06 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_list.c @@ -0,0 +1,207 @@ +/** + ****************************************************************************** + * @file stm_list.c + * @author MCD Application Team + * @brief TCircular Linked List Implementation. + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/****************************************************************************** + * Include Files + ******************************************************************************/ +#include "utilities_common.h" + +#include "stm_list.h" + +/****************************************************************************** + * Function Definitions + ******************************************************************************/ +void LST_init_head (tListNode * listHead) +{ + listHead->next = listHead; + listHead->prev = listHead; +} + +uint8_t LST_is_empty (tListNode * listHead) +{ + uint32_t primask_bit; + uint8_t return_value; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + if(listHead->next == listHead) + { + return_value = TRUE; + } + else + { + return_value = FALSE; + } + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ + + return return_value; +} + +void LST_insert_head (tListNode * listHead, tListNode * node) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + node->next = listHead->next; + node->prev = listHead; + listHead->next = node; + (node->next)->prev = node; + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + + +void LST_insert_tail (tListNode * listHead, tListNode * node) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + node->next = listHead; + node->prev = listHead->prev; + listHead->prev = node; + (node->prev)->next = node; + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + + +void LST_remove_node (tListNode * node) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + (node->prev)->next = node->next; + (node->next)->prev = node->prev; + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + + +void LST_remove_head (tListNode * listHead, tListNode ** node ) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + *node = listHead->next; + LST_remove_node (listHead->next); + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + + +void LST_remove_tail (tListNode * listHead, tListNode ** node ) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + *node = listHead->prev; + LST_remove_node (listHead->prev); + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + + +void LST_insert_node_after (tListNode * node, tListNode * ref_node) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + node->next = ref_node->next; + node->prev = ref_node; + ref_node->next = node; + (node->next)->prev = node; + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + + +void LST_insert_node_before (tListNode * node, tListNode * ref_node) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + node->next = ref_node; + node->prev = ref_node->prev; + ref_node->prev = node; + (node->prev)->next = node; + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + + +int LST_get_size (tListNode * listHead) +{ + int size = 0; + tListNode * temp; + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + temp = listHead->next; + while (temp != listHead) + { + size++; + temp = temp->next; + } + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ + + return (size); +} + +void LST_get_next_node (tListNode * ref_node, tListNode ** node) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + *node = ref_node->next; + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + + +void LST_get_prev_node (tListNode * ref_node, tListNode ** node) +{ + uint32_t primask_bit; + + primask_bit = __get_PRIMASK(); /**< backup PRIMASK bit */ + __disable_irq(); /**< Disable all interrupts by setting PRIMASK bit on Cortex*/ + + *node = ref_node->prev; + + __set_PRIMASK(primask_bit); /**< Restore PRIMASK bit*/ +} + diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_list.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_list.h new file mode 100644 index 0000000..83bbe54 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_list.h @@ -0,0 +1,63 @@ +/** + ****************************************************************************** + * @file stm_list.h + * @author MCD Application Team + * @brief Header file for linked list library. + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +#ifndef _STM_LIST_H_ +#define _STM_LIST_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32_wpan_common.h" + +typedef PACKED_STRUCT _tListNode { + struct _tListNode * next; + struct _tListNode * prev; +} tListNode; + +void LST_init_head (tListNode * listHead); + +uint8_t LST_is_empty (tListNode * listHead); + +void LST_insert_head (tListNode * listHead, tListNode * node); + +void LST_insert_tail (tListNode * listHead, tListNode * node); + +void LST_remove_node (tListNode * node); + +void LST_remove_head (tListNode * listHead, tListNode ** node ); + +void LST_remove_tail (tListNode * listHead, tListNode ** node ); + +void LST_insert_node_after (tListNode * node, tListNode * ref_node); + +void LST_insert_node_before (tListNode * node, tListNode * ref_node); + +int LST_get_size (tListNode * listHead); + +void LST_get_next_node (tListNode * ref_node, tListNode ** node); + +void LST_get_prev_node (tListNode * ref_node, tListNode ** node); + +#ifdef __cplusplus +} +#endif + +#endif /* _STM_LIST_H_ */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c new file mode 100644 index 0000000..3054812 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_queue.c @@ -0,0 +1,383 @@ +/** + ****************************************************************************** + * @file stm_queue.c + * @author MCD Application Team + * @brief Queue management + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ + +/* Includes ------------------------------------------------------------------*/ +#include "utilities_common.h" + +#include "stm_queue.h" + +/* Private define ------------------------------------------------------------*/ +/* Private typedef -------------------------------------------------------------*/ +/* Private macro -------------------------------------------------------------*/ +#define MOD(X,Y) (((X) >= (Y)) ? ((X)-(Y)) : (X)) + +/* Private variables ---------------------------------------------------------*/ +/* Global variables ----------------------------------------------------------*/ +/* Extern variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Private functions ---------------------------------------------------------*/ +/* Public functions ----------------------------------------------------------*/ + +/** + * @brief Initilaiilze queue structure . + * @note This function is used to initialize the global queue structure. + * @param q: pointer on queue structure to be initialised + * @param queueBuffer: pointer on Queue Buffer + * @param queueSize: Size of Queue Buffer + * @param elementSize: Size of an element in the queue. if =0, the queue will manage variable sizze elements + * @retval always 0 + */ +int CircularQueue_Init(queue_t *q, uint8_t* queueBuffer, uint32_t queueSize, uint16_t elementSize, uint8_t optionFlags) +{ + q->qBuff = queueBuffer; + q->first = 0; + q->last = 0; /* queueSize-1; */ + q->byteCount = 0; + q->elementCount = 0; + q->queueMaxSize = queueSize; + q->elementSize = elementSize; + q->optionFlags = optionFlags; + + if ((optionFlags & CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG) && q-> elementSize) + { + /* can not deal with splitting at the end of buffer with fixed size element */ + return -1; + } + return 0; +} + +/** + * @brief Add element to the queue . + * @note This function is used to add one or more element(s) to the Circular Queue . + * @param q: pointer on queue structure to be handled + * @param X; pointer on element(s) to be added + * @param elementSize: Size of element to be added to the queue. Only used if the queue manage variable size elements + * @param nbElements: number of elements in the in buffer pointed by x + * @retval pointer on last element just added to the queue, NULL if the element to be added do not fit in the queue (too big) + */ +uint8_t* CircularQueue_Add(queue_t *q, uint8_t* x, uint16_t elementSize, uint32_t nbElements) +{ + + uint8_t* ptr = NULL; /* fct return ptr to the element freshly added, if no room fct return NULL */ + uint16_t curElementSize = 0; /* the size of the element currently stored at q->last position */ + uint8_t elemSizeStorageRoom = 0 ; /* Indicate the header (which contain only size) of element in case of varaibale size element (q->elementsize == 0) */ + uint32_t curBuffPosition; /* the current position in the queue buffer */ + uint32_t i; /* loop counter */ + uint32_t NbBytesToCopy = 0, NbCopiedBytes = 0 ; /* Indicators for copying bytes in queue */ + uint32_t eob_free_size; /* Eof End of Quque Buffer Free Size */ + uint8_t wrap_will_occur = 0; /* indicate if a wrap around will occurs */ + uint8_t wrapped_element_eob_size; /* In case of Wrap around, indicate size of parta of element that fit at thened of the queuue buffer */ + uint16_t overhead = 0; /* In case of CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG or CIRCULAR_QUEUE_NO_WRAP_FLAG options, + indcate the size overhead that will be generated by adding the element with wrap management (split or no wrap ) */ + + + elemSizeStorageRoom = (q->elementSize == 0) ? 2 : 0; + /* retrieve the size of last element sored: the value stored at the beginning of the queue element if element size is variable otherwise take it from fixed element Size member */ + if (q->byteCount) + { + curElementSize = (q->elementSize == 0) ? q->qBuff[q->last] + ((q->qBuff[MOD((q->last+1), q->queueMaxSize)])<<8) + 2 : q->elementSize; + } + /* if queue element have fixed size , reset the elementSize arg with fixed element size value */ + if (q->elementSize > 0) + { + elementSize = q->elementSize; + } + + eob_free_size = (q->last >= q->first) ? q->queueMaxSize - (q->last + curElementSize) : 0; + + /* check how many bytes of wrapped element (if anay) are at end of buffer */ + wrapped_element_eob_size = (((elementSize + elemSizeStorageRoom )*nbElements) < eob_free_size) ? 0 : (eob_free_size % (elementSize + elemSizeStorageRoom)); + wrap_will_occur = wrapped_element_eob_size > elemSizeStorageRoom; + + overhead = (wrap_will_occur && (q->optionFlags & CIRCULAR_QUEUE_NO_WRAP_FLAG)) ? wrapped_element_eob_size : overhead; + overhead = (wrap_will_occur && (q->optionFlags & CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG)) ? elemSizeStorageRoom : overhead; + + + /* Store now the elements if ennough room for all elements */ + if (elementSize && ((q->byteCount + ((elementSize + elemSizeStorageRoom )*nbElements) + overhead) <= q->queueMaxSize)) + { + /* loop to add all elements */ + for (i=0; i < nbElements; i++) + { + q->last = MOD ((q->last + curElementSize),q->queueMaxSize); + curBuffPosition = q->last; + + /* store the element */ + /* store first the element size if element size is variable */ + if (q->elementSize == 0) + { + q->qBuff[curBuffPosition++]= elementSize & 0xFF; + curBuffPosition = MOD(curBuffPosition, q->queueMaxSize); + q->qBuff[curBuffPosition++]= (elementSize & 0xFF00) >> 8 ; + curBuffPosition = MOD(curBuffPosition, q->queueMaxSize); + q->byteCount += 2; + } + + /* Identify number of bytes of copy takeing account possible wrap, in this case NbBytesToCopy will contains size that fit at end of the queue buffer */ + NbBytesToCopy = MIN((q->queueMaxSize-curBuffPosition),elementSize); + /* check if no wrap (NbBytesToCopy == elementSize) or if Wrap and no spsicf option; + In this case part of data will copied at the end of the buffer and the rest a the beginning */ + if ((NbBytesToCopy == elementSize) || ((NbBytesToCopy < elementSize) && (q->optionFlags == CIRCULAR_QUEUE_NO_FLAG))) + { + /* Copy First part (or emtire buffer ) from current position up to the end of the buffer queue (or before if enough room) */ + memcpy(&q->qBuff[curBuffPosition],&x[i*elementSize],NbBytesToCopy); + /* Adjust bytes count */ + q->byteCount += NbBytesToCopy; + /* Wrap */ + curBuffPosition = 0; + /* set NbCopiedBytes bytes with ampount copied */ + NbCopiedBytes = NbBytesToCopy; + /* set the rest to copy if wrao , if no wrap will be 0 */ + NbBytesToCopy = elementSize - NbBytesToCopy; + /* set the current element Size, will be used to calaculate next last position at beginning of loop */ + curElementSize = (elementSize) + elemSizeStorageRoom ; + } + else if (NbBytesToCopy) /* We have a wrap to manage */ + { + /* case of CIRCULAR_QUEUE_NO_WRAP_FLAG option */ + if (q->optionFlags & CIRCULAR_QUEUE_NO_WRAP_FLAG) + { + /* if element size are variable and NO_WRAP option, Invalidate end of buffer setting 0xFFFF size*/ + if (q->elementSize == 0) + { + q->qBuff[curBuffPosition-2] = 0xFF; + q->qBuff[curBuffPosition-1] = 0xFF; + } + q->byteCount += NbBytesToCopy; /* invalid data at the end of buffer are take into account in byteCount */ + /* No bytes coped a the end of buffer */ + NbCopiedBytes = 0; + /* all element to be copied at the begnning of buffer */ + NbBytesToCopy = elementSize; + /* Wrap */ + curBuffPosition = 0; + /* if variable size element, invalidate end of buffer setting OxFFFF in element header (size) */ + if (q->elementSize == 0) + { + q->qBuff[curBuffPosition++] = NbBytesToCopy & 0xFF; + q->qBuff[curBuffPosition++] = (NbBytesToCopy & 0xFF00) >> 8 ; + q->byteCount += 2; + } + + } + /* case of CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG option */ + else if (q->optionFlags & CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG) + { + if (q->elementSize == 0) + { + /* reset the size of current element to the nb bytes fitting at the end of buffer */ + q->qBuff[curBuffPosition-2] = NbBytesToCopy & 0xFF; + q->qBuff[curBuffPosition-1] = (NbBytesToCopy & 0xFF00) >> 8 ; + /* copy the bytes */ + memcpy(&q->qBuff[curBuffPosition],&x[i*elementSize],NbBytesToCopy); + q->byteCount += NbBytesToCopy; + /* set the number of copied bytes */ + NbCopiedBytes = NbBytesToCopy; + /* set rest of data to be copied to begnning of buffer */ + NbBytesToCopy = elementSize - NbBytesToCopy; + /* one element more dur to split in 2 elements */ + q->elementCount++; + /* Wrap */ + curBuffPosition = 0; + /* Set new size for rest of data */ + q->qBuff[curBuffPosition++] = NbBytesToCopy & 0xFF; + q->qBuff[curBuffPosition++] = (NbBytesToCopy & 0xFF00) >> 8 ; + q->byteCount += 2; + } + else + { + /* Should not occur */ + /* can not manage split Flag on Fixed size element */ + /* Buffer is corrupted */ + return NULL; + } + } + curElementSize = (NbBytesToCopy) + elemSizeStorageRoom ; + q->last = 0; + } + + /* some remaining byte to copy */ + if (NbBytesToCopy) + { + memcpy(&q->qBuff[curBuffPosition],&x[(i*elementSize)+NbCopiedBytes],NbBytesToCopy); + q->byteCount += NbBytesToCopy; + } + + /* One more element */ + q->elementCount++; + } + + ptr = q->qBuff + (MOD((q->last+elemSizeStorageRoom ),q->queueMaxSize)); + } + /* for Breakpoint only...to remove */ + else + { + return NULL; + } + return ptr; +} + + +/** + * @brief Remove element from the queue and copy it in provided buffer + * @note This function is used to remove and element from the Circular Queue . + * @param q: pointer on queue structure to be handled + * @param elementSize: Pointer to return Size of element to be removed + * @param buffer: destination buffer where to copy element + * @retval Pointer on removed element. NULL if queue was empty + */ +uint8_t* CircularQueue_Remove_Copy(queue_t *q, uint16_t* elementSize, uint8_t* buffer) +{ + return NULL; +} + + + +/** + * @brief Remove element from the queue. + * @note This function is used to remove and element from the Circular Queue . + * @param q: pointer on queue structure to be handled + * @param elementSize: Pointer to return Size of element to be removed (ignored if NULL) + * @retval Pointer on removed element. NULL if queue was empty + */ +uint8_t* CircularQueue_Remove(queue_t *q, uint16_t* elementSize) +{ + uint8_t elemSizeStorageRoom = 0; + uint8_t* ptr= NULL; + elemSizeStorageRoom = (q->elementSize == 0) ? 2 : 0; + uint16_t eltSize = 0; + if (q->byteCount > 0) + { + /* retrieve element Size */ + eltSize = (q->elementSize == 0) ? q->qBuff[q->first] + ((q->qBuff[MOD((q->first+1), q->queueMaxSize)])<<8) : q->elementSize; + + if ((q->optionFlags & CIRCULAR_QUEUE_NO_WRAP_FLAG) && !(q->optionFlags & CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG)) + { + if (((eltSize == 0xFFFF) && q->elementSize == 0 ) || + ((q->first > q->last) && q->elementSize && ((q->queueMaxSize - q->first) < q->elementSize))) + { + /* all data from current position up to the end of buffer are invalid */ + q->byteCount -= (q->queueMaxSize - q->first); + /* Adjust first element pos */ + q->first = 0; + /* retrieve the right size after the wrap [if variable size element] */ + eltSize = (q->elementSize == 0) ? q->qBuff[q->first] + ((q->qBuff[MOD((q->first+1), q->queueMaxSize)])<<8) : q->elementSize; + } + } + + /* retrieve element */ + ptr = q->qBuff + (MOD((q->first + elemSizeStorageRoom), q->queueMaxSize)); + + /* adjust byte count */ + q->byteCount -= (eltSize + elemSizeStorageRoom) ; + + /* Adjust q->first */ + if (q->byteCount > 0) + { + q->first = MOD((q->first+ eltSize + elemSizeStorageRoom ), q->queueMaxSize); + } + /* adjust element count */ + --q->elementCount; + } + if (elementSize != NULL) + { + *elementSize = eltSize; + } + return ptr; +} + + +/** + * @brief "Sense" first element of the queue, without removing it and copy it in provided buffer + * @note This function is used to return a pointer on the first element of the queue without removing it. + * @param q: pointer on queue structure to be handled + * @param elementSize: Pointer to return Size of element to be removed + * @param buffer: destination buffer where to copy element + * @retval Pointer on sensed element. NULL if queue was empty + */ + +uint8_t* CircularQueue_Sense_Copy(queue_t *q, uint16_t* elementSize, uint8_t* buffer) +{ + return NULL; +} + + +/** + * @brief "Sense" first element of the queue, without removing it. + * @note This function is used to return a pointer on the first element of the queue without removing it. + * @param q: pointer on queue structure to be handled + * @param elementSize: Pointer to return Size of element to be removed (ignored if NULL) + * @retval Pointer on sensed element. NULL if queue was empty + */ +uint8_t* CircularQueue_Sense(queue_t *q, uint16_t* elementSize) +{ + uint8_t elemSizeStorageRoom = 0; + uint8_t* x= NULL; + elemSizeStorageRoom = (q->elementSize == 0) ? 2 : 0; + uint16_t eltSize = 0; + uint32_t FirstElemetPos = 0; + + if (q->byteCount > 0) + { + FirstElemetPos = q->first; + eltSize = (q->elementSize == 0) ? q->qBuff[q->first] + ((q->qBuff[MOD((q->first+1), q->queueMaxSize)])<<8) : q->elementSize; + + if ((q->optionFlags & CIRCULAR_QUEUE_NO_WRAP_FLAG) && !(q->optionFlags & CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG)) + { + if (((eltSize == 0xFFFF) && q->elementSize == 0 ) || + ((q->first > q->last) && q->elementSize && ((q->queueMaxSize - q->first) < q->elementSize))) + + { + /* all data from current position up to the end of buffer are invalid */ + FirstElemetPos = 0; /* wrap to the begiining of buffer */ + + /* retrieve the right size after the wrap [if variable size element] */ + eltSize = (q->elementSize == 0) ? q->qBuff[FirstElemetPos]+ ((q->qBuff[MOD((FirstElemetPos+1), q->queueMaxSize)])<<8) : q->elementSize; + } + } + /* retrieve element */ + x = q->qBuff + (MOD((FirstElemetPos + elemSizeStorageRoom), q->queueMaxSize)); + } + if (elementSize != NULL) + { + *elementSize = eltSize; + } + return x; +} + +/** + * @brief Check if queue is empty. + * @note This function is used to to check if the queue is empty. + * @param q: pointer on queue structure to be handled + * @retval TRUE (!0) if the queue is empyu otherwise FALSE (0) + */ +int CircularQueue_Empty(queue_t *q) +{ + int ret=FALSE; + if (q->byteCount <= 0) + { + ret=TRUE; + } + return ret; +} + +int CircularQueue_NbElement(queue_t *q) +{ + return q->elementCount; +} diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_queue.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_queue.h new file mode 100644 index 0000000..5c0e9e5 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/stm_queue.h @@ -0,0 +1,59 @@ +/** + ****************************************************************************** + * @file stm_queue.h + * @author MCD Application Team + * @brief Header for stm_queue.c + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM_QUEUE_H +#define __STM_QUEUE_H + +/* Includes ------------------------------------------------------------------*/ +/* Exported define -----------------------------------------------------------*/ +/* Options flags */ +#define CIRCULAR_QUEUE_NO_FLAG 0 +#define CIRCULAR_QUEUE_NO_WRAP_FLAG 1 +#define CIRCULAR_QUEUE_SPLIT_IF_WRAPPING_FLAG 2 + + +/* Exported types ------------------------------------------------------------*/ +typedef struct { + uint8_t* qBuff; /* queue buffer, , provided by init fct */ + uint32_t queueMaxSize; /* size of the queue, provided by init fct (in bytes)*/ + uint16_t elementSize; /* -1 variable. If variable element size the size is stored in the 4 first of the queue element */ + uint32_t first; /* position of first element */ + uint32_t last; /* position of last element */ + uint32_t byteCount; /* number of bytes in the queue */ + uint32_t elementCount; /* number of element in the queue */ + uint8_t optionFlags; /* option to enable specific features */ +} queue_t; + +/* Exported constants --------------------------------------------------------*/ + +/* Exported macro ------------------------------------------------------------*/ +/* Exported functions ------------------------------------------------------- */ +int CircularQueue_Init(queue_t *q, uint8_t* queueBuffer, uint32_t queueSize, uint16_t elementSize, uint8_t optionlags); +uint8_t* CircularQueue_Add(queue_t *q, uint8_t* x, uint16_t elementSize, uint32_t nbElements); +uint8_t* CircularQueue_Remove(queue_t *q, uint16_t* elementSize); +uint8_t* CircularQueue_Sense(queue_t *q, uint16_t* elementSize); +int CircularQueue_Empty(queue_t *q); +int CircularQueue_NbElement(queue_t *q); +uint8_t* CircularQueue_Remove_Copy(queue_t *q, uint16_t* elementSize, uint8_t* buffer); +uint8_t* CircularQueue_Sense_Copy(queue_t *q, uint16_t* elementSize, uint8_t* buffer); + + +#endif /* __STM_QUEUE_H */ diff --git a/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/utilities_common.h b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/utilities_common.h new file mode 100644 index 0000000..b0d0cc1 --- /dev/null +++ b/firmware/memory_chip_gone/Middlewares/ST/STM32_WPAN/utilities/utilities_common.h @@ -0,0 +1,159 @@ +/** + ****************************************************************************** + * @file utilities_common.h + * @author MCD Application Team + * @brief Common file to utilities + ****************************************************************************** + * @attention + * + * Copyright (c) 2018-2021 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __UTILITIES_COMMON_H +#define __UTILITIES_COMMON_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include + +#include "app_conf.h" + + /* -------------------------------- * + * Basic definitions * + * -------------------------------- */ + +#undef NULL +#define NULL 0 + +#undef FALSE +#define FALSE 0 + +#undef TRUE +#define TRUE (!0) + + /* -------------------------------- * + * Critical Section definition * + * -------------------------------- */ +#undef BACKUP_PRIMASK +#define BACKUP_PRIMASK() uint32_t primask_bit= __get_PRIMASK() + +#undef DISABLE_IRQ +#define DISABLE_IRQ() __disable_irq() + +#undef RESTORE_PRIMASK +#define RESTORE_PRIMASK() __set_PRIMASK(primask_bit) + + /* -------------------------------- * + * Macro delimiters * + * -------------------------------- */ +#undef M_BEGIN +#define M_BEGIN do { + +#undef M_END +#define M_END } while(0) + + /* -------------------------------- * + * Some useful macro definitions * + * -------------------------------- */ +#undef MAX +#define MAX( x, y ) (((x)>(y))?(x):(y)) + +#undef MIN +#define MIN( x, y ) (((x)<(y))?(x):(y)) + +#undef MODINC +#define MODINC( a, m ) M_BEGIN (a)++; if ((a)>=(m)) (a)=0; M_END + +#undef MODDEC +#define MODDEC( a, m ) M_BEGIN if ((a)==0) (a)=(m); (a)--; M_END + +#undef MODADD +#define MODADD( a, b, m ) M_BEGIN (a)+=(b); if ((a)>=(m)) (a)-=(m); M_END + +#undef MODSUB +#define MODSUB( a, b, m ) MODADD( a, (m)-(b), m ) + +#undef ALIGN +#ifdef WIN32 +#define ALIGN(n) +#else +#define ALIGN(n) __attribute__((aligned(n))) +#endif + +#undef PAUSE +#define PAUSE( t ) M_BEGIN \ + volatile int _i; \ + for ( _i = t; _i > 0; _i -- ); \ + M_END +#undef DIVF +#define DIVF( x, y ) ((x)/(y)) + +#undef DIVC +#define DIVC( x, y ) (((x)+(y)-1)/(y)) + +#undef DIVR +#define DIVR( x, y ) (((x)+((y)/2))/(y)) + +#undef SHRR +#define SHRR( x, n ) ((((x)>>((n)-1))+1)>>1) + +#undef BITN +#define BITN( w, n ) (((w)[(n)/32] >> ((n)%32)) & 1) + +#undef BITNSET +#define BITNSET( w, n, b ) M_BEGIN (w)[(n)/32] |= ((U32)(b))<<((n)%32); M_END + +/* -------------------------------- * + * Section attribute * + * -------------------------------- */ +#define PLACE_IN_SECTION( __x__ ) __attribute__((section (__x__))) + +/* ----------------------------------- * + * Packed usage (compiler dependent) * + * ----------------------------------- */ +#undef PACKED__ +#undef PACKED_STRUCT + +#if defined ( __CC_ARM ) + #if defined ( __GNUC__ ) + /* GNU extension */ + #define PACKED__ __attribute__((packed)) + #define PACKED_STRUCT struct PACKED__ + #elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050U) + #define PACKED__ __attribute__((packed)) + #define PACKED_STRUCT struct PACKED__ + #else + #define PACKED__(TYPE) __packed TYPE + #define PACKED_STRUCT PACKED__(struct) + #endif +#elif defined ( __GNUC__ ) + #define PACKED__ __attribute__((packed)) + #define PACKED_STRUCT struct PACKED__ +#elif defined (__ICCARM__) + #define PACKED_STRUCT __packed struct +#else + #define PACKED_STRUCT __packed struct +#endif + +#ifdef __cplusplus +} +#endif + +#endif /*__UTILITIES_COMMON_H */ + + diff --git a/firmware/memory_chip_gone/STM32WB55CGUX_FLASH.ld b/firmware/memory_chip_gone/STM32WB55CGUX_FLASH.ld new file mode 100644 index 0000000..6345947 --- /dev/null +++ b/firmware/memory_chip_gone/STM32WB55CGUX_FLASH.ld @@ -0,0 +1,185 @@ +/* +****************************************************************************** +** +** File : LinkerScript.ld +** +** Author : STM32CubeIDE +** +** Abstract : Linker script for STM32WB55xG Device +** 1024Kbytes FLASH +** 256Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2025 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. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K +RAM (xrw) : ORIGIN = 0x20000008, LENGTH = 0x2FFF8 +RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } >FLASH + .ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } + MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED + MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED + + /* used by the startup to initialize .MB_MEM2 data */ + _siMB_MEM2 = LOADADDR(.MB_MEM2); + .MB_MEM2 : + { + _sMB_MEM2 = . ; + *(MB_MEM2) ; + _eMB_MEM2 = . ; + } >RAM_SHARED AT> FLASH +} diff --git a/firmware/memory_chip_gone/STM32WB55CGUX_RAM.ld b/firmware/memory_chip_gone/STM32WB55CGUX_RAM.ld new file mode 100644 index 0000000..e8321cf --- /dev/null +++ b/firmware/memory_chip_gone/STM32WB55CGUX_RAM.ld @@ -0,0 +1,185 @@ +/* +****************************************************************************** +** +** File : LinkerScript.ld (debug in RAM dedicated) +** +** Author : STM32CubeIDE +** +** Abstract : Linker script for STM32WB55xG Device +** 1024Kbytes FLASH +** 256Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +** Copyright (c) 2025 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. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K +FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K +RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into RAM */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >RAM + + /* The program code and other data goes into RAM */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* sections */ + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >RAM + + /* Constant data goes into RAM */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >RAM + + .ARM.extab (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + *(.ARM.extab* .gnu.linkonce.armextab.*) + } >RAM + .ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >RAM + + .preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >RAM + .init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >RAM + .fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >RAM + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } + MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED + MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED + + /* used by the startup to initialize .MB_MEM2 data */ + _siMB_MEM2 = LOADADDR(.MB_MEM2); + .MB_MEM2 : + { + _sMB_MEM2 = . ; + *(MB_MEM2) ; + _eMB_MEM2 = . ; + } >RAM_SHARED +} diff --git a/firmware/memory_chip_gone/STM32_WPAN/App/app_ble.c b/firmware/memory_chip_gone/STM32_WPAN/App/app_ble.c new file mode 100644 index 0000000..2142009 --- /dev/null +++ b/firmware/memory_chip_gone/STM32_WPAN/App/app_ble.c @@ -0,0 +1,1432 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file App/app_ble.c + * @author MCD Application Team + * @brief BLE Application + ***************************************************************************** + * @attention + * + * Copyright (c) 2026 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 "app_common.h" + +#include "dbg_trace.h" +#include "ble.h" +#include "tl.h" +#include "app_ble.h" + +#include "stm32_seq.h" +#include "shci.h" +#include "stm32_lpm.h" +#include "otp.h" + +#include "p2p_server_app.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ + +/** + * security parameters structure + */ +typedef struct _tSecurityParams +{ + /** + * IO capability of the device + */ + uint8_t ioCapability; + + /** + * Authentication requirement of the device + * Man In the Middle protection required? + */ + uint8_t mitm_mode; + + /** + * bonding mode of the device + */ + uint8_t bonding_mode; + + /** + * this variable indicates whether to use a fixed pin + * during the pairing process or a passkey has to be + * requested to the application during the pairing process + * 0 implies use fixed pin and 1 implies request for passkey + */ + uint8_t Use_Fixed_Pin; + + /** + * minimum encryption key size requirement + */ + uint8_t encryptionKeySizeMin; + + /** + * maximum encryption key size requirement + */ + uint8_t encryptionKeySizeMax; + + /** + * fixed pin to be used in the pairing process if + * Use_Fixed_Pin is set to 1 + */ + uint32_t Fixed_Pin; + + /** + * this flag indicates whether the host has to initiate + * the security, wait for pairing or does not have any security + * requirements. + * 0x00 : no security required + * 0x01 : host should initiate security by sending the slave security + * request command + * 0x02 : host need not send the clave security request but it + * has to wait for paiirng to complete before doing any other + * processing + */ + uint8_t initiateSecurity; + /* USER CODE BEGIN tSecurityParams*/ + + /* USER CODE END tSecurityParams */ +}tSecurityParams; + +/** + * global context + * contains the variables common to all + * services + */ +typedef struct _tBLEProfileGlobalContext +{ + /** + * security requirements of the host + */ + tSecurityParams bleSecurityParam; + + /** + * gap service handle + */ + uint16_t gapServiceHandle; + + /** + * device name characteristic handle + */ + uint16_t devNameCharHandle; + + /** + * appearance characteristic handle + */ + uint16_t appearanceCharHandle; + + /** + * connection handle of the current active connection + * When not in connection, the handle is set to 0xFFFF + */ + uint16_t connectionHandle; + + /** + * length of the UUID list to be used while advertising + */ + uint8_t advtServUUIDlen; + + /** + * the UUID list to be used while advertising + */ + uint8_t advtServUUID[100]; + /* USER CODE BEGIN BleGlobalContext_t*/ + + /* USER CODE END BleGlobalContext_t */ +}BleGlobalContext_t; + +typedef struct +{ + BleGlobalContext_t BleApplicationContext_legacy; + APP_BLE_ConnStatus_t Device_Connection_Status; + + /** + * ID of the Advertising Timeout + */ + uint8_t Advertising_mgr_timer_Id; + + uint8_t SwitchOffGPIO_timer_Id; + /* USER CODE BEGIN PTD_1*/ + + /* USER CODE END PTD_1 */ +}BleApplicationContext_t; + +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private defines -----------------------------------------------------------*/ +#define APPBLE_GAP_DEVICE_NAME_LENGTH 7 +#define FAST_ADV_TIMEOUT (30*1000*1000/CFG_TS_TICK_VAL) /**< 30s */ +#define INITIAL_ADV_TIMEOUT (60*1000*1000/CFG_TS_TICK_VAL) /**< 60s */ + +#define BD_ADDR_SIZE_LOCAL 6 + +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macro -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +PLACE_IN_SECTION("MB_MEM1") ALIGN(4) static TL_CmdPacket_t BleCmdBuffer; + +static const uint8_t a_MBdAddr[BD_ADDR_SIZE_LOCAL] = +{ + (uint8_t)((CFG_ADV_BD_ADDRESS & 0x0000000000FF)), + (uint8_t)((CFG_ADV_BD_ADDRESS & 0x00000000FF00) >> 8), + (uint8_t)((CFG_ADV_BD_ADDRESS & 0x000000FF0000) >> 16), + (uint8_t)((CFG_ADV_BD_ADDRESS & 0x0000FF000000) >> 24), + (uint8_t)((CFG_ADV_BD_ADDRESS & 0x00FF00000000) >> 32), + (uint8_t)((CFG_ADV_BD_ADDRESS & 0xFF0000000000) >> 40) +}; + +static uint8_t a_BdAddrUdn[BD_ADDR_SIZE_LOCAL]; + +/** + * Identity root key used to derive IRK and DHK(Legacy) + */ +static const uint8_t a_BLE_CfgIrValue[16] = CFG_BLE_IR; + +/** + * Encryption root key used to derive LTK(Legacy) and CSRK + */ +static const uint8_t a_BLE_CfgErValue[16] = CFG_BLE_ER; + +/** + * These are the two tags used to manage a power failure during OTA + * The MagicKeywordAdress shall be mapped @0x140 from start of the binary image + * The MagicKeywordvalue is checked in the ble_ota application + */ +PLACE_IN_SECTION("TAG_OTA_END") const uint32_t MagicKeywordValue = 0x94448A29 ; +PLACE_IN_SECTION("TAG_OTA_START") const uint32_t MagicKeywordAddress = (uint32_t)&MagicKeywordValue; + +static BleApplicationContext_t BleApplicationContext; +static uint16_t AdvIntervalMin, AdvIntervalMax; + +P2PS_APP_ConnHandle_Not_evt_t HandleNotification; + +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) +#define SIZE_TAB_CONN_INT 2 +float a_ConnInterval[SIZE_TAB_CONN_INT] = {50, 1000}; /* ms */ +uint8_t index_con_int, mutex; +#endif /* L2CAP_REQUEST_NEW_CONN_PARAM != 0 */ + +/** + * Advertising Data + */ +#if (P2P_SERVER1 != 0) +static const char a_LocalName[] = {AD_TYPE_COMPLETE_LOCAL_NAME , 'P', '2', 'P', 'S', 'R', 'V', '1'}; +uint8_t a_ManufData[14] = {sizeof(a_ManufData)-1, + AD_TYPE_MANUFACTURER_SPECIFIC_DATA, + 0x01, /*SKD version */ + CFG_DEV_ID_P2P_SERVER1, /* STM32WB - P2P Server 1*/ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* BLE MAC start -MSB */ + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, /* BLE MAC stop */ + }; +#endif /* P2P_SERVER1 != 0 */ +/** + * Advertising Data + */ +#if (P2P_SERVER2 != 0) +static const char a_LocalName[] = {AD_TYPE_COMPLETE_LOCAL_NAME, 'P', '2', 'P', 'S', 'R', 'V', '2'}; +uint8_t a_ManufData[14] = {sizeof(a_ManufData)-1, + AD_TYPE_MANUFACTURER_SPECIFIC_DATA, + 0x01, /*SKD version */ + CFG_DEV_ID_P2P_SERVER2, /* STM32WB - P2P Server 2*/ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* BLE MAC start -MSB */ + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, /* BLE MAC stop */ + }; + +#endif /* P2P_SERVER2 != 0 */ + +#if (P2P_SERVER3 != 0) +static const char a_LocalName[] = {AD_TYPE_COMPLETE_LOCAL_NAME, 'P', '2', 'P', 'S', 'R', 'V', '3'}; +uint8_t a_ManufData[14] = {sizeof(a_ManufData)-1, + AD_TYPE_MANUFACTURER_SPECIFIC_DATA, + 0x01, /*SKD version */ + CFG_DEV_ID_P2P_SERVER3, /* STM32WB - P2P Server 3*/ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* BLE MAC start -MSB */ + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, /* BLE MAC stop */ + }; +#endif /* P2P_SERVER3 != 0 */ + +#if (P2P_SERVER4 != 0) +static const char a_LocalName[] = {AD_TYPE_COMPLETE_LOCAL_NAME, 'P', '2', 'P', 'S', 'R', 'V', '4'}; +uint8_t a_ManufData[14] = {sizeof(a_ManufData)-1, + AD_TYPE_MANUFACTURER_SPECIFIC_DATA, + 0x01, /*SKD version */ + CFG_DEV_ID_P2P_SERVER4, /* STM32WB - P2P Server 4*/ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* BLE MAC start -MSB */ + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, /* BLE MAC stop */ + }; +#endif /* P2P_SERVER4 != 0 */ + +#if (P2P_SERVER5 != 0) +static const char a_LocalName[] = {AD_TYPE_COMPLETE_LOCAL_NAME, 'P', '2', 'P', 'S', 'R', 'V', '5'}; +uint8_t a_ManufData[14] = {sizeof(a_ManufData)-1, + AD_TYPE_MANUFACTURER_SPECIFIC_DATA, + 0x01, /*SKD version */ + CFG_DEV_ID_P2P_SERVER5, /* STM32WB - P2P Server 5*/ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* BLE MAC start -MSB */ + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, /* BLE MAC stop */ + }; +#endif /* P2P_SERVER5 != 0 */ + +#if (P2P_SERVER6 != 0) +static const char a_LocalName[] = {AD_TYPE_COMPLETE_LOCAL_NAME, 'P', '2', 'P', 'S', 'R', 'V', '6'}; +uint8_t a_ManufData[14] = {sizeof(a_ManufData)-1, + AD_TYPE_MANUFACTURER_SPECIFIC_DATA, + 0x01, /*SKD version */ + CFG_DEV_ID_P2P_SERVER6, /* STM32WB - P2P Server 6*/ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP A Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* GROUP B Feature */ + 0x00, /* BLE MAC start -MSB */ + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, /* BLE MAC stop */ + }; +#endif /* P2P_SERVER6 != 0 */ + +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +static void BLE_UserEvtRx(void *p_Payload); +static void BLE_StatusNot(HCI_TL_CmdStatus_t Status); +static void Ble_Tl_Init(void); +static void Ble_Hci_Gap_Gatt_Init(void); +static const uint8_t* BleGetBdAddress(void); +static void Adv_Request(APP_BLE_ConnStatus_t NewStatus); +static void Adv_Cancel(void); +static void Adv_Cancel_Req(void); +static void Switch_OFF_GPIO(void); +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) +static void BLE_SVC_L2CAP_Conn_Update(uint16_t ConnectionHandle); +static void Connection_Interval_Update_Req(void); +#endif /* L2CAP_REQUEST_NEW_CONN_PARAM != 0 */ + +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* External variables --------------------------------------------------------*/ + +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Functions Definition ------------------------------------------------------*/ +void APP_BLE_Init(void) +{ + SHCI_CmdStatus_t status; +#if (RADIO_ACTIVITY_EVENT != 0) + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; +#endif /* RADIO_ACTIVITY_EVENT != 0 */ + /* USER CODE BEGIN APP_BLE_Init_1 */ + + /* USER CODE END APP_BLE_Init_1 */ + SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = + { + {{0,0,0}}, /**< Header unused */ + {0, /** pBleBufferAddress not used */ + 0, /** BleBufferSize not used */ + CFG_BLE_NUM_GATT_ATTRIBUTES, + CFG_BLE_NUM_GATT_SERVICES, + CFG_BLE_ATT_VALUE_ARRAY_SIZE, + CFG_BLE_NUM_LINK, + CFG_BLE_DATA_LENGTH_EXTENSION, + CFG_BLE_PREPARE_WRITE_LIST_SIZE, + CFG_BLE_MBLOCK_COUNT, + CFG_BLE_MAX_ATT_MTU, + CFG_BLE_PERIPHERAL_SCA, + CFG_BLE_CENTRAL_SCA, + CFG_BLE_LS_SOURCE, + CFG_BLE_MAX_CONN_EVENT_LENGTH, + CFG_BLE_HSE_STARTUP_TIME, + CFG_BLE_VITERBI_MODE, + CFG_BLE_OPTIONS, + 0, + CFG_BLE_MAX_COC_INITIATOR_NBR, + CFG_BLE_MIN_TX_POWER, + CFG_BLE_MAX_TX_POWER, + CFG_BLE_RX_MODEL_CONFIG, + CFG_BLE_MAX_ADV_SET_NBR, + CFG_BLE_MAX_ADV_DATA_LEN, + CFG_BLE_TX_PATH_COMPENS, + CFG_BLE_RX_PATH_COMPENS, + CFG_BLE_CORE_VERSION, + CFG_BLE_OPTIONS_EXT, + CFG_BLE_MAX_ADD_EATT_BEARERS + } + }; + + /** + * Initialize Ble Transport Layer + */ + Ble_Tl_Init(); + + /** + * Do not allow standby in the application + */ + UTIL_LPM_SetOffMode(1 << CFG_LPM_APP_BLE, UTIL_LPM_DISABLE); + + /** + * Register the hci transport layer to handle BLE User Asynchronous Events + */ + UTIL_SEQ_RegTask(1<data; + + switch (p_event_pckt->evt) + { + case HCI_DISCONNECTION_COMPLETE_EVT_CODE: + { + p_disconnection_complete_event = (hci_disconnection_complete_event_rp0 *) p_event_pckt->data; + + if (p_disconnection_complete_event->Connection_Handle == BleApplicationContext.BleApplicationContext_legacy.connectionHandle) + { + BleApplicationContext.BleApplicationContext_legacy.connectionHandle = 0; + BleApplicationContext.Device_Connection_Status = APP_BLE_IDLE; + APP_DBG_MSG(">>== HCI_DISCONNECTION_COMPLETE_EVT_CODE\n"); + APP_DBG_MSG(" - Connection Handle: 0x%x\n - Reason: 0x%x\n\r", + p_disconnection_complete_event->Connection_Handle, + p_disconnection_complete_event->Reason); + + /* USER CODE BEGIN EVT_DISCONN_COMPLETE_2 */ + + /* USER CODE END EVT_DISCONN_COMPLETE_2 */ + } + + /* USER CODE BEGIN EVT_DISCONN_COMPLETE_1 */ + + /* USER CODE END EVT_DISCONN_COMPLETE_1 */ + + /* restart advertising */ + Adv_Request(APP_BLE_FAST_ADV); + + /** + * SPECIFIC to P2P Server APP + */ + HandleNotification.P2P_Evt_Opcode = PEER_DISCON_HANDLE_EVT; + HandleNotification.ConnectionHandle = BleApplicationContext.BleApplicationContext_legacy.connectionHandle; + P2PS_APP_Notification(&HandleNotification); + /* USER CODE BEGIN EVT_DISCONN_COMPLETE */ + + /* USER CODE END EVT_DISCONN_COMPLETE */ + break; /* HCI_DISCONNECTION_COMPLETE_EVT_CODE */ + } + + case HCI_LE_META_EVT_CODE: + { + p_meta_evt = (evt_le_meta_event*) p_event_pckt->data; + /* USER CODE BEGIN EVT_LE_META_EVENT */ + + /* USER CODE END EVT_LE_META_EVENT */ + switch (p_meta_evt->subevent) + { + case HCI_LE_CONNECTION_UPDATE_COMPLETE_SUBEVT_CODE: +#if (CFG_DEBUG_APP_TRACE != 0) + p_connection_update_complete_event = (hci_le_connection_update_complete_event_rp0 *) p_meta_evt->data; + APP_DBG_MSG(">>== HCI_LE_CONNECTION_UPDATE_COMPLETE_SUBEVT_CODE\n"); + APP_DBG_MSG(" - Connection Interval: %.2f ms\n - Connection latency: %d\n - Supervision Timeout: %d ms\n\r", + p_connection_update_complete_event->Conn_Interval*1.25, + p_connection_update_complete_event->Conn_Latency, + p_connection_update_complete_event->Supervision_Timeout*10); +#endif /* CFG_DEBUG_APP_TRACE != 0 */ + + /* USER CODE BEGIN EVT_LE_CONN_UPDATE_COMPLETE */ + + /* USER CODE END EVT_LE_CONN_UPDATE_COMPLETE */ + break; + + case HCI_LE_PHY_UPDATE_COMPLETE_SUBEVT_CODE: + p_evt_le_phy_update_complete = (hci_le_phy_update_complete_event_rp0*)p_meta_evt->data; + APP_DBG_MSG("==>> HCI_LE_PHY_UPDATE_COMPLETE_SUBEVT_CODE - "); + if (p_evt_le_phy_update_complete->Status == 0) + { + APP_DBG_MSG("status ok \n"); + } + else + { + APP_DBG_MSG("status nok \n"); + } + + ret = hci_le_read_phy(BleApplicationContext.BleApplicationContext_legacy.connectionHandle, &Tx_phy, &Rx_phy); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG("==>> hci_le_read_phy : fail\n\r"); + } + else + { + APP_DBG_MSG("==>> hci_le_read_phy - Success \n"); + + if ((Tx_phy == TX_2M) && (Rx_phy == RX_2M)) + { + APP_DBG_MSG("==>> PHY Param TX= %d, RX= %d \n\r", Tx_phy, Rx_phy); + } + else + { + APP_DBG_MSG("==>> PHY Param TX= %d, RX= %d \n\r", Tx_phy, Rx_phy); + } + } + /* USER CODE BEGIN EVT_LE_PHY_UPDATE_COMPLETE */ + + /* USER CODE END EVT_LE_PHY_UPDATE_COMPLETE */ + break; + + case HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE: + { + p_connection_complete_event = (hci_le_connection_complete_event_rp0 *) p_meta_evt->data; + /** + * The connection is done, there is no need anymore to schedule the LP ADV + */ + + HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id); + + APP_DBG_MSG(">>== HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE - Connection handle: 0x%x\n", p_connection_complete_event->Connection_Handle); + APP_DBG_MSG(" - Connection established with Central: @:%02x:%02x:%02x:%02x:%02x:%02x\n", + p_connection_complete_event->Peer_Address[5], + p_connection_complete_event->Peer_Address[4], + p_connection_complete_event->Peer_Address[3], + p_connection_complete_event->Peer_Address[2], + p_connection_complete_event->Peer_Address[1], + p_connection_complete_event->Peer_Address[0]); + APP_DBG_MSG(" - Connection Interval: %.2f ms\n - Connection latency: %d\n - Supervision Timeout: %d ms\n\r", + p_connection_complete_event->Conn_Interval*1.25, + p_connection_complete_event->Conn_Latency, + p_connection_complete_event->Supervision_Timeout*10 + ); + + if (BleApplicationContext.Device_Connection_Status == APP_BLE_LP_CONNECTING) + { + /* Connection as client */ + BleApplicationContext.Device_Connection_Status = APP_BLE_CONNECTED_CLIENT; + } + else + { + /* Connection as server */ + BleApplicationContext.Device_Connection_Status = APP_BLE_CONNECTED_SERVER; + } + BleApplicationContext.BleApplicationContext_legacy.connectionHandle = p_connection_complete_event->Connection_Handle; + /** + * SPECIFIC to P2P Server APP + */ + HandleNotification.P2P_Evt_Opcode = PEER_CONN_HANDLE_EVT; + HandleNotification.ConnectionHandle = BleApplicationContext.BleApplicationContext_legacy.connectionHandle; + P2PS_APP_Notification(&HandleNotification); + /* USER CODE BEGIN HCI_EVT_LE_CONN_COMPLETE */ + + /* USER CODE END HCI_EVT_LE_CONN_COMPLETE */ + break; /* HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE */ + } + + default: + /* USER CODE BEGIN SUBEVENT_DEFAULT */ + + /* USER CODE END SUBEVENT_DEFAULT */ + break; + } + + /* USER CODE BEGIN META_EVT */ + + /* USER CODE END META_EVT */ + break; /* HCI_LE_META_EVT_CODE */ + } + + case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE: + p_blecore_evt = (evt_blecore_aci*) p_event_pckt->data; + /* USER CODE BEGIN EVT_VENDOR */ + + /* USER CODE END EVT_VENDOR */ + switch (p_blecore_evt->ecode) + { + /* USER CODE BEGIN ecode */ + + /* USER CODE END ecode */ + + /** + * SPECIFIC to P2P Server APP + */ + case ACI_L2CAP_CONNECTION_UPDATE_RESP_VSEVT_CODE: +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) + mutex = 1; +#endif /* L2CAP_REQUEST_NEW_CONN_PARAM != 0 */ + /* USER CODE BEGIN EVT_BLUE_L2CAP_CONNECTION_UPDATE_RESP */ + + /* USER CODE END EVT_BLUE_L2CAP_CONNECTION_UPDATE_RESP */ + break; + + case ACI_GAP_PROC_COMPLETE_VSEVT_CODE: + APP_DBG_MSG(">>== ACI_GAP_PROC_COMPLETE_VSEVT_CODE \r"); + /* USER CODE BEGIN EVT_BLUE_GAP_PROCEDURE_COMPLETE */ + + /* USER CODE END EVT_BLUE_GAP_PROCEDURE_COMPLETE */ + break; /* ACI_GAP_PROC_COMPLETE_VSEVT_CODE */ + +#if (RADIO_ACTIVITY_EVENT != 0) + case ACI_HAL_END_OF_RADIO_ACTIVITY_VSEVT_CODE: + /* USER CODE BEGIN RADIO_ACTIVITY_EVENT*/ + + /* USER CODE END RADIO_ACTIVITY_EVENT*/ + break; /* ACI_HAL_END_OF_RADIO_ACTIVITY_VSEVT_CODE */ +#endif /* RADIO_ACTIVITY_EVENT != 0 */ + + case ACI_GATT_INDICATION_VSEVT_CODE: + { + APP_DBG_MSG(">>== ACI_GATT_INDICATION_VSEVT_CODE \r"); + aci_gatt_confirm_indication(BleApplicationContext.BleApplicationContext_legacy.connectionHandle); + } + break; + + /* USER CODE BEGIN BLUE_EVT */ + + /* USER CODE END BLUE_EVT */ + } + break; /* HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE */ + + /* USER CODE BEGIN EVENT_PCKT */ + + /* USER CODE END EVENT_PCKT */ + + default: + /* USER CODE BEGIN ECODE_DEFAULT*/ + + /* USER CODE END ECODE_DEFAULT*/ + break; + } + + return (SVCCTL_UserEvtFlowEnable); +} + +APP_BLE_ConnStatus_t APP_BLE_Get_Server_Connection_Status(void) +{ + return BleApplicationContext.Device_Connection_Status; +} + +/* USER CODE BEGIN FD*/ + +/* USER CODE END FD*/ + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +static void Ble_Tl_Init(void) +{ + HCI_TL_HciInitConf_t Hci_Tl_Init_Conf; + + Hci_Tl_Init_Conf.p_cmdbuffer = (uint8_t*)&BleCmdBuffer; + Hci_Tl_Init_Conf.StatusNotCallBack = BLE_StatusNot; + hci_init(BLE_UserEvtRx, (void*) &Hci_Tl_Init_Conf); + + return; +} + +static void Ble_Hci_Gap_Gatt_Init(void) +{ + uint8_t role; + uint16_t gap_service_handle, gap_dev_name_char_handle, gap_appearance_char_handle; + const uint8_t *p_bd_addr; + uint16_t a_appearance[1] = {BLE_CFG_GAP_APPEARANCE}; + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + /* USER CODE BEGIN Ble_Hci_Gap_Gatt_Init*/ + + /* USER CODE END Ble_Hci_Gap_Gatt_Init*/ + + APP_DBG_MSG("==>> Start Ble_Hci_Gap_Gatt_Init function\n"); + + /** + * Initialize HCI layer + */ + /*HCI Reset to synchronise BLE Stack*/ + ret = hci_reset(); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : hci_reset command, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: hci_reset command\n"); + } + + /** + * Write the BD Address + */ + p_bd_addr = BleGetBdAddress(); + ret = aci_hal_write_config_data(CONFIG_DATA_PUBLIC_ADDRESS_OFFSET, CONFIG_DATA_PUBLIC_ADDRESS_LEN, (uint8_t*) p_bd_addr); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_hal_write_config_data command - CONFIG_DATA_PUBLIC_ADDRESS_OFFSET, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_hal_write_config_data command - CONFIG_DATA_PUBLIC_ADDRESS_OFFSET\n"); + APP_DBG_MSG(" Public Bluetooth Address: %02x:%02x:%02x:%02x:%02x:%02x\n",p_bd_addr[5],p_bd_addr[4],p_bd_addr[3],p_bd_addr[2],p_bd_addr[1],p_bd_addr[0]); + } + +#if (CFG_BLE_ADDRESS_TYPE == GAP_PUBLIC_ADDR) + /* BLE MAC in ADV Packet */ + a_ManufData[ sizeof(a_ManufData)-6] = p_bd_addr[5]; + a_ManufData[ sizeof(a_ManufData)-5] = p_bd_addr[4]; + a_ManufData[ sizeof(a_ManufData)-4] = p_bd_addr[3]; + a_ManufData[ sizeof(a_ManufData)-3] = p_bd_addr[2]; + a_ManufData[ sizeof(a_ManufData)-2] = p_bd_addr[1]; + a_ManufData[ sizeof(a_ManufData)-1] = p_bd_addr[0]; +#endif /* CFG_BLE_ADDRESS_TYPE == GAP_PUBLIC_ADDR */ + + /** + * Static random Address + * The two upper bits shall be set to 1 + * The lowest 32bits is read from the UDN to differentiate between devices + * The RNG may be used to provide a random number on each power on + */ +#if (CFG_BLE_ADDRESS_TYPE != GAP_PUBLIC_ADDR) + /* BLE MAC in ADV Packet */ + a_ManufData[ sizeof(a_ManufData)-6] = a_srd_bd_addr[1] >> 8 ; + a_ManufData[ sizeof(a_ManufData)-5] = a_srd_bd_addr[1]; + a_ManufData[ sizeof(a_ManufData)-4] = a_srd_bd_addr[0] >> 24; + a_ManufData[ sizeof(a_ManufData)-3] = a_srd_bd_addr[0] >> 16; + a_ManufData[ sizeof(a_ManufData)-2] = a_srd_bd_addr[0] >> 8; + a_ManufData[ sizeof(a_ManufData)-1] = a_srd_bd_addr[0]; + + ret = aci_hal_write_config_data(CONFIG_DATA_RANDOM_ADDRESS_OFFSET, CONFIG_DATA_RANDOM_ADDRESS_LEN, (uint8_t*)a_srd_bd_addr); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_hal_write_config_data command - CONFIG_DATA_RANDOM_ADDRESS_OFFSET, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_hal_write_config_data command - CONFIG_DATA_RANDOM_ADDRESS_OFFSET\n"); + APP_DBG_MSG(" Random Bluetooth Address: %02x:%02x:%02x:%02x:%02x:%02x\n", (uint8_t)(a_srd_bd_addr[1] >> 8), + (uint8_t)(a_srd_bd_addr[1]), + (uint8_t)(a_srd_bd_addr[0] >> 24), + (uint8_t)(a_srd_bd_addr[0] >> 16), + (uint8_t)(a_srd_bd_addr[0] >> 8), + (uint8_t)(a_srd_bd_addr[0])); + } +#endif /* CFG_BLE_ADDRESS_TYPE != GAP_PUBLIC_ADDR */ + + /** + * Write Identity root key used to derive IRK and DHK(Legacy) + */ + ret = aci_hal_write_config_data(CONFIG_DATA_IR_OFFSET, CONFIG_DATA_IR_LEN, (uint8_t*)a_BLE_CfgIrValue); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_hal_write_config_data command - CONFIG_DATA_IR_OFFSET, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_hal_write_config_data command - CONFIG_DATA_IR_OFFSET\n"); + } + + /** + * Write Encryption root key used to derive LTK and CSRK + */ + ret = aci_hal_write_config_data(CONFIG_DATA_ER_OFFSET, CONFIG_DATA_ER_LEN, (uint8_t*)a_BLE_CfgErValue); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_hal_write_config_data command - CONFIG_DATA_ER_OFFSET, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_hal_write_config_data command - CONFIG_DATA_ER_OFFSET\n"); + } + + /** + * Set TX Power. + */ + ret = aci_hal_set_tx_power_level(1, CFG_TX_POWER); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_hal_set_tx_power_level command, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_hal_set_tx_power_level command\n"); + } + + /** + * Initialize GATT interface + */ + ret = aci_gatt_init(); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_gatt_init command, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_gatt_init command\n"); + } + + /** + * Initialize GAP interface + */ + role = 0; + +#if (BLE_CFG_PERIPHERAL == 1) + role |= GAP_PERIPHERAL_ROLE; +#endif /* BLE_CFG_PERIPHERAL == 1 */ + +#if (BLE_CFG_CENTRAL == 1) + role |= GAP_CENTRAL_ROLE; +#endif /* BLE_CFG_CENTRAL == 1 */ + +/* USER CODE BEGIN Role_Mngt*/ + +/* USER CODE END Role_Mngt */ + + if (role > 0) + { + const char *name = "P2PSRV1"; + ret = aci_gap_init(role, + CFG_PRIVACY, + APPBLE_GAP_DEVICE_NAME_LENGTH, + &gap_service_handle, + &gap_dev_name_char_handle, + &gap_appearance_char_handle); + + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_gap_init command, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_gap_init command\n"); + } + + ret = aci_gatt_update_char_value(gap_service_handle, gap_dev_name_char_handle, 0, strlen(name), (uint8_t *) name); + if (ret != BLE_STATUS_SUCCESS) + { + BLE_DBG_SVCCTL_MSG(" Fail : aci_gatt_update_char_value - Device Name\n"); + } + else + { + BLE_DBG_SVCCTL_MSG(" Success: aci_gatt_update_char_value - Device Name\n"); + } + } + + ret = aci_gatt_update_char_value(gap_service_handle, + gap_appearance_char_handle, + 0, + 2, + (uint8_t *)&a_appearance); + if (ret != BLE_STATUS_SUCCESS) + { + BLE_DBG_SVCCTL_MSG(" Fail : aci_gatt_update_char_value - Appearance\n"); + } + else + { + BLE_DBG_SVCCTL_MSG(" Success: aci_gatt_update_char_value - Appearance\n"); + } + + /** + * Initialize Default PHY + */ + ret = hci_le_set_default_phy(ALL_PHYS_PREFERENCE,TX_2M_PREFERRED,RX_2M_PREFERRED); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : hci_le_set_default_phy command, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: hci_le_set_default_phy command\n"); + } + + /** + * Initialize IO capability + */ + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.ioCapability = CFG_IO_CAPABILITY; + ret = aci_gap_set_io_capability(BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.ioCapability); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_gap_set_io_capability command, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_gap_set_io_capability command\n"); + } + + /** + * Initialize authentication + */ + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode = CFG_MITM_PROTECTION; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin = CFG_ENCRYPTION_KEY_SIZE_MIN; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax = CFG_ENCRYPTION_KEY_SIZE_MAX; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Use_Fixed_Pin = CFG_USED_FIXED_PIN; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Fixed_Pin = CFG_FIXED_PIN; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode = CFG_BONDING_MODE; + /* USER CODE BEGIN Ble_Hci_Gap_Gatt_Init_1*/ + + /* USER CODE END Ble_Hci_Gap_Gatt_Init_1*/ + + ret = aci_gap_set_authentication_requirement(BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode, + CFG_SC_SUPPORT, + CFG_KEYPRESS_NOTIFICATION_SUPPORT, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Use_Fixed_Pin, + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Fixed_Pin, + CFG_IDENTITY_ADDRESS); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_gap_set_authentication_requirement command, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_gap_set_authentication_requirement command\n"); + } + + /** + * Initialize whitelist + */ + if (BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode) + { + ret = aci_gap_configure_whitelist(); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG(" Fail : aci_gap_configure_whitelist command, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG(" Success: aci_gap_configure_whitelist command\n"); + } + } + APP_DBG_MSG("==>> End Ble_Hci_Gap_Gatt_Init function\n\r"); +} + +static void Adv_Request(APP_BLE_ConnStatus_t NewStatus) +{ + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + uint16_t Min_Inter, Max_Inter; + + if (NewStatus == APP_BLE_FAST_ADV) + { + Min_Inter = AdvIntervalMin; + Max_Inter = AdvIntervalMax; + } + else + { + Min_Inter = CFG_LP_CONN_ADV_INTERVAL_MIN; + Max_Inter = CFG_LP_CONN_ADV_INTERVAL_MAX; + } + + /** + * Stop the timer, it will be restarted for a new shot + * It does not hurt if the timer was not running + */ + HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id); + + if ((NewStatus == APP_BLE_LP_ADV) + && ((BleApplicationContext.Device_Connection_Status == APP_BLE_FAST_ADV) + || (BleApplicationContext.Device_Connection_Status == APP_BLE_LP_ADV))) + { + /* Connection in ADVERTISE mode have to stop the current advertising */ + ret = aci_gap_set_non_discoverable(); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG("==>> aci_gap_set_non_discoverable - Stop Advertising Failed , result: %d \n", ret); + } + else + { + APP_DBG_MSG("==>> aci_gap_set_non_discoverable - Successfully Stopped Advertising \n"); + } + } + + BleApplicationContext.Device_Connection_Status = NewStatus; + /* Start Fast or Low Power Advertising */ + ret = aci_gap_set_discoverable(ADV_IND, + Min_Inter, + Max_Inter, + CFG_BLE_ADDRESS_TYPE, + NO_WHITE_LIST_USE, /* use white list */ + sizeof(a_LocalName), + (uint8_t*) &a_LocalName, + BleApplicationContext.BleApplicationContext_legacy.advtServUUIDlen, + BleApplicationContext.BleApplicationContext_legacy.advtServUUID, + 0, + 0); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG("==>> aci_gap_set_discoverable - fail, result: 0x%x \n", ret); + } + else + { + APP_DBG_MSG("==>> aci_gap_set_discoverable - Success\n"); + } + + /* Update Advertising data */ + ret = aci_gap_update_adv_data(sizeof(a_ManufData), (uint8_t*) a_ManufData); + if (ret != BLE_STATUS_SUCCESS) + { + if (NewStatus == APP_BLE_FAST_ADV) + { + APP_DBG_MSG("==>> Start Fast Advertising Failed , result: %d \n\r", ret); + } + else + { + APP_DBG_MSG("==>> Start Low Power Advertising Failed , result: %d \n\r", ret); + } + } + else + { + if (NewStatus == APP_BLE_FAST_ADV) + { + APP_DBG_MSG("==>> Success: Start Fast Advertising \n\r"); + /* Start Timer to STOP ADV - TIMEOUT - and next Restart Low Power Advertising */ + HW_TS_Start(BleApplicationContext.Advertising_mgr_timer_Id, INITIAL_ADV_TIMEOUT); + } + else + { + APP_DBG_MSG("==>> Success: Start Low Power Advertising \n\r"); + } + } + + return; +} + +const uint8_t* BleGetBdAddress(void) +{ + uint8_t *p_otp_addr; + const uint8_t *p_bd_addr; + uint32_t udn; + uint32_t company_id; + uint32_t device_id; + + udn = LL_FLASH_GetUDN(); + + if (udn != 0xFFFFFFFF) + { + company_id = LL_FLASH_GetSTCompanyID(); + device_id = LL_FLASH_GetDeviceID(); + + /** + * Public Address with the ST company ID + * bit[47:24] : 24bits (OUI) equal to the company ID + * bit[23:16] : Device ID. + * bit[15:0] : The last 16bits from the UDN + * Note: In order to use the Public Address in a final product, a dedicated + * 24bits company ID (OUI) shall be bought. + */ + a_BdAddrUdn[0] = (uint8_t)(udn & 0x000000FF); + a_BdAddrUdn[1] = (uint8_t)((udn & 0x0000FF00) >> 8); + a_BdAddrUdn[2] = (uint8_t)device_id; + a_BdAddrUdn[3] = (uint8_t)(company_id & 0x000000FF); + a_BdAddrUdn[4] = (uint8_t)((company_id & 0x0000FF00) >> 8); + a_BdAddrUdn[5] = (uint8_t)((company_id & 0x00FF0000) >> 16); + + p_bd_addr = (const uint8_t *)a_BdAddrUdn; + } + else + { + p_otp_addr = OTP_Read(0); + if (p_otp_addr) + { + p_bd_addr = ((OTP_ID0_t*)p_otp_addr)->bd_address; + } + else + { + p_bd_addr = a_MBdAddr; + } + } + + return p_bd_addr; +} + +/* USER CODE BEGIN FD_LOCAL_FUNCTION */ + +/* USER CODE END FD_LOCAL_FUNCTION */ + +/************************************************************* + * + * SPECIFIC FUNCTIONS FOR P2P SERVER + * + *************************************************************/ +static void Adv_Cancel(void) +{ + /* USER CODE BEGIN Adv_Cancel_1 */ + + /* USER CODE END Adv_Cancel_1 */ + + if (BleApplicationContext.Device_Connection_Status != APP_BLE_CONNECTED_SERVER) + { + tBleStatus ret = BLE_STATUS_INVALID_PARAMS; + + ret = aci_gap_set_non_discoverable(); + + BleApplicationContext.Device_Connection_Status = APP_BLE_IDLE; + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG("** STOP ADVERTISING ** Failed \r\n\r"); + } + else + { + APP_DBG_MSG(" \r\n\r"); + APP_DBG_MSG("** STOP ADVERTISING ** \r\n\r"); + } + } + + /* USER CODE BEGIN Adv_Cancel_2 */ + + /* USER CODE END Adv_Cancel_2 */ + + return; +} + +static void Adv_Cancel_Req(void) +{ + /* USER CODE BEGIN Adv_Cancel_Req_1 */ + + /* USER CODE END Adv_Cancel_Req_1 */ + + UTIL_SEQ_SetTask(1 << CFG_TASK_ADV_CANCEL_ID, CFG_SCH_PRIO_0); + + /* USER CODE BEGIN Adv_Cancel_Req_2 */ + + /* USER CODE END Adv_Cancel_Req_2 */ + + return; +} + +static void Switch_OFF_GPIO() +{ + /* USER CODE BEGIN Switch_OFF_GPIO */ + + /* USER CODE END Switch_OFF_GPIO */ +} + +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) +void BLE_SVC_L2CAP_Conn_Update(uint16_t ConnectionHandle) +{ + /* USER CODE BEGIN BLE_SVC_L2CAP_Conn_Update_1 */ + + /* USER CODE END BLE_SVC_L2CAP_Conn_Update_1 */ + + if (mutex == 1) + { + mutex = 0; + index_con_int = (index_con_int + 1)%SIZE_TAB_CONN_INT; + uint16_t interval_min = CONN_P(a_ConnInterval[index_con_int]); + uint16_t interval_max = CONN_P(a_ConnInterval[index_con_int]); + uint16_t peripheral_latency = L2CAP_PERIPHERAL_LATENCY; + uint16_t timeout_multiplier = L2CAP_TIMEOUT_MULTIPLIER; + tBleStatus ret; + + ret = aci_l2cap_connection_parameter_update_req(BleApplicationContext.BleApplicationContext_legacy.connectionHandle, + interval_min, interval_max, + peripheral_latency, timeout_multiplier); + if (ret != BLE_STATUS_SUCCESS) + { + APP_DBG_MSG("BLE_SVC_L2CAP_Conn_Update(), Failed \r\n\r"); + } + else + { + APP_DBG_MSG("BLE_SVC_L2CAP_Conn_Update(), Successfully \r\n\r"); + } + } + + /* USER CODE BEGIN BLE_SVC_L2CAP_Conn_Update_2 */ + + /* USER CODE END BLE_SVC_L2CAP_Conn_Update_2 */ + + return; +} +#endif /* L2CAP_REQUEST_NEW_CONN_PARAM != 0 */ + +#if (L2CAP_REQUEST_NEW_CONN_PARAM != 0) +static void Connection_Interval_Update_Req(void) +{ + if (BleApplicationContext.Device_Connection_Status != APP_BLE_FAST_ADV && BleApplicationContext.Device_Connection_Status != APP_BLE_IDLE) + { + BLE_SVC_L2CAP_Conn_Update(BleApplicationContext.BleApplicationContext_legacy.connectionHandle); + } + + return; +} +#endif /* L2CAP_REQUEST_NEW_CONN_PARAM != 0 */ + +/* USER CODE BEGIN FD_SPECIFIC_FUNCTIONS */ + +/* USER CODE END FD_SPECIFIC_FUNCTIONS */ +/************************************************************* + * + * WRAP FUNCTIONS + * + *************************************************************/ +void hci_notify_asynch_evt(void* p_Data) +{ + UTIL_SEQ_SetTask(1 << CFG_TASK_HCI_ASYNCH_EVT_ID, CFG_SCH_PRIO_0); + + return; +} + +void hci_cmd_resp_release(uint32_t Flag) +{ + UTIL_SEQ_SetEvt(1 << CFG_IDLEEVT_HCI_CMD_EVT_RSP_ID); + + return; +} + +void hci_cmd_resp_wait(uint32_t Timeout) +{ + UTIL_SEQ_WaitEvt(1 << CFG_IDLEEVT_HCI_CMD_EVT_RSP_ID); + + return; +} + +static void BLE_UserEvtRx(void *p_Payload) +{ + SVCCTL_UserEvtFlowStatus_t svctl_return_status; + tHCI_UserEvtRxParam *p_param; + + p_param = (tHCI_UserEvtRxParam *)p_Payload; + + svctl_return_status = SVCCTL_UserEvtRx((void *)&(p_param->pckt->evtserial)); + if (svctl_return_status != SVCCTL_UserEvtFlowDisable) + { + p_param->status = HCI_TL_UserEventFlow_Enable; + } + else + { + p_param->status = HCI_TL_UserEventFlow_Disable; + } + + return; +} + +static void BLE_StatusNot(HCI_TL_CmdStatus_t Status) +{ + uint32_t task_id_list; + switch (Status) + { + case HCI_TL_CmdBusy: + /** + * All tasks that may send an aci/hci commands shall be listed here + * This is to prevent a new command is sent while one is already pending + */ + task_id_list = (1 << CFG_LAST_TASK_ID_WITH_HCICMD) - 1; + UTIL_SEQ_PauseTask(task_id_list); + /* USER CODE BEGIN HCI_TL_CmdBusy */ + + /* USER CODE END HCI_TL_CmdBusy */ + break; + + case HCI_TL_CmdAvailable: + /** + * All tasks that may send an aci/hci commands shall be listed here + * This is to prevent a new command is sent while one is already pending + */ + task_id_list = (1 << CFG_LAST_TASK_ID_WITH_HCICMD) - 1; + UTIL_SEQ_ResumeTask(task_id_list); + /* USER CODE BEGIN HCI_TL_CmdAvailable */ + + /* USER CODE END HCI_TL_CmdAvailable */ + break; + + default: + /* USER CODE BEGIN Status */ + + /* USER CODE END Status */ + break; + } + + return; +} + +void SVCCTL_ResumeUserEventFlow(void) +{ + hci_resume_flow(); + + return; +} + +/* USER CODE BEGIN FD_WRAP_FUNCTIONS */ + +/* USER CODE END FD_WRAP_FUNCTIONS */ diff --git a/firmware/memory_chip_gone/STM32_WPAN/App/app_ble.h b/firmware/memory_chip_gone/STM32_WPAN/App/app_ble.h new file mode 100644 index 0000000..2fd3c2b --- /dev/null +++ b/firmware/memory_chip_gone/STM32_WPAN/App/app_ble.h @@ -0,0 +1,81 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file App/app_ble.h + * @author MCD Application Team + * @brief Header for ble application + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef APP_BLE_H +#define APP_BLE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "hci_tl.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ + +typedef enum +{ + APP_BLE_IDLE, + APP_BLE_FAST_ADV, + APP_BLE_LP_ADV, + APP_BLE_SCAN, + APP_BLE_LP_CONNECTING, + APP_BLE_CONNECTED_SERVER, + APP_BLE_CONNECTED_CLIENT +} APP_BLE_ConnStatus_t; + +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* External variables --------------------------------------------------------*/ +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions ---------------------------------------------*/ +void APP_BLE_Init(void); +APP_BLE_ConnStatus_t APP_BLE_Get_Server_Connection_Status(void); + +/* USER CODE BEGIN EF */ + +/* USER CODE END EF */ + +#ifdef __cplusplus +} +#endif + +#endif /*APP_BLE_H */ diff --git a/firmware/memory_chip_gone/STM32_WPAN/App/ble_conf.h b/firmware/memory_chip_gone/STM32_WPAN/App/ble_conf.h new file mode 100644 index 0000000..84df175 --- /dev/null +++ b/firmware/memory_chip_gone/STM32_WPAN/App/ble_conf.h @@ -0,0 +1,70 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file ble_conf.h + * @author MCD Application Team + * @brief Configuration file for BLE Middleware. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef BLE_CONF_H +#define BLE_CONF_H + +#include "app_conf.h" + +/****************************************************************************** + * + * BLE SERVICES CONFIGURATION + * blesvc + * + ******************************************************************************/ + +/** + * This setting shall be set to '1' if the device needs to support the Peripheral Role + * In the MS configuration, both BLE_CFG_PERIPHERAL and BLE_CFG_CENTRAL shall be set to '1' + */ +#define BLE_CFG_PERIPHERAL 1 + +/** + * This setting shall be set to '1' if the device needs to support the Central Role + * In the MS configuration, both BLE_CFG_PERIPHERAL and BLE_CFG_CENTRAL shall be set to '1' + */ +#define BLE_CFG_CENTRAL 0 + +/** + * There is one handler per service enabled + * Note: There is no handler for the Device Information Service + * + * This shall take into account all registered handlers + * (from either the provided services or the custom services) + */ +#define BLE_CFG_SVC_MAX_NBR_CB 7 + +#define BLE_CFG_CLT_MAX_NBR_CB 0 + +/****************************************************************************** + * GAP Service - Appearance + ******************************************************************************/ + +#define BLE_CFG_UNKNOWN_APPEARANCE (0) +#define BLE_CFG_HR_SENSOR_APPEARANCE (832) +#define BLE_CFG_GAP_APPEARANCE (BLE_CFG_UNKNOWN_APPEARANCE) + +/****************************************************************************** + * Over The Air Feature (OTA) - STM Proprietary + ******************************************************************************/ +#define BLE_CFG_OTA_REBOOT_CHAR 0/**< REBOOT OTA MODE CHARACTERISTIC */ + +#endif /*BLE_CONF_H */ diff --git a/firmware/memory_chip_gone/STM32_WPAN/App/ble_dbg_conf.h b/firmware/memory_chip_gone/STM32_WPAN/App/ble_dbg_conf.h new file mode 100644 index 0000000..3d87556 --- /dev/null +++ b/firmware/memory_chip_gone/STM32_WPAN/App/ble_dbg_conf.h @@ -0,0 +1,198 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file App/ble_dbg_conf.h + * @author MCD Application Team + * @brief Debug configuration file for BLE Middleware. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef BLE_DBG_CONF_H +#define BLE_DBG_CONF_H + +/** + * Enable or Disable traces from BLE + */ + +#define BLE_DBG_APP_EN 0 +#define BLE_DBG_DIS_EN 0 +#define BLE_DBG_HRS_EN 0 +#define BLE_DBG_SVCCTL_EN 0 +#define BLE_DBG_BLS_EN 0 +#define BLE_DBG_HTS_EN 0 +#define BLE_DBG_P2P_STM_EN 0 + +/** + * Macro definition + */ +#if (BLE_DBG_APP_EN != 0) +#define BLE_DBG_APP_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_APP_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_DIS_EN != 0) +#define BLE_DBG_DIS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_DIS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_HRS_EN != 0) +#define BLE_DBG_HRS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_HRS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_P2P_STM_EN != 0) +#define BLE_DBG_P2P_STM_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_P2P_STM_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_TEMPLATE_STM_EN != 0) +#define BLE_DBG_TEMPLATE_STM_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_TEMPLATE_STM_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_EDS_STM_EN != 0) +#define BLE_DBG_EDS_STM_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_EDS_STM_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_LBS_STM_EN != 0) +#define BLE_DBG_LBS_STM_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_LBS_STM_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_SVCCTL_EN != 0) +#define BLE_DBG_SVCCTL_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_SVCCTL_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_CTS_EN != 0) +#define BLE_DBG_CTS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_CTS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_HIDS_EN != 0) +#define BLE_DBG_HIDS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_HIDS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_PASS_EN != 0) +#define BLE_DBG_PASS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_PASS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_BLS_EN != 0) +#define BLE_DBG_BLS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_BLS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_HTS_EN != 0) +#define BLE_DBG_HTS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_HTS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_ANS_EN != 0) +#define BLE_DBG_ANS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_ANS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_ESS_EN != 0) +#define BLE_DBG_ESS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_ESS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_GLS_EN != 0) +#define BLE_DBG_GLS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_GLS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_BAS_EN != 0) +#define BLE_DBG_BAS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_BAS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_RTUS_EN != 0) +#define BLE_DBG_RTUS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_RTUS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_HPS_EN != 0) +#define BLE_DBG_HPS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_HPS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_TPS_EN != 0) +#define BLE_DBG_TPS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_TPS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_LLS_EN != 0) +#define BLE_DBG_LLS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_LLS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_IAS_EN != 0) +#define BLE_DBG_IAS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_IAS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_WSS_EN != 0) +#define BLE_DBG_WSS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_WSS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_LNS_EN != 0) +#define BLE_DBG_LNS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_LNS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_SCPS_EN != 0) +#define BLE_DBG_SCPS_MSG PRINT_MESG_DBG +#else +#define BLE_DBG_SCPS_MSG PRINT_NO_MESG +#endif + +#if (BLE_DBG_DTS_EN != 0) +#define BLE_DBG_DTS_MSG PRINT_MESG_DBG +#define BLE_DBG_DTS_BUF PRINT_LOG_BUFF_DBG +#else +#define BLE_DBG_DTS_MSG PRINT_NO_MESG +#define BLE_DBG_DTS_BUF PRINT_NO_MESG +#endif + +#endif /*BLE_DBG_CONF_H */ diff --git a/firmware/memory_chip_gone/STM32_WPAN/App/p2p_server_app.c b/firmware/memory_chip_gone/STM32_WPAN/App/p2p_server_app.c new file mode 100644 index 0000000..5a5f5fb --- /dev/null +++ b/firmware/memory_chip_gone/STM32_WPAN/App/p2p_server_app.c @@ -0,0 +1,154 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file App/p2p_server_app.c + * @author MCD Application Team + * @brief Peer to peer Server Application + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 "app_common.h" +#include "dbg_trace.h" +#include "ble.h" +#include "p2p_server_app.h" +#include "stm32_seq.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Private typedef -----------------------------------------------------------*/ +/* USER CODE BEGIN PTD */ + +/* USER CODE END PTD */ + +/* Private defines ------------------------------------------------------------*/ +/* USER CODE BEGIN PD */ + +/* USER CODE END PD */ + +/* Private macros -------------------------------------------------------------*/ +/* USER CODE BEGIN PM */ + +/* USER CODE END PM */ + +/* Private variables ---------------------------------------------------------*/ +/* USER CODE BEGIN PV */ + +/* USER CODE END PV */ + +/* Private function prototypes -----------------------------------------------*/ +/* USER CODE BEGIN PFP */ + +/* USER CODE END PFP */ + +/* Functions Definition ------------------------------------------------------*/ +void P2PS_STM_App_Notification(P2PS_STM_App_Notification_evt_t *pNotification) +{ +/* USER CODE BEGIN P2PS_STM_App_Notification_1 */ + +/* USER CODE END P2PS_STM_App_Notification_1 */ + switch(pNotification->P2P_Evt_Opcode) + { +/* USER CODE BEGIN P2PS_STM_App_Notification_P2P_Evt_Opcode */ + +/* USER CODE END P2PS_STM_App_Notification_P2P_Evt_Opcode */ + + case P2PS_STM__NOTIFY_ENABLED_EVT: +/* USER CODE BEGIN P2PS_STM__NOTIFY_ENABLED_EVT */ + +/* USER CODE END P2PS_STM__NOTIFY_ENABLED_EVT */ + break; + + case P2PS_STM_NOTIFY_DISABLED_EVT: +/* USER CODE BEGIN P2PS_STM_NOTIFY_DISABLED_EVT */ + +/* USER CODE END P2PS_STM_NOTIFY_DISABLED_EVT */ + break; + + case P2PS_STM_WRITE_EVT: +/* USER CODE BEGIN P2PS_STM_WRITE_EVT */ + +/* USER CODE END P2PS_STM_WRITE_EVT */ + break; + + default: +/* USER CODE BEGIN P2PS_STM_App_Notification_default */ + +/* USER CODE END P2PS_STM_App_Notification_default */ + break; + } +/* USER CODE BEGIN P2PS_STM_App_Notification_2 */ + +/* USER CODE END P2PS_STM_App_Notification_2 */ + return; +} + +void P2PS_APP_Notification(P2PS_APP_ConnHandle_Not_evt_t *pNotification) +{ +/* USER CODE BEGIN P2PS_APP_Notification_1 */ + +/* USER CODE END P2PS_APP_Notification_1 */ + switch(pNotification->P2P_Evt_Opcode) + { +/* USER CODE BEGIN P2PS_APP_Notification_P2P_Evt_Opcode */ + +/* USER CODE END P2PS_APP_Notification_P2P_Evt_Opcode */ + case PEER_CONN_HANDLE_EVT : +/* USER CODE BEGIN PEER_CONN_HANDLE_EVT */ + +/* USER CODE END PEER_CONN_HANDLE_EVT */ + break; + + case PEER_DISCON_HANDLE_EVT : +/* USER CODE BEGIN PEER_DISCON_HANDLE_EVT */ + +/* USER CODE END PEER_DISCON_HANDLE_EVT */ + break; + + default: +/* USER CODE BEGIN P2PS_APP_Notification_default */ + +/* USER CODE END P2PS_APP_Notification_default */ + break; + } +/* USER CODE BEGIN P2PS_APP_Notification_2 */ + +/* USER CODE END P2PS_APP_Notification_2 */ + return; +} + +void P2PS_APP_Init(void) +{ +/* USER CODE BEGIN P2PS_APP_Init */ + +/* USER CODE END P2PS_APP_Init */ + return; +} + +/* USER CODE BEGIN FD */ + +/* USER CODE END FD */ + +/************************************************************* + * + * LOCAL FUNCTIONS + * + *************************************************************/ +/* USER CODE BEGIN FD_LOCAL_FUNCTIONS*/ + +/* USER CODE END FD_LOCAL_FUNCTIONS*/ diff --git a/firmware/memory_chip_gone/STM32_WPAN/App/p2p_server_app.h b/firmware/memory_chip_gone/STM32_WPAN/App/p2p_server_app.h new file mode 100644 index 0000000..7c1d807 --- /dev/null +++ b/firmware/memory_chip_gone/STM32_WPAN/App/p2p_server_app.h @@ -0,0 +1,78 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file App/p2p_server_app.h + * @author MCD Application Team + * @brief Header for p2p_server_app.c module + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef P2P_SERVER_APP_H +#define P2P_SERVER_APP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +typedef enum +{ + PEER_CONN_HANDLE_EVT, + PEER_DISCON_HANDLE_EVT, +} P2PS_APP__Opcode_Notification_evt_t; + +typedef struct +{ + P2PS_APP__Opcode_Notification_evt_t P2P_Evt_Opcode; + uint16_t ConnectionHandle; +}P2PS_APP_ConnHandle_Not_evt_t; +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* External variables --------------------------------------------------------*/ +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/* Exported macros ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions ---------------------------------------------*/ + void P2PS_APP_Init( void ); + void P2PS_APP_Notification( P2PS_APP_ConnHandle_Not_evt_t *pNotification ); +/* USER CODE BEGIN EF */ + +/* USER CODE END EF */ + +#ifdef __cplusplus +} +#endif + +#endif /*P2P_SERVER_APP_H */ diff --git a/firmware/memory_chip_gone/STM32_WPAN/App/tl_dbg_conf.h b/firmware/memory_chip_gone/STM32_WPAN/App/tl_dbg_conf.h new file mode 100644 index 0000000..ba97122 --- /dev/null +++ b/firmware/memory_chip_gone/STM32_WPAN/App/tl_dbg_conf.h @@ -0,0 +1,133 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file App/tl_dbg_conf.h + * @author MCD Application Team + * @brief Debug configuration file for stm32wpan transport layer interface. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef TL_DBG_CONF_H +#define TL_DBG_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* USER CODE BEGIN Tl_Conf */ + +/* Includes ------------------------------------------------------------------*/ +#include "app_conf.h" /* required as some configuration used in dbg_trace.h are set there */ +#include "dbg_trace.h" +#include "hw_if.h" + +/** + * Enable or Disable traces + * The raw data output is the hci binary packet format as specified by the BT specification * + */ +#define TL_SHCI_CMD_DBG_EN 0 /* Reports System commands sent to CPU2 and the command response */ +#define TL_SHCI_CMD_DBG_RAW_EN 0 /* Reports raw data System commands sent to CPU2 and the command response */ +#define TL_SHCI_EVT_DBG_EN 0 /* Reports System Asynchronous Events received from CPU2 */ +#define TL_SHCI_EVT_DBG_RAW_EN 0 /* Reports raw data System Asynchronous Events received from CPU2 */ + +#define TL_HCI_CMD_DBG_EN 0 /* Reports BLE command sent to CPU2 and the command response */ +#define TL_HCI_CMD_DBG_RAW_EN 0 /* Reports raw data BLE command sent to CPU2 and the command response */ +#define TL_HCI_EVT_DBG_EN 0 /* Reports BLE Asynchronous Events received from CPU2 */ +#define TL_HCI_EVT_DBG_RAW_EN 0 /* Reports raw data BLE Asynchronous Events received from CPU2 */ + +#define TL_MM_DBG_EN 0 /* Reports the information of the buffer released to CPU2 */ + +/** + * Macro definition + */ + +/** + * System Transport Layer + */ +#if (TL_SHCI_CMD_DBG_EN != 0) +#define TL_SHCI_CMD_DBG_MSG PRINT_MESG_DBG +#define TL_SHCI_CMD_DBG_BUF PRINT_LOG_BUFF_DBG +#else +#define TL_SHCI_CMD_DBG_MSG(...) +#define TL_SHCI_CMD_DBG_BUF(...) +#endif + +#if (TL_SHCI_CMD_DBG_RAW_EN != 0) +#define TL_SHCI_CMD_DBG_RAW(_PDATA_, _SIZE_) HW_UART_Transmit(hw_uart1, (uint8_t*)_PDATA_, _SIZE_, (~0)) +#else +#define TL_SHCI_CMD_DBG_RAW(...) +#endif + +#if (TL_SHCI_EVT_DBG_EN != 0) +#define TL_SHCI_EVT_DBG_MSG PRINT_MESG_DBG +#define TL_SHCI_EVT_DBG_BUF PRINT_LOG_BUFF_DBG +#else +#define TL_SHCI_EVT_DBG_MSG(...) +#define TL_SHCI_EVT_DBG_BUF(...) +#endif + +#if (TL_SHCI_EVT_DBG_RAW_EN != 0) +#define TL_SHCI_EVT_DBG_RAW(_PDATA_, _SIZE_) HW_UART_Transmit(hw_uart1, (uint8_t*)_PDATA_, _SIZE_, (~0)) +#else +#define TL_SHCI_EVT_DBG_RAW(...) +#endif + +/** + * BLE Transport Layer + */ +#if (TL_HCI_CMD_DBG_EN != 0) +#define TL_HCI_CMD_DBG_MSG PRINT_MESG_DBG +#define TL_HCI_CMD_DBG_BUF PRINT_LOG_BUFF_DBG +#else +#define TL_HCI_CMD_DBG_MSG(...) +#define TL_HCI_CMD_DBG_BUF(...) +#endif + +#if (TL_HCI_CMD_DBG_RAW_EN != 0) +#define TL_HCI_CMD_DBG_RAW(_PDATA_, _SIZE_) HW_UART_Transmit(hw_uart1, (uint8_t*)_PDATA_, _SIZE_, (~0)) +#else +#define TL_HCI_CMD_DBG_RAW(...) +#endif + +#if (TL_HCI_EVT_DBG_EN != 0) +#define TL_HCI_EVT_DBG_MSG PRINT_MESG_DBG +#define TL_HCI_EVT_DBG_BUF PRINT_LOG_BUFF_DBG +#else +#define TL_HCI_EVT_DBG_MSG(...) +#define TL_HCI_EVT_DBG_BUF(...) +#endif + +#if (TL_HCI_EVT_DBG_RAW_EN != 0) +#define TL_HCI_EVT_DBG_RAW(_PDATA_, _SIZE_) HW_UART_Transmit(hw_uart1, (uint8_t*)_PDATA_, _SIZE_, (~0)) +#else +#define TL_HCI_EVT_DBG_RAW(...) +#endif + +/** + * Memory Manager - Released buffer tracing + */ +#if (TL_MM_DBG_EN != 0) +#define TL_MM_DBG_MSG PRINT_MESG_DBG +#else +#define TL_MM_DBG_MSG(...) +#endif + +/* USER CODE END Tl_Conf */ + +#ifdef __cplusplus +} +#endif + +#endif /*TL_DBG_CONF_H */ diff --git a/firmware/memory_chip_gone/STM32_WPAN/Target/hw_ipcc.c b/firmware/memory_chip_gone/STM32_WPAN/Target/hw_ipcc.c new file mode 100644 index 0000000..4c01837 --- /dev/null +++ b/firmware/memory_chip_gone/STM32_WPAN/Target/hw_ipcc.c @@ -0,0 +1,747 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file Target/hw_ipcc.c + * @author MCD Application Team + * @brief Hardware IPCC source file for STM32WPAN Middleware. + ****************************************************************************** + * @attention + * + * Copyright (c) 2026 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 "app_common.h" +#include "mbox_def.h" +#include "utilities_conf.h" + +/* Global variables ---------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +#define HW_IPCC_TX_PENDING( channel ) ( !(LL_C1_IPCC_IsActiveFlag_CHx( IPCC, channel )) ) && (((~(IPCC->C1MR)) & (channel << 16U))) +#define HW_IPCC_RX_PENDING( channel ) (LL_C2_IPCC_IsActiveFlag_CHx( IPCC, channel )) && (((~(IPCC->C1MR)) & (channel << 0U))) + +/* Private macros ------------------------------------------------------------*/ +/* Private typedef -----------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +static void (*FreeBufCb)( void ); + +/* Private function prototypes -----------------------------------------------*/ +static void HW_IPCC_BLE_EvtHandler( void ); +static void HW_IPCC_BLE_AclDataEvtHandler( void ); +static void HW_IPCC_MM_FreeBufHandler( void ); +static void HW_IPCC_SYS_CmdEvtHandler( void ); +static void HW_IPCC_SYS_EvtHandler( void ); +static void HW_IPCC_TRACES_EvtHandler( void ); + +#ifdef THREAD_WB +static void HW_IPCC_OT_CmdEvtHandler( void ); +static void HW_IPCC_THREAD_NotEvtHandler( void ); +static void HW_IPCC_THREAD_CliNotEvtHandler( void ); +#endif + +#ifdef LLD_TESTS_WB +static void HW_IPCC_LLDTESTS_ReceiveCliRspHandler( void ); +static void HW_IPCC_LLDTESTS_ReceiveM0CmdHandler( void ); +#endif +#ifdef LLD_BLE_WB +/*static void HW_IPCC_LLD_BLE_ReceiveCliRspHandler( void );*/ +static void HW_IPCC_LLD_BLE_ReceiveRspHandler( void ); +static void HW_IPCC_LLD_BLE_ReceiveM0CmdHandler( void ); +#endif + +#ifdef MAC_802_15_4_WB +static void HW_IPCC_MAC_802_15_4_CmdEvtHandler( void ); +static void HW_IPCC_MAC_802_15_4_NotEvtHandler( void ); +#endif + +#ifdef ZIGBEE_WB +static void HW_IPCC_ZIGBEE_CmdEvtHandler( void ); +static void HW_IPCC_ZIGBEE_StackNotifEvtHandler( void ); +static void HW_IPCC_ZIGBEE_StackM0RequestHandler( void ); +#endif + +/* Public function definition -----------------------------------------------*/ + +/****************************************************************************** + * INTERRUPT HANDLER + ******************************************************************************/ +void HW_IPCC_Rx_Handler( void ) +{ + if (HW_IPCC_RX_PENDING( HW_IPCC_SYSTEM_EVENT_CHANNEL )) + { + HW_IPCC_SYS_EvtHandler(); + } +#ifdef MAC_802_15_4_WB + else if (HW_IPCC_RX_PENDING( HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL )) + { + HW_IPCC_MAC_802_15_4_NotEvtHandler(); + } +#endif /* MAC_802_15_4_WB */ +#ifdef THREAD_WB + else if (HW_IPCC_RX_PENDING( HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL )) + { + HW_IPCC_THREAD_NotEvtHandler(); + } + else if (HW_IPCC_RX_PENDING( HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL )) + { + HW_IPCC_THREAD_CliNotEvtHandler(); + } +#endif /* THREAD_WB */ +#ifdef LLD_TESTS_WB + else if (HW_IPCC_RX_PENDING( HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL )) + { + HW_IPCC_LLDTESTS_ReceiveCliRspHandler(); + } + else if (HW_IPCC_RX_PENDING( HW_IPCC_LLDTESTS_M0_CMD_CHANNEL )) + { + HW_IPCC_LLDTESTS_ReceiveM0CmdHandler(); + } +#endif /* LLD_TESTS_WB */ +#ifdef LLD_BLE_WB + else if (HW_IPCC_RX_PENDING( HW_IPCC_LLD_BLE_RSP_CHANNEL )) + { + HW_IPCC_LLD_BLE_ReceiveRspHandler(); + } + else if (HW_IPCC_RX_PENDING( HW_IPCC_LLD_BLE_M0_CMD_CHANNEL )) + { + HW_IPCC_LLD_BLE_ReceiveM0CmdHandler(); + } +#endif /* LLD_TESTS_WB */ +#ifdef ZIGBEE_WB + else if (HW_IPCC_RX_PENDING( HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL )) + { + HW_IPCC_ZIGBEE_StackNotifEvtHandler(); + } + else if (HW_IPCC_RX_PENDING( HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL )) + { + HW_IPCC_ZIGBEE_StackM0RequestHandler(); + } +#endif /* ZIGBEE_WB */ + else if (HW_IPCC_RX_PENDING( HW_IPCC_BLE_EVENT_CHANNEL )) + { + HW_IPCC_BLE_EvtHandler(); + } + else if (HW_IPCC_RX_PENDING( HW_IPCC_TRACES_CHANNEL )) + { + HW_IPCC_TRACES_EvtHandler(); + } + + return; +} + +void HW_IPCC_Tx_Handler( void ) +{ + if (HW_IPCC_TX_PENDING( HW_IPCC_SYSTEM_CMD_RSP_CHANNEL )) + { + HW_IPCC_SYS_CmdEvtHandler(); + } +#ifdef MAC_802_15_4_WB + else if (HW_IPCC_TX_PENDING( HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL )) + { + HW_IPCC_MAC_802_15_4_CmdEvtHandler(); + } +#endif /* MAC_802_15_4_WB */ +#ifdef THREAD_WB + else if (HW_IPCC_TX_PENDING( HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL )) + { + HW_IPCC_OT_CmdEvtHandler(); + } +#endif /* THREAD_WB */ +#ifdef LLD_TESTS_WB +// No TX handler for LLD tests +#endif /* LLD_TESTS_WB */ +#ifdef ZIGBEE_WB + if (HW_IPCC_TX_PENDING( HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL )) + { + HW_IPCC_ZIGBEE_CmdEvtHandler(); + } +#endif /* ZIGBEE_WB */ + else if (HW_IPCC_TX_PENDING( HW_IPCC_MM_RELEASE_BUFFER_CHANNEL )) + { + HW_IPCC_MM_FreeBufHandler(); + } + else if (HW_IPCC_TX_PENDING( HW_IPCC_HCI_ACL_DATA_CHANNEL )) + { + HW_IPCC_BLE_AclDataEvtHandler(); + } + + return; +} +/****************************************************************************** + * GENERAL + ******************************************************************************/ +void HW_IPCC_Enable( void ) +{ + /** + * Such as IPCC IP available to the CPU2, it is required to keep the IPCC clock running + * when FUS is running on CPU2 and CPU1 enters deep sleep mode + */ + LL_C2_AHB3_GRP1_EnableClock(LL_C2_AHB3_GRP1_PERIPH_IPCC); + + /** + * When the device is out of standby, it is required to use the EXTI mechanism to wakeup CPU2 + */ + LL_EXTI_EnableRisingTrig_32_63( LL_EXTI_LINE_41 ); + /* It is required to have at least a system clock cycle before a SEV after LL_EXTI_EnableRisingTrig_32_63() */ + LL_C2_EXTI_EnableEvent_32_63( LL_EXTI_LINE_41 ); + + /** + * In case the SBSFU is implemented, it may have already set the C2BOOT bit to startup the CPU2. + * In that case, to keep the mechanism transparent to the user application, it shall call the system command + * SHCI_C2_Reinit( ) before jumping to the application. + * When the CPU2 receives that command, it waits for its event input to be set to restart the CPU2 firmware. + * This is required because once C2BOOT has been set once, a clear/set on C2BOOT has no effect. + * When SHCI_C2_Reinit( ) is not called, generating an event to the CPU2 does not have any effect + * So, by default, the application shall both set the event flag and set the C2BOOT bit. + */ + __SEV( ); /* Set the internal event flag and send an event to the CPU2 */ + __WFE( ); /* Clear the internal event flag */ + LL_PWR_EnableBootC2( ); + + return; +} + +void HW_IPCC_Init( void ) +{ + LL_AHB3_GRP1_EnableClock( LL_AHB3_GRP1_PERIPH_IPCC ); + + LL_C1_IPCC_EnableIT_RXO( IPCC ); + LL_C1_IPCC_EnableIT_TXF( IPCC ); + + HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn); + HAL_NVIC_EnableIRQ(IPCC_C1_TX_IRQn); + + return; +} + +/****************************************************************************** + * BLE + ******************************************************************************/ +void HW_IPCC_BLE_Init( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_BLE_EVENT_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_BLE_SendCmd( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_BLE_CMD_CHANNEL ); + + return; +} + +static void HW_IPCC_BLE_EvtHandler( void ) +{ + HW_IPCC_BLE_RxEvtNot(); + + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_BLE_EVENT_CHANNEL ); + + return; +} + +void HW_IPCC_BLE_SendAclData( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_HCI_ACL_DATA_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableTransmitChannel( IPCC, HW_IPCC_HCI_ACL_DATA_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +static void HW_IPCC_BLE_AclDataEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_HCI_ACL_DATA_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_BLE_AclDataAckNot(); + + return; +} + +__weak void HW_IPCC_BLE_AclDataAckNot( void ){}; +__weak void HW_IPCC_BLE_RxEvtNot( void ){}; + +/****************************************************************************** + * SYSTEM + ******************************************************************************/ +void HW_IPCC_SYS_Init( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_SYSTEM_EVENT_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_SYS_SendCmd( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableTransmitChannel( IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +static void HW_IPCC_SYS_CmdEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_SYSTEM_CMD_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_SYS_CmdEvtNot(); + + return; +} + +static void HW_IPCC_SYS_EvtHandler( void ) +{ + HW_IPCC_SYS_EvtNot(); + + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_SYSTEM_EVENT_CHANNEL ); + + return; +} + +__weak void HW_IPCC_SYS_CmdEvtNot( void ){}; +__weak void HW_IPCC_SYS_EvtNot( void ){}; + +/****************************************************************************** + * MAC 802.15.4 + ******************************************************************************/ +#ifdef MAC_802_15_4_WB +void HW_IPCC_MAC_802_15_4_Init( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_MAC_802_15_4_SendCmd( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableTransmitChannel( IPCC, HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_MAC_802_15_4_SendAck( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +static void HW_IPCC_MAC_802_15_4_CmdEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_MAC_802_15_4_CMD_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_MAC_802_15_4_CmdEvtNot(); + + return; +} + +static void HW_IPCC_MAC_802_15_4_NotEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_MAC_802_15_4_NOTIFICATION_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_MAC_802_15_4_EvtNot(); + + return; +} +__weak void HW_IPCC_MAC_802_15_4_CmdEvtNot( void ){}; +__weak void HW_IPCC_MAC_802_15_4_EvtNot( void ){}; +#endif + +/****************************************************************************** + * THREAD + ******************************************************************************/ +#ifdef THREAD_WB +void HW_IPCC_THREAD_Init( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL ); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_OT_SendCmd( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableTransmitChannel( IPCC, HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_CLI_SendCmd( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_THREAD_CLI_CMD_CHANNEL ); + + return; +} + +void HW_IPCC_THREAD_SendAck( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_THREAD_CliSendAck( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +static void HW_IPCC_OT_CmdEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_THREAD_OT_CMD_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_OT_CmdEvtNot(); + + return; +} + +static void HW_IPCC_THREAD_NotEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_THREAD_NOTIFICATION_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_THREAD_EvtNot(); + + return; +} + +static void HW_IPCC_THREAD_CliNotEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_THREAD_CLI_NOTIFICATION_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_THREAD_CliEvtNot(); + + return; +} + +__weak void HW_IPCC_OT_CmdEvtNot( void ){}; +__weak void HW_IPCC_CLI_CmdEvtNot( void ){}; +__weak void HW_IPCC_THREAD_EvtNot( void ){}; + +#endif /* THREAD_WB */ + +/****************************************************************************** + * LLD TESTS + ******************************************************************************/ +#ifdef LLD_TESTS_WB +void HW_IPCC_LLDTESTS_Init( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL ); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLDTESTS_M0_CMD_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + return; +} + +void HW_IPCC_LLDTESTS_SendCliCmd( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_LLDTESTS_CLI_CMD_CHANNEL ); + return; +} + +static void HW_IPCC_LLDTESTS_ReceiveCliRspHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_LLDTESTS_ReceiveCliRsp(); + return; +} + +void HW_IPCC_LLDTESTS_SendCliRspAck( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLDTESTS_CLI_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + return; +} + +static void HW_IPCC_LLDTESTS_ReceiveM0CmdHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_LLDTESTS_M0_CMD_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + HW_IPCC_LLDTESTS_ReceiveM0Cmd(); + return; +} + +void HW_IPCC_LLDTESTS_SendM0CmdAck( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_LLDTESTS_M0_CMD_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLDTESTS_M0_CMD_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + return; +} +__weak void HW_IPCC_LLDTESTS_ReceiveCliRsp( void ){}; +__weak void HW_IPCC_LLDTESTS_ReceiveM0Cmd( void ){}; +#endif /* LLD_TESTS_WB */ + +/****************************************************************************** + * LLD BLE + ******************************************************************************/ +#ifdef LLD_BLE_WB +void HW_IPCC_LLD_BLE_Init( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_RSP_CHANNEL ); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_M0_CMD_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + return; +} + +void HW_IPCC_LLD_BLE_SendCliCmd( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_LLD_BLE_CLI_CMD_CHANNEL ); + return; +} + +/*static void HW_IPCC_LLD_BLE_ReceiveCliRspHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_CLI_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + HW_IPCC_LLD_BLE_ReceiveCliRsp(); + return; +}*/ + +void HW_IPCC_LLD_BLE_SendCliRspAck( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_LLD_BLE_CLI_RSP_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_CLI_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + return; +} + +static void HW_IPCC_LLD_BLE_ReceiveM0CmdHandler( void ) +{ + //LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_M0_CMD_CHANNEL ); + HW_IPCC_LLD_BLE_ReceiveM0Cmd(); + return; +} + +void HW_IPCC_LLD_BLE_SendM0CmdAck( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_LLD_BLE_M0_CMD_CHANNEL ); + //LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_M0_CMD_CHANNEL ); + return; +} +__weak void HW_IPCC_LLD_BLE_ReceiveCliRsp( void ){}; +__weak void HW_IPCC_LLD_BLE_ReceiveM0Cmd( void ){}; + +/* Transparent Mode */ +void HW_IPCC_LLD_BLE_SendCmd( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_LLD_BLE_CMD_CHANNEL ); + return; +} + +static void HW_IPCC_LLD_BLE_ReceiveRspHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + HW_IPCC_LLD_BLE_ReceiveRsp(); + return; +} + +void HW_IPCC_LLD_BLE_SendRspAck( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_LLD_BLE_RSP_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_LLD_BLE_RSP_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + return; +} + +#endif /* LLD_BLE_WB */ + +/****************************************************************************** + * ZIGBEE + ******************************************************************************/ +#ifdef ZIGBEE_WB +void HW_IPCC_ZIGBEE_Init( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL ); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_ZIGBEE_SendM4RequestToM0( void ) +{ + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableTransmitChannel( IPCC, HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +void HW_IPCC_ZIGBEE_SendM4AckToM0Notify( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +static void HW_IPCC_ZIGBEE_CmdEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_ZIGBEE_CMD_APPLI_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_ZIGBEE_RecvAppliAckFromM0(); + + return; +} + +static void HW_IPCC_ZIGBEE_StackNotifEvtHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_ZIGBEE_APPLI_NOTIF_ACK_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_ZIGBEE_RecvM0NotifyToM4(); + + return; +} + +static void HW_IPCC_ZIGBEE_StackM0RequestHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableReceiveChannel( IPCC, HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + HW_IPCC_ZIGBEE_RecvM0RequestToM4(); + + return; +} + +void HW_IPCC_ZIGBEE_SendM4AckToM0Request( void ) +{ + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL ); + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_ZIGBEE_M0_REQUEST_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +__weak void HW_IPCC_ZIGBEE_RecvAppliAckFromM0( void ){}; +__weak void HW_IPCC_ZIGBEE_RecvM0NotifyToM4( void ){}; +__weak void HW_IPCC_ZIGBEE_RecvM0RequestToM4( void ){}; +#endif /* ZIGBEE_WB */ + +/****************************************************************************** + * MEMORY MANAGER + ******************************************************************************/ +void HW_IPCC_MM_SendFreeBuf( void (*cb)( void ) ) +{ + if ( LL_C1_IPCC_IsActiveFlag_CHx( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ) ) + { + FreeBufCb = cb; + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableTransmitChannel( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + } + else + { + cb(); + + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ); + } + + return; +} + +static void HW_IPCC_MM_FreeBufHandler( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_DisableTransmitChannel( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + FreeBufCb(); + + LL_C1_IPCC_SetFlag_CHx( IPCC, HW_IPCC_MM_RELEASE_BUFFER_CHANNEL ); + + return; +} + +/****************************************************************************** + * TRACES + ******************************************************************************/ +void HW_IPCC_TRACES_Init( void ) +{ + UTILS_ENTER_CRITICAL_SECTION(); + LL_C1_IPCC_EnableReceiveChannel( IPCC, HW_IPCC_TRACES_CHANNEL ); + UTILS_EXIT_CRITICAL_SECTION(); + + return; +} + +static void HW_IPCC_TRACES_EvtHandler( void ) +{ + HW_IPCC_TRACES_EvtNot(); + + LL_C1_IPCC_ClearFlag_CHx( IPCC, HW_IPCC_TRACES_CHANNEL ); + + return; +} + +__weak void HW_IPCC_TRACES_EvtNot( void ){}; diff --git a/firmware/memory_chip_gone/Utilities/lpm/tiny_lpm/stm32_lpm.c b/firmware/memory_chip_gone/Utilities/lpm/tiny_lpm/stm32_lpm.c new file mode 100644 index 0000000..8f4e7cd --- /dev/null +++ b/firmware/memory_chip_gone/Utilities/lpm/tiny_lpm/stm32_lpm.c @@ -0,0 +1,258 @@ +/** + ****************************************************************************** + * @file stm32_lpm.c + * @author MCD Application Team + * @brief Low Power Manager + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32_lpm.h" +#include "utilities_conf.h" + +/** @addtogroup TINY_LPM + * @{ + */ + +/* Private typedef -----------------------------------------------------------*/ +/* Private macros ------------------------------------------------------------*/ +/** @defgroup TINY_LPM_Private_macros TINY LPM private macros + * @{ + */ + +/** + * @brief macro used to initialized the critical section + */ +#ifndef UTIL_LPM_INIT_CRITICAL_SECTION + #define UTIL_LPM_INIT_CRITICAL_SECTION( ) +#endif + +/** + * @brief macro used to enter the critical section + */ +#ifndef UTIL_LPM_ENTER_CRITICAL_SECTION + #define UTIL_LPM_ENTER_CRITICAL_SECTION( ) UTILS_ENTER_CRITICAL_SECTION( ) +#endif + +/** + * @brief macro used to exit the critical section + */ +#ifndef UTIL_LPM_EXIT_CRITICAL_SECTION + #define UTIL_LPM_EXIT_CRITICAL_SECTION( ) UTILS_EXIT_CRITICAL_SECTION( ) +#endif + +/** + * @brief macro used to enter the critical section when Entering Low Power + * @note this macro is only called inside the function UTIL_LPM_EnterLowPower + * and in a basic configuration shall be identcal to the macro + * UTIL_LPM_EXIT_CRITICAL_SECTION. In general, the request to enter the + * low power mode is already done under a critical section and + * nesting it is useless (in specific implementations not even possible). + * So the users could define their own macro) + */ +#ifndef UTIL_LPM_ENTER_CRITICAL_SECTION_ELP + #define UTIL_LPM_ENTER_CRITICAL_SECTION_ELP( ) UTIL_LPM_ENTER_CRITICAL_SECTION( ) +#endif + +/** + * @brief macro used to exit the critical section when exiting Low Power mode + * @note the behavior of the macro shall be symmetrical with the macro + * UTIL_LPM_ENTER_CRITICAL_SECTION_ELP + */ +#ifndef UTIL_LPM_EXIT_CRITICAL_SECTION_ELP + #define UTIL_LPM_EXIT_CRITICAL_SECTION_ELP( ) UTIL_LPM_EXIT_CRITICAL_SECTION( ) +#endif + +/** + * @} + */ +/* Private function prototypes -----------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Private typedef -----------------------------------------------------------*/ +/* Private defines -----------------------------------------------------------*/ +/** @defgroup TINY_LPM_Private_define TINY LPM private defines + * @{ + */ + +/** + * @brief value used to reset the LPM mode + */ +#define UTIL_LPM_NO_BIT_SET (0UL) + +/** + * @} + */ +/* Private macros ------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/** @defgroup TINY_LPM_Private_variables TINY LPM private variables + * @{ + */ + +/** + * @brief value used to represent the LPM state of stop mode + */ +static UTIL_LPM_bm_t StopModeDisable = UTIL_LPM_NO_BIT_SET; + +/** + * @brief value used to represent the LPM state of off mode + */ +static UTIL_LPM_bm_t OffModeDisable = UTIL_LPM_NO_BIT_SET; + +/** + * @} + */ +/* Global variables ----------------------------------------------------------*/ +/* Private function prototypes -----------------------------------------------*/ +/* Functions Definition ------------------------------------------------------*/ + +/** @addtogroup TINY_LPM_Exported_function + * @{ + */ +void UTIL_LPM_Init( void ) +{ + StopModeDisable = UTIL_LPM_NO_BIT_SET; + OffModeDisable = UTIL_LPM_NO_BIT_SET; + UTIL_LPM_INIT_CRITICAL_SECTION( ); +} + +void UTIL_LPM_DeInit( void ) +{ +} + +void UTIL_LPM_SetStopMode( UTIL_LPM_bm_t lpm_id_bm, UTIL_LPM_State_t state ) +{ + UTIL_LPM_ENTER_CRITICAL_SECTION( ); + + switch( state ) + { + case UTIL_LPM_DISABLE: + { + StopModeDisable |= lpm_id_bm; + break; + } + case UTIL_LPM_ENABLE: + { + StopModeDisable &= ( ~lpm_id_bm ); + break; + } + default : + { + break; + } + } + + UTIL_LPM_EXIT_CRITICAL_SECTION( ); +} + +void UTIL_LPM_SetOffMode( UTIL_LPM_bm_t lpm_id_bm, UTIL_LPM_State_t state ) +{ + UTIL_LPM_ENTER_CRITICAL_SECTION( ); + + switch(state) + { + case UTIL_LPM_DISABLE: + { + OffModeDisable |= lpm_id_bm; + break; + } + case UTIL_LPM_ENABLE: + { + OffModeDisable &= ( ~lpm_id_bm ); + break; + } + default : + { + break; + } + } + + UTIL_LPM_EXIT_CRITICAL_SECTION( ); +} + +UTIL_LPM_Mode_t UTIL_LPM_GetMode( void ) +{ + UTIL_LPM_Mode_t mode_selected; + + UTIL_LPM_ENTER_CRITICAL_SECTION( ); + + if( StopModeDisable != UTIL_LPM_NO_BIT_SET ) + { + /** + * At least one user disallows Stop Mode + */ + mode_selected = UTIL_LPM_SLEEPMODE; + } + else + { + if( OffModeDisable != UTIL_LPM_NO_BIT_SET ) + { + /** + * At least one user disallows Off Mode + */ + mode_selected = UTIL_LPM_STOPMODE; + } + else + { + mode_selected = UTIL_LPM_OFFMODE; + } + } + + UTIL_LPM_EXIT_CRITICAL_SECTION( ); + + return mode_selected; +} + +void UTIL_LPM_EnterLowPower( void ) +{ + UTIL_LPM_ENTER_CRITICAL_SECTION_ELP( ); + + if( StopModeDisable != UTIL_LPM_NO_BIT_SET ) + { + /** + * At least one user disallows Stop Mode + * SLEEP mode is required + */ + UTIL_PowerDriver.EnterSleepMode( ); + UTIL_PowerDriver.ExitSleepMode( ); + } + else + { + if( OffModeDisable != UTIL_LPM_NO_BIT_SET ) + { + /** + * At least one user disallows Off Mode + * STOP mode is required + */ + UTIL_PowerDriver.EnterStopMode( ); + UTIL_PowerDriver.ExitStopMode( ); + } + else + { + /** + * OFF mode is required + */ + UTIL_PowerDriver.EnterOffMode( ); + UTIL_PowerDriver.ExitOffMode( ); + } + } + + UTIL_LPM_EXIT_CRITICAL_SECTION_ELP( ); +} + +/** + * @} + */ + +/** + * @} + */ diff --git a/firmware/memory_chip_gone/Utilities/lpm/tiny_lpm/stm32_lpm.h b/firmware/memory_chip_gone/Utilities/lpm/tiny_lpm/stm32_lpm.h new file mode 100644 index 0000000..a262f9c --- /dev/null +++ b/firmware/memory_chip_gone/Utilities/lpm/tiny_lpm/stm32_lpm.h @@ -0,0 +1,167 @@ +/** + ****************************************************************************** + * @file stm32_lpm.h + * @author MCD Application Team + * @brief Header for stm32_lpm.c module + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2019 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. + * + ****************************************************************************** +*/ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32_TINY_LPM_H +#define STM32_TINY_LPM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stdint.h" + +/** @defgroup TINY_LPM TINY LPM + * @{ + */ + +/* Exported typedef ---------------------------------------------------------*/ +/** @defgroup TINY_LPM_Exported_typedef TINY LPM exported typedef + * @{ + */ + +/** + * @brief type definition to represent the bit mask of an LPM mode + */ +typedef uint32_t UTIL_LPM_bm_t; + +/** + * @brief type definition to represent value of an LPM mode + */ +typedef enum +{ + UTIL_LPM_ENABLE=0, + UTIL_LPM_DISABLE, +} UTIL_LPM_State_t; + +/** + * @brief type definition to represent the different type of LPM mode + */ + +typedef enum +{ + UTIL_LPM_SLEEPMODE, + UTIL_LPM_STOPMODE, + UTIL_LPM_OFFMODE, +} UTIL_LPM_Mode_t; + +/** + * @} + */ + +/** @defgroup TINY_LPM_Exported_struct TINY LPM exported struct + * @{ + */ + +/** + * @brief LPM driver definition + */ +struct UTIL_LPM_Driver_s +{ + void (*EnterSleepMode) ( void ); /*!
© Copyright (c) 2019 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "stm32_seq.h" +#include "utilities_conf.h" + +/** @addtogroup SEQUENCER + * @{ + */ + +/* Private typedef -----------------------------------------------------------*/ +/** @defgroup SEQUENCER_Private_type SEQUENCER private type + * @{ + */ + +/** + * @brief structure used to manage task scheduling + */ +typedef struct +{ + uint32_t priority; /*! 32 +#error "UTIL_SEQ_CONF_TASK_NBR must be less than or equal to 32" +#endif /* UTIL_SEQ_CONF_TASK_NBR */ + +/** + * @brief default value of priority number. + */ +#ifndef UTIL_SEQ_CONF_PRIO_NBR +#define UTIL_SEQ_CONF_PRIO_NBR (2) +#endif /* UTIL_SEQ_CONF_PRIO_NBR */ + +/** + * @brief default memset function. + */ +#ifndef UTIL_SEQ_MEMSET8 +#define UTIL_SEQ_MEMSET8( dest, value, size ) UTILS_MEMSET8( dest, value, size ) +#endif /* UTIL_SEQ_MEMSET8 */ + +/** + * @} + */ + +/* Private variables ---------------------------------------------------------*/ + +/** @defgroup SEQUENCER_Private_varaible SEQUENCER private variables + * @{ + */ + +/** + * @brief task set. + */ +static volatile UTIL_SEQ_bm_t TaskSet; + +/** + * @brief task mask. + */ +static volatile UTIL_SEQ_bm_t TaskMask = UTIL_SEQ_ALL_BIT_SET; + +/** + * @brief super mask. + */ +static UTIL_SEQ_bm_t SuperMask = UTIL_SEQ_ALL_BIT_SET; + +/** + * @brief evt set mask. + */ +static volatile UTIL_SEQ_bm_t EvtSet = UTIL_SEQ_NO_BIT_SET; + +/** + * @brief evt expected mask. + */ +static volatile UTIL_SEQ_bm_t EvtWaited = UTIL_SEQ_NO_BIT_SET; + +/** + * @brief current task id. + */ +static uint32_t CurrentTaskIdx = 0U; + +/** + * @brief task function registered. + */ +static void (*TaskCb[UTIL_SEQ_CONF_TASK_NBR])( void ); + +/** + * @brief task prio management. + */ +static volatile UTIL_SEQ_Priority_t TaskPrio[UTIL_SEQ_CONF_PRIO_NBR]; + + +/** + * @brief List of the cleared task + */ +static UTIL_SEQ_bm_t TaskClearList = 0; + +/** + * @} + */ + +/* Private function prototypes -----------------------------------------------*/ +/** @defgroup SEQUENCER_Private_function SEQUENCER private functions + * @{ + */ +uint8_t SEQ_BitPosition(uint32_t Value); + +/** + * @} + */ + +/* Functions Definition ------------------------------------------------------*/ + + +/** @addtogroup SEQUENCER_Exported_function SEQUENCER exported functions + * @{ + */ +void UTIL_SEQ_Init( void ) +{ + TaskSet = UTIL_SEQ_NO_BIT_SET; + TaskMask = UTIL_SEQ_ALL_BIT_SET; + SuperMask = UTIL_SEQ_ALL_BIT_SET; + EvtSet = UTIL_SEQ_NO_BIT_SET; + EvtWaited = UTIL_SEQ_NO_BIT_SET; + CurrentTaskIdx = 0U; + (void)UTIL_SEQ_MEMSET8((uint8_t *)TaskCb, 0, sizeof(TaskCb)); + for(uint32_t index = 0; index < UTIL_SEQ_CONF_PRIO_NBR; index++) + { + TaskPrio[index].priority = 0; + TaskPrio[index].round_robin = 0; + } + UTIL_SEQ_INIT_CRITICAL_SECTION( ); + TaskClearList = 0; +} + +void UTIL_SEQ_DeInit( void ) +{ +} + +/** + * This function can be nested. + * That is the reason why many variables that are used only in that function are declared static. + * Note: These variables could have been declared static in the function. + * + */ +void UTIL_SEQ_Run( UTIL_SEQ_bm_t Mask_bm ) +{ + uint32_t counter; + UTIL_SEQ_bm_t current_task_set; + UTIL_SEQ_bm_t super_mask_backup; + UTIL_SEQ_bm_t local_taskset; + UTIL_SEQ_bm_t local_evtset; + UTIL_SEQ_bm_t local_taskmask; + UTIL_SEQ_bm_t local_evtwaited; + uint32_t round_robin[UTIL_SEQ_CONF_PRIO_NBR]; + UTIL_SEQ_bm_t task_starving_list; + + /* + * When this function is nested, the mask to be applied cannot be larger than the first call + * The mask is always getting smaller and smaller + * A copy is made of the mask set by UTIL_SEQ_Run() in case it is called again in the task + */ + super_mask_backup = SuperMask; + SuperMask &= Mask_bm; + + /* + * There are two independent mask to check: + * TaskMask that comes from UTIL_SEQ_PauseTask() / UTIL_SEQ_ResumeTask + * SuperMask that comes from UTIL_SEQ_Run + * If the waited event is there, exit from UTIL_SEQ_Run() to return to the + * waiting task + */ + local_taskset = TaskSet; + local_evtset = EvtSet; + local_taskmask = TaskMask; + local_evtwaited = EvtWaited; + while(((local_taskset & local_taskmask & SuperMask) != 0U) && ((local_evtset & local_evtwaited)==0U)) + { + counter = 0U; + /* + * When a flag is set, the associated bit is set in TaskPrio[counter].priority mask depending + * on the priority parameter given from UTIL_SEQ_SetTask() + * The while loop is looking for a flag set from the highest priority maskr to the lower + */ + while((TaskPrio[counter].priority & local_taskmask & SuperMask)== 0U) + { + counter++; + } + + current_task_set = TaskPrio[counter].priority & local_taskmask & SuperMask; + + /* + * The round_robin register is a mask of allowed flags to be evaluated. + * The concept is to make sure that on each round on UTIL_SEQ_Run(), if two same flags are always set, + * the sequencer does not run always only the first one. + * When a task has been executed, The flag is removed from the round_robin mask. + * If on the next UTIL_SEQ_RUN(), the two same flags are set again, the round_robin mask will + * mask out the first flag so that the second one can be executed. + * Note that the first flag is not removed from the list of pending task but just masked by + * the round_robin mask + * + * In the check below, the round_robin mask is reinitialize in case all pending + * tasks haven been executed at least once + */ + if ((TaskPrio[counter].round_robin & current_task_set) == 0U) + { + TaskPrio[counter].round_robin = UTIL_SEQ_ALL_BIT_SET; + } + + /* + * Compute the Stack Startving List + * This is the list of the task that have been set at least once minus the one that have been cleared ar least once + */ + task_starving_list = TaskSet; + + /* + * Due to the concept of TaskPrio[counter].round_robin and TaskClearList, it could be that at some points in time, + * (when using UTIL_SEQ_WaitEvt()), that there is a situation where at the same time, a bit is set in TaskPrio[counter].round_robin + * and reset in TaskClearList and another bit is set in TaskClearList and reset in TaskPrio[counter].round_robin. + * Such situation shall not happen when evaluating task_starving_list + * At any time, there should not be any bit reset in TaskPrio[counter].round_robin and reset in TaskClearList + * It is correct with regard to the Sequencer Architecture to set in TaskClearList all tasks that are said to be executed from TaskPrio[counter].round_robin + * This synchronizes both information before calculating the CurrentTaskIdx + */ + TaskClearList |= (~TaskPrio[counter].round_robin); + + task_starving_list &= (~TaskClearList); + + /* + * Consider first the starving list and update current_task_set accordingly + */ + if ((task_starving_list & current_task_set) != 0U) + { + current_task_set = (task_starving_list & current_task_set); + } + else + { + /* nothing to do */ + } + + /* + * Reinitialize the Starving List if required + */ + if(task_starving_list == 0) + { + TaskClearList = 0; + } + + /* + * Read the flag index of the task to be executed + * Once the index is read, the associated task will be executed even though a higher priority stack is requested + * before task execution. + */ + CurrentTaskIdx = (SEQ_BitPosition(current_task_set & TaskPrio[counter].round_robin)); + + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + /* remove from the list or pending task the one that has been selected to be executed */ + TaskSet &= ~(1U << CurrentTaskIdx); + + /* + * remove from all priority mask the task that has been selected to be executed + */ + for (counter = UTIL_SEQ_CONF_PRIO_NBR; counter != 0U; counter--) + { + TaskPrio[counter - 1u].priority &= ~(1U << CurrentTaskIdx); + } + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + UTIL_SEQ_PreTask(CurrentTaskIdx); + + /* + * Check that function exists before calling it + */ + if ((CurrentTaskIdx < UTIL_SEQ_CONF_TASK_NBR) && (TaskCb[CurrentTaskIdx] != NULL)) + { + /* + * save the round-robin value to take into account the operation done in UTIL_SEQ_WaitEvt + */ + for (uint32_t index = 0; index < UTIL_SEQ_CONF_PRIO_NBR; index++) + { + TaskPrio[index].round_robin &= ~(1U << CurrentTaskIdx); + round_robin[index] = TaskPrio[index].round_robin; + } + + /* Execute the task */ + TaskCb[CurrentTaskIdx]( ); + + /* + * restore the round-robin context + */ + for (uint32_t index = 0; index < UTIL_SEQ_CONF_PRIO_NBR; index++) + { + TaskPrio[index].round_robin &= round_robin[index]; + } + + UTIL_SEQ_PostTask(CurrentTaskIdx); + + local_taskset = TaskSet; + local_evtset = EvtSet; + local_taskmask = TaskMask; + local_evtwaited = EvtWaited; + + /* + * Update the two list for next round + */ + TaskClearList |= (1U << CurrentTaskIdx); + } + else + { + /* + * must never occurs, it means there is a warning in the system + */ + UTIL_SEQ_CatchWarning(UTIL_SEQ_WARNING_INVALIDTASKID); + } + } + + /* the set of CurrentTaskIdx to no task running allows to call WaitEvt in the Pre/Post ilde context */ + CurrentTaskIdx = UTIL_SEQ_NOTASKRUNNING; + /* if a waited event is present, ignore the IDLE sequence */ + if ((local_evtset & EvtWaited)== 0U) + { + UTIL_SEQ_PreIdle( ); + + UTIL_SEQ_ENTER_CRITICAL_SECTION_IDLE( ); + local_taskset = TaskSet; + local_evtset = EvtSet; + local_taskmask = TaskMask; + if ((local_taskset & local_taskmask & SuperMask) == 0U) + { + if ((local_evtset & EvtWaited)== 0U) + { + UTIL_SEQ_Idle( ); + } + } + UTIL_SEQ_EXIT_CRITICAL_SECTION_IDLE( ); + + UTIL_SEQ_PostIdle( ); + } + + /* restore the mask from UTIL_SEQ_Run() */ + SuperMask = super_mask_backup; + + return; +} + +void UTIL_SEQ_RegTask(UTIL_SEQ_bm_t TaskId_bm, uint32_t Flags, void (*Task)( void )) +{ + (void)Flags; + UTIL_SEQ_ENTER_CRITICAL_SECTION(); + + TaskCb[SEQ_BitPosition(TaskId_bm)] = Task; + + UTIL_SEQ_EXIT_CRITICAL_SECTION(); + + return; +} + +uint32_t UTIL_SEQ_IsRegisteredTask(UTIL_SEQ_bm_t TaskId_bm ) +{ + uint32_t _status = 0; + UTIL_SEQ_ENTER_CRITICAL_SECTION(); + + if ( TaskCb[SEQ_BitPosition(TaskId_bm)] != NULL ) + { + _status = 1; + } + + UTIL_SEQ_EXIT_CRITICAL_SECTION(); + return _status; +} + +void UTIL_SEQ_SetTask( UTIL_SEQ_bm_t TaskId_bm, uint32_t Task_Prio ) +{ + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + + TaskSet |= TaskId_bm; + TaskPrio[Task_Prio].priority |= TaskId_bm; + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; +} + +uint32_t UTIL_SEQ_IsSchedulableTask( UTIL_SEQ_bm_t TaskId_bm) +{ + uint32_t _status; + UTIL_SEQ_bm_t local_taskset; + + UTIL_SEQ_ENTER_CRITICAL_SECTION(); + + local_taskset = TaskSet; + _status = ((local_taskset & TaskMask & SuperMask & TaskId_bm) == TaskId_bm)? 1U: 0U; + + UTIL_SEQ_EXIT_CRITICAL_SECTION(); + return _status; +} + +void UTIL_SEQ_PauseTask( UTIL_SEQ_bm_t TaskId_bm ) +{ + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + + TaskMask &= (~TaskId_bm); + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; +} + +uint32_t UTIL_SEQ_IsPauseTask( UTIL_SEQ_bm_t TaskId_bm ) +{ + uint32_t _status; + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + + _status = ((TaskMask & TaskId_bm) == TaskId_bm) ? 0u:1u; + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + return _status; +} + +void UTIL_SEQ_ResumeTask( UTIL_SEQ_bm_t TaskId_bm ) +{ + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + + TaskMask |= TaskId_bm; + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; +} + +void UTIL_SEQ_SetEvt( UTIL_SEQ_bm_t EvtId_bm ) +{ + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + + EvtSet |= EvtId_bm; + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; +} + +void UTIL_SEQ_ClrEvt( UTIL_SEQ_bm_t EvtId_bm ) +{ + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + + EvtSet &= (~EvtId_bm); + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + return; +} + +void UTIL_SEQ_WaitEvt(UTIL_SEQ_bm_t EvtId_bm) +{ + UTIL_SEQ_bm_t event_waited_id_backup; + UTIL_SEQ_bm_t current_task_idx; + UTIL_SEQ_bm_t wait_task_idx; + /* + * store in local the current_task_id_bm as the global variable CurrentTaskIdx + * may be overwritten in case there are nested call of UTIL_SEQ_Run() + */ + current_task_idx = CurrentTaskIdx; + if(UTIL_SEQ_NOTASKRUNNING == CurrentTaskIdx) + { + wait_task_idx = 0u; + } + else + { + wait_task_idx = (uint32_t)1u << CurrentTaskIdx; + } + + /* backup the event id that was currently waited */ + event_waited_id_backup = EvtWaited; + EvtWaited = EvtId_bm; + /* + * wait for the new event + * note: that means that if the previous waited event occurs, it will not exit + * the while loop below. + * The system is waiting only for the last waited event. + * When it will go out, it will wait again from the previous one. + * It case it occurs while waiting for the second one, the while loop will exit immediately + */ + + while ((EvtSet & EvtId_bm) == 0U) + { + UTIL_SEQ_EvtIdle(wait_task_idx, EvtId_bm); + } + + /* + * Restore the CurrentTaskIdx that may have been modified by call of UTIL_SEQ_Run() + * from UTIL_SEQ_EvtIdle(). This is required so that a second call of UTIL_SEQ_WaitEvt() + * in the same process pass the correct current_task_id_bm in the call of UTIL_SEQ_EvtIdle() + */ + CurrentTaskIdx = current_task_idx; + + UTIL_SEQ_ENTER_CRITICAL_SECTION( ); + + EvtSet &= (~EvtId_bm); + + UTIL_SEQ_EXIT_CRITICAL_SECTION( ); + + EvtWaited = event_waited_id_backup; + return; +} + +UTIL_SEQ_bm_t UTIL_SEQ_IsEvtPend( void ) +{ + UTIL_SEQ_bm_t local_evtwaited = EvtWaited; + return (EvtSet & local_evtwaited); +} + +__WEAK void UTIL_SEQ_EvtIdle( UTIL_SEQ_bm_t TaskId_bm, UTIL_SEQ_bm_t EvtWaited_bm ) +{ + (void)EvtWaited_bm; + UTIL_SEQ_Run(~TaskId_bm); + return; +} + +__WEAK void UTIL_SEQ_Idle( void ) +{ + return; +} + +__WEAK void UTIL_SEQ_PreIdle( void ) +{ + /* + * Unless specified by the application, there is nothing to be done + */ + return; +} + +__WEAK void UTIL_SEQ_PostIdle( void ) +{ + /* + * Unless specified by the application, there is nothing to be done + */ + return; +} + +__WEAK void UTIL_SEQ_PreTask( uint32_t TaskId ) +{ + (void)TaskId; + return; +} + +__WEAK void UTIL_SEQ_PostTask( uint32_t TaskId ) +{ + (void)TaskId; + return; +} + +__WEAK void UTIL_SEQ_CatchWarning(UTIL_SEQ_WARNING WarningId) +{ + (void)WarningId; + return; +} + +/** + * @} + */ + +/** @addtogroup SEQUENCER_Private_function + * @{ + */ + +#if( __CORTEX_M == 0) +const uint8_t SEQ_clz_table_4bit[16U] = { 4U, 3U, 2U, 2U, 1U, 1U, 1U, 1U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U }; +/** + * @brief return the position of the first bit set to 1 + * @param Value 32 bit value + * @retval bit position + */ +uint8_t SEQ_BitPosition(uint32_t Value) +{ + uint8_t position = 0U; + uint32_t lvalue = Value; + + if ((lvalue & 0xFFFF0000U) == 0U) + { + position = 16U; + lvalue <<= 16U; + } + if ((lvalue & 0xFF000000U) == 0U) + { + position += 8U; + lvalue <<= 8U; + } + if ((lvalue & 0xF0000000U) == 0U) + { + position += 4U; + lvalue <<= 4U; + } + + position += SEQ_clz_table_4bit[lvalue >> (32-4)]; + + return (uint8_t)(31U-position); +} +#else +/** + * @brief return the position of the first bit set to 1 + * @param Value 32 bit value + * @retval bit position + */ +uint8_t SEQ_BitPosition(uint32_t Value) +{ + return (uint8_t)(31 -__CLZ( Value )); +} +#endif /* __CORTEX_M == 0 */ + +/** + * @} + */ + +/** + * @} + */ + diff --git a/firmware/memory_chip_gone/Utilities/sequencer/stm32_seq.h b/firmware/memory_chip_gone/Utilities/sequencer/stm32_seq.h new file mode 100644 index 0000000..05a3b20 --- /dev/null +++ b/firmware/memory_chip_gone/Utilities/sequencer/stm32_seq.h @@ -0,0 +1,405 @@ +/** + ****************************************************************************** + * @file stm32_seq.h + * @author MCD Application Team + * @brief sequencer interface + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2019 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. + * + ****************************************************************************** + */ + + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef STM32_SEQ_H +#define STM32_SEQ_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stdint.h" + +/** @defgroup SEQUENCER sequencer utilities + * @{ + */ + +/* Exported types ------------------------------------------------------------*/ +/** @defgroup SEQUENCER_Exported_type SEQUENCER exported types + * @{ + */ +/** + * @brief bit mapping of the task. + * this value is used to represent a list of task (each corresponds to a task). + */ +typedef uint32_t UTIL_SEQ_bm_t; + +/** + * @brief lits of the warning of the sequencer. + * this value is used to indicate warning detected during the sequencer execution. + */ +typedef enum { + UTIL_SEQ_WARNING_INVALIDTASKID, +}UTIL_SEQ_WARNING; + +/** + * @} + */ + +/* Exported constants --------------------------------------------------------*/ + +/** @defgroup SEQUENCER_Exported_const SEQUENCER exported constants + * @{ + */ + +/** + * @brief This provides a default value for unused parameter + * + */ +#define UTIL_SEQ_RFU 0 + +/** + * @brief Default value used to start the scheduling. + * + * This informs the sequencer that all tasks registered shall be considered + * + * @note + * This should be used in the application\n + * while(1)\n + * {\n + * UTIL_SEQ_Run( UTIL_SEQ_DEFAULT );\n + * }\n + * + */ +#define UTIL_SEQ_DEFAULT (~0U) + +/** + * @} + */ + +/* External variables --------------------------------------------------------*/ +/* Exported macros -----------------------------------------------------------*/ + +/** @defgroup SEQUENCER_Exported_macro SEQUENCER exported macros + * @{ + */ + +/** + * @brief This macro can be used to define a task with one parameter + * + * @note this is an example of using this macro + * + * task prototype definition + * void FUNCTION_NAME(void *Instance) + * { + * uint8_t _instance = *(uint8_t*) Instance; + * } + * + * task declaration in the application for two instances + * const uint8_t instance1 = 1; + * const uint8_t instance2 = 2; + * UTIL_SEQ_TaskParamDef(FUNCTION_NAME, instance1) + * UTIL_SEQ_TaskParamDef(FUNCTION_NAME, instance2) + * + * task initialization + * UTIL_SEQ_RegTask(1 << 1, 0, UTIL_SEQ_TaskFunction(FUNCTION_NAME,instance2)); + * UTIL_SEQ_RegTask(1 << 10, 0, UTIL_SEQ_TaskFunction(FUNCTION_NAME,instance3)); + * + * Then no change on the management of the task within the application, the instance being managed within the overloaded function + * + */ +#define UTIL_SEQ_TaskParamDef(_FUNC_,_PARAM_VAL_) \ + static void SEQ_FUNC_##_FUNC_##_PARAM_VAL_(void); \ + static void SEQ_FUNC_##_FUNC_##_PARAM_VAL_(void) \ + { \ + static void *SEQ_PARAM_##_FUNC_ = (void*)&_PARAM_VAL_;\ + _FUNC_(SEQ_PARAM_##_FUNC_); \ + } + +/** + * @brief This macro is used to retrieve the function name of the task + */ +#define UTIL_SEQ_TaskFunction(_FUNC_,_PARAM_VAL_) SEQ_FUNC_##_FUNC_##_PARAM_VAL_ + +/** + * @} + */ + +/* Exported functions ------------------------------------------------------- */ + +/** @defgroup SEQUENCER_Exported_function SEQUENCER exported functions + * @{ + */ + +/** + * @brief This function initializes the sequencer resources. + * + * @note It shall not be called from an ISR. + * + */ +void UTIL_SEQ_Init( void ); + +/** + * @brief This function un-initializes the sequencer resources. + * + * @note It shall not be called from an ISR + * + */ +void UTIL_SEQ_DeInit( void ); + +/** + * @brief This function is called by the sequencer in critical section (PRIMASK bit) when + * - there are no more tasks to be executed + * AND + * - there are no pending event or the pending event is still not set + * @note The application should enter low power mode in this function + * When this function is not implemented by the application, the sequencer keeps running a while loop (RUN MODE). + * It shall be called only by the sequencer. + * + */ +void UTIL_SEQ_Idle( void ); + +/** + * @brief This function is called by the sequencer outside critical section just before calling UTIL_SEQ_Idle( ) + * UTIL_SEQ_PreIdle() is considered as the last task executed before calling UTIL_SEQ_Idle( ) + * In case a task or an event is set from an interrupt handler just after UTIL_SEQ_PreIdle() is called, + * UTIL_SEQ_Idle() will not be called. + * + * @note It shall be called only by the sequencer. + * + */ +void UTIL_SEQ_PreIdle( void ); + +/** + * @brief This function is called by the sequencer outside critical section either + * - after calling UTIL_SEQ_Idle( ) + * OR + * - after calling UTIL_SEQ_PreIdle( ) without call to UTIL_SEQ_Idle() due to an incoming task set or event + * requested after UTIL_SEQ_PreIdle() has been called. + * + * @note UTIL_SEQ_PostIdle() is always called if UTIL_SEQ_PreIdle() has been called and never called otherwise. + * It shall be called only by the sequencer. + * + */ +void UTIL_SEQ_PostIdle( void ); + +/** + * @brief This function requests the sequencer to execute all pending tasks using round robin mechanism. + * When no task are pending, it calls UTIL_SEQ_Idle(); + * This function should be called in a while loop in the application + * + * @param Mask_bm list of task (bit mapping) that is be kept in the sequencer list. + * + * @note It shall not be called from an ISR. + * @note The construction of the task must take into account the fact that there is no counting / protection + * on the activation of the task. Thus, when the task is running, it must perform all the operations + * in progress programmed before its call or manage a reprogramming of the task. + * + */ +void UTIL_SEQ_Run( UTIL_SEQ_bm_t Mask_bm ); + +/** + * @brief This function registers a task in the sequencer. + * + * @param TaskId_bm The Id of the task + * @param Flags Flags are reserved param for future use + * @param Task Reference of the function to be executed + * + * @note It may be called from an ISR. + * + */ +void UTIL_SEQ_RegTask( UTIL_SEQ_bm_t TaskId_bm, uint32_t Flags, void (*Task)( void ) ); + +/** + * @brief This function checks if a task is registered + * + * @param TaskId_bm The Id of the task + * It shall be (1< + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3